diff options
Diffstat (limited to 'sys-apps/sh-utils')
-rw-r--r-- | sys-apps/sh-utils/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/sh-utils/files/digest-sh-utils-2.0.14 | 1 | ||||
-rw-r--r-- | sys-apps/sh-utils/files/sh-utils-2.0.14-gentoo.diff | 47 | ||||
-rw-r--r-- | sys-apps/sh-utils/files/sh-utils-2.0.15-gentoo.diff | 167 | ||||
-rw-r--r-- | sys-apps/sh-utils/files/sh-utils-2.0j-src-sys2.h-gentoo.diff | 13 | ||||
-rw-r--r-- | sys-apps/sh-utils/sh-utils-2.0.14.ebuild | 82 |
6 files changed, 92 insertions, 226 deletions
diff --git a/sys-apps/sh-utils/ChangeLog b/sys-apps/sh-utils/ChangeLog index 4705b6517aba..38949f8cb094 100644 --- a/sys-apps/sh-utils/ChangeLog +++ b/sys-apps/sh-utils/ChangeLog @@ -1,9 +1,15 @@ # ChangeLog for sys-apps/sh-utils # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sh-utils/ChangeLog,v 1.11 2002/08/27 09:30:13 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/sh-utils/ChangeLog,v 1.12 2002/09/05 04:34:53 seemant Exp $ *sh-utils-2.0.15 (24 Aug 2002) + 04 Sep 2002; Seemant Kulleen <seemant@gentoo.org> + files/sh-utils-2.0.15-gentoo.diff : + + upgraded the diff with Carlos's new version which he e-mailed to me today. + The second "unknown" is now gone. + 27 Aug 2002; Seemant Kulleen <seemant@gentoo.org> files/sh-utils-2.0.15-gentoo.diff : diff --git a/sys-apps/sh-utils/files/digest-sh-utils-2.0.14 b/sys-apps/sh-utils/files/digest-sh-utils-2.0.14 deleted file mode 100644 index eab0cf0a83c9..000000000000 --- a/sys-apps/sh-utils/files/digest-sh-utils-2.0.14 +++ /dev/null @@ -1 +0,0 @@ -MD5 ceef9e05bbaa5893c5eafea2b424eb83 sh-utils-2.0.14.tar.gz 2132852 diff --git a/sys-apps/sh-utils/files/sh-utils-2.0.14-gentoo.diff b/sys-apps/sh-utils/files/sh-utils-2.0.14-gentoo.diff deleted file mode 100644 index f242fd47c91d..000000000000 --- a/sys-apps/sh-utils/files/sh-utils-2.0.14-gentoo.diff +++ /dev/null @@ -1,47 +0,0 @@ -diff -urN sh-utils-2.0.14.old/doc/coreutils.texi sh-utils-2.0.14/doc/coreutils.texi ---- sh-utils-2.0.14.old/doc/coreutils.texi Sun Aug 4 06:45:50 2002 -+++ sh-utils-2.0.14/doc/coreutils.texi Wed Aug 14 06:51:22 2002 -@@ -11019,8 +11019,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}. - -@@ -11091,33 +11090,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/sh-utils/files/sh-utils-2.0.15-gentoo.diff b/sys-apps/sh-utils/files/sh-utils-2.0.15-gentoo.diff index 2f6f894d5502..ee1dcce04ab6 100644 --- a/sys-apps/sh-utils/files/sh-utils-2.0.15-gentoo.diff +++ b/sys-apps/sh-utils/files/sh-utils-2.0.15-gentoo.diff @@ -1,117 +1,120 @@ --- sh-utils-2.0.15/src/uname.c Thu Jul 18 15:32:33 2002 -+++ sh-utils-2.0.15-linux_uname/src/uname.c Mon Aug 19 20:05:55 2002 -@@ -130,6 +130,91 @@ ++++ 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 */ -+ -+#ifdef __linux__ -+ -+char * -+cmpdup (char *cstr, char *cmpstr, char *dstr) { -+ if ( (cstr && cmpstr) && !strcmp(cstr, cmpstr) ) -+ return strdup(dstr); -+ return NULL; -+} -+ -+char * -+__sysinfo_processor_type (void) ++#if defined(USE_PROCINFO) ++/* x==0, processor type | x==1, hardware-platform */ ++int ++__linux_procinfo (int x, char *fstr) +{ + FILE *ffd; -+ char *cstr=calloc(1,sizeof(char)*64), -+ *dstr=calloc(1,sizeof(char)*128), -+ *fstr=calloc(1,sizeof(char)*256), -+ *model,*vendor; -+ -+ model=vendor=NULL; -+ ++ 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 ) + { -+ if(!cstr || !dstr) -+ break; // ???? -+ -+ #if defined(__i386__) -+ if(!vendor) -+ vendor = cmpdup(cstr, "vendor_id", dstr); -+ if(!model) -+ model = cmpdup(cstr, "model name", dstr); -+ #endif -+ #if defined(__ia64__) || defined(__x86_64__) -+ if(!vendor) -+ vendor = cmpdup(cstr, "vendor", dstr); -+ if(!model) -+ model = cmpdup(cstr, "model", dstr); -+ #endif -+ #if defined(__alpha__) -+ if(!vendor) -+ vendor = strdup("Alpha"); -+ if(!model) -+ model = cmpdup(cstr, "cpu model", dstr); -+ #endif -+ #if defined(sparc) || defined(__sparc__) -+ if(!vendor) -+ vendor = cmpdup(cstr, "cpu", dstr); -+ if(!model) -+ model = cmpdup(cstr, "type", dstr); -+ #endif -+ #if defined(__mips__) -+ if(!vendor) -+ vendor = cmpdup(cstr, "system type", dstr); -+ if(!model) -+ model = cmpdup(cstr, "cpu model", dstr); -+ #endif -+ #if defined(PPC) -+ if(!vendor) -+ vendor = cmpdup(cstr, "cpu", dstr); -+ if(!model) -+ model = cmpdup(cstr, "processor", dstr); -+ #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", "???" ++ #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(vendor || model) { -+ if(vendor) { -+ strcat(fstr,vendor); -+ strcat(fstr," "); -+ } -+ if(model) -+ strcat(fstr,model); -+ return fstr; ++ if(retr) ++ { ++ strncpy(fstr,retr,257); ++ return 1; + } + } -+ -+ return NULL; ++ return 0; +} ++ +#endif + + /* Print ELEMENT, preceded by a space if something has already been printed. */ -@@ -246,7 +331,16 @@ +@@ -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; } -+#else -+ #ifdef __linux__ -+ { -+ char *processor; -+ if( processor=__sysinfo_processor_type() ) -+ element = processor; -+ } -+ #endif #endif + #ifdef UNAME_PROCESSOR if (element == unknown) { -@@ -291,3 +385,4 @@ +@@ -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/sh-utils/files/sh-utils-2.0j-src-sys2.h-gentoo.diff b/sys-apps/sh-utils/files/sh-utils-2.0j-src-sys2.h-gentoo.diff deleted file mode 100644 index 0675ca75ab99..000000000000 --- a/sys-apps/sh-utils/files/sh-utils-2.0j-src-sys2.h-gentoo.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- src/sys2.h.orig Tue Feb 27 18:47:51 2001 -+++ src/sys2.h Tue Feb 27 18:49:35 2001 -@@ -283,10 +283,6 @@ - # endif - #endif - --#if !HAVE_DECL_STRNDUP --char *strndup (); --#endif -- - #if !HAVE_DECL_STRSTR - char *strstr (); - #endif diff --git a/sys-apps/sh-utils/sh-utils-2.0.14.ebuild b/sys-apps/sh-utils/sh-utils-2.0.14.ebuild deleted file mode 100644 index a0f62064ca59..000000000000 --- a/sys-apps/sh-utils/sh-utils-2.0.14.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 1999-2002 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sh-utils/sh-utils-2.0.14.ebuild,v 1.1 2002/08/14 14:16:49 seemant Exp $ - -S=${WORKDIR}/${P} -DESCRIPTION="Your standard GNU shell utilities" -SRC_URI="ftp://alpha.gnu.org/gnu/fetish/${P}.tar.gz" -HOMEPAGE="http://www.gnu.org/software/shellutils/shellutils.html" - -DEPEND="nls? ( sys-devel/gettext )" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="x86 ppc sparc sparc64" - -src_unpack() { - unpack ${P}.tar.gz - cd ${S} - - # patch to remove Stallman's su/wheel group rant and to add processor - # information in uname output - patch -p1 < ${FILESDIR}/${P}-gentoo.diff || die - rm doc/coreutils.info - #This next line prevents our patched (and updated-mtime) uname.c from forcing a - #uname.1 man page regeneration, which requires perl (not available when creating - #a new build image... and we don't want this package dependent on perl anyway. - #This problem can be fixed by fixing our patch at a future date. - touch -d "20 Aug 1999" src/uname.c -} - -src_compile() { - local myconf="" - use nls || myconf="--disable-nls" - - CFLAGS="${CFLAGS}" \ - econf \ - --without-included-regex \ - ${myconf} || die - - if [ -z "`use static`" ] - then - emake || die - else - emake LDFLAGS=-static || die - fi -} - -src_install() { - einstall || die - - rm -rf ${D}/usr/lib - dodir /bin - cd ${D}/usr/bin - mv date echo false pwd stty su true uname sleep ${D}/bin - - if [ -z "`use build`" ] - then - cd ${S} - dodoc AUTHORS COPYING ChangeLog ChangeLog.0 NEWS README THANKS TODO - else - rm -rf ${D}/usr/share - fi - #we must use hostname from net-base - #hostname do not work with the -f switch ... this breaks gnome2 among things - rm ${D}/usr/bin/hostname - #we use the /bin/su from the sys-apps/shadow package - rm ${D}/bin/su - rm ${D}/usr/share/man/man1/su.1.gz - #we use the /usr/bin/uptime from the sys-apps/procps package - rm ${D}/usr/bin/uptime - rm ${D}/usr/share/man/man1/uptime.1.gz -} - -pkg_postinst() { - #hostname do 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 -} - |