diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux')
13 files changed, 395 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch new file mode 100644 index 000000000..46d4d3765 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch @@ -0,0 +1,19 @@ +Ptest needs buildtest-TESTS and runtest-TESTS targets. +serial-tests is required to generate those targets. +Revert run.sh script accordingly to serialize running tests + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Upstream-Status: Inappropriate + +diff -ruN a/configure.ac b/configure.ac +--- a/configure.ac 2014-05-27 12:37:42.119772658 +0200 ++++ b/configure.ac 2014-05-27 12:41:46.225573272 +0200 +@@ -10,7 +10,7 @@ + dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run + dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors. + AC_USE_SYSTEM_EXTENSIONS +-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects]) ++AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests]) + + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], + [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch new file mode 100644 index 000000000..a0d5efad0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch @@ -0,0 +1,57 @@ +Avoid unsupported grep options + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Upstream-Status: Pending + +diff -ruN a/ts/ipcs/headers b/ts/ipcs/headers +--- a/tests/ts/ipcs/headers 2013-09-04 11:03:36.118613250 +0200 ++++ b/teste/ts/ipcs/headers 2013-09-04 11:03:27.906958437 +0200 +@@ -22,35 +22,35 @@ + ts_init "$*" + + ts_log "test: shm headers" +-$TS_CMD_IPCS -m -t | grep --after-context=1 "^---" >> $TS_OUTPUT +-$TS_CMD_IPCS -m -p | grep --after-context=1 "^---" >> $TS_OUTPUT +-$TS_CMD_IPCS -m -c | grep --after-context=1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -m -t | grep -A 1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -m -p | grep -A 1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -m -c | grep -A 1 "^---" >> $TS_OUTPUT + $TS_CMD_IPCS -m -l | grep "^---" >> $TS_OUTPUT + $TS_CMD_IPCS -m -u | grep "^---" >> $TS_OUTPUT + echo >> $TS_OUTPUT + + ts_log "test: mesg headers" +-$TS_CMD_IPCS -q -t | grep --after-context=1 "^---" >> $TS_OUTPUT +-$TS_CMD_IPCS -q -p | grep --after-context=1 "^---" >> $TS_OUTPUT +-$TS_CMD_IPCS -q -c | grep --after-context=1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -q -t | grep -A 1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -q -p | grep -A 1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -q -c | grep -A 1 "^---" >> $TS_OUTPUT + $TS_CMD_IPCS -q -l | grep "^---" >> $TS_OUTPUT + $TS_CMD_IPCS -q -u | grep "^---" >> $TS_OUTPUT + echo >> $TS_OUTPUT + + ts_log "test: sem headers" +-$TS_CMD_IPCS -s -t | grep --after-context=1 "^---" >> $TS_OUTPUT +-$TS_CMD_IPCS -s -p | grep --after-context=1 "^---" >> $TS_OUTPUT +-$TS_CMD_IPCS -s -c | grep --after-context=1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -s -t | grep -A 1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -s -p | grep -A 1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -s -c | grep -A 1 "^---" >> $TS_OUTPUT + $TS_CMD_IPCS -s -l | grep "^---" >> $TS_OUTPUT + $TS_CMD_IPCS -s -u | grep "^---" >> $TS_OUTPUT + echo >> $TS_OUTPUT + + ts_log "test: all headers" +-$TS_CMD_IPCS -a | grep --after-context=1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -a | grep -A 1 "^---" >> $TS_OUTPUT + +-$TS_CMD_IPCS -a -t | grep --after-context=1 "^---" >> $TS_OUTPUT +-$TS_CMD_IPCS -a -p | grep --after-context=1 "^---" >> $TS_OUTPUT +-$TS_CMD_IPCS -a -c | grep --after-context=1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -a -t | grep -A 1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -a -p | grep -A 1 "^---" >> $TS_OUTPUT ++$TS_CMD_IPCS -a -c | grep -A 1 "^---" >> $TS_OUTPUT + $TS_CMD_IPCS -a -l | grep "^---" >> $TS_OUTPUT + $TS_CMD_IPCS -a -u | grep "^---" >> $TS_OUTPUT + diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch new file mode 100644 index 000000000..7a63a4e05 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch @@ -0,0 +1,20 @@ +Avoid unsupported sleep parameter + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Upstream-Status: Pending + +diff -ruN a/simple b/simple +--- a/tests/ts/tailf/simple 2015-11-12 11:34:49.971817130 +0200 ++++ b/tests/ts/tailf/simple 2013-11-12 11:34:37.876325128 +0200 +@@ -27,9 +27,9 @@ + + $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 & + +-sleep 0.5 ++sleep 1 + echo {0..9} >> $INPUT +-sleep 0.5 ++sleep 1 + + rm -f $INPUT + diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch new file mode 100644 index 000000000..a5b1ff12e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch @@ -0,0 +1,23 @@ +util-linux: take ${sbindir} from the environment if it is set there +fix the test, the [ ] syntax was getting eaten by autoconf + +Signed-off-by: Phil Blundell <pb@pbcl.net> +Signed-off-by: Saul Wold <sgw@linux.intel.com +Upstream-Status: Inappropriate [configuration] + +Index: util-linux-2.22.1/configure.ac +=================================================================== +--- util-linux-2.22.1.orig/configure.ac ++++ util-linux-2.22.1/configure.ac +@@ -73,7 +73,10 @@ AC_SUBST([localstatedir]) + usrbin_execdir='${exec_prefix}/bin' + AC_SUBST([usrbin_execdir]) + +-usrsbin_execdir='${exec_prefix}/sbin' ++if test -z "$usrsbin_execdir" ; ++then ++ usrsbin_execdir='${exec_prefix}/sbin' ++fi + AC_SUBST([usrsbin_execdir]) + + case $libdir in diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch new file mode 100644 index 000000000..0eb881085 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch @@ -0,0 +1,18 @@ +Display testname for subtest + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Upstream-Status: Pending + +diff -ruN a/functions.sh b/functions.sh +--- a/tests/functions.sh 2015-11-12 21:32:02.434542124 +0100 ++++ b/tests/functions.sh 2015-11-12 21:40:37.095317280 +0100 +@@ -297,7 +297,7 @@ + if [ "$TS_PARALLEL" == "yes" ]; then + TS_TITLE=$(printf "%13s: %-30s ...\n%16s: %-27s ..." "$TS_COMPONENT" "$TS_DESC" "" "$TS_SUBNAME") + else +- TS_TITLE=$(printf "%16s: %-27s ..." "" "$TS_SUBNAME") ++ TS_TITLE=$(printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME") + echo -n "$TS_TITLE" + fi + } + diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch new file mode 100644 index 000000000..837f18934 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch @@ -0,0 +1,17 @@ +Define TESTS variable + +Signed-off-by: Tudor Florea <tudor.florea@enea.com> +Upstream-Status: Pending + +diff -ruN a/Makefile.am b/Makefile.am +--- a/Makefile.am 2015-11-12 20:29:46.778396936 +0100 ++++ b/Makefile.am 2015-11-12 20:32:24.342450279 +0100 +@@ -48,7 +48,7 @@ + dist_bashcompletion_DATA = + check_PROGRAMS = + dist_check_SCRIPTS = +-TESTS = ++TESTS = $(check_PROGRAMS) + + PATHFILES = + diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/run-ptest b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/run-ptest new file mode 100644 index 000000000..fbc2f9b56 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/run-ptest @@ -0,0 +1,25 @@ +#!/bin/sh + +cd tests || exit 1 + +comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort) + + +echo +echo "-------------------- util-linux regression tests --------------------" +echo +echo " For development purpose only. " +echo " Don't execute on production system! " +echo + +res=0 +count=0 +for ts in $comps; +do + $ts | sed '{ + s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ + s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ + s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ + }' +done + diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/runuser-l.pamd b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/runuser-l.pamd new file mode 100644 index 000000000..4b368ccf5 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/runuser-l.pamd @@ -0,0 +1,3 @@ +auth include runuser +session optional pam_keyinit.so force revoke +session include runuser diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/runuser.pamd b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/runuser.pamd new file mode 100644 index 000000000..48d133b9e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/runuser.pamd @@ -0,0 +1,4 @@ +auth sufficient pam_rootok.so +session optional pam_keyinit.so revoke +session required pam_limits.so +session required pam_unix.so diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch new file mode 100644 index 000000000..68bf22de8 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch @@ -0,0 +1,33 @@ +From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Wed, 26 Mar 2014 01:30:29 +0000 +Subject: [PATCH] sun.c: use qsort() to instead of qsort_r() + +qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on +the host like CentOS 5.x. + +Upstream-Status: Inappropriate [Other] + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + libfdisk/src/sun.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +Index: util-linux-2.24.2/libfdisk/src/sun.c +=================================================================== +--- util-linux-2.24.2.orig/libfdisk/src/sun.c ++++ util-linux-2.24.2/libfdisk/src/sun.c +@@ -431,10 +431,9 @@ static int sun_verify_disklabel(struct f + } + verify_sun_starts = starts; + +- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), +- (int (*)(const void *,const void *,void *)) verify_sun_cmp, +- verify_sun_starts); +- ++ qsort(array,ARRAY_SIZE(array),sizeof(array[0]), ++ (int (*)(const void *,const void *)) verify_sun_cmp); ++ + if (array[0] == -1) { + fdisk_info(cxt, _("No partitions defined.")); + return 0; diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch new file mode 100644 index 000000000..1f496dee2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch @@ -0,0 +1,57 @@ +Support older hosts with latest util-linux-native + +mkostemp is not defined on older machines. So we detect this and +provide a define that uses mkstemp instead. + +O_CLOEXEC is not defined on older machines. It is however defined +in the 'c.h' header. Fix up the users to include 'c.h'. + +fdisks/fdisksunlabel.c was modified to use qsort_r, however +this is not defined on older hosts. Revert: + commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698 + fdisk: (sun): use ask API, remove global variable + +Upstream-Status: Inappropriate [other] +Patches revert upstream changes in order to support older +machines. + +Signed-off-by: Mark Hatle <mark.hatle@windriver.com> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + configure.ac | 1 + + include/c.h | 7 +++++++ + 2 files changed, 8 insertions(+) + +diff --git a/configure.ac b/configure.ac +index eb3680b..93e015f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -318,6 +318,7 @@ AC_CHECK_FUNCS([ \ + llseek \ + lseek64 \ + mempcpy \ ++ mkostemp \ + nanosleep \ + open_memstream \ + personality \ +diff --git a/include/c.h b/include/c.h +index e423e8b..cf33b94 100644 +--- a/include/c.h ++++ b/include/c.h +@@ -233,6 +233,13 @@ static inline int dirfd(DIR *d) + #endif + + /* ++ * mkostemp replacement ++ */ ++#ifndef HAVE_MKOSTEMP ++#define mkostemp(template, flags) mkstemp(template) ++#endif ++ ++/* + * MAXHOSTNAMELEN replacement + */ + static inline size_t get_hostname_max(void) +-- +1.9.1 + diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch new file mode 100644 index 000000000..5773d7ea1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch @@ -0,0 +1,27 @@ +Upstream-Status: Inappropriate [embedded specific] + +The FHS indicates that /etc must be capable of being mounted R/O. + +The FHS also indicates that lock files belong in /var/lock, and /var must +be R/W as soon as possible during boot. + +This patch moves the mtab lock file from the potentially R/O /etc, to the +R/W /var/lock area. This lock file is used when mounting disks and making +other mount adjustments. The _PATH_MOUNTED_TMP is not adjusted, as failing +to write to this file does not cause any functional limitations. + +(Note, if /etc is R/O, then /etc/mtab should be a symlink to /proc/mounts) + +Signed-off-by: Mark Hatle <mark.hatle@windriver.com> + +--- util-linux-ng-2.16/include/pathnames.h.orig ++++ util-linux-ng-2.16/include/pathnames.h +@@ -90,7 +90,7 @@ + # endif + #endif + +-#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" ++#define _PATH_MOUNTED_LOCK "/var/lock/mtab~" + #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" + + #ifndef _PATH_DEV diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch new file mode 100644 index 000000000..1b0ff79d4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch @@ -0,0 +1,92 @@ +This patch adds error() API implementation for non-glibc system C libs + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: util-linux-2.27.1/tests/helpers/test_uuidd.c +=================================================================== +--- util-linux-2.27.1.orig/tests/helpers/test_uuidd.c ++++ util-linux-2.27.1/tests/helpers/test_uuidd.c +@@ -23,7 +23,6 @@ + * + * make uuidd uuidgen localstatedir=/var + */ +-#include <error.h> + #include <libgen.h> + #include <pthread.h> + #include <stdio.h> +@@ -39,6 +38,17 @@ + #include "xalloc.h" + #include "strutils.h" + ++#ifdef __GLIBC__ ++#include <error.h> ++#else ++extern void (*error_print_progname)(void); ++extern unsigned int error_message_count; ++extern int error_one_per_line; ++ ++void error(int, int, const char *, ...); ++void error_at_line(int, int, const char *, unsigned int, const char *, ...); ++#endif ++ + #define LOG(level,args) if (loglev >= level) { fprintf args; } + + size_t nprocesses = 4; +@@ -257,6 +267,56 @@ static void object_dump(size_t idx, obje + fprintf(stderr, "}\n"); + } + ++#ifndef __GLIBC__ ++extern char *__progname; ++ ++void (*error_print_progname)(void) = 0; ++unsigned int error_message_count = 0; ++int error_one_per_line = 0; ++ ++static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap) ++{ ++ if (file && error_one_per_line) { ++ static const char *oldfile; ++ static unsigned int oldline; ++ if (line == oldline && strcmp(file, oldfile) == 0) ++ return; ++ oldfile = file; ++ oldline = line; ++ } ++ if (error_print_progname) ++ error_print_progname(); ++ else ++ fprintf(stderr, "%s: ", __progname); ++ if (file) ++ fprintf(stderr, "%s:%u: ", file, line); ++ vfprintf(stderr, fmt, ap); ++ if (e) ++ fprintf(stderr, ": %s", strerror(e)); ++ putc('\n', stderr); ++ fflush(stderr); ++ error_message_count++; ++ if (status) ++ exit(status); ++} ++ ++void error(int status, int e, const char *fmt, ...) ++{ ++ va_list ap; ++ va_start(ap,fmt); ++ eprint(status, e, 0, 0, fmt, ap); ++ va_end(ap); ++} ++ ++void error_at_line(int status, int e, const char *file, unsigned int line, const char *fmt, ...) ++{ ++ va_list ap; ++ va_start(ap,fmt); ++ eprint(status, e, file, line, fmt, ap); ++ va_end(ap); ++} ++#endif /* __GLIBC__ */ ++ + int main(int argc, char *argv[]) + { + size_t i, nfailed = 0, nignored = 0; |