diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-05-24 23:23:03 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-05-24 23:23:03 +0000 |
commit | f5b2d27e5f093a24694c4974b628b1c092fdebf0 (patch) | |
tree | 1f07cd9a652bf6e48193cf7bcbe2dcd6eff29181 /sys-apps/util-linux | |
parent | (#92832) Fix misformatted patch. (diff) | |
download | gentoo-2-f5b2d27e5f093a24694c4974b628b1c092fdebf0.tar.gz gentoo-2-f5b2d27e5f093a24694c4974b628b1c092fdebf0.tar.bz2 gentoo-2-f5b2d27e5f093a24694c4974b628b1c092fdebf0.zip |
dont build fdisk on m68k and fix a simple overflow (fixes from Debian)
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-apps/util-linux')
3 files changed, 71 insertions, 1 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch b/sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch new file mode 100644 index 000000000000..6105fb1ddfca --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12q-debian-10cfdisk.patch @@ -0,0 +1,49 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10cfdisk.dpatch by LaMont Jones <lamont@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Buffer overruns with narrow terminal windows. + +@DPATCH@ +diff -urNad util-linux/fdisk/cfdisk.c /tmp/dpep.rEB26p/util-linux/fdisk/cfdisk.c +--- util-linux/fdisk/cfdisk.c 2004-12-24 14:41:20.000000000 -0700 ++++ /tmp/dpep.rEB26p/util-linux/fdisk/cfdisk.c 2004-12-24 15:00:00.503453740 -0700 +@@ -2100,7 +2100,7 @@ + if (to_file) { + if ((fp = fopen(fname, "w")) == NULL) { + char errstr[LINE_LENGTH]; +- sprintf(errstr, _("Cannot open file '%s'"), fname); ++ snprintf(errstr, sizeof(errstr), _("Cannot open file '%s'"), fname); + print_warning(errstr); + return; + } +@@ -2184,7 +2184,7 @@ + if (to_file) { + if ((fp = fopen(fname, "w")) == NULL) { + char errstr[LINE_LENGTH]; +- sprintf(errstr, _("Cannot open file '%s'"), fname); ++ snprintf(errstr, sizeof(errstr), _("Cannot open file '%s'"), fname); + print_warning(errstr); + return; + } +@@ -2638,9 +2638,9 @@ + mvaddstr(WARNING_START, 0, line); + + +- sprintf(line, "cfdisk %s", VERSION); ++ snprintf(line, COLS+1, "cfdisk %s", VERSION); + mvaddstr(HEADER_START, (COLS-strlen(line))/2, line); +- sprintf(line, _("Disk Drive: %s"), disk_device); ++ snprintf(line, COLS+1, _("Disk Drive: %s"), disk_device); + mvaddstr(HEADER_START+2, (COLS-strlen(line))/2, line); + { + long long bytes = actual_size*(long long) SECTOR_SIZE; +@@ -2654,7 +2654,7 @@ + bytes, megabytes/K, (10*megabytes/K)%10); + } + mvaddstr(HEADER_START+3, (COLS-strlen(line))/2, line); +- sprintf(line, _("Heads: %d Sectors per Track: %d Cylinders: %lld"), ++ snprintf(line, COLS+1, _("Heads: %d Sectors per Track: %d Cylinders: %lld"), + heads, sectors, cylinders); + mvaddstr(HEADER_START+4, (COLS-strlen(line))/2, line); + diff --git a/sys-apps/util-linux/files/util-linux-2.12q-no-m68k-fdisk.patch b/sys-apps/util-linux/files/util-linux-2.12q-no-m68k-fdisk.patch new file mode 100644 index 000000000000..6d3334f4d810 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12q-no-m68k-fdisk.patch @@ -0,0 +1,15 @@ +Disable building fdisk on m68k + +--- fdisk/Makefile ++++ fdisk/Makefile +@@ -18,8 +18,10 @@ + endif + endif + ++ifneq "$(ARCH)" "m68k" + SBIN:=$(SBIN) fdisk + MAN8:=$(MAN8) fdisk.8 ++endif + + ifneq "$(ARCH)" "sparc" + SBIN:=$(SBIN) $(CFDISK) sfdisk diff --git a/sys-apps/util-linux/util-linux-2.12q.ebuild b/sys-apps/util-linux/util-linux-2.12q.ebuild index fad6e2e5daf7..9912de841c38 100644 --- a/sys-apps/util-linux/util-linux-2.12q.ebuild +++ b/sys-apps/util-linux/util-linux-2.12q.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12q.ebuild,v 1.5 2005/04/30 06:50:44 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12q.ebuild,v 1.6 2005/05/24 23:23:03 vapier Exp $ inherit eutils flag-o-matic toolchain-funcs @@ -79,6 +79,12 @@ src_unpack() { # swapon gets confused by symlinks in /dev #69162 epatch ${FILESDIR}/${PN}-2.12p-swapon-check-symlinks.patch + # fix simple buffer overflow (from Debian) + epatch ${FILESDIR}/${PN}-2.12q-debian-10cfdisk.patch + + # don't build fdisk on m68k + epatch ${FILESDIR}/${PN}-2.12q-no-m68k-fdisk.patch + # Enable random features local mconfigs="MCONFIG" use old-crypt && mconfigs="${mconfigs} ${OLD_CRYPT_P}/MCONFIG" |