]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/blob - setup/setup.nm
Change how we make packages "noarch"
[people/pmueller/ipfire-3.x.git] / setup / setup.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = setup
7 version = 3.0
8 release = 18
9
10 groups = Base Build System/Base
11 url =
12 license = Public Domain
13 summary = A set of system configuration and setup files.
14
15 description
16 The setup package contains a set of important system configuration and
17 setup files, such as passwd, group, and profile.
18 end
19
20 # No tarball.
21 sources =
22
23 build
24 arches = noarch
25
26 DIR_APP = %{DIR_SOURCE}
27
28 requires
29 perl
30 end
31
32 build
33 bash ./shadowconvert.sh
34 end
35
36 test
37 make check
38 end
39
40 install
41 # Create missing folders.
42 mkdir -pv %{BUILDROOT}/etc/profile.d %{BUILDROOT}/var/log
43
44 # Install our config files.
45 for i in aliases bashrc ethertypes exports filesystems group gshadow \
46 host.conf hosts hosts.allow hosts.deny inputrc motd passwd \
47 printcap profile protocols securetty services shadow shells; do \
48 cp -vf %{DIR_APP}/${i} %{BUILDROOT}/etc || exit 1; \
49 done
50
51 # Create envvar overwrite file for bash.
52 echo "#Add any required envvar overrides to this file, \
53 it is sourced from /etc/profile" > %{BUILDROOT}%{sysconfdir}/profile.d/sh.local
54
55 touch %{BUILDROOT}%{sysconfdir}/fstab
56 chmod -v 0400 %{BUILDROOT}%{sysconfdir}/{,g}shadow
57
58 # Create empty environment config file.
59 touch %{BUILDROOT}%{sysconfdir}/environment
60 chmod 0644 %{BUILDROOT}%{sysconfdir}/environment
61
62 # Create MOTD (message of the day) folder layout.
63 mkdir -p %{BUILDROOT}/etc/motd.d
64 mkdir -p %{BUILDROOT}/usr/lib/motd.d
65 touch %{BUILDROOT}/usr/lib/motd
66
67 # Create a tmpfiles file, needed for files in /run
68 mkdir -p %{BUILDROOT}%{tmpfilesdir}
69 echo "f /run/motd 0644 root root -" > %{BUILDROOT}%{tmpfilesdir}/%{name}.conf
70 echo "d /run/motd.d 0755 root root -" >> %{BUILDROOT}%{tmpfilesdir}/%{name}.conf
71 chmod 0644 %{BUILDROOT}%{tmpfilesdir}/%{name}.conf
72
73 mkdir -pv %{BUILDROOT}%{sysconfdir}/sysctl.d
74 install -m 644 %{DIR_APP}/sysctl/printk.conf \
75 %{BUILDROOT}%{sysconfdir}/sysctl.d/printk.conf
76 install -m 644 %{DIR_APP}/sysctl/swappiness.conf \
77 %{BUILDROOT}%{sysconfdir}/sysctl.d/swappiness.conf
78 install -m 644 %{DIR_APP}/sysctl/kernel-hardening.conf \
79 %{BUILDROOT}%{sysconfdir}/sysctl.d/kernel-hardening.conf
80 end
81 end
82
83 packages
84 package %{name}
85 conflicts
86 filesystem < 002
87 end
88
89 obsoletes
90 iana-etc <= 2.30
91 end
92
93 provides
94 iana-etc = 2.31
95 end
96
97 configfiles
98 /etc/aliases
99 /etc/environment
100 /etc/ethertypes
101 /etc/exports
102 /etc/fstab
103 /etc/group
104 /etc/gshadow
105 /etc/host.conf
106 /etc/hosts
107 /etc/hosts.allow
108 /etc/hosts.deny
109 /etc/motd
110 /etc/passwd
111 /etc/printcap
112 /etc/protocols
113 /etc/services
114 /etc/shadow
115 /etc/shells
116 end
117 end
118 end