diff options
author | PA4WDH | 2024-07-05 19:46:01 +0200 |
---|---|---|
committer | PA4WDH | 2024-07-05 19:46:01 +0200 |
commit | 29422c4d3a7a22d13f0e26c2af359f3881ca5a4a (patch) | |
tree | 2406b49418c0934baa229051393e2d1ee6c20d59 /sys-apps | |
parent | Add sys-kernel/sifive-sources-6.6.21 (diff) | |
download | unmatched-patchwork-29422c4d3a7a22d13f0e26c2af359f3881ca5a4a.tar.gz unmatched-patchwork-29422c4d3a7a22d13f0e26c2af359f3881ca5a4a.tar.bz2 unmatched-patchwork-29422c4d3a7a22d13f0e26c2af359f3881ca5a4a.zip |
Add sys-apps/sysvinit-3.08
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/sysvinit/Manifest | 6 | ||||
-rw-r--r-- | sys-apps/sysvinit/files/sysvinit-3.08-shutdown-single.patch | 38 | ||||
-rw-r--r-- | sys-apps/sysvinit/metadata.xml | 25 | ||||
-rw-r--r-- | sys-apps/sysvinit/sysvinit-3.08.ebuild | 203 |
4 files changed, 259 insertions, 13 deletions
diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest index 024739a..20b6bc5 100644 --- a/sys-apps/sysvinit/Manifest +++ b/sys-apps/sysvinit/Manifest @@ -7,6 +7,7 @@ AUX sysvinit-2.94_beta-shutdown-single.patch 1261 BLAKE2B 571b7cf40ccdbb27e65b31 AUX sysvinit-2.99-force-poweroff.patch 470 BLAKE2B 9d7ec8d81641b57a3ffac35a8fe53491028dd6b71866cf43593e5d9a9f270af31c5fa959aded213e3bd38a5c5bb0e055015545c35aa627f4d9a427cff627e174 SHA512 d28654a122055169b4bc51f4081d5f770885e6ae13d9467308f26721cb9774a37623d7e1f4e8da993944f35328a82cd157d6f5bedcbb5d4baf172da752b84d72 AUX sysvinit-2.99-shutdown-h.patch 2684 BLAKE2B 57c27b8646a0b47f66eb103450e645fa45220a1bf79da86207ffa1393c311cb4c4a2ad9b8b7bf81cc4ae2ccb2acb19b66fd575935d8a0b0a2a9b3899c0088c9f SHA512 ef33da0d5673180275c8120c6904a4214cf1308827a626d8d6a2aab67d7d25b5407f9efcaf6a7a4a09a8c409899242943f6a95881cc8c8898b780224f991f2f7 AUX sysvinit-3.05-fix-man-makefile.patch 780 BLAKE2B 0fc0396f41663a554484c06a96079497b4991ea44f077bc89c2249db86c47b5b5630713485fb6ef01a66e380cb5cb49af585e23eb2db762b38dca94d55d0a4d1 SHA512 b7fd436a224b67b41693aa1e0ccce5b94471473345ca72ef618c7a7abb8e5bf1866ffb27d42a1fc0d1326df275ec8f7e920be5d03dc8883c590551e1e87b873e +AUX sysvinit-3.08-shutdown-single.patch 1341 BLAKE2B f0b2ac2e803a3521f0473ab50b18aec300ad0c4566c0f0a53924b32540e862437ee5d99c3f54fe453e84d9ebe8011f64e75f60ca1f73cc9606b30a867df68e7d SHA512 7b3ba5c8af1e25ecc59568e920446da66fd53284e2bca0eb4b8cae2f9b919552c254e74c7363bb3598f2a35a413dcb31008dd8cae57ceaf98f6bf8921918cce7 DIST sysvinit-2.99.tar.xz 126908 BLAKE2B b82c745d5b695f918d4a163e7b9eaceccc07a46f73c3782c7771cc29a8600be13de4ff30891086df5773d60f37fa3b0f58566ccaf72cd70af68083b51152a38b SHA512 34f328d7d2e6ceddcddfebab49eb9c34e90dc96decf2caeb89dffd2ade54322fa4a3cb9fa1e1a4bc687e07fcb0a13e5aebe6186582a9f5c9153e1513baa87ddd DIST sysvinit-3.00.tar.xz 127072 BLAKE2B d1c4e509d7c13cf0fb9da290f875e7c0ab0666d843d75d4dd6885112248a859dd077bdf9cc926c4af58473da99a5229bb879c7094afd648d5ebe72597a3ba6a7 SHA512 ba834ac6c48528304373018bfb05dcdd3573d8081dd7dc95a44808804404d77ee4832fedb3f34e67d87f22f201f9526c54910a51c6ed2a42ac55b756843cd825 DIST sysvinit-3.01.tar.xz 126616 BLAKE2B b991c6d2a09b02003cc587379b148f8ca3817c27fcaf81f184f679cfd5325e0b551484bba47bb554a34c7eeba60538f4943de49b1d59bd4bef73d7d086fefdb2 SHA512 66da3830aa32b70f0beea994213145a550e5b5d58a5b54afb17109243d5efface6aba8c296b76dbfb22ce6f86c9c58f237ff71ee04ec7d5b316ad412bf7acbcf @@ -16,6 +17,8 @@ DIST sysvinit-3.05.tar.xz 234416 BLAKE2B 56cd57976c34194b07512e05f21782247d2f79e DIST sysvinit-3.05.tar.xz.sig 833 BLAKE2B 520be5b28b02a67703eb027515d4c290532bdefdb319d6b74d14dbaa51538410eab9d336637c1b32cd8f27d45353b78f531ba7646157790e2563a38dbf396646 SHA512 ed7816281e81b7c568ee8e3b8a1b2eb3973751d5fc7f626bdfefbe28d0f0d67857862924dd000e12e6c12ed0382c27c1992d2d6326cc1fc3c94559f475402b33 DIST sysvinit-3.06.tar.xz 252508 BLAKE2B 7fd2ba4bc0c8a15ddd7af2aaa1044e3bc8885a5e18a0a9c58c63897d0965d7430a9b529af4953618a9042cf13cca8a74a92ab02062c5de18d13fdf68328c11e7 SHA512 dc56ce12f18f7ecde6c9828e72dd8ab7afccd0f88ad4438d6a5b356a30b21e9ba9c796a4b2520a20a0c384f058be6bdb7b9b0df9786bbf65a80dff97c2be733b DIST sysvinit-3.06.tar.xz.sig 833 BLAKE2B 18a0af9a58ea10b1858a7d47867685e30749e335c0a88c6603fc78620d05579ff8fa1f6ccf9605140577793e4068dff50605d89b3e73e9d75b1f56c398fb5f7c SHA512 05101d4753daae73d67f1213c62b8be96c78418ce9a16f86cd23539ad124caecb8042de348aca4d752da8eb1a6b7f1bc1524489a4f0662db510c58e26ae8554c +DIST sysvinit-3.08.tar.xz 268296 BLAKE2B ec4a4ff3663ac7d67808b50b67631ff4fe1ab56d376df15868df0eb79cbc329b192af124380eec6a797d827c3c7c5586058310d803f42ee1934dcffbfbe876f7 SHA512 a523e030e559ecc56391f9424e240fbe54a714bb3c522ca0bb410b649a1c08c5e9f03d298340a5586565f18d8640b1b418fa09294b41fb95a9cd2a686316b758 +DIST sysvinit-3.08.tar.xz.sig 833 BLAKE2B b1cbe8a95faa16a22e92e2a8841643aeaf7a5a31cc9fa9628a7ee2400aac1b3a184ae01f09c75d48d5d55a71f7e62feb25c16345644bfb4fcd19cbd061f86573 SHA512 1af105d84b98428766cc315d8dea068e6c5a7ad52008291ba7c1d5accbcaeead4999fd714fc152c1038e54953f9b469bd0f792a0830e68c3e2f43afcd36e0e2d EBUILD sysvinit-2.99-r1.ebuild 4148 BLAKE2B 199a03887551884ca4b1452c205943c45616c8101aeb7ecb5f1ffb094bb5200394deef2df158c9f357d57eeec25ba8d714f6db297e9a071bdb96d72e8625698e SHA512 bc7a6e7e287c61ddd3dc25bc83eedb4084d75b4da32a2244992a8edfa5fdb12e2fb4b5d0a2bc2fd6b9a0914825a4a8cce6b3dea9c7673c520b7e4ac21e61621d EBUILD sysvinit-2.99.ebuild 4089 BLAKE2B a9893ec8278e5f53528e15dab927b4f14e083861ef6017302ea6c5023bf108544c457c4d1a75c83801db10f3784694150828432e8986bdaf114aeb4d85ea876e SHA512 c53a1713ca68fccab0ad9e5483ecc0281546a14f7b04f59cb2bb949ad42a4b645ba2c31b4fc1a1a75b0431110bd22fb6e6dcb9ed5e8a12cd876f8c4e1db134f7 EBUILD sysvinit-3.00.ebuild 4099 BLAKE2B c282a062ebae85195d75c2b6b41185387410d63c8b9ac77bb2e53e70d25f20c3af8c472b100a295ef693117d56b24ab3f23519f1072938e31c283d7135e9e0c6 SHA512 3c883bc0bede52a10d195ca0a139a058cd158c4c124dee629bb1ed154543c6eab7af6ae8029ec674ef0fe2154755afc2a7e01553cf27fcccb845849524453b77 @@ -23,4 +26,5 @@ EBUILD sysvinit-3.01.ebuild 4145 BLAKE2B 7f519d04687d6612640fe8d7909c1e4424dbd6e EBUILD sysvinit-3.04.ebuild 5099 BLAKE2B 2cc7b1fc933c5d231e75bb21f39e0dfb57c6d865072bd1307599605fe778d095b0e7e47fbf48c19950d040376d5824cca3aba3542580276c41660711f8459cc9 SHA512 1665b755449573805ee4513c6c79accd1309f495f3e4848340c3887baf8dc55f6cc383f531c56722c3d185bd95d93f99baf1cc27052c976ed9d82dd126ec8664 EBUILD sysvinit-3.05.ebuild 5495 BLAKE2B 29de4003151e038f731f5e1f2571b678f436b5e2d3b5c880a5542d513bc06600d3be7669a33bd420db78b0755f9a1099513a0e0f86eabf10899d13e5a98250a3 SHA512 7263f4af12575c4b73db91fb400e0fd0c2c6abe8cf8f3ff5f659f00c0cdc1dc66c405c37d4467d835d898a5809746a7382425ce70c1f09b83f54b6a4a6fced9d EBUILD sysvinit-3.06-r1.ebuild 5724 BLAKE2B c499266a0f48e66296970088964963889e095bf1e46d942cf9803b94f8574a2143ef29dbc92ca32942c5eafad206d67eea734709f6c5f1ed59ce0d243a3d97eb SHA512 873cac2cd87bfd048a226c1b309d61beda15ce2d9c32d29b4130cb7e0d3ce67da1ba22e56fc5b8ba204ba27fced6925170a9a74564abf4e037d17f3b5ab51653 -MISC metadata.xml 451 BLAKE2B fef956bfea362642015d5f53f4d988967545ac34f38bc0d307940cc7d990c7bb640869b2613a878b2911322f2dd511ac03b4794807da246961d38662bdc894e3 SHA512 afa37929bb1610e47bb83adfac61df5d3fe25f6e5f23e8e81ef19729abf51ae97168a1b81d877dfe2a682d7889e14e8e8cc419cca7e5950e516d93853cbd6616 +EBUILD sysvinit-3.08.ebuild 5830 BLAKE2B 4c4cd9923ec1b62586827d092fa45835df1cfce256c1ae601ceacba5a0fffc399398100546f1118c4abe500374b60f73a3828c01613533fb81a3eaf875ff67b0 SHA512 ac29dfbfe3982d28ee51eadb0339edd69bc0e44d80e2802211a3c585fe4c6cdfc96fd40b44c6bb92e56b9f961b5baffe278bef0f9deb2f6c76a2691423e05d99 +MISC metadata.xml 506 BLAKE2B ea180981d7eafbe8356b6d187c7c1c12afc7ef91d94f7992489ad54f459c924b009bfe7c7888bf1934b356091489285dbda9eee39ab14f318528e0738da6474c SHA512 b5451236ce138c372e32c1f5e4bc25fca9acb05063720d6b452e81b19a7661058b791f6fc95a9f585244ba44ff307d07f6be49aadf1dbb461492575e2af80a89 diff --git a/sys-apps/sysvinit/files/sysvinit-3.08-shutdown-single.patch b/sys-apps/sysvinit/files/sysvinit-3.08-shutdown-single.patch new file mode 100644 index 0000000..571f951 --- /dev/null +++ b/sys-apps/sysvinit/files/sysvinit-3.08-shutdown-single.patch @@ -0,0 +1,38 @@ +This patch makes shutdown use the Single User runlevel by default so +the gettys are shutdown too. + +Roy Marples <uberlord@gentoo.org> + +Forward-ported from v2.86 to v2.94_beta +Lars Wendler <polynomial-c@gentoo.org> +--- a/man/shutdown.8 ++++ b/man/shutdown.8 +@@ -44,7 +44,7 @@ mail and news processing programs a chance to exit cleanly, etc. + \fBshutdown\fP does its job by signalling the \fBinit\fP process, + asking it to change the runlevel. + Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used +-to reboot the system, and runlevel \fB1\fP is used to put to system into ++to reboot the system, and runlevel \fBS\fP is used to put to system into + a state where administrative tasks can be performed; this is the default + if neither the \fB-h\fP or \fB-r\fP flag is given to \fBshutdown\fP. + To see which actions are taken on halt or reboot see the appropriate +--- a/src/shutdown.c ++++ b/src/shutdown.c +@@ -547,7 +547,7 @@ int main(int argc, char **argv) + usage(); + exit(1); + } +- strcpy(down_level, "1"); ++ strcpy(down_level, "S"); + halttype = NULL; + memset(when, '\0', WHEN_SIZE); + +@@ -734,6 +734,8 @@ int main(int argc, char **argv) + strncpy(newstate, "for reboot", STATELEN); + break; + case '1': ++ case 'S': ++ case 's': + strncpy(newstate, "to maintenance mode", STATELEN); + break; + default: diff --git a/sys-apps/sysvinit/metadata.xml b/sys-apps/sysvinit/metadata.xml index f289a88..2767ec5 100644 --- a/sys-apps/sysvinit/metadata.xml +++ b/sys-apps/sysvinit/metadata.xml @@ -1,15 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="person"> - <email>williamh@gentoo.org</email> - <name>William Hubbs</name> -</maintainer> -<maintainer type="project"> - <email>base-system@gentoo.org</email> - <name>Gentoo Base System</name> -</maintainer> - <use> - <flag name="force-poweroff">Force poweroff when called as reboot</flag> - </use> + <maintainer type="person"> + <email>williamh@gentoo.org</email> + <name>William Hubbs</name> + </maintainer> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <upstream> + <remote-id type="savannah-nongnu">sysvinit</remote-id> + <remote-id type="github">slicer69/sysvinit</remote-id> + </upstream> </pkgmetadata> diff --git a/sys-apps/sysvinit/sysvinit-3.08.ebuild b/sys-apps/sysvinit/sysvinit-3.08.ebuild new file mode 100644 index 0000000..9451f5f --- /dev/null +++ b/sys-apps/sysvinit/sysvinit-3.08.ebuild @@ -0,0 +1,203 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Dropped these because blank as of 3.02 +#PLOCALES="de es fi fr hu id pl" +PLOCALES="de es fr pl" +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/sysvinit.asc +inherit toolchain-funcs flag-o-matic plocale verify-sig + +DESCRIPTION="/sbin/init - parent of all processes" +HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" +# https://github.com/slicer69/sysvinit/issues/12 +#SRC_URI="mirror://nongnu/${PN}/${P/_/-}.tar.xz" +#SRC_URI+=" verify-sig? ( mirror://nongnu/${PN}/${P/_/-}.tar.xz.sig )" +SRC_URI="https://github.com/slicer69/sysvinit/releases/download/${PV}/${P}.tar.xz" +SRC_URI+=" verify-sig? ( https://github.com/slicer69/sysvinit/releases/download/${PV}/${P}.tar.xz.sig )" +S="${WORKDIR}/${P/_*}" + +LICENSE="GPL-2" +SLOT="0" +if [[ ${PV} != *beta* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +fi +IUSE="selinux ibm nls static" + +COMMON_DEPEND=" + acct-group/root + selinux? ( + >=sys-libs/libselinux-1.28 + ) +" +DEPEND=" + ${COMMON_DEPEND} + virtual/os-headers +" +# Old OpenRC blocker is for bug #587424 +# Keep for longer than usual given it's cheap and avoid user inconvenience +RDEPEND=" + ${COMMON_DEPEND} + !<app-i18n/man-pages-l10n-4.18.1-r1 + !<sys-apps/openrc-0.13 + selinux? ( sec-policy/selinux-shutdown ) +" +# po4a is for man page translations +BDEPEND=" + nls? ( app-text/po4a ) + verify-sig? ( >=sec-keys/openpgp-keys-sysvinit-20220413 ) +" + +PATCHES=( + # bug #158615 + "${FILESDIR}/${PN}-3.08-shutdown-single.patch" +) + +src_prepare() { + default + + # We already enforce F_S=2 as a minimum in our toolchain, and + # allow 3. Also, SSP doesn't always make sense for some platforms + # e.g. HPPA. It's default-on in our toolchain where it works. + sed -i \ + -e '/^CPPFLAGS =$/d' \ + -e '/^override CFLAGS +=/s/ -fstack-protector-strong//' \ + -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" + local insert=() + use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' ) + use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' ) + use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' ) + use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' ) + use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' ) + if use ibm ; then + insert+=( + '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0' + '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0' + ) + fi + use riscv && insert=( 'sif0:12345:respawn:/sbin/agetty -L 115200 ttySIF0 vt100' ) + (use arm || use mips || use sparc) && sed -i '/ttyS0/s:#::' inittab + + if use x86 || use amd64 ; then + sed -i \ + -e '/ttyS[01]/s:9600:115200:' \ + inittab + fi + + if [[ ${#insert[@]} -gt 0 ]] ; then + printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab + fi + + delete_unused_locale() { + local locale=${1} + + einfo "Deleting non-requested man page translations for locale=${locale}" + rm "${S}"/man/po/${locale}.po || die + + sed -i -e "/^\[po4a_langs\]/ s:${locale}::" "${S}"/man/po/po4a.cfg || die + } + + plocale_for_each_disabled_locale delete_unused_locale +} + +src_compile() { + tc-export CC + + append-lfs-flags + + # bug #381311 + export DISTRO= + export VERSION="${PV}" + + use static && append-ldflags -static + emake -C src $(usex selinux 'WITH_SELINUX=yes' '') + + if use nls && [[ -n "$(plocale_get_locales)" ]] ; then + cd man/po || die + po4a po4a.cfg || die + fi +} + +src_install() { + emake -C src install ROOT="${ED}" + dodoc README doc/* + + insinto /etc + doins "${WORKDIR}"/inittab + + newinitd "${FILESDIR}"/bootlogd.initd bootlogd + newconfd "${FILESDIR}"/bootlogd.confd bootlogd + + into / + dosbin "${FILESDIR}"/halt.sh + + keepdir /etc/inittab.d + + if use nls && [[ -n "$(plocale_get_locales)" ]] ; then + install_locale_man_pages() { + doman -i18n=${1} man/po/${1}/* + } + + plocale_for_each_locale install_locale_man_pages + fi + + # Dead symlink + find "${ED}" -xtype l -delete || die + + find "${ED}" -type d -empty -delete || die +} + +pkg_postinst() { + # Reload init to fix unmounting problems of / on next reboot. + # This is really needed, as without the new version of init cause init + # not to quit properly on reboot, and causes a fsck of / on next reboot. + if [[ -z ${EROOT} ]] ; then + if [[ -e /dev/initctl ]] && [[ ! -e /run/initctl ]] ; then + ln -s /dev/initctl /run/initctl \ + || ewarn "Failed to set /run/initctl symlink!" + fi + # Do not return an error if this fails + /sbin/telinit U &>/dev/null + fi + + elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to" + elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps." + + # Required for new bootlogd service + if [[ ! -e "${EROOT}/var/log/boot" ]] ; then + touch "${EROOT}/var/log/boot" + fi + + local ver + for ver in ${REPLACING_VERSIONS}; do + ver_test ${ver} -ge 3.07-r2 && continue + ewarn "Previously, the 'halt' command caused the system to power off" + ewarn "even if option -p was not given. This long-standing bug has" + ewarn "been fixed, and the command now behaves as documented." + break + done +} |