forked from pool/util-linux
Accepting request 106894 from Base:System
- update to util-linux-2.21 OBS-URL: https://build.opensuse.org/request/show/106894 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=143
This commit is contained in:
parent
1d0a43fc86
commit
d21c638325
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:527a20975cbcffb39ab122867c4a9438cf09e7d1e01a06eaa2f340de282a4c95
|
||||
size 75184
|
3
adjtimex_1.29.orig.tar.gz
Normal file
3
adjtimex_1.29.orig.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:04b9e8b66e77276ed07e78de89af37fd1aa12725923de853480827c4fafd176a
|
||||
size 85551
|
@ -1,7 +1,7 @@
|
||||
Index: util-linux-2.20.1/fdisk/Makefile.am
|
||||
Index: util-linux-2.21-rc2/fdisk/Makefile.am
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/fdisk/Makefile.am
|
||||
+++ util-linux-2.20.1/fdisk/Makefile.am
|
||||
--- util-linux-2.21-rc2.orig/fdisk/Makefile.am
|
||||
+++ util-linux-2.21-rc2/fdisk/Makefile.am
|
||||
@@ -64,9 +64,13 @@ sbin_PROGRAMS += cfdisk
|
||||
dist_man_MANS += cfdisk.8
|
||||
cfdisk_SOURCES = cfdisk.c $(fdisk_common)
|
||||
|
@ -1,94 +0,0 @@
|
||||
From e31741980762744352890d37522cbf4dd0ced9c4 Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Wed, 2 Nov 2011 15:51:45 +0100
|
||||
Subject: [PATCH] fsck: use FS blacklist for non-all mode too
|
||||
|
||||
Reported-by: Lennart Poettering <lennart@poettering.net>
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
||||
---
|
||||
fsck/fsck.c | 43 +++++++++++++++++++++++++++++++++++++++----
|
||||
1 files changed, 39 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: util-linux-2.20.1/fsck/fsck.c
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/fsck/fsck.c
|
||||
+++ util-linux-2.20.1/fsck/fsck.c
|
||||
@@ -57,14 +57,35 @@
|
||||
#include "xalloc.h"
|
||||
|
||||
static const char *ignored_types[] = {
|
||||
+ "9p",
|
||||
+ "afs",
|
||||
+ "autofs",
|
||||
+ "binfmt_misc",
|
||||
+ "cgroup",
|
||||
+ "cifs",
|
||||
+ "cpuset",
|
||||
+ "debugfs",
|
||||
+ "devfs",
|
||||
+ "devpts",
|
||||
+ "devtmpfs",
|
||||
+ "dlmfs",
|
||||
+ "fusectl",
|
||||
+ "fuse.gvfs-fuse-daemon",
|
||||
+ "hugetlbfs",
|
||||
"ignore",
|
||||
"iso9660",
|
||||
+ "mqueue"
|
||||
+ "ncpfs",
|
||||
"nfs",
|
||||
"proc",
|
||||
+ "rpc_pipefs",
|
||||
+ "securityfs",
|
||||
+ "smbfs",
|
||||
+ "spufs",
|
||||
"sw",
|
||||
"swap",
|
||||
+ "sysfs",
|
||||
"tmpfs",
|
||||
- "devpts",
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -953,6 +974,18 @@ static int device_exists(const char *dev
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static int ignored_type(const char *fstype)
|
||||
+{
|
||||
+ const char **ip;
|
||||
+
|
||||
+ for(ip = ignored_types; *ip; ip++) {
|
||||
+ if (strcmp(fstype, *ip) == 0)
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* Check if we should ignore this filesystem. */
|
||||
static int ignore(struct fs_info *fs)
|
||||
{
|
||||
@@ -1000,8 +1033,8 @@ static int ignore(struct fs_info *fs)
|
||||
if (!fs_match(fs, &fs_type_compiled)) return 1;
|
||||
|
||||
/* Are we ignoring this type? */
|
||||
- for(ip = ignored_types; *ip; ip++)
|
||||
- if (strcmp(fs->type, *ip) == 0) return 1;
|
||||
+ if (fs->type && ignored_type(fs->type))
|
||||
+ return 1;
|
||||
|
||||
/* Do we really really want to check this fs? */
|
||||
for(ip = really_wanted; *ip; ip++)
|
||||
@@ -1461,7 +1494,9 @@ int main(int argc, char *argv[])
|
||||
0, -1, -1);
|
||||
if (!fs)
|
||||
continue;
|
||||
- }
|
||||
+ } else if (fs->type && ignored_type(fs->type))
|
||||
+ continue;
|
||||
+
|
||||
if (ignore_mounted && is_mounted(fs->device))
|
||||
continue;
|
||||
status |= fsck_device(fs, interactive);
|
@ -1,99 +0,0 @@
|
||||
From 6107377322d5d6866c3aa363def656fdf68311e6 Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Tue, 8 Nov 2011 21:47:23 +0100
|
||||
Subject: [PATCH] libmount: fix chdir to parent for restricted (user) umounts
|
||||
|
||||
Reported-by: Petr Uzel <petr.uzel@suse.cz>
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
||||
---
|
||||
libmount/src/utils.c | 41 +++++++++++++++++++++++++----------------
|
||||
1 files changed, 25 insertions(+), 16 deletions(-)
|
||||
|
||||
Index: util-linux-2.20.1/libmount/src/utils.c
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/libmount/src/utils.c
|
||||
+++ util-linux-2.20.1/libmount/src/utils.c
|
||||
@@ -62,34 +62,40 @@ static char *stripoff_last_component(cha
|
||||
if (!p)
|
||||
return NULL;
|
||||
*p = '\0';
|
||||
- return ++p;
|
||||
+ return p + 1;
|
||||
}
|
||||
|
||||
-/* Note that the @target has to be absolute path (so at least "/")
|
||||
+/*
|
||||
+ * Note that the @target has to be absolute path (so at least "/"). The
|
||||
+ * @filename returns allocated buffer with last path component, for example:
|
||||
+ *
|
||||
+ * mnt_chdir_to_parent("/mnt/test", &buf) ==> chdir("/mnt"), buf="test"
|
||||
*/
|
||||
int mnt_chdir_to_parent(const char *target, char **filename)
|
||||
{
|
||||
- char *path, *last = NULL;
|
||||
+ char *buf, *parent, *last = NULL;
|
||||
char cwd[PATH_MAX];
|
||||
int rc = -EINVAL;
|
||||
|
||||
if (!target || *target != '/')
|
||||
return -EINVAL;
|
||||
|
||||
- path = strdup(target);
|
||||
- if (!path)
|
||||
+ DBG(UTILS, mnt_debug("moving to %s parent", target));
|
||||
+
|
||||
+ buf = strdup(target);
|
||||
+ if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
- if (*(path + 1) != '\0') {
|
||||
- last = stripoff_last_component(path);
|
||||
+ if (*(buf + 1) != '\0') {
|
||||
+ last = stripoff_last_component(buf);
|
||||
if (!last)
|
||||
goto err;
|
||||
}
|
||||
- if (!*path)
|
||||
- *path = '/'; /* root */
|
||||
|
||||
- if (chdir(path) == -1) {
|
||||
- DBG(UTILS, mnt_debug("failed to chdir to %s: %m", path));
|
||||
+ parent = buf && *buf ? buf : "/";
|
||||
+
|
||||
+ if (chdir(parent) == -1) {
|
||||
+ DBG(UTILS, mnt_debug("failed to chdir to %s: %m", parent));
|
||||
rc = -errno;
|
||||
goto err;
|
||||
}
|
||||
@@ -98,14 +104,17 @@ int mnt_chdir_to_parent(const char *targ
|
||||
rc = -errno;
|
||||
goto err;
|
||||
}
|
||||
- if (strcmp(cwd, path) != 0) {
|
||||
- DBG(UTILS, mnt_debug("path moved (%s -> %s)", path, cwd));
|
||||
+ if (strcmp(cwd, parent) != 0) {
|
||||
+ DBG(UTILS, mnt_debug(
|
||||
+ "unexpected chdir (expected=%s, cwd=%s)", parent, cwd));
|
||||
goto err;
|
||||
}
|
||||
|
||||
- DBG(CXT, mnt_debug("current directory moved to %s", path));
|
||||
+ DBG(CXT, mnt_debug(
|
||||
+ "current directory moved to %s [last_component='%s']",
|
||||
+ parent, last));
|
||||
|
||||
- *filename = path;
|
||||
+ *filename = buf;
|
||||
|
||||
if (!last || !*last)
|
||||
memcpy(*filename, ".", 2);
|
||||
@@ -113,7 +122,7 @@ int mnt_chdir_to_parent(const char *targ
|
||||
memcpy(*filename, last, strlen(last) + 1);
|
||||
return 0;
|
||||
err:
|
||||
- free(path);
|
||||
+ free(buf);
|
||||
return rc;
|
||||
}
|
||||
|
@ -1,218 +0,0 @@
|
||||
From b106d052383083b80c0dc41f1555d2661db00374 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Uzel <petr.uzel@suse.cz>
|
||||
Date: Tue, 8 Nov 2011 16:25:01 +0100
|
||||
Subject: [PATCH] libmount: ignore tailing slash in netfs source paths
|
||||
|
||||
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=728480
|
||||
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
---
|
||||
include/strutils.h | 2 ++
|
||||
lib/strutils.c | 32 ++++++++++++++++++++++++++++++++
|
||||
libmount/src/fs.c | 5 +++--
|
||||
libmount/src/tab.c | 17 ++++++++++++-----
|
||||
libmount/src/tab_parse.c | 11 +++++++++--
|
||||
mount/fstab.c | 3 ++-
|
||||
6 files changed, 60 insertions(+), 10 deletions(-)
|
||||
|
||||
Index: util-linux-2.20.1/include/strutils.h
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/include/strutils.h
|
||||
+++ util-linux-2.20.1/include/strutils.h
|
||||
@@ -44,4 +44,6 @@ extern int string_to_idarray(const char
|
||||
extern int string_to_bitarray(const char *list, char *ary,
|
||||
int (*name2bit)(const char *, size_t));
|
||||
|
||||
+extern int streq_except_trailing_slash(const char *s1, const char *s2);
|
||||
+
|
||||
#endif
|
||||
Index: util-linux-2.20.1/lib/strutils.c
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/lib/strutils.c
|
||||
+++ util-linux-2.20.1/lib/strutils.c
|
||||
@@ -437,6 +437,40 @@ int string_to_bitarray(const char *list,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+
|
||||
+/*
|
||||
+ * Compare two strings for equality, ignoring at most one trailing
|
||||
+ * slash.
|
||||
+ */
|
||||
+int streq_except_trailing_slash(const char *s1, const char *s2)
|
||||
+{
|
||||
+ int equal;
|
||||
+
|
||||
+ if (!s1 && !s2)
|
||||
+ return 1;
|
||||
+ if (!s1 || !s2)
|
||||
+ return 0;
|
||||
+
|
||||
+ equal = !strcmp(s1, s2);
|
||||
+
|
||||
+ if (!equal) {
|
||||
+ size_t len1 = strlen(s1);
|
||||
+ size_t len2 = strlen(s2);
|
||||
+
|
||||
+ if (len1 && *(s1 + len1 - 1) == '/')
|
||||
+ len1--;
|
||||
+ if (len2 && *(s2 + len2 - 1) == '/')
|
||||
+ len2--;
|
||||
+ if (len1 != len2)
|
||||
+ return 0;
|
||||
+
|
||||
+ equal = !strncmp(s1, s2, len1);
|
||||
+ }
|
||||
+
|
||||
+ return equal;
|
||||
+}
|
||||
+
|
||||
+
|
||||
#ifdef TEST_PROGRAM
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
Index: util-linux-2.20.1/libmount/src/fs.c
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/libmount/src/fs.c
|
||||
+++ util-linux-2.20.1/libmount/src/fs.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include "mountP.h"
|
||||
+#include "strutils.h"
|
||||
|
||||
/**
|
||||
* mnt_new_fs:
|
||||
@@ -1142,7 +1143,7 @@ int mnt_fs_match_source(struct libmnt_fs
|
||||
return 0;
|
||||
|
||||
/* 1) native paths/tags */
|
||||
- if (!strcmp(source, fs->source))
|
||||
+ if (streq_except_trailing_slash(source, fs->source))
|
||||
return 1;
|
||||
|
||||
if (!cache)
|
||||
@@ -1156,7 +1157,7 @@ int mnt_fs_match_source(struct libmnt_fs
|
||||
|
||||
/* 2) canonicalized and native */
|
||||
src = mnt_fs_get_srcpath(fs);
|
||||
- if (src && !strcmp(cn, src))
|
||||
+ if (src && streq_except_trailing_slash(cn, src))
|
||||
return 1;
|
||||
|
||||
/* 3) canonicalized and canonicalized */
|
||||
Index: util-linux-2.20.1/libmount/src/tab.c
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/libmount/src/tab.c
|
||||
+++ util-linux-2.20.1/libmount/src/tab.c
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <blkid.h>
|
||||
|
||||
#include "mountP.h"
|
||||
+#include "strutils.h"
|
||||
|
||||
/**
|
||||
* mnt_new_table:
|
||||
@@ -506,7 +507,7 @@ struct libmnt_fs *mnt_table_find_srcpath
|
||||
|
||||
if (path == NULL && src == NULL)
|
||||
return fs; /* source is "none" */
|
||||
- if (p && strcmp(p, path) == 0)
|
||||
+ if (path && p && streq_except_trailing_slash(p, path))
|
||||
return fs;
|
||||
if (!p && src)
|
||||
ntags++; /* mnt_fs_get_srcpath() returs nothing, it's TAG */
|
||||
@@ -520,7 +521,7 @@ struct libmnt_fs *mnt_table_find_srcpath
|
||||
mnt_reset_iter(&itr, direction);
|
||||
while(mnt_table_next_fs(tb, &itr, &fs) == 0) {
|
||||
p = mnt_fs_get_srcpath(fs);
|
||||
- if (p && strcmp(p, cn) == 0)
|
||||
+ if (p && streq_except_trailing_slash(p, cn))
|
||||
return fs;
|
||||
}
|
||||
}
|
||||
@@ -551,7 +552,7 @@ struct libmnt_fs *mnt_table_find_srcpath
|
||||
if (mnt_fs_get_tag(fs, &t, &v))
|
||||
continue;
|
||||
x = mnt_resolve_tag(t, v, tb->cache);
|
||||
- if (x && !strcmp(x, cn))
|
||||
+ if (x && streq_except_trailing_slash(x, cn))
|
||||
return fs;
|
||||
}
|
||||
}
|
||||
@@ -566,7 +567,7 @@ struct libmnt_fs *mnt_table_find_srcpath
|
||||
p = mnt_fs_get_srcpath(fs);
|
||||
if (p)
|
||||
p = mnt_resolve_path(p, tb->cache);
|
||||
- if (p && strcmp(cn, p) == 0)
|
||||
+ if (p && streq_except_trailing_slash(cn, p))
|
||||
return fs;
|
||||
}
|
||||
}
|
||||
@@ -856,8 +857,14 @@ int mnt_table_is_fs_mounted(struct libmn
|
||||
*t = mnt_fs_get_target(fs),
|
||||
*r = mnt_fs_get_root(fs);
|
||||
|
||||
- if (s && t && r && !strcmp(t, tgt) &&
|
||||
- !strcmp(s, src) && !strcmp(r, root))
|
||||
+ /*
|
||||
+ * Note that kernel can add tailing slash to the
|
||||
+ * network filesystem source paths.
|
||||
+ */
|
||||
+ if (t && s && r &&
|
||||
+ strcmp(t, tgt) == 0 &&
|
||||
+ streq_except_trailing_slash(s, src) &&
|
||||
+ strcmp(r, root) == 0)
|
||||
break;
|
||||
}
|
||||
if (fs)
|
||||
Index: util-linux-2.20.1/libmount/src/tab_parse.c
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/libmount/src/tab_parse.c
|
||||
+++ util-linux-2.20.1/libmount/src/tab_parse.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "mangle.h"
|
||||
#include "mountP.h"
|
||||
#include "pathnames.h"
|
||||
+#include "strutils.h"
|
||||
|
||||
static inline char *skip_spaces(char *s)
|
||||
{
|
||||
@@ -654,8 +655,14 @@ static struct libmnt_fs *mnt_table_merge
|
||||
if (fs->flags & MNT_FS_MERGED)
|
||||
continue;
|
||||
|
||||
- if (s && t && r && !strcmp(t, target) &&
|
||||
- !strcmp(s, src) && !strcmp(r, root))
|
||||
+ /*
|
||||
+ * Note that kernel can add tailing slash to the network
|
||||
+ * filesystem source path
|
||||
+ */
|
||||
+ if (s && t && r &&
|
||||
+ strcmp(t, target) == 0 &&
|
||||
+ streq_except_trailing_slash(s, src) &&
|
||||
+ strcmp(r, root) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
Index: util-linux-2.20.1/mount/fstab.c
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/mount/fstab.c
|
||||
+++ util-linux-2.20.1/mount/fstab.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "pathnames.h"
|
||||
#include "nls.h"
|
||||
#include "usleep.h"
|
||||
+#include "strutils.h"
|
||||
|
||||
#define streq(s, t) (strcmp ((s), (t)) == 0)
|
||||
|
||||
@@ -436,7 +437,7 @@ getfs_by_devdir (const char *dev, const
|
||||
ok = has_uuid(dev, fs + 5);
|
||||
} else {
|
||||
fs = canonicalize_spec(mc->m.mnt_fsname);
|
||||
- ok = streq(fs, dev);
|
||||
+ ok = streq_except_trailing_slash(fs, dev);
|
||||
my_free(fs);
|
||||
}
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
Index: util-linux-ng-2.18/fdisk/fdisk.c
|
||||
Index: util-linux-2.21-rc2/fdisk/fdisk.c
|
||||
===================================================================
|
||||
--- util-linux-ng-2.18.orig/fdisk/fdisk.c 2010-06-30 14:44:25.000000000 +0200
|
||||
+++ util-linux-ng-2.18/fdisk/fdisk.c 2010-07-08 14:35:07.000000000 +0200
|
||||
@@ -1838,6 +1838,7 @@ static void check_consistency(struct par
|
||||
--- util-linux-2.21-rc2.orig/fdisk/fdisk.c
|
||||
+++ util-linux-2.21-rc2/fdisk/fdisk.c
|
||||
@@ -1767,6 +1767,7 @@ static void check_consistency(struct par
|
||||
/* compute logical ending (c, h, s) */
|
||||
long2chs(get_start_sect(p) + get_nr_sects(p) - 1, &lec, &leh, &les);
|
||||
|
||||
@ -10,7 +10,7 @@ Index: util-linux-ng-2.18/fdisk/fdisk.c
|
||||
/* Same physical / logical beginning? */
|
||||
if (cylinders <= 1024 && (pbc != lbc || pbh != lbh || pbs != lbs)) {
|
||||
printf(_("Partition %d has different physical/logical "
|
||||
@@ -1854,7 +1855,6 @@ static void check_consistency(struct par
|
||||
@@ -1783,7 +1784,6 @@ static void check_consistency(struct par
|
||||
printf(_("logical=(%d, %d, %d)\n"),lec, leh, les);
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
BIN
util-linux-2.20.1.tar.bz2
(Stored with Git LFS)
BIN
util-linux-2.20.1.tar.bz2
(Stored with Git LFS)
Binary file not shown.
BIN
util-linux-2.21.tar.bz2
(Stored with Git LFS)
Normal file
BIN
util-linux-2.21.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,52 +0,0 @@
|
||||
From 131b477b61c7eb82aef913bae5aec63f019b7076 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Uzel <petr.uzel@suse.cz>
|
||||
Date: Tue, 1 Nov 2011 16:17:57 +0100
|
||||
Subject: [PATCH] dmesg: fix printing of multibyte characters
|
||||
|
||||
Also make it compile if HAVE_WIDECHAR is not defined.
|
||||
|
||||
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=725993
|
||||
Reported-by: Harald Koenig <koenig@linux.de>
|
||||
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
|
||||
---
|
||||
sys-utils/dmesg.c | 16 ++++++++--------
|
||||
1 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
Index: util-linux-2.20.1/sys-utils/dmesg.c
|
||||
===================================================================
|
||||
--- util-linux-2.20.1.orig/sys-utils/dmesg.c
|
||||
+++ util-linux-2.20.1/sys-utils/dmesg.c
|
||||
@@ -391,10 +391,11 @@ static void safe_fwrite(const char *buf,
|
||||
for (i = 0; i < size; i++) {
|
||||
const char *p = buf + i;
|
||||
int rc, hex = 0;
|
||||
+ size_t len = 1;
|
||||
|
||||
#ifdef HAVE_WIDECHAR
|
||||
wchar_t wc;
|
||||
- size_t len = mbrtowc(&wc, p, size - i, &s);
|
||||
+ len = mbrtowc(&wc, p, size - i, &s);
|
||||
|
||||
if (len == 0) /* L'\0' */
|
||||
return;
|
||||
@@ -402,16 +403,15 @@ static void safe_fwrite(const char *buf,
|
||||
if (len == (size_t)-1 || len == (size_t)-2) { /* invalid sequence */
|
||||
memset(&s, 0, sizeof (s));
|
||||
len = hex = 1;
|
||||
-
|
||||
} else if (len > 1 && !iswprint(wc)) { /* non-printable multibyte */
|
||||
hex = 1;
|
||||
- } else
|
||||
-#endif
|
||||
- {
|
||||
+ }
|
||||
+ i += len - 1;
|
||||
+#else
|
||||
if (!isprint((unsigned int) *p) &&
|
||||
!isspace((unsigned int) *p)) /* non-printable */
|
||||
hex = 1;
|
||||
- }
|
||||
+#endif
|
||||
if (hex)
|
||||
rc = fwrite_hex(p, len, out);
|
||||
else
|
@ -1,4 +1,7 @@
|
||||
addFilter("init-script-without-%stop_on_removal-preun /etc/init.d/raw")
|
||||
addFilter("init-script-without-%restart_on_update-postun /etc/init.d/raw")
|
||||
addFilter("incoherent-init-script-name raw")
|
||||
addFilter("no-reload-entry /etc/init.d/raw")
|
||||
# There is no egrep(1) used -> False positive
|
||||
addFilter("deprecated-grep")
|
||||
|
||||
|
@ -1,3 +1,65 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 21 13:46:25 UTC 2012 - puzel@suse.com
|
||||
|
||||
- update to util-linux-2.21
|
||||
chcpu(8):
|
||||
- new command
|
||||
prlimit(1):
|
||||
- new command
|
||||
losetup(8):
|
||||
- the command has been rewritten, features:
|
||||
* supports 64bit ioctls only
|
||||
* losetup -a does not require root permissions
|
||||
* uses new /dev/loop-control kernel API
|
||||
* supports new command line option --partscan to enable
|
||||
kernel partition table parser
|
||||
agetty(8):
|
||||
- supports new command line options --nohints to disable hints
|
||||
about Num, Caps and Scroll Locks
|
||||
- supports new command line option --remote to add a hostname
|
||||
to the login(1) command line
|
||||
dmesg(1):
|
||||
- supports new command line options --file to read the log from
|
||||
a file rather than from kernel buffer
|
||||
fallocate(8):
|
||||
- supports new command line options --punch-hole to punch holes
|
||||
in the file
|
||||
findmnt(8):
|
||||
- supports alternative location of the fstab file
|
||||
ipcrm(8):
|
||||
- supports new command line option --all to remove all resources
|
||||
lscpu(1):
|
||||
- supports new command line options --all, --offline and
|
||||
--online to list all, offline or online CPUs
|
||||
- supports s390 topology description (polarization, books, ...)
|
||||
partx(8):
|
||||
- supports partitioned loop devices
|
||||
wipefs(8):
|
||||
- allows to zap partition tables
|
||||
- supports new command line option "--type <list>" to wipe only
|
||||
specified filesystems, RAIDs or partition table types
|
||||
libblkid:
|
||||
- provides new function blkid_do_wipe() to remove all
|
||||
signatures from the given block device.
|
||||
- disable elvtune (works only with 2.4 kernel)
|
||||
- drop patches which are upstream now:
|
||||
- drop fsck-use-FS-blacklist-for-non-all-mode-too.patch
|
||||
- drop util-linux-dmesg-fix-printing-of-multibyte-characters.patch
|
||||
- libmount-ignore-tailing-slash-in-netfs-source-paths.patch
|
||||
- libmount-fix-chdir-to-parent-for-restricted-user-umo.patch
|
||||
- update to adjtimex-1.29
|
||||
- use fdupes to symlink duplicate manpages
|
||||
- disabled make check for time (noop)
|
||||
- libraries back to %{_libdir}, /usr merge project (by
|
||||
crrodriguez@opensuse.org)
|
||||
- drop cryptoloop support (provided by dm-crypt)
|
||||
- util-linux-2.17.1-mount_losetup_crypto.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 7 14:48:23 UTC 2012 - jengelh@medozas.de
|
||||
|
||||
- Remove redundant tags/sections
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 25 22:19:44 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
116
util-linux.spec
116
util-linux.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package util-linux
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 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
|
||||
@ -15,12 +15,14 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define time_ver 1.7
|
||||
%define which_ver 2.20
|
||||
%define adjtimex_ver 1.28
|
||||
%define adjtimex_ver 1.29
|
||||
|
||||
Name: util-linux
|
||||
BuildRequires: audit-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libsepol-devel
|
||||
@ -30,7 +32,7 @@ BuildRequires: pam-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: zlib-devel
|
||||
Version: 2.20.1
|
||||
Version: 2.21
|
||||
Release: 0
|
||||
# util-linux is a base package and uuidd pre-requiring pwdutils pulls
|
||||
# that into the core build cycle. pwdutils also pulls in the whole
|
||||
@ -48,7 +50,7 @@ Recommends: %{name}-lang = %{version}
|
||||
Summary: A collection of basic system utilities
|
||||
License: GPL-2.0+
|
||||
Group: System/Base
|
||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v20/%{name}-%{version}.tar.bz2
|
||||
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.21/%{name}-%{version}.tar.bz2
|
||||
Source1: util-linux-rpmlintrc
|
||||
# XXX: make nologin part of login package
|
||||
Source2: nologin.c
|
||||
@ -56,11 +58,9 @@ Source3: nologin.8
|
||||
Source4: raw.init
|
||||
Source5: etc.raw
|
||||
Source6: etc_filesystems
|
||||
# XXX: add libmnt
|
||||
Source7: baselibs.conf
|
||||
# XXX: post upstream?
|
||||
Source9: adjtimex-%{adjtimex_ver}.tar.bz2
|
||||
# XXX: post upstream?
|
||||
# TODO: split to separate package
|
||||
Source9: http://ftp.debian.org/debian/pool/main/a/adjtimex/adjtimex_%{adjtimex_ver}.orig.tar.gz
|
||||
Source11: klogconsole.tar.bz2
|
||||
# TODO: split to separate package
|
||||
Source12: which-%{which_ver}.tar.bz2
|
||||
@ -83,14 +83,8 @@ Source51: blkid.conf
|
||||
##
|
||||
# 241372 - remove legacy warnings from fdisk
|
||||
Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch
|
||||
# crypto patch
|
||||
Patch2: util-linux-2.17.1-mount_losetup_crypto.patch
|
||||
Patch5: util-linux-2.20-libmount-deps.patch
|
||||
Patch6: util-linux-dmesg-fix-printing-of-multibyte-characters.patch
|
||||
Patch7: fsck-use-FS-blacklist-for-non-all-mode-too.patch
|
||||
Patch8: libmount-ignore-tailing-slash-in-netfs-source-paths.patch
|
||||
Patch9: libmount-fix-chdir-to-parent-for-restricted-user-umo.patch
|
||||
Patch10: fdisk-tinfo.patch
|
||||
Patch2: util-linux-2.20-libmount-deps.patch
|
||||
Patch3: fdisk-tinfo.patch
|
||||
|
||||
##
|
||||
## adjtimex
|
||||
@ -183,15 +177,10 @@ Files to develop applications using the libmount library.
|
||||
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q -a 9 -b 11 -b 12 -b 13
|
||||
%setup -q -n %{name}-%{version} -a 9 -b 11 -b 12 -b 13
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch3 -p1
|
||||
|
||||
#
|
||||
cd adjtimex-*
|
||||
@ -221,21 +210,14 @@ cd which-%{which_ver}
|
||||
aclocal --force
|
||||
autoconf --force
|
||||
automake --force-missing --add-missing --foreign
|
||||
%configure --prefix=/usr \
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir} \
|
||||
%{_target_cpu}-suse-linux
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
cd ..
|
||||
# time build
|
||||
cd time-%{time_ver}
|
||||
%{?suse_update_config:%{suse_update_config}}
|
||||
export CFLAGS="%{optflags} -D_GNU_SOURCE "
|
||||
export INSTALL_PROGRAM='$(INSTALL)'
|
||||
%configure --prefix=/usr \
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir} \
|
||||
%{_target_cpu}-suse-linux
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
cd ..
|
||||
# klogconsole build
|
||||
@ -255,10 +237,8 @@ export SUID_LDFLAGS="-pie"
|
||||
%configure \
|
||||
--bindir=/bin \
|
||||
--sbindir=/sbin \
|
||||
--libdir=/%{_lib} \
|
||||
--with-audit \
|
||||
--with-selinux \
|
||||
--enable-elvtune \
|
||||
--enable-mesg \
|
||||
--enable-partx \
|
||||
--enable-raw \
|
||||
@ -269,17 +249,14 @@ export SUID_LDFLAGS="-pie"
|
||||
--disable-mountpoint \
|
||||
--disable-use-tty-group \
|
||||
--disable-static \
|
||||
--disable-silent-rules --disable-rpath
|
||||
--disable-silent-rules \
|
||||
--disable-rpath
|
||||
#
|
||||
make %{?_smp_mflags}
|
||||
#
|
||||
%{__cc} %{optflags} -o nologin nologin.c
|
||||
%{__cc} %{optflags} -o mkzimage_cmdline %{S:29}
|
||||
%{__cc} %{optflags} -o chrp-addnote %{SOURCE31}
|
||||
|
||||
%check
|
||||
cd ../time-%{time_ver}
|
||||
make check
|
||||
%{__cc} -fwhole-program %{optflags} -o nologin nologin.c
|
||||
%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29}
|
||||
%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31}
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}{/etc/init.d,%{_mandir}/man{1,8},/bin,/sbin,/usr/bin,/usr/sbin,%{_infodir}}
|
||||
@ -386,9 +363,8 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \
|
||||
touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt
|
||||
# rcuuidd helper
|
||||
ln -sf ../..%{_sysconfdir}/init.d/uuidd %{buildroot}%{_sbindir}/rcuuidd
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
# remove duplicate manpages
|
||||
%fdupes -s %{buildroot}/%{_mandir}
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv raw}
|
||||
@ -444,8 +420,7 @@ fi
|
||||
|
||||
%post -n libuuid1 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libuuid1
|
||||
/sbin/ldconfig
|
||||
%postun -n libuuid1 -p /sbin/ldconfig
|
||||
|
||||
%verifyscript -n uuidd
|
||||
%verify_permissions -e /usr/sbin/uuidd
|
||||
@ -455,12 +430,21 @@ fi
|
||||
%files -f %{name}.files
|
||||
# Common files for all archs
|
||||
%defattr(-,root,root)
|
||||
%doc login-utils/README.poeigl
|
||||
%doc misc-utils/README.cal
|
||||
%doc mount/README.mount
|
||||
%doc hwclock/README.hwclock
|
||||
%doc text-utils/README.col
|
||||
%doc README.largedisk
|
||||
# util-linux documentation files
|
||||
%doc Documentation/blkid.txt
|
||||
%doc Documentation/cal.txt
|
||||
%doc Documentation/cfdisk.txt
|
||||
%doc Documentation/col.txt
|
||||
%doc Documentation/ddate.txt
|
||||
%doc Documentation/deprecated.txt
|
||||
%doc Documentation/fdisk.txt
|
||||
%doc Documentation/getopt.txt
|
||||
%doc Documentation/howto-debug.txt
|
||||
%doc Documentation/hwclock.txt
|
||||
%doc Documentation/modems-with-agetty.txt
|
||||
%doc Documentation/mount.txt
|
||||
%doc Documentation/pg.txt
|
||||
%doc Documentation/sfdisk.txt
|
||||
%config %attr(744,root,root) %{_sysconfdir}/init.d/raw
|
||||
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/raw
|
||||
%config(noreplace) %{_sysconfdir}/filesystems
|
||||
@ -474,7 +458,6 @@ fi
|
||||
/sbin/adjtimex
|
||||
/sbin/agetty
|
||||
/sbin/blockdev
|
||||
/sbin/elvtune
|
||||
/sbin/ctrlaltdel
|
||||
/sbin/fsck.minix
|
||||
/sbin/fsck.cramfs
|
||||
@ -497,6 +480,7 @@ fi
|
||||
/sbin/fsfreeze
|
||||
/sbin/swaplabel
|
||||
/sbin/fstrim
|
||||
/sbin/chcpu
|
||||
%{_bindir}/ipcmk
|
||||
/bin/logger
|
||||
%{_bindir}/cal
|
||||
@ -525,6 +509,7 @@ fi
|
||||
%{_bindir}/mkzimage_cmdline
|
||||
%endif
|
||||
%{_bindir}/namei
|
||||
%{_bindir}/prlimit
|
||||
%{_bindir}/rename
|
||||
%{_bindir}/renice
|
||||
%{_bindir}/rev
|
||||
@ -577,7 +562,7 @@ fi
|
||||
%{_mandir}/man1/more.1.gz
|
||||
%{_mandir}/man1/namei.1.gz
|
||||
%{_mandir}/man1/ionice.1.gz
|
||||
%{_mandir}/man1/readprofile.1.gz
|
||||
%{_mandir}/man1/prlimit.1.gz
|
||||
%{_mandir}/man1/rename.1.gz
|
||||
%{_mandir}/man1/rev.1.gz
|
||||
%{_mandir}/man1/renice.1.gz
|
||||
@ -600,7 +585,6 @@ fi
|
||||
%{_mandir}/man8/agetty.8.gz
|
||||
%{_mandir}/man8/blockdev.8.gz
|
||||
%{_mandir}/man8/delpart.8.gz
|
||||
%{_mandir}/man8/elvtune.8*
|
||||
%{_mandir}/man8/ctrlaltdel.8.gz
|
||||
%{_mandir}/man8/adjtimex.8.gz
|
||||
%{_mandir}/man8/blkid.8.gz
|
||||
@ -620,6 +604,8 @@ fi
|
||||
%{_mandir}/man8/findmnt.8.gz
|
||||
%{_mandir}/man8/fsfreeze.8.gz
|
||||
%{_mandir}/man8/swaplabel.8.gz
|
||||
%{_mandir}/man8/readprofile.8.gz
|
||||
%{_mandir}/man8/chcpu.8.gz
|
||||
%ifnarch ppc ppc64
|
||||
%{_mandir}/man8/mkzimage_cmdline.8.gz
|
||||
%endif
|
||||
@ -642,12 +628,12 @@ fi
|
||||
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.bash
|
||||
%attr (755,root,root) %{_datadir}/getopt/getopt-parse.tcsh
|
||||
%ifnarch ia64
|
||||
%doc fdisk/README.fdisk
|
||||
#XXX: post our patches upstream
|
||||
#XXX: call fdupes on /usr/share/man
|
||||
/sbin/fdisk
|
||||
%{_mandir}/man8/fdisk.8.gz
|
||||
%endif
|
||||
%ifnarch %sparc ia64
|
||||
%doc fdisk/README.cfdisk
|
||||
%{_mandir}/man8/cfdisk.8.gz
|
||||
%{_mandir}/man8/sfdisk.8.gz
|
||||
/sbin/cfdisk
|
||||
@ -669,8 +655,8 @@ fi
|
||||
|
||||
%files -n libblkid1
|
||||
%defattr(-, root, root)
|
||||
/%{_lib}/libblkid.so.1
|
||||
/%{_lib}/libblkid.so.1.*
|
||||
/%{_libdir}/libblkid.so.1
|
||||
/%{_libdir}/libblkid.so.1.*
|
||||
|
||||
%files -n libblkid-devel
|
||||
%defattr(-, root, root)
|
||||
@ -682,8 +668,8 @@ fi
|
||||
|
||||
%files -n libmount1
|
||||
%defattr(-, root, root)
|
||||
/%{_lib}/libmount.so.1
|
||||
/%{_lib}/libmount.so.1.*
|
||||
/%{_libdir}/libmount.so.1
|
||||
/%{_libdir}/libmount.so.1.*
|
||||
|
||||
%files -n libmount-devel
|
||||
%defattr(-, root, root)
|
||||
@ -698,14 +684,14 @@ fi
|
||||
%attr(-,uuidd,uuidd) %dir %{_localstatedir}/lib/libuuid
|
||||
%ghost %{_localstatedir}/lib/libuuid/clock.txt
|
||||
%attr(-,uuidd,uuidd) %ghost %dir %{_localstatedir}/run/uuidd
|
||||
%{_sysconfdir}/init.d/uuidd
|
||||
%{_initddir}/uuidd
|
||||
%{_mandir}/man8/uuidd.8.gz
|
||||
%{_sbindir}/rcuuidd
|
||||
|
||||
%files -n libuuid1
|
||||
%defattr(-, root, root)
|
||||
/%{_lib}/libuuid.so.1
|
||||
/%{_lib}/libuuid.so.1.*
|
||||
/%{_libdir}/libuuid.so.1
|
||||
/%{_libdir}/libuuid.so.1.*
|
||||
|
||||
%files -n libuuid-devel
|
||||
%defattr(-, root, root)
|
||||
|
Loading…
Reference in New Issue
Block a user