From 00a42b73b62b602f96afe23b015c6e07098b9926 Mon Sep 17 00:00:00 2001 From: Qing He Date: Wed, 21 Jul 2010 15:12:29 +0800 Subject: util-linux: upgrade to version 2.17.2 from 2.17 changes: - clarify license. the package does contains a standalone utility called lscpu that is under GPLv3+, fortunately it's note packaged as for now - the installation path of getopt has changed todo: - move libblkid and libuuid into separate packages Signed-off-by: Qing He --- .../util-linux/util-linux-2.17.2/tls.patch | 70 ++++++++++++++++++++++ .../util-linux-2.17.2/uclibc-compile.patch | 13 ++++ .../util-linux-ng-replace-siginterrupt.patch | 23 +++++++ meta/packages/util-linux/util-linux-2.17/tls.patch | 70 ---------------------- .../util-linux-2.17/uclibc-compile.patch | 13 ---- .../util-linux-ng-replace-siginterrupt.patch | 23 ------- meta/packages/util-linux/util-linux.inc | 16 ++++- meta/packages/util-linux/util-linux_2.17.2.bb | 11 ++++ meta/packages/util-linux/util-linux_2.17.bb | 10 ---- 9 files changed, 130 insertions(+), 119 deletions(-) create mode 100644 meta/packages/util-linux/util-linux-2.17.2/tls.patch create mode 100644 meta/packages/util-linux/util-linux-2.17.2/uclibc-compile.patch create mode 100644 meta/packages/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch delete mode 100644 meta/packages/util-linux/util-linux-2.17/tls.patch delete mode 100644 meta/packages/util-linux/util-linux-2.17/uclibc-compile.patch delete mode 100644 meta/packages/util-linux/util-linux-2.17/util-linux-ng-replace-siginterrupt.patch create mode 100644 meta/packages/util-linux/util-linux_2.17.2.bb delete mode 100644 meta/packages/util-linux/util-linux_2.17.bb (limited to 'meta') diff --git a/meta/packages/util-linux/util-linux-2.17.2/tls.patch b/meta/packages/util-linux/util-linux-2.17.2/tls.patch new file mode 100644 index 000000000..bdb29cae1 --- /dev/null +++ b/meta/packages/util-linux/util-linux-2.17.2/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 +- 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.2/uclibc-compile.patch b/meta/packages/util-linux/util-linux-2.17.2/uclibc-compile.patch new file mode 100644 index 000000000..b2e8a8b95 --- /dev/null +++ b/meta/packages/util-linux/util-linux-2.17.2/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.2/util-linux-ng-replace-siginterrupt.patch b/meta/packages/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch new file mode 100644 index 000000000..4b5eb7376 --- /dev/null +++ b/meta/packages/util-linux/util-linux-2.17.2/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-2.17/tls.patch b/meta/packages/util-linux/util-linux-2.17/tls.patch deleted file mode 100644 index bdb29cae1..000000000 --- a/meta/packages/util-linux/util-linux-2.17/tls.patch +++ /dev/null @@ -1,70 +0,0 @@ -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 -- 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 deleted file mode 100644 index b2e8a8b95..000000000 --- a/meta/packages/util-linux/util-linux-2.17/uclibc-compile.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 4b5eb7376..000000000 --- a/meta/packages/util-linux/util-linux-2.17/util-linux-ng-replace-siginterrupt.patch +++ /dev/null @@ -1,23 +0,0 @@ -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.inc b/meta/packages/util-linux/util-linux.inc index 733667a9c..571b53c99 100644 --- a/meta/packages/util-linux/util-linux.inc +++ b/meta/packages/util-linux/util-linux.inc @@ -1,12 +1,22 @@ DESCRIPTION = "Util-linux is a suite of essential utilities for any Linux system." SECTION = "base" -LICENSE = "GPL" + +# note that `lscpu' is under GPLv3+ +LICENSE = "GPLv2+ & LGPLv2.1+ & BSD" +LICENSE_util-linux-lscpu = "GPLv3+" + +LIC_FILES_CHKSUM = "file://README.licensing;md5=1530e36fe1304d4535513de90a290df9 \ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://licenses/COPYING.GPL;md5=8ca43cbc842c2336e835926c2166c28b \ + file://licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \ + file://getopt/COPYING;md5=8ca43cbc842c2336e835926c2166c28b" + 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/v${PV}/util-linux-ng-${PV}.tar.bz2 \ +SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${MAJOR_VERSION}/util-linux-ng-${PV}.tar.bz2 \ file://MCONFIG \ file://swapargs.h \ file://defines.h \ @@ -23,7 +33,7 @@ EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elv --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \ --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-*.*" +FILES_${PN}-doc += "/usr/share/getopt/getopt-*.*" FILES_util-linux-fdisk = "/sbin/fdisk.${PN}" FILES_util-linux-cfdisk = "/sbin/cfdisk" diff --git a/meta/packages/util-linux/util-linux_2.17.2.bb b/meta/packages/util-linux/util-linux_2.17.2.bb new file mode 100644 index 000000000..9efe64a6c --- /dev/null +++ b/meta/packages/util-linux/util-linux_2.17.2.bb @@ -0,0 +1,11 @@ +MAJOR_VERSION = "2.17" +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" diff --git a/meta/packages/util-linux/util-linux_2.17.bb b/meta/packages/util-linux/util-linux_2.17.bb deleted file mode 100644 index b5d177fc7..000000000 --- a/meta/packages/util-linux/util-linux_2.17.bb +++ /dev/null @@ -1,10 +0,0 @@ -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" -- cgit v1.2.3