diff options
author | 2003-03-05 21:39:46 +0000 | |
---|---|---|
committer | 2003-03-05 21:39:46 +0000 | |
commit | fa891df7876fee692e1a9746da1a0b86f62c3073 (patch) | |
tree | fe89d50116e22658973961c344ccaa2e08c86878 | |
parent | masked coreutils FOR TESTING (diff) | |
download | gentoo-2-fa891df7876fee692e1a9746da1a0b86f62c3073.tar.gz gentoo-2-fa891df7876fee692e1a9746da1a0b86f62c3073.tar.bz2 gentoo-2-fa891df7876fee692e1a9746da1a0b86f62c3073.zip |
replacement for textutils, sh-utils and fileutils
-rw-r--r-- | sys-apps/coreutils/ChangeLog | 11 | ||||
-rw-r--r-- | sys-apps/coreutils/coreutils-4.5.9.ebuild | 90 | ||||
-rw-r--r-- | sys-apps/coreutils/files/coreutils-4.5.9-gentoo-rms.diff | 46 | ||||
-rw-r--r-- | sys-apps/coreutils/files/coreutils-4.5.9-gentoo-uname.diff | 120 | ||||
-rw-r--r-- | sys-apps/coreutils/files/digest-coreutils-4.5.9 | 1 |
5 files changed, 268 insertions, 0 deletions
diff --git a/sys-apps/coreutils/ChangeLog b/sys-apps/coreutils/ChangeLog new file mode 100644 index 000000000000..0d6e8b785963 --- /dev/null +++ b/sys-apps/coreutils/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for sys-apps/coreutils +# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/coreutils/ChangeLog,v 1.1 2003/03/05 21:39:46 seemant Exp $ + +*coreutils-4.5.9 (06 Mar 2003) + + 06 Mar 2003; Seemant Kulleen <seemant@gentoo.org> coreutils-4.5.9.ebuild + ChangeLog files/digest-coreutils-4.5.9 : + + New package -- this will replace fileutils text-utils and sh-utils, when + it gets unmasked. diff --git a/sys-apps/coreutils/coreutils-4.5.9.ebuild b/sys-apps/coreutils/coreutils-4.5.9.ebuild new file mode 100644 index 000000000000..4f7d705e8efe --- /dev/null +++ b/sys-apps/coreutils/coreutils-4.5.9.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/coreutils/coreutils-4.5.9.ebuild,v 1.1 2003/03/05 21:39:46 seemant Exp $ + +inherit eutils + +IUSE="nls build" + +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="ftp://alpha.gnu.org/gnu/coreutils/${P}.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~arm" + +DEPEND="virtual/glibc + nls? ( sys-devel/gettext )" + + +src_unpack() { + unpack ${A} + cd ${S} + + # 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. + epatch ${FILESDIR}/${P}-gentoo-rms.diff + + # Patch to add processor specific info to the uname output + if [ -z "`use hppa`" ] && [ -z "`use arm`" ] + then + epatch ${FILESDIR}/${P}-gentoo-uname.diff + fi +} + +src_compile() { + local myconf="" + use nls || myconf="--disable-nls" + + econf \ + --bindir=/bin \ + ${myconf} || 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 + 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 + + # hostname comes from net-base + # hostname does not work with the -f switch, which breaks gnome2 + # amongst other things + rm -f ${D}/usr/bin/hostname + + # /bin/su comes from sys-apps/shadow + rm -f ${D}/bin/su ${D}/usr/share/man/man1/su + + # /usr/bin/uptime comes from the sys-apps/procps packaga + rm -f ${D}/usr/bin/uptime ${D}/usr/share/man/man1/uptime* +} + +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/coreutils-4.5.9-gentoo-rms.diff b/sys-apps/coreutils/files/coreutils-4.5.9-gentoo-rms.diff new file mode 100644 index 000000000000..375c99de88f1 --- /dev/null +++ b/sys-apps/coreutils/files/coreutils-4.5.9-gentoo-rms.diff @@ -0,0 +1,46 @@ +diff -urN coreutils-4.5.9.orig/doc/coreutils.texi coreutils-4.5.9/doc/coreutils.texi +--- coreutils-4.5.9.orig/doc/coreutils.texi 2003-03-02 10:09:14.000000000 -0800 ++++ coreutils-4.5.9/doc/coreutils.texi 2003-03-05 13:38:09.000000000 -0800 +@@ -11249,8 +11249,7 @@ + @findex syslog + @command{su} can optionally be compiled to use @code{syslog} to report + failed, and optionally successful, @command{su} attempts. (If the system +-supports @code{syslog}.) However, GNU @command{su} does not check if the +-user is a member of the @code{wheel} group; see below. ++supports @code{syslog}.) + + The program accepts the following options. Also see @ref{Common options}. + +@@ -11321,32 +11320,6 @@ + + @end table + +-@cindex wheel group, not supported +-@cindex group wheel, not supported +-@cindex fascism +-@heading Why GNU @command{su} does not support the @samp{wheel} group +- +-(This section is by Richard Stallman.) +- +-@cindex Twenex +-@cindex MIT AI lab +-Sometimes a few of the users try to hold total power over all the +-rest. For example, in 1984, a few users at the MIT AI lab decided to +-seize power by changing the operator password on the Twenex system and +-keeping it secret from everyone else. (I was able to thwart this coup +-and give power back to the users by patching the kernel, but I +-wouldn't know how to do that in Unix.) +- +-However, occasionally the rulers do tell someone. Under the usual +-@command{su} mechanism, once someone learns the root password who +-sympathizes with the ordinary users, he or she can tell the rest. The +-``wheel group'' feature would make this impossible, and thus cement the +-power of the rulers. +- +-I'm on the side of the masses, not that of the rulers. If you are +-used to supporting the bosses and sysadmins in whatever they do, you +-might find this idea strange at first. +- + + @node Process control + @chapter Process control diff --git a/sys-apps/coreutils/files/coreutils-4.5.9-gentoo-uname.diff b/sys-apps/coreutils/files/coreutils-4.5.9-gentoo-uname.diff new file mode 100644 index 000000000000..ee1dcce04ab6 --- /dev/null +++ b/sys-apps/coreutils/files/coreutils-4.5.9-gentoo-uname.diff @@ -0,0 +1,120 @@ +--- sh-utils-2.0.15/src/uname.c Thu Jul 18 15:32:33 2002 ++++ sh-utils-2.0.15-carlos/src/uname.c Wed Sep 4 15:02:01 2002 +@@ -44,6 +44,11 @@ + # endif + #endif + ++#if defined (__linux__) ++#define USE_PROCINFO ++#define UNAME_HARDWARE_PLATFORM ++#endif ++ + #include "system.h" + #include "error.h" + #include "closeout.h" +@@ -130,6 +135,65 @@ + 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 ( ffd=fopen("/proc/cpuinfo", "r") ) ++ { ++ while ( fscanf(ffd, "%[^:\t]\t: %[^\n]\n", cstr, dstr) != EOF ) ++ { ++ char *sdata[] = ++ { ++ #if defined(__i386__) ++ "model name", "vendor_id" ++ #endif ++ #if defined(__ia64__) || defined(__x86_64__) ++ "model", "vendor" ++ #endif ++ #if defined(__alpha__) ++ "cpu model", "???" ++ #endif ++ #if defined(sparc) || defined(__sparc__) ++ "type", "cpu" ++ #endif ++ #if defined(__mips__) ++ "processor", "system type" ++ #endif ++ #if defined(PPC) ++ "processor", "cpu" ++ #endif ++ }; ++ ++ if(!retr) ++ { ++ if (!strcmp(cstr, sdata[x])) ++ retr = strdup(dstr); ++ } else ++ break; ++ ++ } ++ fclose(ffd); ++ ++ if(retr) ++ { ++ strncpy(fstr,retr,257); ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++#endif ++ ++ + /* Print ELEMENT, preceded by a space if something has already been + printed. */ + +@@ -240,13 +304,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) + { +@@ -275,9 +345,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 +@@ -291,3 +365,4 @@ + + exit (0); + } ++ diff --git a/sys-apps/coreutils/files/digest-coreutils-4.5.9 b/sys-apps/coreutils/files/digest-coreutils-4.5.9 new file mode 100644 index 000000000000..626e9f838ad3 --- /dev/null +++ b/sys-apps/coreutils/files/digest-coreutils-4.5.9 @@ -0,0 +1 @@ +MD5 3dfa6dedf941caff97a7b69ac13cb664 coreutils-4.5.9.tar.bz2 3972934 |