summaryrefslogtreecommitdiffstats
path: root/coreutils
diff options
context:
space:
mode:
authorLukc <lukc@upyum.com>2010-12-11 19:15:23 +0100
committerLukc <lukc@upyum.com>2010-12-11 19:15:35 +0100
commit6d908a38e05b9d4135c65d23114a5874215b5bb8 (patch)
treeb5e6da6d95b9a1235d82032b509b80483a886ff5 /coreutils
downloadbase-6d908a38e05b9d4135c65d23114a5874215b5bb8.tar.gz
base-6d908a38e05b9d4135c65d23114a5874215b5bb8.tar.bz2
base-6d908a38e05b9d4135c65d23114a5874215b5bb8.tar.xz
base-6d908a38e05b9d4135c65d23114a5874215b5bb8.zip
Engagement initial.
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/.footprint199
-rw-r--r--coreutils/.md5sum2
-rw-r--r--coreutils/.sha256sum2
-rw-r--r--coreutils/Pkgfile22
-rw-r--r--coreutils/Pkgfile.old29
-rw-r--r--coreutils/coreutils-uname.patch176
6 files changed, 430 insertions, 0 deletions
diff --git a/coreutils/.footprint b/coreutils/.footprint
new file mode 100644
index 0000000..fea99a0
--- /dev/null
+++ b/coreutils/.footprint
@@ -0,0 +1,199 @@
+drwxr-xr-x root/root bin/
+-rwxr-xr-x root/root bin/cat
+-rwxr-xr-x root/root bin/chgrp
+-rwxr-xr-x root/root bin/chmod
+-rwxr-xr-x root/root bin/chown
+-rwxr-xr-x root/root bin/cp
+-rwxr-xr-x root/root bin/date
+-rwxr-xr-x root/root bin/dd
+-rwxr-xr-x root/root bin/df
+-rwxr-xr-x root/root bin/echo
+-rwxr-xr-x root/root bin/false
+-rwxr-xr-x root/root bin/ln
+-rwxr-xr-x root/root bin/ls
+-rwxr-xr-x root/root bin/mkdir
+-rwxr-xr-x root/root bin/mknod
+-rwxr-xr-x root/root bin/mv
+-rwxr-xr-x root/root bin/pwd
+-rwxr-xr-x root/root bin/readlink
+-rwxr-xr-x root/root bin/rm
+-rwxr-xr-x root/root bin/rmdir
+-rwxr-xr-x root/root bin/sleep
+-rwxr-xr-x root/root bin/stty
+-rwxr-xr-x root/root bin/sync
+-rwxr-xr-x root/root bin/touch
+-rwxr-xr-x root/root bin/true
+-rwxr-xr-x root/root bin/uname
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/[
+-rwxr-xr-x root/root usr/bin/base64
+-rwxr-xr-x root/root usr/bin/basename
+-rwxr-xr-x root/root usr/bin/chroot
+-rwxr-xr-x root/root usr/bin/cksum
+-rwxr-xr-x root/root usr/bin/comm
+-rwxr-xr-x root/root usr/bin/csplit
+-rwxr-xr-x root/root usr/bin/cut
+-rwxr-xr-x root/root usr/bin/dir
+-rwxr-xr-x root/root usr/bin/dircolors
+-rwxr-xr-x root/root usr/bin/dirname
+-rwxr-xr-x root/root usr/bin/du
+-rwxr-xr-x root/root usr/bin/env
+-rwxr-xr-x root/root usr/bin/expand
+-rwxr-xr-x root/root usr/bin/expr
+-rwxr-xr-x root/root usr/bin/factor
+-rwxr-xr-x root/root usr/bin/fmt
+-rwxr-xr-x root/root usr/bin/fold
+-rwxr-xr-x root/root usr/bin/head
+-rwxr-xr-x root/root usr/bin/hostid
+-rwxr-xr-x root/root usr/bin/id
+-rwxr-xr-x root/root usr/bin/install
+-rwxr-xr-x root/root usr/bin/join
+-rwxr-xr-x root/root usr/bin/link
+-rwxr-xr-x root/root usr/bin/logname
+-rwxr-xr-x root/root usr/bin/md5sum
+-rwxr-xr-x root/root usr/bin/mkfifo
+-rwxr-xr-x root/root usr/bin/mktemp
+-rwxr-xr-x root/root usr/bin/nice
+-rwxr-xr-x root/root usr/bin/nl
+-rwxr-xr-x root/root usr/bin/nohup
+-rwxr-xr-x root/root usr/bin/nproc
+-rwxr-xr-x root/root usr/bin/od
+-rwxr-xr-x root/root usr/bin/paste
+-rwxr-xr-x root/root usr/bin/pathchk
+-rwxr-xr-x root/root usr/bin/pinky
+-rwxr-xr-x root/root usr/bin/pr
+-rwxr-xr-x root/root usr/bin/printenv
+-rwxr-xr-x root/root usr/bin/printf
+-rwxr-xr-x root/root usr/bin/ptx
+-rwxr-xr-x root/root usr/bin/seq
+-rwxr-xr-x root/root usr/bin/sha1sum
+-rwxr-xr-x root/root usr/bin/sha224sum
+-rwxr-xr-x root/root usr/bin/sha256sum
+-rwxr-xr-x root/root usr/bin/sha384sum
+-rwxr-xr-x root/root usr/bin/sha512sum
+-rwxr-xr-x root/root usr/bin/shred
+-rwxr-xr-x root/root usr/bin/shuf
+-rwxr-xr-x root/root usr/bin/sort
+-rwxr-xr-x root/root usr/bin/split
+-rwxr-xr-x root/root usr/bin/stat
+-rwxr-xr-x root/root usr/bin/stdbuf
+-rwxr-xr-x root/root usr/bin/sum
+-rwxr-xr-x root/root usr/bin/tac
+-rwxr-xr-x root/root usr/bin/tail
+-rwxr-xr-x root/root usr/bin/tee
+-rwxr-xr-x root/root usr/bin/test
+-rwxr-xr-x root/root usr/bin/timeout
+-rwxr-xr-x root/root usr/bin/tr
+-rwxr-xr-x root/root usr/bin/truncate
+-rwxr-xr-x root/root usr/bin/tsort
+-rwxr-xr-x root/root usr/bin/tty
+-rwxr-xr-x root/root usr/bin/unexpand
+-rwxr-xr-x root/root usr/bin/uniq
+-rwxr-xr-x root/root usr/bin/unlink
+-rwxr-xr-x root/root usr/bin/users
+-rwxr-xr-x root/root usr/bin/vdir
+-rwxr-xr-x root/root usr/bin/wc
+-rwxr-xr-x root/root usr/bin/who
+-rwxr-xr-x root/root usr/bin/whoami
+-rwxr-xr-x root/root usr/bin/yes
+drwxr-xr-x root/root usr/lib/
+drwxr-xr-x root/root usr/lib/coreutils/
+-rwxr-xr-x root/root usr/lib/coreutils/libstdbuf.so
+drwxr-xr-x root/root usr/man/
+drwxr-xr-x root/root usr/man/man1/
+-rw-r--r-- root/root usr/man/man1/base64.1.gz
+-rw-r--r-- root/root usr/man/man1/basename.1.gz
+-rw-r--r-- root/root usr/man/man1/cat.1.gz
+-rw-r--r-- root/root usr/man/man1/chgrp.1.gz
+-rw-r--r-- root/root usr/man/man1/chmod.1.gz
+-rw-r--r-- root/root usr/man/man1/chown.1.gz
+-rw-r--r-- root/root usr/man/man1/chroot.1.gz
+-rw-r--r-- root/root usr/man/man1/cksum.1.gz
+-rw-r--r-- root/root usr/man/man1/comm.1.gz
+-rw-r--r-- root/root usr/man/man1/cp.1.gz
+-rw-r--r-- root/root usr/man/man1/csplit.1.gz
+-rw-r--r-- root/root usr/man/man1/cut.1.gz
+-rw-r--r-- root/root usr/man/man1/date.1.gz
+-rw-r--r-- root/root usr/man/man1/dd.1.gz
+-rw-r--r-- root/root usr/man/man1/df.1.gz
+-rw-r--r-- root/root usr/man/man1/dir.1.gz
+-rw-r--r-- root/root usr/man/man1/dircolors.1.gz
+-rw-r--r-- root/root usr/man/man1/dirname.1.gz
+-rw-r--r-- root/root usr/man/man1/du.1.gz
+-rw-r--r-- root/root usr/man/man1/echo.1.gz
+-rw-r--r-- root/root usr/man/man1/env.1.gz
+-rw-r--r-- root/root usr/man/man1/expand.1.gz
+-rw-r--r-- root/root usr/man/man1/expr.1.gz
+-rw-r--r-- root/root usr/man/man1/factor.1.gz
+-rw-r--r-- root/root usr/man/man1/false.1.gz
+-rw-r--r-- root/root usr/man/man1/fmt.1.gz
+-rw-r--r-- root/root usr/man/man1/fold.1.gz
+-rw-r--r-- root/root usr/man/man1/head.1.gz
+-rw-r--r-- root/root usr/man/man1/hostid.1.gz
+-rw-r--r-- root/root usr/man/man1/id.1.gz
+-rw-r--r-- root/root usr/man/man1/install.1.gz
+-rw-r--r-- root/root usr/man/man1/join.1.gz
+-rw-r--r-- root/root usr/man/man1/link.1.gz
+-rw-r--r-- root/root usr/man/man1/ln.1.gz
+-rw-r--r-- root/root usr/man/man1/logname.1.gz
+-rw-r--r-- root/root usr/man/man1/ls.1.gz
+-rw-r--r-- root/root usr/man/man1/md5sum.1.gz
+-rw-r--r-- root/root usr/man/man1/mkdir.1.gz
+-rw-r--r-- root/root usr/man/man1/mkfifo.1.gz
+-rw-r--r-- root/root usr/man/man1/mknod.1.gz
+-rw-r--r-- root/root usr/man/man1/mktemp.1.gz
+-rw-r--r-- root/root usr/man/man1/mv.1.gz
+-rw-r--r-- root/root usr/man/man1/nice.1.gz
+-rw-r--r-- root/root usr/man/man1/nl.1.gz
+-rw-r--r-- root/root usr/man/man1/nohup.1.gz
+-rw-r--r-- root/root usr/man/man1/nproc.1.gz
+-rw-r--r-- root/root usr/man/man1/od.1.gz
+-rw-r--r-- root/root usr/man/man1/paste.1.gz
+-rw-r--r-- root/root usr/man/man1/pathchk.1.gz
+-rw-r--r-- root/root usr/man/man1/pinky.1.gz
+-rw-r--r-- root/root usr/man/man1/pr.1.gz
+-rw-r--r-- root/root usr/man/man1/printenv.1.gz
+-rw-r--r-- root/root usr/man/man1/printf.1.gz
+-rw-r--r-- root/root usr/man/man1/ptx.1.gz
+-rw-r--r-- root/root usr/man/man1/pwd.1.gz
+-rw-r--r-- root/root usr/man/man1/readlink.1.gz
+-rw-r--r-- root/root usr/man/man1/rm.1.gz
+-rw-r--r-- root/root usr/man/man1/rmdir.1.gz
+-rw-r--r-- root/root usr/man/man1/seq.1.gz
+-rw-r--r-- root/root usr/man/man1/sha1sum.1.gz
+-rw-r--r-- root/root usr/man/man1/sha224sum.1.gz
+-rw-r--r-- root/root usr/man/man1/sha256sum.1.gz
+-rw-r--r-- root/root usr/man/man1/sha384sum.1.gz
+-rw-r--r-- root/root usr/man/man1/sha512sum.1.gz
+-rw-r--r-- root/root usr/man/man1/shred.1.gz
+-rw-r--r-- root/root usr/man/man1/shuf.1.gz
+-rw-r--r-- root/root usr/man/man1/sleep.1.gz
+-rw-r--r-- root/root usr/man/man1/sort.1.gz
+-rw-r--r-- root/root usr/man/man1/split.1.gz
+-rw-r--r-- root/root usr/man/man1/stat.1.gz
+-rw-r--r-- root/root usr/man/man1/stdbuf.1.gz
+-rw-r--r-- root/root usr/man/man1/stty.1.gz
+-rw-r--r-- root/root usr/man/man1/sum.1.gz
+-rw-r--r-- root/root usr/man/man1/sync.1.gz
+-rw-r--r-- root/root usr/man/man1/tac.1.gz
+-rw-r--r-- root/root usr/man/man1/tail.1.gz
+-rw-r--r-- root/root usr/man/man1/tee.1.gz
+-rw-r--r-- root/root usr/man/man1/test.1.gz
+-rw-r--r-- root/root usr/man/man1/timeout.1.gz
+-rw-r--r-- root/root usr/man/man1/touch.1.gz
+-rw-r--r-- root/root usr/man/man1/tr.1.gz
+-rw-r--r-- root/root usr/man/man1/true.1.gz
+-rw-r--r-- root/root usr/man/man1/truncate.1.gz
+-rw-r--r-- root/root usr/man/man1/tsort.1.gz
+-rw-r--r-- root/root usr/man/man1/tty.1.gz
+-rw-r--r-- root/root usr/man/man1/uname.1.gz
+-rw-r--r-- root/root usr/man/man1/unexpand.1.gz
+-rw-r--r-- root/root usr/man/man1/uniq.1.gz
+-rw-r--r-- root/root usr/man/man1/unlink.1.gz
+-rw-r--r-- root/root usr/man/man1/users.1.gz
+-rw-r--r-- root/root usr/man/man1/vdir.1.gz
+-rw-r--r-- root/root usr/man/man1/wc.1.gz
+-rw-r--r-- root/root usr/man/man1/who.1.gz
+-rw-r--r-- root/root usr/man/man1/whoami.1.gz
+-rw-r--r-- root/root usr/man/man1/yes.1.gz
diff --git a/coreutils/.md5sum b/coreutils/.md5sum
new file mode 100644
index 0000000..841d00e
--- /dev/null
+++ b/coreutils/.md5sum
@@ -0,0 +1,2 @@
+6e21df02e7f5c5d86372de4c6d873275 coreutils-8.7.tar.xz
+e14ef9dd59a7e6c7f3ae706771964d75 coreutils-uname.patch
diff --git a/coreutils/.sha256sum b/coreutils/.sha256sum
new file mode 100644
index 0000000..f2e9b1d
--- /dev/null
+++ b/coreutils/.sha256sum
@@ -0,0 +1,2 @@
+6701979aeccbca0b197718c00754aaf4a801f9ee7419edf14b829d20b9f8076b coreutils-8.7.tar.xz
+164ad5976c67dd49f1d28d3124a6cb5395d52a23d9a3112a10a795af6069d97d coreutils-uname.patch
diff --git a/coreutils/Pkgfile b/coreutils/Pkgfile
new file mode 100644
index 0000000..2ca3a21
--- /dev/null
+++ b/coreutils/Pkgfile
@@ -0,0 +1,22 @@
+description="A collection of core GNU utilities"
+packager=""
+maintainer="CRUX System Team, core-ports at crux dot nu"
+url="http://www.gnu.org/software/coreutils/"
+depends=(libgmp acl libcap)
+
+name=coreutils
+version=8.7
+release=1
+source=(http://ftp.gnu.org/pub/gnu/coreutils/coreutils-8.7.tar.xz coreutils-uname.patch)
+build ()
+{
+ cd $name-$version;
+ patch -p1 -i $SRC/coreutils-uname.patch;
+ ./configure --prefix=/usr --mandir=/usr/man --disable-nls --disable-assert --enable-no-install-program=uptime,kill,chcon,runcon,groups;
+ 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 -r $PKG/usr/share
+}
diff --git a/coreutils/Pkgfile.old b/coreutils/Pkgfile.old
new file mode 100644
index 0000000..6be2ced
--- /dev/null
+++ b/coreutils/Pkgfile.old
@@ -0,0 +1,29 @@
+# Description: A collection of core GNU utilities
+# URL: http://www.gnu.org/software/coreutils/
+# Maintainer: CRUX System Team, core-ports at crux dot nu
+# Depends on: libgmp acl libcap
+
+name=coreutils
+version=8.7
+release=1
+source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.xz
+ coreutils-uname.patch)
+
+build() {
+ cd $name-$version
+
+ patch -p1 -i $SRC/coreutils-uname.patch
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/man \
+ --disable-nls \
+ --disable-assert \
+ --enable-no-install-program=uptime,kill,chcon,runcon,groups
+ 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 -r $PKG/usr/share
+}
diff --git a/coreutils/coreutils-uname.patch b/coreutils/coreutils-uname.patch
new file mode 100644
index 0000000..37f4729
--- /dev/null
+++ b/coreutils/coreutils-uname.patch
@@ -0,0 +1,176 @@
+# http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/coreutils/7.5/
+
+On linux platforms, grok /proc/cpuinfo for the CPU/vendor info.
+
+Prob not suitable for upstream seeing as how it's 100% linux-specific
+http://lists.gnu.org/archive/html/bug-coreutils/2005-09/msg00063.html
+
+Patch originally by Carlos E. Gorges <carlos@techlinux.com.br>, but
+heavily reworked to suck less.
+
+To add support for additional platforms, check out the show_cpuinfo()
+func in the linux/arch/<ARCH>/ source tree of the kernel.
+
+diff -Nru coreutils-7.6.orig/src/uname.c coreutils-7.6/src/uname.c
+--- coreutils-7.6.orig/src/uname.c 2009-09-11 16:34:48.000000000 +0200
++++ coreutils-7.6/src/uname.c 2009-09-11 16:40:29.000000000 +0200
+@@ -50,6 +50,11 @@
+ # include <mach-o/arch.h>
+ #endif
+
++#if defined(__linux__)
++# define USE_PROCINFO
++# define UNAME_HARDWARE_PLATFORM
++#endif
++
+ #include "system.h"
+ #include "error.h"
+ #include "quote.h"
+@@ -155,6 +160,117 @@
+ exit (status);
+ }
+
++#if defined(USE_PROCINFO)
++
++# if defined(__s390__) || defined(__s390x__)
++# define CPUINFO_FILE "/proc/sysinfo"
++# define CPUINFO_FORMAT "%64[^\t :]%*[ :]%256[^\n]%c"
++# else
++# define CPUINFO_FILE "/proc/cpuinfo"
++# define CPUINFO_FORMAT "%64[^\t:]\t:%256[^\n]%c"
++# endif
++
++# define PROCINFO_PROCESSOR 0
++# define PROCINFO_HARDWARE_PLATFORM 1
++
++static void __eat_cpuinfo_space(char *buf)
++{
++ /* first eat trailing space */
++ char *tmp = buf + strlen(buf) - 1;
++ while (tmp > buf && isspace(*tmp))
++ *tmp-- = '\0';
++ /* then eat leading space */
++ tmp = buf;
++ while (*tmp && isspace(*tmp))
++ tmp++;
++ if (tmp != buf)
++ memmove(buf, tmp, strlen(tmp)+1);
++ /* finally collapse whitespace */
++ tmp = buf;
++ while (tmp[0] && tmp[1]) {
++ if (isspace(tmp[0]) && isspace(tmp[1])) {
++ memmove(tmp, tmp+1, strlen(tmp));
++ continue;
++ }
++ ++tmp;
++ }
++}
++
++static int __linux_procinfo(int x, char *fstr, size_t s)
++{
++ FILE *fp;
++
++ char *procinfo_keys[] = {
++ /* --processor --hardware-platform */
++ #if defined(__alpha__)
++ "cpu model", "system type"
++ #elif defined(__arm__)
++ "Processor", "Hardware"
++ #elif defined(__avr32__)
++ "processor", "cpu family"
++ #elif defined(__bfin__)
++ "CPU", "BOARD Name"
++ #elif defined(__cris__)
++ "cpu", "cpu model"
++ #elif defined(__frv__)
++ "CPU-Core", "System"
++ #elif defined(__i386__) || defined(__x86_64__)
++ "model name", "vendor_id"
++ #elif defined(__ia64__)
++ "family", "vendor"
++ #elif defined(__hppa__)
++ "cpu", "model"
++ #elif defined(__m68k__)
++ "CPU", "MMU"
++ #elif defined(__mips__)
++ "cpu model", "system type"
++ #elif defined(__powerpc__) || defined(__powerpc64__)
++ "cpu", "machine"
++ #elif defined(__s390__) || defined(__s390x__)
++ "Type", "Manufacturer"
++ #elif defined(__sh__)
++ "cpu type", "machine"
++ #elif defined(sparc) || defined(__sparc__)
++ "type", "cpu"
++ #elif defined(__vax__)
++ "cpu type", "cpu"
++ #else
++ "unknown", "unknown"
++ #endif
++ };
++
++ if ((fp = fopen(CPUINFO_FILE, "r")) != NULL) {
++ char key[65], value[257], eol, *ret = NULL;
++
++ while (fscanf(fp, CPUINFO_FORMAT, key, value, &eol) != EOF) {
++ __eat_cpuinfo_space(key);
++ if (!strcmp(key, procinfo_keys[x])) {
++ __eat_cpuinfo_space(value);
++ ret = value;
++ break;
++ }
++ if (eol != '\n') {
++ /* we need two fscanf's here in case the previous
++ * length limit caused us to read right up to the
++ * newline ... doing "%*[^\n]\n" wont eat the newline
++ */
++ fscanf(fp, "%*[^\n]");
++ fscanf(fp, "\n");
++ }
++ }
++ fclose(fp);
++
++ if (ret) {
++ strncpy(fstr, ret, s);
++ return 0;
++ }
++ }
++
++ return -1;
++}
++
++#endif
++
+ /* Print ELEMENT, preceded by a space if something has already been
+ printed. */
+
+@@ -302,10 +418,14 @@
+ 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 defined(USE_PROCINFO)
++ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
++#else
+ if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
++#endif
+ element = processor;
+ }
+ #endif
+@@ -358,9 +478,13 @@
+ if (element == unknown)
+ {
+ static char hardware_platform[257];
++#if defined(USE_PROCINFO)
++ if (0 <= __linux_procinfo (PROCINFO_HARDWARE_PLATFORM, hardware_platform, sizeof hardware_platform))
++#else
+ size_t s = sizeof hardware_platform;
+ static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM };
+ if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
++#endif
+ element = hardware_platform;
+ }
+ #endif