From 40ed02035cec3637909a9350bb757d0237af7766e4032e42440b4633d2cd2554 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 29 Aug 2019 13:29:34 +0000 Subject: [PATCH 1/3] Update to killproc 2.23 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=239 --- killproc-2.18-open_flags.dif | 11 ------ killproc-2.21.dif | 62 ---------------------------------- killproc-2.21.tar.bz2 | 3 -- killproc-2.23.tar.gz | 3 ++ killproc-mntinf-optional.patch | 18 ---------- killproc-sysmacros.patch | 24 ------------- sysvinit.changes | 7 ++++ sysvinit.spec | 14 ++------ 8 files changed, 13 insertions(+), 129 deletions(-) delete mode 100644 killproc-2.18-open_flags.dif delete mode 100644 killproc-2.21.dif delete mode 100644 killproc-2.21.tar.bz2 create mode 100644 killproc-2.23.tar.gz delete mode 100644 killproc-mntinf-optional.patch delete mode 100644 killproc-sysmacros.patch diff --git a/killproc-2.18-open_flags.dif b/killproc-2.18-open_flags.dif deleted file mode 100644 index 29a45ee..0000000 --- a/killproc-2.18-open_flags.dif +++ /dev/null @@ -1,11 +0,0 @@ ---- startproc.c -+++ startproc.c 2014-05-27 12:08:10.498235871 +0000 -@@ -624,7 +624,7 @@ static int do_start(const char *inname, - char * redirect; - if (!(redirect = getenv("REDIRECT"))) - redirect = "/dev/tty"; -- if ((tty = open(redirect,O_WRONLY|O_NONBLOCK,0)) < 0) -+ if ((tty = open(redirect,O_RDWR|O_NONBLOCK,0)) < 0) - error(LSB_PROOF," cannot open %s: %s\n", redirect, strerror(errno)); - dup2(tty, fileno(stdin)); - dup2(tty, fileno(stdout)); diff --git a/killproc-2.21.dif b/killproc-2.21.dif deleted file mode 100644 index b7a73be..0000000 --- a/killproc-2.21.dif +++ /dev/null @@ -1,62 +0,0 @@ ---- - Makefile | 6 ++---- - libinit.c | 7 ++++--- - startproc.c | 4 ++-- - 3 files changed, 8 insertions(+), 9 deletions(-) - ---- Makefile -+++ Makefile 2016-01-25 15:42:08.730864821 +0000 -@@ -15,10 +15,8 @@ DESTDIR = - VERSION = 2.21 - DATE = $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]') - --ifneq ($(INC),) -- LIBS += -lblogger -- COPTS += -DUSE_BLOGD --endif -+ LIBS += -lblogger -lpthread -+ COPTS += -DUSE_BLOGD - - # - # Architecture ---- libinit.c -+++ libinit.c 2016-10-04 13:22:04.272083140 +0000 -@@ -265,7 +265,7 @@ static inline boolean isnetfs(const char - static void init_mounts(void) - { - char point[PATH_MAX+1]; -- char fstype[126]; -+ char fstype[257]; - struct stat st; - int mid, parid, max = 0; - uint maj, min; -@@ -280,7 +280,7 @@ static void init_mounts(void) - - if ((mnt = fopen("/proc/self/mountinfo", "re")) == (FILE*)0) - return; -- while (fscanf(mnt, "%i %i %u:%u %*s %s %*s - %*s %s %*[^\n]", &mid, &parid, &maj, &min, &point[0], &fstype[0]) == 6) { -+ while (fscanf(mnt, "%i %i %u:%u %*s %s %*s - %s %*s %*[^\n]", &mid, &parid, &maj, &min, &point[0], &fstype[0]) == 6) { - const size_t nlen = strlen(point); - MNTINFO *restrict p; - if (posix_memalign((void*)&p, sizeof(void*), alignof(MNTINFO)+(nlen+1)) != 0) { -@@ -626,7 +626,8 @@ static pid_t getsession(const pid_t pid) - { - pid_t session = getsid(pid); - if ((long)session < 0) { -- warn("can not get session id for process %ld!\n", (long)pid); -+ if (errno != ESRCH) -+ warn("can not get session id for process %ld!\n", (long)pid); - session = 1; - } - return session; ---- startproc.c -+++ startproc.c 2014-05-27 12:08:10.000000000 +0000 -@@ -778,7 +778,7 @@ retry: - * to see a process damage. - */ - usleep(10*1000); /* 10 ms time for the child and its child */ -- if (++n < 10) -+ if (++n < 50) - goto retry; - break; - default: diff --git a/killproc-2.21.tar.bz2 b/killproc-2.21.tar.bz2 deleted file mode 100644 index 2c61429..0000000 --- a/killproc-2.21.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:359ffe52eaf1f510d6581cba5d799a3926d8e1f202ddf0d76c20a1c6603e2659 -size 44469 diff --git a/killproc-2.23.tar.gz b/killproc-2.23.tar.gz new file mode 100644 index 0000000..bb360e3 --- /dev/null +++ b/killproc-2.23.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8bae99369eba6fe9b30098c11600629a13628342f534aa5d26b7b7568450f7d +size 54131 diff --git a/killproc-mntinf-optional.patch b/killproc-mntinf-optional.patch deleted file mode 100644 index 82a063c..0000000 --- a/killproc-mntinf-optional.patch +++ /dev/null @@ -1,18 +0,0 @@ -On newer kernels there are more optional parameter fields -before the hyphen - ---- - libinit.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- libinit.c -+++ libinit.c 2019-04-09 12:47:35.913748799 +0000 -@@ -281,7 +281,7 @@ static void init_mounts(void) - - if ((mnt = fopen("/proc/self/mountinfo", "re")) == (FILE*)0) - return; -- while (fscanf(mnt, "%i %i %u:%u %*s %s %*s - %s %*s %*[^\n]", &mid, &parid, &maj, &min, &point[0], &fstype[0]) == 6) { -+ while (fscanf(mnt, "%i %i %u:%u %*s %s %*[^-] - %s %*s %*[^\n]", &mid, &parid, &maj, &min, &point[0], &fstype[0]) == 6) { - const size_t nlen = strlen(point); - MNTINFO *restrict p; - if (posix_memalign((void*)&p, sizeof(void*), alignof(MNTINFO)+(nlen+1)) != 0) { diff --git a/killproc-sysmacros.patch b/killproc-sysmacros.patch deleted file mode 100644 index 5240771..0000000 --- a/killproc-sysmacros.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: killproc-2.21/libinit.c -=================================================================== ---- killproc-2.21.orig/libinit.c -+++ killproc-2.21/libinit.c -@@ -23,6 +23,7 @@ - */ - - #include -+#include - #include "libinit.h" /* Now get the inlined functions */ - #ifndef INITDIR - # define INITDIR "/etc/init.d" -Index: killproc-2.21/rvmtab.c -=================================================================== ---- killproc-2.21.orig/rvmtab.c -+++ killproc-2.21/rvmtab.c -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include - #include - #include "libinit.h" diff --git a/sysvinit.changes b/sysvinit.changes index 0c07a09..b1441f7 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Aug 29 13:25:34 UTC 2019 - Dr. Werner Fink + +- Update to killproc 2.23 + * killproc has its upstream at https://github.com/bitstreamout/killproc + * Use new system call statx(2) to replace old stat(2)/lstat(2) + ------------------------------------------------------------------- Fri Jun 21 07:20:38 UTC 2019 - Dr. Werner Fink diff --git a/sysvinit.spec b/sysvinit.spec index c1762cf..50e1e2c 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -17,7 +17,7 @@ Name: sysvinit -%define KPVER 2.21 +%define KPVER 2.23 %define SCVER 1.20 %define SIVER 2.95 %define START 0.63 @@ -31,15 +31,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build #!BuildIgnore: sysvinit-tools Url: https://savannah.nongnu.org/projects/sysvinit/ Source: sysvinit-%{SIVER}.tar.xz -Source1: killproc-%{KPVER}.tar.bz2 +Source1: https://github.com/bitstreamout/killproc/archive/v%{KPVER}.tar.gz#/killproc-%{KPVER}.tar.gz Source2: startpar-%{START}.tar.xz Patch: %{name}-2.90.dif Patch2: %{name}-2.88dsf-suse.patch Patch9: %{name}-2.90-no-kill.patch -Patch30: killproc-%{KPVER}.dif -Patch31: killproc-2.18-open_flags.dif -Patch32: killproc-sysmacros.patch -Patch33: killproc-mntinf-optional.patch Patch50: startpar-0.58.dif Patch51: startpar-sysmacros.patch @@ -76,11 +72,7 @@ pushd doc mkdir killproc popd pushd ../killproc-%{KPVER} -%patch30 -%patch31 -p0 -b .dialog -%patch32 -p1 -%patch33 -p0 -ln -t../%{name}-%{SIVER}/doc/killproc README +ln -t../%{name}-%{SIVER}/doc/killproc README.md popd pushd ../startpar-%{START} %patch50 From 70767aa31e5ffa7e69fa1aee956f8c424bfa6cc32f324412b25833b7da117c1e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 29 Aug 2019 13:46:34 +0000 Subject: [PATCH 2/3] Mention removed patches OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=240 --- sysvinit.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysvinit.changes b/sysvinit.changes index b1441f7..608b1e0 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -4,6 +4,11 @@ Thu Aug 29 13:25:34 UTC 2019 - Dr. Werner Fink - Update to killproc 2.23 * killproc has its upstream at https://github.com/bitstreamout/killproc * Use new system call statx(2) to replace old stat(2)/lstat(2) +- Remove patches now upstream: + * killproc-2.18-open_flags.dif + * killproc-2.21.dif + * killproc-sysmacros.patch + * killproc-mntinf-optional.patch ------------------------------------------------------------------- Fri Jun 21 07:20:38 UTC 2019 - Dr. Werner Fink From c1c518c975dda6893115520a5659d98ef20a7cc5b4962c33ad6bec05bcdb87a9 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 18 Sep 2019 07:50:33 +0000 Subject: [PATCH 3/3] Update to sysvinit-2.96 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=241 --- sysvinit-2.88dsf-suse.patch | 8 ++++---- sysvinit-2.90-no-kill.patch | 6 +++--- sysvinit-2.90.dif | 2 +- sysvinit-2.95.tar.xz | 3 --- sysvinit-2.96.tar.xz | 3 +++ sysvinit.changes | 12 ++++++++++++ sysvinit.spec | 2 +- 7 files changed, 24 insertions(+), 12 deletions(-) delete mode 100644 sysvinit-2.95.tar.xz create mode 100644 sysvinit-2.96.tar.xz diff --git a/sysvinit-2.88dsf-suse.patch b/sysvinit-2.88dsf-suse.patch index 733265c..6d6f777 100644 --- a/sysvinit-2.88dsf-suse.patch +++ b/sysvinit-2.88dsf-suse.patch @@ -4,7 +4,7 @@ 2 files changed, 3 insertions(+), 1 deletion(-) --- man/killall5.8 -+++ man/killall5.8 2019-06-17 12:05:21.101622374 +0000 ++++ man/killall5.8 2019-09-18 07:39:31.188377719 +0000 @@ -44,6 +44,7 @@ process were killed, and 1 if it was una .SH SEE ALSO .BR halt (8), @@ -15,9 +15,9 @@ .SH AUTHOR Miquel van Smoorenburg, miquels@cistron.nl --- man/pidof.8 -+++ man/pidof.8 2019-06-17 12:06:25.816419988 +0000 -@@ -94,6 +94,7 @@ Zombie processes or processes in disk sl - are ignored, as attempts to access the stats of these will sometimes fail. ++++ man/pidof.8 2019-09-18 07:40:18.859489726 +0000 +@@ -101,6 +101,7 @@ The \-z flag (see above) tells pidof to + processes, at the risk of failing or hanging. .SH SEE ALSO +.BR pidofproc (8), diff --git a/sysvinit-2.90-no-kill.patch b/sysvinit-2.90-no-kill.patch index d894b94..17d56f1 100644 --- a/sysvinit-2.90-no-kill.patch +++ b/sysvinit-2.90-no-kill.patch @@ -3,8 +3,8 @@ 1 file changed, 52 insertions(+) --- src/killall5.c -+++ src/killall5.c 2018-08-06 12:45:03.832836347 +0000 -@@ -470,6 +470,38 @@ int readarg(FILE *fp, char *buf, int sz) ++++ src/killall5.c 2019-09-18 07:41:29.094181373 +0000 +@@ -478,6 +478,38 @@ int readarg(FILE *fp, char *buf, int sz) } /* @@ -43,7 +43,7 @@ * Read the proc filesystem. * CWD must be /proc to avoid problems if / is affected by the killing (ie depend on fuse). */ -@@ -674,6 +706,26 @@ int readproc(int do_stat) +@@ -683,6 +715,26 @@ int readproc(int do_stat) p->nfs = 0; switch (do_stat) { diff --git a/sysvinit-2.90.dif b/sysvinit-2.90.dif index 01c4d63..9f611f8 100644 --- a/sysvinit-2.90.dif +++ b/sysvinit-2.90.dif @@ -44,7 +44,7 @@ MANDB := endif -@@ -203,13 +199,8 @@ install: all +@@ -202,13 +198,8 @@ install: all done # $(INSTALL_DIR) $(ROOT)/etc/ # $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/ diff --git a/sysvinit-2.95.tar.xz b/sysvinit-2.95.tar.xz deleted file mode 100644 index f0130a6..0000000 --- a/sysvinit-2.95.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c9029cb93f36bbbad8e1ce109f75e6f4d26056d271106e8812cda7159b6f86c8 -size 124576 diff --git a/sysvinit-2.96.tar.xz b/sysvinit-2.96.tar.xz new file mode 100644 index 0000000..18285bd --- /dev/null +++ b/sysvinit-2.96.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a2e26b72aa235a23ab1c8471005f890309ce1196c83fbc9413c57b9ab62b587 +size 122164 diff --git a/sysvinit.changes b/sysvinit.changes index 608b1e0..3d5bad3 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Sep 18 07:45:38 UTC 2019 - Dr. Werner Fink + +- Update to sysvinit 2.96 + * Added -z command line paramter to pidof which tells pidof to + try to find processes in uninterruptable (D) or zombie (Z) states. + This can cause pidof to hang, but produces a more complete process + list. + * Reformatted init code to make if/while logic more clear. + * Make sure src/Makefile cleans up all executable files + when parent Makefile calls "make clean". + ------------------------------------------------------------------- Thu Aug 29 13:25:34 UTC 2019 - Dr. Werner Fink diff --git a/sysvinit.spec b/sysvinit.spec index 50e1e2c..b45223b 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -19,7 +19,7 @@ Name: sysvinit %define KPVER 2.23 %define SCVER 1.20 -%define SIVER 2.95 +%define SIVER 2.96 %define START 0.63 Version: %{SIVER} Release: 0