commit 9be6a0580e4c5baea7c55adaadc7b90a56f11919 Author: Juergen Daubert <jue@jue.li> Date: Wed Jan 23 11:33:42 2008 +0100 coreutils: update to 6.10 diff --git a/coreutils/.md5sum b/coreutils/.md5sum index 41c8b9d..4da976f 100644 --- a/coreutils/.md5sum +++ b/coreutils/.md5sum @@ -1,3 +1 @@ -c9607d8495f16e98906e7ed2d9751a06 coreutils-6.9.tar.bz2 -253a70b30fc9ed3e5ecb17dc846acda2 coreutils-futimens.patch -c05b735710fbd62239588c07084852a0 coreutils-uname.patch +eca0de1bf7389694305d7e52cd76a472 coreutils-6.10.tar.gz diff --git a/coreutils/Pkgfile b/coreutils/Pkgfile index c6405be..f7d1bf0 100644 --- a/coreutils/Pkgfile +++ b/coreutils/Pkgfile @@ -3,32 +3,25 @@ # Maintainer: CRUX System Team, core-ports at crux dot nu name=coreutils -version=6.9 -release=2 -source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.bz2 \ - $name-uname.patch $name-futimens.patch) +version=6.10 +release=1 +source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.gz) build() { cd $name-$version - - patch -p1 < $SRC/$name-uname.patch - patch -p1 < $SRC/$name-futimens.patch - + DEFAULT_POSIX2_VERSION=199209 \ ./configure --prefix=/usr \ --mandir=/usr/man \ --disable-nls \ - --disable-assert + --disable-assert \ + --enable-no-install-program=uptime,kill,mktemp,chcon,runcon make make DESTDIR=$PKG install - + mkdir $PKG/bin mv $PKG/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo,false,ln,ls,mkdir,sleep} $PKG/bin mv $PKG/usr/bin/{mknod,mv,pwd,readlink,rm,rmdir,stty,sync,touch,true,uname} $PKG/bin - rm $PKG/usr/bin/hostname $PKG/usr/man/man1/hostname.1 # conflicts with net-tools - rm $PKG/usr/bin/uptime $PKG/usr/man/man1/uptime.1 # conflicts with procps - rm $PKG/usr/bin/su $PKG/usr/man/man1/su.1 # conflicts with shadow - rm $PKG/usr/bin/groups $PKG/usr/man/man1/groups.1 # conflicts with shadow - rm $PKG/usr/bin/kill $PKG/usr/man/man1/kill.1 # conflicts with util-linux - rm -rf $PKG/usr/share $PKG/usr/lib + rm $PKG/usr/bin/groups $PKG/usr/man/man1/groups.1 + rm -r $PKG/usr/share } diff --git a/coreutils/coreutils-futimens.patch b/coreutils/coreutils-futimens.patch deleted file mode 100644 index 966769b..0000000 --- a/coreutils/coreutils-futimens.patch +++ /dev/null @@ -1,55 +0,0 @@ -http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00161.html - -diff -Nru coreutils-6.9.orig/lib/utimens.c coreutils-6.9/lib/utimens.c ---- coreutils-6.9.orig/lib/utimens.c 2007-08-16 11:38:32.268087335 +0200 -+++ coreutils-6.9/lib/utimens.c 2007-08-16 11:39:09.626024843 +0200 -@@ -75,8 +75,8 @@ - Return 0 on success, -1 (setting errno) on failure. */ - - int --futimens (int fd ATTRIBUTE_UNUSED, -- char const *file, struct timespec const timespec[2]) -+gl_futimens (int fd ATTRIBUTE_UNUSED, -+ char const *file, struct timespec const timespec[2]) - { - /* Some Linux-based NFS clients are buggy, and mishandle time stamps - of files in NFS file systems in some cases. We have no -@@ -185,5 +185,5 @@ - int - utimens (char const *file, struct timespec const timespec[2]) - { -- return futimens (-1, file, timespec); -+ return gl_futimens (-1, file, timespec); - } -diff -Nru coreutils-6.9.orig/lib/utimens.h coreutils-6.9/lib/utimens.h ---- coreutils-6.9.orig/lib/utimens.h 2007-08-16 11:38:32.148093960 +0200 -+++ coreutils-6.9/lib/utimens.h 2007-08-16 11:39:09.606025947 +0200 -@@ -1,3 +1,3 @@ - #include <time.h> --int futimens (int, char const *, struct timespec const [2]); -+int gl_futimens (int, char const *, struct timespec const [2]); - int utimens (char const *, struct timespec const [2]); -diff -Nru coreutils-6.9.orig/src/copy.c coreutils-6.9/src/copy.c ---- coreutils-6.9.orig/src/copy.c 2007-08-16 11:38:32.988047587 +0200 -+++ coreutils-6.9/src/copy.c 2007-08-16 11:39:01.596468146 +0200 -@@ -518,7 +518,7 @@ - timespec[0] = get_stat_atime (src_sb); - timespec[1] = get_stat_mtime (src_sb); - -- if (futimens (dest_desc, dst_name, timespec) != 0) -+ if (gl_futimens (dest_desc, dst_name, timespec) != 0) - { - error (0, errno, _("preserving times for %s"), quote (dst_name)); - if (x->require_preserve) -diff -Nru coreutils-6.9.orig/src/touch.c coreutils-6.9/src/touch.c ---- coreutils-6.9.orig/src/touch.c 2007-08-16 11:38:32.898052555 +0200 -+++ coreutils-6.9/src/touch.c 2007-08-16 11:41:10.989324504 +0200 -@@ -182,7 +182,7 @@ - t = timespec; - } - -- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); -+ ok = (gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); - - if (fd == STDIN_FILENO) - { diff --git a/coreutils/coreutils-uname.patch b/coreutils/coreutils-uname.patch deleted file mode 100644 index a05ae04..0000000 --- a/coreutils/coreutils-uname.patch +++ /dev/null @@ -1,182 +0,0 @@ -Submitted By: Matthew Burgess <matthew at linuxfromscratch dot org> -Date: 2005-10-23 -Initial Package Version: 5.92 -Upstream Status: pending -Origin: Scot McPherson -Description: Fix the output of uname once and for all. - - $ uname -m # This always worked. - i686 - $ uname -i # Used to report 'unknown'. - i386 - $ uname -p # Likewise. - athlon-4 - -diff -Naur coreutils-5.92.orig/src/uname.c coreutils-5.92/src/uname.c ---- coreutils-5.92.orig/src/uname.c 2005-09-15 20:34:42.000000000 +0000 -+++ coreutils-5.92/src/uname.c 2005-10-23 10:14:06.000000000 +0000 -@@ -29,6 +29,12 @@ - # include <sys/systeminfo.h> - #endif - -+#ifdef linux -+#define cpuid(in,a,b,c,d)\ -+ asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in)); -+int has_sse( void ); -+#endif -+ - #if HAVE_SYS_SYSCTL_H - # if HAVE_SYS_PARAM_H - # include <sys/param.h> /* needed for OpenBSD 3.0 */ -@@ -256,6 +262,96 @@ - if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor)) - element = processor; - } -+#else -+ { -+ struct utsname u; -+ uname (&u); -+ element = u.machine; -+#ifdef linux -+/****************************************************************************** -+ * -+ * Hello, major hack. I shouldn't have to do this. struct utsname should -+ * have another element with this info in it. There's probably a struct -+ * somewhere that has this info, I just don't know where it is. -+ * -+ *****************************************************************************/ -+ -+ if( !strcmp( element, "i586" ) || !strcmp( element, "i686" ) ) { -+ int eax, ebx, ecx, edx, unused; -+ int model, family, sse; -+ -+ cpuid(0,unused,ebx,ecx,edx); -+ cpuid(1,eax,unused,unused,unused); -+ model = (eax >> 4) & 0xf; -+ family = (eax >> 8) & 0xf; -+ -+ switch(ebx) { -+ case 0x756e6547: // Intel -+ switch( family ) { -+ case 5: // Pentium -+ if( model <= 3 ) -+ element="pentium"; -+ if( model > 3 ) -+ element="pentium-mmx"; -+ break; -+ case 6: // PentiumPro - Pentium III -+ if( model == 1 ) // Pentium Pro -+ element="pentiumpro"; -+ if( ( model == 3 ) || ( model == 5 ) || -+ ( model == 6 ) ) // Pentium II -+ element="pentium2"; -+ if( ( model == 7 ) || ( model == 8 ) || -+ ( model == 10 ) || ( model == 11 ) ) // These are all Pentium III -+ element="pentium3"; -+ break; -+ case 15: // Pentium4 -+ element="pentium4"; -+ break; -+ default: -+ break; -+ } // end switch( family ) -+ break; -+ case 0x68747541: // AMD -+ switch(family) { -+ case 5: -+ if( ( model == 0 ) || ( model == 1 ) || -+ ( model == 2 ) || ( model == 3 ) ) // K5 -+ element="i586"; -+ if( ( model == 6 ) || ( model == 7 ) ) // K6 -+ element="k6"; -+ if( model == 8 ) // K6-2 -+ element="k6-2"; -+ if( model == 9 ) // K6-3 -+ element="k6-3"; -+ break; -+ case 6: -+ if( model <= 4 ) -+ element="athlon"; -+ if( model > 4 ) { -+ sse = has_sse(); -+ if( sse == 0 ) -+ element="athlon"; -+ if( sse == 1 ) -+ element="athlon-4"; -+ } -+ break; -+ case 15: -+ element="athlon-4"; -+ break; -+ default: -+ break; -+ } // end switch( family ) -+ break; -+ case 0x69727943: // Cyrix -+ element="i386"; // who knows what cyrix supports, lets be safe -+ break; -+ default: -+ break; -+ } // end switch(ebx) -+ } -+ -+#endif -+ } - #endif - #ifdef UNAME_PROCESSOR - if (element == unknown) -@@ -293,7 +389,7 @@ - - if (toprint & PRINT_HARDWARE_PLATFORM) - { -- char const *element = unknown; -+ char *element = unknown; - #if HAVE_SYSINFO && defined SI_PLATFORM - { - static char hardware_platform[257]; -@@ -301,6 +397,15 @@ - hardware_platform, sizeof hardware_platform)) - element = hardware_platform; - } -+#else -+ { -+ struct utsname u; -+ uname (&u); -+ element = u.machine; -+ if (strlen (element) == 4 && element[0] == 'i' && element[2] == '8' -+ && element[3] == '6') -+ element[1] = '3'; -+ } - #endif - #ifdef UNAME_HARDWARE_PLATFORM - if (element == unknown) -@@ -323,3 +428,29 @@ - - exit (EXIT_SUCCESS); - } -+ -+#ifdef linux -+ -+/****************************************************************************** -+ * -+ * int has_sse( void ) -+ * Checks Athlon CPU's to see if they support SSE. -+ * -+ *****************************************************************************/ -+ -+int has_sse( void ) -+{ -+ unsigned long edx, unused; -+ int sse; -+ cpuid(1,unused,unused,unused,edx); -+ // I think, I need this tested on a Duron with SSE -+ // and one without it. -+ sse = edx & 0x2000000; -+ if( sse == 0 ) { -+ return 0; -+ } else { -+ return 1; -+ } -+ -+} -+#endif