summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux')
-rw-r--r--meta/recipes-core/util-linux/util-linux/MCONFIG223
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch38
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch57
-rw-r--r--meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch20
-rw-r--r--meta/recipes-core/util-linux/util-linux/configure-sbindir.patch23
-rw-r--r--meta/recipes-core/util-linux/util-linux/defines.h10
-rw-r--r--meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch17
-rw-r--r--meta/recipes-core/util-linux/util-linux/fix-configure.patch20
-rw-r--r--meta/recipes-core/util-linux/util-linux/make_include17
-rw-r--r--meta/recipes-core/util-linux/util-linux/ptest.patch16
-rw-r--r--meta/recipes-core/util-linux/util-linux/remove-lscpu.patch37
-rw-r--r--meta/recipes-core/util-linux/util-linux/remove_sigsetmark.patch35
-rw-r--r--meta/recipes-core/util-linux/util-linux/run-ptest10
-rw-r--r--meta/recipes-core/util-linux/util-linux/swapargs.h3
-rw-r--r--meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch32
-rw-r--r--meta/recipes-core/util-linux/util-linux/uclibc-compile.patch15
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-native.patch210
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch27
-rw-r--r--meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch27
19 files changed, 837 insertions, 0 deletions
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 @@
1# MCONFIG -- Configuration stuff for util-linux
2# Created: Sat Feb 4 15:50:30 1995
3# Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
4
5# For a user-mode install, make (at least) three changes:
6# - remove the `-o root' part in INSTALLSUID
7# - set USE_TTY_GROUP=no
8# - define DESTDIR
9
10# Select for ARCH one of intel, alpha, sparc, arm, m68k, mips
11# Select for CPU i386 if the binaries must be able to run on an intel 386
12# (by default i486 code is generated, see below)
13CPU=$(shell uname -m)
14ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/')
15
16# If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
17# will use PAM for authentication. Additionally, passwd will not be
18# installed as it is not PAM aware.
19HAVE_PAM=no
20
21# If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
22# and vipw will not be built or installed from the login-utils
23# subdirectory.
24HAVE_SHADOW=yes
25
26# If HAVE_PASSWD is set to "yes", then passwd will not be built or
27# installed from the login-utils subdirectory (but login, chfn, chsh,
28# newgrp, and vipw *will* be installed).
29HAVE_PASSWD=no
30
31# If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
32# non-root users to enter the account password before updating /etc/passwd.
33REQUIRE_PASSWORD=yes
34#REQUIRE_PASSWORD=no
35
36# If you use chsh from this package, ONLY_LISTED_SHELLS will require that
37# the selected shell be listed in /etc/shells -- otherwise only a warning is
38# printed. This prevents someone from setting their shell to /bin/false.
39ONLY_LISTED_SHELLS=yes
40#ONLY_LISTED_SHELLS=no
41
42
43# If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not
44# be built or installed from the login-utils subdirectory. (The shutdown
45# and halt that come with the SysVinit package should be used with the init
46# found in that package.)
47HAVE_SYSVINIT=no
48
49# If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will
50# not be built or installed from the login-utils subdirectory. (The
51# shutdown and init from the SysVinit package do not depend on the last,
52# mesg, and wall from that package.)
53HAVE_SYSVINIT_UTILS=no
54
55# If HAVE_WRITE is set to "yes", then write will not be built or
56# installed from the misc-utils subdirectory.
57# (There is a network aware write in netwrite from NetKit 0.16 or later.)
58HAVE_WRITE=no
59
60# If HAVE_GETTY is set to "yes", then agetty will not be built or
61# installed from the login-utils subdirectory. Note that agetty can
62# co-exist with other gettys, so this option should never be used.
63HAVE_GETTY=no
64
65# If USE_TTY_GROUP is set to "yes", then wall and write will be installed
66# setgid to the "tty" group, and mesg will only set the group write bit.
67# Note that this is only useful if login/xterm/etc. change the group of the
68# user's tty to "tty" [The login in util-linux does this correctly, and
69# xterm will do it correctly if X is compiled with USE_TTY_GROUP set
70# properly.]
71USE_TTY_GROUP=no
72
73# If HAVE_KILL is set to "yes", then kill will not be built or
74# installed from the misc-utils subdirectory.
75# (There is also a kill in the procps package.)
76HAVE_KILL=no
77
78# If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN
79# to the current user, allowing her to make a screendump and do other
80# nifty things on the console, but also allowing him to keep an open
81# file descriptor after logging out to trick the next user.
82ALLOW_VCS_USE=yes
83
84# If HAVE_RESET is set to "yes", then reset won't be installed. The version
85# of reset that comes with the ncurses package is less aggressive.
86HAVE_RESET=yes
87
88# If HAVE_SLN is set to "yes", then sln won't be installed
89# (but the man page sln.8 will be installed anyway).
90# sln also comes with libc and glibc.
91HAVE_SLN=no
92
93# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed.
94HAVE_FDUTILS=no
95
96# If SILENT_PG is set to "yes", then pg will not ring the bell
97# when an invalid key is pressed
98SILENT_PG=no
99
100# If configure decides that Native Language Support (NLS) is available,
101# it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set
102# DISABLE_NLS to "yes".
103DISABLE_NLS=no
104
105# Different optimizations for different cpus.
106# gcc 3.0 likes options -mcpu=i486 instead of -m486
107ifeq "$(ARCH)" "intel"
108 ifeq "$(HAVE_OLD_GCC)" "yes"
109 CPUHEAD=-m
110 else
111 CPUHEAD=-mcpu=i
112 endif
113 ifeq "$(CPU)" "i386"
114 CPUTAIL=386
115 else
116 CPUTAIL=486
117 endif
118 CPUOPT= $(CPUHEAD)$(CPUTAIL)
119 OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer
120else
121 ifeq "$(ARCH)" "arm"
122 OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer
123 else
124 OPT= -O2 -fomit-frame-pointer
125 endif
126endif
127
128WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
129
130LIB=../lib
131
132ERR_O=$(LIB)/err.o
133
134# Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk)
135# (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.)
136# HAVE_SLANG=yes
137# There is a subdirectory /usr/include/slang containing slcurses.h
138# SLANGFLAGS=-I/usr/include/slang
139# No such subdirectory - slcurses.h lives in /usr/include
140# (no extra definition required).
141LIBSLANG=-lslang
142
143#
144# Paths used for compilation (not all are actually used, see CFLAGS below)
145#
146DEV_DIR= /dev
147ETC_DIR= /etc
148SBIN_DIR= /sbin
149USRSBIN_DIR= /usr/sbin
150USRLIB_DIR= /usr/lib
151USRBIN_DIR= /usr/bin
152USRGAMES_DIR= /usr/games
153USRSHAREMISC_DIR=/usr/share/misc
154LOCALE_DIR= /usr/share/locale
155BIN_DIR= /bin
156VAR_PATH= /var
157LOG_DIR= /var/log
158MAN_DIR= /usr/share/man
159INFO_DIR= /usr/share/info
160
161#
162# Paths used for install
163#
164DEVDIR= $(DESTDIR)$(DEV_DIR)
165ETCDIR= $(DESTDIR)$(ETC_DIR)
166SBINDIR= $(DESTDIR)$(SBIN_DIR)
167USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR)
168USRLIBDIR= $(DESTDIR)$(USRLIB_DIR)
169USRBINDIR= $(DESTDIR)$(USRBIN_DIR)
170USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR)
171USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR)
172LOCALEDIR= $(DESTDIR)$(LOCALE_DIR)
173BINDIR= $(DESTDIR)$(BIN_DIR)
174VARPATH= $(DESTDIR)$(VAR_PATH)
175LOGDIR= $(DESTDIR)$(LOG_DIR)
176MANDIR= $(DESTDIR)$(MAN_DIR)
177MAN1DIR= $(MANDIR)/man1
178MAN3DIR= $(MANDIR)/man3
179MAN5DIR= $(MANDIR)/man5
180MAN6DIR= $(MANDIR)/man6
181MAN8DIR= $(MANDIR)/man8
182INFODIR= $(DESTDIR)$(INFO_DIR)
183
184# Directory for shutdown, halt, reboot, etc.
185SHUTDOWNDIR= $(SBINDIR)
186
187# Modes
188DIRMODE= 755
189BINMODE= 755
190MANMODE= 644
191DATMODE= 644
192INFOMODE= 644
193SUIDMODE= 4755
194
195CHMOD= chmod
196INSTALL= install
197INSTALLDIR= $(INSTALL) -d -m $(DIRMODE)
198INSTALLBIN= $(INSTALL) -m $(BINMODE)
199INSTALLMAN= $(INSTALL) -m $(MANMODE)
200INSTALLDAT= $(INSTALL) -m $(DATMODE)
201INSTALLSUID= $(INSTALL) -m $(SUIDMODE)
202
203ifeq "$(DISABLE_NLS)" "yes"
204NLSFLAGS = -DDISABLE_NLS
205endif
206
207CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \
208 $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \
209 -D_FILE_OFFSET_BITS=64 \
210 -DSBINDIR=\"$(SBIN_DIR)\" \
211 -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \
212 -DLOGDIR=\"$(LOG_DIR)\" \
213 -DVARPATH=\"$(VAR_PATH)\" \
214 -DLOCALEDIR=\"$(LOCALE_DIR)\" \
215 $(CFLAGS)
216
217
218%.o: %.c
219 $(CC) -c $(CFLAGS) $< -o $@
220
221%: %.cc
222 $(CXX) $(CFLAGS) $< -o $@
223
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 @@
1Avoid unsupported find options
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/tests/run.sh b/tests/run.sh
7--- a/tests/run.sh 2013-08-26 23:48:48.868279097 +0200
8+++ b/tests/run.sh 2013-08-27 00:14:35.646730004 +0200
9@@ -91,7 +91,7 @@
10 # selected tests only
11 for s in $SUBTESTS; do
12 if [ -d "$top_srcdir/tests/ts/$s" ]; then
13- co=$(find $top_srcdir/tests/ts/$s -type f -perm /a+x -regex ".*/[^\.~]*" | sort)
14+ co=$(find $top_srcdir/tests/ts/$s -type f -perm -111 -regex ".*/[^\.~]*" | sort)
15 comps="$comps $co"
16 else
17 echo "Unknown test component '$s'"
18@@ -104,7 +104,7 @@
19 exit 1
20 fi
21
22- comps=$(find $top_srcdir/tests/ts/ -type f -perm /a+x -regex ".*/[^\.~]*" | sort)
23+ comps=$(find $top_srcdir/tests/ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
24 fi
25
26
27diff -ruN a/tests/ts/build-sys/config b/tests/ts/build-sys/config
28--- a/tests/ts/build-sys/config 2013-08-26 23:50:26.800131581 +0200
29+++ b/tests/ts/build-sys/config 2013-08-27 00:10:02.806302850 +0200
30@@ -32,7 +32,7 @@
31 ./configure $opts &> /dev/null
32 make -j &> /dev/null
33
34- bins=$(find . -type f -perm /a+x | sort)
35+ bins=$(find . -type f -perm -111 | sort)
36 for b in $bins; do
37 libs=$(readelf --dynamic $b 2> /dev/null | \
38 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 @@
1Avoid unsupported grep options
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/ts/ipcs/headers b/ts/ipcs/headers
7--- a/tests/ts/ipcs/headers 2013-09-04 11:03:36.118613250 +0200
8+++ b/teste/ts/ipcs/headers 2013-09-04 11:03:27.906958437 +0200
9@@ -22,35 +22,35 @@
10 ts_init "$*"
11
12 ts_log "test: shm headers"
13-$TS_CMD_IPCS -m -t | grep --after-context=1 "^---" >> $TS_OUTPUT
14-$TS_CMD_IPCS -m -p | grep --after-context=1 "^---" >> $TS_OUTPUT
15-$TS_CMD_IPCS -m -c | grep --after-context=1 "^---" >> $TS_OUTPUT
16+$TS_CMD_IPCS -m -t | grep -A 1 "^---" >> $TS_OUTPUT
17+$TS_CMD_IPCS -m -p | grep -A 1 "^---" >> $TS_OUTPUT
18+$TS_CMD_IPCS -m -c | grep -A 1 "^---" >> $TS_OUTPUT
19 $TS_CMD_IPCS -m -l | grep "^---" >> $TS_OUTPUT
20 $TS_CMD_IPCS -m -u | grep "^---" >> $TS_OUTPUT
21 echo >> $TS_OUTPUT
22
23 ts_log "test: mesg headers"
24-$TS_CMD_IPCS -q -t | grep --after-context=1 "^---" >> $TS_OUTPUT
25-$TS_CMD_IPCS -q -p | grep --after-context=1 "^---" >> $TS_OUTPUT
26-$TS_CMD_IPCS -q -c | grep --after-context=1 "^---" >> $TS_OUTPUT
27+$TS_CMD_IPCS -q -t | grep -A 1 "^---" >> $TS_OUTPUT
28+$TS_CMD_IPCS -q -p | grep -A 1 "^---" >> $TS_OUTPUT
29+$TS_CMD_IPCS -q -c | grep -A 1 "^---" >> $TS_OUTPUT
30 $TS_CMD_IPCS -q -l | grep "^---" >> $TS_OUTPUT
31 $TS_CMD_IPCS -q -u | grep "^---" >> $TS_OUTPUT
32 echo >> $TS_OUTPUT
33
34 ts_log "test: sem headers"
35-$TS_CMD_IPCS -s -t | grep --after-context=1 "^---" >> $TS_OUTPUT
36-$TS_CMD_IPCS -s -p | grep --after-context=1 "^---" >> $TS_OUTPUT
37-$TS_CMD_IPCS -s -c | grep --after-context=1 "^---" >> $TS_OUTPUT
38+$TS_CMD_IPCS -s -t | grep -A 1 "^---" >> $TS_OUTPUT
39+$TS_CMD_IPCS -s -p | grep -A 1 "^---" >> $TS_OUTPUT
40+$TS_CMD_IPCS -s -c | grep -A 1 "^---" >> $TS_OUTPUT
41 $TS_CMD_IPCS -s -l | grep "^---" >> $TS_OUTPUT
42 $TS_CMD_IPCS -s -u | grep "^---" >> $TS_OUTPUT
43 echo >> $TS_OUTPUT
44
45 ts_log "test: all headers"
46-$TS_CMD_IPCS -a | grep --after-context=1 "^---" >> $TS_OUTPUT
47+$TS_CMD_IPCS -a | grep -A 1 "^---" >> $TS_OUTPUT
48
49-$TS_CMD_IPCS -a -t | grep --after-context=1 "^---" >> $TS_OUTPUT
50-$TS_CMD_IPCS -a -p | grep --after-context=1 "^---" >> $TS_OUTPUT
51-$TS_CMD_IPCS -a -c | grep --after-context=1 "^---" >> $TS_OUTPUT
52+$TS_CMD_IPCS -a -t | grep -A 1 "^---" >> $TS_OUTPUT
53+$TS_CMD_IPCS -a -p | grep -A 1 "^---" >> $TS_OUTPUT
54+$TS_CMD_IPCS -a -c | grep -A 1 "^---" >> $TS_OUTPUT
55 $TS_CMD_IPCS -a -l | grep "^---" >> $TS_OUTPUT
56 $TS_CMD_IPCS -a -u | grep "^---" >> $TS_OUTPUT
57
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 @@
1Avoid unsupported sleep parameter
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/simple b/simple
7--- a/tests/ts/tailf/simple 2013-09-04 11:34:49.971817130 +0200
8+++ b/tests/ts/tailf/simple 2013-09-04 11:34:37.876325128 +0200
9@@ -25,9 +25,9 @@
10
11 $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 &
12
13-sleep 0.1
14+sleep 1
15 echo {0..9} >> $INPUT
16-sleep 0.1
17+sleep 1
18
19 rm -f $INPUT
20
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 @@
1util-linux: take ${sbindir} from the environment if it is set there
2fix the test, the [ ] syntax was getting eaten by autoconf
3
4Signed-off-by: Phil Blundell <pb@pbcl.net>
5Signed-off-by: Saul Wold <sgw@linux.intel.com
6Upstream-Status: Inappropriate [configuration]
7
8Index: util-linux-2.22.1/configure.ac
9===================================================================
10--- util-linux-2.22.1.orig/configure.ac
11+++ util-linux-2.22.1/configure.ac
12@@ -73,7 +73,10 @@ AC_SUBST([localstatedir])
13 usrbin_execdir='${exec_prefix}/bin'
14 AC_SUBST([usrbin_execdir])
15
16-usrsbin_execdir='${exec_prefix}/sbin'
17+if test -z "$usrsbin_execdir" ;
18+then
19+ usrsbin_execdir='${exec_prefix}/sbin'
20+fi
21 AC_SUBST([usrsbin_execdir])
22
23 case $libdir in
diff --git a/meta/recipes-core/util-linux/util-linux/defines.h b/meta/recipes-core/util-linux/util-linux/defines.h
new file mode 100644
index 0000000000..6ce6b86df5
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/defines.h
@@ -0,0 +1,10 @@
1#define UTIL_LINUX_VERSION "2.12"
2#define util_linux_version "util-linux-2.12"
3
4#define HAVE_blkpg_h
5#define HAVE_kd_h
6#define HAVE_locale_h
7#define HAVE_langinfo_h
8#define HAVE_sys_user_h
9#define HAVE_asm_types_h
10//#define NEED_tqueue_h
diff --git a/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
new file mode 100644
index 0000000000..64f02d570f
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
@@ -0,0 +1,17 @@
1Display testname for subtest
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/functions.sh b/functions.sh
7--- a/tests/functions.sh 2013-09-04 12:41:07.625488953 +0200
8+++ b/tests/functions.sh 2013-09-04 17:33:02.402802957 +0200
9@@ -209,7 +209,7 @@
10 [ $TS_NSUBTESTS -eq 0 ] && echo
11 TS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 ))
12
13- printf "%16s: %-27s ..." "" "$TS_SUBNAME"
14+ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME"
15 }
16
17 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 @@
1The userlib_execdir was not getting set correctly, the quoting
2was wrong as these quoted items were not getting expanded correctly.
3
4Upstream-Status: Pending
5
6Signed-off-by: Saul Wold <sgw@linux.intel.com>
7
8Index: util-linux-2.22.1/configure.ac
9===================================================================
10--- util-linux-2.22.1.orig/configure.ac
11+++ util-linux-2.22.1/configure.ac
12@@ -79,7 +79,7 @@ fi
13 AC_SUBST([usrsbin_execdir])
14
15 case $libdir in
16- '${exec_prefix}/'* | '${prefix}/'* | /usr/*)
17+ ${exec_prefix}/* | ${prefix}/* | /usr/*)
18 usrlib_execdir=$libdir ;;
19 *)
20 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 @@
1VERSION=2.12
2CC=gcc
3CFLAGS=
4LDFLAGS=
5HAVE_OLD_GCC=yes
6HAVE_RAW_H=yes
7HAVE_NCURSES=yes
8CURSESFLAGS=-DNCH=1
9LIBCURSES=-lncurses
10HAVE_TERMCAP=no
11NEED_LIBCRYPT=yes
12FOREIGN = --foreign-user
13HAVE_XGETTEXT=yes
14HAVE_OPENPTY=yes
15HAVE_PIVOT_ROOT=yes
16HAVE_GOOD_RPC=yes
17HAVE_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 @@
1Define TESTS variable
2
3Signed-off-by: Tudor Florea <tudor.florea@enea.com>
4Upstream-Status: Pending
5
6diff -ruN a/Makefile.am b/Makefile.am
7--- a/Makefile.am 2013-08-26 16:29:42.151429221 +0200
8+++ b/Makefile.am 2013-08-26 17:52:31.013898120 +0200
9@@ -43,7 +43,7 @@
10 dist_usrbin_exec_SCRIPTS =
11 systemdsystemunit_DATA =
12 check_PROGRAMS =
13-TESTS =
14+TESTS = $(check_PROGRAMS)
15
16 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 @@
1Upstream-Status: Inappropriate [distribution]
2
3Take out lscpu stuff from the code
4
5Signed-off-by: Saul Wold <sgw@linux.intel.com>
6
7Index: util-linux-2.22.1/configure.ac
8===================================================================
9--- util-linux-2.22.1.orig/configure.ac
10+++ util-linux-2.22.1/configure.ac
11@@ -937,7 +937,7 @@ UL_REQUIRES_BUILD([lsblk], [libmount])
12 AM_CONDITIONAL(BUILD_LSBLK, test "x$build_lsblk" = xyes)
13
14
15-UL_BUILD_INIT([lscpu], [check])
16+UL_BUILD_INIT([lscpu], [no])
17 UL_REQUIRES_LINUX([lscpu])
18 UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type])
19 AM_CONDITIONAL(BUILD_LSCPU, test "x$build_lscpu" = xyes)
20Index: util-linux-2.22.1/sys-utils/Makemodule.am
21===================================================================
22--- util-linux-2.22.1.orig/sys-utils/Makemodule.am
23+++ util-linux-2.22.1/sys-utils/Makemodule.am
24@@ -224,13 +224,6 @@ swapoff_CFLAGS = $(AM_CFLAGS) -I$(ul_lib
25 swapoff_LDADD = $(LDADD) libmount.la
26 endif
27
28-if BUILD_LSCPU
29-usrbin_exec_PROGRAMS += lscpu
30-lscpu_SOURCES = sys-utils/lscpu.c
31-lscpu_LDADD = $(LDADD) libcommon.la
32-dist_man_MANS += sys-utils/lscpu.1
33-endif
34-
35 if BUILD_CHCPU
36 sbin_PROGRAMS += chcpu
37 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 @@
1simpleinit: remove deprecated sigsetmask()
2
3The sigsetmask() is deprecated in favor of sigprocmask().
4
5This is not needed upstream since simpleinit is removed from
6util-linux-ng master
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10Upstream-Status: Inappropriate
11
12Index: util-linux-2.19.1/simpleinit/shutdown.c
13===================================================================
14--- util-linux-2.19.1.orig/simpleinit/shutdown.c 2011-03-04 03:47:47.000000000 -0800
15+++ util-linux-2.19.1/simpleinit/shutdown.c 2011-07-06 08:43:39.183849752 -0700
16@@ -145,7 +145,7 @@
17 {
18 int c, i, fd;
19 char *ptr;
20-
21+ sigset_t sigmask;
22 i = getdtablesize ();
23 for (fd = 3; fd < i; fd++) close (fd);
24 if (getpid () == 1)
25@@ -153,7 +153,9 @@
26 for (fd = 0; fd < 3; fd++) close (fd);
27 while (1) wait (NULL); /* Grim reaper never stops */
28 }
29- sigsetmask (0); /* simpleinit(8) blocks all signals: undo for ALRM */
30+ /* simpleinit(8) blocks all signals: undo for ALRM */
31+ sigemptyset(&sigmask);
32+ sigprocmask (SIG_SETMASK, &sigmask, NULL);
33 for (i = 1; i < NSIG; i++) signal (i, SIG_DFL);
34
35 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 @@
1#!/bin/sh
2
3cd tests || exit 1
4sh ./run.sh 2>&1 | {
5 sed '{
6 s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
7 s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
8 s/^\(.*\):\(.*\) \.\.\. IGNORE \(.*\)$/SKIP: \1:\2 \3/
9 }'
10}
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 @@
1#define SWAPON_HAS_TWO_ARGS
2#include <asm/page.h>
3#include <sys/swap.h>
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 @@
1configure should include errno.h instead of argp.h when
2checking for presence of program_invocation_short_name
3uclibc defines this to be const char* unlike util-linux-ng
4which defines this to be char* so this error goes unnoticed
5on glibc/eglibc systems.
6
7here is the error it fixes
8
9in file included from mountP.h:14:0,
10 from cache.c:29:
11/home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname'
12../../../include/c.h:118:14: note: previous declaration of '__progname' was here
13make[3]: *** [cache.lo] Error 1
14
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Signed-off-by: Jonathan Liu <net147@gmail.com>
18
19Upstream-Status: Pending
20Index: util-linux-2.22.1/configure.ac
21===================================================================
22--- util-linux-2.22.1.orig/configure.ac
23+++ util-linux-2.22.1/configure.ac
24@@ -372,7 +372,7 @@ esac
25
26 AC_MSG_CHECKING([whether program_invocation_short_name is defined])
27 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
28- #include <argp.h>
29+ #include <errno.h>
30 ]], [[
31 program_invocation_short_name = "test";
32 ]])], [
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 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Index: util-linux-ng-2.16/misc-utils/cal.c
4===================================================================
5--- util-linux-ng-2.16.orig/misc-utils/cal.c 2009-07-03 16:20:01.000000000 -0700
6+++ util-linux-ng-2.16/misc-utils/cal.c 2009-07-18 23:21:37.000000000 -0700
7@@ -407,7 +407,7 @@
8 strcpy(day_headings,"");
9 strcpy(j_day_headings,"");
10
11-#ifdef HAVE_LANGINFO_H
12+#ifdef HAVE_LANGINFO_H && !defined(__UCLIBC__)
13 # define weekday(wd) nl_langinfo(ABDAY_1+wd)
14 #else
15 # 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 @@
1Support older hosts with latest util-linux-native
2
3mkostemp is not defined on older machines. So we detect this and
4provide a define that uses mkstemp instead.
5
6O_CLOEXEC is not defined on older machines. It is however defined
7in the 'c.h' header. Fix up the users to include 'c.h'.
8
9fdisks/fdisksunlabel.c was modified to use qsort_r, however
10this is not defined on older hosts. Revert:
11 commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
12 fdisk: (sun): use ask API, remove global variable
13
14Upstream-Status: Inappropriate [other]
15Patches revert upstream changes in order to support older
16machines.
17
18Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
19
20diff -ur util-linux-2.23/configure.ac /home/lmhatle/util-linux-2.23-fixed/configure.ac
21--- util-linux-2.23/configure.ac 2013-05-29 14:44:35.147853585 -0500
22+++ /home/lmhatle/util-linux-2.23-fixed/configure.ac 2013-05-30 14:56:15.050799650 -0500
23@@ -323,6 +323,7 @@
24 llseek \
25 lseek64 \
26 mempcpy \
27+ mkostemp \
28 nanosleep \
29 personality \
30 posix_fadvise \
31diff -ur util-linux-2.23/include/c.h /home/lmhatle/util-linux-2.23-fixed/include/c.h
32--- util-linux-2.23/include/c.h 2013-04-12 04:25:46.852156874 -0500
33+++ /home/lmhatle/util-linux-2.23-fixed/include/c.h 2013-05-30 14:56:11.310799488 -0500
34@@ -236,6 +236,13 @@
35 #endif
36
37 /*
38+ * mkostemp replacement
39+ */
40+#ifndef HAVE_MKOSTEMP
41+#define mkostemp(template, flags) mkstemp(template)
42+#endif
43+
44+/*
45 * MAXHOSTNAMELEN replacement
46 */
47 static inline size_t get_hostname_max(void)
48diff -ur util-linux-2.23/lib/randutils.c /home/lmhatle/util-linux-2.23-fixed/lib/randutils.c
49--- util-linux-2.23/lib/randutils.c 2013-04-12 04:25:46.855156901 -0500
50+++ /home/lmhatle/util-linux-2.23-fixed/lib/randutils.c 2013-05-30 14:55:26.622799644 -0500
51@@ -16,6 +16,7 @@
52 #include <sys/syscall.h>
53
54 #include "randutils.h"
55+#include "c.h"
56
57 #ifdef HAVE_TLS
58 #define THREAD_LOCAL static __thread
59diff -ur util-linux-2.23/lib/wholedisk.c /home/lmhatle/util-linux-2.23-fixed/lib/wholedisk.c
60--- util-linux-2.23/lib/wholedisk.c 2013-04-12 04:25:46.855156901 -0500
61+++ /home/lmhatle/util-linux-2.23-fixed/lib/wholedisk.c 2013-05-30 14:55:31.182799350 -0500
62@@ -10,6 +10,7 @@
63
64 #include "blkdev.h"
65 #include "wholedisk.h"
66+#include "c.h"
67
68 int is_whole_disk_fd(int fd, const char *name)
69 {
70diff -ur util-linux-2.23/fdisks/fdisksunlabel.c /home/lmhatle/util-linux-2.23-fixed/fdisks/fdisksunlabel.c
71--- util-linux-2.23/fdisks/fdisksunlabel.c 2013-04-23 09:14:19.229015244 -0500
72+++ /home/lmhatle/util-linux-2.23-fixed/fdisks/fdisksunlabel.c 2013-05-30 14:54:55.978799735 -0500
73@@ -383,10 +383,10 @@
74 }
75 }
76
77-static int verify_sun_cmp(int *a, int *b, void *data)
78-{
79- unsigned int *verify_sun_starts = (unsigned int *) data;
80+static unsigned int *verify_sun_starts;
81
82+static int verify_sun_cmp(int *a, int *b)
83+{
84 if (*a == -1)
85 return 1;
86 if (*b == -1)
87@@ -401,7 +401,6 @@
88 uint32_t starts[SUN_MAXPARTITIONS], lens[SUN_MAXPARTITIONS], start, stop;
89 uint32_t i,j,k,starto,endo;
90 int array[SUN_MAXPARTITIONS];
91- unsigned int *verify_sun_starts;
92
93 assert(cxt);
94 assert(cxt->label);
95@@ -442,16 +441,14 @@
96 }
97 }
98 }
99-
100 for (i = 0; i < SUN_MAXPARTITIONS; i++) {
101 if (lens[i])
102 array[i] = i;
103 else
104 array[i] = -1;
105 }
106- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
107- (int (*)(const void *,const void *,void *)) verify_sun_cmp,
108- verify_sun_starts);
109+ qsort(array,ARRAY_SIZE(array),sizeof(array[0]),
110+ (int (*)(const void *,const void *)) verify_sun_cmp);
111
112 if (array[0] == -1) {
113 fdisk_info(cxt, _("No partitions defined"));
114@@ -468,6 +465,7 @@
115 start = (starts[array[i]] + lens[array[i]]);
116 if (start < stop)
117 fdisk_warnx(cxt, _("Unused gap - sectors %d-%d"), start, stop);
118+
119 return 0;
120 }
121
122@@ -746,18 +744,12 @@
123 }
124 }
125
126-
127 void fdisk_sun_set_alt_cyl(struct fdisk_context *cxt)
128 {
129 struct sun_disklabel *sunlabel = self_disklabel(cxt);
130- uintmax_t res;
131- int rc = fdisk_ask_number(cxt, 0, /* low */
132- be16_to_cpu(sunlabel->acyl), /* default */
133- 65535, /* high */
134- _("Number of alternate cylinders"), /* query */
135- &res); /* result */
136- if (!rc)
137- sunlabel->acyl = cpu_to_be16(res);
138+ sunlabel->acyl =
139+ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->acyl), 65535, 0,
140+ _("Number of alternate cylinders")));
141 }
142
143 void fdisk_sun_set_ncyl(struct fdisk_context *cxt, int cyl)
144@@ -769,54 +761,33 @@
145 void fdisk_sun_set_xcyl(struct fdisk_context *cxt)
146 {
147 struct sun_disklabel *sunlabel = self_disklabel(cxt);
148- uintmax_t res;
149- int rc = fdisk_ask_number(cxt, 0, /* low */
150- be16_to_cpu(sunlabel->apc), /* default */
151- cxt->geom.sectors, /* high */
152- _("Extra sectors per cylinder"), /* query */
153- &res); /* result */
154- if (!rc)
155- sunlabel->apc = cpu_to_be16(res);
156+ sunlabel->apc =
157+ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->apc), cxt->geom.sectors, 0,
158+ _("Extra sectors per cylinder")));
159 }
160
161 void fdisk_sun_set_ilfact(struct fdisk_context *cxt)
162 {
163 struct sun_disklabel *sunlabel = self_disklabel(cxt);
164- uintmax_t res;
165- int rc = fdisk_ask_number(cxt, 1, /* low */
166- be16_to_cpu(sunlabel->intrlv), /* default */
167- 32, /* high */
168- _("Interleave factor"), /* query */
169- &res); /* result */
170- if (!rc)
171- sunlabel->intrlv = cpu_to_be16(res);
172+ sunlabel->intrlv =
173+ cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->intrlv), 32, 0,
174+ _("Interleave factor")));
175 }
176
177 void fdisk_sun_set_rspeed(struct fdisk_context *cxt)
178 {
179 struct sun_disklabel *sunlabel = self_disklabel(cxt);
180- uintmax_t res;
181- int rc = fdisk_ask_number(cxt, 1, /* low */
182- be16_to_cpu(sunlabel->rpm), /* default */
183- USHRT_MAX, /* high */
184- _("Rotation speed (rpm)"), /* query */
185- &res); /* result */
186- if (!rc)
187- sunlabel->rpm = cpu_to_be16(res);
188-
189+ sunlabel->rpm =
190+ cpu_to_be16(read_int(cxt, 1, be16_to_cpu(sunlabel->rpm), 100000, 0,
191+ _("Rotation speed (rpm)")));
192 }
193
194 void fdisk_sun_set_pcylcount(struct fdisk_context *cxt)
195 {
196 struct sun_disklabel *sunlabel = self_disklabel(cxt);
197- uintmax_t res;
198- int rc = fdisk_ask_number(cxt, 0, /* low */
199- be16_to_cpu(sunlabel->pcyl), /* default */
200- USHRT_MAX, /* high */
201- _("Number of physical cylinders"), /* query */
202- &res); /* result */
203- if (!rc)
204- sunlabel->pcyl = cpu_to_be16(res);
205+ sunlabel->pcyl =
206+ cpu_to_be16(read_int(cxt, 0, be16_to_cpu(sunlabel->pcyl), 65535, 0,
207+ _("Number of physical cylinders")));
208 }
209
210 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 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3The FHS indicates that /etc must be capable of being mounted R/O.
4
5The FHS also indicates that lock files belong in /var/lock, and /var must
6be R/W as soon as possible during boot.
7
8This patch moves the mtab lock file from the potentially R/O /etc, to the
9R/W /var/lock area. This lock file is used when mounting disks and making
10other mount adjustments. The _PATH_MOUNTED_TMP is not adjusted, as failing
11to write to this file does not cause any functional limitations.
12
13(Note, if /etc is R/O, then /etc/mtab should be a symlink to /proc/mounts)
14
15Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
16
17--- util-linux-ng-2.16/include/pathnames.h.orig
18+++ util-linux-ng-2.16/include/pathnames.h
19@@ -90,7 +90,7 @@
20 # endif
21 #endif
22
23-#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~"
24+#define _PATH_MOUNTED_LOCK "/var/lock/mtab~"
25 #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp"
26
27 #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 @@
1Upstream-Status: Pending
2
3Index: util-linux-2.22.1/login-utils/login.c
4===================================================================
5--- util-linux-2.22.1.orig/login-utils/login.c
6+++ util-linux-2.22.1/login-utils/login.c
7@@ -1239,6 +1239,8 @@ int main(int argc, char **argv)
8 char *buff;
9 int childArgc = 0;
10 int retcode;
11+ struct sigaction act;
12+
13
14 char *pwdbuf = NULL;
15 struct passwd *pwd = NULL, _pwd;
16@@ -1252,7 +1254,10 @@ int main(int argc, char **argv)
17 timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT);
18
19 signal(SIGALRM, timedout);
20- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioclt() */
21+ (void) sigaction(SIGALRM, NULL, &act);
22+ act.sa_flags &= ~SA_RESTART;
23+ sigaction(SIGALRM, &act, NULL);
24+
25 alarm(timeout);
26 signal(SIGQUIT, SIG_IGN);
27 signal(SIGINT, SIG_IGN);