]>
Commit | Line | Data |
---|---|---|
c8ef6def | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
c8ef6def SS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = systemd |
1b81106b | 7 | version = 204 |
4f209325 | 8 | release = 5 |
c8ef6def | 9 | |
802ea3af MT |
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. | |
c8ef6def | 15 | |
802ea3af MT |
16 | description |
17 | systemd is a system and service manager for Linux, compatible with | |
c8ef6def | 18 | SysV and LSB init scripts. |
802ea3af MT |
19 | end |
20 | ||
5e38e9bb | 21 | source_dl = http://cgit.freedesktop.org/systemd/systemd/snapshot/ |
802ea3af MT |
22 | |
23 | build | |
6793fec1 MT |
24 | unitdir = %{prefix}/lib/systemd/system |
25 | ||
802ea3af | 26 | requires |
b329a155 | 27 | attr-devel |
802ea3af MT |
28 | audit-devel |
29 | automake | |
30 | autoconf | |
2d01364a | 31 | cryptsetup-luks-devel >= 1.4.2 |
802ea3af | 32 | dbus-devel |
fe6e3719 SS |
33 | docbook-utils |
34 | docbook-xsl | |
bfabb323 | 35 | gettext-devel |
2d01364a SS |
36 | glib2-devel |
37 | gobject-introspection-devel >= 1.31 | |
38 | gperf | |
39 | hwdata | |
802ea3af | 40 | intltool |
6793fec1 | 41 | kmod-devel >= 5 |
2a824e90 | 42 | libacl-devel |
2d01364a | 43 | libblkid-devel |
802ea3af | 44 | libcap-devel |
4990bf7f | 45 | libgcrypt-devel |
802ea3af MT |
46 | libselinux-devel |
47 | libtool | |
4990bf7f | 48 | libuuid-devel |
802ea3af | 49 | pam-devel |
2d01364a SS |
50 | pciutils-devel |
51 | usbutils | |
53a325cb | 52 | vala |
6793fec1 | 53 | xz-devel |
802ea3af MT |
54 | end |
55 | ||
56 | configure_options += \ | |
7f84cbd5 SS |
57 | --with-sysvinit-path= \ |
58 | --with-sysvrcnd-path= \ | |
59 | --enable-introspection=yes \ | |
2d01364a | 60 | --disable-static |
802ea3af MT |
61 | |
62 | prepare_cmds | |
63 | ./autogen.sh ac | |
64 | end | |
65 | ||
802ea3af | 66 | install_cmds |
755fe986 SS |
67 | # Create folder in log to store the journal. |
68 | mkdir -pv %{BUILDROOT}/var/log/journal | |
69 | ||
802ea3af | 70 | # Create sysv compatible symlinks. |
6793fec1 MT |
71 | mkdir -pv %{BUILDROOT}%{sbindir} |
72 | ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{sbindir}/init | |
73 | ln -svf ../lib/systemd/systemd %{BUILDROOT}/%{bindir}/systemd | |
74 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/reboot | |
75 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/halt | |
76 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/poweroff | |
77 | ln -svf ../bin/systemctl %{BUILDROOT}/%{sbindir}/shutdown | |
802ea3af MT |
78 | |
79 | # Create empty machine-id file. | |
80 | touch %{BUILDROOT}/etc/machine-id | |
81 | ||
82 | # Copy locale and console settings | |
6793fec1 MT |
83 | mkdir -pv %{BUILDROOT}%{sysconfdir} |
84 | cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir} | |
802ea3af MT |
85 | |
86 | # Recreate all targets | |
0976fbe4 SS |
87 | rm -rfv %{BUILDROOT}/%{sysconfdir}/systemd/system/*.target.wants |
88 | for i in basic.target.wants default.target.wants dbus.target.wants getty.target.wants \ | |
89 | multi-user.target.wants syslog.target.wants; do | |
90 | mkdir -pv %{BUILDROOT}/%{sysconfdir}/systemd/system/${i} || exit 1 | |
6793fec1 | 91 | done |
802ea3af MT |
92 | |
93 | # Remove runlevel targets and graphical.target | |
6793fec1 MT |
94 | rm -rfv %{BUILDROOT}%{unitdir}/runlevel* |
95 | rm -rfv %{BUILDROOT}%{unitdir}/graphical.target | |
802ea3af | 96 | |
2d01364a SS |
97 | # Remove service files for utmp update. |
98 | rm -rvf %{BUILDROOT}%{unitdir}/systemd-update-utmp-*.service | |
99 | rm -rvf %{BUILDROOT}%{unitdir}/shutdown.target.wants/systemd-update-utmp-*.service | |
100 | ||
802ea3af | 101 | # Set default target to multi-user |
6793fec1 | 102 | ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target |
802ea3af MT |
103 | |
104 | # Replace absolute symlinks by relative ones. | |
6793fec1 | 105 | cd %{BUILDROOT}%{unitdir}/../user |
7f84cbd5 | 106 | for i in bluetooth local-fs paths printer remote-fs shutdown smartcard sockets sound swap timers; do |
6793fec1 MT |
107 | ln -svf ../system/${i}.target ${i}.target || exit 1 |
108 | done | |
109 | ||
802ea3af MT |
110 | # Remove tmpfile for X11 |
111 | rm -rfv %{BUILDROOT}/usr/lib/tmpfiles.d/x11.conf | |
112 | ||
7f84cbd5 SS |
113 | # Remove unneeded stuff for xdg |
114 | rm -rfv %{BUILDROOT}/etc/xdg | |
115 | ||
116 | # Remove unneeded stuff for rpm. | |
117 | rm -rvf %{BUILDROOT}/etc/rpm | |
755fe986 SS |
118 | |
119 | # Use journald. Enable the import of kernel messages. | |
120 | # Stop forwarding to a syslog daemon. | |
121 | sed \ | |
122 | -e "s/^#ForwardToSyslog=.*$/ForwardToSyslog=no/" \ | |
123 | -e "s/^#ImportKernel=.*$/ImportKernel=yes/" \ | |
124 | -i %{BUILDROOT}/etc/systemd/journald.conf | |
f2ada565 SS |
125 | |
126 | # Install legacy tmpfile to autocreate /run/lock on startup. | |
127 | install -v -m 644 %{DIR_APP}/tmpfiles.d/legacy.conf %{BUILDROOT}%{prefix}/lib/tmpfiles.d/ | |
4f209325 MT |
128 | |
129 | # Remove udev rules for "predictable" network device renaming. | |
130 | # http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ | |
131 | rm -vf %{BUILDROOT}/usr/lib/udev/rules.d/80-net-name-slot.rules | |
802ea3af MT |
132 | end |
133 | end | |
134 | ||
135 | packages | |
136 | package %{name} | |
2d01364a SS |
137 | groups += Base |
138 | ||
6793fec1 MT |
139 | prerequires += authconfig |
140 | ||
514357ad SS |
141 | requires |
142 | dbus | |
2d01364a | 143 | hwdata |
514357ad | 144 | python-cairo |
1d40b321 | 145 | python-dbus |
7f84cbd5 | 146 | python-gobject3 |
519776fd | 147 | %{name}-libs=%{thisver} |
214d8f27 | 148 | %{name}-units=%{thisver} |
514357ad SS |
149 | util-linux>=2.19 |
150 | end | |
1d40b321 | 151 | |
216fde50 SS |
152 | provides |
153 | /bin/systemd | |
154 | /sbin/halt | |
155 | /sbin/init | |
156 | /sbin/poweroff | |
157 | /sbin/reboot | |
158 | /sbin/shutdown | |
2d01364a | 159 | |
755fe986 | 160 | syslog |
2d01364a | 161 | udev = %{thisver} |
216fde50 SS |
162 | end |
163 | ||
6793fec1 | 164 | conflicts |
7f84cbd5 | 165 | bash-completion < 2.1 |
2d01364a | 166 | dracut < 019 |
6793fec1 | 167 | filesystem < 002 |
755fe986 | 168 | rsyslog < 5.8.6-4 |
6793fec1 MT |
169 | upstart |
170 | end | |
ef438375 | 171 | |
2d01364a SS |
172 | obsoletes |
173 | udev < 183 | |
174 | end | |
175 | ||
176 | configfiles | |
177 | /etc/locale.conf | |
178 | /etc/machine-id | |
179 | /etc/systemd/journald.conf | |
180 | /etc/systemd/logind.conf | |
181 | /etc/systemd/system.conf | |
182 | /etc/systemd/user.conf | |
183 | /etc/udev/udev.conf | |
184 | /etc/vconsole.conf | |
185 | end | |
186 | ||
187 | script prein | |
188 | # Create groups for udev. | |
189 | getent group cdrom >/dev/null || groupadd -g 11 cdrom || : | |
190 | getent group tape >/dev/null || groupadd -g 33 tape || : | |
191 | getent group dialout >/dev/null || groupadd -g 18 dialout || : | |
192 | getent group floppy >/dev/null || groupadd -g 19 floppy || : | |
193 | end | |
194 | ||
1d40b321 SS |
195 | script postin |
196 | # Generate Machine ID. | |
6793fec1 | 197 | /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || : |
1d40b321 SS |
198 | |
199 | # Reexec systemd daemon. | |
6793fec1 | 200 | /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || : |
1d40b321 SS |
201 | |
202 | # Make sure pam_systemd is enabled | |
6793fec1 MT |
203 | if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then |
204 | authconfig --update --nostart >/dev/null 2>&1 || : | |
1d40b321 SS |
205 | |
206 | # Try harder | |
6793fec1 | 207 | grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || : |
1d40b321 | 208 | fi |
5e462903 MT |
209 | |
210 | /usr/bin/systemctl enable \ | |
211 | getty@.service \ | |
50affca1 | 212 | remote-fs.target \ |
5e462903 MT |
213 | systemd-readahead-replay.service \ |
214 | systemd-readahead-collect.service \ | |
215 | >/dev/null 2>&1 || : | |
1d40b321 SS |
216 | end |
217 | ||
2d01364a SS |
218 | script preup |
219 | # Be sure to stop the old udev before updating. | |
220 | /usr/bin/systemctl stop udev.service udev-trigger.service \ | |
221 | udev-control.socket udev-kernel.socket >/dev/null 2>&1 || : | |
222 | end | |
223 | ||
1d40b321 SS |
224 | script postup |
225 | # Restart login service after update | |
5e462903 | 226 | /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
6793fec1 | 227 | /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : |
755fe986 SS |
228 | |
229 | # Use the new journald configuration file and restart the service. | |
230 | if ! grep -xq ImportKernel=yes /etc/systemd/journald.conf ; then | |
231 | mv /etc/systemd/journald.conf.paknew /etc/systemd/journald.conf | |
232 | /usr/bin/systemctl restart systemd-journald.service >/dev/null 2>&1 || : | |
233 | fi | |
1d40b321 | 234 | end |
2d01364a SS |
235 | |
236 | # Be sure to start the new udev after everything is done. | |
237 | script posttransup | |
238 | /usr/bin/systemctl start systemd-udev.service >/dev/null 2>&1 || : | |
239 | end | |
802ea3af | 240 | end |
1f9bc2f0 | 241 | |
802ea3af MT |
242 | # Package information for systemd-units |
243 | package %{name}-units | |
244 | summary = Configuration files, directories and installation tool for systemd. | |
245 | description | |
246 | This package contains all needed configuration files, directories | |
247 | and installation / configuration tool for systemd. | |
248 | end | |
1f9bc2f0 | 249 | |
5e38e9bb SS |
250 | prerequires |
251 | /bin/sh | |
252 | coreutils | |
253 | end | |
254 | ||
6793fec1 | 255 | provides |
802ea3af | 256 | /bin/systemctl |
802ea3af | 257 | end |
1d40b321 | 258 | |
6793fec1 MT |
259 | conflicts |
260 | filesystem < 002 | |
1d40b321 SS |
261 | end |
262 | ||
6793fec1 MT |
263 | files |
264 | %{sysconfdir}/etc/systemd/system | |
265 | %{sysconfdir}/tmpfiles.d | |
266 | %{sysconfdir}/bash_completion.d/systemctl-bash-completion.sh | |
267 | %{unitdir} | |
268 | %{bindir}/systemctl | |
269 | %{bindir}/systemd-tmpfiles | |
270 | %{mandir}/man1/systemctl.* | |
1d40b321 SS |
271 | end |
272 | ||
273 | script postup | |
274 | # Reload service files | |
6793fec1 | 275 | /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : |
1d40b321 | 276 | end |
802ea3af | 277 | end |
1f9bc2f0 | 278 | |
1191e383 SS |
279 | package %{name}-libs |
280 | template LIBS | |
519776fd SS |
281 | |
282 | groups += Base | |
283 | ||
284 | prerequires | |
285 | /etc/nsswitch.conf | |
286 | end | |
287 | ||
288 | provides | |
289 | nss-myhostname = %{thisver} | |
290 | end | |
291 | ||
292 | obsoletes | |
293 | nss-myhostname <= 0.3-3 | |
294 | end | |
295 | ||
296 | conflicts | |
519776fd SS |
297 | # Ensure that the version of systemd matches systemd-libs. |
298 | systemd > %{thisver} | |
299 | systemd < %{thisver} | |
300 | end | |
301 | ||
302 | # Add myhostname to the hosts line of /etc/nsswitch.conf | |
303 | script postin | |
304 | if [ -f "/etc/nsswitch.conf" ]; then | |
305 | sed -i.bak -e ' | |
306 | /^hosts:/ !b | |
307 | /\<myhostname\>/ b | |
308 | s/[[:blank:]]*$/ myhostname/ | |
309 | ' /etc/nsswitch.conf | |
310 | fi | |
311 | end | |
312 | ||
313 | # Remove myhostname from the hosts line of /etc/nsswitch.conf | |
314 | script postun | |
315 | if [ -f "/etc/nsswitch.conf" ]; then | |
316 | sed -i.bak -e ' | |
317 | /^hosts:/ !b | |
318 | s/[[:blank:]]\+myhostname\>// | |
319 | ' /etc/nsswitch.conf | |
320 | fi | |
321 | end | |
1191e383 SS |
322 | end |
323 | ||
802ea3af MT |
324 | package %{name}-devel |
325 | template DEVEL | |
6793fec1 MT |
326 | |
327 | files += %{prefix}/lib/pakfire/macros/ | |
802ea3af | 328 | end |
1f9bc2f0 | 329 | |
2d01364a SS |
330 | package libudev |
331 | summary = Libraries for adding libudev support to applications. | |
332 | description | |
333 | This package contains the libraries that make it easier to use libudev | |
334 | functionality from applications. | |
335 | end | |
336 | license = LGPLv2+ | |
337 | ||
338 | conflicts | |
339 | filesystem < 002 | |
340 | end | |
341 | ||
342 | files | |
1191e383 | 343 | %{libdir}/lib*udev*.so.* |
2d01364a SS |
344 | %{libidr}/girepository*/ |
345 | end | |
346 | end | |
347 | ||
348 | package libudev-devel | |
349 | summary = Header files for adding libudev support to applications. | |
350 | description | |
351 | This package contains the header and pkg-config files for developing | |
352 | applications using libudev functionality. | |
353 | end | |
354 | license = LGPLv2+ | |
355 | ||
356 | conflicts | |
357 | filesystem < 002 | |
358 | end | |
359 | ||
360 | files | |
a8aa3ead | 361 | %{libdir}/lib*udev*.so |
73eb4724 | 362 | %{libdir}/pkgconfig/lib*udev.pc |
2d01364a | 363 | %{libdir}/pkgconfig/gudev* |
a8aa3ead | 364 | %{includedir}/lib*udev.h |
2d01364a SS |
365 | %{includedir}/gudev* |
366 | %{datadir}/gir-* | |
367 | %{datadir}/gtk-doc/html/gudev | |
368 | end | |
369 | end | |
370 | ||
1f9bc2f0 MT |
371 | package %{name}-debuginfo |
372 | template DEBUGINFO | |
373 | end | |
802ea3af | 374 | end |