summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/util-linux')
-rw-r--r--meta/recipes-core/util-linux/files/MCONFIG223
-rw-r--r--meta/recipes-core/util-linux/files/debian-bug392236.patch203
-rw-r--r--meta/recipes-core/util-linux/files/defines.h10
-rw-r--r--meta/recipes-core/util-linux/files/fdiskbsdlabel_thumb.diff12
-rw-r--r--meta/recipes-core/util-linux/files/fix-make-c.patch41
-rw-r--r--meta/recipes-core/util-linux/files/gcc34.patch23
-rw-r--r--meta/recipes-core/util-linux/files/glibc-fix.patch22
-rw-r--r--meta/recipes-core/util-linux/files/make_include17
-rw-r--r--meta/recipes-core/util-linux/files/optional-uuid.patch55
-rw-r--r--meta/recipes-core/util-linux/files/swapargs.h3
-rw-r--r--meta/recipes-core/util-linux/files/umount.diff19
-rw-r--r--meta/recipes-core/util-linux/files/uuid.patch22
-rw-r--r--meta/recipes-core/util-linux/util-linux-2.17.2/tls.patch70
-rw-r--r--meta/recipes-core/util-linux/util-linux-2.17.2/uclibc-compile.patch13
-rw-r--r--meta/recipes-core/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch23
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc237
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.17.2.bb11
17 files changed, 1004 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/files/MCONFIG b/meta/recipes-core/util-linux/files/MCONFIG
new file mode 100644
index 0000000000..3fea2c02d7
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/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/files/debian-bug392236.patch b/meta/recipes-core/util-linux/files/debian-bug392236.patch
new file mode 100644
index 0000000000..fcd2046e34
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/debian-bug392236.patch
@@ -0,0 +1,203 @@
1Index: util-linux-2.12r/fdisk/llseek.c
2===================================================================
3--- util-linux-2.12r.orig/fdisk/llseek.c 2003-07-13 23:13:33.000000000 +0200
4+++ util-linux-2.12r/fdisk/llseek.c 2007-04-04 19:01:14.000000000 +0200
5@@ -14,30 +14,23 @@
6
7 #ifdef __linux__
8
9-#ifdef HAVE_LLSEEK
10-#include <syscall.h>
11-
12-#else /* HAVE_LLSEEK */
13+#include <sys/syscall.h>
14+#ifndef HAVE_LLSEEK
15
16 #if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
17
18 #define my_llseek lseek
19
20 #else
21-#include <linux/unistd.h> /* for __NR__llseek */
22-
23-static int _llseek (unsigned int, unsigned long,
24- unsigned long, long long *, unsigned int);
25
26-#ifdef __NR__llseek
27+#ifdef SYS__llseek
28
29-static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
30- unsigned long, offset_low,long long *,result,
31- unsigned int, origin)
32+#define _llseek(fd, offset_high, offset_low, result, origin) \
33+ syscall(SYS__llseek, fd, offset_high, offset_low, result, origin)
34
35 #else
36
37-/* no __NR__llseek on compilation machine - might give it explicitly */
38+/* no SYS__llseek on compilation machine - might give it explicitly */
39 static int _llseek (unsigned int fd, unsigned long oh,
40 unsigned long ol, long long *result,
41 unsigned int origin) {
42Index: util-linux-2.12r/fdisk/sfdisk.c
43===================================================================
44--- util-linux-2.12r.orig/fdisk/sfdisk.c 2005-01-04 23:31:57.000000000 +0100
45+++ util-linux-2.12r/fdisk/sfdisk.c 2007-04-04 19:01:14.000000000 +0200
46@@ -48,7 +48,7 @@
47 #include <sys/ioctl.h>
48 #include <sys/stat.h>
49 #include <sys/utsname.h>
50-#include <linux/unistd.h> /* _syscall */
51+#include <sys/syscall.h>
52 #include "nls.h"
53 #include "common.h"
54
55@@ -177,9 +177,8 @@
56 #endif
57
58 #ifndef use_lseek
59-static __attribute__used
60-_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
61- loff_t *, res, unsigned int, wh);
62+#define _llseek(fd, hi, lo, res, wh) \
63+ syscall(SYS__llseek, fd, hi, lo, res, wh)
64 #endif
65
66 static int
67Index: util-linux-2.12r/lib/my_reboot.c
68===================================================================
69--- util-linux-2.12r.orig/lib/my_reboot.c 1999-07-09 04:56:36.000000000 +0200
70+++ util-linux-2.12r/lib/my_reboot.c 2007-04-04 19:01:14.000000000 +0200
71@@ -23,10 +23,11 @@
72 #else /* no USE_LIBC */
73
74 /* direct syscall version */
75-#include <linux/unistd.h>
76+#include <sys/syscall.h>
77
78-#ifdef _syscall3
79-_syscall3(int, reboot, int, magic, int, magic_too, int, cmd);
80+#ifdef SYS_reboot
81+#define reboot(magic, magic2, cmd) \
82+ syscall(SYS_reboot, magic, magic2, cmd)
83 #else
84 /* Let us hope we have a 3-argument reboot here */
85 extern int reboot(int, int, int);
86Index: util-linux-2.12r/misc-utils/setterm.c
87===================================================================
88--- util-linux-2.12r.orig/misc-utils/setterm.c 2003-10-17 18:17:51.000000000 +0200
89+++ util-linux-2.12r/misc-utils/setterm.c 2007-04-04 19:01:14.000000000 +0200
90@@ -119,14 +119,13 @@
91
92 #if __GNU_LIBRARY__ < 5
93 #ifndef __alpha__
94-# include <linux/unistd.h>
95-#define __NR_klogctl __NR_syslog
96-_syscall3(int, klogctl, int, type, char*, buf, int, len);
97+# include <sys/syscall.h>
98+#define klogctl(type, buf, len) \
99+ syscall(SYS_syslog, type, buf, len)
100 #else /* __alpha__ */
101 #define klogctl syslog
102 #endif
103 #endif
104-extern int klogctl(int type, char *buf, int len);
105
106 /* Constants. */
107
108Index: util-linux-2.12r/mount/swapon.c
109===================================================================
110--- util-linux-2.12r.orig/mount/swapon.c 2004-12-22 10:50:19.000000000 +0100
111+++ util-linux-2.12r/mount/swapon.c 2007-04-04 19:01:14.000000000 +0200
112@@ -82,11 +82,11 @@
113 #else
114 /* We want a swapon with two args, but have an old libc.
115 Build the kernel call by hand. */
116-#include <linux/unistd.h>
117-static
118-_syscall2(int, swapon, const char *, path, int, flags);
119-static
120-_syscall1(int, swapoff, const char *, path);
121+#include <sys/syscall.h>
122+#define swapon(path, flags) \
123+ syscall(SYS_swapon, path, flags)
124+#define swapoff(path) \
125+ syscall(SYS_swapoff, path)
126 #endif
127 #else
128 /* just do as libc says */
129Index: util-linux-2.12r/mount/umount.c
130===================================================================
131--- util-linux-2.12r.orig/mount/umount.c 2007-04-04 19:01:14.000000000 +0200
132+++ util-linux-2.12r/mount/umount.c 2007-04-04 19:02:22.000000000 +0200
133@@ -37,14 +37,13 @@
134 #else /* MNT_FORCE */
135
136 /* Does the present kernel source know about umount2? */
137-#include <linux/unistd.h>
138-#ifdef __NR_umount2
139+#include <sys/syscall.h>
140+#ifdef SYS_umount2
141
142-int umount2(const char *path, int flags);
143+#define umount2(path, flags) \
144+ syscall(SYS_umount2, path, flags)
145
146-_syscall2(int, umount2, const char *, path, int, flags);
147-
148-#else /* __NR_umount2 */
149+#else /* SYS_umount2 */
150
151 static int
152 umount2(const char *path, int flags) {
153@@ -52,7 +51,7 @@
154 errno = ENOSYS;
155 return -1;
156 }
157-#endif /* __NR_umount2 */
158+#endif /* SYS_umount2 */
159
160 #if !defined(MNT_FORCE)
161 /* dare not try to include <linux/mount.h> -- lots of errors */
162Index: util-linux-2.12r/partx/partx.c
163===================================================================
164--- util-linux-2.12r.orig/partx/partx.c 2004-08-23 22:13:27.000000000 +0200
165+++ util-linux-2.12r/partx/partx.c 2007-04-04 19:01:14.000000000 +0200
166@@ -338,10 +338,9 @@
167 #endif
168
169 #ifdef NEED__llseek
170-#include <linux/unistd.h> /* _syscall */
171-static
172-_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
173- long long *, res, uint, wh);
174+#include <sys/syscall.h>
175+#define _llseek(fd, hi, lo, res, wh) \
176+ syscall(SYS__llseek, fd, hi, lo, res, wh)
177 #endif
178
179 static int
180Index: util-linux-2.12r/sys-utils/dmesg.c
181===================================================================
182--- util-linux-2.12r.orig/sys-utils/dmesg.c 2004-05-04 18:38:12.000000000 +0200
183+++ util-linux-2.12r/sys-utils/dmesg.c 2007-04-04 19:01:14.000000000 +0200
184@@ -29,7 +29,7 @@
185 * Only function 3 is allowed to non-root processes.
186 */
187
188-#include <linux/unistd.h>
189+#include <sys/syscall.h>
190 #include <stdio.h>
191 #include <getopt.h>
192 #include <stdlib.h>
193@@ -38,8 +38,8 @@
194 #if __GNU_LIBRARY__ < 5
195
196 #ifndef __alpha__
197-# define __NR_klogctl __NR_syslog
198- static inline _syscall3(int, klogctl, int, type, char *, b, int, len);
199+# define klogctl(type, b, len) \
200+ syscall(SYS_syslog, type, b, len)
201 #else /* __alpha__ */
202 #define klogctl syslog
203 #endif
diff --git a/meta/recipes-core/util-linux/files/defines.h b/meta/recipes-core/util-linux/files/defines.h
new file mode 100644
index 0000000000..6ce6b86df5
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/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/files/fdiskbsdlabel_thumb.diff b/meta/recipes-core/util-linux/files/fdiskbsdlabel_thumb.diff
new file mode 100644
index 0000000000..e6f82b5b46
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/fdiskbsdlabel_thumb.diff
@@ -0,0 +1,12 @@
1--- util-linux-2.12r/fdisk/fdiskbsdlabel.h.orig 2006-01-21 23:53:51.000000000 +0100
2+++ util-linux-2.12r/fdisk/fdiskbsdlabel.h 2006-01-21 23:54:35.000000000 +0100
3@@ -52,6 +52,9 @@
4 #elif defined (__s390__) || defined (__s390x__)
5 #define BSD_LABELSECTOR 1
6 #define BSD_LABELOFFSET 0
7+#elif defined (__thumb__)
8+#define BSD_LABELSECTOR 1
9+#define BSD_LABELOFFSET 0
10 #else
11 #error unknown architecture
12 #endif
diff --git a/meta/recipes-core/util-linux/files/fix-make-c.patch b/meta/recipes-core/util-linux/files/fix-make-c.patch
new file mode 100644
index 0000000000..bf1082e85c
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/fix-make-c.patch
@@ -0,0 +1,41 @@
1From: Karel Zak <kzak@redhat.com>
2Date: Mon, 11 May 2009 09:49:00 +0000 (+0200)
3Subject: build-sys: fix "make -C" bug
4X-Git-Url: http://git.kernel.org/?p=utils%2Futil-linux-ng%2Futil-linux-ng.git;a=commitdiff_plain;h=2ef7d41e6bbb7c842c06e911ffc562335a467b5d
5
6build-sys: fix "make -C" bug
7
8Running:
9
10./configure --with-fsprobe=builtin
11make -C mount mount
12
13causes the following error:
14
15gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -include ../config.h
16-I../include -DLOCALEDIR=\"/home/matthew/util-linux-ng/share/locale\"
17-fsigned-char -I../libs/blkid/src -g -O2 -MT mount-setproctitle.o
18-MD -MP -MF .deps/mount-setproctitle.Tpo -c -o mount-setproctitle.o
19`test -f '../lib/setproctitle.c' || echo './'`../lib/setproctitle.c mv
20-f .deps/mount-setproctitle.Tpo .deps/mount-setproctitle.Po
21make -C
22make: option requires an argument -- 'C'
23Usage: make [options] [target] ...
24...
25
26Reported-by: Matthew Burgess <matthew@linuxfromscratch.org>
27Signed-off-by: Karel Zak <kzak@redhat.com>
28---
29
30diff --git a/config/include-Makefile.am b/config/include-Makefile.am
31index b42a0c3..d5da619 100644
32--- a/config/include-Makefile.am
33+++ b/config/include-Makefile.am
34@@ -17,6 +17,7 @@ dist_noinst_DATA = $(dist_man_MANS)
35 # Paths to in-tree libraries (use ul_ prefix to avoid possible collisions)
36 #
37 ul_libblkid_srcdir = $(top_srcdir)/libs/blkid/src
38+ul_libblkid_builddir = $(top_builddir)/libs/blkid/src
39 ul_libblkid_la = $(top_builddir)/libs/blkid/src/libblkid.la
40
41 $(ul_libblkid_la):
diff --git a/meta/recipes-core/util-linux/files/gcc34.patch b/meta/recipes-core/util-linux/files/gcc34.patch
new file mode 100644
index 0000000000..8c4a20cdca
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/gcc34.patch
@@ -0,0 +1,23 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- util-linux-2.12o/disk-utils/fsck.cramfs.c~gcc34
7+++ util-linux-2.12o/disk-utils/fsck.cramfs.c
8@@ -77,15 +77,7 @@
9 #define PAD_SIZE 512
10
11 #include <asm/page.h>
12-#ifdef PAGE_SIZE
13-#define PAGE_CACHE_SIZE ((int) PAGE_SIZE)
14-#elif defined __ia64__
15-#define PAGE_CACHE_SIZE (16384)
16-#elif defined __alpha__
17-#define PAGE_CACHE_SIZE (8192)
18-#else
19 #define PAGE_CACHE_SIZE (4096)
20-#endif
21
22 /* Guarantee access to at least 8kB at a time */
23 #define ROMBUFFER_BITS 13
diff --git a/meta/recipes-core/util-linux/files/glibc-fix.patch b/meta/recipes-core/util-linux/files/glibc-fix.patch
new file mode 100644
index 0000000000..6d0c2fcefa
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/glibc-fix.patch
@@ -0,0 +1,22 @@
1--- /tmp/cmos.c 2006-11-21 11:38:55.000000000 +0100
2+++ util-linux-2.12r/hwclock/cmos.c 2006-11-21 11:41:45.458554000 +0100
3@@ -46,15 +46,16 @@
4
5 #include <unistd.h> /* for geteuid() */
6 #include <fcntl.h> /* for O_RDWR */
7+#include <linux/version.h>
8 #include <errno.h>
9 #include "../defines.h" /* for HAVE_sys_io_h */
10 #include "nls.h"
11
12 #if defined(__i386__)
13-#ifdef HAVE_sys_io_h
14-#include <sys/io.h>
15+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
16+#include <asm/io.h>
17 #else
18-#include <asm/io.h> /* for inb, outb */
19+#include <sys/io.h> /* for inb, outb */
20 #endif
21 #elif defined(__alpha__)
22 /* <asm/io.h> fails to compile, probably because of u8 etc */
diff --git a/meta/recipes-core/util-linux/files/make_include b/meta/recipes-core/util-linux/files/make_include
new file mode 100644
index 0000000000..e6abcd91f7
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/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/files/optional-uuid.patch b/meta/recipes-core/util-linux/files/optional-uuid.patch
new file mode 100644
index 0000000000..2d0ea43cd2
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/optional-uuid.patch
@@ -0,0 +1,55 @@
1From: Karel Zak <kzak@redhat.com>
2Date: Tue, 12 May 2009 19:22:19 +0000 (+0200)
3Subject: blkid: make libuuid optional
4X-Git-Url: http://git.kernel.org/?p=utils%2Futil-linux-ng%2Futil-linux-ng.git;a=commitdiff_plain;h=cdd17c7a73cab10a34bf80616225b8215ac4e2ed
5
6blkid: make libuuid optional
7
8read.c:28:23: error: uuid/uuid.h: No such file or directory
9make[3]: *** [read.lo] Error 1
10make[3]: *** Waiting for unfinished jobs....
11
12Reported-by: Olaf <mailinglists@ban-solms.de>
13Signed-off-by: Karel Zak <kzak@redhat.com>
14---
15
16diff --git a/libs/blkid/src/config.c b/libs/blkid/src/config.c
17index 2e59218..9091736 100644
18--- a/libs/blkid/src/config.c
19+++ b/libs/blkid/src/config.c
20@@ -24,9 +24,6 @@
21 #include <errno.h>
22 #endif
23 #include <stdint.h>
24-#ifdef HAVE_LIBUUID
25-#include <uuid/uuid.h>
26-#endif
27 #include <stdarg.h>
28
29 #include "blkdev.h"
30diff --git a/libs/blkid/src/evaluate.c b/libs/blkid/src/evaluate.c
31index a9c9fba..f0ae126 100644
32--- a/libs/blkid/src/evaluate.c
33+++ b/libs/blkid/src/evaluate.c
34@@ -27,9 +27,6 @@
35 #include <errno.h>
36 #endif
37 #include <stdint.h>
38-#ifdef HAVE_LIBUUID
39-#include <uuid/uuid.h>
40-#endif
41 #include <stdarg.h>
42
43 #include "pathnames.h"
44diff --git a/libs/blkid/src/read.c b/libs/blkid/src/read.c
45index 4163874..b5e9cd0 100644
46--- a/libs/blkid/src/read.c
47+++ b/libs/blkid/src/read.c
48@@ -25,7 +25,6 @@
49 #endif
50
51 #include "blkidP.h"
52-#include "uuid/uuid.h"
53
54 #ifdef HAVE_STRTOULL
55 #define STRTOULL strtoull /* defined in stdlib.h if you try hard enough */
diff --git a/meta/recipes-core/util-linux/files/swapargs.h b/meta/recipes-core/util-linux/files/swapargs.h
new file mode 100644
index 0000000000..e960eef05f
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/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/files/umount.diff b/meta/recipes-core/util-linux/files/umount.diff
new file mode 100644
index 0000000000..78330789ef
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/umount.diff
@@ -0,0 +1,19 @@
1*** util-linux-2.12r/mount/umount.c.orig 2005-09-10 20:07:38.000000000 +0200
2--- util-linux-2.12r/mount/umount.c 2006-06-07 21:14:04.000000000 +0200
3***************
4*** 40,46 ****
5 #include <linux/unistd.h>
6 #ifdef __NR_umount2
7
8! static int umount2(const char *path, int flags);
9
10 _syscall2(int, umount2, const char *, path, int, flags);
11
12--- 40,46 ----
13 #include <linux/unistd.h>
14 #ifdef __NR_umount2
15
16! int umount2(const char *path, int flags);
17
18 _syscall2(int, umount2, const char *, path, int, flags);
19
diff --git a/meta/recipes-core/util-linux/files/uuid.patch b/meta/recipes-core/util-linux/files/uuid.patch
new file mode 100644
index 0000000000..3208e0a865
--- /dev/null
+++ b/meta/recipes-core/util-linux/files/uuid.patch
@@ -0,0 +1,22 @@
1Index: util-linux-ng-2.15/libs/blkid/src/Makefile.am
2===================================================================
3--- util-linux-ng-2.15.orig/libs/blkid/src/Makefile.am 2009-05-19 17:01:15.000000000 +0100
4+++ util-linux-ng-2.15/libs/blkid/src/Makefile.am 2009-05-19 17:08:11.000000000 +0100
5@@ -7,7 +7,7 @@
6 common_ldadd =
7
8 if HAVE_UUID
9-common_ldadd += -luuid #TODO $(UUID_LIBS)
10+common_ldadd += -luuid
11 endif
12
13 # includes
14@@ -26,7 +26,7 @@
15 $(top_srcdir)/lib/md5.c
16
17 libblkid_la_LIBADD = probers/libblkid_probers.la $(common_ldadd)
18-libblkid_la_DEPENDENCIES = $(libblkid_la_LIBADD) blkid.sym
19+libblkid_la_DEPENDENCIES = probers/libblkid_probers.la blkid.sym
20
21 # TODO: for unknown reason "make distcheck" requires
22 # full path to the version script
diff --git a/meta/recipes-core/util-linux/util-linux-2.17.2/tls.patch b/meta/recipes-core/util-linux/util-linux-2.17.2/tls.patch
new file mode 100644
index 0000000000..bdb29cae1f
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-2.17.2/tls.patch
@@ -0,0 +1,70 @@
1Index: util-linux-ng-2.16/m4/tls.m4
2===================================================================
3--- util-linux-ng-2.16.orig/m4/tls.m4 2009-07-04 01:20:03.000000000 +0200
4+++ util-linux-ng-2.16/m4/tls.m4 2009-07-30 01:57:30.151697033 +0200
5@@ -18,31 +18,26 @@
6 # version as well.
7 #
8 AC_DEFUN([AX_TLS], [
9- AC_MSG_CHECKING(for thread local storage (TLS) class)
10- AC_CACHE_VAL(ac_cv_tls, [
11- ax_tls_keywords="__thread __declspec(thread) none"
12- for ax_tls_keyword in $ax_tls_keywords; do
13- case $ax_tls_keyword in
14- none) ac_cv_tls=none ; break ;;
15- *)
16- AC_TRY_COMPILE(
17- [#include <stdlib.h>
18- static void
19- foo(void) {
20- static ] $ax_tls_keyword [ int bar;
21- exit(1);
22- }],
23- [],
24- [ac_cv_tls=$ax_tls_keyword ; break],
25- ac_cv_tls=none
26- )
27- esac
28- done
29-])
30+ AC_CACHE_CHECK([for thread local storage (TLS) class],
31+ ac_cv_tls,
32+ [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
33+ [chktls_save_LDFLAGS="$LDFLAGS"
34+ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS"
35+ chktls_save_CFLAGS="$CFLAGS"
36+ CFLAGS="-fPIC $CFLAGS"
37+ dnl If -shared works, test if TLS works in a shared library.
38+ AC_LINK_IFELSE([int f() { return 0; }],
39+ AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }],
40+ [ac_cv_tls=yes],
41+ [ac_cv_tls=no]),
42+ [ac_cv_tls=yes])
43+ CFLAGS="$chktls_save_CFLAGS"
44+ LDFLAGS="$chktls_save_LDFLAGS"], [ac_cv_tls=no])
45+ ])
46
47- if test "$ac_cv_tls" != "none"; then
48- dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
49- AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
50- fi
51- AC_MSG_RESULT($ac_cv_tls)
52+ AS_IF([test "x$ac_cv_tls" = "xyes"],
53+ [AC_DEFINE([TLS], 1,
54+ [Define this if the compiler supports __thread for Thread-Local Storage])
55+ $1],
56+ [$2])
57 ])
58Index: util-linux-ng-2.16/shlibs/uuid/src/gen_uuid.c
59===================================================================
60--- util-linux-ng-2.16.orig/shlibs/uuid/src/gen_uuid.c 2009-07-30 02:31:48.518159459 +0200
61+++ util-linux-ng-2.16/shlibs/uuid/src/gen_uuid.c 2009-07-30 02:32:04.867871183 +0200
62@@ -99,7 +99,7 @@
63 #endif
64
65 #ifdef TLS
66-#define THREAD_LOCAL static TLS
67+#define THREAD_LOCAL static __thread
68 #else
69 #define THREAD_LOCAL static
70 #endif
diff --git a/meta/recipes-core/util-linux/util-linux-2.17.2/uclibc-compile.patch b/meta/recipes-core/util-linux/util-linux-2.17.2/uclibc-compile.patch
new file mode 100644
index 0000000000..b2e8a8b95a
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-2.17.2/uclibc-compile.patch
@@ -0,0 +1,13 @@
1Index: util-linux-ng-2.16/misc-utils/cal.c
2===================================================================
3--- util-linux-ng-2.16.orig/misc-utils/cal.c 2009-07-03 16:20:01.000000000 -0700
4+++ util-linux-ng-2.16/misc-utils/cal.c 2009-07-18 23:21:37.000000000 -0700
5@@ -407,7 +407,7 @@
6 strcpy(day_headings,"");
7 strcpy(j_day_headings,"");
8
9-#ifdef HAVE_LANGINFO_H
10+#ifdef HAVE_LANGINFO_H && !defined(__UCLIBC__)
11 # define weekday(wd) nl_langinfo(ABDAY_1+wd)
12 #else
13 # define weekday(wd) _time_info->abbrev_wkday[wd]
diff --git a/meta/recipes-core/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch b/meta/recipes-core/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch
new file mode 100644
index 0000000000..4b5eb73760
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-2.17.2/util-linux-ng-replace-siginterrupt.patch
@@ -0,0 +1,23 @@
1Index: util-linux-ng-2.14/login-utils/login.c
2===================================================================
3--- util-linux-ng-2.14.orig/login-utils/login.c 2008-05-28 16:01:02.000000000 -0700
4+++ util-linux-ng-2.14/login-utils/login.c 2009-03-04 18:31:42.000000000 -0800
5@@ -358,6 +358,7 @@
6 char *childArgv[10];
7 char *buff;
8 int childArgc = 0;
9+ struct sigaction act;
10 #ifdef HAVE_SECURITY_PAM_MISC_H
11 int retcode;
12 pam_handle_t *pamh = NULL;
13@@ -373,7 +374,9 @@
14 pid = getpid();
15
16 signal(SIGALRM, timedout);
17- siginterrupt(SIGALRM,1); /* we have to interrupt syscalls like ioclt() */
18+ (void) sigaction(SIGALRM, NULL, &act);
19+ act.sa_flags &= ~SA_RESTART;
20+ sigaction(SIGALRM, &act, NULL);
21 alarm((unsigned int)timeout);
22 signal(SIGQUIT, SIG_IGN);
23 signal(SIGINT, SIG_IGN);
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
new file mode 100644
index 0000000000..571b53c99c
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -0,0 +1,237 @@
1DESCRIPTION = "Util-linux is a suite of essential utilities for any Linux system."
2SECTION = "base"
3
4# note that `lscpu' is under GPLv3+
5LICENSE = "GPLv2+ & LGPLv2.1+ & BSD"
6LICENSE_util-linux-lscpu = "GPLv3+"
7
8LIC_FILES_CHKSUM = "file://README.licensing;md5=1530e36fe1304d4535513de90a290df9 \
9 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
10 file://licenses/COPYING.GPL;md5=8ca43cbc842c2336e835926c2166c28b \
11 file://licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \
12 file://getopt/COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
13
14DEPENDS = "udev zlib ncurses virtual/libintl gettext"
15DEPENDS_virtclass-native = "zlib-native ncurses-native lzo-native gettext-native"
16
17inherit autotools
18
19SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${MAJOR_VERSION}/util-linux-ng-${PV}.tar.bz2 \
20 file://MCONFIG \
21 file://swapargs.h \
22 file://defines.h \
23 file://make_include \
24 "
25
26PACKAGES_prepend = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-swaponoff util-linux-losetup util-linux-umount util-linux-mount util-linux-readprofile "
27
28PACKAGES_virtclass-native = ""
29
30S = "${WORKDIR}/util-linux-ng-${PV}"
31
32EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last \
33 --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \
34 --disable-login-utils --enable-write --enable-arch --enable-mount --with-fsprobe=builtin --enable-libuuid --enable-libblkid --enable-fsck"
35
36FILES_${PN}-doc += "/usr/share/getopt/getopt-*.*"
37
38FILES_util-linux-fdisk = "/sbin/fdisk.${PN}"
39FILES_util-linux-cfdisk = "/sbin/cfdisk"
40FILES_util-linux-sfdisk = "/sbin/sfdisk"
41FILES_util-linux-swaponoff = "/sbin/swapon.${PN} /sbin/swapoff.${PN}"
42FILES_util-linux-losetup = "/sbin/losetup.${PN}"
43FILES_util-linux-mount = "/bin/mount.${PN}"
44FILES_util-linux-umount = "/bin/umount.${PN}"
45FILES_util-linux-readprofile = "/usr/sbin/readprofile"
46
47RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile "
48RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
49
50RRECOMMENDS_${PN}_virtclass-native = ""
51RDEPENDS_${PN}_virtclass-native = ""
52
53do_compile () {
54 set -e
55 install ${WORKDIR}/MCONFIG ${S}/MCONFIG
56 install ${WORKDIR}/make_include ${S}/make_include
57 install ${WORKDIR}/swapargs.h ${S}/mount/swapargs.h
58 install ${WORKDIR}/defines.h ${S}/defines.h
59 oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
60 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
61 'LDFLAGS=${LDFLAGS}'
62}
63
64checklink() {
65 local targ link value
66 targ="$1"
67 link="$2"
68 ext="$3"
69 if test -h "$link"
70 then
71 value="$(readlink "$link")"
72 if test "$value" = "$targ"
73 then
74 rm "$link"
75 ln -s "$targ"."${PN}" "$link$ext"
76 return 0
77 else
78 echo "$link: '$value' found '$targ' expected" >&2
79 return 1
80 fi
81 else
82 echo "$link: not a symbolic link" >&2
83 return 1
84 fi
85}
86
87do_install () {
88 # with ccache the timestamps on compiled files may
89 # end up earlier than on their inputs, this allows
90 # for the resultant compilation in the install step.
91 oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
92 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
93 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install
94
95 mkdir -p ${D}${base_bindir}
96
97 sbinprogs="agetty blockdev ctrlaltdel cfdisk vipw vigr"
98 sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk readprofile fsck blkid sln"
99 usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt"
100 binprogs_a="dmesg kill more umount mount login reset"
101
102 if [ "${base_sbindir}" != "${sbindir}" ]; then
103 mkdir -p ${D}${base_sbindir}
104 for p in $sbinprogs $sbinprogs_a; do
105 if [ -f "${D}${sbindir}/$p" ]; then
106 mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p"
107 fi
108 done
109 fi
110
111 if [ "${base_bindir}" != "${bindir}" ]; then
112 mkdir -p ${D}${base_bindir}
113 for p in $binprogs_a; do
114 if [ -f "${D}${bindir}/$p" ]; then
115 mv "${D}${bindir}/$p" "${D}${base_bindir}/$p"
116 fi
117 done
118 fi
119
120 for p in $usrbinprogs_a; do
121 if [ -f "${D}${bindir}/$p" ]; then
122 mv "${D}${bindir}/$p" "${D}${bindir}/$p.${PN}"
123 fi
124 done
125
126 for p in $binprogs_a; do
127 if [ -f "${D}${base_bindir}/$p" ]; then
128 mv "${D}${base_bindir}/$p" "${D}${base_bindir}/$p.${PN}"
129 fi
130 done
131
132 for p in $sbinprogs_a; do
133 if [ -f "${D}${base_sbindir}/$p" ]; then
134 mv "${D}${base_sbindir}/$p" "${D}${base_sbindir}/$p.${PN}"
135 fi
136 done
137
138 install -d ${D}${sysconfdir}/default/
139 echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
140
141 ln -sf ${sbindir}/swapon ${D}${sbindir}/swapoff.${PN}
142 ln -sf ${sbindir}/shutdown ${D}${sbindir}/reboot.${PN}
143 ln -sf ${sbindir}/shutdown ${D}${sbindir}/halt.${PN}
144 ln -sf ${sbindir}/shutdown ${D}${sbindir}/fastboot
145 ln -sf ${sbindir}/shutdown ${D}${sbindir}/fasthalt
146}
147
148pkg_postinst_${PN} () {
149 update-alternatives --install ${base_bindir}/dmesg dmesg dmesg.${PN} 100
150 update-alternatives --install ${base_bindir}/kill kill kill.${PN} 100
151 update-alternatives --install ${base_bindir}/more more more.${PN} 100
152 update-alternatives --install ${base_sbindir}/mkswap mkswap mkswap.${PN} 100
153 test -x ${base_sbindir}/pivot_root.${PN} && \
154 update-alternatives --install ${base_sbindir}/pivot_root pivot_root pivot_root.${PN} 100
155# update-alternatives --install ${base_sbindir}/sln sln sln.${PN} 100
156 update-alternatives --install ${base_sbindir}/mkfs.minix mkfs.minix mkfs.minix.${PN} 100
157 update-alternatives --install ${base_sbindir}/fsck.minix fsck.minix fsck.minix.${PN} 100
158 update-alternatives --install ${bindir}/hexdump hexdump hexdump.${PN} 100
159 update-alternatives --install ${bindir}/last last last.${PN} 100
160 update-alternatives --install ${bindir}/logger logger logger.${PN} 100
161 update-alternatives --install ${bindir}/mesg mesg mesg.${PN} 100
162 update-alternatives --install ${bindir}/renice renice renice.${PN} 100
163 update-alternatives --install ${bindir}/wall wall wall.${PN} 100
164
165 # There seems to be problem, atleast on nslu2, with these, untill they are
166 # fixed the busybox ones have higher priority
167 update-alternatives --install ${base_sbindir}/hwclock hwclock hwclock.${PN} 10
168 update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 10
169 update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 10
170 update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 10
171}
172
173pkg_prerm_${PN} () {
174 test -x ${base_sbindir}/pivot_root.${PN} && \
175 update-alternatives --remove pivot_root pivot_root.${PN}
176 update-alternatives --remove dmesg dmesg.${PN}
177 update-alternatives --remove kill kill.${PN}
178 update-alternatives --remove more more.${PN}
179 update-alternatives --remove halt halt.${PN}
180 update-alternatives --remove hwclock hwclock.${PN}
181 update-alternatives --remove mkswap mkswap.${PN}
182 update-alternatives --remove reboot reboot.${PN}
183 update-alternatives --remove shutdown shutdown.${PN}
184# update-alternatives --remove sln sln.${PN}
185 update-alternatives --remove mkfs.minix mkfs.minix.${PN}
186 update-alternatives --remove fsck.minix fsck.minix.${PN}
187 update-alternatives --remove hexdump hexdump.${PN}
188 update-alternatives --remove last last.${PN}
189 update-alternatives --remove logger logger.${PN}
190 update-alternatives --remove mesg mesg.${PN}
191 update-alternatives --remove renice renice.${PN}
192 update-alternatives --remove wall wall.${PN}
193}
194
195pkg_postinst_util-linux-fdisk () {
196 update-alternatives --install ${base_sbindir}/fdisk fdisk fdisk.${PN} 100
197}
198
199pkg_prerm_util-linux-fdisk () {
200 update-alternatives --remove fdisk fdisk.${PN}
201}
202
203pkg_postinst_util-linux-mount () {
204 update-alternatives --install ${base_bindir}/mount mount mount.${PN} 100
205}
206
207pkg_prerm_util-linux-mount () {
208 update-alternatives --remove mount mount.${PN}
209}
210
211pkg_postinst_util-linux-umount () {
212 update-alternatives --install ${base_bindir}/umount umount umount.${PN} 100
213}
214
215pkg_prerm_util-linux-umount () {
216 update-alternatives --remove umount umount.${PN}
217}
218
219pkg_postinst_util-linux-losetup () {
220 update-alternatives --install ${base_sbindir}/losetup losetup losetup.${PN} 100
221}
222
223pkg_prerm_util-linux-losetup () {
224 update-alternatives --remove losetup losetup.${PN}
225}
226
227pkg_postinst_util-linux-swaponoff () {
228 update-alternatives --install ${base_sbindir}/swapoff swapoff swapoff.${PN} 100
229 update-alternatives --install ${base_sbindir}/swapon swapon swapon.${PN} 100
230}
231
232pkg_prerm_util-linux-swaponoff () {
233 update-alternatives --remove swapoff swapoff.${PN}
234 update-alternatives --remove swapon swapon.${PN}
235}
236
237BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/util-linux/util-linux_2.17.2.bb b/meta/recipes-core/util-linux/util-linux_2.17.2.bb
new file mode 100644
index 0000000000..9efe64a6c6
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux_2.17.2.bb
@@ -0,0 +1,11 @@
1MAJOR_VERSION = "2.17"
2require util-linux.inc
3PR="r0"
4
5SRC_URI += "file://uclibc-compile.patch \
6 file://util-linux-ng-replace-siginterrupt.patch"
7
8# fallocate is glibc 2.10, fallocate64 is glibc 2.11
9# we need to disable it for older versions
10EXTRA_OECONF += "ac_cv_func_fallocate=no"
11EXTRA_OECONF_virtclass-native += "--disable-fallocate --disable-use-tty-group"