/[packages]/cauldron/systemd/current/SPECS/systemd.spec
ViewVC logotype

Contents of /cauldron/systemd/current/SPECS/systemd.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 406935 - (show annotations) (download)
Mon Apr 1 08:33:48 2013 UTC (8 years, 6 months ago) by colin
File size: 28476 byte(s)
Ship /etc/udev/rules.d folder for user rules.
1 %define libdaemon_major 0
2 %define liblogin_major 0
3 %define libjournal_major 0
4 %define libid128_major 0
5 %define libudev_major 1
6 %define libgudev_api 1.0
7 %define libgudev_major 0
8
9 %define libdaemon %mklibname systemd-daemon %{libdaemon_major}
10 %define liblogin %mklibname systemd-login %{liblogin_major}
11 %define libjournal %mklibname systemd-journal %{libjournal_major}
12 %define libid128 %mklibname systemd-id 128 %{libid128_major}
13
14 %define libudev %mklibname udev %{libudev_major}
15 %define libudev_devel %mklibname -d udev
16
17 %define libgudev %mklibname gudev %{libgudev_api} %{libgudev_major}
18 %define libgudev_devel %mklibname -d gudev %{libgudev_api}
19 %define libgudev_gir %mklibname gudev-gir %{libgudev_api}
20
21 Summary: A System and Session Manager
22 Name: systemd
23 Version: 195
24 Release: %mkrel 17
25 License: GPLv2+
26 Group: System/Boot and Init
27 Url: http://www.freedesktop.org/wiki/Software/systemd
28 Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
29
30 Source10: 50-udev-mageia.rules
31 Source11: 69-printeracl.rules
32 # (hk) udev rules for zte 3g modems with drakx-net
33 Source12: 61-mobile-zte-drakx-net.rules
34
35 # (blino) net rules and helpers
36 Source20: 76-net.rules
37 Source21: udev_net_create_ifcfg
38 Source22: udev_net_action
39 Source23: udev_net.sysconfig
40
41 # (cg) Upstream cherry picks
42 Patch100: 0100-rules-Remove-HP-iLO-from-USB-HID-PM-rules.patch
43 Patch101: 0101-job-avoid-recursion-into-transaction-code-from-job-c.patch
44 Patch102: 0102-sysctl-parse-all-keys-in-a-config-file.patch
45 Patch103: 0103-journal-fix-parsing-of-monotonic-kernel-timestamps.patch
46 Patch104: 0104-hwclock-do-not-seal-the-kernel-s-time-warp-call-from.patch
47 Patch105: 0105-units-agetty-overrides-TERM.patch
48 Patch106: 0106-shared-libsystemd-daemon-check-for-empty-strings-in-.patch
49 Patch107: 0107-shared-core-do-not-always-accept-numbers-in-string-l.patch
50 Patch108: 0108-shared-max-in-the-string-number-conversion-is-meant-.patch
51 Patch109: 0109-strv-cleanup-error-path-loops.patch
52 Patch110: 0110-build-sys-store-journald-code-in-a-noinst-library.patch
53 Patch111: 0111-dbus-manager-fix-a-fatal-dbus-abort-in-bus_manager_m.patch
54 Patch112: 0112-shutdown-readd-explicit-sync-when-shutting-down.patch
55 Patch113: 0113-switch-root-try-pivot_root-before-overmounting.patch
56 Patch114: 0114-umount-always-remount-read-only-before-unmounting-in.patch
57 Patch115: 0115-shared-utils-systemd-cgls-shows-n-a-when-piping-outp.patch
58 Patch116: 0116-core-load-fragment-fix-potential-bad-memory-access.patch
59 Patch117: 0117-journald-fix-bad-memory-access.patch
60 Patch118: 0118-journal-send-always-send-SYSLOG_IDENTIFIER-if-we-hav.patch
61 Patch119: 0119-localectl-fix-dbus-call-arguments-in-set_x11_keymap.patch
62 Patch120: 0120-add-Belarussian-mapping-simple-by-and-by.patch
63 Patch121: 0121-French-Canadian-xlayout-is-just-ca-not-ca-fr-any-mor.patch
64 Patch122: 0122-add-Hebrew-Israel-simple-il-il.patch
65 Patch123: 0123-add-Kazakh-keyboard-mapping-kazakh-kz.patch
66 Patch124: 0124-add-Lithuanian-keyboard-mapping-lt-lt.patch
67 Patch125: 0125-correct-Macedonian-keyboard-mapping-X-layout-is-mk-n.patch
68 Patch126: 0126-configure.ac-fix-FTBFS-with-new-glibc.patch
69 Patch127: 0127-tmpfiles-allow-Age-to-be-set-to-0.patch
70 Patch128: 0128-tmpfiles-Fix-file-descriptor-leak-on-error.patch
71 Patch129: 0129-tmpfiles-introduce-type-X.patch
72 Patch130: 0130-tmpfiles-exclude-tmp-systemd-private-from-cleanup.patch
73 Patch131: 0131-tmpfiles-exclude-var-tmp-systemd-private-too.patch
74 Patch132: 0132-man-mention-that-PrivateTmp-means-var-tmp-too.patch
75
76 # (cg/bor) clean up directories on boot as done by rc.sysinit
77 # - Lennart should be poked about this (he couldn't think why he hadn't done it already)
78 Patch500: 0500-Clean-directories-that-were-cleaned-up-by-rc.sysinit.patch
79 Patch501: 0501-Some-more-tmpfiles-fixes.patch
80 Patch502: 0502-main-Add-failsafe-to-the-sysvinit-compat-cmdline-key.patch
81 Patch503: 0503-mageia-Fallback-message-when-display-manager-fails.patch
82 Patch504: 0504-Disable-modprobe-pci-devices-on-coldplug-for-storage.patch
83 Patch505: 0505-Allow-booting-from-live-cd-in-virtualbox.patch
84 Patch506: 0506-reinstate-TIMEOUT-handling.patch
85 Patch507: 0507-udev-Allow-the-udevadm-settle-timeout-to-be-set-via-.patch
86 Patch508: 0508-Mageia-Relax-perms-on-sys-kernel-debug-for-lspcidrak.patch
87
88 # (cjw) revert commit 97595710b77aa162ca5e20da57d0a1ed7355eaad that breaks network interface renaming
89 # (cg) This is done for mga3, but will be removed for mga4 when we will switch
90 # to a different naming scheme for network interfaces which should prevent the
91 # need for a racy an confusing (from a user perspective) feature.
92 # https://wiki.mageia.org/en/Feature:NetworkDeviceNameChange
93 Patch700: systemd-188-udev-network-interface-renaming.patch
94 Source50: 75-persistent-net-generator.rules
95 Source51: rule_generator.functions
96 Source52: write_net_rules
97
98 BuildRequires: dbus-devel >= 1.4.0
99 BuildRequires: libcap-devel
100 BuildRequires: tcp_wrappers-devel
101 BuildRequires: pam-devel
102 BuildRequires: dbus-glib-devel
103 BuildRequires: vala >= 0.9
104 BuildRequires: glib2-devel
105 BuildRequires: libnotify-devel
106 BuildRequires: intltool
107 BuildRequires: gettext-devel
108 BuildRequires: gperf
109 BuildRequires: pkgconfig(gee-1.0)
110 BuildRequires: cryptsetup-devel
111 BuildRequires: pkgconfig(libkmod)
112 BuildRequires: pkgconfig(blkid)
113 BuildRequires: pkgconfig(gobject-introspection-1.0)
114 BuildRequires: xsltproc
115 BuildRequires: docbook-style-xsl
116 BuildRequires: python-devel
117 BuildRequires: pkgconfig(libmicrohttpd)
118 BuildRequires: pkgconfig(liblzma)
119 Requires(pre): filesystem >= 2.1.9-18
120 Requires: systemd-units = %{version}-%{release}
121 Requires: dbus >= 1.3.2
122 Requires: initscripts >= 9.21-3
123 Requires: util-linux-ng >= 2.18
124 Requires: nss-myhostname
125 Requires: lockdev
126 Conflicts: initscripts < 9.25
127 Provides: should-restart = system
128 Provides: udev = %{version}-%{release}
129 Obsoletes: udev < 185
130 Provides: systemd-sysvinit = %{version}-%{release}
131 Conflicts: systemd-sysvinit < 185
132 Obsoletes: systemd-sysvinit < 185
133 Provides: sysvinit = 2.87-22
134 Obsoletes: sysvinit < 2.87-22
135 Conflicts: SysVinit
136 # Due to halt/poweroff etc. in _bindir
137 Conflicts: usermode-consoleonly < 1:1.110
138 Provides: system-logger
139 # (blino) consolekit has been replaced by systemd-logind
140 Obsoletes: consolekit
141 Obsoletes: consolekit-x11
142 Obsoletes: libconsolekit0
143 Obsoletes: lib64consolekit0
144
145 %description
146 systemd is a system and session manager for Linux, compatible with
147 SysV and LSB init scripts. systemd provides aggressive parallelization
148 capabilities, uses socket and D-Bus activation for starting services,
149 offers on-demand starting of daemons, keeps track of processes using
150 Linux cgroups, supports snapshotting and restoring of the system
151 state, maintains mount and automount points and implements an
152 elaborate transactional dependency-based service control logic. It can
153 work as a drop-in replacement for sysvinit.
154
155 # (TV) basically split b/c it pulls python in basesystem
156 %package tools
157 Summary: Non essential systemd tools
158 Group: System/Boot and Init
159 Requires: %{name} = %{version}-%{release}
160 Requires: python-dbus
161 Requires: python-cairo
162 Conflicts: %{name} <= 37-15
163
164 %description tools
165 Non essential systemd tools
166
167 %package units
168 Summary: Configuration files, directories and installation tool for systemd
169 Group: System/Boot and Init
170 Requires(pre): filesystem >= 2.1.9-18
171 Requires: %{name} = %{version}-%{release}
172 Conflicts: initscripts < 9.25
173 Requires(post): coreutils grep awk
174
175 %description units
176 Basic configuration files, directories and installation tool for the systemd
177 system and session manager.
178
179 %package -n python-%{name}
180 Summary: Python bindings for %{name}
181 Group: Development/Python
182
183 %description -n python-%{name}
184 Python bindings for %{name}
185
186 %package devel
187 Summary: Systemd development files
188 Group: Development/C
189 Conflicts: %{name} <= 35-4
190 Requires: %{libdaemon} = %{version}-%{release}
191 Requires: %{liblogin} = %{version}-%{release}
192 Requires: %{libjournal} = %{version}-%{release}
193 Requires: %{libid128} = %{version}-%{release}
194 # (cg) Obsolete the old, versioned/split devel packages
195 Provides: libsystemd-daemon-devel = %{version}-%{release}
196 Provides: %{mklibname -d systemd-daemon 0} = %{version}-%{release}
197 Obsoletes: %{mklibname -d systemd-daemon 0} < 185
198 Provides: %{mklibname -d systemd-daemon} = %{version}-%{release}
199 Obsoletes: %{mklibname -d systemd-daemon} < 186
200 Provides: libsystemd-login-devel = %{version}-%{release}
201 Provides: %{mklibname -d systemd-login 0} = %{version}-%{release}
202 Obsoletes: %{mklibname -d systemd-login 0} < 185
203 Provides: %{mklibname -d systemd-login} = %{version}-%{release}
204 Obsoletes: %{mklibname -d systemd-login} < 186
205 Provides: libsystemd-journal-devel = %{version}-%{release}
206 Provides: %{mklibname -d systemd-journal 0} = %{version}-%{release}
207 Obsoletes: %{mklibname -d systemd-journal 0} < 185
208 Provides: %{mklibname -d systemd-journal} = %{version}-%{release}
209 Obsoletes: %{mklibname -d systemd-journal} < 186
210 Provides: libsystemd-id128-devel = %{version}-%{release}
211 Provides: %{mklibname -d systemd-id128 0} = %{version}-%{release}
212 Obsoletes: %{mklibname -d systemd-id128 0} < 185
213 Provides: %{mklibname -d systemd-id128} = %{version}-%{release}
214 Obsoletes: %{mklibname -d systemd-id128} < 186
215
216 %description devel
217 This package provides the development files for systemd.
218
219 %package -n %{libdaemon}
220 Summary: Systemd-daemon library package
221 Group: System/Libraries
222 Requires(pre): filesystem >= 2.1.9-18
223 Provides: libsystemd-daemon = %{version}-%{release}
224
225 %description -n %{libdaemon}
226 This package provides the systemd-daemon shared library.
227
228 %package -n %{liblogin}
229 Summary: Systemd-login library package
230 Group: System/Libraries
231 Requires(pre): filesystem >= 2.1.9-18
232 Provides: libsystemd-login = %{version}-%{release}
233
234 %description -n %{liblogin}
235 This package provides the systemd-login shared library.
236
237 %package -n %{libjournal}
238 Summary: Systemd-journal library package
239 Group: System/Libraries
240 Requires(pre): filesystem >= 2.1.9-18
241 Provides: libsystemd-journal = %{version}-%{release}
242
243 %description -n %{libjournal}
244 This package provides the systemd-journal shared library.
245
246 %package -n %{libid128}
247 Summary: Systemd-id128 library package
248 Group: System/Libraries
249 Requires(pre): filesystem >= 2.1.9-18
250 Provides: libsystemd-id128 = %{version}-%{release}
251 Obsoletes: %{_lib}systemd-id1280 < 187-5
252
253 %description -n %{libid128}
254 This package provides the systemd-id128 shared library.
255
256 %package -n %{libudev}
257 Summary: udev library package
258 Group: System/Libraries
259 Requires(pre): filesystem >= 2.1.9-18
260
261 %description -n %{libudev}
262 This package provides the udev shared library.
263
264 %package -n %{libudev_devel}
265 Summary: udev library development files
266 Group: Development/C
267 Requires: %{libudev} = %{version}-%{release}
268 Provides: udev-devel = %{version}-%{release}
269 Provides: libudev-devel = %{version}-%{release}
270 # (cg) Obsolete the old, versioned devel package
271 Provides: %{mklibname -d udev 0} = %{version}-%{release}
272 Obsoletes: %{mklibname -d udev 0} < 185
273
274 %description -n %{libudev_devel}
275 This package provides the development files for the udev shared library.
276
277 %package -n %{libgudev}
278 Summary: gudev library package
279 Group: System/Libraries
280 Requires(pre): filesystem >= 2.1.9-18
281 Provides: libgudev = %{version}-%{release}
282
283 %description -n %{libgudev}
284 This package provides the gudev shared library.
285
286 %package -n %{libgudev_gir}
287 Summary: GObject Introspection interface description for GUdev
288 Group: System/Libraries
289 Requires: %{libgudev} = %{version}-%{release}
290 Conflicts: %{_lib}gudev1.0_0 < 187-5
291
292 %description -n %{libgudev_gir}
293 GObject Introspection interface description for GUdev.
294
295
296 %package -n %{libgudev_devel}
297 Summary: gudev library development files
298 Group: Development/C
299 Requires: %{libgudev} = %{version}-%{release}
300 Provides: libgudev-devel = %{version}-%{release}
301 # (cg) Obsolete the old, versioned devel package
302 Provides: %{mklibname -d gudev 0} = %{version}-%{release}
303 Obsoletes: %{mklibname -d gudev 0} < 185
304
305 %description -n %{libgudev_devel}
306 This package provides the development files for the gudev shared library.
307
308
309 %prep
310 %setup -q
311 %apply_patches
312 find src/ -name "*.vala" -exec touch '{}' \;
313
314 %build
315 autoreconf --force --install --verbose
316 %configure2_5x \
317 --with-distro=mageia \
318 --disable-coredump \
319 --disable-static \
320 --disable-selinux \
321 --with-firmware-path=%{_prefix}/lib/firmware/updates:%{_prefix}/lib/firmware \
322 --with-usb-ids-path=/usr/share/usb.ids \
323 --with-pci-ids-path=/usr/share/pci.ids
324
325 %make
326
327 %install
328 rm -rf %{buildroot}
329
330 %makeinstall_std
331 find %{buildroot} \( -name '*.a' -o -name '*.la' \) -exec rm {} \;
332
333 # (cg) Create and ship folder to hold user rules
334 install -D -m 755 %{buildroot}%{_sysconfdir}/udev/rules.d
335
336 install -m 644 %SOURCE10 %{buildroot}%{_prefix}/lib/udev/rules.d/
337 install -m 644 %SOURCE11 %{buildroot}%{_prefix}/lib/udev/rules.d/
338 # udev rules for zte 3g modems and drakx-net
339 install -m 0644 %SOURCE12 %{buildroot}%{_prefix}/lib/udev/rules.d/
340
341 # net rules
342 install -m 0644 %SOURCE20 %{buildroot}%{_prefix}/lib/udev/rules.d/
343 install -m 0755 %SOURCE21 %{buildroot}%{_prefix}/lib/udev/net_create_ifcfg
344 install -m 0755 %SOURCE22 %{buildroot}%{_prefix}/lib/udev/net_action
345 install -m 0755 -d %{buildroot}%{_sysconfdir}/sysconfig
346 install -m 0644 %SOURCE23 %{buildroot}%{_sysconfdir}/sysconfig/udev_net
347
348
349 # Create SysV compatibility symlinks. systemctl/systemd are smart
350 # enough to detect in which way they are called.
351 mkdir -p %{buildroot}{%{_bindir},%{_sbindir}}
352 ln -s ../lib/systemd/systemd %{buildroot}%{_bindir}/systemd
353 ln -s ../lib/systemd/systemd %{buildroot}%{_sbindir}/init
354 ln -s ../bin/systemctl %{buildroot}%{_bindir}/reboot
355 ln -s ../bin/systemctl %{buildroot}%{_bindir}/halt
356 ln -s ../bin/systemctl %{buildroot}%{_bindir}/poweroff
357 ln -s ../bin/systemctl %{buildroot}%{_sbindir}/shutdown
358 ln -s ../bin/systemctl %{buildroot}%{_sbindir}/telinit
359 ln -s ../bin/systemctl %{buildroot}%{_sbindir}/runlevel
360
361 # Also add a symlink for udevadm for now as lots of things use an absolute path
362 ln -s ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
363
364 # We create all wants links manually at installation time to make sure
365 # they are not owned and hence overriden by rpm after the used deleted
366 # them.
367 rm -r %{buildroot}%{_sysconfdir}/systemd/system/*.target.wants
368
369 # Make sure these directories are properly owned
370 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants
371 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants
372 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants
373 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants
374
375 # And the default symlink we generate automatically based on inittab
376 rm -f %{buildroot}%{_sysconfdir}/systemd/system/default.target
377
378 # (bor) make sure we own directory for bluez to install service
379 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/bluetooth.target.wants
380
381 # use consistent naming and permissions for completion scriplets
382 mv %{buildroot}%{_sysconfdir}/bash_completion.d/systemd-bash-completion.sh \
383 %{buildroot}%{_sysconfdir}/bash_completion.d/systemd
384 chmod 644 %{buildroot}%{_sysconfdir}/bash_completion.d/systemd
385
386 # (cg) Set up the pager to make it generally more useful
387 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
388 cat > %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh << EOF
389 export SYSTEMD_PAGER="/usr/bin/less -FR"
390 EOF
391 chmod 644 %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh
392
393 # (bor) enable rpcbind.target by default so we have something to plug
394 # portmapper service into
395 ln -s ../rpcbind.target %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants
396
397 # create modules.conf as a symlink to /etc/
398 ln -s /etc/modules %{buildroot}%{_sysconfdir}/modules-load.d/modules.conf
399
400 # Create new-style configuration files so that we can ghost-own them
401 touch %{buildroot}%{_sysconfdir}/hostname
402 touch %{buildroot}%{_sysconfdir}/vconsole.conf
403 touch %{buildroot}%{_sysconfdir}/locale.conf
404 touch %{buildroot}%{_sysconfdir}/machine-id
405 touch %{buildroot}%{_sysconfdir}/machine-info
406 touch %{buildroot}%{_sysconfdir}/timezone
407 mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
408 touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
409
410 # Make sure the NTP units dir exists
411 mkdir -p %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/
412
413 # (cg) Make the journal's persistent in order to provide a real syslog implementation
414 install -m 0755 -d %{buildroot}%{_logdir}/journal
415
416 # automatic systemd release on rpm installs/removals
417 # (see http://wiki.mandriva.com/en/Rpm_filetriggers)
418 # (cg) I'm not sure if the file list check works against the packaged rpm
419 # or what is installed, so I've added both the /lib and /usr/lib paths
420 # below, even thought the former is just a symlink to the latter
421 install -d %{buildroot}%{_var}/lib/rpm/filetriggers
422 cat > %{buildroot}%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.filter << EOF
423 ^./usr/lib/systemd/system/
424 ^./lib/systemd/system/
425 ^./etc/systemd/system/
426 EOF
427 cat > %buildroot%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.script << EOF
428 #!/bin/sh
429 if %{_bindir}/mountpoint -q /sys/fs/cgroup/systemd; then
430 if [ -x %{_bindir}/systemctl ]; then
431 %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
432 fi
433 fi
434 EOF
435 chmod 755 %buildroot%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.script
436
437 # This file is already in sytemd-ui rpm
438 rm -fr %buildroot%_mandir/man1/systemadm.*
439
440 # (cg) This should be moving at some point upstream so pre-empt it
441 mv %{buildroot}%{_sysconfdir}/rpm %{buildroot}%{_prefix}/lib
442
443 # (cg) This restores the horrible network name generator.
444 # See comment above for why this sucks and why it will be removed in mga4
445 install -p -m 0644 %{SOURCE50} %{buildroot}%{_prefix}/lib/udev/rules.d/
446 install -p -m 0644 %{SOURCE51} %{buildroot}%{_prefix}/lib/udev/
447 install -p -m 0755 %{SOURCE52} %{buildroot}%{_prefix}/lib/udev/
448
449 %triggerin -- glibc
450 # reexec daemon on self or glibc update to avoid busy / on shutdown
451 # trigger is executed on both self and target install so no need to have
452 # extra own post
453 if [ $1 -ge 2 -o $2 -ge 2 ] ; then
454 %{_bindir}/systemctl daemon-reexec 2>&1 || :
455 fi
456
457 %post
458 %{_bindir}/systemd-machine-id-setup > /dev/null 2>&1 || :
459 #%{_bindir}/systemctl daemon-reexec > /dev/null 2>&1 || :
460
461 %triggerin units -- %{name}-units < 35-1
462 # Enable the services we install by default.
463 %{_bindir}/systemctl --quiet enable \
464 hwclock-load.service \
465 getty@.service \
466 remote-fs.target \
467 systemd-readahead-replay.service \
468 systemd-readahead-collect.service \
469 2>&1 || :
470 # rc-local is now enabled by default in base package
471 rm -f %_sysconfdir/systemd/system/multi-user.target.wants/rc-local.service || :
472
473 # (blino) systemd 195 changed the prototype of logind's OpenSession()
474 # see http://lists.freedesktop.org/archives/systemd-devel/2012-October/006969.html
475 # and http://cgit.freedesktop.org/systemd/systemd/commit/?id=770858811930c0658b189d980159ea1ac5663467
476 %triggerun -- %{name} < 195-4.mga3
477 %{_bindir}/systemctl restart systemd-logind.service
478
479 %post units
480 if [ $1 -eq 1 ] ; then
481 # Try to read default runlevel from the old inittab if it exists
482 runlevel=$(%{_bindir}/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
483 if [ -z "$runlevel" ] ; then
484 target="%{_prefix}/lib/systemd/system/multi-user.target"
485 else
486 target="%{_prefix}/lib/systemd/system/runlevel$runlevel.target"
487 fi
488
489 # And symlink what we found to the new-style default.target
490 %{_bindir}/ln -sf "$target" %{_sysconfdir}/systemd/system/default.target 2>&1 || :
491
492 # Enable the services we install by default.
493 %{_bindir}/systemctl --quiet enable \
494 getty@.service \
495 remote-fs.target \
496 systemd-readahead-replay.service \
497 systemd-readahead-collect.service \
498 2>&1 || :
499 fi
500
501 hostname_new=`cat %_sysconfdir/hostname 2>/dev/null`
502 if [ -z $hostname_new ]; then
503 hostname_old=`cat /etc/sysconfig/network 2>/dev/null | grep HOSTNAME | cut -d "=" -f2`
504 if [ ! -z $hostname_old ]; then
505 echo $hostname_old >> %_sysconfdir/hostname
506 else
507 echo "localhost" >> %_sysconfdir/hostname
508 fi
509 fi
510
511
512 %preun units
513 if [ $1 -eq 0 ] ; then
514 %{_bindir}/systemctl --quiet disable \
515 getty@.service \
516 remote-fs.target \
517 systemd-readahead-replay.service \
518 systemd-readahead-collect.service \
519 2>&1 || :
520
521 %{_bindir}/rm -f %_sysconfdir/systemd/system/default.target 2>&1 || :
522 fi
523
524 %postun units
525 if [ $1 -ge 1 ] ; then
526 %{_bindir}/systemctl daemon-reload 2>&1 || :
527 fi
528
529 %files
530 # (cg) Note some of these directories are empty, but that is intended
531 %dir %{_prefix}/lib/systemd
532 %dir %{_prefix}/lib/systemd/system-generators
533 %dir %{_prefix}/lib/systemd/system-shutdown
534 %dir %{_prefix}/lib/systemd/system-sleep
535 %dir %{_prefix}/lib/systemd/ntp-units.d
536 %dir %{_prefix}/lib/tmpfiles.d
537 %dir %{_prefix}/lib/sysctl.d
538 %dir %{_prefix}/lib/modules-load.d
539 %dir %{_prefix}/lib/binfmt.d
540 %{_var}/lib/rpm/filetriggers/systemd-daemon-reload.*
541 %config(noreplace) %{_sysconfdir}/sysconfig/udev_net
542 %config(noreplace) %{_sysconfdir}/systemd/journald.conf
543 %config(noreplace) %{_sysconfdir}/systemd/system.conf
544 %config(noreplace) %{_sysconfdir}/systemd/logind.conf
545 %config(noreplace) %{_sysconfdir}/systemd/user.conf
546 %config(noreplace) %{_sysconfdir}/udev/udev.conf
547 %{_sysconfdir}/xdg/systemd
548 %ghost %config(noreplace) %{_sysconfdir}/hostname
549 %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf
550 %ghost %config(noreplace) %{_sysconfdir}/locale.conf
551 %ghost %config(noreplace) %{_sysconfdir}/machine-id
552 %ghost %config(noreplace) %{_sysconfdir}/machine-info
553 %ghost %config(noreplace) %{_sysconfdir}/timezone
554 %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
555 # (cg) NB dbus policy files are not really config that users are expected to
556 # edit manually and thus should NOT be marked as config(noreplace).
557 # This should really be fixed in upstream dbus (work in progress)
558 # to separate these policy files from /etc and ship them in /usr instead
559 # but allow override by admins by copying to /etc.
560 # There are security implications here (CVE's have been issued due to mistakes
561 # in these type of files)
562 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
563 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
564 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
565 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf
566 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
567 %dir %{_sysconfdir}/udev/rules.d
568 #%{_prefix}/lib/sysctl.d/coredump.conf
569 %{_prefix}/lib/tmpfiles.d/legacy.conf
570 %{_prefix}/lib/tmpfiles.d/systemd.conf
571 %{_prefix}/lib/tmpfiles.d/tmp.conf
572 %{_prefix}/lib/tmpfiles.d/x11.conf
573 %{_bindir}/hostnamectl
574 %{_bindir}/journalctl
575 %{_bindir}/localectl
576 %{_bindir}/loginctl
577 %{_bindir}/systemd
578 %{_bindir}/systemd-ask-password
579 %{_bindir}/systemd-coredumpctl
580 %{_bindir}/systemd-inhibit
581 %{_bindir}/systemd-machine-id-setup
582 %{_bindir}/systemd-notify
583 %{_bindir}/systemd-tmpfiles
584 %{_bindir}/systemd-tty-ask-password-agent
585 %{_bindir}/timedatectl
586 %{_bindir}/reboot
587 %{_bindir}/halt
588 %{_bindir}/poweroff
589 %{_sbindir}/shutdown
590 %{_sbindir}/init
591 %{_sbindir}/telinit
592 %{_sbindir}/runlevel
593 %{_sbindir}/udevadm
594 %{_prefix}/lib/systemd/systemd*
595 %{_prefix}/lib/systemd/system-generators/systemd-*
596 %{_prefix}/lib/udev
597 %{_libdir}/security/pam_systemd.so
598 %{_bindir}/systemd-cat
599 %{_bindir}/systemd-cgls
600 %{_bindir}/systemd-cgtop
601 %{_bindir}/systemd-delta
602 %{_bindir}/systemd-detect-virt
603 %{_bindir}/systemd-nspawn
604 %{_bindir}/systemd-stdio-bridge
605 %{_bindir}/udevadm
606 %dir %{_datadir}/systemd
607 %{_datadir}/systemd/kbd-model-map
608 %dir %{_datadir}/systemd/gatewayd
609 %{_datadir}/systemd/gatewayd/browse.html
610 %{_mandir}/man1/hostnamectl.*
611 %{_mandir}/man1/journalctl.*
612 %{_mandir}/man1/localectl.*
613 %{_mandir}/man1/loginctl.*
614 %{_mandir}/man1/systemd.*
615 %{_mandir}/man1/systemd-*
616 %{_mandir}/man1/timedatectl.*
617 %{_mandir}/man3/*
618 %{_mandir}/man5/*
619 %{_mandir}/man7/*
620 %{_mandir}/man8/pam_systemd.*
621 %{_mandir}/man8/systemd-*
622 %{_mandir}/man8/udevadm.*
623 %{_mandir}/man1/init.*
624 %{_mandir}/man8/halt.*
625 %{_mandir}/man8/reboot.*
626 %{_mandir}/man8/shutdown.*
627 %{_mandir}/man8/poweroff.*
628 %{_mandir}/man8/telinit.*
629 %{_mandir}/man8/runlevel.*
630 %{_initrddir}/README
631 %{_logdir}/README
632 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
633 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
634 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
635 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
636 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
637 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
638 %{_datadir}/dbus-1/interfaces/org.freedesktop.hostname1.xml
639 %{_datadir}/dbus-1/interfaces/org.freedesktop.locale1.xml
640 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Automount.xml
641 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Device.xml
642 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Job.xml
643 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Manager.xml
644 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Mount.xml
645 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Path.xml
646 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Service.xml
647 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Snapshot.xml
648 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Socket.xml
649 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Swap.xml
650 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Target.xml
651 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Timer.xml
652 %{_datadir}/dbus-1/interfaces/org.freedesktop.systemd1.Unit.xml
653 %{_datadir}/dbus-1/interfaces/org.freedesktop.timedate1.xml
654 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
655 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
656 %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
657 %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
658 %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
659 %{_docdir}/systemd
660 %dir %{_logdir}/journal
661
662 %files tools
663 %defattr(-,root,root)
664 %{_bindir}/systemd-analyze
665
666 %files units
667 %defattr(-,root,root)
668 # (cg) Note some of these directories are empty, but that is intended
669 # NB I'm not totally sure of the ownership split of directories between systemd and systemd-units.
670 %dir %{_sysconfdir}/systemd
671 %dir %{_sysconfdir}/systemd/system
672 %dir %{_sysconfdir}/systemd/user
673 %dir %{_sysconfdir}/tmpfiles.d
674 %dir %{_sysconfdir}/sysctl.d
675 %dir %{_sysconfdir}/modules-load.d
676 %dir %{_sysconfdir}/binfmt.d
677 %dir %{_sysconfdir}/bash_completion.d
678 %{_bindir}/systemctl
679 %{_sysconfdir}/bash_completion.d/systemd
680 %{_sysconfdir}/profile.d/40systemd.sh
681 %{_sysconfdir}/modules-load.d/*.conf
682 %{_prefix}/lib/systemd/system
683 %{_prefix}/lib/systemd/user
684 %{_mandir}/man1/systemctl.*
685
686 %files -n python-%{name}
687 %defattr(-,root,root)
688 %{py_platsitedir}/%{name}
689
690 %files devel
691 %defattr(-,root,root,-)
692 %{_includedir}/systemd
693 %{_libdir}/libsystemd-*.so
694 %{_libdir}/pkgconfig/libsystemd-*.pc
695 %{_datadir}/pkgconfig/systemd.pc
696 %{_prefix}/lib/rpm/macros.systemd
697
698 %files -n %{libdaemon}
699 %defattr(-,root,root,-)
700 %{_libdir}/libsystemd-daemon.so.%{libdaemon_major}*
701
702 %files -n %{liblogin}
703 %defattr(-,root,root,-)
704 %{_libdir}/libsystemd-login.so.%{liblogin_major}*
705
706 %files -n %{libjournal}
707 %defattr(-,root,root,-)
708 %{_libdir}/libsystemd-journal.so.%{libjournal_major}*
709
710 %files -n %{libid128}
711 %defattr(-,root,root,-)
712 %{_libdir}/libsystemd-id128.so.%{libid128_major}*
713
714 %files -n %{libudev}
715 %defattr(-,root,root,-)
716 %{_libdir}/libudev.so.%{libudev_major}*
717
718 %files -n %{libudev_devel}
719 %defattr(-,root,root,-)
720 %{_libdir}/libudev.so
721 %{_includedir}/libudev.h
722 %{_datadir}/pkgconfig/udev.pc
723 %{_libdir}/pkgconfig/libudev.pc
724
725 %files -n %{libgudev}
726 %defattr(-,root,root,-)
727 %{_libdir}/libgudev-%{libgudev_api}.so.%{libgudev_major}*
728
729 %files -n %{libgudev_gir}
730 %{_libdir}/girepository-1.0/GUdev-%{libgudev_api}.typelib
731
732 %files -n %{libgudev_devel}
733 %defattr(-,root,root,-)
734 %{_libdir}/libgudev-%{libgudev_api}.so
735 %{_includedir}/gudev-%{libgudev_api}
736 %{_libdir}/pkgconfig/gudev-%{libgudev_api}.pc
737 %{_datadir}/gir-1.0/GUdev-%{libgudev_api}.gir

  ViewVC Help
Powered by ViewVC 1.1.28