]>
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 |
e633b4ff | 7 | version = 187 |
755fe986 | 8 | release = 2 |
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 MT |
26 | requires |
27 | audit-devel | |
28 | automake | |
29 | autoconf | |
2d01364a | 30 | cryptsetup-luks-devel >= 1.4.2 |
802ea3af | 31 | dbus-devel |
fe6e3719 SS |
32 | docbook-utils |
33 | docbook-xsl | |
bfabb323 | 34 | gettext-devel |
2d01364a SS |
35 | glib2-devel |
36 | gobject-introspection-devel >= 1.31 | |
37 | gperf | |
38 | hwdata | |
802ea3af | 39 | intltool |
6793fec1 | 40 | kmod-devel >= 5 |
2a824e90 | 41 | libacl-devel |
2d01364a | 42 | libblkid-devel |
802ea3af MT |
43 | libcap-devel |
44 | libselinux-devel | |
45 | libtool | |
802ea3af | 46 | pam-devel |
2d01364a SS |
47 | pciutils-devel |
48 | usbutils | |
53a325cb | 49 | vala |
6793fec1 | 50 | xz-devel |
802ea3af MT |
51 | end |
52 | ||
53 | configure_options += \ | |
2d01364a SS |
54 | --with-distro=ipfire \ |
55 | --disable-static | |
802ea3af MT |
56 | |
57 | prepare_cmds | |
58 | ./autogen.sh ac | |
59 | end | |
60 | ||
802ea3af | 61 | install_cmds |
755fe986 SS |
62 | # Create folder in log to store the journal. |
63 | mkdir -pv %{BUILDROOT}/var/log/journal | |
64 | ||
802ea3af | 65 | # Create sysv compatible symlinks. |
6793fec1 MT |
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 | |
802ea3af MT |
73 | |
74 | # Create empty machine-id file. | |
75 | touch %{BUILDROOT}/etc/machine-id | |
76 | ||
77 | # Copy locale and console settings | |
6793fec1 MT |
78 | mkdir -pv %{BUILDROOT}%{sysconfdir} |
79 | cp -vf %{DIR_SOURCE}/{locale,vconsole}.conf %{BUILDROOT}%{sysconfdir} | |
802ea3af MT |
80 | |
81 | # Recreate all targets | |
0976fbe4 SS |
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 | |
6793fec1 | 86 | done |
802ea3af MT |
87 | |
88 | # Remove runlevel targets and graphical.target | |
6793fec1 MT |
89 | rm -rfv %{BUILDROOT}%{unitdir}/runlevel* |
90 | rm -rfv %{BUILDROOT}%{unitdir}/graphical.target | |
802ea3af | 91 | |
2d01364a SS |
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 | ||
802ea3af | 96 | # Set default target to multi-user |
6793fec1 | 97 | ln -svf multi-user.target %{BUILDROOT}%{unitdir}/default.target |
802ea3af MT |
98 | |
99 | # Replace absolute symlinks by relative ones. | |
6793fec1 MT |
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 | ||
802ea3af MT |
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 | |
755fe986 SS |
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 | |
802ea3af MT |
117 | end |
118 | end | |
119 | ||
120 | packages | |
121 | package %{name} | |
2d01364a SS |
122 | groups += Base |
123 | ||
6793fec1 MT |
124 | prerequires += authconfig |
125 | ||
514357ad SS |
126 | requires |
127 | dbus | |
2d01364a | 128 | hwdata |
514357ad | 129 | python-cairo |
1d40b321 | 130 | python-dbus |
214d8f27 | 131 | %{name}-units=%{thisver} |
514357ad SS |
132 | util-linux>=2.19 |
133 | end | |
1d40b321 | 134 | |
216fde50 SS |
135 | provides |
136 | /bin/systemd | |
137 | /sbin/halt | |
138 | /sbin/init | |
139 | /sbin/poweroff | |
140 | /sbin/reboot | |
141 | /sbin/shutdown | |
2d01364a | 142 | |
755fe986 | 143 | syslog |
2d01364a | 144 | udev = %{thisver} |
216fde50 SS |
145 | end |
146 | ||
6793fec1 | 147 | conflicts |
2d01364a | 148 | dracut < 019 |
6793fec1 | 149 | filesystem < 002 |
755fe986 | 150 | rsyslog < 5.8.6-4 |
6793fec1 MT |
151 | upstart |
152 | end | |
ef438375 | 153 | |
2d01364a SS |
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 | ||
1d40b321 SS |
177 | script postin |
178 | # Generate Machine ID. | |
6793fec1 | 179 | /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || : |
1d40b321 SS |
180 | |
181 | # Reexec systemd daemon. | |
6793fec1 | 182 | /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || : |
1d40b321 SS |
183 | |
184 | # Make sure pam_systemd is enabled | |
6793fec1 MT |
185 | if ! grep -q pam_systemd /etc/pam.d/system-auth-ac ; then |
186 | authconfig --update --nostart >/dev/null 2>&1 || : | |
1d40b321 SS |
187 | |
188 | # Try harder | |
6793fec1 | 189 | grep -q pam_systemd /etc/pam.d/system-auth-ac || authconfig --updateall --nostart >/dev/null 2>&1 || : |
1d40b321 | 190 | fi |
5e462903 MT |
191 | |
192 | /usr/bin/systemctl enable \ | |
193 | getty@.service \ | |
50affca1 | 194 | remote-fs.target \ |
5e462903 MT |
195 | systemd-readahead-replay.service \ |
196 | systemd-readahead-collect.service \ | |
197 | >/dev/null 2>&1 || : | |
1d40b321 SS |
198 | end |
199 | ||
2d01364a SS |
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 | ||
1d40b321 SS |
206 | script postup |
207 | # Restart login service after update | |
5e462903 | 208 | /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
6793fec1 | 209 | /usr/bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : |
755fe986 SS |
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 | |
1d40b321 | 216 | end |
2d01364a SS |
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 | |
802ea3af | 222 | end |
1f9bc2f0 | 223 | |
802ea3af MT |
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 | |
1f9bc2f0 | 231 | |
5e38e9bb SS |
232 | prerequires |
233 | /bin/sh | |
234 | coreutils | |
235 | end | |
236 | ||
6793fec1 | 237 | provides |
802ea3af | 238 | /bin/systemctl |
802ea3af | 239 | end |
1d40b321 | 240 | |
6793fec1 MT |
241 | conflicts |
242 | filesystem < 002 | |
1d40b321 SS |
243 | end |
244 | ||
6793fec1 MT |
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.* | |
1d40b321 SS |
253 | end |
254 | ||
255 | script postup | |
256 | # Reload service files | |
6793fec1 | 257 | /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : |
1d40b321 | 258 | end |
802ea3af | 259 | end |
1f9bc2f0 | 260 | |
802ea3af MT |
261 | package %{name}-devel |
262 | template DEVEL | |
6793fec1 MT |
263 | |
264 | files += %{prefix}/lib/pakfire/macros/ | |
802ea3af | 265 | end |
1f9bc2f0 | 266 | |
2d01364a SS |
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 | |
a8aa3ead | 298 | %{libdir}/lib*udev*.so |
73eb4724 | 299 | %{libdir}/pkgconfig/lib*udev.pc |
2d01364a | 300 | %{libdir}/pkgconfig/gudev* |
a8aa3ead | 301 | %{includedir}/lib*udev.h |
2d01364a SS |
302 | %{includedir}/gudev* |
303 | %{datadir}/gir-* | |
304 | %{datadir}/gtk-doc/html/gudev | |
305 | end | |
306 | end | |
307 | ||
1f9bc2f0 MT |
308 | package %{name}-debuginfo |
309 | template DEBUGINFO | |
310 | end | |
802ea3af | 311 | end |