]> git.ipfire.org Git - ipfire-3.x.git/blob - systemd/systemd.nm
systemd: Update to 195.
[ipfire-3.x.git] / systemd / systemd.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = systemd
7 version = 195
8 release = 1
9
10 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
11 groups = System/Base
12 url = http://www.freedesktop.org/wiki/Software/systemd
13 license = GPLv2+
14 summary = A System and Service Manager.
15
16 description
17 systemd is a system and service manager for Linux, compatible with
18 SysV and LSB init scripts.
19 end
20
21 source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/
22
23 build
24 unitdir = %{prefix}/lib/systemd/system
25
26 requires
27 audit-devel
28 automake
29 autoconf
30 cryptsetup-luks-devel >= 1.4.2
31 dbus-devel
32 docbook-utils
33 docbook-xsl
34 gettext-devel
35 glib2-devel
36 gobject-introspection-devel >= 1.31
37 gperf
38 hwdata
39 intltool
40 kmod-devel >= 5
41 libacl-devel
42 libblkid-devel
43 libcap-devel
44 libgcrypt-devel
45 libselinux-devel
46 libtool
47 libuuid-devel
48 pam-devel
49 pciutils-devel
50 usbutils
51 vala
52 xz-devel
53 end
54
55 configure_options += \
56 --with-distro=ipfire \
57 --disable-static
58
59 prepare_cmds
60 ./autogen.sh ac
61 end
62
63 install_cmds
64 # Create folder in log to store the journal.
65 mkdir -pv %{BUILDROOT}/var/log/journal
66
67 # Create sysv compatible symlinks.
68 mkdir -pv %{BUILDROOT}%{sbindir}
69 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init
70 ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd
71 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot
72 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt
73 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff
74 ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown
75
76 # Create empty machine-id file.
77 touch %{BUILDROOT}/etc/machine-id
78
79 # Copy locale and console settings
80 mkdir -pv %{BUILDROOT}%{sysconfdir}
81 cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir}
82
83 # Recreate all targets
84 rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants
85 for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \
86 multi-user.target.wants syslog.target.wants; do
87 mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1
88 done
89
90 # Remove runlevel targets and graphical.target
91 rm -rfv %{BUILDROOT}%{unitdir}/runlevel*
92 rm -rfv %{BUILDROOT}%{unitdir}/graphical.target
93
94 # Remove service files for utmp update.
95 rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service
96 rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service
97
98 # Set default target to multi-user
99 ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target
100
101 # Replace absolute symlinks by relative ones.
102 cd %{BUILDROOT}%{unitdir}/../user
103 for i in bluetooth local-fs printer remote-fs shutdown sockets sound swap; do
104 ln -svf ../system/${i}.target ${i}.target || exit 1
105 done
106
107 # Remove tmpfile for X11
108 rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf
109
110 # Remove unneeded symlink for xdg
111 rm -rfv %{BUILDROOT}/etc/xdg/systemd
112
113 # Use journald. Enable the import of kernel messages.
114 # Stop forwarding to a syslog daemon.
115 sed \
116 -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \
117 -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \
118 -i %{BUILDROOT}/etc/systemd/journald.conf
119 end
120 end
121
122 packages
123 package %{name}
124 groups += Base
125
126 prerequires += authconfig
127
128 requires
129 dbus
130 hwdata
131 python-cairo
132 python-dbus
133 %{name}-units=%{thisver}
134 util-linux>=2.19
135 end
136
137 provides
138 /bin/systemd
139 /sbin/halt
140 /sbin/init
141 /sbin/poweroff
142 /sbin/reboot
143 /sbin/shutdown
144
145 syslog
146 udev = %{thisver}
147 end
148
149 conflicts
150 dracut < 019
151 filesystem < 002
152 rsyslog < 5.8.6-4
153 upstart
154 end
155
156 obsoletes
157 udev < 183
158 end
159
160 configfiles
161 /etc/locale.conf
162 /etc/machine-id
163 /etc/systemd/journald.conf
164 /etc/systemd/logind.conf
165 /etc/systemd/system.conf
166 /etc/systemd/user.conf
167 /etc/udev/udev.conf
168 /etc/vconsole.conf
169 end
170
171 script prein
172 # Create groups for udev.
173 getent group cdrom >/dev/null || groupadd -g 11 cdrom || :
174 getent group tape >/dev/null || groupadd -g 33 tape || :
175 getent group dialout >/dev/null || groupadd -g 18 dialout || :
176 getent group floppy >/dev/null || groupadd -g 19 floppy || :
177 end
178
179 script postin
180 # Generate Machine ID.
181 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
182
183 # Reexec systemd daemon.
184 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
185
186 # Make sure pam_systemd is enabled
187 if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then
188 authconfig --update --nostart >/dev/null 2>&1 || :
189
190 # Try harder
191 grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || :
192 fi
193
194 /usr/bin/systemctl enable \
195 getty@.service \
196 remote-fs.target \
197 systemd-readahead-replay.service \
198 systemd-readahead-collect.service \
199 >/dev/null 2>&1 || :
200 end
201
202 script preup
203 # Be sure to stop the old udev before updating.
204 /usr/bin/systemctl stop udev.service udev-trigger.service \
205 udev-control.socket udev-kernel.socket >/dev/null 2>&1 || :
206 end
207
208 script postup
209 # Restart login service after update
210 /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
211 /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || :
212
213 # Use the new journald configuration file and restart the service.
214 if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then
215 mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf
216 /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || :
217 fi
218 end
219
220 # Be sure to start the new udev after everything is done.
221 script posttransup
222 /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || :
223 end
224 end
225
226 # Package information for systemd-units
227 package %{name}-units
228 summary = Configuration files, directories and installation tool for systemd.
229 description
230 This package contains all needed configuration files, directories
231 and installation / configuration tool for systemd.
232 end
233
234 prerequires
235 /bin/sh
236 coreutils
237 end
238
239 provides
240 /bin/systemctl
241 end
242
243 conflicts
244 filesystem < 002
245 end
246
247 files
248 %{sysconfdir}/etc/systemd/system
249 %{sysconfdir}/tmpfiles.d
250 %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh
251 %{unitdir}
252 %{bindir}/systemctl
253 %{bindir}/systemd-tmpfiles
254 %{mandir}/man1/systemctl.*
255 end
256
257 script postup
258 # Reload service files
259 /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || :
260 end
261 end
262
263 package %{name}-devel
264 template DEVEL
265
266 files += %{prefix}/lib/pakfire/macros/
267 end
268
269 package libudev
270 summary = Libraries for adding libudev support to applications.
271 description
272 This package contains the libraries that make it easier to use libudev
273 functionality from applications.
274 end
275 license = LGPLv2+
276
277 conflicts
278 filesystem < 002
279 end
280
281 files
282 %{libdir}/libgudev*.so.*
283 %{libidr}/girepository*/
284 end
285 end
286
287 package libudev-devel
288 summary = Header files for adding libudev support to applications.
289 description
290 This package contains the header and pkg-config files for developing
291 applications using libudev functionality.
292 end
293 license = LGPLv2+
294
295 conflicts
296 filesystem < 002
297 end
298
299 files
300 %{libdir}/lib*udev*.so
301 %{libdir}/pkgconfig/lib*udev.pc
302 %{libdir}/pkgconfig/gudev*
303 %{includedir}/lib*udev.h
304 %{includedir}/gudev*
305 %{datadir}/gir-*
306 %{datadir}/gtk-doc/html/gudev
307 end
308 end
309
310 package %{name}-debuginfo
311 template DEBUGINFO
312 end
313 end