]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - setup/setup.nm
prevent kernel address space leak via dmesg or /proc files
[ipfire-3.x.git] / setup / setup.nm
index e8a9b8c9297050d4c73dade1cdc2ab6874a871d0..e79fff10d87a1578d70754f3a1143dfcb9b6dde6 100644 (file)
@@ -5,7 +5,8 @@
 
 name       = setup
 version    = 3.0
-release    = 2
+release    = 11
+arch       = noarch
 
 groups     = Base Build System/Base
 url        =
@@ -23,6 +24,10 @@ sources    =
 build
        DIR_APP = %{DIR_SOURCE}
 
+       requires
+               perl
+       end
+
        build
                ./shadowconvert.sh
        end
@@ -36,17 +41,54 @@ 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}/{environment,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
+                       /etc/exports
+                       /etc/fstab
+                       /etc/group
+                       /etc/gshadow
+                       /etc/host.conf
+                       /etc/hosts
+                       /etc/hosts.allow
+                       /etc/hosts.deny
+                       /etc/motd
+                       /etc/passwd
+                       /etc/printcap
+                       /etc/protocols
+                       /etc/services
+                       /etc/shadow
+                       /etc/shells
+               end
        end
 end