summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/util-linux/util-linux-2.17/tls.patch70
-rw-r--r--meta/packages/util-linux/util-linux-2.17/uclibc-compile.patch13
-rw-r--r--meta/packages/util-linux/util-linux-2.17/util-linux-ng-replace-siginterrupt.patch23
-rw-r--r--meta/packages/util-linux/util-linux-native_2.15.bb32
-rw-r--r--meta/packages/util-linux/util-linux.inc97
-rw-r--r--meta/packages/util-linux/util-linux_2.15.bb3
-rw-r--r--meta/packages/util-linux/util-linux_2.17.bb10
7 files changed, 171 insertions, 77 deletions
diff --git a/meta/packages/util-linux/util-linux-2.17/tls.patch b/meta/packages/util-linux/util-linux-2.17/tls.patch
new file mode 100644
index 0000000000..bdb29cae1f
--- /dev/null
+++ b/meta/packages/util-linux/util-linux-2.17/tls.patch
@@ -0,0 +1,70 @@
1Index: util-linux-ng-2.16/m4/tls.m4
2===================================================================
3--- util-linux-ng-2.16.orig/m4/tls.m4 2009-07-04 01:20:03.000000000 +0200
4+++ util-linux-ng-2.16/m4/tls.m4 2009-07-30 01:57:30.151697033 +0200
5@@ -18,31 +18,26 @@
6 # version as well.
7 #
8 AC_DEFUN([AX_TLS], [
9- AC_MSG_CHECKING(for thread local storage (TLS) class)
10- AC_CACHE_VAL(ac_cv_tls, [
11- ax_tls_keywords="__thread __declspec(thread) none"
12- for ax_tls_keyword in $ax_tls_keywords; do
13- case $ax_tls_keyword in
14- none) ac_cv_tls=none ; break ;;
15- *)
16- AC_TRY_COMPILE(
17- [#include <stdlib.h>
18- static void
19- foo(void) {
20- static ] $ax_tls_keyword [ int bar;
21- exit(1);
22- }],
23- [],
24- [ac_cv_tls=$ax_tls_keyword ; break],
25- ac_cv_tls=none
26- )
27- esac
28- done
29-])
30+ AC_CACHE_CHECK([for thread local storage (TLS) class],
31+ ac_cv_tls,
32+ [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
33+ [chktls_save_LDFLAGS="$LDFLAGS"
34+ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
35+ chktls_save_CFLAGS="$CFLAGS"
36+ CFLAGS="-fPIC $CFLAGS"
37+ dnl If -shared works, test if TLS works in a shared library.
38+ AC_LINK_IFELSE([int f() { return 0; }],
39+ AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }],
40+ [ac_cv_tls=yes],
41+ [ac_cv_tls=no]),
42+ [ac_cv_tls=yes])
43+ CFLAGS="$chktls_save_CFLAGS"
44+ LDFLAGS="$chktls_save_LDFLAGS"], [ac_cv_tls=no])
45+ ])
46
47- if test "$ac_cv_tls" != "none"; then
48- dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
49- AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
50- fi
51- AC_MSG_RESULT($ac_cv_tls)
52+ AS_IF([test "x$ac_cv_tls" = "xyes"],
53+ [AC_DEFINE([TLS], 1,
54+ [Define this if the compiler supports __thread for Thread-Local Storage])
55+ $1],
56+ [$2])
57 ])
58Index: util-linux-ng-2.16/shlibs/uuid/src/gen_uuid.c
59===================================================================
60--- util-linux-ng-2.16.orig/shlibs/uuid/src/gen_uuid.c 2009-07-30 02:31:48.518159459 +0200
61+++ util-linux-ng-2.16/shlibs/uuid/src/gen_uuid.c 2009-07-30 02:32:04.867871183 +0200
62@@ -99,7 +99,7 @@
63 #endif
64
65 #ifdef TLS
66-#define THREAD_LOCAL static TLS
67+#define THREAD_LOCAL static __thread
68 #else
69 #define THREAD_LOCAL static
70 #endif
diff --git a/meta/packages/util-linux/util-linux-2.17/uclibc-compile.patch b/meta/packages/util-linux/util-linux-2.17/uclibc-compile.patch
new file mode 100644
index 0000000000..b2e8a8b95a
--- /dev/null
+++ b/meta/packages/util-linux/util-linux-2.17/uclibc-compile.patch
@@ -0,0 +1,13 @@
1Index: util-linux-ng-2.16/misc-utils/cal.c
2===================================================================
3--- util-linux-ng-2.16.orig/misc-utils/cal.c 2009-07-03 16:20:01.000000000 -0700
4+++ util-linux-ng-2.16/misc-utils/cal.c 2009-07-18 23:21:37.000000000 -0700
5@@ -407,7 +407,7 @@
6 strcpy(day_headings,"");
7 strcpy(j_day_headings,"");
8
9-#ifdef HAVE_LANGINFO_H
10+#ifdef HAVE_LANGINFO_H && !defined(__UCLIBC__)
11 # define weekday(wd) nl_langinfo(ABDAY_1+wd)
12 #else
13 # define weekday(wd) _time_info->abbrev_wkday[wd]
diff --git a/meta/packages/util-linux/util-linux-2.17/util-linux-ng-replace-siginterrupt.patch b/meta/packages/util-linux/util-linux-2.17/util-linux-ng-replace-siginterrupt.patch
new file mode 100644
index 0000000000..4b5eb73760
--- /dev/null
+++ b/meta/packages/util-linux/util-linux-2.17/util-linux-ng-replace-siginterrupt.patch
@@ -0,0 +1,23 @@
1Index: util-linux-ng-2.14/login-utils/login.c
2===================================================================
3--- util-linux-ng-2.14.orig/login-utils/login.c 2008-05-28 16:01:02.000000000 -0700
4+++ util-linux-ng-2.14/login-utils/login.c 2009-03-04 18:31:42.000000000 -0800
5@@ -358,6 +358,7 @@
6 char *childArgv[10];
7 char *buff;
8 int childArgc = 0;
9+ struct sigaction act;
10 #ifdef HAVE_SECURITY_PAM_MISC_H
11 int retcode;
12 pam_handle_t *pamh = NULL;
13@@ -373,7 +374,9 @@
14 pid = getpid();
15
16 signal(SIGALRM, timedout);
17- siginterrupt(SIGALRM,1); /* we have to interrupt syscalls like ioclt() */
18+ (void) sigaction(SIGALRM, NULL, &act);
19+ act.sa_flags &= ~SA_RESTART;
20+ sigaction(SIGALRM, &act, NULL);
21 alarm((unsigned int)timeout);
22 signal(SIGQUIT, SIG_IGN);
23 signal(SIGINT, SIG_IGN);
diff --git a/meta/packages/util-linux/util-linux-native_2.15.bb b/meta/packages/util-linux/util-linux-native_2.15.bb
deleted file mode 100644
index 92878c8abe..0000000000
--- a/meta/packages/util-linux/util-linux-native_2.15.bb
+++ /dev/null
@@ -1,32 +0,0 @@
1DESCRIPTION = "Util-linux is a suite of essential utilities for any Linux system."
2SECTION = "base"
3LICENSE = "GPL"
4DEPENDS = "zlib-native ncurses-native gexttext-native"
5
6inherit autotools native
7
8SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v2.15/util-linux-ng-${PV}.tar.bz2 \
9 file://gcc34.patch;patch=1 \
10 file://MCONFIG \
11 file://make_include \
12 file://swapargs.h \
13 file://fdiskbsdlabel_thumb.diff;patch=1 \
14 file://defines.h"
15
16S="${WORKDIR}/util-linux-ng-${PV}"
17
18EXTRA_OEMAKE="'OPT=${BUILD_CFLAGS}' 'CC=${BUILD_CC}' 'LD=${BUILD_LD}' 'LDFLAGS=${BUILD_LDFLAGS}' SBINDIR=${base_sbindir} USRSBINDIR=${base_sbindir} LOGDIR=${localstatedir}/log VARPATH=${localstatedir} LOCALEDIR=${datadir}/locale"
19
20do_compile () {
21 set -e
22 install ${WORKDIR}/MCONFIG ${S}/MCONFIG
23 install ${WORKDIR}/make_include ${S}/make_include
24 install ${WORKDIR}/swapargs.h ${S}/mount/swapargs.h
25 install ${WORKDIR}/defines.h ${S}/defines.h
26 oe_runmake
27}
28
29do_stage () {
30 autotools_stage_all
31}
32
diff --git a/meta/packages/util-linux/util-linux.inc b/meta/packages/util-linux/util-linux.inc
index 4e61a8cc27..733667a9c7 100644
--- a/meta/packages/util-linux/util-linux.inc
+++ b/meta/packages/util-linux/util-linux.inc
@@ -2,28 +2,26 @@ DESCRIPTION = "Util-linux is a suite of essential utilities for any Linux system
2SECTION = "base" 2SECTION = "base"
3LICENSE = "GPL" 3LICENSE = "GPL"
4DEPENDS = "udev zlib ncurses virtual/libintl gettext" 4DEPENDS = "udev zlib ncurses virtual/libintl gettext"
5DEPENDS_virtclass-native = "zlib-native ncurses-native lzo-native gettext-native"
5 6
6inherit autotools 7inherit autotools
7 8
8SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v2.15/util-linux-ng-${PV}.tar.bz2 \ 9SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${PV}/util-linux-ng-${PV}.tar.bz2 \
9 file://MCONFIG \ 10 file://MCONFIG \
10 file://make_include \
11 file://swapargs.h \ 11 file://swapargs.h \
12 file://fdiskbsdlabel_thumb.diff;patch=1 \ 12 file://defines.h \
13 file://umount.diff;patch=1 \ 13 file://make_include \
14 file://fix-make-c.patch;patch=1 \ 14 "
15 file://optional-uuid.patch;patch=1 \
16 file://uuid.patch;patch=1 \
17 file://defines.h"
18# file://gcc34.patch;patch=1 \
19 15
20PACKAGES_prepend = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-swaponoff util-linux-losetup util-linux-umount util-linux-mount util-linux-readprofile " 16PACKAGES_prepend = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-swaponoff util-linux-losetup util-linux-umount util-linux-mount util-linux-readprofile "
21 17
18PACKAGES_virtclass-native = ""
19
22S = "${WORKDIR}/util-linux-ng-${PV}" 20S = "${WORKDIR}/util-linux-ng-${PV}"
23 21
24EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last \ 22EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last \
25 --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \ 23 --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \
26 --disable-login-utils --enable-write --enable-arch --enable-mount --with-fsprobe=builtin" 24 --disable-login-utils --enable-write --enable-arch --enable-mount --with-fsprobe=builtin --enable-libuuid --enable-libblkid --enable-fsck"
27 25
28FILES_${PN}-doc += "/usr/share/misc/getopt/getopt-*.*" 26FILES_${PN}-doc += "/usr/share/misc/getopt/getopt-*.*"
29 27
@@ -39,6 +37,9 @@ FILES_util-linux-readprofile = "/usr/sbin/readprofile"
39RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile " 37RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile "
40RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup" 38RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
41 39
40RRECOMMENDS_${PN}_virtclass-native = ""
41RDEPENDS_${PN}_virtclass-native = ""
42
42do_compile () { 43do_compile () {
43 set -e 44 set -e
44 install ${WORKDIR}/MCONFIG ${S}/MCONFIG 45 install ${WORKDIR}/MCONFIG ${S}/MCONFIG
@@ -81,38 +82,48 @@ do_install () {
81 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \ 82 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
82 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install 83 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install
83 84
84 install -d ${D}${base_bindir} 85 mkdir -p ${D}${base_bindir}
85 install -d ${D}${base_sbindir} 86
86 test -f ${D}${sbindir}/pivot_root && \ 87 sbinprogs="agetty blockdev ctrlaltdel cfdisk vipw vigr"
87 mv ${D}${sbindir}/pivot_root ${D}${base_sbindir}/pivot_root.${PN} 88 sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile fsck blkid sln"
88 mv ${D}${bindir}/dmesg ${D}${base_bindir}/dmesg.${PN} 89 usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt"
89 mv ${D}${bindir}/kill ${D}${base_bindir}/kill.${PN} 90 binprogs_a="dmesg kill more umount mount login reset"
90 mv ${D}${bindir}/more ${D}${base_bindir}/more.${PN} 91
91 mv ${D}${sbindir}/hwclock ${D}${base_sbindir}/hwclock.${PN} 92 if [ "${base_sbindir}" != "${sbindir}" ]; then
92 mv ${D}${sbindir}/mkswap ${D}${base_sbindir}/mkswap.${PN} 93 mkdir -p ${D}${base_sbindir}
93 mv ${D}${sbindir}/shutdown ${D}${base_sbindir}/shutdown.${PN} 94 for p in $sbinprogs $sbinprogs_a; do
94# mv ${D}${sbindir}/sln ${D}${base_sbindir}/sln.${PN} 95 if [ -f "${D}${sbindir}/$p" ]; then
95 mv ${D}${sbindir}/mkfs.minix ${D}${base_sbindir}/mkfs.minix.${PN} 96 mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p"
96 mv ${D}${sbindir}/fsck.minix ${D}${base_sbindir}/fsck.minix.${PN} 97 fi
97 mv ${D}${bindir}/hexdump ${D}${bindir}/hexdump.${PN} 98 done
98 mv ${D}${bindir}/last ${D}${bindir}/last.${PN} 99 fi
99 mv ${D}${bindir}/logger ${D}${bindir}/logger.${PN} 100
100 mv ${D}${bindir}/mesg ${D}${bindir}/mesg.${PN} 101 if [ "${base_bindir}" != "${bindir}" ]; then
101 mv ${D}${bindir}/renice ${D}${bindir}/renice.${PN} 102 mkdir -p ${D}${base_bindir}
102 mv ${D}${bindir}/wall ${D}${bindir}/wall.${PN} 103 for p in $binprogs_a; do
103 104 if [ -f "${D}${bindir}/$p" ]; then
104 mv ${D}${sbindir}/losetup ${D}${base_sbindir}/losetup.${PN} 105 mv "${D}${bindir}/$p" "${D}${base_bindir}/$p"
105 mv ${D}${sbindir}/swapon ${D}${base_sbindir}/swapon.${PN} 106 fi
106 mv ${D}${bindir}/umount ${D}${base_bindir}/umount.${PN} 107 done
107 mv ${D}${bindir}/mount ${D}${base_bindir}/mount.${PN} 108 fi
108 mv ${D}${sbindir}/fdisk ${D}${base_sbindir}/fdisk.${PN} 109
109 110 for p in $usrbinprogs_a; do
110 mv ${D}${sbindir}/agetty ${D}${base_sbindir}/ 111 if [ -f "${D}${bindir}/$p" ]; then
111 mv ${D}${sbindir}/blockdev ${D}${base_sbindir}/ 112 mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}"
112 mv ${D}${sbindir}/cfdisk ${D}${base_sbindir}/ 113 fi
113 mv ${D}${sbindir}/ctrlaltdel ${D}${base_sbindir}/ 114 done
114 115
115 mv ${D}${sbindir}/readprofile ${D}${sbindir}/readprofile.${PN} 116 for p in $binprogs_a; do
117 if [ -f "${D}${base_bindir}/$p" ]; then
118 mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}"
119 fi
120 done
121
122 for p in $sbinprogs_a; do
123 if [ -f "${D}${base_sbindir}/$p" ]; then
124 mv "${D}${base_sbindir}/$p" "${D}${base_sbindir}/$p.${PN}"
125 fi
126 done
116 127
117 install -d ${D}${sysconfdir}/default/ 128 install -d ${D}${sysconfdir}/default/
118 echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall 129 echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
@@ -212,3 +223,5 @@ pkg_prerm_util-linux-swaponoff () {
212 update-alternatives --remove swapoff swapoff.${PN} 223 update-alternatives --remove swapoff swapoff.${PN}
213 update-alternatives --remove swapon swapon.${PN} 224 update-alternatives --remove swapon swapon.${PN}
214} 225}
226
227BBCLASSEXTEND = "native"
diff --git a/meta/packages/util-linux/util-linux_2.15.bb b/meta/packages/util-linux/util-linux_2.15.bb
deleted file mode 100644
index a1652d621a..0000000000
--- a/meta/packages/util-linux/util-linux_2.15.bb
+++ /dev/null
@@ -1,3 +0,0 @@
1require util-linux.inc
2
3PR = "r18"
diff --git a/meta/packages/util-linux/util-linux_2.17.bb b/meta/packages/util-linux/util-linux_2.17.bb
new file mode 100644
index 0000000000..b5d177fc7e
--- /dev/null
+++ b/meta/packages/util-linux/util-linux_2.17.bb
@@ -0,0 +1,10 @@
1require util-linux.inc
2PR="r0"
3
4SRC_URI += "file://uclibc-compile.patch \
5 file://util-linux-ng-replace-siginterrupt.patch"
6
7# fallocate is glibc 2.10, fallocate64 is glibc 2.11
8# we need to disable it for older versions
9EXTRA_OECONF += "ac_cv_func_fallocate=no"
10EXTRA_OECONF_virtclass-native += "--disable-fallocate --disable-use-tty-group"