diff options
author | Michael McCabe <randy@gentoo.org> | 2004-04-18 21:55:48 +0000 |
---|---|---|
committer | Michael McCabe <randy@gentoo.org> | 2004-04-18 21:55:48 +0000 |
commit | d1aeeda98304988f25e9195812cc696e1e96bf06 (patch) | |
tree | f2e6913cae7badec246846304b9ff05db2baaf90 /sys-apps | |
parent | old (diff) | |
download | gentoo-2-d1aeeda98304988f25e9195812cc696e1e96bf06.tar.gz gentoo-2-d1aeeda98304988f25e9195812cc696e1e96bf06.tar.bz2 gentoo-2-d1aeeda98304988f25e9195812cc696e1e96bf06.zip |
added s390 specific fixes to close bug #47965
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/coreutils/ChangeLog | 12 | ||||
-rw-r--r-- | sys-apps/coreutils/Manifest | 5 | ||||
-rw-r--r-- | sys-apps/coreutils/coreutils-5.2.0-r1.ebuild | 154 | ||||
-rw-r--r-- | sys-apps/coreutils/files/003_all_coreutils-gentoo-uname-s390.patch | 137 | ||||
-rw-r--r-- | sys-apps/coreutils/files/digest-coreutils-5.2.0-r1 | 3 |
5 files changed, 309 insertions, 2 deletions
diff --git a/sys-apps/coreutils/ChangeLog b/sys-apps/coreutils/ChangeLog index 375dcd02e680..0e7e3cf5a223 100644 --- a/sys-apps/coreutils/ChangeLog +++ b/sys-apps/coreutils/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-apps/coreutils # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/coreutils/ChangeLog,v 1.82 2004/04/09 04:56:41 lv Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/coreutils/ChangeLog,v 1.83 2004/04/18 21:55:48 randy Exp $ + +*coreutils-5.2.0-r1 (18 Apr 2004) + + 18 Apr 2004; Michael McCabe <randy@gentoo.org> +coreutils-5.2.0-r1.ebuild: + Adding s390 specific fixes to close bug 47965 + +*coreutils-5.2.0-r1 18 Apr 2004 + + 18 Apr 2004; <> + # INSERT ENTRY HERE 09 Apr 2004; Travis Tilley <lv@gentoo.org> coreutils-5.2.0.ebuild: stable on amd64 diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest index 3fb5063928b6..eb01ebb71f7f 100644 --- a/sys-apps/coreutils/Manifest +++ b/sys-apps/coreutils/Manifest @@ -1,4 +1,4 @@ -MD5 ecad82c0353e4c3ca28161d85eb1f6c1 ChangeLog 16337 +MD5 ee514e5426fc0d3565841933ac1195df ChangeLog 16413 MD5 3645d83c5dafa30ce524b6fc2361c152 coreutils-5.0-r5.ebuild 2557 MD5 9253cc724d0f5ba11a7a7253c91aa6f6 coreutils-5.0-r6.ebuild 2724 MD5 167296005c2f3fc5575606a55b601607 coreutils-5.0.91-r2.ebuild 3550 @@ -6,9 +6,12 @@ MD5 ce3b3665ef7eec18425f7cd7de6f6236 coreutils-5.0.91-r3.ebuild 3958 MD5 2f912270290d6f28653774d0c61c5b7e coreutils-5.0.91-r4.ebuild 4223 MD5 6548fa221b4e8185da04986e25f2a914 coreutils-5.2.0.ebuild 4027 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 +MD5 81bba8092222f278e48b002520c063ca coreutils-5.2.0-r1.ebuild 4088 MD5 d1eb949ee56a926125ae896f901286ce files/digest-coreutils-5.0-r5 141 MD5 e80d3d87cfbe40bc56636167ae5b4768 files/digest-coreutils-5.0-r6 141 MD5 4638c50e0ea024536055d69519cd5fad files/digest-coreutils-5.0.91-r2 151 MD5 a56b66f95289815e386f537689ef29a0 files/digest-coreutils-5.0.91-r3 229 MD5 9e4492e1c7e9c927ad7c492239dbe029 files/digest-coreutils-5.0.91-r4 229 MD5 3d21b6fedf28c429ae337aeaaf638f79 files/digest-coreutils-5.2.0 224 +MD5 3d21b6fedf28c429ae337aeaaf638f79 files/digest-coreutils-5.2.0-r1 224 +MD5 5a7d722a7600e8834bf39c24790caaa2 files/003_all_coreutils-gentoo-uname-s390.patch 3120 diff --git a/sys-apps/coreutils/coreutils-5.2.0-r1.ebuild b/sys-apps/coreutils/coreutils-5.2.0-r1.ebuild new file mode 100644 index 000000000000..8b9c59a8412e --- /dev/null +++ b/sys-apps/coreutils/coreutils-5.2.0-r1.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/coreutils/coreutils-5.2.0-r1.ebuild,v 1.1 2004/04/18 21:55:48 randy Exp $ + +inherit eutils flag-o-matic + +IUSE="nls build acl selinux static" + +PATCH_VER=0.1 +I18N_VER=i18n-0.1 +PATCHDIR=${WORKDIR}/patch + +S=${WORKDIR}/${P} +DESCRIPTION="Standard GNU file utilities (chmod, cp, dd, dir, ls...), text utilities (sort, tr, head, wc..), and shell utilities (whoami, who,...)" +HOMEPAGE="http://www.gnu.org/software/coreutils/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2 + http://www.openi18n.org/subgroups/utildev/patch/${P}-${I18N_VER}.patch.gz + mirror://gentoo/${P}-gentoo-${PATCH_VER}.tar.bz2 + http://dev.gentoo.org/~seemant/extras/${P}.tar.bz2 + http://dev.gentoo.org/~seemant/extras/${P}-${I18N_VER}.patch.gz + http://dev.gentoo.org/~seemant/extras/${P}-gentoo-${PATCH_VER}.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~mips ~ia64 ~amd64 ~ppc64 s390" + +RDEPEND="selinux? ( sys-libs/libselinux ) + acl? ( !hppa? ( sys-apps/acl sys-apps/attr ) ) + nls? ( sys-devel/gettext ) + >=sys-libs/ncurses-5.3-r5" + +DEPEND="${RDEPEND} + virtual/glibc + >=sys-apps/portage-2.0.49 + >=sys-devel/automake-1.8.2 + >=sys-devel/autoconf-2.57 + >=sys-devel/m4-1.4-r1 + sys-apps/help2man" + +src_unpack() { + unpack ${A} + + cd ${S} + + # Mandrake's lsw patch caused issues on ia64 and amd64 with ls + # Reported upstream, but we don't apply it for now + # mv ${PATCHDIR}/mandrake/019* ${PATCHDIR}/excluded + + EPATCH_SUFFIX="patch" epatch ${PATCHDIR}/mandrake + epatch ${WORKDIR}/${P}-${I18N_VER}.patch + + # Fixed patch for s390 to close bug 47965 + # + if use s390 + then + mv ${PATCHDIR}/generic/003* ${PATCHDIR}/excluded + einfo Applying s390 patches + epatch ${FILESDIR}/003_all_coreutils-gentoo-uname-s390.patch || die + fi + + # Apply the ACL patches. + # WARNING: These CONFLICT with the SELINUX patches + if use acl + then + mv ${PATCHDIR}/generic/00{1,2,4}* ${PATCHDIR}/excluded + mv ${PATCHDIR}/selinux/001_all_coreutils-noacl* ${PATCHDIR}/excluded + EPATCH_SUFFIX="patch" epatch ${PATCHDIR}/acl + else + mv ${PATCHDIR}/selinux/001_all_coreutils-acl* ${PATCHDIR}/excluded + fi + + # patch to remove Stallman's su/wheel group rant (which doesn't apply, + # since Gentoo's su is not GNU/su, but that from shadow. + # do not include su infopage, as it is not valid for the su + # from sys-apps/shadow that we are using. + # Patch to add processor specific info to the uname output + + EPATCH_SUFFIX="patch" epatch ${PATCHDIR}/generic + + EPATCH_SUFFIX="patch" epatch ${PATCHDIR}/extra + + use selinux && EPATCH_SUFFIX="patch" epatch ${PATCHDIR}/selinux +} + +src_compile() { + +# export DEFAULT_POSIX2_VERSION=199209 + + if [ -z "`which cvs 2>/dev/null`" ] + then + # Fix issues with gettext's autopoint if cvs is not installed, + # bug #28920. + export AUTOPOINT="/bin/true" + fi + + + export WANT_AUTOMAKE=1.8 + + mv m4/inttypes.m4 m4/inttypes-eggert.m4 + touch aclocal.m4 configure config.hin \ + Makefile.in */Makefile.in */*/Makefile.in + + ebegin "Reconfiguring configure scripts" + aclocal -I m4 &>/dev/null || die + autoconf || die + automake || die + eend $? + + econf \ + --bindir=/bin \ + --enable-largefile \ + `use_enable nls` \ + `use_enable selinux` || die + + if use static + then + emake LDFLAGS=-static || die + else + emake || die + fi +} + +src_install() { + einstall \ + bindir=${D}/bin || die + + cd ${D} + dodir /usr/bin + rm -rf usr/lib + + # move non-critical packages into /usr + mv bin/{csplit,expand,factor,fmt,fold,join,md5sum,nl,od} usr/bin + mv bin/{paste,pathchk,pinky,pr,printf,sha1sum,shred,sum,tac} usr/bin + mv bin/{tail,test,tsort,unexpand,users} usr/bin + cd usr/bin + ln -s ../../bin/* . + + if [ -z "`use build`" ] + then + cd ${S} + dodoc AUTHORS ChangeLog* COPYING NEWS README* THANKS TODO + else + rm -rf ${D}/usr/share + fi +} + +pkg_postinst() { + # hostname does not get removed as it is included with older stage1 + # tarballs, and net-tools installs to /bin + if [ -e ${ROOT}/usr/bin/hostname ] && [ ! -L ${ROOT}/usr/bin/hostname ] + then + rm -f ${ROOT}/usr/bin/hostname + fi +} diff --git a/sys-apps/coreutils/files/003_all_coreutils-gentoo-uname-s390.patch b/sys-apps/coreutils/files/003_all_coreutils-gentoo-uname-s390.patch new file mode 100644 index 000000000000..6596a0c8cfa2 --- /dev/null +++ b/sys-apps/coreutils/files/003_all_coreutils-gentoo-uname-s390.patch @@ -0,0 +1,137 @@ +--- coreutils-5.2.0/src/uname.c.orig 2004-04-15 22:42:13.000000000 +0200 ++++ coreutils-5.2.0/src/uname.c 2004-04-15 22:39:44.000000000 +0200 +@@ -44,6 +44,11 @@ + # endif + #endif + ++#if defined (__linux__) ++#define USE_PROCINFO ++#define UNAME_HARDWARE_PLATFORM ++#endif ++ + #include "system.h" + #include "error.h" + +@@ -129,6 +134,82 @@ + exit (status); + } + ++/* Carlos E. Gorges <carlos@techlinux.com.br> - return vendor_id from proc cpuinfo */ ++#if defined(USE_PROCINFO) ++/* x==0, processor type | x==1, hardware-platform */ ++int ++__linux_procinfo (int x, char *fstr) ++{ ++ FILE *ffd; ++ char *cstr=calloc(64,sizeof(char)), ++ *dstr=calloc(257,sizeof(char)), ++ *retr=NULL; ++#if defined(__s390__) || defined(__s390x__) ++ if ( ffd=fopen("/proc/sysinfo", "r") ) ++#else ++ if ( ffd=fopen("/proc/cpuinfo", "r") ) ++#endif ++ { ++#if defined(__s390__) || defined(__s390x__) ++ while ( fscanf(ffd, "%[^ :]%*[ :]%[^\n]\n", cstr, dstr) != EOF ) ++#else ++ while ( fscanf(ffd, "%[^:\t]\t: %[^\n]\n", cstr, dstr) != EOF ) ++#endif ++ { ++ char *sdata[] = ++ { ++ #if defined(__i386__) ++ "model name", "vendor_id" ++ #endif ++ #if defined(__ia64__) || defined(__x86_64__) ++ "model", "vendor" ++ #endif ++ #if defined(__alpha__) ++ "cpu model", "system type" ++ #endif ++ #if defined(sparc) || defined(__sparc__) ++ "type", "cpu" ++ #endif ++ #if defined(__hppa__) ++ "cpu", "model" ++ #endif ++ #if defined(__mips__) ++ "cpu model", "system type" ++ #endif ++ #if defined(PPC) ++ "cpu", "machine" ++ #endif ++ #if defined(__s390__) || defined(__s390x__) ++ "Type", "Manufacturer" ++ #endif ++ }; ++ ++ if(!retr) ++ { ++ if (!strcmp(cstr, sdata[x])) ++ retr = strdup(dstr); ++ } else ++ break; ++ ++ } ++ fclose(ffd); ++ ++ if(retr) ++ { ++#if defined(__s390__) || defined(__s390x__) ++ while (strlen(retr) && isblank(retr[strlen(retr)-1])) ++ retr[strlen(retr)-1] = 0; ++#endif ++ strncpy(fstr,retr,257); ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++#endif ++ ++ + /* Print ELEMENT, preceded by a space if something has already been + printed. */ + +@@ -243,13 +324,19 @@ + if (toprint & PRINT_PROCESSOR) + { + char const *element = unknown; +-#if HAVE_SYSINFO && defined SI_ARCHITECTURE ++#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO) + { + static char processor[257]; ++#if HAVE_SYSINFO && defined SI_ARCHITECTURE + if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) ++#endif ++#if defined(USE_PROCINFO) ++ if( 0 <= __linux_procinfo(0, processor)) ++#endif + element = processor; + } + #endif ++ + #ifdef UNAME_PROCESSOR + if (element == unknown) + { +@@ -278,9 +365,13 @@ + if (element == unknown) + { + static char hardware_platform[257]; ++#if ! defined (USE_PROCINFO) + size_t s = sizeof hardware_platform; + static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM }; + if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0) ++#else ++ if( 0 <= __linux_procinfo(1, hardware_platform)) ++#endif + element = hardware_platform; + } + #endif +@@ -294,3 +385,4 @@ + + exit (EXIT_SUCCESS); + } ++ diff --git a/sys-apps/coreutils/files/digest-coreutils-5.2.0-r1 b/sys-apps/coreutils/files/digest-coreutils-5.2.0-r1 new file mode 100644 index 000000000000..626270690004 --- /dev/null +++ b/sys-apps/coreutils/files/digest-coreutils-5.2.0-r1 @@ -0,0 +1,3 @@ +MD5 ea024eaf04ee7a2a4270655d584445d2 coreutils-5.2.0.tar.bz2 4242493 +MD5 34f8286d25e5dd049482c0f92bb4f796 coreutils-5.2.0-i18n-0.1.patch.gz 25741 +MD5 54ec4b94379d3356c70e1fc320f117e7 coreutils-5.2.0-gentoo-0.1.tar.bz2 60691 |