]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - setup/setup.nm
sysctl.conf: Turn on hard- and symlink protection
[ipfire-3.x.git] / setup / setup.nm
index 891af408f8d373bd406b18f3017585500c831bab..cc8454bfa35b37776b1c6ee0e37ce663ecd12b88 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = setup
 version    = 3.0
-release    = 4
+release    = 15
 arch       = noarch
 
 groups     = Base Build System/Base
@@ -24,6 +24,10 @@ sources    =
 build
        DIR_APP = %{DIR_SOURCE}
 
+       requires
+               perl
+       end
+
        build
                ./shadowconvert.sh
        end
@@ -37,18 +41,36 @@ build
 
                for i in aliases bashrc exports filesystems group gshadow host.conf \
                        hosts hosts.allow hosts.deny inputrc motd passwd printcap \
-                       profile securetty shadow shells; do \
+                       profile protocols securetty services shadow shells; do \
                        cp -vf %{DIR_APP}/${i} %{BUILDROOT}/etc || exit 1; \
                done
 
-               touch %{BUILDROOT}/etc/{environment,fstab}
-               chmod -v 0400 %{BUILDROOT}/etc/{,g}shadow
+               touch %{BUILDROOT}%{sysconfdir}/fstab
+               chmod -v 0400 %{BUILDROOT}%{sysconfdir}/{,g}shadow
+
+               mkdir -pv %{BUILDROOT}%{sysconfdir}/sysctl.d
+               install -m 644 %{DIR_APP}/sysctl/printk.conf \
+                       %{BUILDROOT}%{sysconfdir}/sysctl.d/printk.conf
+               install -m 644 %{DIR_APP}/sysctl/swappiness.conf \
+                       %{BUILDROOT}%{sysconfdir}/sysctl.d/swappiness.conf
+               install -m 644 %{DIR_APP}/sysctl/kernel-hardening.conf \
+                       %{BUILDROOT}%{sysconfdir}/sysctl.d/kernel-hardening.conf
        end
 end
 
 packages
        package %{name}
-               requires = iana-etc
+               conflicts
+                       filesystem < 002
+               end
+
+               obsoletes
+                       iana-etc <= 2.30
+               end
+
+               provides
+                       iana-etc = 2.31
+               end
 
                configfiles
                        /etc/aliases
@@ -63,6 +85,8 @@ packages
                        /etc/motd
                        /etc/passwd
                        /etc/printcap
+                       /etc/protocols
+                       /etc/services
                        /etc/shadow
                        /etc/shells
                end