forked from pool/util-linux
Accepting request 33360 from Base:System
Copy from Base:System/util-linux based on submit request 33360 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/33360 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=86
This commit is contained in:
parent
d23a9286bf
commit
856b22da49
@ -1,4 +1,4 @@
|
||||
From a062df268df66641ed94d5c0e968e92c67b585e4 Mon Sep 17 00:00:00 2001
|
||||
From 2d5b9e07d5b8dd698d83a6702906eefc834a9af5 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,23 +22,26 @@ sha512.c is from loop-AES.
|
||||
|
||||
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
---
|
||||
|
||||
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 +++++
|
||||
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
|
||||
|
||||
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
|
||||
diff --git a/mount/Makefile.am b/mount/Makefile.am
|
||||
index c5f58aa..43ff01a 100644
|
||||
--- a/mount/Makefile.am
|
||||
+++ b/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
|
||||
|
||||
@ -49,10 +52,10 @@ Index: util-linux-ng-2.16/mount/Makefile.am
|
||||
|
||||
# generic header for mount and umount
|
||||
hdrs_mount = fstab.h mount_mntent.h mount_constants.h \
|
||||
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
|
||||
diff --git a/mount/lomount.c b/mount/lomount.c
|
||||
index 67712c6..a0b951c 100644
|
||||
--- a/mount/lomount.c
|
||||
+++ b/mount/lomount.c
|
||||
@@ -23,6 +23,12 @@
|
||||
#include "sundries.h"
|
||||
#include "xmalloc.h"
|
||||
@ -64,9 +67,9 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
+#define MIN(a,b) ((a<b)?(a):(b))
|
||||
+#endif
|
||||
|
||||
#define SIZE(a) (sizeof(a)/sizeof(a[0]))
|
||||
#ifdef LOOP_SET_FD
|
||||
|
||||
@@ -392,12 +398,22 @@ show_loop_fd(int fd, char *device) {
|
||||
@@ -390,12 +396,22 @@ show_loop_fd(int fd, char *device) {
|
||||
|
||||
if (loopinfo64.lo_encrypt_type ||
|
||||
loopinfo64.lo_crypt_name[0]) {
|
||||
@ -92,7 +95,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
@@ -646,7 +662,7 @@ xgetpass(int pfd, const char *prompt) {
|
||||
@@ -644,7 +660,7 @@ xgetpass(int pfd, const char *prompt) {
|
||||
}
|
||||
|
||||
if (pass == NULL)
|
||||
@ -101,7 +104,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
|
||||
pass[i] = 0;
|
||||
return pass;
|
||||
@@ -660,6 +676,24 @@ digits_only(const char *s) {
|
||||
@@ -658,6 +674,24 @@ digits_only(const char *s) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -126,7 +129,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
/*
|
||||
* return codes:
|
||||
* 0 - success
|
||||
@@ -668,10 +702,11 @@ digits_only(const char *s) {
|
||||
@@ -666,10 +700,11 @@ digits_only(const char *s) {
|
||||
*/
|
||||
int
|
||||
set_loop(const char *device, const char *file, unsigned long long offset,
|
||||
@ -140,7 +143,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
char *filename;
|
||||
|
||||
if (verbose) {
|
||||
@@ -709,13 +744,37 @@ set_loop(const char *device, const char
|
||||
@@ -707,13 +742,37 @@ set_loop(const char *device, const char *file, unsigned long long offset,
|
||||
filename = (char *) file;
|
||||
xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE);
|
||||
|
||||
@ -180,7 +183,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -736,20 +795,70 @@ set_loop(const char *device, const char
|
||||
@@ -734,20 +793,70 @@ set_loop(const char *device, const char *file, unsigned long long offset,
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -263,7 +266,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
}
|
||||
|
||||
if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
|
||||
@@ -897,7 +1006,13 @@ usage(void) {
|
||||
@@ -895,7 +1004,13 @@ usage(void) {
|
||||
|
||||
fprintf(stderr, _("\nOptions:\n"
|
||||
" -e | --encryption <type> enable data encryption with specified <name/num>\n"
|
||||
@ -277,7 +280,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
" -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"
|
||||
@@ -910,11 +1025,14 @@ usage(void) {
|
||||
@@ -908,11 +1023,14 @@ usage(void) {
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc;
|
||||
@ -292,7 +295,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
unsigned long long off, slimit;
|
||||
struct option longopts[] = {
|
||||
{ "all", 0, 0, 'a' },
|
||||
@@ -923,6 +1041,8 @@ main(int argc, char **argv) {
|
||||
@@ -921,6 +1039,8 @@ main(int argc, char **argv) {
|
||||
{ "encryption", 1, 0, 'e' },
|
||||
{ "find", 0, 0, 'f' },
|
||||
{ "help", 0, 0, 'h' },
|
||||
@ -301,7 +304,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
{ "associated", 1, 0, 'j' },
|
||||
{ "offset", 1, 0, 'o' },
|
||||
{ "sizelimit", 1, 0, 128 },
|
||||
@@ -941,12 +1061,13 @@ main(int argc, char **argv) {
|
||||
@@ -939,12 +1059,13 @@ main(int argc, char **argv) {
|
||||
off = 0;
|
||||
slimit = 0;
|
||||
assoc = offset = sizelimit = encryption = passfd = NULL;
|
||||
@ -316,7 +319,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'a':
|
||||
@@ -971,6 +1092,12 @@ main(int argc, char **argv) {
|
||||
@@ -969,6 +1090,12 @@ main(int argc, char **argv) {
|
||||
case 'j':
|
||||
assoc = optarg;
|
||||
break;
|
||||
@ -329,7 +332,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
case 'o':
|
||||
offset = optarg;
|
||||
break;
|
||||
@@ -1056,8 +1183,11 @@ main(int argc, char **argv) {
|
||||
@@ -1054,8 +1181,11 @@ main(int argc, char **argv) {
|
||||
else {
|
||||
if (passfd && sscanf(passfd, "%d", &pfd) != 1)
|
||||
usage();
|
||||
@ -342,10 +345,10 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
||||
if (res == 2 && find) {
|
||||
if (verbose)
|
||||
printf(_("stolen loop=%s...trying again\n"),
|
||||
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
|
||||
diff --git a/mount/lomount.h b/mount/lomount.h
|
||||
index 59108d4..07ab875 100644
|
||||
--- a/mount/lomount.h
|
||||
+++ b/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 *);
|
||||
@ -355,11 +358,11 @@ Index: util-linux-ng-2.16/mount/lomount.h
|
||||
extern int del_loop(const char *);
|
||||
extern int is_loop_device(const char *);
|
||||
extern int is_loop_autoclear(const char *device);
|
||||
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
|
||||
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
|
||||
argument is present, use this device. Otherwise, print its name
|
||||
.IP "\fB\-h, \-\-help\fP"
|
||||
print help
|
||||
@ -378,7 +381,7 @@ Index: util-linux-ng-2.16/mount/losetup.8
|
||||
.IP "\fB\-o, \-\-offset \fIoffset\fP"
|
||||
the data start is moved \fIoffset\fP bytes into the specified file or
|
||||
device
|
||||
@@ -167,6 +176,8 @@ the command
|
||||
@@ -165,6 +174,8 @@ the command
|
||||
.fi
|
||||
.SH RESTRICTION
|
||||
DES encryption is painfully slow. On the other hand, XOR is terribly weak.
|
||||
@ -386,12 +389,12 @@ Index: util-linux-ng-2.16/mount/losetup.8
|
||||
+allowed to use them.
|
||||
|
||||
Cryptoloop is deprecated in favor of dm-crypt. For more details see
|
||||
.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_
|
||||
.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 noiversion
|
||||
Do not increment the i_version inode field.
|
||||
.TP
|
||||
@ -407,7 +410,7 @@ Index: util-linux-ng-2.16/mount/mount.8
|
||||
.B mand
|
||||
Allow mandatory locks on this filesystem. See
|
||||
.BR fcntl (2).
|
||||
@@ -2390,6 +2399,10 @@ that are really options to
|
||||
@@ -2525,6 +2534,10 @@ that are really options to
|
||||
.BR \%losetup (8).
|
||||
(These options can be used in addition to those specific
|
||||
to the filesystem type.)
|
||||
@ -418,10 +421,10 @@ Index: util-linux-ng-2.16/mount/mount.8
|
||||
|
||||
If no explicit loop device is mentioned
|
||||
(but just an option `\fB\-o loop\fP' is given), then
|
||||
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
|
||||
diff --git a/mount/mount.c b/mount/mount.c
|
||||
index efe1165..09006f7 100644
|
||||
--- a/mount/mount.c
|
||||
+++ b/mount/mount.c
|
||||
@@ -95,6 +95,9 @@ struct mountargs {
|
||||
void *data;
|
||||
};
|
||||
@ -438,9 +441,9 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
*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);
|
||||
static int check_special_mountprog(const char *spec, const char *node,
|
||||
@@ -215,6 +219,8 @@ static struct string_opt_map {
|
||||
@@ -216,6 +220,8 @@ static struct string_opt_map {
|
||||
{ "offset=", 0, &opt_offset },
|
||||
{ "sizelimit=", 0, &opt_sizelimit },
|
||||
{ "encryption=", 0, &opt_encryption },
|
||||
@ -449,7 +452,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
{ "speed=", 0, &opt_speed },
|
||||
{ "comment=", 1, &opt_comment },
|
||||
{ "uhelper=", 0, &opt_uhelper },
|
||||
@@ -1072,7 +1078,8 @@ loop_check(const char **spec, const char
|
||||
@@ -1081,7 +1087,8 @@ loop_check(const char **spec, const char **type, int *flags,
|
||||
*type = opt_vfstype;
|
||||
}
|
||||
|
||||
@ -459,7 +462,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
*loopfile = *spec;
|
||||
|
||||
if (*loop) {
|
||||
@@ -1104,7 +1111,7 @@ loop_check(const char **spec, const char
|
||||
@@ -1113,7 +1120,7 @@ loop_check(const char **spec, const char **type, int *flags,
|
||||
printf(_("mount: going to use the loop device %s\n"), *loopdev);
|
||||
|
||||
if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit,
|
||||
@ -468,7 +471,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
if (res == 2) {
|
||||
/* loop dev has been grabbed by some other process,
|
||||
try again, if not given explicitly */
|
||||
@@ -1865,6 +1872,7 @@ static struct option longopts[] = {
|
||||
@@ -1920,6 +1927,7 @@ static struct option longopts[] = {
|
||||
{ "options", 1, 0, 'o' },
|
||||
{ "test-opts", 1, 0, 'O' },
|
||||
{ "pass-fd", 1, 0, 'p' },
|
||||
@ -476,7 +479,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
{ "types", 1, 0, 't' },
|
||||
{ "bind", 0, 0, 'B' },
|
||||
{ "move", 0, 0, 'M' },
|
||||
@@ -2026,6 +2034,7 @@ main(int argc, char *argv[]) {
|
||||
@@ -2082,6 +2090,7 @@ main(int argc, char *argv[]) {
|
||||
char *options = NULL, *test_opts = NULL, *node;
|
||||
const char *spec = NULL;
|
||||
char *label = NULL;
|
||||
@ -484,7 +487,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
char *uuid = NULL;
|
||||
char *types = NULL;
|
||||
char *p;
|
||||
@@ -2056,7 +2065,7 @@ main(int argc, char *argv[]) {
|
||||
@@ -2112,7 +2121,7 @@ main(int argc, char *argv[]) {
|
||||
initproctitle(argc, argv);
|
||||
#endif
|
||||
|
||||
@ -493,7 +496,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'a': /* mount everything in fstab */
|
||||
@@ -2077,6 +2086,9 @@ main(int argc, char *argv[]) {
|
||||
@@ -2133,6 +2142,9 @@ main(int argc, char *argv[]) {
|
||||
case 'i':
|
||||
external_allowed = 0;
|
||||
break;
|
||||
@ -503,7 +506,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
case 'l':
|
||||
list_with_volumelabel = 1;
|
||||
break;
|
||||
@@ -2215,6 +2227,9 @@ main(int argc, char *argv[]) {
|
||||
@@ -2280,6 +2292,9 @@ main(int argc, char *argv[]) {
|
||||
|
||||
atexit(unlock_mtab);
|
||||
|
||||
@ -513,10 +516,11 @@ Index: util-linux-ng-2.16/mount/mount.c
|
||||
switch (argc+specseen) {
|
||||
case 0:
|
||||
/* mount -a */
|
||||
Index: util-linux-ng-2.16/mount/rmd160.c
|
||||
===================================================================
|
||||
diff --git a/mount/rmd160.c b/mount/rmd160.c
|
||||
new file mode 100644
|
||||
index 0000000..3430954
|
||||
--- /dev/null
|
||||
+++ util-linux-ng-2.16/mount/rmd160.c
|
||||
+++ b/mount/rmd160.c
|
||||
@@ -0,0 +1,532 @@
|
||||
+/* rmd160.c - RIPE-MD160
|
||||
+ * Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
@ -1050,10 +1054,11 @@ Index: util-linux-ng-2.16/mount/rmd160.c
|
||||
+ rmd160_final( &hd );
|
||||
+ memcpy( outbuf, hd.buf, 20 );
|
||||
+}
|
||||
Index: util-linux-ng-2.16/mount/rmd160.h
|
||||
===================================================================
|
||||
diff --git a/mount/rmd160.h b/mount/rmd160.h
|
||||
new file mode 100644
|
||||
index 0000000..4b2c61d
|
||||
--- /dev/null
|
||||
+++ util-linux-ng-2.16/mount/rmd160.h
|
||||
+++ b/mount/rmd160.h
|
||||
@@ -0,0 +1,11 @@
|
||||
+#ifndef RMD160_H
|
||||
+#define RMD160_H
|
||||
@ -1066,10 +1071,11 @@ Index: util-linux-ng-2.16/mount/rmd160.h
|
||||
+#endif /*RMD160_H*/
|
||||
+
|
||||
+
|
||||
Index: util-linux-ng-2.16/mount/sha512.c
|
||||
===================================================================
|
||||
diff --git a/mount/sha512.c b/mount/sha512.c
|
||||
new file mode 100644
|
||||
index 0000000..f717c8b
|
||||
--- /dev/null
|
||||
+++ util-linux-ng-2.16/mount/sha512.c
|
||||
+++ b/mount/sha512.c
|
||||
@@ -0,0 +1,432 @@
|
||||
+/*
|
||||
+ * sha512.c
|
||||
@ -1503,10 +1509,11 @@ Index: util-linux-ng-2.16/mount/sha512.c
|
||||
+ memset(&ctx, 0, sizeof(ctx));
|
||||
+}
|
||||
+#endif
|
||||
Index: util-linux-ng-2.16/mount/sha512.h
|
||||
===================================================================
|
||||
diff --git a/mount/sha512.h b/mount/sha512.h
|
||||
new file mode 100644
|
||||
index 0000000..4b57c01
|
||||
--- /dev/null
|
||||
+++ util-linux-ng-2.16/mount/sha512.h
|
||||
+++ b/mount/sha512.h
|
||||
@@ -0,0 +1,45 @@
|
||||
+/*
|
||||
+ * sha512.h
|
||||
@ -1553,3 +1560,6 @@ Index: util-linux-ng-2.16/mount/sha512.h
|
||||
+/* 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:a6365fcb2b34439faa52164e1a018086c2b6818f8a189c487c79e09dc3c62722
|
||||
size 3470040
|
3
util-linux-ng-2.17.1.tar.bz2
Normal file
3
util-linux-ng-2.17.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e9c019ea3782dc20b82d27c1240009f9e194304a77ac36f51629a487a5181390
|
||||
size 3801027
|
@ -1,24 +0,0 @@
|
||||
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,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package util-linux (Version 2.16)
|
||||
# spec file for package util-linux (Version 2.17.1)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -21,18 +21,16 @@ 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.16
|
||||
Release: 9
|
||||
Requires: %name-lang = %{version}
|
||||
Version: 2.17.1
|
||||
Release: 1
|
||||
Recommends: %name-lang = %{version}
|
||||
Summary: A collection of basic system utilities
|
||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2
|
||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%{version}/%name-ng-%{version}.tar.bz2
|
||||
Source1: util-linux-rpmlintrc
|
||||
Source2: nologin.c
|
||||
Source3: nologin.8
|
||||
@ -43,33 +41,39 @@ 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
|
||||
Source15: cryptoloop.txt
|
||||
# XXX: needed?
|
||||
Source22: setctsid.c
|
||||
Source23: setctsid.8
|
||||
Source26: README.raw
|
||||
# XXX: ppc specific, still needed?
|
||||
Source28: mkzimage_cmdline.8
|
||||
Source29: mkzimage_cmdline.c
|
||||
Source30: README.largedisk
|
||||
Source31: addnote.c
|
||||
#
|
||||
Source26: README.raw
|
||||
Source30: README.largedisk
|
||||
Source50: uuidd.rc
|
||||
Source51: blkid.conf
|
||||
##
|
||||
## util-linux patches
|
||||
##
|
||||
# add hostid
|
||||
# add hostid. FIXME: use the one from coreutils
|
||||
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-mount_losetup_crypto.patch
|
||||
Patch4: util-linux-ng-bnc503008.patch
|
||||
Patch3: util-linux-2.17.1-mount_losetup_crypto.patch
|
||||
##
|
||||
## adjtimex
|
||||
##
|
||||
@ -89,6 +93,9 @@ 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
|
||||
@ -154,7 +161,6 @@ unique IDs (UUIDs).
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
#
|
||||
cd adjtimex-*
|
||||
%patch50 -p1
|
||||
@ -162,7 +168,7 @@ cd -
|
||||
# setctsid
|
||||
cp %{S:22} %{S:23} .
|
||||
# nologin
|
||||
cp %{S:2} %{S:3} %{S:15} %{S:26} %{S:30} .
|
||||
cp %{S:2} %{S:3} %{S:26} %{S:30} .
|
||||
cd ../klogconsole
|
||||
%patch55 -p1 -b .quiet
|
||||
%patch56 -p1
|
||||
@ -216,15 +222,10 @@ 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} \
|
||||
@ -240,9 +241,12 @@ autoreconf -fi
|
||||
--enable-write \
|
||||
--disable-use-tty-group \
|
||||
--disable-static \
|
||||
$BUILD_ENABLE \
|
||||
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
|
||||
%ifarch %ix86 x86_64
|
||||
--enable-rdev \
|
||||
%endif
|
||||
#
|
||||
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}
|
||||
@ -361,7 +365,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv raw}
|
||||
%install_info --entry="* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz
|
||||
txt='* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk'
|
||||
%install_info --entry="$txt" --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
|
||||
@ -455,6 +460,7 @@ fi
|
||||
/sbin/findfs
|
||||
/sbin/fsck
|
||||
/sbin/switch_root
|
||||
/sbin/wipefs
|
||||
/usr/bin/ipcmk
|
||||
/bin/logger
|
||||
/usr/bin/cal
|
||||
@ -464,6 +470,7 @@ fi
|
||||
/usr/bin/colrm
|
||||
/usr/bin/column
|
||||
/usr/bin/ddate
|
||||
/usr/bin/fallocate
|
||||
/usr/bin/flock
|
||||
/usr/bin/getopt
|
||||
/usr/bin/hexdump
|
||||
@ -496,6 +503,7 @@ fi
|
||||
/usr/bin/tailf
|
||||
/usr/bin/taskset
|
||||
/usr/bin/time
|
||||
/usr/bin/unshare
|
||||
/usr/bin/which
|
||||
/usr/sbin/addpart
|
||||
/usr/sbin/delpart
|
||||
@ -524,6 +532,7 @@ 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
|
||||
@ -550,6 +559,7 @@ 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
|
||||
@ -592,6 +602,7 @@ 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