summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/coreutils
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-core/coreutils
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/coreutils')
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/futimens.patch61
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch19
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch22
-rw-r--r--meta/recipes-core/coreutils/coreutils_6.9.bb78
-rw-r--r--meta/recipes-core/coreutils/coreutils_8.5.bb67
5 files changed, 247 insertions, 0 deletions
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch b/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
new file mode 100644
index 0000000000..953c2d17a9
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
@@ -0,0 +1,61 @@
1# coreutils uses gnulib which conflicts with newer libc header on futimens
2# this patch simply renames coreutils futimes to avoid confliction
3#
4# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
5# (this patch is licensed under GPLv2)
6
7diff --git a/lib/utimens.c b/lib/utimens.c
8index 71bc510..ae870b8 100644
9--- a/lib/utimens.c
10+++ b/lib/utimens.c
11@@ -75,7 +75,7 @@ struct utimbuf
12 Return 0 on success, -1 (setting errno) on failure. */
13
14 int
15-futimens (int fd ATTRIBUTE_UNUSED,
16+futimens_coreutils (int fd ATTRIBUTE_UNUSED,
17 char const *file, struct timespec const timespec[2])
18 {
19 /* Some Linux-based NFS clients are buggy, and mishandle time stamps
20@@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED,
21 int
22 utimens (char const *file, struct timespec const timespec[2])
23 {
24- return futimens (-1, file, timespec);
25+ return futimens_coreutils (-1, file, timespec);
26 }
27diff --git a/lib/utimens.h b/lib/utimens.h
28index 0097aaa..13fc45a 100644
29--- a/lib/utimens.h
30+++ b/lib/utimens.h
31@@ -1,3 +1,3 @@
32 #include <time.h>
33-int futimens (int, char const *, struct timespec const [2]);
34+int futimens_coreutils (int, char const *, struct timespec const [2]);
35 int utimens (char const *, struct timespec const [2]);
36diff --git a/src/copy.c b/src/copy.c
37index 4bdb75c..04634f1 100644
38--- a/src/copy.c
39+++ b/src/copy.c
40@@ -518,7 +518,7 @@ copy_reg (char const *src_name, char const *dst_name,
41 timespec[0] = get_stat_atime (src_sb);
42 timespec[1] = get_stat_mtime (src_sb);
43
44- if (futimens (dest_desc, dst_name, timespec) != 0)
45+ if (futimens_coreutils (dest_desc, dst_name, timespec) != 0)
46 {
47 error (0, errno, _("preserving times for %s"), quote (dst_name));
48 if (x->require_preserve)
49diff --git a/src/touch.c b/src/touch.c
50index a79c26d..6ef317d 100644
51--- a/src/touch.c
52+++ b/src/touch.c
53@@ -182,7 +182,7 @@ touch (const char *file)
54 t = timespec;
55 }
56
57- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
58+ ok = (futimens_coreutils (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
59
60 if (fd == STDIN_FILENO)
61 {
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch b/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
new file mode 100644
index 0000000000..b42f5c9faa
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
@@ -0,0 +1,19 @@
1# remove the line to cause recursive inclusion error from autoreconf, sicne
2# newer autoconf has included this definition. Simply rename it here.
3#
4# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
5# (this patch is licensed under GPLv2)
6
7diff --git a/extensions.m4 b/extensions.m4
8index 143a9e5..f6558f1 100644
9--- a/m4/extensions.m4
10+++ b/m4/extensions.m4
11@@ -16,7 +16,7 @@
12 # ------------------------
13 # Enable extensions on systems that normally disable them,
14 # typically due to standards-conformance issues.
15-AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
16+AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS_DUMMY],
17 [
18 AC_BEFORE([$0], [AC_COMPILE_IFELSE])
19 AC_BEFORE([$0], [AC_RUN_IFELSE])
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch b/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
new file mode 100644
index 0000000000..95a9638921
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
@@ -0,0 +1,22 @@
1# man page for 'touch' is generated differently from others. All other utilities
2# are provided static man source files, while for 'touch' it requires help2man
3# to invoke "touch --help" and then convert the output into the manual. Since touch
4# is with target format which can't be invoked on build system, disable building
5# 'touch' man page here.
6#
7# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
8# (this patch is licensed under GPLv2)
9
10diff --git a/man/Makefile.am b/man/Makefile.am
11index 32df9d1..37b09e3 100644
12--- a/man/Makefile.am
13+++ b/man/Makefile.am
14@@ -27,7 +27,7 @@ dist_man_MANS = \
15 paste.1 pathchk.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
16 rm.1 rmdir.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 sha384sum.1 sha512sum.1 \
17 shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 \
18- su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
19+ su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 tr.1 true.1 tsort.1 \
20 tty.1 unexpand.1 uniq.1 unlink.1 vdir.1 wc.1 \
21 whoami.1 yes.1 $(MAN)
22 optional_mans = \
diff --git a/meta/recipes-core/coreutils/coreutils_6.9.bb b/meta/recipes-core/coreutils/coreutils_6.9.bb
new file mode 100644
index 0000000000..6a23f4f65f
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils_6.9.bb
@@ -0,0 +1,78 @@
1DESCRIPTION = "The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system"
2HOMEPAGE = "http://www.gnu.org/software/coreutils/"
3BUGTRACKER = "http://debbugs.gnu.org/coreutils"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
6 file://src/ls.c;startline=4;endline=16;md5=482a96d4f25010a4e13f8743e0c3685e"
7PR = "r0"
8DEPENDS = "perl-native"
9
10inherit autotools gettext
11
12SRC_URI = "http://ftp.gnu.org/gnu/coreutils/${BP}.tar.bz2 \
13 file://gnulib_m4.patch \
14 file://futimens.patch \
15 file://man-touch.patch"
16
17# [ gets a special treatment and is not included in this
18bindir_progs = "base64 basename cksum comm csplit cut dir dircolors dirname du \
19 env expand expr factor fmt fold groups head hostid id install \
20 join link logname md5sum mkfifo nice nl nohup od paste pathchk \
21 pinky pr printenv printf ptx readlink seq sha1sum sha224sum sha256sum \
22 sha384sum sha512sum shred shuf sort split stat sum tac tail tee test \
23 tr tsort tty unexpand uniq unlink users vdir wc who whoami yes"
24
25# hostname gets a special treatment and is not included in this
26base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
27 mknod mv pwd rm rmdir sleep stty sync touch true uname"
28
29sbindir_progs= "chroot"
30
31do_install() {
32 autotools_do_install
33
34 for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
35
36 install -d ${D}${base_bindir}
37 for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
38
39 install -d ${D}${sbindir}
40 for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
41
42 # [ requires special handling because [.coreutils will cause the sed stuff
43 # in update-alternatives to fail, therefore use lbracket - the name used
44 # for the actual source file.
45 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
46
47 # hostname and uptime separated. busybox's versions are preferred
48 mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN}
49 mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
50}
51
52pkg_postinst_${PN} () {
53 for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
54
55 for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
56
57 for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
58
59 # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately.
60 update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 10
61 update-alternatives --install ${base_bindir}/hostname hostname hostname.${PN} 10
62 update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
63}
64
65pkg_prerm_${PN} () {
66 for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
67
68 for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
69
70 for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
71
72 # The special cases
73 update-alternatives --remove hostname hostname.${PN}
74 update-alternatives --remove uptime uptime.${PN}
75 update-alternatives --remove '[' 'lbracket.${PN}'
76}
77
78BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/coreutils/coreutils_8.5.bb b/meta/recipes-core/coreutils/coreutils_8.5.bb
new file mode 100644
index 0000000000..5213fa2937
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils_8.5.bb
@@ -0,0 +1,67 @@
1DESCRIPTION = "The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system"
2HOMEPAGE = "http://www.gnu.org/software/coreutils/"
3BUGTRACKER = "http://debbugs.gnu.org/coreutils"
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
6 file://src/ls.c;startline=5;endline=16;md5=bb14ed3c4cda583abc85401304b5cd4e"
7PR = "r0"
8DEPENDS = "perl-native"
9
10inherit autotools gettext
11
12SRC_URI = "http://ftp.gnu.org/gnu/coreutils/${BP}.tar.gz"
13
14# [ gets a special treatment and is not included in this
15bindir_progs = "base64 basename chcon cksum comm csplit cut dir dircolors dirname du \
16 env expand expr factor fmt fold groups head hostid id install \
17 join link logname md5sum mkfifo mktemp nice nl nohup nproc od paste pathchk \
18 pinky pr printenv printf ptx readlink runcon seq sha1sum sha224sum sha256sum \
19 sha384sum sha512sum shred shuf sort split stat stdbuf sum tac tail tee test timeout\
20 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
21
22# hostname gets a special treatment and is not included in this
23base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
24 mknod mv pwd rm rmdir sleep stty sync touch true uname"
25
26sbindir_progs= "chroot"
27
28do_install_append() {
29 for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done
30
31 install -d ${D}${base_bindir}
32 for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done
33
34 install -d ${D}${sbindir}
35 for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done
36
37 # [ requires special handling because [.coreutils will cause the sed stuff
38 # in update-alternatives to fail, therefore use lbracket - the name used
39 # for the actual source file.
40 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN}
41}
42
43pkg_postinst_${PN} () {
44 for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done
45
46 for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done
47
48 for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done
49
50 # Special cases. [ needs to be treated separately.
51 update-alternatives --install '${bindir}/[' '[' 'lbracket.${PN}' 100
52}
53
54pkg_prerm_${PN} () {
55 for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
56
57 for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done
58
59 for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done
60
61 # The special cases
62 update-alternatives --remove hostname hostname.${PN}
63 update-alternatives --remove uptime uptime.${PN}
64 update-alternatives --remove '[' 'lbracket.${PN}'
65}
66
67BBCLASSEXTEND = "native"