Date: Friday, January 20, 2017 @ 17:47:35 Author: dreisner Revision: 287025
upgpkg: util-linux 2.29.1-1 Modified: util-linux/trunk/PKGBUILD Deleted: util-linux/trunk/0001-chrt-default-to-SCHED_RR-policy.patch util-linux/trunk/0001-lsns-Fix-parser-for-proc-pid-stat-which-is-including.patch util-linux/trunk/0001-sfdisk-cleanup-dump-error-messages.patch util-linux/trunk/0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch -----------------------------------------------------------------+ 0001-chrt-default-to-SCHED_RR-policy.patch | 39 ---- 0001-lsns-Fix-parser-for-proc-pid-stat-which-is-including.patch | 79 ---------- 0001-sfdisk-cleanup-dump-error-messages.patch | 44 ----- 0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch | 70 -------- PKGBUILD | 23 -- 5 files changed, 5 insertions(+), 250 deletions(-) Deleted: 0001-chrt-default-to-SCHED_RR-policy.patch =================================================================== --- 0001-chrt-default-to-SCHED_RR-policy.patch 2017-01-20 17:13:06 UTC (rev 287024) +++ 0001-chrt-default-to-SCHED_RR-policy.patch 2017-01-20 17:47:35 UTC (rev 287025) @@ -1,39 +0,0 @@ -From c7adc2f204f19167f781fa2ee739e0ca386fc4f5 Mon Sep 17 00:00:00 2001 -From: Andreas Henriksson <[email protected]> -Date: Fri, 2 Dec 2016 15:10:18 +0100 -Subject: [PATCH] chrt: default to SCHED_RR policy - -This fixes a regression introduced in: - -commit 7a4ea5664edba98bff28adec3a9c3cfb5763a495 -"chrt: add control struct" - -Previously (and as documented in the manpage) the default policy -was SCHED_RR. Now it's implicitly SCHED_OTHER (0) as the value -is not initialized explicitly anymore. - -Test-command: chrt 90 echo hello - -Reported-by: Patrick Pelissier <[email protected]> -Addresses: http://bugs.debian.org/846572 -Signed-off-by: Andreas Henriksson <[email protected]> ---- - schedutils/chrt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/schedutils/chrt.c b/schedutils/chrt.c -index a861d9f..73d1ffa 100644 ---- a/schedutils/chrt.c -+++ b/schedutils/chrt.c -@@ -409,7 +409,7 @@ static void set_sched(struct chrt_ctl *ctl) - - int main(int argc, char **argv) - { -- struct chrt_ctl _ctl = { .pid = -1 }, *ctl = &_ctl; -+ struct chrt_ctl _ctl = { .pid = -1, .policy = SCHED_RR }, *ctl = &_ctl; - int c; - - static const struct option longopts[] = { --- -2.10.2 - Deleted: 0001-lsns-Fix-parser-for-proc-pid-stat-which-is-including.patch =================================================================== --- 0001-lsns-Fix-parser-for-proc-pid-stat-which-is-including.patch 2017-01-20 17:13:06 UTC (rev 287024) +++ 0001-lsns-Fix-parser-for-proc-pid-stat-which-is-including.patch 2017-01-20 17:47:35 UTC (rev 287025) @@ -1,79 +0,0 @@ -From 3fcbd7978980dc1a29c626b701333e27599e506d Mon Sep 17 00:00:00 2001 -From: OGAWA Hirofumi <[email protected]> -Date: Wed, 23 Nov 2016 14:13:34 +0900 -Subject: [PATCH] lsns: Fix parser for /proc/<pid>/stat which is including - space in comm - -For example, child process of spamd has - - 32031 (spamd child) S 32026 32026 32026 0 -1 4210752 338 0 0 0 ... - -fscanf("%d %*s %c %d*[^\n]") in read_process() can't parse above as we -expected, because %s only skips non-whitespace. I.e. it parses like -following, - - 32031 (spamd child) S 32026 32026 32026 0 -1 4210752 338 0 0 0 ... - +---+ +----+ + - %d %*s %c - -and returns 2 (pid=32031, state=c). - -This fixes it by skipping task->comm part manually. - -Signed-off-by: OGAWA Hirofumi <[email protected]> ---- - sys-utils/lsns.c | 30 ++++++++++++++++++++++++++---- - 1 file changed, 26 insertions(+), 4 deletions(-) - -diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c -index e4fd208..809737c 100644 ---- a/sys-utils/lsns.c -+++ b/sys-utils/lsns.c -@@ -217,6 +217,30 @@ static int get_ns_ino(int dir, const char *nsname, ino_t *ino) - return 0; - } - -+static int parse_proc_stat(FILE *fp, pid_t *pid, char *state, pid_t *ppid) -+{ -+ char *line = NULL, *p; -+ size_t len = 0; -+ int rc; -+ -+ if (getline(&line, &len, fp) < 0) { -+ rc = -errno; -+ goto error; -+ } -+ -+ p = strrchr(line, ')'); -+ if (p == NULL || -+ sscanf(line, "%d (", pid) != 1 || -+ sscanf(p, ") %c %d*[^\n]", state, ppid) != 2) { -+ rc = -EINVAL; -+ goto error; -+ } -+ rc = 0; -+ -+error: -+ free(line); -+ return rc; -+} - - static int read_process(struct lsns *ls, pid_t pid) - { -@@ -255,11 +279,9 @@ static int read_process(struct lsns *ls, pid_t pid) - rc = -errno; - goto done; - } -- rc = fscanf(f, "%d %*s %c %d*[^\n]", &p->pid, &p->state, &p->ppid); -- if (rc != 3) { -- rc = rc < 0 ? -errno : -EINVAL; -+ rc = parse_proc_stat(f, &p->pid, &p->state, &p->ppid); -+ if (rc < 0) - goto done; -- } - rc = 0; - - for (i = 0; i < ARRAY_SIZE(p->ns_ids); i++) { --- -2.10.2 - Deleted: 0001-sfdisk-cleanup-dump-error-messages.patch =================================================================== --- 0001-sfdisk-cleanup-dump-error-messages.patch 2017-01-20 17:13:06 UTC (rev 287024) +++ 0001-sfdisk-cleanup-dump-error-messages.patch 2017-01-20 17:47:35 UTC (rev 287025) @@ -1,44 +0,0 @@ -From c49b765a6e9031642e2bb846e93dddc6827e4b28 Mon Sep 17 00:00:00 2001 -From: Karel Zak <[email protected]> -Date: Wed, 30 Nov 2016 10:53:56 +0100 -Subject: [PATCH] sfdisk: cleanup --dump error messages - -old: - # truncate -s 1G empty && ./sfdisk --dump empty - sfdisk: failed to dump partition table: Success - -new: - # truncate -s 1G empty && ./sfdisk --dump empty - sfdisk: empty: does not contain a recognized partition table. - -Addresses: https://github.com/karelzak/util-linux/issues/375 -Signed-off-by: Karel Zak <[email protected]> ---- - disk-utils/sfdisk.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c -index 0f69d65..10307ad 100644 ---- a/disk-utils/sfdisk.c -+++ b/disk-utils/sfdisk.c -@@ -950,13 +950,16 @@ static int command_dump(struct sfdisk *sf, int argc, char **argv) - if (rc) - err(EXIT_FAILURE, _("cannot open %s"), devname); - -+ if (!fdisk_has_label(sf->cxt)) -+ errx(EXIT_FAILURE, _("%s: does not contain a recognized partition table"), devname); -+ - dp = fdisk_new_script(sf->cxt); - if (!dp) - err(EXIT_FAILURE, _("failed to allocate dump struct")); - - rc = fdisk_script_read_context(dp, NULL); - if (rc) -- err(EXIT_FAILURE, _("failed to dump partition table")); -+ errx(EXIT_FAILURE, _("%s: failed to dump partition table"), devname); - - if (sf->json) - fdisk_script_enable_json(dp, 1); --- -2.10.2 - Deleted: 0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch =================================================================== --- 0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch 2017-01-20 17:13:06 UTC (rev 287024) +++ 0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch 2017-01-20 17:47:35 UTC (rev 287025) @@ -1,70 +0,0 @@ -From fed304837f60b626f6198663990e76e506f89063 Mon Sep 17 00:00:00 2001 -From: Karel Zak <[email protected]> -Date: Tue, 29 Nov 2016 15:58:18 +0100 -Subject: [PATCH] sfdisk: don't be silent when list non-existing device - -Addresses: https://github.com/karelzak/util-linux/issues/376 -Signed-off-by: Karel Zak <[email protected]> ---- - disk-utils/sfdisk.c | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c -index 52f2a6d..0f69d65 100644 ---- a/disk-utils/sfdisk.c -+++ b/disk-utils/sfdisk.c -@@ -560,6 +560,7 @@ static int write_changes(struct sfdisk *sf) - */ - static int command_list_partitions(struct sfdisk *sf, int argc, char **argv) - { -+ int fail = 0; - fdisk_enable_listonly(sf->cxt, 1); - - if (argc) { -@@ -568,13 +569,14 @@ static int command_list_partitions(struct sfdisk *sf, int argc, char **argv) - for (i = 0; i < argc; i++) { - if (ct) - fputs("\n\n", stdout); -- if (print_device_pt(sf->cxt, argv[i], 0, sf->verify) == 0) -- ct++; -+ if (print_device_pt(sf->cxt, argv[i], 1, sf->verify) != 0) -+ fail++; -+ ct++; - } - } else - print_all_devices_pt(sf->cxt, sf->verify); - -- return 0; -+ return fail; - } - - /* -@@ -582,6 +584,7 @@ static int command_list_partitions(struct sfdisk *sf, int argc, char **argv) - */ - static int command_list_freespace(struct sfdisk *sf, int argc, char **argv) - { -+ int fail = 0; - fdisk_enable_listonly(sf->cxt, 1); - - if (argc) { -@@ -590,13 +593,14 @@ static int command_list_freespace(struct sfdisk *sf, int argc, char **argv) - for (i = 0; i < argc; i++) { - if (ct) - fputs("\n\n", stdout); -- if (print_device_freespace(sf->cxt, argv[i], 0) == 0) -- ct++; -+ if (print_device_freespace(sf->cxt, argv[i], 1) != 0) -+ fail++; -+ ct++; - } - } else - print_all_devices_freespace(sf->cxt); - -- return 0; -+ return fail; - } - - /* --- -2.10.2 - Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-01-20 17:13:06 UTC (rev 287024) +++ PKGBUILD 2017-01-20 17:47:35 UTC (rev 287025) @@ -6,8 +6,8 @@ pkgbase=util-linux pkgname=(util-linux libutil-linux) _pkgmajor=2.29 -pkgver=${_pkgmajor} -pkgrel=2 +pkgver=${_pkgmajor}.1 +pkgrel=1 pkgdesc="Miscellaneous system utilities for Linux" url="https://www.kernel.org/pub/linux/utils/util-linux/" arch=('i686' 'x86_64') @@ -17,30 +17,18 @@ validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak source=("https://www.kernel.org/pub/linux/utils/util-linux/v$_pkgmajor/$pkgbase-$pkgver.tar."{xz,sign} pam-{login,common,su} - '0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch' - '0001-sfdisk-cleanup-dump-error-messages.patch' - '0001-sfdisk-support-empty-label-use-case.patch' - '0001-chrt-default-to-SCHED_RR-policy.patch' - '0001-lsns-Fix-parser-for-proc-pid-stat-which-is-including.patch') -md5sums=('07b6845f48a421ad5844aa9d58edb837' + '0001-sfdisk-support-empty-label-use-case.patch') +md5sums=('0cbb6d16ab9c5736e5649ef1264bee6e' 'SKIP' '4368b3f98abd8a32662e094c54e7f9b1' 'a31374fef2cba0ca34dfc7078e2969e4' 'fa85e5cce5d723275b14365ba71a8aad' - '3fce7192ce1b3d97fdffd0226ed63a90' - '2f3c061865360170cacda948035fd02d' - '6d2e3915124938577f0ff18ef701c87f' - '168c1cb2cfe7d4eddfc6e3f3b19d3ced' - '68c2076a9a09564ba0c9776540a175fa') + '6d2e3915124938577f0ff18ef701c87f') prepare() { cd "$pkgbase-$pkgver" - patch -Np1 <../0001-sfdisk-don-t-be-silent-when-list-non-existing-device.patch - patch -Np1 <../0001-sfdisk-cleanup-dump-error-messages.patch patch -Np1 <../0001-sfdisk-support-empty-label-use-case.patch - patch -Np1 <../0001-chrt-default-to-SCHED_RR-policy.patch - patch -Np1 <../0001-lsns-Fix-parser-for-proc-pid-stat-which-is-including.patch } build() { @@ -57,7 +45,6 @@ --enable-chfn-chsh \ --enable-write \ --enable-mesg \ - --disable-tailf \ --with-python=3 make
