diff options
Diffstat (limited to 'meta/packages')
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 000000000..bdb29cae1 --- /dev/null +++ b/meta/packages/util-linux/util-linux-2.17/tls.patch @@ -0,0 +1,70 @@ +Index: util-linux-ng-2.16/m4/tls.m4 +=================================================================== +--- util-linux-ng-2.16.orig/m4/tls.m4 2009-07-04 01:20:03.000000000 +0200 ++++ util-linux-ng-2.16/m4/tls.m4 2009-07-30 01:57:30.151697033 +0200 +@@ -18,31 +18,26 @@ + # version as well. + # + AC_DEFUN([AX_TLS], [ +- AC_MSG_CHECKING(for thread local storage (TLS) class) +- AC_CACHE_VAL(ac_cv_tls, [ +- ax_tls_keywords="__thread __declspec(thread) none" +- for ax_tls_keyword in $ax_tls_keywords; do +- case $ax_tls_keyword in +- none) ac_cv_tls=none ; break ;; +- *) +- AC_TRY_COMPILE( +- [#include <stdlib.h> +- static void +- foo(void) { +- static ] $ax_tls_keyword [ int bar; +- exit(1); +- }], +- [], +- [ac_cv_tls=$ax_tls_keyword ; break], +- ac_cv_tls=none +- ) +- esac +- done +-]) ++ AC_CACHE_CHECK([for thread local storage (TLS) class], ++ ac_cv_tls, ++ [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }], ++ [chktls_save_LDFLAGS="$LDFLAGS" ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ dnl If -shared works, test if TLS works in a shared library. ++ AC_LINK_IFELSE([int f() { return 0; }], ++ AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }], ++ [ac_cv_tls=yes], ++ [ac_cv_tls=no]), ++ [ac_cv_tls=yes]) ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS"], [ac_cv_tls=no]) ++ ]) + +- if test "$ac_cv_tls" != "none"; then +- dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here]) +- AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here]) +- fi +- AC_MSG_RESULT($ac_cv_tls) ++ AS_IF([test "x$ac_cv_tls" = "xyes"], ++ [AC_DEFINE([TLS], 1, ++ [Define this if the compiler supports __thread for Thread-Local Storage]) ++ $1], ++ [$2]) + ]) +Index: util-linux-ng-2.16/shlibs/uuid/src/gen_uuid.c +=================================================================== +--- util-linux-ng-2.16.orig/shlibs/uuid/src/gen_uuid.c 2009-07-30 02:31:48.518159459 +0200 ++++ util-linux-ng-2.16/shlibs/uuid/src/gen_uuid.c 2009-07-30 02:32:04.867871183 +0200 +@@ -99,7 +99,7 @@ + #endif + + #ifdef TLS +-#define THREAD_LOCAL static TLS ++#define THREAD_LOCAL static __thread + #else + #define THREAD_LOCAL static + #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 000000000..b2e8a8b95 --- /dev/null +++ b/meta/packages/util-linux/util-linux-2.17/uclibc-compile.patch @@ -0,0 +1,13 @@ +Index: util-linux-ng-2.16/misc-utils/cal.c +=================================================================== +--- util-linux-ng-2.16.orig/misc-utils/cal.c 2009-07-03 16:20:01.000000000 -0700 ++++ util-linux-ng-2.16/misc-utils/cal.c 2009-07-18 23:21:37.000000000 -0700 +@@ -407,7 +407,7 @@ + strcpy(day_headings,""); + strcpy(j_day_headings,""); + +-#ifdef HAVE_LANGINFO_H ++#ifdef HAVE_LANGINFO_H && !defined(__UCLIBC__) + # define weekday(wd) nl_langinfo(ABDAY_1+wd) + #else + # 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 000000000..4b5eb7376 --- /dev/null +++ b/meta/packages/util-linux/util-linux-2.17/util-linux-ng-replace-siginterrupt.patch @@ -0,0 +1,23 @@ +Index: util-linux-ng-2.14/login-utils/login.c +=================================================================== +--- util-linux-ng-2.14.orig/login-utils/login.c 2008-05-28 16:01:02.000000000 -0700 ++++ util-linux-ng-2.14/login-utils/login.c 2009-03-04 18:31:42.000000000 -0800 +@@ -358,6 +358,7 @@ + char *childArgv[10]; + char *buff; + int childArgc = 0; ++ struct sigaction act; + #ifdef HAVE_SECURITY_PAM_MISC_H + int retcode; + pam_handle_t *pamh = NULL; +@@ -373,7 +374,9 @@ + pid = getpid(); + + signal(SIGALRM, timedout); +- siginterrupt(SIGALRM,1); /* we have to interrupt syscalls like ioclt() */ ++ (void) sigaction(SIGALRM, NULL, &act); ++ act.sa_flags &= ~SA_RESTART; ++ sigaction(SIGALRM, &act, NULL); + alarm((unsigned int)timeout); + signal(SIGQUIT, SIG_IGN); + 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 92878c8ab..000000000 --- a/meta/packages/util-linux/util-linux-native_2.15.bb +++ /dev/null @@ -1,32 +0,0 @@ -DESCRIPTION = "Util-linux is a suite of essential utilities for any Linux system." -SECTION = "base" -LICENSE = "GPL" -DEPENDS = "zlib-native ncurses-native gexttext-native" - -inherit autotools native - -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v2.15/util-linux-ng-${PV}.tar.bz2 \ - file://gcc34.patch;patch=1 \ - file://MCONFIG \ - file://make_include \ - file://swapargs.h \ - file://fdiskbsdlabel_thumb.diff;patch=1 \ - file://defines.h" - -S="${WORKDIR}/util-linux-ng-${PV}" - -EXTRA_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" - -do_compile () { - set -e - install ${WORKDIR}/MCONFIG ${S}/MCONFIG - install ${WORKDIR}/make_include ${S}/make_include - install ${WORKDIR}/swapargs.h ${S}/mount/swapargs.h - install ${WORKDIR}/defines.h ${S}/defines.h - oe_runmake -} - -do_stage () { - autotools_stage_all -} - diff --git a/meta/packages/util-linux/util-linux.inc b/meta/packages/util-linux/util-linux.inc index 4e61a8cc2..733667a9c 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 SECTION = "base" LICENSE = "GPL" DEPENDS = "udev zlib ncurses virtual/libintl gettext" +DEPENDS_virtclass-native = "zlib-native ncurses-native lzo-native gettext-native" inherit autotools -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v2.15/util-linux-ng-${PV}.tar.bz2 \ +SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${PV}/util-linux-ng-${PV}.tar.bz2 \ file://MCONFIG \ - file://make_include \ file://swapargs.h \ - file://fdiskbsdlabel_thumb.diff;patch=1 \ - file://umount.diff;patch=1 \ - file://fix-make-c.patch;patch=1 \ - file://optional-uuid.patch;patch=1 \ - file://uuid.patch;patch=1 \ - file://defines.h" -# file://gcc34.patch;patch=1 \ + file://defines.h \ + file://make_include \ + " PACKAGES_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 " +PACKAGES_virtclass-native = "" + S = "${WORKDIR}/util-linux-ng-${PV}" EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last \ --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \ - --disable-login-utils --enable-write --enable-arch --enable-mount --with-fsprobe=builtin" + --disable-login-utils --enable-write --enable-arch --enable-mount --with-fsprobe=builtin --enable-libuuid --enable-libblkid --enable-fsck" FILES_${PN}-doc += "/usr/share/misc/getopt/getopt-*.*" @@ -39,6 +37,9 @@ FILES_util-linux-readprofile = "/usr/sbin/readprofile" RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile " RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup" +RRECOMMENDS_${PN}_virtclass-native = "" +RDEPENDS_${PN}_virtclass-native = "" + do_compile () { set -e install ${WORKDIR}/MCONFIG ${S}/MCONFIG @@ -81,38 +82,48 @@ do_install () { 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \ 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install - install -d ${D}${base_bindir} - install -d ${D}${base_sbindir} - test -f ${D}${sbindir}/pivot_root && \ - mv ${D}${sbindir}/pivot_root ${D}${base_sbindir}/pivot_root.${PN} - mv ${D}${bindir}/dmesg ${D}${base_bindir}/dmesg.${PN} - mv ${D}${bindir}/kill ${D}${base_bindir}/kill.${PN} - mv ${D}${bindir}/more ${D}${base_bindir}/more.${PN} - mv ${D}${sbindir}/hwclock ${D}${base_sbindir}/hwclock.${PN} - mv ${D}${sbindir}/mkswap ${D}${base_sbindir}/mkswap.${PN} - mv ${D}${sbindir}/shutdown ${D}${base_sbindir}/shutdown.${PN} -# mv ${D}${sbindir}/sln ${D}${base_sbindir}/sln.${PN} - mv ${D}${sbindir}/mkfs.minix ${D}${base_sbindir}/mkfs.minix.${PN} - mv ${D}${sbindir}/fsck.minix ${D}${base_sbindir}/fsck.minix.${PN} - mv ${D}${bindir}/hexdump ${D}${bindir}/hexdump.${PN} - mv ${D}${bindir}/last ${D}${bindir}/last.${PN} - mv ${D}${bindir}/logger ${D}${bindir}/logger.${PN} - mv ${D}${bindir}/mesg ${D}${bindir}/mesg.${PN} - mv ${D}${bindir}/renice ${D}${bindir}/renice.${PN} - mv ${D}${bindir}/wall ${D}${bindir}/wall.${PN} - - mv ${D}${sbindir}/losetup ${D}${base_sbindir}/losetup.${PN} - mv ${D}${sbindir}/swapon ${D}${base_sbindir}/swapon.${PN} - mv ${D}${bindir}/umount ${D}${base_bindir}/umount.${PN} - mv ${D}${bindir}/mount ${D}${base_bindir}/mount.${PN} - mv ${D}${sbindir}/fdisk ${D}${base_sbindir}/fdisk.${PN} - - mv ${D}${sbindir}/agetty ${D}${base_sbindir}/ - mv ${D}${sbindir}/blockdev ${D}${base_sbindir}/ - mv ${D}${sbindir}/cfdisk ${D}${base_sbindir}/ - mv ${D}${sbindir}/ctrlaltdel ${D}${base_sbindir}/ - - mv ${D}${sbindir}/readprofile ${D}${sbindir}/readprofile.${PN} + mkdir -p ${D}${base_bindir} + + sbinprogs="agetty blockdev ctrlaltdel cfdisk vipw vigr" + sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile fsck blkid sln" + usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt" + binprogs_a="dmesg kill more umount mount login reset" + + if [ "${base_sbindir}" != "${sbindir}" ]; then + mkdir -p ${D}${base_sbindir} + for p in $sbinprogs $sbinprogs_a; do + if [ -f "${D}${sbindir}/$p" ]; then + mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" + fi + done + fi + + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + for p in $binprogs_a; do + if [ -f "${D}${bindir}/$p" ]; then + mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" + fi + done + fi + + for p in $usrbinprogs_a; do + if [ -f "${D}${bindir}/$p" ]; then + mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}" + fi + done + + for p in $binprogs_a; do + if [ -f "${D}${base_bindir}/$p" ]; then + mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}" + fi + done + + for p in $sbinprogs_a; do + if [ -f "${D}${base_sbindir}/$p" ]; then + mv "${D}${base_sbindir}/$p" "${D}${base_sbindir}/$p.${PN}" + fi + done install -d ${D}${sysconfdir}/default/ echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall @@ -212,3 +223,5 @@ pkg_prerm_util-linux-swaponoff () { update-alternatives --remove swapoff swapoff.${PN} update-alternatives --remove swapon swapon.${PN} } + +BBCLASSEXTEND = "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 a1652d621..000000000 --- a/meta/packages/util-linux/util-linux_2.15.bb +++ /dev/null @@ -1,3 +0,0 @@ -require util-linux.inc - -PR = "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 000000000..b5d177fc7 --- /dev/null +++ b/meta/packages/util-linux/util-linux_2.17.bb @@ -0,0 +1,10 @@ +require util-linux.inc +PR="r0" + +SRC_URI += "file://uclibc-compile.patch \ + file://util-linux-ng-replace-siginterrupt.patch" + +# fallocate is glibc 2.10, fallocate64 is glibc 2.11 +# we need to disable it for older versions +EXTRA_OECONF += "ac_cv_func_fallocate=no" +EXTRA_OECONF_virtclass-native += "--disable-fallocate --disable-use-tty-group" |