aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/hooks/pre-pkg/99-pkglint.sh17
-rw-r--r--srcpkgs/base-files/files/sysctl-user.conf2
-rw-r--r--srcpkgs/base-files/files/sysctl.conf4
-rw-r--r--srcpkgs/base-files/template5
4 files changed, 11 insertions, 17 deletions
diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh
index 330df6d2454..ada06c485ea 100644
--- a/common/hooks/pre-pkg/99-pkglint.sh
+++ b/common/hooks/pre-pkg/99-pkglint.sh
@@ -83,17 +83,12 @@ hook() {
# Prevent packages from installing to these paths in etc, they should use
# their equivalent in usr/lib
- #
- # But base-files is a special case, since it may contains suggested but
- # still user-alterable default files (particularly sysctl.d)
- if [ "${pkgname}" != "base-files" ]; then
- for f in udev/{rules.d,hwdb.d} modprobe.d sysctl.d; do
- if [ -d ${PKGDESTDIR}/etc/${f} ]; then
- msg_red "${pkgver}: /etc/${f} is forbidden. Use /usr/lib/${f}.\n"
- error=1
- fi
- done
- fi
+ for f in udev/{rules.d,hwdb.d} modprobe.d sysctl.d; do
+ if [ -d ${PKGDESTDIR}/etc/${f} ]; then
+ msg_red "${pkgver}: /etc/${f} is forbidden. Use /usr/lib/${f}.\n"
+ error=1
+ fi
+ done
# Likewise with the comment above but for usr/share
for f in X11/xorg.conf.d gconf/schemas; do
diff --git a/srcpkgs/base-files/files/sysctl-user.conf b/srcpkgs/base-files/files/sysctl-user.conf
index 4fff32d3ce2..fa70767ef37 100644
--- a/srcpkgs/base-files/files/sysctl-user.conf
+++ b/srcpkgs/base-files/files/sysctl-user.conf
@@ -2,6 +2,8 @@
# For example, developer systems may want to enable kexec for kernel
# testing, or disable the ptrace restrictions to be able to gdb attach
# to processes without root.
+#
+# To replace, create a file of the same name in /etc/sysctl.d.
# Avoid kernel memory address exposures via dmesg.
kernel.dmesg_restrict=1
diff --git a/srcpkgs/base-files/files/sysctl.conf b/srcpkgs/base-files/files/sysctl.conf
index 56b7579f530..1e1a2768d67 100644
--- a/srcpkgs/base-files/files/sysctl.conf
+++ b/srcpkgs/base-files/files/sysctl.conf
@@ -1,7 +1,5 @@
# These are hardening options that users should typically not be altering.
-# This file is not tracked as a configuration file, so any changes in it
-# will get overwritten with updates. Void systems also by default install
-# certain hardening options that may be altered, in /etc/sysctl.d.
+# User-alterable options are in 10-void-user.conf.
# Append the PID to the core filename
kernel.core_uses_pid = 1
diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template
index d887d5c9620..c143cf024a1 100644
--- a/srcpkgs/base-files/template
+++ b/srcpkgs/base-files/template
@@ -1,7 +1,7 @@
# Template file for 'base-files'
pkgname=base-files
version=0.141
-revision=8
+revision=9
bootstrap=yes
depends="xbps-triggers"
short_desc="Void Linux base system files"
@@ -18,7 +18,6 @@ conf_files="
/etc/skel/.bash_logout
/etc/skel/.bashrc
/etc/skel/.inputrc
- /etc/sysctl.d/10-void.conf
/etc/subuid
/etc/subgid
/etc/issue
@@ -75,7 +74,7 @@ do_install() {
vinstall ${FILESDIR}/blacklist.conf 644 usr/lib/modprobe.d
# sysctl(8) files
vinstall ${FILESDIR}/sysctl.conf 644 usr/lib/sysctl.d 10-void.conf
- vinstall ${FILESDIR}/sysctl-user.conf 644 etc/sysctl.d 10-void.conf
+ vinstall ${FILESDIR}/sysctl-user.conf 644 usr/lib/sysctl.d 10-void-user.conf
# Install common licenses, from Debian.
vmkdir usr/share/licenses