./0000775000175000017500000000000012511411356011434 5ustar nielsenrnielsenr./swapargs.h0000664000175000017500000000011012511411356013424 0ustar nielsenrnielsenr#define SWAPON_HAS_TWO_ARGS #include #include ./fix-parallel-build.patch0000664000175000017500000000175112511411356016136 0ustar nielsenrnielsenrFrom 774f55f9dd22c01e4041a183d8dff14811f29114 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Fri, 4 Apr 2014 17:33:04 +0800 Subject: [PATCH] sys-utils/Makemodule.am: fix parallel build issue The rule SETARCH_MAN_LINKS is used for the files under the sys-utils dir, for example: echo ".so man8/setarch.8" > sys-utils/linux32.8 but it depends on nothing so that the sys-utils dir may not exist, we can create the sys-utils dir to fix problem. Upstream-Status: Pending Signed-off-by: Robert Yang --- sys-utils/Makemodule.am | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am index 6265282..62ead37 100644 --- a/sys-utils/Makemodule.am +++ b/sys-utils/Makemodule.am @@ -124,6 +124,7 @@ man_MANS += $(SETARCH_MAN_LINKS) CLEANFILES += $(SETARCH_MAN_LINKS) $(SETARCH_MAN_LINKS): + $(MKDIR_P) sys-utils $(AM_V_GEN)echo ".so man8/setarch.8" > $@ install-exec-hook-setarch: -- 1.8.2.1 ./make_include0000664000175000017500000000042012511411356013773 0ustar nielsenrnielsenrVERSION=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 ./util-linux-ensure-the-existence-of-directory-for-PAT.patch0000664000175000017500000000174312511411356024450 0ustar nielsenrnielsenrUpstream-Status: Pending util-linux: ensure the existence of directory for PATHFILES When compiling util-linux, it's possible to encounter the following error. /bin/sh: line 2:: misc-utils/uuidd.8.tmp: No such file or directory This is because that the misc-utils directory doesn't exist when trying to write to misc-utils/uuidd.8.tmp. When generating misc-utils/uuidd.8 (or anything in PATHFILES), its directory may not have been created yet. So we need to ensure the existence of the directory to avoid the compilation error. Signed-off-by: Chen Qi --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 17f4c33..ca3dc0f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -123,6 +123,7 @@ EXTRA_DIST += $(PATHFILES:=.in) $(PATHFILES): Makefile @ rm -f $@ $@.tmp + @ mkdir -p `dirname $@` $(AM_V_GEN) srcdir=''; \ test -f ./$@.in || srcdir=$(srcdir)/; \ $(edit_cmd) $${srcdir}$@.in >$@.tmp -- 1.7.9.5 ./util-linux-native-qsort.patch0000664000175000017500000000217612511411356017227 0ustar nielsenrnielsenrFrom f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Wed, 26 Mar 2014 01:30:29 +0000 Subject: [PATCH] sun.c: use qsort() to instead of qsort_r() qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on the host like CentOS 5.x. Upstream-Status: Inappropriate [Other] Signed-off-by: Robert Yang --- libfdisk/src/sun.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Index: util-linux-2.24.2/libfdisk/src/sun.c =================================================================== --- util-linux-2.24.2.orig/libfdisk/src/sun.c +++ util-linux-2.24.2/libfdisk/src/sun.c @@ -431,10 +431,9 @@ static int sun_verify_disklabel(struct f } verify_sun_starts = starts; - qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), - (int (*)(const void *,const void *,void *)) verify_sun_cmp, - verify_sun_starts); - + qsort(array,ARRAY_SIZE(array),sizeof(array[0]), + (int (*)(const void *,const void *)) verify_sun_cmp); + if (array[0] == -1) { fdisk_info(cxt, _("No partitions defined.")); return 0; ./util-linux-ng-replace-siginterrupt.patch0000664000175000017500000000150612511411356021341 0ustar nielsenrnielsenrUpstream-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); ./uclibc-__progname-conflict.patch0000664000175000017500000000264112511411356017624 0ustar nielsenrnielsenrconfigure 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"; ]])], [ ./defines.h0000664000175000017500000000035612511411356013226 0ustar nielsenrnielsenr#define UTIL_LINUX_VERSION "2.12" #define util_linux_version "util-linux-2.12" #define HAVE_blkpg_h #define HAVE_kd_h #define HAVE_locale_h #define HAVE_langinfo_h #define HAVE_sys_user_h #define HAVE_asm_types_h //#define NEED_tqueue_h ./util-linux-native.patch0000664000175000017500000000403412511411356016054 0ustar nielsenrnielsenrSupport 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 Index: util-linux-2.24.1/configure.ac =================================================================== --- util-linux-2.24.1.orig/configure.ac +++ util-linux-2.24.1/configure.ac @@ -302,6 +302,7 @@ AC_CHECK_FUNCS([ \ llseek \ lseek64 \ mempcpy \ + mkostemp \ nanosleep \ personality \ posix_fadvise \ Index: util-linux-2.24.1/include/c.h =================================================================== --- util-linux-2.24.1.orig/include/c.h +++ util-linux-2.24.1/include/c.h @@ -236,6 +236,13 @@ static inline int dirfd(DIR *d) #endif /* + * mkostemp replacement + */ +#ifndef HAVE_MKOSTEMP +#define mkostemp(template, flags) mkstemp(template) +#endif + +/* * MAXHOSTNAMELEN replacement */ static inline size_t get_hostname_max(void) Index: util-linux-2.24.1/lib/randutils.c =================================================================== --- util-linux-2.24.1.orig/lib/randutils.c +++ util-linux-2.24.1/lib/randutils.c @@ -16,6 +16,7 @@ #include #include "randutils.h" +#include "c.h" #ifdef HAVE_TLS #define THREAD_LOCAL static __thread Index: util-linux-2.24.1/lib/wholedisk.c =================================================================== --- util-linux-2.24.1.orig/lib/wholedisk.c +++ util-linux-2.24.1/lib/wholedisk.c @@ -10,6 +10,7 @@ #include "blkdev.h" #include "wholedisk.h" +#include "c.h" int is_whole_disk_fd(int fd, const char *name) { ./util-linux-ng-2.16-mount_lock_path.patch0000664000175000017500000000166012511411356020744 0ustar nielsenrnielsenrUpstream-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 ./fix-configure.patch0000664000175000017500000000116612511411356015226 0ustar nielsenrnielsenrThe 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.24.1/configure.ac =================================================================== --- util-linux-2.24.1.orig/configure.ac +++ util-linux-2.24.1/configure.ac @@ -76,7 +76,7 @@ fi AC_SUBST([usrsbin_execdir]) AS_CASE([$libdir], - ['${exec_prefix}/'* | '${prefix}/'* | /usr/*], + [${exec_prefix}/* | ${prefix}/* | /usr/*], [usrlib_execdir=$libdir], [usrlib_execdir='${exec_prefix}'$libdir] ) ./configure-sbindir.patch0000664000175000017500000000133212511411356016065 0ustar nielsenrnielsenrutil-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