Accepting request 731661 from Base:System
- 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". - 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 OBS-URL: https://build.opensuse.org/request/show/731661 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysvinit?expand=0&rev=171
This commit is contained in:
commit
53226d20c7
@ -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));
|
@ -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:
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:359ffe52eaf1f510d6581cba5d799a3926d8e1f202ddf0d76c20a1c6603e2659
|
||||
size 44469
|
BIN
killproc-2.23.tar.gz
(Stored with Git LFS)
Normal file
BIN
killproc-2.23.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -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) {
|
@ -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 <sys/mount.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "libinit.h"
|
@ -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),
|
||||
|
@ -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) {
|
||||
|
@ -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/
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c9029cb93f36bbbad8e1ce109f75e6f4d26056d271106e8812cda7159b6f86c8
|
||||
size 124576
|
3
sysvinit-2.96.tar.xz
Normal file
3
sysvinit-2.96.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2a2e26b72aa235a23ab1c8471005f890309ce1196c83fbc9413c57b9ab62b587
|
||||
size 122164
|
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 18 07:45:38 UTC 2019 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- 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 <werner@suse.de>
|
||||
|
||||
- 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 <werner@suse.de>
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
|
||||
Name: sysvinit
|
||||
%define KPVER 2.21
|
||||
%define KPVER 2.23
|
||||
%define SCVER 1.20
|
||||
%define SIVER 2.95
|
||||
%define SIVER 2.96
|
||||
%define START 0.63
|
||||
Version: %{SIVER}
|
||||
Release: 0
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user