Sync from SUSE:SLFO:Main sysvinit revision a3f6380b69f4f1bf87f598ebdd43e26c
This commit is contained in:
commit
30a7e9f4ca
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
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.
12
startpar-0.58.dif
Normal file
12
startpar-0.58.dif
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -ur -p0 startpar-0.65/Makefile startpar/Makefile
|
||||
--- Makefile 2020-07-07 02:04:06.000000000 +0200
|
||||
+++ Makefile 2020-08-25 17:03:05.687028264 +0200
|
||||
@@ -15 +14,0 @@ SRCS = startpar.c makeboot.c proc.c
|
||||
-CXXSRCS = compiletest.cc
|
||||
@@ -18 +17 @@ REST = COPYING Makefile startpar.1
|
||||
-OBJS = $(SRCS:.c=.o) $(CXXSRCS:.cc=.o)
|
||||
+OBJS = $(SRCS:.c=.o)
|
||||
@@ -50,2 +49 @@ endif
|
||||
-SOURCEFILES= compiletest.cc \
|
||||
- CHANGELOG \
|
||||
+SOURCEFILES= CHANGELOG \
|
BIN
startpar-0.65.tar.xz
(Stored with Git LFS)
Normal file
BIN
startpar-0.65.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
26
sysvinit-2.88dsf-suse.patch
Normal file
26
sysvinit-2.88dsf-suse.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
man/killall5.8 | 3 ++-
|
||||
man/pidof.8 | 1 +
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- man/killall5.8
|
||||
+++ 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),
|
||||
.BR reboot (8),
|
||||
-.BR pidof (8)
|
||||
+.BR pidof (8),
|
||||
+.BR killproc (8)
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
--- man/pidof.8
|
||||
+++ 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),
|
||||
.BR shutdown (8),
|
||||
.BR init (8),
|
||||
.BR halt (8),
|
72
sysvinit-2.90-no-kill.patch
Normal file
72
sysvinit-2.90-no-kill.patch
Normal file
|
@ -0,0 +1,72 @@
|
|||
---
|
||||
src/killall5.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 52 insertions(+)
|
||||
|
||||
--- src/killall5.c
|
||||
+++ src/killall5.c 2019-09-18 07:41:29.094181373 +0000
|
||||
@@ -478,6 +478,38 @@ int readarg(FILE *fp, char *buf, int sz)
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Scan the filedescriptors of pid for /dev/fuse
|
||||
+ */
|
||||
+int is_fuse(const char *pid) {
|
||||
+ DIR *dir;
|
||||
+ char path[256];
|
||||
+ char buf[256];
|
||||
+ struct dirent *d;
|
||||
+ ssize_t len;
|
||||
+
|
||||
+ /* Open /proc/pid/fd/ */
|
||||
+ snprintf(path, sizeof(path), "/proc/%s/fd", pid);
|
||||
+ if ((dir = opendir(path)) != NULL) {
|
||||
+ int dfd = dirfd(dir);
|
||||
+ /* Walk through the directory. */
|
||||
+ while ((d = readdir(dir)) != NULL) {
|
||||
+ if (*d->d_name == '.')
|
||||
+ continue;
|
||||
+ /* check for /dev/fuse */
|
||||
+ if ((len = readlinkat(dfd, d->d_name, buf, sizeof(buf))) > 0) {
|
||||
+ buf[len] = '\0';
|
||||
+ if (strcmp("/dev/fuse", buf) == 0)
|
||||
+ return 1; /* Fuse filesystem */
|
||||
+ }
|
||||
+ }
|
||||
+ closedir(dir);
|
||||
+ }
|
||||
+
|
||||
+ /* Not a fuse filesystem */
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* Read the proc filesystem.
|
||||
* CWD must be /proc to avoid problems if / is affected by the killing (ie depend on fuse).
|
||||
*/
|
||||
@@ -676,6 +708,26 @@ int readproc(int do_stat)
|
||||
p->nfs = 0;
|
||||
|
||||
switch (do_stat) {
|
||||
+ case NO_STAT:
|
||||
+ if ((len = readlink(path, buf, PATH_MAX)) < 0)
|
||||
+ break;
|
||||
+ buf[len] = '\0';
|
||||
+
|
||||
+ /* Check for uevent handler, mdmon, and for providers
|
||||
+ of FUSE filesystems */
|
||||
+ if ((strncmp(buf, "/sbin/udevd", 11) == 0) ||
|
||||
+ (strncmp(buf, "/sbin/mdmon", 11) == 0) ||
|
||||
+ (is_fuse(d->d_name))) {
|
||||
+ OMIT *restrict optr;
|
||||
+
|
||||
+ xmemalign((void*)&optr, sizeof(void*), alignof(OMIT));
|
||||
+ optr->next = omit;
|
||||
+ optr->prev = (OMIT*)0;
|
||||
+ optr->pid = pid;
|
||||
+ omit = optr;
|
||||
+ }
|
||||
+
|
||||
+ break;
|
||||
case DO_NETFS:
|
||||
if ((p->nfs = check4nfs(path, buf)))
|
||||
goto link;
|
64
sysvinit-2.90.dif
Normal file
64
sysvinit-2.90.dif
Normal file
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
src/Makefile | 27 +++++++++------------------
|
||||
1 file changed, 9 insertions(+), 18 deletions(-)
|
||||
|
||||
Index: src/Makefile
|
||||
===================================================================
|
||||
--- src/Makefile.orig
|
||||
+++ src/Makefile
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
|
||||
CPPFLAGS =
|
||||
-CFLAGS ?= -O2
|
||||
+CFLAGS ?= $(RPM_OPT_FLAGS)
|
||||
override CFLAGS += -ansi -fomit-frame-pointer -fstack-protector-strong -W -Wall -Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE -DVERSION=\"$(VERSION)\"
|
||||
override CFLAGS += $(shell getconf LFS_CFLAGS)
|
||||
STATIC =
|
||||
@@ -23,13 +23,13 @@ MNTPOINT=
|
||||
|
||||
# For some known distributions we do not build all programs, otherwise we do.
|
||||
BIN =
|
||||
-SBIN = init halt shutdown runlevel killall5 fstab-decode logsave
|
||||
-USRBIN = last mesg readbootlog
|
||||
+SBIN = killall5 fstab-decode
|
||||
+USRBIN =
|
||||
|
||||
-MAN1 = last.1 lastb.1 mesg.1 readbootlog.1
|
||||
-MAN5 = initscript.5 inittab.5 initctl.5
|
||||
-MAN8 = halt.8 init.8 killall5.8 pidof.8 poweroff.8 reboot.8 runlevel.8
|
||||
-MAN8 += shutdown.8 telinit.8 fstab-decode.8 logsave.8
|
||||
+MAN1 =
|
||||
+MAN5 =
|
||||
+MAN8 = killall5.8 pidof.8
|
||||
+MAN8 += fstab-decode.8
|
||||
|
||||
ifeq ($(DISTRO),)
|
||||
SBIN += sulogin bootlogd
|
||||
@@ -53,10 +53,6 @@ endif
|
||||
|
||||
ifeq ($(DISTRO),SuSE)
|
||||
CPPFLAGS+= -DUSE_SYSFS -DSANE_TIO -DSIGINT_ONLYONCE -DUSE_ONELINE
|
||||
-SBIN += sulogin
|
||||
-USRBIN += utmpdump
|
||||
-MAN1 += utmpdump.1
|
||||
-MAN8 += sulogin.8
|
||||
MANDB :=
|
||||
endif
|
||||
|
||||
@@ -205,13 +201,8 @@ install: all
|
||||
# $(INSTALL_DIR) $(ROOT)/etc/
|
||||
$(INSTALL_DIR) $(ROOT)/etc/inittab.d
|
||||
# $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/
|
||||
- ln -sf halt $(ROOT)/sbin/reboot
|
||||
- ln -sf halt $(ROOT)/sbin/poweroff
|
||||
- ln -sf init $(ROOT)/sbin/telinit
|
||||
- ln -sf /sbin/killall5 $(ROOT)/bin/pidof
|
||||
- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
|
||||
- ln -sf last $(ROOT)/usr/bin/lastb; \
|
||||
- fi
|
||||
+ ln -sf killall5 $(ROOT)/sbin/pidof
|
||||
+ ln -sf ../sbin/killall5 $(ROOT)/bin/pidof
|
||||
$(INSTALL_DIR) $(ROOT)/usr/include/
|
||||
$(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
|
||||
$(INSTALL_DIR) $(ROOT)$(MANDIR)/man1/
|
BIN
sysvinit-3.00.tar.xz
(Stored with Git LFS)
Normal file
BIN
sysvinit-3.00.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
2525
sysvinit.changes
Normal file
2525
sysvinit.changes
Normal file
File diff suppressed because it is too large
Load Diff
162
sysvinit.spec
Normal file
162
sysvinit.spec
Normal file
|
@ -0,0 +1,162 @@
|
|||
#
|
||||
# spec file for package sysvinit
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%define sbindir %_sbindir
|
||||
%define bindir %_bindir
|
||||
%else
|
||||
%define sbindir /sbin
|
||||
%define bindir /bin
|
||||
%endif
|
||||
|
||||
Name: sysvinit
|
||||
%define KPVER 2.23
|
||||
%define SIVER 3.00
|
||||
%define START 0.65
|
||||
Version: %{SIVER}
|
||||
Release: 0
|
||||
Summary: SysV-Style init
|
||||
License: GPL-2.0-or-later
|
||||
Group: System/Base
|
||||
BuildRequires: blog-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#!BuildIgnore: sysvinit-tools
|
||||
URL: https://savannah.nongnu.org/projects/sysvinit/
|
||||
Source: https://download.savannah.nongnu.org/releases/sysvinit/sysvinit-%{SIVER}.tar.xz
|
||||
Source1: https://github.com/bitstreamout/killproc/archive/v%{KPVER}.tar.gz#/killproc-%{KPVER}.tar.gz
|
||||
Source2: https://download.savannah.nongnu.org/releases/sysvinit/startpar-%{START}.tar.xz
|
||||
Patch: %{name}-2.90.dif
|
||||
Patch2: %{name}-2.88dsf-suse.patch
|
||||
Patch9: %{name}-2.90-no-kill.patch
|
||||
Patch50: startpar-0.58.dif
|
||||
|
||||
%description
|
||||
System V style init programs by Miquel van Smoorenburg that control the
|
||||
booting and shutdown of your system. These support a number of system
|
||||
runlevels, each one associated with a specific set of utilities. For
|
||||
example, the normal system runlevel is 3, which starts a getty on
|
||||
virtual consoles tty1-tty6. Runlevel 5 starts xdm. Runlevel 0 shuts
|
||||
down the system. See the individual man pages for inittab, initscript,
|
||||
halt, init, powerd, reboot, runlevel, shutdown, and telinit for
|
||||
more information.
|
||||
|
||||
%package tools
|
||||
Summary: Tools for basic booting
|
||||
Group: System/Base
|
||||
Requires: blog
|
||||
|
||||
%description tools
|
||||
Helper tools from sysvinit that support booting, including but not exclusive
|
||||
to startpar and killproc. System V init specific programs are in the
|
||||
sysvinit package.
|
||||
|
||||
%prep
|
||||
ls -l
|
||||
rm -rf killproc-%{KPVER}
|
||||
rm -rf startpar-%{START} startpar
|
||||
ln -sf startpar startpar-%{START}
|
||||
%setup -n %{name}-%{SIVER} -q -b 1 -b 2
|
||||
%patch2 -p0 -b .suse
|
||||
%patch9 -p0 -b .no-kill
|
||||
%patch
|
||||
pushd doc
|
||||
mkdir killproc
|
||||
popd
|
||||
pushd ../killproc-%{KPVER}
|
||||
ln -t../%{name}-%{SIVER}/doc/killproc README.md
|
||||
popd
|
||||
pushd ../startpar-%{START}
|
||||
%patch50
|
||||
popd
|
||||
%_fixowner .
|
||||
%_fixgroup .
|
||||
/bin/chmod -Rf a+rX,g-w,o-w .
|
||||
|
||||
%build
|
||||
RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -std=gnu89 -D_FILE_OFFSET_BITS=64 -pipe"
|
||||
CC=%__cc
|
||||
export RPM_OPT_FLAGS CC
|
||||
make %{?_smp_mflags} WITH_SELINUX=yes DISTRO=SuSE
|
||||
pushd ../killproc-%{KPVER}
|
||||
make %{?_smp_mflags} CC="%__cc"
|
||||
popd
|
||||
pushd ../startpar-%{START}
|
||||
make %{?_smp_mflags} CC="%__cc"
|
||||
popd
|
||||
|
||||
%install
|
||||
make install -C src MANPATH=%{_mandir} ROOT=%{buildroot} DISTRO=SuSE
|
||||
pushd ../killproc-%{KPVER}
|
||||
make install MANPATH=%{_mandir} INSTBINFLAGS="-m 0755" DESTDIR=%{buildroot}
|
||||
popd
|
||||
pushd ../startpar-%{START}
|
||||
make install DESTDIR=%{buildroot}
|
||||
popd
|
||||
#
|
||||
# Remove files not packed:
|
||||
#
|
||||
rm -vf %{buildroot}/usr/include/initreq.h
|
||||
%if 0%{?suse_version} && %suse_version > 1500
|
||||
# pidof is part of procps-ng; let's remove the symlinks to killproc5 here
|
||||
rm -f %{buildroot}{/sbin,/bin,%{_mandir}/man8}/pidof{,.8}
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1550
|
||||
# it's all hardcoded in Makefiles so move here
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
mv %{buildroot}/bin/* %{buildroot}%{_bindir}
|
||||
mv %{buildroot}/sbin/* %{buildroot}%{_sbindir}
|
||||
%endif
|
||||
|
||||
%files tools
|
||||
%defattr (-,root,root,755)
|
||||
%license COPYING COPYRIGHT
|
||||
%doc doc/Propaganda doc/Changelog doc/killproc
|
||||
%{bindir}/usleep
|
||||
%{bindir}/fsync
|
||||
%{sbindir}/fstab-decode
|
||||
%{sbindir}/checkproc
|
||||
%{sbindir}/pidofproc
|
||||
%{sbindir}/killproc
|
||||
%{sbindir}/killall5
|
||||
%{sbindir}/startproc
|
||||
%{sbindir}/rvmtab
|
||||
%{sbindir}/vhangup
|
||||
%{sbindir}/mkill
|
||||
%{sbindir}/start_daemon
|
||||
%{_bindir}/startpar
|
||||
%doc %{_mandir}/man1/usleep.1%{?ext_man}
|
||||
%doc %{_mandir}/man1/fsync.1%{?ext_man}
|
||||
%doc %{_mandir}/man1/startpar.1%{?ext_man}
|
||||
%doc %{_mandir}/man8/fstab-decode.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/checkproc.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/pidofproc.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/killall5.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/killproc.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/startproc.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/start_daemon.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/rvmtab.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/vhangup.8%{?ext_man}
|
||||
%doc %{_mandir}/man8/mkill.8%{?ext_man}
|
||||
%if 0%{?suse_version} && %suse_version <= 1500
|
||||
%{bindir}/pidof
|
||||
%{sbindir}/pidof
|
||||
%doc %{_mandir}/man8/pidof.8%{?ext_man}
|
||||
%endif
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user