base-files: fix conf files replacing each other wrong

This commit is contained in:
q66 2021-02-28 02:00:31 +01:00
parent 5949392125
commit 1ea593eeda
4 changed files with 11 additions and 17 deletions

View File

@ -83,17 +83,12 @@ hook() {
# Prevent packages from installing to these paths in etc, they should use # Prevent packages from installing to these paths in etc, they should use
# their equivalent in usr/lib # their equivalent in usr/lib
# for f in udev/{rules.d,hwdb.d} modprobe.d sysctl.d; do
# But base-files is a special case, since it may contains suggested but if [ -d ${PKGDESTDIR}/etc/${f} ]; then
# still user-alterable default files (particularly sysctl.d) msg_red "${pkgver}: /etc/${f} is forbidden. Use /usr/lib/${f}.\n"
if [ "${pkgname}" != "base-files" ]; then error=1
for f in udev/{rules.d,hwdb.d} modprobe.d sysctl.d; do fi
if [ -d ${PKGDESTDIR}/etc/${f} ]; then done
msg_red "${pkgver}: /etc/${f} is forbidden. Use /usr/lib/${f}.\n"
error=1
fi
done
fi
# Likewise with the comment above but for usr/share # Likewise with the comment above but for usr/share
for f in X11/xorg.conf.d gconf/schemas; do for f in X11/xorg.conf.d gconf/schemas; do

View File

@ -2,6 +2,8 @@
# For example, developer systems may want to enable kexec for kernel # For example, developer systems may want to enable kexec for kernel
# testing, or disable the ptrace restrictions to be able to gdb attach # testing, or disable the ptrace restrictions to be able to gdb attach
# to processes without root. # to processes without root.
#
# To replace, create a file of the same name in /etc/sysctl.d.
# Avoid kernel memory address exposures via dmesg. # Avoid kernel memory address exposures via dmesg.
kernel.dmesg_restrict=1 kernel.dmesg_restrict=1

View File

@ -1,7 +1,5 @@
# These are hardening options that users should typically not be altering. # 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 # User-alterable options are in 10-void-user.conf.
# will get overwritten with updates. Void systems also by default install
# certain hardening options that may be altered, in /etc/sysctl.d.
# Append the PID to the core filename # Append the PID to the core filename
kernel.core_uses_pid = 1 kernel.core_uses_pid = 1

View File

@ -1,7 +1,7 @@
# Template file for 'base-files' # Template file for 'base-files'
pkgname=base-files pkgname=base-files
version=0.141 version=0.141
revision=8 revision=9
bootstrap=yes bootstrap=yes
depends="xbps-triggers" depends="xbps-triggers"
short_desc="Void Linux base system files" short_desc="Void Linux base system files"
@ -18,7 +18,6 @@ conf_files="
/etc/skel/.bash_logout /etc/skel/.bash_logout
/etc/skel/.bashrc /etc/skel/.bashrc
/etc/skel/.inputrc /etc/skel/.inputrc
/etc/sysctl.d/10-void.conf
/etc/subuid /etc/subuid
/etc/subgid /etc/subgid
/etc/issue /etc/issue
@ -75,7 +74,7 @@ do_install() {
vinstall ${FILESDIR}/blacklist.conf 644 usr/lib/modprobe.d vinstall ${FILESDIR}/blacklist.conf 644 usr/lib/modprobe.d
# sysctl(8) files # sysctl(8) files
vinstall ${FILESDIR}/sysctl.conf 644 usr/lib/sysctl.d 10-void.conf 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. # Install common licenses, from Debian.
vmkdir usr/share/licenses vmkdir usr/share/licenses