diff options
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/baselayout/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/baselayout/baselayout-2.8-r1.ebuild (renamed from sys-apps/baselayout/baselayout-2.7-r11.ebuild) | 36 | ||||
-rw-r--r-- | sys-apps/baselayout/files/baselayout-redcore.patch | 34 | ||||
-rw-r--r-- | sys-apps/baselayout/files/esynccfg | 1 | ||||
-rw-r--r-- | sys-apps/baselayout/files/ioschedcfg | 6 |
5 files changed, 60 insertions, 19 deletions
diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest index 112675aa..c8541b79 100644 --- a/sys-apps/baselayout/Manifest +++ b/sys-apps/baselayout/Manifest @@ -1 +1 @@ -DIST baselayout-2.7.tar.bz2 30317 BLAKE2B 7b7c284b7d0a9608a0d03dbde0d62d793829b61d5361f5062fdeb8880a2f792c142e20acf7fa92e713e2ebb0bd1609ca65bc8a4191f2bf2c5df4f474eaeef1ee SHA512 8b28d2dc20fd5887db5c0e6b67a4217c4d0730529023fc57fb1ee95a431e1f492fb21e3e66980bef766819e9f542dc7e4ad3ae25465390194bbf970c3653c88e +DIST baselayout-2.8.tar.bz2 30236 BLAKE2B 0bac62dd5585f1f550da8c99d06a7f8ab6cdd473b0499a8f0ac58a5c43e3883b42adb7f80c172d894fae93a6ddb6fec7a65cad9897f4a2532b481c82065ed96b SHA512 506d7cc8399b530eabc9ba2d16cbb6c024350f9487a2a9168c670cee9876f62e5a716942f698c4883013d6ccc9591c2d7fc2ac9d782f0ce8d724371ca94c739a diff --git a/sys-apps/baselayout/baselayout-2.7-r11.ebuild b/sys-apps/baselayout/baselayout-2.8-r1.ebuild index 5ff56642..8a46a9fb 100644 --- a/sys-apps/baselayout/baselayout-2.7-r11.ebuild +++ b/sys-apps/baselayout/baselayout-2.8-r1.ebuild @@ -3,7 +3,7 @@ EAPI=6 -inherit multilib versionator prefix +inherit multilib versionator prefix udev DESCRIPTION="Filesystem baselayout and init scripts" HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" @@ -188,12 +188,11 @@ pkg_preinst() { src_prepare() { default - eapply "${FILESDIR}/${PN}-redcore.patch" + eapply "${FILESDIR}"/"${PN}"-redcore.patch if use prefix; then hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd - echo PATH=/usr/bin:/bin >> etc/env.d/99host - echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host + echo PATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host fi # don't want symlinked directories in PATH on systems with usr-merge @@ -221,7 +220,7 @@ src_prepare() { echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout # rc-scripts version for testing of features that *should* be present - echo "Redcore Linux Hardened - current" > etc/redcore-release + echo "Redcore Linux Hardened - rolling" > etc/redcore-release } src_install() { @@ -229,17 +228,11 @@ src_install() { OS=$(usex kernel_FreeBSD BSD Linux) \ DESTDIR="${ED}" \ install - dodoc ChangeLog - rm "${ED}"/etc/sysctl.d/README || die # need the makefile in pkg_preinst insinto /usr/share/${PN} doins Makefile - - # This is needed for https://bugs.gentoo.org/732142 - dodir /usr/lib - mv "${ED}"/etc/os-release "${ED}"/usr/lib || die - dosym ../usr/lib/os-release /etc/os-release + dodoc ChangeLog ############### Redcore Linux ############### # @@ -271,6 +264,16 @@ src_install() { insinto /etc/conf.d newins ${FILESDIR}/dmcryptcfg dmcrypt # + # esync + dodir /etc/security/limits.d + insinto /etc/security/limits.d + newins ${FILESDIR}/esynccfg 50-esync.conf + # + # IOsched + dodir /lib/udev/rules.d/ + insinto /lib/udev/rules.d + newins ${FILESDIR}/ioschedcfg 60-iosched.rules + # ############################################## } @@ -354,7 +357,16 @@ pkg_postinst() { rm -rf "${EROOT}"etc/default/._cfg????_grub rm -rf "${EROOT}"etc/samba/._cfg????_smb.conf rm -rf "${EROOT}"etc/conf.d/._cfg???_dmcrypt + rm -rf "${EROOT}"etc/security/limits.d/._cfg???_50-esync.conf + rm -rf "${EROOT}"lib/udev/rules.d/._cfg???_60-iosched.rules chown root:smbshare /var/lib/samba/usershare chmod 1770 /var/lib/samba/usershare + udev_reload + ############################################ +} + +pkg_postrm() { + ############### Redcore Linux ############### + udev_reload ############################################ } diff --git a/sys-apps/baselayout/files/baselayout-redcore.patch b/sys-apps/baselayout/files/baselayout-redcore.patch index be6129bf..ef24e25a 100644 --- a/sys-apps/baselayout/files/baselayout-redcore.patch +++ b/sys-apps/baselayout/files/baselayout-redcore.patch @@ -1,13 +1,33 @@ -diff -Nur a/etc.Linux/os-release b/etc.Linux/os-release ---- a/etc.Linux/os-release 2017-06-09 19:37:50.000000000 +0100 -+++ b/etc.Linux/os-release 2018-01-12 08:35:13.951741903 +0000 -@@ -1,7 +1,7 @@ +diff -Nur a/Makefile b/Makefile +--- a/Makefile 2021-09-27 22:48:05.000000000 +0100 ++++ b/Makefile 2022-09-21 12:52:08.248406011 +0100 +@@ -63,12 +63,11 @@ + install: + $(INSTALL_DIR) $(DESTDIR)/etc + cp -pPR etc/* etc.$(OS)/* $(DESTDIR)/etc/ +- echo "Gentoo Base System release ${PV}" > ${DESTDIR}/etc/gentoo-release + $(INSTALL_DIR) $(DESTDIR)/lib + cp -pPR lib.$(OS)/* $(DESTDIR)/lib/ + $(INSTALL_DIR) $(DESTDIR)/usr/lib + ln -snf ../usr/lib/os-release ${DESTDIR}/etc/os-release +- ./make_os_release ${OS} ${PV} > $(DESTDIR)/usr/lib/os-release ++ ./make_os_release ${OS} rolling > $(DESTDIR)/usr/lib/os-release + $(INSTALL_DIR) $(DESTDIR)/usr/share/baselayout + cp -pPR share.$(OS)/* $(DESTDIR)/usr/share/baselayout/ + +diff -Nur a/make_os_release b/make_os_release +--- a/make_os_release 2021-09-27 22:48:05.000000000 +0100 ++++ b/make_os_release 2022-09-21 12:49:21.760390518 +0100 +@@ -4,12 +4,12 @@ + exit 1 + fi + cat <<EOF -NAME=Gentoo -ID=gentoo --PRETTY_NAME="Gentoo/Linux" +-PRETTY_NAME="Gentoo ${1}" +NAME=Redcore +ID=redcore -+PRETTY_NAME="Redcore/Linux" ++PRETTY_NAME="Redcore ${1} Hardened" ANSI_COLOR="1;32" -HOME_URL="https://www.gentoo.org/" -SUPPORT_URL="https://www.gentoo.org/support/" @@ -15,3 +35,5 @@ diff -Nur a/etc.Linux/os-release b/etc.Linux/os-release +HOME_URL="https://redcorelinux.org/" +SUPPORT_URL="https://wiki.redcorelinux.org/" +BUG_REPORT_URL="https://bugs.redcorelinux.org/" + VERSION_ID="${2}" + EOF diff --git a/sys-apps/baselayout/files/esynccfg b/sys-apps/baselayout/files/esynccfg new file mode 100644 index 00000000..90626a17 --- /dev/null +++ b/sys-apps/baselayout/files/esynccfg @@ -0,0 +1 @@ +* hard nofile 1048576 diff --git a/sys-apps/baselayout/files/ioschedcfg b/sys-apps/baselayout/files/ioschedcfg new file mode 100644 index 00000000..9047bd4a --- /dev/null +++ b/sys-apps/baselayout/files/ioschedcfg @@ -0,0 +1,6 @@ +# set mq-deadline scheduler for non-rotating disks (SATA SSDs) +ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline" +# set bfq scheduler for rotating disks (SATA HDDs) +ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq" +# set mq-deadline scheduler for non-rotating nvme-disks (NVME SSDs) +ACTION=="add|change", KERNEL=="nvme[0-9]n1", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline" |