]> git.pld-linux.org Git - packages/util-linux.git/blob - util-linux-diet.patch
fix wipefs not understanding -f option
[packages/util-linux.git] / util-linux-diet.patch
1 --- util-linux-ng-2.18/libmount/src/fs.c~       2010-06-08 10:44:20.000000000 +0200
2 +++ util-linux-ng-2.18/libmount/src/fs.c        2010-08-26 11:12:31.326572794 +0200
3 @@ -17,6 +17,9 @@
4  #include <errno.h>
5  #include <blkid.h>
6  #include <stddef.h>
7 +#ifdef __dietlibc__
8 +#include <sys/stat.h> /* for major and minor macros */
9 +#endif
10  
11  #include "nls.h"
12  #include "mountP.h"
13 --- util-linux-ng-2.18/libmount/src/tab_parse.c~        2010-06-07 12:35:06.000000000 +0200
14 +++ util-linux-ng-2.18/libmount/src/tab_parse.c 2010-08-26 11:16:35.762572782 +0200
15 @@ -9,6 +9,9 @@
16  #include <limits.h>
17  #include <dirent.h>
18  #include <fcntl.h>
19 +#ifdef __dietlibc__
20 +#include <sys/stat.h> /* for makedev macro */
21 +#endif
22  
23  #include "at.h"
24  #include "mangle.h"
25 --- util-linux-2.19/lib/strutils.c~     2011-01-31 16:43:47.000000000 +0100
26 +++ util-linux-2.19/lib/strutils.c      2011-02-10 12:49:12.221843465 +0100
27 @@ -12,6 +12,9 @@
28  #include <sys/stat.h>
29  #include <locale.h>
30  #include <string.h>
31 +#ifdef __dietlibc__
32 +#include <stdint.h>
33 +#endif
34  
35  static int do_scale_by_power (uintmax_t *x, int base, int power)
36  {
37 #--- util-linux-2.19/libmount/src/utils.c~      2011-01-24 23:46:29.000000000 +0100
38 #+++ util-linux-2.19/libmount/src/utils.c       2011-02-10 20:12:00.499611392 +0100
39 #@@ -398,7 +398,11 @@
40 #       int rc = -1;
41 #         struct passwd pwd;
42 #       struct passwd *pw;
43 #+#ifdef _SC_GETPW_R_SIZE_MAX
44 #       size_t sz = sysconf(_SC_GETPW_R_SIZE_MAX);
45 #+#else
46 #+      size_t sz = 0;
47 #+#endif
48 #       char *buf;
49
50 #       if (!username || !uid)
51 #@@ -427,7 +431,11 @@
52 #       int rc = -1;
53 #         struct group grp;
54 #       struct group *gr;
55 #+#ifdef _SC_GETGR_R_SIZE_MAX
56 #       size_t sz = sysconf(_SC_GETGR_R_SIZE_MAX);
57 #+#else
58 #+      size_t sz = 0;
59 #+#endif
60 #       char *buf;
61
62 #       if (!groupname || !gid)
63 --- util-linux-2.19/lib/at.c~   2011-01-31 16:43:47.000000000 +0100
64 +++ util-linux-2.19/lib/at.c    2011-02-10 20:30:37.336797058 +0100
65 @@ -7,6 +7,7 @@
66  #include <stdlib.h>
67  #include <fcntl.h>
68  #include <sys/stat.h>
69 +#include <limits.h>
70  
71  #include "at.h"
72  
73 --- util-linux-2.19/misc-utils/findmnt.c~       2011-01-31 16:43:47.000000000 +0100
74 +++ util-linux-2.19/misc-utils/findmnt.c        2011-02-10 20:54:23.100130391 +0100
75 @@ -30,6 +30,9 @@
76  #include <poll.h>
77  #include <sys/statvfs.h>
78  #include <sys/types.h>
79 +#ifdef __dietlibc__
80 +#include <sys/stat.h> /* for major and minor macros */
81 +#endif
82  
83  #include <libmount.h>
84  
85 --- util-linux-2.19/disk-utils/fsck.c~  2011-02-07 16:19:29.000000000 +0100
86 +++ util-linux-2.19/disk-utils/fsck.c   2011-02-10 21:09:27.024658725 +0100
87 @@ -270,7 +270,13 @@
88         if (verbose)
89                 printf(_("Locking disk %s ... "), diskname);
90  
91 -       inst->lock = open(diskname, O_CLOEXEC | O_RDONLY);
92 +       inst->lock = open(diskname,
93 +#ifdef O_CLOEXEC
94 +                       O_CLOEXEC | O_RDONLY
95 +#else
96 +                       O_RDONLY
97 +#endif
98 +                       );
99         if (inst->lock >= 0) {
100                 int rc = -1;
101  
102 --- util-linux-2.21/configure.ac~       2012-02-24 12:53:35.000000000 +0200
103 +++ util-linux-2.21/configure.ac        2012-03-05 21:03:25.833675080 +0200
104 @@ -311,6 +311,7 @@
105         lchown \
106         llseek \
107         lseek64 \
108 +       mkostemp \
109         nanosleep \
110         personality \
111         posix_fadvise \
112 @@ -330,6 +331,7 @@
113         usleep \
114         warn \
115         warnx \
116 +       versionsort \
117  ])
118  AC_FUNC_FSEEKO
119  
120 --- util-linux-2.19/misc-utils/findfs.c~        2011-01-31 16:43:47.000000000 +0100
121 +++ util-linux-2.19/misc-utils/findfs.c 2011-02-10 22:24:39.615735924 +0100
122 @@ -12,6 +12,7 @@
123  
124  #include <blkid.h>
125  
126 +#include "c.h"
127  #include "nls.h"
128  
129  static void __attribute__((__noreturn__)) usage(int rc)
130 --- util-linux-2.21/libmount/src/tab_parse.c~   2012-03-05 21:00:14.000000000 +0200
131 +++ util-linux-2.21/libmount/src/tab_parse.c    2012-03-05 21:05:27.562569076 +0200
132 @@ -524,7 +524,13 @@
133         DIR *dir = NULL;
134         struct dirent **namelist = NULL;
135  
136 -       n = scandir(dirname, &namelist, mnt_table_parse_dir_filter, versionsort);
137 +       n = scandir(dirname, &namelist, mnt_table_parse_dir_filter,
138 +#ifdef HAVE_VERSIONSORT
139 +               versionsort
140 +#else
141 +               alphasort
142 +#endif
143 +       );
144         if (n <= 0)
145                 return 0;
146  
147 --- util-linux-2.22.1/lib/Makemodule.am.orig    2012-09-20 15:16:51.344635140 +0200
148 +++ util-linux-2.22.1/lib/Makemodule.am 2012-10-13 16:15:53.662070426 +0200
149 @@ -5,7 +5,6 @@
150         lib/at.c \
151         lib/blkdev.c \
152         lib/canonicalize.c \
153 -       lib/cpuset.c \
154         lib/crc32.c \
155         lib/env.c \
156         lib/fileutils.c \
157 @@ -15,7 +14,6 @@
158         lib/mbsalign.c \
159         lib/md5.c \
160         lib/pager.c \
161 -       lib/path.c \
162         lib/procutils.c \
163         lib/randutils.c \
164         lib/setproctitle.c \
165 @@ -25,6 +23,12 @@
166         lib/wholedisk.c \
167         lib/xgetpass.c
168  
169 +if HAVE_CPU_SET_T
170 +libcommon_la_SOURCES += \
171 +       lib/cpuset.c \
172 +       lib/path.c
173 +endif
174 +
175  if LINUX
176  libcommon_la_SOURCES += \
177         lib/linux_version.c \
178 --- util-linux-2.22.1/lib/tt.c.orig     2012-09-20 15:16:51.349635172 +0200
179 +++ util-linux-2.22.1/lib/tt.c  2012-10-13 16:58:37.331962836 +0200
180 @@ -59,11 +59,13 @@
181   */
182  static size_t mbs_safe_width(const char *s)
183  {
184 -       mbstate_t st;
185         const char *p = s;
186         size_t width = 0;
187 +#ifdef HAVE_WIDECHAR
188 +       mbstate_t st;
189  
190         memset(&st, 0, sizeof(st));
191 +#endif
192  
193         while (p && *p) {
194                 if (iscntrl((unsigned char) *p)) {
195 @@ -108,7 +110,9 @@
196   */
197  static char *mbs_safe_encode(const char *s, size_t *width)
198  {
199 +#ifdef HAVE_WIDECHAR
200         mbstate_t st;
201 +#endif
202         const char *p = s;
203         char *res, *r;
204         size_t sz = s ? strlen(s) : 0;
205 @@ -117,8 +121,9 @@
206         if (!sz)
207                 return NULL;
208  
209 +#ifdef HAVE_WIDECHAR
210         memset(&st, 0, sizeof(st));
211 -
212 +#endif
213         res = malloc((sz * 4) + 1);
214         if (!res)
215                 return NULL;
216 --- util-linux-2.22.1/include/ttyutils.h.orig   2012-09-20 15:16:51.343635134 +0200
217 +++ util-linux-2.22.1/include/ttyutils.h        2012-10-13 16:58:53.058628843 +0200
218 @@ -11,6 +11,7 @@
219  #define UL_TTY_KEEPCFLAGS      (1 << 1)
220  #define UL_TTY_UTF8            (1 << 2)
221  
222 +#ifndef __dietlibc__
223  static inline void reset_virtual_console(struct termios *tp, int flags)
224  {
225         /* Use defaults of <sys/ttydefaults.h> for base settings */
226 @@ -78,6 +79,7 @@
227         tp->c_cc[VLNEXT]   = CLNEXT;
228         tp->c_cc[VEOL2]    = _POSIX_VDISABLE;
229  }
230 +#endif
231  
232  static inline int get_terminal_width(void)
233  {
234 --- util-linux-2.22.1/configure.ac.orig 2012-10-13 17:14:16.488590090 +0200
235 +++ util-linux-2.22.1/configure.ac      2012-10-13 22:11:41.324507881 +0200
236 @@ -915,6 +915,9 @@
237  UL_REQUIRES_HAVE([cramfs], [z], [z library])
238  AM_CONDITIONAL(BUILD_CRAMFS, test "x$build_cramfs" = xyes)
239  
240 +AC_ARG_ENABLE([minix], AS_HELP_STRING([--disable-minix], [do not build fsck.minix]), [], enable_minix=yes)
241 +UL_BUILD_INIT([minix])
242 +AM_CONDITIONAL(BUILD_MINIX, test "x$build_minix" = xyes)
243  
244  if test "x$have_io" = xyes -o "x$linux_os" = xyes; then
245    build_hwclock=yes
246 @@ -1193,6 +1196,12 @@
247         [sched_getaffinity])
248  AM_CONDITIONAL(BUILD_TASKSET, test "x$build_taskset" = xyes)
249  
250 +AC_ARG_ENABLE([setarch], AS_HELP_STRING([--disable-setarch], [do not build setarch]), [], enable_setarch=yes)
251 +UL_BUILD_INIT([setarch])
252 +AM_CONDITIONAL(BUILD_SETARCH, test "x$build_setarch" = xyes)
253 +AC_ARG_ENABLE([ldattach], AS_HELP_STRING([--disable-ldattach], [do not build ldattach]), [], enable_ldattach=yes)
254 +UL_BUILD_INIT([ldattach])
255 +AM_CONDITIONAL(BUILD_LDATTACH, test "x$build_ldattach" = xyes)
256  
257  AC_ARG_ENABLE([wall],
258    AS_HELP_STRING([--disable-wall], [do not build wall]),
259 --- util-linux-2.22.1/disk-utils/Makemodule.am.orig     2012-09-20 15:16:51.321634997 +0200
260 +++ util-linux-2.22.1/disk-utils/Makemodule.am  2012-10-13 22:12:29.384505863 +0200
261 @@ -1,4 +1,4 @@
262 -
263 +if BUILD_MINIX
264  sbin_PROGRAMS += fsck.minix
265  dist_man_MANS += disk-utils/fsck.minix.8
266  fsck_minix_SOURCES = \
267 @@ -6,6 +6,7 @@
268         disk-utils/minix_programs.h \
269         lib/ismounted.c
270  fsck_minix_LDADD = $(LDADD) libcommon.la
271 +endif
272  
273  sbin_PROGRAMS += mkfs.minix
274  dist_man_MANS += disk-utils/mkfs.minix.8
275 --- util-linux-2.22.1/sys-utils/Makemodule.am.orig      2012-10-10 14:14:06.515276813 +0200
276 +++ util-linux-2.22.1/sys-utils/Makemodule.am   2012-10-13 22:18:31.467824001 +0200
277 @@ -59,10 +59,12 @@
278  cytune_SOURCES = sys-utils/cytune.c sys-utils/cyclades.h
279  cytune_LDADD = $(LDADD) libcommon.la
280  
281 +if BUILD_LDATTACH
282  usrsbin_exec_PROGRAMS += ldattach
283  dist_man_MANS += sys-utils/ldattach.8
284  ldattach_SOURCES = sys-utils/ldattach.c
285  ldattach_LDADD = $(LDADD) libcommon.la
286 +endif
287  
288  usrsbin_exec_PROGRAMS += tunelp
289  dist_man_MANS += sys-utils/tunelp.8
290 @@ -73,6 +75,7 @@
291  rtcwake_SOURCES = sys-utils/rtcwake.c
292  rtcwake_LDADD = $(LDADD) libcommon.la
293  
294 +if BUILD_SETARCH
295  usrbin_exec_PROGRAMS += setarch
296  dist_man_MANS += sys-utils/setarch.8
297  setarch_SOURCES = sys-utils/setarch.c
298 @@ -123,6 +124,7 @@
299  
300  INSTALL_EXEC_HOOKS += install-exec-hook-setarch
301  UNINSTALL_HOOKS += uninstall-hook-setarch
302 +endif
303  
304  endif # LINUX
305  
This page took 0.045498 seconds and 3 git commands to generate.