forked from pool/util-linux
checked in (request 33360)
OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=31
This commit is contained in:
parent
831bb96645
commit
358fd17408
@ -1,4 +1,4 @@
|
||||
From 2d5b9e07d5b8dd698d83a6702906eefc834a9af5 Mon Sep 17 00:00:00 2001
|
||||
From a062df268df66641ed94d5c0e968e92c67b585e4 Mon Sep 17 00:00:00 2001
|
||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
Date: Thu, 29 Nov 2007 17:46:36 +0100
|
||||
Subject: [PATCH] losetup: support password hashing and specifying the key length
|
||||
@ -22,26 +22,23 @@ sha512.c is from loop-AES.
|
||||
|
||||
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
---
|
||||
mount/Makefile.am | 3 +-
|
||||
mount/lomount.c | 174 +++++++++++++++---
|
||||
mount/lomount.h | 5 +-
|
||||
mount/losetup.8 | 11 +
|
||||
mount/mount.8 | 13 ++
|
||||
mount/mount.c | 21 ++-
|
||||
mount/rmd160.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
mount/rmd160.h | 11 +
|
||||
mount/sha512.c | 432 +++++++++++++++++++++++++++++++++++++++++++
|
||||
mount/sha512.h | 45 +++++
|
||||
10 files changed, 1219 insertions(+), 28 deletions(-)
|
||||
create mode 100644 mount/rmd160.c
|
||||
create mode 100644 mount/rmd160.h
|
||||
create mode 100644 mount/sha512.c
|
||||
create mode 100644 mount/sha512.h
|
||||
|
||||
diff --git a/mount/Makefile.am b/mount/Makefile.am
|
||||
index c5f58aa..43ff01a 100644
|
||||
--- a/mount/Makefile.am
|
||||
+++ b/mount/Makefile.am
|
||||
Makefile.am | 3
|
||||
lomount.c | 174 +++++++++++++++++--
|
||||
lomount.h | 5
|
||||
losetup.8 | 11 +
|
||||
mount.8 | 13 +
|
||||
mount.c | 21 ++
|
||||
rmd160.c | 532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
rmd160.h | 11 +
|
||||
sha512.c | 432 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
sha512.h | 45 +++++
|
||||
10 files changed, 1219 insertions(+), 28 deletions(-)
|
||||
|
||||
Index: util-linux-ng-2.16/mount/Makefile.am
|
||||
===================================================================
|
||||
--- util-linux-ng-2.16.orig/mount/Makefile.am
|
||||
+++ util-linux-ng-2.16/mount/Makefile.am
|
||||
@@ -7,7 +7,8 @@ sbin_PROGRAMS = losetup swapon
|
||||
dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8
|
||||
|
||||
@ -52,10 +49,10 @@ index c5f58aa..43ff01a 100644
|
||||
|
||||
# generic header for mount and umount
|
||||
hdrs_mount = fstab.h mount_mntent.h mount_constants.h \
|
||||
diff --git a/mount/lomount.c b/mount/lomount.c
|
||||
index 67712c6..a0b951c 100644
|
||||
--- a/mount/lomount.c
|
||||
+++ b/mount/lomount.c
|
||||
Index: util-linux-ng-2.16/mount/lomount.c
|
||||
===================================================================
|
||||
--- util-linux-ng-2.16.orig/mount/lomount.c
|
||||
+++ util-linux-ng-2.16/mount/lomount.c
|
||||
@@ -23,6 +23,12 @@
|
||||
#include "sundries.h"
|
||||
#include "xmalloc.h"
|
||||
@ -67,9 +64,9 @@ index 67712c6..a0b951c 100644
|
||||
+#define MIN(a,b) ((a<b)?(a):(b))
|
||||
+#endif
|
||||
|
||||
#ifdef LOOP_SET_FD
|
||||
#define SIZE(a) (sizeof(a)/sizeof(a[0]))
|
||||
|
||||
@@ -390,12 +396,22 @@ show_loop_fd(int fd, char *device) {
|
||||
@@ -392,12 +398,22 @@ show_loop_fd(int fd, char *device) {
|
||||
|
||||
if (loopinfo64.lo_encrypt_type ||
|
||||
loopinfo64.lo_crypt_name[0]) {
|
||||
@ -95,7 +92,7 @@ index 67712c6..a0b951c 100644
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
@@ -644,7 +660,7 @@ xgetpass(int pfd, const char *prompt) {
|
||||
@@ -646,7 +662,7 @@ xgetpass(int pfd, const char *prompt) {
|
||||
}
|
||||
|
||||
if (pass == NULL)
|
||||
@ -104,7 +101,7 @@ index 67712c6..a0b951c 100644
|
||||
|
||||
pass[i] = 0;
|
||||
return pass;
|
||||
@@ -658,6 +674,24 @@ digits_only(const char *s) {
|
||||
@@ -660,6 +676,24 @@ digits_only(const char *s) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -129,7 +126,7 @@ index 67712c6..a0b951c 100644
|
||||
/*
|
||||
* return codes:
|
||||
* 0 - success
|
||||
@@ -666,10 +700,11 @@ digits_only(const char *s) {
|
||||
@@ -668,10 +702,11 @@ digits_only(const char *s) {
|
||||
*/
|
||||
int
|
||||
set_loop(const char *device, const char *file, unsigned long long offset,
|
||||
@ -143,7 +140,7 @@ index 67712c6..a0b951c 100644
|
||||
char *filename;
|
||||
|
||||
if (verbose) {
|
||||
@@ -707,13 +742,37 @@ set_loop(const char *device, const char *file, unsigned long long offset,
|
||||
@@ -709,13 +744,37 @@ set_loop(const char *device, const char
|
||||
filename = (char *) file;
|
||||
xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE);
|
||||
|
||||
@ -183,7 +180,7 @@ index 67712c6..a0b951c 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,20 +793,70 @@ set_loop(const char *device, const char *file, unsigned long long offset,
|
||||
@@ -736,20 +795,70 @@ set_loop(const char *device, const char
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -266,7 +263,7 @@ index 67712c6..a0b951c 100644
|
||||
}
|
||||
|
||||
if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
|
||||
@@ -895,7 +1004,13 @@ usage(void) {
|
||||
@@ -897,7 +1006,13 @@ usage(void) {
|
||||
|
||||
fprintf(stderr, _("\nOptions:\n"
|
||||
" -e | --encryption <type> enable data encryption with specified <name/num>\n"
|
||||
@ -280,7 +277,7 @@ index 67712c6..a0b951c 100644
|
||||
" -o | --offset <num> start at offset <num> into file\n"
|
||||
" --sizelimit <num> loop limited to only <num> bytes of the file\n"
|
||||
" -p | --pass-fd <num> read passphrase from file descriptor <num>\n"
|
||||
@@ -908,11 +1023,14 @@ usage(void) {
|
||||
@@ -910,11 +1025,14 @@ usage(void) {
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc;
|
||||
@ -295,7 +292,7 @@ index 67712c6..a0b951c 100644
|
||||
unsigned long long off, slimit;
|
||||
struct option longopts[] = {
|
||||
{ "all", 0, 0, 'a' },
|
||||
@@ -921,6 +1039,8 @@ main(int argc, char **argv) {
|
||||
@@ -923,6 +1041,8 @@ main(int argc, char **argv) {
|
||||
{ "encryption", 1, 0, 'e' },
|
||||
{ "find", 0, 0, 'f' },
|
||||
{ "help", 0, 0, 'h' },
|
||||
@ -304,7 +301,7 @@ index 67712c6..a0b951c 100644
|
||||
{ "associated", 1, 0, 'j' },
|
||||
{ "offset", 1, 0, 'o' },
|
||||
{ "sizelimit", 1, 0, 128 },
|
||||
@@ -939,12 +1059,13 @@ main(int argc, char **argv) {
|
||||
@@ -941,12 +1061,13 @@ main(int argc, char **argv) {
|
||||
off = 0;
|
||||
slimit = 0;
|
||||
assoc = offset = sizelimit = encryption = passfd = NULL;
|
||||
@ -319,7 +316,7 @@ index 67712c6..a0b951c 100644
|
||||
longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'a':
|
||||
@@ -969,6 +1090,12 @@ main(int argc, char **argv) {
|
||||
@@ -971,6 +1092,12 @@ main(int argc, char **argv) {
|
||||
case 'j':
|
||||
assoc = optarg;
|
||||
break;
|
||||
@ -332,7 +329,7 @@ index 67712c6..a0b951c 100644
|
||||
case 'o':
|
||||
offset = optarg;
|
||||
break;
|
||||
@@ -1054,8 +1181,11 @@ main(int argc, char **argv) {
|
||||
@@ -1056,8 +1183,11 @@ main(int argc, char **argv) {
|
||||
else {
|
||||
if (passfd && sscanf(passfd, "%d", &pfd) != 1)
|
||||
usage();
|
||||
@ -345,10 +342,10 @@ index 67712c6..a0b951c 100644
|
||||
if (res == 2 && find) {
|
||||
if (verbose)
|
||||
printf(_("stolen loop=%s...trying again\n"),
|
||||
diff --git a/mount/lomount.h b/mount/lomount.h
|
||||
index 59108d4..07ab875 100644
|
||||
--- a/mount/lomount.h
|
||||
+++ b/mount/lomount.h
|
||||
Index: util-linux-ng-2.16/mount/lomount.h
|
||||
===================================================================
|
||||
--- util-linux-ng-2.16.orig/mount/lomount.h
|
||||
+++ util-linux-ng-2.16/mount/lomount.h
|
||||
@@ -1,5 +1,6 @@
|
||||
-extern int set_loop(const char *, const char *, unsigned long long, unsigned long long,
|
||||
- const char *, int, int *);
|
||||
@ -358,11 +355,11 @@ index 59108d4..07ab875 100644
|
||||
extern int del_loop(const char *);
|
||||
extern int is_loop_device(const char *);
|
||||
extern int is_loop_autoclear(const char *device);
|
||||
diff --git a/mount/losetup.8 b/mount/losetup.8
|
||||
index 8ccab6c..8566898 100644
|
||||
--- a/mount/losetup.8
|
||||
+++ b/mount/losetup.8
|
||||
@@ -92,9 +92,18 @@ find the first unused loop device. If a
|
||||
Index: util-linux-ng-2.16/mount/losetup.8
|
||||
===================================================================
|
||||
--- util-linux-ng-2.16.orig/mount/losetup.8
|
||||
+++ util-linux-ng-2.16/mount/losetup.8
|
||||
@@ -94,9 +94,18 @@ find the first unused loop device. If a
|
||||
argument is present, use this device. Otherwise, print its name
|
||||
.IP "\fB\-h, \-\-help\fP"
|
||||
print help
|
||||
@ -381,7 +378,7 @@ index 8ccab6c..8566898 100644
|
||||
.IP "\fB\-o, \-\-offset \fIoffset\fP"
|
||||
the data start is moved \fIoffset\fP bytes into the specified file or
|
||||
device
|
||||
@@ -165,6 +174,8 @@ the command
|
||||
@@ -167,6 +176,8 @@ the command
|
||||
.fi
|
||||
.SH RESTRICTION
|
||||
DES encryption is painfully slow. On the other hand, XOR is terribly weak.
|
||||
@ -389,12 +386,12 @@ index 8ccab6c..8566898 100644
|
||||
+allowed to use them.
|
||||
|
||||
Cryptoloop is deprecated in favor of dm-crypt. For more details see
|
||||
.BR cryptsetup (8).
|
||||
diff --git a/mount/mount.8 b/mount/mount.8
|
||||
index 2888b46..582898a 100644
|
||||
--- a/mount/mount.8
|
||||
+++ b/mount/mount.8
|
||||
@@ -826,6 +826,15 @@ Every time the inode is modified, the i_version field will be incremented.
|
||||
.B cryptsetup(8).
|
||||
Index: util-linux-ng-2.16/mount/mount.8
|
||||
===================================================================
|
||||
--- util-linux-ng-2.16.orig/mount/mount.8
|
||||
+++ util-linux-ng-2.16/mount/mount.8
|
||||
@@ -782,6 +782,15 @@ Every time the inode is modified, the i_
|
||||
.B noiversion
|
||||
Do not increment the i_version inode field.
|
||||
.TP
|
||||
@ -410,7 +407,7 @@ index 2888b46..582898a 100644
|
||||
.B mand
|
||||
Allow mandatory locks on this filesystem. See
|
||||
.BR fcntl (2).
|
||||
@@ -2525,6 +2534,10 @@ that are really options to
|
||||
@@ -2390,6 +2399,10 @@ that are really options to
|
||||
.BR \%losetup (8).
|
||||
(These options can be used in addition to those specific
|
||||
to the filesystem type.)
|
||||
@ -421,10 +418,10 @@ index 2888b46..582898a 100644
|
||||
|
||||
If no explicit loop device is mentioned
|
||||
(but just an option `\fB\-o loop\fP' is given), then
|
||||
diff --git a/mount/mount.c b/mount/mount.c
|
||||
index efe1165..09006f7 100644
|
||||
--- a/mount/mount.c
|
||||
+++ b/mount/mount.c
|
||||
Index: util-linux-ng-2.16/mount/mount.c
|
||||
===================================================================
|
||||
--- util-linux-ng-2.16.orig/mount/mount.c
|
||||
+++ util-linux-ng-2.16/mount/mount.c
|
||||
@@ -95,6 +95,9 @@ struct mountargs {
|
||||
void *data;
|
||||
};
|
||||
@ -441,9 +438,9 @@ index efe1165..09006f7 100644
|
||||
*opt_encryption, *opt_speed, *opt_comment, *opt_uhelper;
|
||||
+static const char *opt_keybits, *opt_phash;
|
||||
|
||||
static int is_readonly(const char *node);
|
||||
static int mounted (const char *spec0, const char *node0);
|
||||
@@ -216,6 +220,8 @@ static struct string_opt_map {
|
||||
static int check_special_mountprog(const char *spec, const char *node,
|
||||
@@ -215,6 +219,8 @@ static struct string_opt_map {
|
||||
{ "offset=", 0, &opt_offset },
|
||||
{ "sizelimit=", 0, &opt_sizelimit },
|
||||
{ "encryption=", 0, &opt_encryption },
|
||||
@ -452,7 +449,7 @@ index efe1165..09006f7 100644
|
||||
{ "speed=", 0, &opt_speed },
|
||||
{ "comment=", 1, &opt_comment },
|
||||
{ "uhelper=", 0, &opt_uhelper },
|
||||
@@ -1081,7 +1087,8 @@ loop_check(const char **spec, const char **type, int *flags,
|
||||
@@ -1072,7 +1078,8 @@ loop_check(const char **spec, const char
|
||||
*type = opt_vfstype;
|
||||
}
|
||||
|
||||
@ -462,7 +459,7 @@ index efe1165..09006f7 100644
|
||||
*loopfile = *spec;
|
||||
|
||||
if (*loop) {
|
||||
@@ -1113,7 +1120,7 @@ loop_check(const char **spec, const char **type, int *flags,
|
||||
@@ -1104,7 +1111,7 @@ loop_check(const char **spec, const char
|
||||
printf(_("mount: going to use the loop device %s\n"), *loopdev);
|
||||
|
||||
if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit,
|
||||
@ -471,7 +468,7 @@ index efe1165..09006f7 100644
|
||||
if (res == 2) {
|
||||
/* loop dev has been grabbed by some other process,
|
||||
try again, if not given explicitly */
|
||||
@@ -1920,6 +1927,7 @@ static struct option longopts[] = {
|
||||
@@ -1865,6 +1872,7 @@ static struct option longopts[] = {
|
||||
{ "options", 1, 0, 'o' },
|
||||
{ "test-opts", 1, 0, 'O' },
|
||||
{ "pass-fd", 1, 0, 'p' },
|
||||
@ -479,7 +476,7 @@ index efe1165..09006f7 100644
|
||||
{ "types", 1, 0, 't' },
|
||||
{ "bind", 0, 0, 'B' },
|
||||
{ "move", 0, 0, 'M' },
|
||||
@@ -2082,6 +2090,7 @@ main(int argc, char *argv[]) {
|
||||
@@ -2026,6 +2034,7 @@ main(int argc, char *argv[]) {
|
||||
char *options = NULL, *test_opts = NULL, *node;
|
||||
const char *spec = NULL;
|
||||
char *label = NULL;
|
||||
@ -487,7 +484,7 @@ index efe1165..09006f7 100644
|
||||
char *uuid = NULL;
|
||||
char *types = NULL;
|
||||
char *p;
|
||||
@@ -2112,7 +2121,7 @@ main(int argc, char *argv[]) {
|
||||
@@ -2056,7 +2065,7 @@ main(int argc, char *argv[]) {
|
||||
initproctitle(argc, argv);
|
||||
#endif
|
||||
|
||||
@ -496,7 +493,7 @@ index efe1165..09006f7 100644
|
||||
longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'a': /* mount everything in fstab */
|
||||
@@ -2133,6 +2142,9 @@ main(int argc, char *argv[]) {
|
||||
@@ -2077,6 +2086,9 @@ main(int argc, char *argv[]) {
|
||||
case 'i':
|
||||
external_allowed = 0;
|
||||
break;
|
||||
@ -506,7 +503,7 @@ index efe1165..09006f7 100644
|
||||
case 'l':
|
||||
list_with_volumelabel = 1;
|
||||
break;
|
||||
@@ -2280,6 +2292,9 @@ main(int argc, char *argv[]) {
|
||||
@@ -2215,6 +2227,9 @@ main(int argc, char *argv[]) {
|
||||
|
||||
atexit(unlock_mtab);
|
||||
|
||||
@ -516,11 +513,10 @@ index efe1165..09006f7 100644
|
||||
switch (argc+specseen) {
|
||||
case 0:
|
||||
/* mount -a */
|
||||
diff --git a/mount/rmd160.c b/mount/rmd160.c
|
||||
new file mode 100644
|
||||
index 0000000..3430954
|
||||
Index: util-linux-ng-2.16/mount/rmd160.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/mount/rmd160.c
|
||||
+++ util-linux-ng-2.16/mount/rmd160.c
|
||||
@@ -0,0 +1,532 @@
|
||||
+/* rmd160.c - RIPE-MD160
|
||||
+ * Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
@ -1054,11 +1050,10 @@ index 0000000..3430954
|
||||
+ rmd160_final( &hd );
|
||||
+ memcpy( outbuf, hd.buf, 20 );
|
||||
+}
|
||||
diff --git a/mount/rmd160.h b/mount/rmd160.h
|
||||
new file mode 100644
|
||||
index 0000000..4b2c61d
|
||||
Index: util-linux-ng-2.16/mount/rmd160.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/mount/rmd160.h
|
||||
+++ util-linux-ng-2.16/mount/rmd160.h
|
||||
@@ -0,0 +1,11 @@
|
||||
+#ifndef RMD160_H
|
||||
+#define RMD160_H
|
||||
@ -1071,11 +1066,10 @@ index 0000000..4b2c61d
|
||||
+#endif /*RMD160_H*/
|
||||
+
|
||||
+
|
||||
diff --git a/mount/sha512.c b/mount/sha512.c
|
||||
new file mode 100644
|
||||
index 0000000..f717c8b
|
||||
Index: util-linux-ng-2.16/mount/sha512.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/mount/sha512.c
|
||||
+++ util-linux-ng-2.16/mount/sha512.c
|
||||
@@ -0,0 +1,432 @@
|
||||
+/*
|
||||
+ * sha512.c
|
||||
@ -1509,11 +1503,10 @@ index 0000000..f717c8b
|
||||
+ memset(&ctx, 0, sizeof(ctx));
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/mount/sha512.h b/mount/sha512.h
|
||||
new file mode 100644
|
||||
index 0000000..4b57c01
|
||||
Index: util-linux-ng-2.16/mount/sha512.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/mount/sha512.h
|
||||
+++ util-linux-ng-2.16/mount/sha512.h
|
||||
@@ -0,0 +1,45 @@
|
||||
+/*
|
||||
+ * sha512.h
|
||||
@ -1560,6 +1553,3 @@ index 0000000..4b57c01
|
||||
+/* no sha384_write(), use sha512_write() */
|
||||
+/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */
|
||||
+extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t);
|
||||
--
|
||||
1.6.4.2
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e9c019ea3782dc20b82d27c1240009f9e194304a77ac36f51629a487a5181390
|
||||
size 3801027
|
24
util-linux-ng-bnc503008.patch
Normal file
24
util-linux-ng-bnc503008.patch
Normal file
@ -0,0 +1,24 @@
|
||||
commit fdf08588af55d07a99b411708a08f4ebe6819706
|
||||
Author: Theodore Ts'o <tytso@mit.edu>
|
||||
Date: Sat Oct 3 12:50:06 2009 -0400
|
||||
|
||||
lib: fix file descriptor leak in is_mounted()
|
||||
|
||||
Remove an extraneous fopen() that leaks memory and a file descriptor.
|
||||
|
||||
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
||||
|
||||
diff --git a/lib/ismounted.c b/lib/ismounted.c
|
||||
index 28ae325..fbe91f9 100644
|
||||
--- a/lib/ismounted.c
|
||||
+++ b/lib/ismounted.c
|
||||
@@ -70,9 +70,6 @@ static int check_mntent_file(const char *mtab_file, const char *file,
|
||||
char buf[1024], *device = 0, *mnt_dir = 0, *cp;
|
||||
|
||||
*mount_flags = 0;
|
||||
- if ((f = fopen(mtab_file, "r")) == NULL)
|
||||
- return errno;
|
||||
-
|
||||
if ((f = setmntent (mtab_file, "r")) == NULL)
|
||||
return errno;
|
||||
if (stat(file, &st_buf) == 0) {
|
@ -1,16 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de
|
||||
|
||||
- new version 2.17.1
|
||||
- new commands: wipefs, unshare, fallocate
|
||||
- fdisk: DOS-compatible mode marked deprecated
|
||||
- honor nofail option in fsck
|
||||
- libblkid overhaul
|
||||
- lots of bug fixes
|
||||
- fix self-obsoletes
|
||||
- compile suid programs using -fpie
|
||||
- drop -DCONFIG_SMP for s390 as it doesn't seem to be used anyways
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de
|
||||
|
||||
|
@ -16,24 +16,23 @@
|
||||
#
|
||||
|
||||
|
||||
# NOTES:
|
||||
# both SUSE and Fedora include nologin.c, why not upstream?
|
||||
# hostid command is in coreutils already
|
||||
|
||||
Name: util-linux
|
||||
BuildRequires: audit-devel gettext-devel pkg-config
|
||||
BuildRequires: libselinux-devel libsepol-devel ncurses-devel pam-devel readline-devel zlib-devel
|
||||
Url: http://userweb.kernel.org/~kzak/util-linux-ng/
|
||||
Provides: util rawio raw base schedutils uuid-runtime
|
||||
Obsoletes: util rawio raw base schedutils uuid-runtime
|
||||
Supplements: filesystem(minix)
|
||||
PreReq: %install_info_prereq permissions
|
||||
License: BSD3c(or similar) ; GPLv2+
|
||||
Group: System/Base
|
||||
AutoReqProv: on
|
||||
Version: 2.17.1
|
||||
Release: 1
|
||||
Recommends: %name-lang = %{version}
|
||||
Version: 2.16
|
||||
Release: 9
|
||||
Requires: %name-lang = %{version}
|
||||
Summary: A collection of basic system utilities
|
||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2
|
||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2
|
||||
Source1: util-linux-rpmlintrc
|
||||
Source2: nologin.c
|
||||
Source3: nologin.8
|
||||
@ -44,39 +43,33 @@ Source7: baselibs.conf
|
||||
%define time_ver 1.7
|
||||
%define which_ver 2.19
|
||||
%define adjtimex_ver 1.20
|
||||
# XXX: post upstream?
|
||||
Source9: adjtimex-%{adjtimex_ver}.tar.bz2
|
||||
# XXX: DROP?
|
||||
Source10: freeramdisk.tar.bz2
|
||||
# XXX: post upstream?
|
||||
Source11: klogconsole.tar.bz2
|
||||
# TODO: split to separate package
|
||||
Source12: which-%{which_ver}.tar.bz2
|
||||
# TODO: split to separate package
|
||||
Source13: time-%{time_ver}.tar.bz2
|
||||
# XXX: needed?
|
||||
Source15: cryptoloop.txt
|
||||
Source22: setctsid.c
|
||||
Source23: setctsid.8
|
||||
# XXX: ppc specific, still needed?
|
||||
Source26: README.raw
|
||||
Source28: mkzimage_cmdline.8
|
||||
Source29: mkzimage_cmdline.c
|
||||
Source31: addnote.c
|
||||
#
|
||||
Source26: README.raw
|
||||
Source30: README.largedisk
|
||||
Source31: addnote.c
|
||||
Source50: uuidd.rc
|
||||
Source51: blkid.conf
|
||||
##
|
||||
## util-linux patches
|
||||
##
|
||||
# add hostid. FIXME: use the one from coreutils
|
||||
# add hostid
|
||||
Patch0: util-linux-2.12-misc_utils_hostid.patch
|
||||
# 241372 - remove legacy warnings from fdisk
|
||||
Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch
|
||||
# bnc#447036
|
||||
Patch2: util-linux-2.14.1-mount_skip_sync.patch
|
||||
# crypto patch
|
||||
Patch3: util-linux-2.17.1-mount_losetup_crypto.patch
|
||||
Patch3: util-linux-mount_losetup_crypto.patch
|
||||
Patch4: util-linux-ng-bnc503008.patch
|
||||
##
|
||||
## adjtimex
|
||||
##
|
||||
@ -96,9 +89,6 @@ Patch60: time-1.7.dif
|
||||
Patch70: which-lib64.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: %insserv_prereq %fillup_prereq /bin/sed
|
||||
#
|
||||
Provides: util = %{version}-%{release} rawio = %{version}-%{release} raw = %{version}-%{release} base = %{version}-%{release} schedutils = %{version}-%{release} uuid-runtime = %{version}-%{release}
|
||||
Obsoletes: util < %{version}-%{release} rawio < %{version}-%{release} raw < %{version}-%{release} base < %{version}-%{release} schedutils < %{version}-%{release} uuid-runtime < %{version}-%{release}
|
||||
|
||||
%description
|
||||
This package contains a large variety of low-level system utilities
|
||||
@ -164,6 +154,7 @@ unique IDs (UUIDs).
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
#
|
||||
cd adjtimex-*
|
||||
%patch50 -p1
|
||||
@ -171,7 +162,7 @@ cd -
|
||||
# setctsid
|
||||
cp %{S:22} %{S:23} .
|
||||
# nologin
|
||||
cp %{S:2} %{S:3} %{S:26} %{S:30} .
|
||||
cp %{S:2} %{S:3} %{S:15} %{S:26} %{S:30} .
|
||||
cd ../klogconsole
|
||||
%patch55 -p1 -b .quiet
|
||||
%patch56 -p1
|
||||
@ -225,10 +216,15 @@ make %{?jobs:-j%jobs} setctsid CFLAGS="$RPM_OPT_FLAGS"
|
||||
#
|
||||
# util-linux itself
|
||||
#
|
||||
%ifarch s390 s390x
|
||||
CFLAGS=-DCONFIG_SMP
|
||||
%endif
|
||||
# architecture dependent builds
|
||||
BUILD_ENABLE=
|
||||
%ifarch %ix86 x86_64
|
||||
BUILD_ENABLE="--enable-rdev"
|
||||
%endif
|
||||
autoreconf -fi
|
||||
export SUID_CFLAGS="-fpie"
|
||||
export SUID_LDFLAGS="-pie"
|
||||
CFLAGS="$RPM_OPT_FLAGS" \
|
||||
./configure \
|
||||
--mandir=%{_mandir} \
|
||||
--datadir=%{_datadir} \
|
||||
@ -244,12 +240,9 @@ CFLAGS="$RPM_OPT_FLAGS" \
|
||||
--enable-write \
|
||||
--disable-use-tty-group \
|
||||
--disable-static \
|
||||
%ifarch %ix86 x86_64
|
||||
--enable-rdev \
|
||||
%endif
|
||||
#
|
||||
$BUILD_ENABLE \
|
||||
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
|
||||
make %{?jobs:-j%jobs}
|
||||
#
|
||||
gcc $RPM_OPT_FLAGS -o nologin nologin.c
|
||||
gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29}
|
||||
gcc $RPM_OPT_FLAGS -o chrp-addnote %{SOURCE31}
|
||||
@ -368,8 +361,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv raw}
|
||||
txt='* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk'
|
||||
%install_info --entry="$txt" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz
|
||||
%install_info --entry="* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz
|
||||
%install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz
|
||||
@ -463,7 +455,6 @@ fi
|
||||
/sbin/findfs
|
||||
/sbin/fsck
|
||||
/sbin/switch_root
|
||||
/sbin/wipefs
|
||||
/usr/bin/ipcmk
|
||||
/bin/logger
|
||||
/usr/bin/cal
|
||||
@ -473,7 +464,6 @@ fi
|
||||
/usr/bin/colrm
|
||||
/usr/bin/column
|
||||
/usr/bin/ddate
|
||||
/usr/bin/fallocate
|
||||
/usr/bin/flock
|
||||
/usr/bin/getopt
|
||||
/usr/bin/hexdump
|
||||
@ -506,7 +496,6 @@ fi
|
||||
/usr/bin/tailf
|
||||
/usr/bin/taskset
|
||||
/usr/bin/time
|
||||
/usr/bin/unshare
|
||||
/usr/bin/which
|
||||
/usr/sbin/addpart
|
||||
/usr/sbin/delpart
|
||||
@ -535,7 +524,6 @@ fi
|
||||
%{_mandir}/man1/column.1.gz
|
||||
%{_mandir}/man1/ddate.1.gz
|
||||
%{_mandir}/man1/dmesg.1.gz
|
||||
%{_mandir}/man1/fallocate.1.gz
|
||||
%{_mandir}/man1/flock.1.gz
|
||||
%{_mandir}/man1/getopt.1.gz
|
||||
%{_mandir}/man1/hexdump.1.gz
|
||||
@ -562,7 +550,6 @@ fi
|
||||
%{_mandir}/man1/tailf.1.gz
|
||||
%{_mandir}/man1/taskset.1.gz
|
||||
%{_mandir}/man1/ul.1.gz
|
||||
%{_mandir}/man1/unshare.1.gz
|
||||
%{_mandir}/man1/wall.1.gz
|
||||
%{_mandir}/man1/whereis.1.gz
|
||||
%{_mandir}/man1/write.1.gz
|
||||
@ -605,7 +592,6 @@ fi
|
||||
%{_mandir}/man8/swapon.8.gz
|
||||
%{_mandir}/man8/umount.8.gz
|
||||
%{_mandir}/man8/setctsid.8.gz
|
||||
%{_mandir}/man8/wipefs.8.gz
|
||||
/usr/sbin/flushb
|
||||
/usr/sbin/readprofile
|
||||
%dir /usr/share/getopt
|
||||
|
Loading…
Reference in New Issue
Block a user