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