/[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 794633 - (show annotations) (download)
Wed Oct 29 22:44:59 2014 UTC (9 years, 5 months ago) by colin
File size: 31558 byte(s)
New version: 217
1 %define libsystemd_major 0
2 %define libudev_major 1
3 %define libgudev_api 1.0
4 %define libgudev_major 0
5
6 %define libname %mklibname %{name} %{libsystemd_major}
7
8 %define libdaemon %mklibname systemd-daemon 0
9 %define libjournal %mklibname systemd-journal 0
10 %define liblogin %mklibname systemd-login 0
11 %define libid128 %mklibname systemd-id 128 0
12
13 %define libudev %mklibname udev %{libudev_major}
14 %define libudev_devel %mklibname -d udev
15
16 %define libgudev %mklibname gudev %{libgudev_api} %{libgudev_major}
17 %define libgudev_devel %mklibname -d gudev %{libgudev_api}
18 %define libgudev_gir %mklibname gudev-gir %{libgudev_api}
19
20 Summary: A System and Session Manager
21 Name: systemd
22 Version: 217
23 Release: %mkrel 1
24 License: GPLv2+
25 Group: System/Boot and Init
26 Url: http://www.freedesktop.org/wiki/Software/systemd
27 Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
28
29 Source10: 50-udev-mageia.rules
30 Source11: 69-printeracl.rules
31 # (hk) udev rules for zte 3g modems with drakx-net
32 Source12: 61-mobile-zte-drakx-net.rules
33
34 # (blino) net rules and helpers
35 Source20: 81-net.rules
36 Source21: udev_net_create_ifcfg
37 Source22: udev_net_action
38 Source23: udev_net.sysconfig
39
40 # (cg) Upstream cherry picks
41 Patch100: 0100-sysusers-Preserve-ownership-and-mode-on-etc-passwd-a.patch
42
43 # (cg/bor) clean up directories on boot as done by rc.sysinit
44 # - Lennart should be poked about this (he couldn't think why he hadn't done it already)
45 Patch500: 0500-Clean-directories-that-were-cleaned-up-by-rc.sysinit.patch
46 Patch501: 0501-main-Add-failsafe-to-the-sysvinit-compat-cmdline-key.patch
47 Patch502: 0502-mageia-Fallback-message-when-display-manager-fails.patch
48 Patch503: 0503-Disable-modprobe-pci-devices-on-coldplug-for-storage.patch
49 Patch504: 0504-Allow-booting-from-live-cd-in-virtualbox.patch
50 Patch505: 0505-reinstate-TIMEOUT-handling.patch
51 Patch506: 0506-udev-Allow-the-udevadm-settle-timeout-to-be-set-via-.patch
52 Patch507: 0507-Mageia-Relax-perms-on-sys-kernel-debug-for-lspcidrak.patch
53 Patch508: 0508-udev-rules-Apply-SuSE-patch-to-restore-cdrom-cdrw-dv.patch
54 Patch509: 0509-pam_systemd-Always-reset-XDG_RUNTIME_DIR.patch
55 Patch510: 0510-pam-Suppress-errors-in-the-SuSE-patch-to-unset-XDG_R.patch
56 Patch511: 0511-Revert-systemctl-skip-native-unit-file-handling-if-s.patch
57 Patch512: 0512-systemctl-Do-not-attempt-native-calls-for-enable-dis.patch
58 Patch513: 0513-systemctl-Ensure-the-no-reload-and-no-redirect-optio.patch
59
60 BuildRequires: dbus-devel >= 1.4.0
61 BuildRequires: libcap-devel
62 BuildRequires: tcp_wrappers-devel
63 BuildRequires: pam-devel
64 BuildRequires: dbus-glib-devel
65 BuildRequires: vala >= 0.9
66 BuildRequires: glib2-devel
67 BuildRequires: libnotify-devel
68 BuildRequires: intltool
69 BuildRequires: gettext-devel
70 BuildRequires: gperf
71 BuildRequires: pkgconfig(gee-1.0)
72 BuildRequires: cryptsetup-devel
73 BuildRequires: pkgconfig(libkmod)
74 BuildRequires: pkgconfig(blkid)
75 BuildRequires: pkgconfig(gobject-introspection-1.0)
76 BuildRequires: xsltproc
77 BuildRequires: docbook-style-xsl
78 BuildRequires: python-devel
79 BuildRequires: pkgconfig(libmicrohttpd)
80 BuildRequires: pkgconfig(liblzma)
81 BuildRequires: pkgconfig(libidn)
82 BuildRequires: pkgconfig(libcurl)
83 BuildRequires: pkgconfig(python)
84 BuildRequires: python-lxml
85 # (cg) don't add more deps for now but add this when cauldron reopens.
86 #BuildRequires: pkgconfig(libqrencode)
87 Requires(pre): filesystem >= 2.1.9-18
88 Requires(pre): shadow-utils
89 Requires: systemd-units = %{version}-%{release}
90 Requires: dbus >= 1.3.2
91 Requires: initscripts >= 9.21-3
92 Requires: util-linux-ng >= 2.18
93 Requires: nss-myhostname
94 Requires: lockdev
95 Conflicts: initscripts < 9.25
96 Provides: should-restart = system
97 Provides: udev = %{version}-%{release}
98 Obsoletes: udev < 185
99 Provides: systemd-sysvinit = %{version}-%{release}
100 Conflicts: systemd-sysvinit < 185
101 Obsoletes: systemd-sysvinit < 185
102 Provides: sysvinit = 2.87-22
103 Obsoletes: sysvinit < 2.87-22
104 Conflicts: SysVinit
105 # Due to halt/poweroff etc. in _bindir
106 Conflicts: usermode-consoleonly < 1:1.110
107 Provides: system-logger
108 # (blino) consolekit has been replaced by systemd-logind
109 Obsoletes: consolekit
110 Obsoletes: consolekit-x11
111 Obsoletes: libconsolekit0
112 Obsoletes: lib64consolekit0
113 Obsoletes: systemd-tools
114 Obsoletes: bootchart
115 Obsoletes: bootchart-daemon
116
117 %description
118 systemd is a system and session manager for Linux, compatible with
119 SysV and LSB init scripts. systemd provides aggressive parallelization
120 capabilities, uses socket and D-Bus activation for starting services,
121 offers on-demand starting of daemons, keeps track of processes using
122 Linux cgroups, supports snapshotting and restoring of the system
123 state, maintains mount and automount points and implements an
124 elaborate transactional dependency-based service control logic. It can
125 work as a drop-in replacement for sysvinit.
126
127 %package units
128 Summary: Configuration files, directories and installation tool for systemd
129 Group: System/Boot and Init
130 Requires(pre): filesystem >= 2.1.9-18
131 Requires: %{name} = %{version}-%{release}
132 Requires: chkconfig > 1.3.61-2
133 Conflicts: %{name} <= 216-10
134 Conflicts: initscripts < 9.25
135 Requires(post): coreutils grep awk
136
137 %description units
138 Basic configuration files, directories and installation tool for the systemd
139 system and session manager.
140
141 %package -n python-%{name}
142 Summary: Python bindings for %{name}
143 Group: Development/Python
144
145 %description -n python-%{name}
146 Python bindings for %{name}
147
148 %package devel
149 Summary: Systemd development files
150 Group: Development/C
151 Conflicts: %{name} <= 35-4
152 Requires: %{libname} = %{version}-%{release}
153 #Obsoletes: %{libdaemon}
154 #Obsoletes: %{liblogin}
155 #Obsoletes: %{libid128}
156 #Obsoletes: %{libjournal}
157 # (cg) Obsolete the old, versioned/split devel packages
158 Provides: libsystemd-daemon-devel = %{version}-%{release}
159 Provides: %{mklibname -d systemd-daemon 0} = %{version}-%{release}
160 Obsoletes: %{mklibname -d systemd-daemon 0} < 185
161 Provides: %{mklibname -d systemd-daemon} = %{version}-%{release}
162 Obsoletes: %{mklibname -d systemd-daemon} < 186
163 Provides: libsystemd-login-devel = %{version}-%{release}
164 Provides: %{mklibname -d systemd-login 0} = %{version}-%{release}
165 Obsoletes: %{mklibname -d systemd-login 0} < 185
166 Provides: %{mklibname -d systemd-login} = %{version}-%{release}
167 Obsoletes: %{mklibname -d systemd-login} < 186
168 Provides: libsystemd-journal-devel = %{version}-%{release}
169 Provides: %{mklibname -d systemd-journal 0} = %{version}-%{release}
170 Obsoletes: %{mklibname -d systemd-journal 0} < 185
171 Provides: %{mklibname -d systemd-journal} = %{version}-%{release}
172 Obsoletes: %{mklibname -d systemd-journal} < 186
173 Provides: libsystemd-id128-devel = %{version}-%{release}
174 Provides: %{mklibname -d systemd-id128 0} = %{version}-%{release}
175 Obsoletes: %{mklibname -d systemd-id128 0} < 185
176 Provides: %{mklibname -d systemd-id128} = %{version}-%{release}
177 Obsoletes: %{mklibname -d systemd-id128} < 186
178 # (cg) Provide old autogenerated names until other devel packages are rebuilt
179 %ifarch x86_64
180 Provides: devel(libsystemd-id128(64bit))
181 Provides: devel(libsystemd-journal(64bit))
182 Provides: devel(libsystemd-login(64bit))
183 Provides: devel(libsystemd-daemon(64bit))
184 %else
185 Provides: devel(libsystemd-id128)
186 Provides: devel(libsystemd-journal)
187 Provides: devel(libsystemd-login)
188 Provides: devel(libsystemd-daemon)
189 %endif
190
191 %description devel
192 This package provides the development files for systemd.
193
194 %package -n nss-myhostname
195 Summary: systemd provided glibc plugin for local system host name resolution
196 Group: System/Base
197
198 %description -n nss-myhostname
199 nss-myhostname is a plugin for the GNU Name Service Switch (NSS)
200 functionality of the GNU C Library (glibc) providing host name
201 resolution for the locally configured system hostname as returned by
202 gethostname(2). Various software relies on an always resolvable local
203 host name. When using dynamic hostnames this is usually achieved by
204 patching /etc/hosts at the same time as changing the host name. This
205 however is not ideal since it requires a writable /etc file system and
206 is fragile because the file might be edited by the administrator at
207 the same time. nss-myhostname simply returns all locally configure
208 public IP addresses, or -- if none are configured -- the IPv4 address
209 127.0.0.2 (wich is on the local loopback) and the IPv6 address ::1
210 (which is the local host) for whatever system hostname is configured
211 locally. Patching /etc/hosts is thus no longer necessary.
212
213 %package -n %{libname}
214 Summary: Systemd library package
215 Group: System/Libraries
216
217 %description -n %{libname}
218 This package provides the systemd shared library.
219
220 %package -n %{libudev}
221 Summary: udev library package
222 Group: System/Libraries
223 Requires(pre): filesystem >= 2.1.9-18
224
225 %description -n %{libudev}
226 This package provides the udev shared library.
227
228 %package -n %{libudev_devel}
229 Summary: udev library development files
230 Group: Development/C
231 Requires: %{libudev} = %{version}-%{release}
232 Provides: udev-devel = %{version}-%{release}
233 Provides: libudev-devel = %{version}-%{release}
234 # (cg) Obsolete the old, versioned devel package
235 Provides: %{mklibname -d udev 0} = %{version}-%{release}
236 Obsoletes: %{mklibname -d udev 0} < 185
237
238 %description -n %{libudev_devel}
239 This package provides the development files for the udev shared library.
240
241 %package -n %{libgudev}
242 Summary: gudev library package
243 Group: System/Libraries
244 Requires(pre): filesystem >= 2.1.9-18
245 Provides: libgudev = %{version}-%{release}
246
247 %description -n %{libgudev}
248 This package provides the gudev shared library.
249
250 %package -n %{libgudev_gir}
251 Summary: GObject Introspection interface description for GUdev
252 Group: System/Libraries
253 Requires: %{libgudev} = %{version}-%{release}
254 Conflicts: %{_lib}gudev1.0_0 < 187-5
255
256 %description -n %{libgudev_gir}
257 GObject Introspection interface description for GUdev.
258
259
260 %package -n %{libgudev_devel}
261 Summary: gudev library development files
262 Group: Development/C
263 Requires: %{libgudev} = %{version}-%{release}
264 Provides: libgudev-devel = %{version}-%{release}
265 # (cg) Obsolete the old, versioned devel package
266 Provides: %{mklibname -d gudev 0} = %{version}-%{release}
267 Obsoletes: %{mklibname -d gudev 0} < 185
268
269 %description -n %{libgudev_devel}
270 This package provides the development files for the gudev shared library.
271
272
273 %prep
274 %setup -q
275 %apply_patches
276 find src/ -name "*.vala" -exec touch '{}' \;
277
278 %build
279 autoreconf --force --install --verbose
280 #NO_CONFIGURE=1 ./autogen.sh
281 %configure2_5x \
282 --with-rc-local-script-path-start=/etc/rc.d/rc.local \
283 --enable-chkconfig \
284 --enable-compat-libs \
285 --disable-static \
286 --disable-selinux \
287 --with-firmware-path=%{_prefix}/lib/firmware/updates:%{_prefix}/lib/firmware
288
289 %make
290
291 %install
292 %makeinstall_std
293 find %{buildroot} \( -name '*.a' -o -name '*.la' \) -exec rm {} \;
294
295 # (cg) Create and ship folder to hold user rules
296 install -d -m 755 %{buildroot}%{_sysconfdir}/udev/rules.d
297
298 install -m 644 %SOURCE10 %{buildroot}%{_prefix}/lib/udev/rules.d/
299 install -m 644 %SOURCE11 %{buildroot}%{_prefix}/lib/udev/rules.d/
300 # udev rules for zte 3g modems and drakx-net
301 install -m 0644 %SOURCE12 %{buildroot}%{_prefix}/lib/udev/rules.d/
302
303 # net rules
304 install -m 0644 %SOURCE20 %{buildroot}%{_prefix}/lib/udev/rules.d/
305 install -m 0755 %SOURCE21 %{buildroot}%{_prefix}/lib/udev/net_create_ifcfg
306 install -m 0755 %SOURCE22 %{buildroot}%{_prefix}/lib/udev/net_action
307 install -m 0755 -d %{buildroot}%{_sysconfdir}/sysconfig
308 install -m 0644 %SOURCE23 %{buildroot}%{_sysconfdir}/sysconfig/udev_net
309
310
311 # Create SysV compatibility symlinks. systemctl/systemd are smart
312 # enough to detect in which way they are called.
313 mkdir -p %{buildroot}{%{_bindir},%{_sbindir}}
314 ln -s ../lib/systemd/systemd %{buildroot}%{_bindir}/systemd
315 ln -s ../lib/systemd/systemd %{buildroot}%{_sbindir}/init
316 ln -s ../bin/systemctl %{buildroot}%{_bindir}/reboot
317 ln -s ../bin/systemctl %{buildroot}%{_bindir}/halt
318 ln -s ../bin/systemctl %{buildroot}%{_bindir}/poweroff
319 ln -s ../bin/systemctl %{buildroot}%{_sbindir}/shutdown
320 ln -s ../bin/systemctl %{buildroot}%{_sbindir}/telinit
321 ln -s ../bin/systemctl %{buildroot}%{_sbindir}/runlevel
322
323 # Also add a symlink for udevadm for now as lots of things use an absolute path
324 ln -s ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
325
326 # (cg) Add aliases for prefdm.service
327 ln -s prefdm.service %{buildroot}%{_prefix}/lib/systemd/system/display-manager.service
328 ln -s prefdm.service %{buildroot}%{_prefix}/lib/systemd/system/dm.service
329
330 # We create all wants links manually at installation time to make sure
331 # they are not owned and hence overriden by rpm after the used deleted
332 # them.
333 rm -r %{buildroot}%{_sysconfdir}/systemd/system/*.target.wants
334
335 # (cg) To avoid making life hard for developers, don't package the
336 # kernel.core_pattern setting until systemd-coredump is a part of an actual
337 # systemd release and it's made clear how to get the core dumps out of the
338 # journal.
339 rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-coredump.conf
340
341 # Make sure these directories are properly owned
342 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants
343 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants
344 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants
345
346 # And the default symlink we generate automatically based on inittab
347 rm -f %{buildroot}%{_sysconfdir}/systemd/system/default.target
348
349 # (bor) make sure we own directory for bluez to install service
350 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/bluetooth.target.wants
351
352 # (cg) Set up the pager to make it generally more useful
353 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
354 cat > %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh << EOF
355 export SYSTEMD_PAGER="/usr/bin/less -FR"
356 EOF
357 chmod 644 %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh
358
359 # (bor) enable rpcbind.target by default so we have something to plug
360 # portmapper service into
361 ln -s ../rpcbind.target %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants
362
363 # create modules.conf as a symlink to /etc/
364 ln -s /etc/modules %{buildroot}%{_sysconfdir}/modules-load.d/modules.conf
365
366 # Create new-style configuration files so that we can ghost-own them
367 touch %{buildroot}%{_sysconfdir}/hostname
368 touch %{buildroot}%{_sysconfdir}/vconsole.conf
369 touch %{buildroot}%{_sysconfdir}/locale.conf
370 touch %{buildroot}%{_sysconfdir}/machine-id
371 touch %{buildroot}%{_sysconfdir}/machine-info
372 touch %{buildroot}%{_sysconfdir}/timezone
373 mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
374 touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
375 mkdir -p %{buildroot}%{_sysconfdir}/udev
376 touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin
377
378 # (cg) Make the journal's persistent in order to provide a real syslog implementation
379 install -m 0755 -d %{buildroot}%{_logdir}/journal
380
381 # (cg) Default preset policy
382 # (for now, just a placeholder directory)
383 mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-preset
384
385 # Various filetriggers
386 install -d %{buildroot}%{_var}/lib/rpm/filetriggers
387
388 # automatic systemd release on rpm installs/removals
389 # (see http://wiki.mandriva.com/en/Rpm_filetriggers)
390 # (cg) I'm not sure if the file list check works against the packaged rpm
391 # or what is installed, so I've added both the /lib and /usr/lib paths
392 # below, even thought the former is just a symlink to the latter
393 cat > %{buildroot}%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.filter << EOF
394 ^./((usr/)?lib/systemd/system/|etc(/rc.d)?/init.d/)
395 EOF
396 cat > %{buildroot}%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.script << EOF
397 #!/bin/sh
398 if %{_bindir}/mountpoint -q /sys/fs/cgroup/systemd; then
399 if [ -x %{_bindir}/systemctl ]; then
400 %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
401 fi
402 fi
403 EOF
404 chmod 0755 %buildroot%{_var}/lib/rpm/filetriggers/systemd-daemon-reload.script
405
406
407 # sysusers (make sure to run before tmpfiles)
408 cat > %{buildroot}%{_var}/lib/rpm/filetriggers/01-sysusers.filter << EOF
409 ^./usr/lib/sysusers.d/
410 EOF
411 # TODO Make sysusers support --quiet
412 cat > %{buildroot}%{_var}/lib/rpm/filetriggers/01-sysusers.script << EOF
413 #!/bin/sh
414 exec %{_bindir}/systemd-sysusers
415 EOF
416 chmod 0755 %{buildroot}%{_var}/lib/rpm/filetriggers/01-sysusers.script
417
418
419 # tmpfiles (make sure to run early just incase the tmpfiles created are needed by other filetriggers)
420 cat > %{buildroot}%{_var}/lib/rpm/filetriggers/02-tmpfiles.filter << EOF
421 ^./usr/lib/tmpfiles.d/
422 EOF
423 cat > %{buildroot}%{_var}/lib/rpm/filetriggers/02-tmpfiles.script << EOF
424 #!/bin/sh
425 exec %{_bindir}/systemd-tmpfiles --create
426 EOF
427 chmod 0755 %{buildroot}%{_var}/lib/rpm/filetriggers/02-tmpfiles.script
428
429
430
431 # This file is already in sytemd-ui rpm
432 rm -fr %{buildroot}%_mandir/man1/systemadm.*
433
434 # (cg) These are the compat libs but we don't need them in cauldron.
435 # All we need is the pkgconfig files so we can rebuild everything and
436 # kill off the need for the old library packages (which will remain installed
437 # and operational due to our packaging policy)
438 for lib in daemon id128 journal login; do
439 rm -f %{buildroot}%{_libdir}/libsystemd-$lib.so{,.0.*}
440 done
441
442 %find_lang %{name}
443
444
445 %triggerin -- glibc
446 # reexec daemon on self or glibc update to avoid busy / on shutdown
447 # trigger is executed on both self and target install so no need to have
448 # extra own post
449 if [ $1 -ge 2 -o $2 -ge 2 ] ; then
450 %{_bindir}/systemctl daemon-reexec 2>&1 || :
451 fi
452
453 %pre
454 # (cg) Cannot use rpm-helper scripts as it results in a cyclical dep as
455 # rpm-helper requires systemd-units which in turn requires systemd...
456 if ! getent group %{name}-journal >/dev/null 2>&1; then
457 /usr/sbin/groupadd -r %{name}-journal >/dev/null || :
458 fi
459
460 # Write on first install or upgrade from MGA3.
461 if [ ! -r %{_prefix}/lib/sysctl.d/50-default.conf ]; then
462 if [ ! -d %{_sysconfdir}/sysctl.d ]; then
463 mkdir -m 0755 %{_sysconfdir}/sysctl.d
464 fi
465 cat > %{_sysconfdir}/sysctl.d/51-alt-sysrq.conf << EOF
466 # This file ensures that the Alt+SysRq Magic keys still work.
467 # This setting is insecure, although commonly expected and you can remove this
468 # file to disable this feature. It will not be readded on future systemd
469 # upgrades/updates.
470 # http://en.wikipedia.org/wiki/Magic_SysRq_key#Security
471 kernel.sysrq = 1
472 EOF
473
474 fi
475
476 %post
477 %{_bindir}/systemd-machine-id-setup > /dev/null 2>&1 || :
478 %{_prefix}/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || :
479 #%{_bindir}/systemctl daemon-reexec > /dev/null 2>&1 || :
480 %{_bindir}/udevadm hwdb --update >/dev/null 2>&1 || :
481 %{_bindir}/journalctl --update-catalog >/dev/null 2>&1 || :
482
483 # (blino) systemd 195 changed the prototype of logind's OpenSession()
484 # see http://lists.freedesktop.org/archives/systemd-devel/2012-October/006969.html
485 # and http://cgit.freedesktop.org/systemd/systemd/commit/?id=770858811930c0658b189d980159ea1ac5663467
486 %triggerun -- %{name} < 195-4.mga3
487 %{_bindir}/systemctl restart systemd-logind.service
488
489 # (cg) mageia 4 introduces the Consistent Network Device Names feature
490 # https://wiki.mageia.org/en/Feature:NetworkDeviceNameChange
491 # To prevent it being enabled on upgrades and breaking configs, we ensure the
492 # feature is disabled when we detect an older version of systemd being removed.
493 %triggerun -- %{name} < 206
494 echo >&2
495 echo "Disabling Persistent Network Device Names due to upgrade." >&2
496 echo "To enable, rm %{_sysconfdir}/udev/rules.d/80-net-name-slot.rules and your" >&2
497 echo "%{_sysconfdir}/udev/rules.d/70-persistent-net.rules files." >&2
498 echo "Note: Some reconfiguration of firewall and network config scripts will also" >&2
499 echo " be required if you do this" >&2
500 echo >&2
501 mkdir -p %{_sysconfdir}/udev/rules.d >/dev/null 2>&1 || :
502 ln -s /dev/null %{_sysconfdir}/udev/rules.d/80-net-name-slot.rules >/dev/null 2>&1 || :
503
504 %triggerun -- %{name} < 208
505 chgrp -R systemd-journal /var/log/journal || :
506 chmod 02755 /var/log/journal || :
507 if [ -f /etc/machine-id ]; then
508 chmod 02755 /var/log/journal/$(cat /etc/machine-id) || :
509 fi
510
511 %post units
512 if [ $1 -eq 1 ] ; then
513 # Try to read default runlevel from the old inittab if it exists
514 runlevel=$(%{_bindir}/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
515 if [ -z "$runlevel" ] ; then
516 target="%{_prefix}/lib/systemd/system/multi-user.target"
517 else
518 target="%{_prefix}/lib/systemd/system/runlevel$runlevel.target"
519 fi
520
521 # And symlink what we found to the new-style default.target
522 %{_bindir}/ln -sf "$target" %{_sysconfdir}/systemd/system/default.target || :
523
524 # Enable the services we install by default.
525 %{_bindir}/systemctl --quiet preset \
526 remote-fs.target \
527 getty@.service \
528 serial-getty@.service \
529 console-getty.service \
530 console-shell.service \
531 debug-shell.service \
532 systemd-readahead-replay.service \
533 systemd-readahead-collect.service \
534 systemd-timesyncd.service \
535 systemd-networkd.service \
536 systemd-networkd-wait-online.service \
537 systemd-resolved.service \
538 2>/dev/null || :
539 fi
540
541 hostname_new=`cat %_sysconfdir/hostname 2>/dev/null`
542 if [ -z $hostname_new ]; then
543 hostname_old=`cat /etc/sysconfig/network 2>/dev/null | grep HOSTNAME | cut -d "=" -f2`
544 if [ ! -z $hostname_old ]; then
545 echo $hostname_old >> %_sysconfdir/hostname
546 else
547 echo "localhost" >> %_sysconfdir/hostname
548 fi
549 fi
550
551 %preun units
552 if [ $1 -eq 0 ] ; then
553 %{_bindir}/systemctl --quiet disable \
554 getty@.service \
555 remote-fs.target \
556 systemd-readahead-replay.service \
557 systemd-readahead-collect.service \
558 2>&1 || :
559
560 %{_bindir}/rm -f %_sysconfdir/systemd/system/default.target 2>&1 || :
561 fi
562
563 %postun units
564 if [ $1 -ge 1 ] ; then
565 %{_bindir}/systemctl daemon-reload 2>&1 || :
566 fi
567
568 %triggerin units -- %{name}-units < 215
569 # Enable the services we install by default.
570 %{_bindir}/systemctl --quiet preset systemd \
571 remote-fs.target \
572 getty@.service \
573 serial-getty@.service \
574 console-getty.service \
575 console-shell.service \
576 debug-shell.service \
577 systemd-readahead-replay.service \
578 systemd-readahead-collect.service \
579 systemd-timesyncd.service \
580 systemd-networkd.service \
581 systemd-networkd-wait-online.service \
582 systemd-resolved.service \
583 2>/dev/null || :
584 # rc-local is now enabled by default in base package
585 rm -f %_sysconfdir/systemd/system/multi-user.target.wants/rc-local.service || :
586
587 %files -f %{name}.lang
588 # (cg) Note some of these directories are empty, but that is intended
589 %dir %{_prefix}/lib/systemd
590 %dir %{_prefix}/lib/systemd/system-generators
591 %dir %{_prefix}/lib/systemd/system-shutdown
592 %dir %{_prefix}/lib/systemd/system-sleep
593 %dir %{_prefix}/lib/systemd/network
594 %dir %{_prefix}/lib/tmpfiles.d
595 %dir %{_prefix}/lib/sysctl.d
596 %dir %{_prefix}/lib/modules-load.d
597 %dir %{_prefix}/lib/kernel
598 %dir %{_prefix}/lib/kernel/install.d
599 %dir %{_prefix}/lib/binfmt.d
600 %{_var}/lib/rpm/filetriggers/*.filter
601 %{_var}/lib/rpm/filetriggers/*.script
602 %config(noreplace) %{_sysconfdir}/sysconfig/udev_net
603 %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf
604 %config(noreplace) %{_sysconfdir}/systemd/coredump.conf
605 %config(noreplace) %{_sysconfdir}/systemd/journald.conf
606 %config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf
607 %config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf
608 %config(noreplace) %{_sysconfdir}/systemd/resolved.conf
609 %config(noreplace) %{_sysconfdir}/systemd/system.conf
610 %config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf
611 %config(noreplace) %{_sysconfdir}/systemd/logind.conf
612 %config(noreplace) %{_sysconfdir}/systemd/user.conf
613 %config(noreplace) %{_sysconfdir}/udev/udev.conf
614 %ghost %{_sysconfdir}/udev/hwdb.bin
615 %{_sysconfdir}/xdg/systemd
616 %ghost %config(noreplace) %{_sysconfdir}/hostname
617 %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf
618 %ghost %config(noreplace) %{_sysconfdir}/locale.conf
619 %ghost %config(noreplace) %{_sysconfdir}/machine-id
620 %ghost %config(noreplace) %{_sysconfdir}/machine-info
621 %ghost %config(noreplace) %{_sysconfdir}/timezone
622 %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
623 # (cg) NB dbus policy files are not really config that users are expected to
624 # edit manually and thus should NOT be marked as config(noreplace).
625 # This should really be fixed in upstream dbus (work in progress)
626 # to separate these policy files from /etc and ship them in /usr instead
627 # but allow override by admins by copying to /etc.
628 # There are security implications here (CVE's have been issued due to mistakes
629 # in these type of files)
630 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
631 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
632 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
633 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf
634 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf
635 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf
636 %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
637 %{_sysconfdir}/pam.d/%{name}-user
638 %dir %{_sysconfdir}/udev/rules.d
639 %{_prefix}/lib/systemd/network/80-container-host0.network
640 %{_prefix}/lib/systemd/network/80-container-ve.network
641 %{_prefix}/lib/systemd/network/99-default.link
642 # (cg) NB See pre script for soemthing that relies on this name...
643 # If it is ever renamed, change the pre script too
644 %{_prefix}/lib/sysctl.d/50-default.conf
645 #%{_prefix}/lib/sysctl.d/50-coredump.conf
646 %{_prefix}/lib/sysusers.d/basic.conf
647 %{_prefix}/lib/sysusers.d/systemd.conf
648 %{_prefix}/lib/sysusers.d/systemd-remote.conf
649 %{_prefix}/lib/tmpfiles.d/etc.conf
650 %{_prefix}/lib/tmpfiles.d/legacy.conf
651 %{_prefix}/lib/tmpfiles.d/systemd.conf
652 %{_prefix}/lib/tmpfiles.d/systemd-nologin.conf
653 %{_prefix}/lib/tmpfiles.d/systemd-remote.conf
654 %{_prefix}/lib/tmpfiles.d/tmp.conf
655 %{_prefix}/lib/tmpfiles.d/var.conf
656 %{_prefix}/lib/tmpfiles.d/x11.conf
657 %{_prefix}/lib/kernel/install.d/50-depmod.install
658 %{_prefix}/lib/kernel/install.d/90-loaderentry.install
659 %{_bindir}/bootctl
660 %{_bindir}/busctl
661 %{_bindir}/coredumpctl
662 %{_bindir}/hostnamectl
663 %{_bindir}/journalctl
664 %{_bindir}/kernel-install
665 %{_bindir}/localectl
666 %{_bindir}/loginctl
667 %{_bindir}/machinectl
668 %{_bindir}/networkctl
669 %{_bindir}/systemd
670 %{_bindir}/systemd-ask-password
671 %{_bindir}/systemd-escape
672 %{_bindir}/systemd-firstboot
673 %{_bindir}/systemd-inhibit
674 %{_bindir}/systemd-machine-id-setup
675 %{_bindir}/systemd-notify
676 %{_bindir}/systemd-path
677 %{_bindir}/systemd-run
678 %{_bindir}/systemd-sysusers
679 %{_bindir}/systemd-tmpfiles
680 %{_bindir}/systemd-tty-ask-password-agent
681 %{_bindir}/timedatectl
682 %{_bindir}/reboot
683 %{_bindir}/halt
684 %{_bindir}/poweroff
685 %{_sbindir}/shutdown
686 %{_sbindir}/init
687 %{_sbindir}/telinit
688 %{_sbindir}/runlevel
689 %{_sbindir}/udevadm
690 %{_prefix}/lib/systemd/systemd*
691 %{_prefix}/lib/systemd/system-generators/systemd-*
692 %{_prefix}/lib/udev
693 %{_libdir}/security/pam_systemd.so
694 %{_bindir}/systemd-analyze
695 %{_bindir}/systemd-cat
696 %{_bindir}/systemd-cgls
697 %{_bindir}/systemd-cgtop
698 %{_bindir}/systemd-delta
699 %{_bindir}/systemd-detect-virt
700 %{_bindir}/systemd-nspawn
701 %{_bindir}/systemd-stdio-bridge
702 %{_bindir}/udevadm
703 %dir %{_datadir}/systemd
704 %{_datadir}/systemd/kbd-model-map
705 %dir %{_datadir}/systemd/gatewayd
706 %{_datadir}/systemd/gatewayd/browse.html
707 %{_mandir}/man1/bootctl.*
708 %{_mandir}/man1/busctl.*
709 %{_mandir}/man1/coredumpctl.*
710 %{_mandir}/man1/hostnamectl.*
711 %{_mandir}/man1/journalctl.*
712 %{_mandir}/man1/localectl.*
713 %{_mandir}/man1/loginctl.*
714 %{_mandir}/man1/machinectl.*
715 %{_mandir}/man1/systemd.*
716 %{_mandir}/man1/systemd-*
717 %{_mandir}/man1/timedatectl.*
718 %{_mandir}/man3/*
719 %{_mandir}/man5/*
720 %{_mandir}/man7/*
721 %{_mandir}/man8/kernel-install.*
722 %{_mandir}/man8/pam_systemd.*
723 %{_mandir}/man8/systemd-*
724 %{_mandir}/man8/udevadm.*
725 %{_mandir}/man1/init.*
726 %{_mandir}/man8/halt.*
727 %{_mandir}/man8/reboot.*
728 %{_mandir}/man8/shutdown.*
729 %{_mandir}/man8/poweroff.*
730 %{_mandir}/man8/telinit.*
731 %{_mandir}/man8/runlevel.*
732 %{_sysconfdir}/init.d/README
733 %{_logdir}/README
734 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
735 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
736 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
737 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
738 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
739 %{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
740 %{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service
741 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
742 %dir %{_datadir}/factory
743 %dir %{_datadir}/factory/etc
744 %{_datadir}/factory/etc/nsswitch.conf
745 %dir %{_datadir}/factory/etc/pam.d
746 %{_datadir}/factory/etc/pam.d/other
747 %{_datadir}/factory/etc/pam.d/system-auth
748 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
749 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
750 %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
751 %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
752 %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
753 %{_docdir}/systemd
754 %{_prefix}/lib/systemd/catalog/systemd.catalog
755 %lang(fr) %{_prefix}/lib/systemd/catalog/systemd.fr.catalog
756 %lang(it) %{_prefix}/lib/systemd/catalog/systemd.it.catalog
757 %lang(ru) %{_prefix}/lib/systemd/catalog/systemd.ru.catalog
758 %lang(pl) %{_prefix}/lib/systemd/catalog/systemd.pl.catalog
759 %attr(02755,root,systemd-journal) %dir %{_logdir}/journal
760
761 %files units
762 # (cg) Note some of these directories are empty, but that is intended
763 # NB I'm not totally sure of the ownership split of directories between systemd and systemd-units.
764 %dir %{_sysconfdir}/systemd
765 %dir %{_sysconfdir}/systemd/system
766 %dir %{_sysconfdir}/systemd/user
767 %dir %{_sysconfdir}/tmpfiles.d
768 %dir %{_sysconfdir}/sysctl.d
769 %dir %{_sysconfdir}/modules-load.d
770 %dir %{_sysconfdir}/binfmt.d
771 %dir %{_datadir}/bash-completion
772 %{_bindir}/systemctl
773 %{_datadir}/bash-completion/completions
774 %{_datadir}/zsh/site-functions
775 %{_sysconfdir}/profile.d/40systemd.sh
776 %{_sysconfdir}/modules-load.d/*.conf
777 %{_prefix}/lib/systemd/system
778 %{_prefix}/lib/systemd/system-preset
779 %{_prefix}/lib/systemd/user
780 %{_prefix}/lib/systemd/user-preset
781 %{_mandir}/man1/systemctl.*
782
783 %files -n python-%{name}
784 %{py_platsitedir}/%{name}
785
786 %files devel
787 %{_includedir}/systemd
788 %{_libdir}/libsystemd*.so
789 %{_libdir}/pkgconfig/libsystemd*.pc
790 %{_datadir}/pkgconfig/systemd.pc
791 %{_prefix}/lib/rpm/macros.d/macros.systemd
792
793 %files -n nss-myhostname
794 %{_mandir}/man8/nss-myhostname.*
795 %{_libdir}/libnss_myhostname.so.2
796 # (cg) Yes, this is a hack for now, I'll likely rename the package to just lib[64]systemd-nss2 or something...
797 %{_libdir}/libnss_mymachines.so.2
798 %{_libdir}/libnss_resolve.so.2
799
800 %files -n %{libname}
801 %defattr(-,root,root,-)
802 %{_libdir}/libsystemd.so.%{libsystemd_major}*
803
804 %files -n %{libudev}
805 %{_libdir}/libudev.so.%{libudev_major}*
806
807 %files -n %{libudev_devel}
808 %{_libdir}/libudev.so
809 %{_includedir}/libudev.h
810 %{_datadir}/pkgconfig/udev.pc
811 %{_libdir}/pkgconfig/libudev.pc
812
813 %files -n %{libgudev}
814 %{_libdir}/libgudev-%{libgudev_api}.so.%{libgudev_major}*
815
816 %files -n %{libgudev_gir}
817 %{_libdir}/girepository-1.0/GUdev-%{libgudev_api}.typelib
818
819 %files -n %{libgudev_devel}
820 %{_libdir}/libgudev-%{libgudev_api}.so
821 %{_includedir}/gudev-%{libgudev_api}
822 %{_libdir}/pkgconfig/gudev-%{libgudev_api}.pc
823 %{_datadir}/gir-1.0/GUdev-%{libgudev_api}.gir

  ViewVC Help
Powered by ViewVC 1.1.30