From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/
Date: Mon, 23 Dec 2024 05:40:12 +0000 (UTC) [thread overview]
Message-ID: <1734932311.4e2d79cb527e177abf7d921660db1e06f7745704.sam@gentoo> (raw)
commit: 4e2d79cb527e177abf7d921660db1e06f7745704
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 23 05:38:31 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 23 05:38:31 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e2d79cb
sys-apps/sysvinit: replace brittle sed with patch for moved programs
The sed we were using broke for pidof at least in 3.12: replace those
seds with a proper patch.
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../sysvinit-3.12-delete-moved-programs.patch | 43 ++++++++++++++++++++++
...ysvinit-3.12.ebuild => sysvinit-3.12-r1.ebuild} | 19 +---------
2 files changed, 44 insertions(+), 18 deletions(-)
diff --git a/sys-apps/sysvinit/files/sysvinit-3.12-delete-moved-programs.patch b/sys-apps/sysvinit/files/sysvinit-3.12-delete-moved-programs.patch
new file mode 100644
index 000000000000..0d601432f86c
--- /dev/null
+++ b/sys-apps/sysvinit/files/sysvinit-3.12-delete-moved-programs.patch
@@ -0,0 +1,43 @@
+last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
+pidof has moved to >=procps-3.3.9
+logsave is already in e2fsprogs
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -22,19 +22,17 @@ 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 = init halt shutdown runlevel killall5 fstab-decode
++USRBIN = readbootlog
+
+-MAN1 = last.1 lastb.1 mesg.1 readbootlog.1
++MAN1 = 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
++MAN8 = halt.8 init.8 killall5.8 poweroff.8 reboot.8 runlevel.8
++MAN8 += shutdown.8 telinit.8 fstab-decode.8
+
+ ifeq ($(DISTRO),)
+-SBIN += sulogin bootlogd
+-USRBIN += utmpdump wall
+-MAN1 += utmpdump.1 wall.1
+-MAN8 += sulogin.8 bootlogd.8
++SBIN += bootlogd
++MAN8 += bootlogd.8
+ endif
+
+ ifeq ($(DISTRO),Debian)
+@@ -215,10 +213,6 @@ install: all
+ ln -sf halt $(ROOT)$(base_sbindir)/reboot
+ ln -sf halt $(ROOT)$(base_sbindir)/poweroff
+ ln -sf init $(ROOT)$(base_sbindir)/telinit
+- ln -sf $(base_sbindir)/killall5 $(ROOT)$(base_bindir)/pidof
+- if [ ! -f $(ROOT)$(bindir)/lastb ]; then \
+- ln -sf last $(ROOT)$(bindir)/lastb; \
+- fi
+ $(INSTALL_DIR) $(ROOT)$(includedir)/
+ $(INSTALL_DATA) initreq.h $(ROOT)$(includedir)/
+ for lang in '' $(patsubst ../man/po/%.po,%,$(wildcard ../man/po/??.po)); do \
diff --git a/sys-apps/sysvinit/sysvinit-3.12.ebuild b/sys-apps/sysvinit/sysvinit-3.12-r1.ebuild
similarity index 90%
rename from sys-apps/sysvinit/sysvinit-3.12.ebuild
rename to sys-apps/sysvinit/sysvinit-3.12-r1.ebuild
index a7beec09b9b9..8d7a21844303 100644
--- a/sys-apps/sysvinit/sysvinit-3.12.ebuild
+++ b/sys-apps/sysvinit/sysvinit-3.12-r1.ebuild
@@ -52,6 +52,7 @@ BDEPEND="
PATCHES=(
# bug #158615
"${FILESDIR}/${PN}-3.08-shutdown-single.patch"
+ "${FILESDIR}/${PN}-3.12-delete-moved-programs.patch"
)
src_prepare() {
@@ -66,24 +67,6 @@ src_prepare() {
-e '/^override CFLAGS +=/s/ -D_FORTIFY_SOURCE=2//' \
src/Makefile || die
- # last/lastb/mesg/mountpoint/sulogin/utmpdump/wall have moved to util-linux
- sed -i -r \
- -e '/^(USR)?S?BIN/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)\>::g' \
- -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \
- src/Makefile || die
-
- # pidof has moved to >=procps-3.3.9
- sed -i -r \
- -e '/\/bin\/pidof/d' \
- -e '/^MAN8/s:\<pidof.8\>::g' \
- src/Makefile || die
-
- # logsave is already in e2fsprogs
- sed -i -r \
- -e '/^(USR)?S?BIN/s:\<logsave\>::g' \
- -e '/^MAN8/s:\<logsave.8\>::g' \
- src/Makefile || die
-
# Munge inittab for specific architectures
cd "${WORKDIR}" || die
cp "${FILESDIR}"/inittab-2.98-r1 inittab || die "cp inittab"
next reply other threads:[~2024-12-23 5:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-23 5:40 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-08-18 9:22 [gentoo-commits] repo/gentoo:master commit in: sys-apps/sysvinit/, sys-apps/sysvinit/files/ Sam James
2023-07-27 13:51 Mike Gilbert
2021-12-03 11:54 Lars Wendler
2021-01-30 19:21 Piotr Karbowski
2020-11-17 8:38 Lars Wendler
2019-04-20 22:52 Lars Wendler
2019-02-18 8:38 Lars Wendler
2018-11-27 9:09 Lars Wendler
2018-11-23 13:47 Lars Wendler
2018-10-31 14:10 William Hubbs
2016-09-15 17:16 William Hubbs
2016-04-27 23:57 Anthony G. Basile
2016-02-01 15:21 William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1734932311.4e2d79cb527e177abf7d921660db1e06f7745704.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox