diff options
author | Kevin Tian <kevin.tian@intel.com> | 2010-08-18 12:55:21 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 13:04:38 +0100 |
commit | 03df3137156027cf01ce2e9970749268f16f5975 (patch) | |
tree | 0e46f92ac8d8feac6e30b5781e3791d629ffc95c | |
parent | 7303807ef13c0a02434941852530fecce8778619 (diff) | |
download | poky-03df3137156027cf01ce2e9970749268f16f5975.tar.gz |
coreutils: upgrade to latest GPLv2 version (6.9)
Before adding latest coreutils GPLv3 version, first we upgrade existing
recipe to latest GPLv2 version here.
To ensure a clean process, all bits are coded from scratch including
patches and recipe, except that in recipe lines about update-alternative
are reused from previous 5.3.0. All new patches are licensed under
GPLv2.
Tested simple features with most coreutils commands
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
-rw-r--r-- | meta/packages/coreutils/coreutils-5.3.0/futimens.patch | 44 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils-5.3.0/install-cross.patch | 27 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils-5.3.0/man.patch | 42 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils-5.3.0/rename-tee-for-glibc2.5.patch | 33 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils-5.3.0/uptime-pow-lib.patch | 11 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils-6.9/futimens.patch | 61 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils-6.9/gnulib_m4.patch | 19 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils-6.9/man-touch.patch | 22 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils.inc | 7 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils_6.9.bb (renamed from meta/packages/coreutils/coreutils_5.3.0.bb) | 57 |
10 files changed, 127 insertions, 196 deletions
diff --git a/meta/packages/coreutils/coreutils-5.3.0/futimens.patch b/meta/packages/coreutils/coreutils-5.3.0/futimens.patch deleted file mode 100644 index 3cb2b6ab32..0000000000 --- a/meta/packages/coreutils/coreutils-5.3.0/futimens.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | Index: coreutils-5.3.0/lib/utimens.c | ||
2 | =================================================================== | ||
3 | --- coreutils-5.3.0.orig/lib/utimens.c 2005-01-03 22:19:15.000000000 +0000 | ||
4 | +++ coreutils-5.3.0/lib/utimens.c 2007-07-01 19:12:32.000000000 +0000 | ||
5 | @@ -55,8 +55,8 @@ | ||
6 | If TIMESPEC is null, set the time stamps to the current time. */ | ||
7 | |||
8 | int | ||
9 | -futimens (int fd ATTRIBUTE_UNUSED, | ||
10 | - char const *file, struct timespec const timespec[2]) | ||
11 | +gl_futimens (int fd ATTRIBUTE_UNUSED, | ||
12 | + char const *file, struct timespec const timespec[2]) | ||
13 | { | ||
14 | /* There's currently no interface to set file timestamps with | ||
15 | nanosecond resolution, so do the best we can, discarding any | ||
16 | @@ -117,5 +117,5 @@ | ||
17 | int | ||
18 | utimens (char const *file, struct timespec const timespec[2]) | ||
19 | { | ||
20 | - return futimens (-1, file, timespec); | ||
21 | + return gl_futimens (-1, file, timespec); | ||
22 | } | ||
23 | Index: coreutils-5.3.0/lib/utimens.h | ||
24 | =================================================================== | ||
25 | --- coreutils-5.3.0.orig/lib/utimens.h 2004-11-23 20:54:33.000000000 +0000 | ||
26 | +++ coreutils-5.3.0/lib/utimens.h 2007-07-01 19:12:37.000000000 +0000 | ||
27 | @@ -1,3 +1,3 @@ | ||
28 | #include "timespec.h" | ||
29 | -int futimens (int, char const *, struct timespec const [2]); | ||
30 | +int gl_futimens (int, char const *, struct timespec const [2]); | ||
31 | int utimens (char const *, struct timespec const [2]); | ||
32 | Index: coreutils-5.3.0/src/touch.c | ||
33 | =================================================================== | ||
34 | --- coreutils-5.3.0.orig/src/touch.c 2004-11-23 20:54:35.000000000 +0000 | ||
35 | +++ coreutils-5.3.0/src/touch.c 2007-07-01 19:11:52.000000000 +0000 | ||
36 | @@ -191,7 +191,7 @@ | ||
37 | t = timespec; | ||
38 | } | ||
39 | |||
40 | - ok = (futimens (fd, file, t) == 0); | ||
41 | + ok = (gl_futimens (fd, file, t) == 0); | ||
42 | if (fd != -1) | ||
43 | ok &= (close (fd) == 0); | ||
44 | |||
diff --git a/meta/packages/coreutils/coreutils-5.3.0/install-cross.patch b/meta/packages/coreutils/coreutils-5.3.0/install-cross.patch deleted file mode 100644 index 98ba3d916c..0000000000 --- a/meta/packages/coreutils/coreutils-5.3.0/install-cross.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | --- src/install.c~ 2003-08-09 18:46:45.000000000 +0100 | ||
2 | +++ src/install.c 2004-03-27 18:38:45.000000000 +0000 | ||
3 | @@ -516,7 +516,14 @@ | ||
4 | strip (const char *path) | ||
5 | { | ||
6 | int status; | ||
7 | - pid_t pid = fork (); | ||
8 | + pid_t pid; | ||
9 | + char *strip_name; | ||
10 | + | ||
11 | + strip_name = getenv ("STRIP"); | ||
12 | + if (strip_name == NULL) | ||
13 | + strip_name = "strip"; | ||
14 | + | ||
15 | + pid = fork (); | ||
16 | |||
17 | switch (pid) | ||
18 | { | ||
19 | @@ -524,7 +531,7 @@ | ||
20 | error (EXIT_FAILURE, errno, _("fork system call failed")); | ||
21 | break; | ||
22 | case 0: /* Child. */ | ||
23 | - execlp ("strip", "strip", path, NULL); | ||
24 | + execlp (strip_name, "strip", path, NULL); | ||
25 | error (EXIT_FAILURE, errno, _("cannot run strip")); | ||
26 | break; | ||
27 | default: /* Parent. */ | ||
diff --git a/meta/packages/coreutils/coreutils-5.3.0/man.patch b/meta/packages/coreutils/coreutils-5.3.0/man.patch deleted file mode 100644 index 5060e4fdff..0000000000 --- a/meta/packages/coreutils/coreutils-5.3.0/man.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- coreutils-5.3.0/configure.ac~man | ||
7 | +++ coreutils-5.3.0/configure.ac | ||
8 | @@ -237,6 +237,20 @@ | ||
9 | AM_GNU_GETTEXT([external], [need-ngettext]) | ||
10 | AM_GNU_GETTEXT_VERSION(0.13.1) | ||
11 | |||
12 | +AC_MSG_CHECKING([whether to build man pages]) | ||
13 | +AC_ARG_WITH(manpages, | ||
14 | + AS_HELP_STRING([--with-manpages], | ||
15 | + [Enable building of manpages (default=yes)]), | ||
16 | + [cu_cv_build_manpages=$enableval], | ||
17 | + [cu_cv_build_manpages=yes]) | ||
18 | +# help2man doesn't work when crosscompiling, as it needs to run the | ||
19 | +# binary that was built. | ||
20 | +if test x"$cross_compiling" = x"yes"; then | ||
21 | + cu_cv_build_manpages=no | ||
22 | +fi | ||
23 | +AC_MSG_RESULT($cu_cv_build_manpages) | ||
24 | +AM_CONDITIONAL(ENABLE_MANPAGES, test x"$cu_cv_build_manpages" = x"yes") | ||
25 | + | ||
26 | AC_CONFIG_FILES( | ||
27 | Makefile | ||
28 | doc/Makefile | ||
29 | --- coreutils-5.3.0/Makefile.am~man | ||
30 | +++ coreutils-5.3.0/Makefile.am | ||
31 | @@ -1,6 +1,11 @@ | ||
32 | ## Process this file with automake to produce Makefile.in -*-Makefile-*- | ||
33 | |||
34 | +if ENABLE_MANPAGES | ||
35 | SUBDIRS = lib src doc man po tests | ||
36 | +else | ||
37 | +SUBDIRS = lib src doc po tests | ||
38 | +endif | ||
39 | + | ||
40 | EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \ | ||
41 | .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \ | ||
42 | .x-sc_space_tab .x-sc_sun_os_names \ | ||
diff --git a/meta/packages/coreutils/coreutils-5.3.0/rename-tee-for-glibc2.5.patch b/meta/packages/coreutils/coreutils-5.3.0/rename-tee-for-glibc2.5.patch deleted file mode 100644 index 148a5f4f8f..0000000000 --- a/meta/packages/coreutils/coreutils-5.3.0/rename-tee-for-glibc2.5.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | Glibc 2.5 has a function called tee which conflicts with the same function | ||
2 | in coreutils. This patch renames the function to tee_files (as is done in | ||
3 | the newer coreutils versions.) | ||
4 | |||
5 | --- coreutils-5.3.0/src/tee.c 2006/10/23 07:35:00 1.1 | ||
6 | +++ coreutils-5.3.0/src/tee.c 2006/10/23 07:35:16 | ||
7 | @@ -31,7 +31,7 @@ | ||
8 | |||
9 | #define AUTHORS "Mike Parker", "Richard M. Stallman", "David MacKenzie" | ||
10 | |||
11 | -static bool tee (int nfiles, const char **files); | ||
12 | +static bool tee_files (int nfiles, const char **files); | ||
13 | |||
14 | /* If true, append to output files rather than truncating them. */ | ||
15 | static bool append; | ||
16 | @@ -121,7 +121,7 @@ | ||
17 | /* Do *not* warn if tee is given no file arguments. | ||
18 | POSIX requires that it work when given no arguments. */ | ||
19 | |||
20 | - ok = tee (argc - optind, (const char **) &argv[optind]); | ||
21 | + ok = tee_files (argc - optind, (const char **) &argv[optind]); | ||
22 | if (close (STDIN_FILENO) != 0) | ||
23 | error (EXIT_FAILURE, errno, _("standard input")); | ||
24 | |||
25 | @@ -133,7 +133,7 @@ | ||
26 | Return true if successful. */ | ||
27 | |||
28 | static bool | ||
29 | -tee (int nfiles, const char **files) | ||
30 | +tee_files (int nfiles, const char **files) | ||
31 | { | ||
32 | FILE **descriptors; | ||
33 | char buffer[BUFSIZ]; | ||
diff --git a/meta/packages/coreutils/coreutils-5.3.0/uptime-pow-lib.patch b/meta/packages/coreutils/coreutils-5.3.0/uptime-pow-lib.patch deleted file mode 100644 index 5eb3fca676..0000000000 --- a/meta/packages/coreutils/coreutils-5.3.0/uptime-pow-lib.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | --- coreutils-5.3.0/src/Makefile.am.orig 2005-09-27 22:34:35.659272058 -0700 | ||
2 | +++ coreutils-5.3.0/src/Makefile.am 2005-09-27 22:34:39.403507668 -0700 | ||
3 | @@ -74,7 +74,7 @@ | ||
4 | sleep_LDADD = $(nanosec_libs) | ||
5 | tail_LDADD = $(nanosec_libs) | ||
6 | |||
7 | -uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS) | ||
8 | +uptime_LDADD = $(LDADD) $(POW_LIB) $(GETLOADAVG_LIBS) | ||
9 | |||
10 | su_LDADD = $(LDADD) $(LIB_CRYPT) | ||
11 | |||
diff --git a/meta/packages/coreutils/coreutils-6.9/futimens.patch b/meta/packages/coreutils/coreutils-6.9/futimens.patch new file mode 100644 index 0000000000..953c2d17a9 --- /dev/null +++ b/meta/packages/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 | |||
7 | diff --git a/lib/utimens.c b/lib/utimens.c | ||
8 | index 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 | } | ||
27 | diff --git a/lib/utimens.h b/lib/utimens.h | ||
28 | index 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]); | ||
36 | diff --git a/src/copy.c b/src/copy.c | ||
37 | index 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) | ||
49 | diff --git a/src/touch.c b/src/touch.c | ||
50 | index 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/packages/coreutils/coreutils-6.9/gnulib_m4.patch b/meta/packages/coreutils/coreutils-6.9/gnulib_m4.patch new file mode 100644 index 0000000000..b42f5c9faa --- /dev/null +++ b/meta/packages/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 | |||
7 | diff --git a/extensions.m4 b/extensions.m4 | ||
8 | index 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/packages/coreutils/coreutils-6.9/man-touch.patch b/meta/packages/coreutils/coreutils-6.9/man-touch.patch new file mode 100644 index 0000000000..95a9638921 --- /dev/null +++ b/meta/packages/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 | |||
10 | diff --git a/man/Makefile.am b/man/Makefile.am | ||
11 | index 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/packages/coreutils/coreutils.inc b/meta/packages/coreutils/coreutils.inc deleted file mode 100644 index c7d5ede767..0000000000 --- a/meta/packages/coreutils/coreutils.inc +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | DESCRIPTION = "A collection of core GNU utilities." | ||
2 | LICENSE = "GPL" | ||
3 | SECTION = "base" | ||
4 | RREPLACES = "textutils shellutils fileutils" | ||
5 | RPROVIDES = "textutils shellutils fileutils" | ||
6 | |||
7 | inherit autotools gettext | ||
diff --git a/meta/packages/coreutils/coreutils_5.3.0.bb b/meta/packages/coreutils/coreutils_6.9.bb index 85310fe6a8..6a23f4f65f 100644 --- a/meta/packages/coreutils/coreutils_5.3.0.bb +++ b/meta/packages/coreutils/coreutils_6.9.bb | |||
@@ -1,42 +1,41 @@ | |||
1 | require coreutils.inc | 1 | DESCRIPTION = "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" |
2 | 2 | HOMEPAGE = "http://www.gnu.org/software/coreutils/" | |
3 | PR = "r2" | 3 | BUGTRACKER = "http://debbugs.gnu.org/coreutils" |
4 | 4 | LICENSE = "GPLv2+" | |
5 | SRC_URI = "ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ |
6 | file://install-cross.patch;patch=1;pnum=0 \ | 6 | file://src/ls.c;startline=4;endline=16;md5=482a96d4f25010a4e13f8743e0c3685e" |
7 | file://man.patch;patch=1 \ | 7 | PR = "r0" |
8 | file://rename-tee-for-glibc2.5.patch;patch=1 \ | 8 | DEPENDS = "perl-native" |
9 | file://uptime-pow-lib.patch;patch=1 \ | 9 | |
10 | file://futimens.patch;patch=1" | 10 | inherit autotools gettext |
11 | |||
12 | SRC_URI = "http://ftp.gnu.org/gnu/coreutils/${BP}.tar.bz2 \ | ||
13 | file://gnulib_m4.patch \ | ||
14 | file://futimens.patch \ | ||
15 | file://man-touch.patch" | ||
11 | 16 | ||
12 | # [ gets a special treatment and is not included in this | 17 | # [ gets a special treatment and is not included in this |
13 | bindir_progs = "basename cksum comm csplit cut dir dircolors dirname du \ | 18 | bindir_progs = "base64 basename cksum comm csplit cut dir dircolors dirname du \ |
14 | env expand expr factor fmt fold groups head hostid id install \ | 19 | env expand expr factor fmt fold groups head hostid id install \ |
15 | join link logname md5sum mkfifo nice nl nohup od paste pathchk \ | 20 | join link logname md5sum mkfifo nice nl nohup od paste pathchk \ |
16 | pinky pr printenv printf ptx readlink seq sha1sum shred sort \ | 21 | pinky pr printenv printf ptx readlink seq sha1sum sha224sum sha256sum \ |
17 | split stat sum tac tail tee test tr tsort tty unexpand uniq \ | 22 | sha384sum sha512sum shred shuf sort split stat sum tac tail tee test \ |
18 | unlink users vdir wc who whoami yes \ | 23 | tr tsort tty unexpand uniq unlink users vdir wc who whoami yes" |
19 | " | ||
20 | 24 | ||
21 | # hostname gets a special treatment and is not included in this | 25 | # hostname gets a special treatment and is not included in this |
22 | base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill \ | 26 | base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \ |
23 | ln ls mkdir mknod mv pwd rm rmdir sleep stty sync touch \ | 27 | mknod mv pwd rm rmdir sleep stty sync touch true uname" |
24 | true uname \ | ||
25 | " | ||
26 | 28 | ||
27 | sbindir_progs= "chroot" | 29 | sbindir_progs= "chroot" |
28 | 30 | ||
29 | do_install () { | 31 | do_install() { |
30 | autotools_do_install | 32 | autotools_do_install |
31 | 33 | ||
32 | # Renaming the utilities that should go in /usr/bin | ||
33 | for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done | 34 | for i in ${bindir_progs}; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}; done |
34 | 35 | ||
35 | # Renaming and moving the utilities that should go in /bin (FHS) | ||
36 | install -d ${D}${base_bindir} | 36 | install -d ${D}${base_bindir} |
37 | for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done | 37 | for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${PN}; done |
38 | 38 | ||
39 | # Renaming and moving the utilities that should go in /usr/sbin (FHS) | ||
40 | install -d ${D}${sbindir} | 39 | install -d ${D}${sbindir} |
41 | for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done | 40 | for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${PN}; done |
42 | 41 | ||
@@ -44,20 +43,17 @@ do_install () { | |||
44 | # in update-alternatives to fail, therefore use lbracket - the name used | 43 | # in update-alternatives to fail, therefore use lbracket - the name used |
45 | # for the actual source file. | 44 | # for the actual source file. |
46 | mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN} | 45 | mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${PN} |
46 | |||
47 | # hostname and uptime separated. busybox's versions are preferred | 47 | # hostname and uptime separated. busybox's versions are preferred |
48 | mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN} | 48 | mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${PN} |
49 | mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN} | 49 | mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN} |
50 | |||
51 | } | 50 | } |
52 | 51 | ||
53 | pkg_postinst_${PN} () { | 52 | pkg_postinst_${PN} () { |
54 | # The utilities in /usr/bin | ||
55 | for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done | 53 | for i in ${bindir_progs}; do update-alternatives --install ${bindir}/$i $i $i.${PN} 100; done |
56 | 54 | ||
57 | # The utilities in /bin | ||
58 | for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done | 55 | for i in ${base_bindir_progs}; do update-alternatives --install ${base_bindir}/$i $i $i.${PN} 100; done |
59 | 56 | ||
60 | # The utilities in /usr/sbin | ||
61 | for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done | 57 | for i in ${sbindir_progs}; do update-alternatives --install ${sbindir}/$i $i $i.${PN} 100; done |
62 | 58 | ||
63 | # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately. | 59 | # Special cases. uptime and hostname is broken, prefer busybox's version. [ needs to be treated separately. |
@@ -67,13 +63,10 @@ pkg_postinst_${PN} () { | |||
67 | } | 63 | } |
68 | 64 | ||
69 | pkg_prerm_${PN} () { | 65 | pkg_prerm_${PN} () { |
70 | # The utilities in /usr/bin | ||
71 | for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done | 66 | for i in ${bindir_progs}; do update-alternatives --remove $i $i.${PN}; done |
72 | 67 | ||
73 | # The utilities in /bin | ||
74 | for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done | 68 | for i in ${base_bindir_progs}; do update-alternatives --remove $i $i.${PN}; done |
75 | 69 | ||
76 | # The utilities in /usr/sbin | ||
77 | for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done | 70 | for i in ${sbindir_progs}; do update-alternatives --remove $i $i.${PN}; done |
78 | 71 | ||
79 | # The special cases | 72 | # The special cases |