]> git.pld-linux.org Git - packages/util-linux.git/blobdiff - util-linux-diet.patch
- add support for recording user's login uid to the process attribute
[packages/util-linux.git] / util-linux-diet.patch
index 3118a25ed80851e98d32d99a4398f1deff329448..b0085b0de95cd56be510883d7af626d10b143e3e 100644 (file)
@@ -1,5 +1,5 @@
---- util-linux-ng-2.18/shlibs/mount/src/fs.c~  2010-06-08 10:44:20.000000000 +0200
-+++ util-linux-ng-2.18/shlibs/mount/src/fs.c   2010-08-26 11:12:31.326572794 +0200
+--- util-linux-ng-2.18/libmount/src/fs.c~      2010-06-08 10:44:20.000000000 +0200
++++ util-linux-ng-2.18/libmount/src/fs.c       2010-08-26 11:12:31.326572794 +0200
 @@ -17,6 +17,9 @@
  #include <errno.h>
  #include <blkid.h>
  
  #include "nls.h"
  #include "mountP.h"
---- util-linux-ng-2.18/shlibs/mount/src/tab_parse.c~   2010-06-07 12:35:06.000000000 +0200
-+++ util-linux-ng-2.18/shlibs/mount/src/tab_parse.c    2010-08-26 11:16:35.762572782 +0200
+--- util-linux-ng-2.18/libmount/src/tab_parse.c~       2010-06-07 12:35:06.000000000 +0200
++++ util-linux-ng-2.18/libmount/src/tab_parse.c        2010-08-26 11:16:35.762572782 +0200
 @@ -9,6 +9,9 @@
+ #include <limits.h>
  #include <dirent.h>
  #include <fcntl.h>
- #include <unistd.h>
 +#ifdef __dietlibc__
 +#include <sys/stat.h> /* for makedev macro */
 +#endif
  
- #include "nls.h"
+ #include "at.h"
  #include "mangle.h"
