From e2e6f6fe07049f33cb6348780fa975162752e421 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 12 Dec 2013 13:38:32 +0100 Subject: initial commit of Enea Linux 3.1 Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau --- meta/recipes-core/util-linux/util-linux/MCONFIG | 223 +++++++++++++++++++++ .../util-linux/avoid_unsupported_find_opts.patch | 38 ++++ .../util-linux/avoid_unsupported_grep_opts.patch | 57 ++++++ .../util-linux/avoid_unsupported_sleep_param.patch | 20 ++ .../util-linux/util-linux/configure-sbindir.patch | 23 +++ meta/recipes-core/util-linux/util-linux/defines.h | 10 + .../util-linux/display_testname_for_subtest.patch | 17 ++ .../util-linux/util-linux/fix-configure.patch | 20 ++ .../util-linux/util-linux/make_include | 17 ++ .../recipes-core/util-linux/util-linux/ptest.patch | 16 ++ .../util-linux/util-linux/remove-lscpu.patch | 37 ++++ .../util-linux/util-linux/remove_sigsetmark.patch | 35 ++++ meta/recipes-core/util-linux/util-linux/run-ptest | 10 + meta/recipes-core/util-linux/util-linux/swapargs.h | 3 + .../util-linux/uclibc-__progname-conflict.patch | 32 +++ .../util-linux/util-linux/uclibc-compile.patch | 15 ++ .../util-linux/util-linux/util-linux-native.patch | 210 +++++++++++++++++++ .../util-linux-ng-2.16-mount_lock_path.patch | 27 +++ .../util-linux-ng-replace-siginterrupt.patch | 27 +++ 19 files changed, 837 insertions(+) create mode 100644 meta/recipes-core/util-linux/util-linux/MCONFIG create mode 100644 meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch create mode 100644 meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch create mode 100644 meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch create mode 100644 meta/recipes-core/util-linux/util-linux/configure-sbindir.patch create mode 100644 meta/recipes-core/util-linux/util-linux/defines.h create mode 100644 meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch create mode 100644 meta/recipes-core/util-linux/util-linux/fix-configure.patch create mode 100644 meta/recipes-core/util-linux/util-linux/make_include create mode 100644 meta/recipes-core/util-linux/util-linux/ptest.patch create mode 100644 meta/recipes-core/util-linux/util-linux/remove-lscpu.patch create mode 100644 meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch create mode 100644 meta/recipes-core/util-linux/util-linux/run-ptest create mode 100644 meta/recipes-core/util-linux/util-linux/swapargs.h create mode 100644 meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch create mode 100644 meta/recipes-core/util-linux/util-linux/uclibc-compile.patch create mode 100644 meta/recipes-core/util-linux/util-linux/util-linux-native.patch create mode 100644 meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch create mode 100644 meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch (limited to 'meta/recipes-core/util-linux/util-linux') diff --git a/meta/recipes-core/util-linux/util-linux/MCONFIG b/meta/recipes-core/util-linux/util-linux/MCONFIG new file mode 100644 index 0000000000..3fea2c02d7 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/MCONFIG @@ -0,0 +1,223 @@ +# MCONFIG -- Configuration stuff for util-linux +# Created: Sat Feb 4 15:50:30 1995 +# Copyright 1995 Rickard E. Faith (faith@cs.unc.edu) + +# For a user-mode install, make (at least) three changes: +# - remove the `-o root' part in INSTALLSUID +# - set USE_TTY_GROUP=no +# - define DESTDIR + +# Select for ARCH one of intel, alpha, sparc, arm, m68k, mips +# Select for CPU i386 if the binaries must be able to run on an intel 386 +# (by default i486 code is generated, see below) +CPU=$(shell uname -m) +ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') + +# If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp +# will use PAM for authentication. Additionally, passwd will not be +# installed as it is not PAM aware. +HAVE_PAM=no + +# If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd, +# and vipw will not be built or installed from the login-utils +# subdirectory. +HAVE_SHADOW=yes + +# If HAVE_PASSWD is set to "yes", then passwd will not be built or +# installed from the login-utils subdirectory (but login, chfn, chsh, +# newgrp, and vipw *will* be installed). +HAVE_PASSWD=no + +# If you use chfn and chsh from this package, REQUIRE_PASSWORD will require +# non-root users to enter the account password before updating /etc/passwd. +REQUIRE_PASSWORD=yes +#REQUIRE_PASSWORD=no + +# If you use chsh from this package, ONLY_LISTED_SHELLS will require that +# the selected shell be listed in /etc/shells -- otherwise only a warning is +# printed. This prevents someone from setting their shell to /bin/false. +ONLY_LISTED_SHELLS=yes +#ONLY_LISTED_SHELLS=no + + +# If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not +# be built or installed from the login-utils subdirectory. (The shutdown +# and halt that come with the SysVinit package should be used with the init +# found in that package.) +HAVE_SYSVINIT=no + +# If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will +# not be built or installed from the login-utils subdirectory. (The +# shutdown and init from the SysVinit package do not depend on the last, +# mesg, and wall from that package.) +HAVE_SYSVINIT_UTILS=no + +# If HAVE_WRITE is set to "yes", then write will not be built or +# installed from the misc-utils subdirectory. +# (There is a network aware write in netwrite from NetKit 0.16 or later.) +HAVE_WRITE=no + +# If HAVE_GETTY is set to "yes", then agetty will not be built or +# installed from the login-utils subdirectory. Note that agetty can +# co-exist with other gettys, so this option should never be used. +HAVE_GETTY=no + +# If USE_TTY_GROUP is set to "yes", then wall and write will be installed +# setgid to the "tty" group, and mesg will only set the group write bit. +# Note that this is only useful if login/xterm/etc. change the group of the +# user's tty to "tty" [The login in util-linux does this correctly, and +# xterm will do it correctly if X is compiled with USE_TTY_GROUP set +# properly.] +USE_TTY_GROUP=no + +# If HAVE_KILL is set to "yes", then kill will not be built or +# installed from the misc-utils subdirectory. +# (There is also a kill in the procps package.) +HAVE_KILL=no + +# If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN +# to the current user, allowing her to make a screendump and do other +# nifty things on the console, but also allowing him to keep an open +# file descriptor after logging out to trick the next user. +ALLOW_VCS_USE=yes + +# If HAVE_RESET is set to "yes", then reset won't be installed. The version +# of reset that comes with the ncurses package is less aggressive. +HAVE_RESET=yes + +# If HAVE_SLN is set to "yes", then sln won't be installed +# (but the man page sln.8 will be installed anyway). +# sln also comes with libc and glibc. +HAVE_SLN=no + +# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed. +HAVE_FDUTILS=no + +# If SILENT_PG is set to "yes", then pg will not ring the bell +# when an invalid key is pressed +SILENT_PG=no + +# If configure decides that Native Language Support (NLS) is available, +# it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set +# DISABLE_NLS to "yes". +DISABLE_NLS=no + +# Different optimizations for different cpus. +# gcc 3.0 likes options -mcpu=i486 instead of -m486 +ifeq "$(ARCH)" "intel" + ifeq "$(HAVE_OLD_GCC)" "yes" + CPUHEAD=-m + else + CPUHEAD=-mcpu=i + endif + ifeq "$(CPU)" "i386" + CPUTAIL=386 + else + CPUTAIL=486 + endif + CPUOPT= $(CPUHEAD)$(CPUTAIL) + OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer +else + ifeq "$(ARCH)" "arm" + OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer + else + OPT= -O2 -fomit-frame-pointer + endif +endif + +WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes + +LIB=../lib + +ERR_O=$(LIB)/err.o + +# Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk) +# (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.) +# HAVE_SLANG=yes +# There is a subdirectory /usr/include/slang containing slcurses.h +# SLANGFLAGS=-I/usr/include/slang +# No such subdirectory - slcurses.h lives in /usr/include +# (no extra definition required). +LIBSLANG=-lslang + +# +# Paths used for compilation (not all are actually used, see CFLAGS below) +# +DEV_DIR= /dev +ETC_DIR= /etc +SBIN_DIR= /sbin +USRSBIN_DIR= /usr/sbin +USRLIB_DIR= /usr/lib +USRBIN_DIR= /usr/bin +USRGAMES_DIR= /usr/games +USRSHAREMISC_DIR=/usr/share/misc +LOCALE_DIR= /usr/share/locale +BIN_DIR= /bin +VAR_PATH= /var +LOG_DIR= /var/log +MAN_DIR= /usr/share/man +INFO_DIR= /usr/share/info + +# +# Paths used for install +# +DEVDIR= $(DESTDIR)$(DEV_DIR) +ETCDIR= $(DESTDIR)$(ETC_DIR) +SBINDIR= $(DESTDIR)$(SBIN_DIR) +USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR) +USRLIBDIR= $(DESTDIR)$(USRLIB_DIR) +USRBINDIR= $(DESTDIR)$(USRBIN_DIR) +USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR) +USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR) +LOCALEDIR= $(DESTDIR)$(LOCALE_DIR) +BINDIR= $(DESTDIR)$(BIN_DIR) +VARPATH= $(DESTDIR)$(VAR_PATH) +LOGDIR= $(DESTDIR)$(LOG_DIR) +MANDIR= $(DESTDIR)$(MAN_DIR) +MAN1DIR= $(MANDIR)/man1 +MAN3DIR= $(MANDIR)/man3 +MAN5DIR= $(MANDIR)/man5 +MAN6DIR= $(MANDIR)/man6 +MAN8DIR= $(MANDIR)/man8 +INFODIR= $(DESTDIR)$(INFO_DIR) + +# Directory for shutdown, halt, reboot, etc. +SHUTDOWNDIR= $(SBINDIR) + +# Modes +DIRMODE= 755 +BINMODE= 755 +MANMODE= 644 +DATMODE= 644 +INFOMODE= 644 +SUIDMODE= 4755 + +CHMOD= chmod +INSTALL= install +INSTALLDIR= $(INSTALL) -d -m $(DIRMODE) +INSTALLBIN= $(INSTALL) -m $(BINMODE) +INSTALLMAN= $(INSTALL) -m $(MANMODE) +INSTALLDAT= $(INSTALL) -m $(DATMODE) +INSTALLSUID= $(INSTALL) -m $(SUIDMODE) + +ifeq "$(DISABLE_NLS)" "yes" +NLSFLAGS = -DDISABLE_NLS +endif + +CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \ + $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \ + -D_FILE_OFFSET_BITS=64 \ + -DSBINDIR=\"$(SBIN_DIR)\" \ + -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \ + -DLOGDIR=\"$(LOG_DIR)\" \ + -DVARPATH=\"$(VAR_PATH)\" \ + -DLOCALEDIR=\"$(LOCALE_DIR)\" \ + $(CFLAGS) + + +%.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ + +%: %.cc + $(CXX) $(CFLAGS) $< -o $@ + diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch new file mode 100644 index 0000000000..13dc7ddaa1 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch @@ -0,0 +1,38 @@ +Avoid unsupported find options + +Signed-off-by: Tudor Florea +Upstream-Status: Pending + +diff -ruN a/tests/run.sh b/tests/run.sh +--- a/tests/run.sh 2013-08-26 23:48:48.868279097 +0200 ++++ b/tests/run.sh 2013-08-27 00:14:35.646730004 +0200 +@@ -91,7 +91,7 @@ + # selected tests only + for s in $SUBTESTS; do + if [ -d "$top_srcdir/tests/ts/$s" ]; then +- co=$(find $top_srcdir/tests/ts/$s -type f -perm /a+x -regex ".*/[^\.~]*" | sort) ++ co=$(find $top_srcdir/tests/ts/$s -type f -perm -111 -regex ".*/[^\.~]*" | sort) + comps="$comps $co" + else + echo "Unknown test component '$s'" +@@ -104,7 +104,7 @@ + exit 1 + fi + +- comps=$(find $top_srcdir/tests/ts/ -type f -perm /a+x -regex ".*/[^\.~]*" | sort) ++ comps=$(find $top_srcdir/tests/ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort) + fi + + +diff -ruN a/tests/ts/build-sys/config b/tests/ts/build-sys/config +--- a/tests/ts/build-sys/config 2013-08-26 23:50:26.800131581 +0200 ++++ b/tests/ts/build-sys/config 2013-08-27 00:10:02.806302850 +0200 +@@ -32,7 +32,7 @@ + ./configure $opts &> /dev/null + make -j &> /dev/null + +- bins=$(find . -type f -perm /a+x | sort) ++ bins=$(find . -type f -perm -111 | sort) + for b in $bins; do + libs=$(readelf --dynamic $b 2> /dev/null | \ + awk '/NEEDED/ { print $5 }' | \ diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch new file mode 100644 index 0000000000..a0d5efad0f --- /dev/null +++ b/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 +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/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch new file mode 100644 index 0000000000..3a6206704a --- /dev/null +++ b/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 +Upstream-Status: Pending + +diff -ruN a/simple b/simple +--- a/tests/ts/tailf/simple 2013-09-04 11:34:49.971817130 +0200 ++++ b/tests/ts/tailf/simple 2013-09-04 11:34:37.876325128 +0200 +@@ -25,9 +25,9 @@ + + $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 & + +-sleep 0.1 ++sleep 1 + echo {0..9} >> $INPUT +-sleep 0.1 ++sleep 1 + + rm -f $INPUT + diff --git a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch new file mode 100644 index 0000000000..a5b1ff12e5 --- /dev/null +++ b/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 +Signed-off-by: Saul Wold +Upstream-Status: Pending + +diff -ruN a/functions.sh b/functions.sh +--- a/tests/functions.sh 2013-09-04 12:41:07.625488953 +0200 ++++ b/tests/functions.sh 2013-09-04 17:33:02.402802957 +0200 +@@ -209,7 +209,7 @@ + [ $TS_NSUBTESTS -eq 0 ] && echo + TS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 )) + +- printf "%16s: %-27s ..." "" "$TS_SUBNAME" ++ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME" + } + + function ts_init { diff --git a/meta/recipes-core/util-linux/util-linux/fix-configure.patch b/meta/recipes-core/util-linux/util-linux/fix-configure.patch new file mode 100644 index 0000000000..0ea23183ca --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/fix-configure.patch @@ -0,0 +1,20 @@ +The userlib_execdir was not getting set correctly, the quoting +was wrong as these quoted items were not getting expanded correctly. + +Upstream-Status: Pending + +Signed-off-by: Saul Wold + +Index: util-linux-2.22.1/configure.ac +=================================================================== +--- util-linux-2.22.1.orig/configure.ac ++++ util-linux-2.22.1/configure.ac +@@ -79,7 +79,7 @@ fi + AC_SUBST([usrsbin_execdir]) + + case $libdir in +- '${exec_prefix}/'* | '${prefix}/'* | /usr/*) ++ ${exec_prefix}/* | ${prefix}/* | /usr/*) + usrlib_execdir=$libdir ;; + *) + usrlib_execdir='${exec_prefix}'$libdir ;; diff --git a/meta/recipes-core/util-linux/util-linux/make_include b/meta/recipes-core/util-linux/util-linux/make_include new file mode 100644 index 0000000000..e6abcd91f7 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/make_include @@ -0,0 +1,17 @@ +VERSION=2.12 +CC=gcc +CFLAGS= +LDFLAGS= +HAVE_OLD_GCC=yes +HAVE_RAW_H=yes +HAVE_NCURSES=yes +CURSESFLAGS=-DNCH=1 +LIBCURSES=-lncurses +HAVE_TERMCAP=no +NEED_LIBCRYPT=yes +FOREIGN = --foreign-user +HAVE_XGETTEXT=yes +HAVE_OPENPTY=yes +HAVE_PIVOT_ROOT=yes +HAVE_GOOD_RPC=yes +HAVE_ZLIB=yes diff --git a/meta/recipes-core/util-linux/util-linux/ptest.patch b/meta/recipes-core/util-linux/util-linux/ptest.patch new file mode 100644 index 0000000000..e9adc90a21 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/ptest.patch @@ -0,0 +1,16 @@ +Define TESTS variable + +Signed-off-by: Tudor Florea +Upstream-Status: Pending + +diff -ruN a/Makefile.am b/Makefile.am +--- a/Makefile.am 2013-08-26 16:29:42.151429221 +0200 ++++ b/Makefile.am 2013-08-26 17:52:31.013898120 +0200 +@@ -43,7 +43,7 @@ + dist_usrbin_exec_SCRIPTS = + systemdsystemunit_DATA = + check_PROGRAMS = +-TESTS = ++TESTS = $(check_PROGRAMS) + + PATHFILES = diff --git a/meta/recipes-core/util-linux/util-linux/remove-lscpu.patch b/meta/recipes-core/util-linux/util-linux/remove-lscpu.patch new file mode 100644 index 0000000000..ddf14a50d1 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/remove-lscpu.patch @@ -0,0 +1,37 @@ +Upstream-Status: Inappropriate [distribution] + +Take out lscpu stuff from the code + +Signed-off-by: Saul Wold + +Index: util-linux-2.22.1/configure.ac +=================================================================== +--- util-linux-2.22.1.orig/configure.ac ++++ util-linux-2.22.1/configure.ac +@@ -937,7 +937,7 @@ UL_REQUIRES_BUILD([lsblk], [libmount]) + AM_CONDITIONAL(BUILD_LSBLK, test "x$build_lsblk" = xyes) + + +-UL_BUILD_INIT([lscpu], [check]) ++UL_BUILD_INIT([lscpu], [no]) + UL_REQUIRES_LINUX([lscpu]) + UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type]) + AM_CONDITIONAL(BUILD_LSCPU, test "x$build_lscpu" = xyes) +Index: util-linux-2.22.1/sys-utils/Makemodule.am +=================================================================== +--- util-linux-2.22.1.orig/sys-utils/Makemodule.am ++++ util-linux-2.22.1/sys-utils/Makemodule.am +@@ -224,13 +224,6 @@ swapoff_CFLAGS = $(AM_CFLAGS) -I$(ul_lib + swapoff_LDADD = $(LDADD) libmount.la + endif + +-if BUILD_LSCPU +-usrbin_exec_PROGRAMS += lscpu +-lscpu_SOURCES = sys-utils/lscpu.c +-lscpu_LDADD = $(LDADD) libcommon.la +-dist_man_MANS += sys-utils/lscpu.1 +-endif +- + if BUILD_CHCPU + sbin_PROGRAMS += chcpu + chcpu_SOURCES = sys-utils/chcpu.c diff --git a/meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch b/meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch new file mode 100644 index 0000000000..02e4d16ff7 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch @@ -0,0 +1,35 @@ +simpleinit: remove deprecated sigsetmask() + +The sigsetmask() is deprecated in favor of sigprocmask(). + +This is not needed upstream since simpleinit is removed from +util-linux-ng master + +Signed-off-by: Khem Raj + +Upstream-Status: Inappropriate + +Index: util-linux-2.19.1/simpleinit/shutdown.c +=================================================================== +--- util-linux-2.19.1.orig/simpleinit/shutdown.c 2011-03-04 03:47:47.000000000 -0800 ++++ util-linux-2.19.1/simpleinit/shutdown.c 2011-07-06 08:43:39.183849752 -0700 +@@ -145,7 +145,7 @@ + { + int c, i, fd; + char *ptr; +- ++ sigset_t sigmask; + i = getdtablesize (); + for (fd = 3; fd < i; fd++) close (fd); + if (getpid () == 1) +@@ -153,7 +153,9 @@ + for (fd = 0; fd < 3; fd++) close (fd); + while (1) wait (NULL); /* Grim reaper never stops */ + } +- sigsetmask (0); /* simpleinit(8) blocks all signals: undo for ALRM */ ++ /* simpleinit(8) blocks all signals: undo for ALRM */ ++ sigemptyset(&sigmask); ++ sigprocmask (SIG_SETMASK, &sigmask, NULL); + for (i = 1; i < NSIG; i++) signal (i, SIG_DFL); + + setlocale(LC_ALL, ""); diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest new file mode 100644 index 0000000000..b04f14a835 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +cd tests || exit 1 +sh ./run.sh 2>&1 | { + sed '{ + s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ + s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ + s/^\(.*\):\(.*\) \.\.\. IGNORE \(.*\)$/SKIP: \1:\2 \3/ + }' +} diff --git a/meta/recipes-core/util-linux/util-linux/swapargs.h b/meta/recipes-core/util-linux/util-linux/swapargs.h new file mode 100644 index 0000000000..e960eef05f --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/swapargs.h @@ -0,0 +1,3 @@ +#define SWAPON_HAS_TWO_ARGS +#include +#include diff --git a/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch b/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch new file mode 100644 index 0000000000..5031a7313e --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch @@ -0,0 +1,32 @@ +configure should include errno.h instead of argp.h when +checking for presence of program_invocation_short_name +uclibc defines this to be const char* unlike util-linux-ng +which defines this to be char* so this error goes unnoticed +on glibc/eglibc systems. + +here is the error it fixes + +in file included from mountP.h:14:0, + from cache.c:29: +/home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname' +../../../include/c.h:118:14: note: previous declaration of '__progname' was here +make[3]: *** [cache.lo] Error 1 + + +Signed-off-by: Khem Raj +Signed-off-by: Jonathan Liu + +Upstream-Status: Pending +Index: util-linux-2.22.1/configure.ac +=================================================================== +--- util-linux-2.22.1.orig/configure.ac ++++ util-linux-2.22.1/configure.ac +@@ -372,7 +372,7 @@ esac + + AC_MSG_CHECKING([whether program_invocation_short_name is defined]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #include ++ #include + ]], [[ + program_invocation_short_name = "test"; + ]])], [ diff --git a/meta/recipes-core/util-linux/util-linux/uclibc-compile.patch b/meta/recipes-core/util-linux/util-linux/uclibc-compile.patch new file mode 100644 index 0000000000..75774d8200 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/uclibc-compile.patch @@ -0,0 +1,15 @@ +Upstream-Status: Inappropriate [embedded specific] + +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/recipes-core/util-linux/util-linux/util-linux-native.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch new file mode 100644 index 0000000000..e8fcd98c64 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch @@ -0,0 +1,210 @@ +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 + +diff -ur util-linux-2.23/configure.ac /home/lmhatle/util-linux-2.23-fixed/configure.ac +--- util-linux-2.23/configure.ac 2013-05-29 14:44:35.147853585 -0500 ++++ /home/lmhatle/util-linux-2.23-fixed/configure.ac 2013-05-30 14:56:15.050799650 -0500 +@@ -323,6 +323,7 @@ + llseek \ + lseek64 \ + mempcpy \ ++ mkostemp \ + nanosleep \ + personality \ + posix_fadvise \ +diff -ur util-linux-2.23/include/c.h /home/lmhatle/util-linux-2.23-fixed/include/c.h +--- util-linux-2.23/include/c.h 2013-04-12 04:25:46.852156874 -0500 ++++ /home/lmhatle/util-linux-2.23-fixed/include/c.h 2013-05-30 14:56:11.310799488 -0500 +@@ -236,6 +236,13 @@ + #endif + + /* ++ * mkostemp replacement ++ */ ++#ifndef HAVE_MKOSTEMP ++#define mkostemp(template, flags) mkstemp(template) ++#endif ++ ++/* + * MAXHOSTNAMELEN replacement + */ + static inline size_t get_hostname_max(void) +diff -ur util-linux-2.23/lib/randutils.c /home/lmhatle/util-linux-2.23-fixed/lib/randutils.c +--- util-linux-2.23/lib/randutils.c 2013-04-12 04:25:46.855156901 -0500 ++++ /home/lmhatle/util-linux-2.23-fixed/lib/randutils.c 2013-05-30 14:55:26.622799644 -0500 +@@ -16,6 +16,7 @@ + #include + + #include "randutils.h" ++#include "c.h" + + #ifdef HAVE_TLS + #define THREAD_LOCAL static __thread +diff -ur util-linux-2.23/lib/wholedisk.c /home/lmhatle/util-linux-2.23-fixed/lib/wholedisk.c +--- util-linux-2.23/lib/wholedisk.c 2013-04-12 04:25:46.855156901 -0500 ++++ /home/lmhatle/util-linux-2.23-fixed/lib/wholedisk.c 2013-05-30 14:55:31.182799350 -0500 +@@ -10,6 +10,7 @@ + + #include "blkdev.h" + #include "wholedisk.h" ++#include "c.h" + + int is_whole_disk_fd(int fd, const char *name) + { +diff -ur util-linux-2.23/fdisks/fdisksunlabel.c /home/lmhatle/util-linux-2.23-fixed/fdisks/fdisksunlabel.c +--- util-linux-2.23/fdisks/fdisksunlabel.c 2013-04-23 09:14:19.229015244 -0500 ++++ /home/lmhatle/util-linux-2.23-fixed/fdisks/fdisksunlabel.c 2013-05-30 14:54:55.978799735 -0500 +@@ -383,10 +383,10 @@ + } + } + +-static int verify_sun_cmp(int *a, int *b, void *data) +-{ +- unsigned int *verify_sun_starts = (unsigned int *) data; ++static unsigned int *verify_sun_starts; + ++static int verify_sun_cmp(int *a, int *b) ++{ + if (*a == -1) + return 1; + if (*b == -1) +@@ -401,7 +401,6 @@ + uint32_t starts[SUN_MAXPARTITIONS], lens[SUN_MAXPARTITIONS], start, stop; + uint32_t i,j,k,starto,endo; + int array[SUN_MAXPARTITIONS]; +- unsigned int *verify_sun_starts; + + assert(cxt); + assert(cxt->label); +@@ -442,16 +441,14 @@ + } + } + } +- + for (i = 0; i < SUN_MAXPARTITIONS; i++) { + if (lens[i]) + array[i] = i; + else + array[i] = -1; + } +- 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")); +@@ -468,6 +465,7 @@ + start = (starts[array[i]] + lens[array[i]]); + if (start < stop) + fdisk_warnx(cxt, _("Unused gap - sectors %d-%d"), start, stop); ++ + return 0; + } + +@@ -746,18 +744,12 @@ + } + } + +- + void fdisk_sun_set_alt_cyl(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 0, /* low */ +- be16_to_cpu(sunlabel->acyl), /* default */ +- 65535, /* high */ +- _("Number of alternate cylinders"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->acyl = cpu_to_be16(res); ++ sunlabel->acyl = ++ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->acyl), 65535, 0, ++ _("Number of alternate cylinders"))); + } + + void fdisk_sun_set_ncyl(struct fdisk_context *cxt, int cyl) +@@ -769,54 +761,33 @@ + void fdisk_sun_set_xcyl(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 0, /* low */ +- be16_to_cpu(sunlabel->apc), /* default */ +- cxt->geom.sectors, /* high */ +- _("Extra sectors per cylinder"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->apc = cpu_to_be16(res); ++ sunlabel->apc = ++ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->apc), cxt->geom.sectors, 0, ++ _("Extra sectors per cylinder"))); + } + + void fdisk_sun_set_ilfact(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 1, /* low */ +- be16_to_cpu(sunlabel->intrlv), /* default */ +- 32, /* high */ +- _("Interleave factor"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->intrlv = cpu_to_be16(res); ++ sunlabel->intrlv = ++ cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->intrlv), 32, 0, ++ _("Interleave factor"))); + } + + void fdisk_sun_set_rspeed(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 1, /* low */ +- be16_to_cpu(sunlabel->rpm), /* default */ +- USHRT_MAX, /* high */ +- _("Rotation speed (rpm)"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->rpm = cpu_to_be16(res); +- ++ sunlabel->rpm = ++ cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->rpm), 100000, 0, ++ _("Rotation speed (rpm)"))); + } + + void fdisk_sun_set_pcylcount(struct fdisk_context *cxt) + { + struct sun_disklabel *sunlabel = self_disklabel(cxt); +- uintmax_t res; +- int rc = fdisk_ask_number(cxt, 0, /* low */ +- be16_to_cpu(sunlabel->pcyl), /* default */ +- USHRT_MAX, /* high */ +- _("Number of physical cylinders"), /* query */ +- &res); /* result */ +- if (!rc) +- sunlabel->pcyl = cpu_to_be16(res); ++ sunlabel->pcyl = ++ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->pcyl), 65535, 0, ++ _("Number of physical cylinders"))); + } + + static int sun_write_disklabel(struct fdisk_context *cxt) diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch new file mode 100644 index 0000000000..5773d7ea1b --- /dev/null +++ b/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 + +--- 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/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch new file mode 100644 index 0000000000..f131b763ca --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch @@ -0,0 +1,27 @@ +Upstream-Status: Pending + +Index: util-linux-2.22.1/login-utils/login.c +=================================================================== +--- util-linux-2.22.1.orig/login-utils/login.c ++++ util-linux-2.22.1/login-utils/login.c +@@ -1239,6 +1239,8 @@ int main(int argc, char **argv) + char *buff; + int childArgc = 0; + int retcode; ++ struct sigaction act; ++ + + char *pwdbuf = NULL; + struct passwd *pwd = NULL, _pwd; +@@ -1252,7 +1254,10 @@ int main(int argc, char **argv) + timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT); + + 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(timeout); + signal(SIGQUIT, SIG_IGN); + signal(SIGINT, SIG_IGN); -- cgit v1.2.3-54-g00ecf