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