---- util-linux-ng-2.18/lib/tt.c~       2010-06-07 11:44:06.000000000 +0200
-+++ util-linux-ng-2.18/lib/tt.c        2010-08-26 11:32:34.886572774 +0200
-@@ -54,7 +54,7 @@
- };
- #else /* !HAVE_WIDECHAR */
--# define mbs_width       strlen(_s)
-+# define mbs_width(_s)        strlen(_s)
- #endif /* !HAVE_WIDECHAR */
- #define is_last_column(_tb, _cl) \
 --- util-linux-2.19/lib/strutils.c~    2011-01-31 16:43:47.000000000 +0100
 +++ util-linux-2.19/lib/strutils.c     2011-02-10 12:49:12.221843465 +0100
 @@ -12,6 +12,9 @@
  
  static int do_scale_by_power (uintmax_t *x, int base, int power)
  {
---- util-linux-2.19/shlibs/mount/src/utils.c~  2011-01-24 23:46:29.000000000 +0100
-+++ util-linux-2.19/shlibs/mount/src/utils.c   2011-02-10 20:12:00.499611392 +0100
-@@ -398,7 +398,11 @@
-       int rc = -1;
-         struct passwd pwd;
-       struct passwd *pw;
-+#ifdef _SC_GETPW_R_SIZE_MAX
-       size_t sz = sysconf(_SC_GETPW_R_SIZE_MAX);
-+#else
-+      size_t sz = 0;
-+#endif
-       char *buf;
-       if (!username || !uid)
-@@ -427,7 +431,11 @@
-       int rc = -1;
-         struct group grp;
-       struct group *gr;
-+#ifdef _SC_GETGR_R_SIZE_MAX
-       size_t sz = sysconf(_SC_GETGR_R_SIZE_MAX);
-+#else
-+      size_t sz = 0;
-+#endif
-       char *buf;
-       if (!groupname || !gid)
---- util-linux-2.19/shlibs/mount/src/tab_update.c~     2011-02-09 14:23:48.000000000 +0100
-+++ util-linux-2.19/shlibs/mount/src/tab_update.c      2011-02-10 20:26:15.846797059 +0100
-@@ -653,7 +653,12 @@
-       sigfillset(&sigs);
-       sigprocmask(SIG_BLOCK, &sigs, &upd->oldsigmask);
--      upd->utab_lock = open(lfile, O_RDONLY|O_CREAT|O_CLOEXEC, S_IWUSR|
-+      upd->utab_lock = open(lfile, O_RDONLY|
-+#ifdef O_CLOEXEC
-+                      O_CLOEXEC|
-+#endif
-+                      O_CREAT,
-+                      S_IWUSR|
-                                    S_IRUSR|S_IRGRP|S_IROTH);
-       free(lfile);
+#--- util-linux-2.19/libmount/src/utils.c~     2011-01-24 23:46:29.000000000 +0100
+#+++ util-linux-2.19/libmount/src/utils.c      2011-02-10 20:12:00.499611392 +0100
+#@@ -398,7 +398,11 @@
+#      int rc = -1;
+#         struct passwd pwd;
+#      struct passwd *pw;
+#+#ifdef _SC_GETPW_R_SIZE_MAX
+#      size_t sz = sysconf(_SC_GETPW_R_SIZE_MAX);
+#+#else
+#+     size_t sz = 0;
+#+#endif
+#      char *buf;
+# 
+#      if (!username || !uid)
+#@@ -427,7 +431,11 @@
+#      int rc = -1;
+#         struct group grp;
+#      struct group *gr;
+#+#ifdef _SC_GETGR_R_SIZE_MAX
+#      size_t sz = sysconf(_SC_GETGR_R_SIZE_MAX);
+#+#else
+#+     size_t sz = 0;
+#+#endif
+#      char *buf;
+# 
+#      if (!groupname || !gid)
 --- util-linux-2.19/lib/at.c~  2011-01-31 16:43:47.000000000 +0100
 +++ util-linux-2.19/lib/at.c   2011-02-10 20:30:37.336797058 +0100
 @@ -7,6 +7,7 @@
 --- util-linux-2.19/misc-utils/findmnt.c~      2011-01-31 16:43:47.000000000 +0100
 +++ util-linux-2.19/misc-utils/findmnt.c       2011-02-10 20:54:23.100130391 +0100
 @@ -30,6 +30,9 @@
- #include <sys/ioctl.h>
- #endif
- #include <assert.h>
+ #include <poll.h>
+ #include <sys/statvfs.h>
+ #include <sys/types.h>
 +#ifdef __dietlibc__
 +#include <sys/stat.h> /* for major and minor macros */
 +#endif
  
- #define USE_UNSTABLE_LIBMOUNT_API
  #include <libmount.h>
---- util-linux-2.19/fsck/fsck.c~       2011-02-07 16:19:29.000000000 +0100
-+++ util-linux-2.19/fsck/fsck.c        2011-02-10 21:09:27.024658725 +0100
+--- util-linux-2.19/disk-utils/fsck.c~ 2011-02-07 16:19:29.000000000 +0100
++++ util-linux-2.19/disk-utils/fsck.c  2011-02-10 21:09:27.024658725 +0100
 @@ -270,7 +270,13 @@
        if (verbose)
                printf(_("Locking disk %s ... "), diskname);
        if (inst->lock >= 0) {
                int rc = -1;
  
---- util-linux-2.19/configure.ac~      2011-02-10 21:28:23.395401725 +0100
-+++ util-linux-2.19/configure.ac       2011-02-10 22:12:29.997898392 +0100
-@@ -188,6 +188,8 @@
+--- util-linux-2.21/configure.ac~      2012-02-24 12:53:35.000000000 +0200
++++ util-linux-2.21/configure.ac       2012-03-05 21:03:25.833675080 +0200
+@@ -311,6 +311,7 @@
        lchown \
        llseek \
        lseek64 \
 +      mkostemp \
+       nanosleep \
+       personality \
+       posix_fadvise \
+@@ -330,6 +331,7 @@
+       usleep \
+       warn \
+       warnx \
 +      versionsort \
-       strtoull \
-       sysconf \
-       getdtablesize \
+ ])
+ AC_FUNC_FSEEKO
 --- util-linux-2.19/misc-utils/findfs.c~       2011-01-31 16:43:47.000000000 +0100
 +++ util-linux-2.19/misc-utils/findfs.c        2011-02-10 22:24:39.615735924 +0100
 @@ -12,6 +12,7 @@
  #include "nls.h"
  
  static void __attribute__((__noreturn__)) usage(int rc)
---- util-linux-2.19/misc-utils/scriptreplay.c~ 2011-01-31 16:43:47.000000000 +0100
-+++ util-linux-2.19/misc-utils/scriptreplay.c  2011-02-10 22:26:22.019069258 +0100
-@@ -28,6 +28,7 @@
- #include <unistd.h>
- #include <err.h>
-+#include "c.h"
- #include "nls.h"
+--- util-linux-2.21/libmount/src/tab_parse.c~  2012-03-05 21:00:14.000000000 +0200
++++ util-linux-2.21/libmount/src/tab_parse.c   2012-03-05 21:05:27.562569076 +0200
+@@ -524,7 +524,13 @@
+       DIR *dir = NULL;
+       struct dirent **namelist = NULL;
  
- #define SCRIPT_MIN_DELAY 0.0001               /* from original sripreplay.pl */
---- util-linux-2.19/shlibs/mount/src/tab_parse.c~      2011-02-10 23:28:02.091461025 +0100
-+++ util-linux-2.19/shlibs/mount/src/tab_parse.c       2011-02-10 23:29:04.934794359 +0100
-@@ -422,7 +422,13 @@
-       /* TODO: it would be nice to have a scandir() implementaion that
-        *       is able to use already opened directory */
--      n = scandir(dirname, &namelist, NULL, versionsort);
-+      n = scandir(dirname, &namelist, NULL,
+-      n = scandir(dirname, &namelist, mnt_table_parse_dir_filter, versionsort);
++      n = scandir(dirname, &namelist, mnt_table_parse_dir_filter,
 +#ifdef HAVE_VERSIONSORT
-+                      versionsort
++              versionsort
 +#else
-+                      alphasort
++              alphasort
 +#endif
-+                      );
++      );
        if (n <= 0)
                return 0;
  
+--- util-linux-2.22.1/lib/Makemodule.am.orig   2012-09-20 15:16:51.344635140 +0200
++++ util-linux-2.22.1/lib/Makemodule.am        2012-10-13 16:15:53.662070426 +0200
+@@ -5,7 +5,6 @@
+       lib/at.c \
+       lib/blkdev.c \
+       lib/canonicalize.c \
+-      lib/cpuset.c \
+       lib/crc32.c \
+       lib/env.c \
+       lib/fileutils.c \
+@@ -15,7 +14,6 @@
+       lib/mbsalign.c \
+       lib/md5.c \
+       lib/pager.c \
+-      lib/path.c \
+       lib/procutils.c \
+       lib/randutils.c \
+       lib/setproctitle.c \
+@@ -25,6 +23,12 @@
+       lib/wholedisk.c \
+       lib/xgetpass.c
++if HAVE_CPU_SET_T
++libcommon_la_SOURCES += \
++      lib/cpuset.c \
++      lib/path.c
++endif
++
+ if LINUX
+ libcommon_la_SOURCES += \
+       lib/linux_version.c \
+--- util-linux-2.22.1/lib/tt.c.orig    2012-09-20 15:16:51.349635172 +0200
++++ util-linux-2.22.1/lib/tt.c 2012-10-13 16:58:37.331962836 +0200
+@@ -59,11 +59,13 @@
+  */
+ static size_t mbs_safe_width(const char *s)
+ {
+-      mbstate_t st;
+       const char *p = s;
+       size_t width = 0;
++#ifdef HAVE_WIDECHAR
++      mbstate_t st;
+       memset(&st, 0, sizeof(st));
++#endif
+       while (p && *p) {
+               if (iscntrl((unsigned char) *p)) {
+@@ -108,7 +110,9 @@
+  */
+ static char *mbs_safe_encode(const char *s, size_t *width)
+ {
++#ifdef HAVE_WIDECHAR
+       mbstate_t st;
++#endif
+       const char *p = s;
+       char *res, *r;
+       size_t sz = s ? strlen(s) : 0;
+@@ -117,8 +121,9 @@
+       if (!sz)
+               return NULL;
++#ifdef HAVE_WIDECHAR
+       memset(&st, 0, sizeof(st));
+-
++#endif
+       res = malloc((sz * 4) + 1);
+       if (!res)
+               return NULL;
+--- util-linux-2.22.1/include/ttyutils.h.orig  2012-09-20 15:16:51.343635134 +0200
++++ util-linux-2.22.1/include/ttyutils.h       2012-10-13 16:58:53.058628843 +0200
+@@ -11,6 +11,7 @@
+ #define UL_TTY_KEEPCFLAGS     (1 << 1)
+ #define UL_TTY_UTF8           (1 << 2)
++#ifndef __dietlibc__
+ static inline void reset_virtual_console(struct termios *tp, int flags)
+ {
+       /* Use defaults of <sys/ttydefaults.h> for base settings */
+@@ -78,6 +79,7 @@
+       tp->c_cc[VLNEXT]   = CLNEXT;
+       tp->c_cc[VEOL2]    = _POSIX_VDISABLE;
+ }
++#endif
+ static inline int get_terminal_width(void)
+ {
+--- util-linux-2.22.1/configure.ac.orig        2012-10-13 17:14:16.488590090 +0200
++++ util-linux-2.22.1/configure.ac     2012-10-13 22:11:41.324507881 +0200
+@@ -915,6 +915,9 @@
+ UL_REQUIRES_HAVE([cramfs], [z], [z library])
+ AM_CONDITIONAL(BUILD_CRAMFS, test "x$build_cramfs" = xyes)
++AC_ARG_ENABLE([minix], AS_HELP_STRING([--disable-minix], [do not build fsck.minix]), [], enable_minix=yes)
++UL_BUILD_INIT([minix])
++AM_CONDITIONAL(BUILD_MINIX, test "x$build_minix" = xyes)
+ if test "x$have_io" = xyes -o "x$linux_os" = xyes; then
+   build_hwclock=yes
+@@ -1193,6 +1196,12 @@
+       [sched_getaffinity])
+ AM_CONDITIONAL(BUILD_TASKSET, test "x$build_taskset" = xyes)
++AC_ARG_ENABLE([setarch], AS_HELP_STRING([--disable-setarch], [do not build setarch]), [], enable_setarch=yes)
++UL_BUILD_INIT([setarch])
++AM_CONDITIONAL(BUILD_SETARCH, test "x$build_setarch" = xyes)
++AC_ARG_ENABLE([ldattach], AS_HELP_STRING([--disable-ldattach], [do not build ldattach]), [], enable_ldattach=yes)
++UL_BUILD_INIT([ldattach])
++AM_CONDITIONAL(BUILD_LDATTACH, test "x$build_ldattach" = xyes)
+ AC_ARG_ENABLE([wall],
+   AS_HELP_STRING([--disable-wall], [do not build wall]),
+--- util-linux-2.22.1/disk-utils/Makemodule.am.orig    2012-09-20 15:16:51.321634997 +0200
++++ util-linux-2.22.1/disk-utils/Makemodule.am 2012-10-13 22:12:29.384505863 +0200
+@@ -1,4 +1,4 @@
+-
++if BUILD_MINIX
+ sbin_PROGRAMS += fsck.minix
+ dist_man_MANS += disk-utils/fsck.minix.8
+ fsck_minix_SOURCES = \
+@@ -6,6 +6,7 @@
+       disk-utils/minix_programs.h \
+       lib/ismounted.c
+ fsck_minix_LDADD = $(LDADD) libcommon.la
++endif
+ sbin_PROGRAMS += mkfs.minix
+ dist_man_MANS += disk-utils/mkfs.minix.8
+--- util-linux-2.22.1/sys-utils/Makemodule.am.orig     2012-10-10 14:14:06.515276813 +0200
++++ util-linux-2.22.1/sys-utils/Makemodule.am  2012-10-13 22:18:31.467824001 +0200
+@@ -59,10 +59,12 @@
+ cytune_SOURCES = sys-utils/cytune.c sys-utils/cyclades.h
+ cytune_LDADD = $(LDADD) libcommon.la
++if BUILD_LDATTACH
+ usrsbin_exec_PROGRAMS += ldattach
+ dist_man_MANS += sys-utils/ldattach.8
+ ldattach_SOURCES = sys-utils/ldattach.c
+ ldattach_LDADD = $(LDADD) libcommon.la
++endif
+ usrsbin_exec_PROGRAMS += tunelp
+ dist_man_MANS += sys-utils/tunelp.8
+@@ -73,6 +75,7 @@
+ rtcwake_SOURCES = sys-utils/rtcwake.c
+ rtcwake_LDADD = $(LDADD) libcommon.la
++if BUILD_SETARCH
+ usrbin_exec_PROGRAMS += setarch
+ dist_man_MANS += sys-utils/setarch.8
+ setarch_SOURCES = sys-utils/setarch.c
+@@ -123,6 +124,7 @@
+ INSTALL_EXEC_HOOKS += install-exec-hook-setarch
+ UNINSTALL_HOOKS += uninstall-hook-setarch
++endif
+ endif # LINUX
This page took 0.122451 seconds and 4 git commands to generate.