/[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 1751786 - (show annotations) (download)
Sat Oct 16 12:14:24 2021 UTC (2 years, 6 months ago) by tmb
File size: 35244 byte(s)
coredumpctl: stop truncating information about coredump
1 %define libsystemd_major 0
2 %define libudev_major 1
3
4 %define libname %mklibname %{name} %{libsystemd_major}
5
6 %define libdaemon %mklibname systemd-daemon 0
7 %define libjournal %mklibname systemd-journal 0
8 %define liblogin %mklibname systemd-login 0
9 %define libid128 %mklibname systemd-id 128 0
10
11 %define libudev %mklibname udev %{libudev_major}
12 %define libudev_devel %mklibname -d udev
13
14 # (tmb) Turn off the brp-python-bytecompile automagic
15 %global _python_bytecompile_extra 0
16
17 # (ngompa): This implicitly requires pam_selinux
18 %bcond_with selinux
19
20 # (tmb): experiment with homed
21 %bcond_without homed
22
23 # Iurt causes issues with the test execution,
24 # so for now, it's disabled by default...
25 %bcond_with check
26
27 # stable branches now have patch levels
28 %define systemd_branch 249
29 %define systemd_patch 5
30
31 Summary: A System and Session Manager
32 Name: systemd
33 %if 0%{systemd_patch}
34 Version: %{systemd_branch}.%{systemd_patch}
35 %else
36 Version: %{systemd_branch}
37 %endif
38 Release: %mkrel 1
39 License: GPLv2+
40 Group: System/Boot and Init
41 Url: http://www.freedesktop.org/wiki/Software/systemd
42 %if 0%{systemd_patch}
43 Source0: https://github.com/systemd/systemd-stable/archive/v%{version}/%{name}-%{version}.tar.gz
44 %else
45 Source0: https://github.com/systemd/systemd/archive/v%{version}/%{name}-%{version}.tar.gz
46 %endif
47
48 Source10: 50-udev-mageia.rules
49 Source11: 69-printeracl.rules
50 # (hk) udev rules for zte 3g modems with drakx-net
51 Source12: 61-mobile-zte-drakx-net.rules
52
53 # (blino) net rules and helpers
54 Source20: 81-net.rules
55 Source21: udev_net_create_ifcfg
56 Source22: udev_net_action
57 Source23: udev_net.sysconfig
58
59 # Patching scheme:
60 ## 100s: Upstream stable https://github.com/systemd/systemd-stable
61 ## 400s: Upstream master https://github.com/systemd/systemd
62 ## 450s: Changes proposed to upstream
63 ## 500s: Mageia-specific changes
64
65 # upstream stable
66 Patch100: 0100-coredumpctl-stop-truncating-information-about-coredu.patch
67
68 # upstream master
69
70 # (ngompa): I'm not entirely sure why this is considered distro-specific...
71 Patch501: 0501-main-Add-failsafe-to-the-sysvinit-compat-cmdline-key.patch
72 Patch502: 0502-Disable-modprobe-pci-devices-on-coldplug-for-storage.patch
73 # (ngompa): Needs to be reworked
74 Source503: 0503-udev-Allow-the-udevadm-settle-timeout-to-be-set-via-.patch
75 Patch504: 0504-Mageia-Relax-perms-on-sys-kernel-debug-for-lspcidrak.patch
76 Patch505: 0505-udev-rules-Apply-SuSE-patch-to-restore-cdrom-cdrw-dv.patch
77 # (tmb) need check if still needed
78 Source506: 0506-pam_systemd-Always-reset-XDG_RUNTIME_DIR.patch
79 Source507: 0507-pam-Suppress-errors-in-the-SuSE-patch-to-unset-XDG_R.patch
80 Patch508: 0508-Add-path-to-locale-search.patch
81 # (tmb) silence udev version print as it breaks splash
82 Patch509: 0509-Silence-udev-version-print-during-boot-as-it-breaks-.patch
83 # (wally) fix build with new meson
84 Source510: 0510-Fix-build-with-new-meson.patch
85 # (tmb) treat nokmsboot like nomodeset
86 Patch511: 0511-login-mark-nokmsboot-fb-devices-as-master-of-seat.patch
87 # systemctl call to be "sourced" in X11 xinit
88 Patch512: systemd-246.9-xinit-to-be-sourced.patch
89 #
90 BuildRequires: pkgconfig(dbus-1) >= 1.4.0
91 BuildRequires: pkgconfig(libcap)
92 BuildRequires: tcp_wrappers-devel
93 BuildRequires: pam-devel
94 BuildRequires: glib2-devel
95 BuildRequires: pkgconfig(libnotify)
96 BuildRequires: intltool
97 BuildRequires: gettext-devel
98 BuildRequires: gperf
99 BuildRequires: pkgconfig(gee-1.0)
100 BuildRequires: pkgconfig(libcryptsetup)
101 BuildRequires: pkgconfig(libkmod)
102 BuildRequires: pkgconfig(blkid)
103 BuildRequires: pkgconfig(gobject-introspection-1.0)
104 BuildRequires: xsltproc
105 BuildRequires: docbook-style-xsl
106 BuildRequires: pkgconfig(libmicrohttpd)
107 BuildRequires: pkgconfig(liblzma)
108 BuildRequires: pkgconfig(libidn2)
109 BuildRequires: pkgconfig(libcurl)
110 BuildRequires: python3-jinja2
111 BuildRequires: python3-lxml
112 BuildRequires: pkgconfig(libqrencode)
113 BuildRequires: pkgconfig(mount)
114 BuildRequires: pkgconfig(xkbcommon)
115 BuildRequires: pkgconfig(libseccomp)
116 %if %{with selinux}
117 BuildRequires: pkgconfig(libselinux)
118 %endif
119 # for systemd-repart
120 BuildRequires: pkgconfig(fdisk)
121 BuildRequires: pkgconfig(bzip2)
122 BuildRequires: libelfutils-devel
123 BuildRequires: pkgconfig(libiptc)
124 BuildRequires: pkgconfig(liblz4)
125 BuildRequires: pkgconfig(polkit-gobject-1)
126 BuildRequires: quota-devel
127 BuildRequires: acl
128 BuildRequires: tree
129 # synchronized with ExclusiveArch list from valgrind.spec
130 %ifarch %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
131 BuildRequires: pkgconfig(valgrind)
132 %endif
133 %ifarch %{ix86} x86_64
134 BuildRequires: gnu-efi-devel
135 #BuildRequires: qemu
136 %endif
137 BuildRequires: git
138 BuildRequires: gcc >= 11.1.0
139 BuildRequires: binutils >= 1:2.37-2
140 # temp force new glibc
141 BuildRequires: glibc >= 6:2.33-2
142
143 BuildRequires: meson >= 0.46
144
145 Requires(pre): filesystem >= 2.1.9-18
146 Requires(pre): shadow-utils
147 Requires(pre): filesystem >= 2.1.9-18
148 Requires(post): system-release
149 Requires(post): coreutils grep awk
150 Requires: chkconfig >= 1.5
151
152 Requires: %{libname} = %{version}-%{release}
153 Requires: systemd-units = %{version}-%{release}
154 Requires: dbus >= 1.3.2
155 Requires: util-linux >= 2.18
156 Requires: nss-myhostname
157 Conflicts: initscripts < 9.78-27
158 Provides: should-restart = system
159 Provides: udev = %{version}-%{release}
160 Obsoletes: udev < 185
161 Provides: u2f-hidraw-policy = 1.0.2-1
162 Obsoletes: u2f-hidraw-policy < 1.0.2-2
163 Provides: systemd-sysvinit = %{version}-%{release}
164 Conflicts: systemd-sysvinit < 185
165 Obsoletes: systemd-sysvinit < 185
166 Provides: systemd-sysv = %{version}-%{release}
167 Provides: sysvinit = 2.87-22
168 Obsoletes: sysvinit < 2.87-22
169 Conflicts: SysVinit
170 # Due to halt/poweroff etc. in _bindir
171 Conflicts: usermode-consoleonly < 1:1.110
172 Provides: system-logger
173 # (blino) consolekit has been replaced by systemd-logind
174 Obsoletes: consolekit
175 Obsoletes: consolekit-x11
176 Obsoletes: libconsolekit0
177 Obsoletes: lib64consolekit0
178 Obsoletes: systemd-tools
179 Obsoletes: gummiboot
180 # (ngompa): For moving rpm macros to main package (like Fedora, openSUSE, etc.)
181 Conflicts: systemd < 236-1
182 Conflicts: systemd-devel < 236-1
183 # (tmb) systemd-repart moved to main package
184 Conflicts: systemd-homed < 245-3
185 # Conflict with mageia-release prior to presets
186 Conflicts: mageia-release < 7-0.2
187 # Merge back units subpkg:
188 Conflicts: systemd-units <= 245.4-4.mga8
189 Obsoletes: systemd-units <= 245.4-4.mga8
190 Provides: systemd-units = %{version}-%{release}
191
192 %description
193 systemd is a system and session manager for Linux, compatible with
194 SysV and LSB init scripts. systemd provides aggressive parallelization
195 capabilities, uses socket and D-Bus activation for starting services,
196 offers on-demand starting of daemons, keeps track of processes using
197 Linux cgroups, supports snapshotting and restoring of the system
198 state, maintains mount and automount points and implements an
199 elaborate transactional dependency-based service control logic. It can
200 work as a drop-in replacement for sysvinit.
201
202 %if %{with homed}
203 %package homed
204 Summary: systemd homed support
205 Group: System/Boot and Init
206 Requires: %{name} = %{version}-%{release}
207
208 %description homed
209 Systemd-homed makes it easier to support migratable home directories, more
210 self containment within home directories, better password and encryption
211 handling,
212 %endif
213
214 %package devel
215 Summary: Systemd development files
216 Group: Development/C
217 Conflicts: %{name} <= 35-4
218 Requires: %{libname} = %{version}-%{release}
219 # (ngompa): For moving rpm macros to main package (like Fedora, openSUSE, etc.)
220 Conflicts: systemd < 236-1
221 Conflicts: systemd-devel < 236-1
222
223 %description devel
224 This package provides the development files for systemd.
225
226 %package tests
227 Summary: Internal unit tests for systemd
228 Group: Development/Other
229 Requires: %{name} = %{version}-%{release}
230
231 %description tests
232 "Installed tests" that are usually run as part of the build system.
233 They can be useful to test systemd internals.
234
235
236 %package -n nss-myhostname
237 Summary: systemd provided glibc plugin for local system host name resolution
238 Group: System/Base
239 # (pterjan) Moved nss-systemd man pages here
240 Conflicts: systemd < 236-4
241
242 %description -n nss-myhostname
243 nss-myhostname is a plugin for the GNU Name Service Switch (NSS)
244 functionality of the GNU C Library (glibc) providing host name
245 resolution for the locally configured system hostname as returned by
246 gethostname(2). Various software relies on an always resolvable local
247 host name. When using dynamic hostnames this is usually achieved by
248 patching /etc/hosts at the same time as changing the host name. This
249 however is not ideal since it requires a writable /etc file system and
250 is fragile because the file might be edited by the administrator at
251 the same time. nss-myhostname simply returns all locally configure
252 public IP addresses, or -- if none are configured -- the IPv4 address
253 127.0.0.2 (wich is on the local loopback) and the IPv6 address ::1
254 (which is the local host) for whatever system hostname is configured
255 locally. Patching /etc/hosts is thus no longer necessary.
256
257 %package -n %{libname}
258 Summary: Systemd library package
259 Group: System/Libraries
260
261 %description -n %{libname}
262 This package provides the systemd shared library.
263
264 %package -n %{libudev}
265 Summary: udev library package
266 Group: System/Libraries
267 Requires(pre): filesystem >= 2.1.9-18
268
269 %description -n %{libudev}
270 This package provides the udev shared library.
271
272 %package -n %{libudev_devel}
273 Summary: udev library development files
274 Group: Development/C
275 Requires: %{libudev} = %{version}-%{release}
276 Provides: udev-devel = %{version}-%{release}
277 Provides: libudev-devel = %{version}-%{release}
278
279 %description -n %{libudev_devel}
280 This package provides the development files for the udev shared library.
281
282
283 %prep
284 %if 0%{systemd_patch}
285 %autosetup -n %{name}-stable-%{version} -S git
286 %else
287 %autosetup -S git
288 %endif
289 find src/ -name "*.vala" -exec touch '{}' \;
290
291 %build
292 %define ntpvendor %(source /etc/os-release; echo ${ID})
293 %{!?ntpvendor: echo 'NTP vendor zone is not set!'; exit 1}
294
295 CONFIGURE_OPTS=(
296 -Dsysvinit-path=/etc/rc.d/init.d
297 -Drc-local=/etc/rc.d/rc.local
298 -Ddev-kvm-mode=0666
299 -Dkmod=true
300 -Dxkbcommon=true
301 -Dblkid=true
302 -Dseccomp=true
303 -Dima=true
304 -Dselinux=%{?with_selinux:true}%{!?with_selinux:false}
305 -Dapparmor=false
306 -Dpolkit=true
307 -Dxz=true
308 -Dzlib=true
309 -Dbzip2=true
310 -Dlz4=true
311 -Dpam=true
312 -Dacl=true
313 -Dsmack=true
314 -Dgcrypt=true
315 -Daudit=true
316 -Delfutils=true
317 -Dlibcryptsetup=true
318 -Delfutils=true
319 -Dqrencode=true
320 -Dgnutls=true
321 -Dmicrohttpd=true
322 -Dlibidn2=true
323 -Dlibiptc=true
324 -Dlibcurl=true
325 -Defi=true
326 %ifarch %{ix86} x86_64
327 -Dgnu-efi=true
328 %else
329 -Dgnu-efi=false
330 %endif
331 -Dtpm=true
332 -Dhwdb=true
333 -Dsysusers=true
334 -Ddefault-kill-user-processes=false
335 -Dtests=unsafe
336 -Dinstall-tests=true
337 -Dtty-gid=5
338 -Dusers-gid=100
339 -Dnobody-user=nobody
340 -Dnobody-group=nogroup
341 -Dsystem-uid-max=999
342 -Dsystem-gid-max=999
343 -Db_lto=true
344 -Db_ndebug=false
345 -Dman=true
346 -Dhomed=%{?with_homed:true}%{!?with_homed:false}
347 -Dpamconfdir=%{_sysconfdir}/pam.d
348 )
349
350 # (tv) "fix" build with gcc8:
351 perl -pi -e 'undef $_ if /PIE|-pie/' meson.build
352 %meson "${CONFIGURE_OPTS[@]}"
353
354 %meson_build
355
356 %install
357 %meson_install
358 find %{buildroot} \( -name '*.a' -o -name '*.la' \) -exec rm {} \;
359
360 # (cg) Create and ship folder to hold user rules
361 install -d -m 755 %{buildroot}%{_sysconfdir}/udev/rules.d
362
363 install -m 644 %SOURCE10 %{buildroot}%{_prefix}/lib/udev/rules.d/
364 install -m 644 %SOURCE11 %{buildroot}%{_prefix}/lib/udev/rules.d/
365 # udev rules for zte 3g modems and drakx-net
366 install -m 0644 %SOURCE12 %{buildroot}%{_prefix}/lib/udev/rules.d/
367
368 # net rules
369 install -m 0644 %SOURCE20 %{buildroot}%{_prefix}/lib/udev/rules.d/
370 install -m 0755 %SOURCE21 %{buildroot}%{_prefix}/lib/udev/net_create_ifcfg
371 install -m 0755 %SOURCE22 %{buildroot}%{_prefix}/lib/udev/net_action
372 install -m 0755 -d %{buildroot}%{_sysconfdir}/sysconfig
373 install -m 0644 %SOURCE23 %{buildroot}%{_sysconfdir}/sysconfig/udev_net
374
375
376 # Create SysV compatibility symlinks. systemctl/systemd are smart
377 # enough to detect in which way they are called.
378 mkdir -p %{buildroot}{%{_bindir},%{_sbindir}}
379 ln -s ../lib/systemd/systemd %{buildroot}%{_bindir}/systemd
380 ln -s ../bin/systemctl %{buildroot}%{_bindir}/reboot
381 ln -s ../bin/systemctl %{buildroot}%{_bindir}/halt
382 ln -s ../bin/systemctl %{buildroot}%{_bindir}/poweroff
383
384 # Also add a symlink for udevadm for now as lots of things use an absolute path
385 ln -s ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
386
387 # (cg) To avoid making life hard for developers, don't package the
388 # kernel.core_pattern setting until systemd-coredump is a part of an actual
389 # systemd release and it's made clear how to get the core dumps out of the
390 # journal.
391 rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-coredump.conf
392
393 # Compatiblity and documentation files
394 touch %{buildroot}/etc/crypttab
395 chmod 600 %{buildroot}/etc/crypttab
396
397 # Make sure these directories are properly owned
398 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants
399 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants
400 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants
401
402 # And the default symlink we generate automatically based on inittab
403 rm -f %{buildroot}%{_sysconfdir}/systemd/system/default.target
404
405 # (bor) make sure we own directory for bluez to install service
406 mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/bluetooth.target.wants
407
408 touch %{buildroot}%{_localstatedir}/log/{w,b}tmp
409
410 # (cg) Set up the pager to make it generally more useful
411 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
412 cat > %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh << EOF
413 export SYSTEMD_PAGER="/usr/bin/less -FR"
414 EOF
415 chmod 644 %{buildroot}%{_sysconfdir}/profile.d/40systemd.sh
416
417 # (bor) enable rpcbind.target by default so we have something to plug
418 # portmapper service into
419 ln -s ../rpcbind.target %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants
420
421 # create modules.conf as a symlink to /etc/
422 ln -s /etc/modules %{buildroot}%{_sysconfdir}/modules-load.d/modules.conf
423
424 # Create new-style configuration files so that we can ghost-own them
425 touch %{buildroot}%{_sysconfdir}/hostname
426 touch %{buildroot}%{_sysconfdir}/vconsole.conf
427 touch %{buildroot}%{_sysconfdir}/locale.conf
428 touch %{buildroot}%{_sysconfdir}/machine-id
429 touch %{buildroot}%{_sysconfdir}/machine-info
430 touch %{buildroot}%{_sysconfdir}/timezone
431 mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
432 touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
433 mkdir -p %{buildroot}%{_sysconfdir}/udev
434 touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin
435
436 # (cg) Make the journal's persistent in order to provide a real syslog implementation
437 install -m 0755 -d %{buildroot}%{_logdir}/journal
438
439 # (cg) Default preset policy
440 # (for now, just a placeholder directory)
441 mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-preset
442
443 # This file is already in systemd-ui rpm
444 rm -fr %{buildroot}%_mandir/man1/systemadm.*
445
446 # we already have resolvconf
447 rm -f %{buildroot}%{_sbindir}/resolvconf
448
449 # (cg) These are the compat libs but we don't need them in cauldron.
450 # All we need is the pkgconfig files so we can rebuild everything and
451 # kill off the need for the old library packages (which will remain installed
452 # and operational due to our packaging policy)
453 for lib in daemon id128 journal login; do
454 rm -f %{buildroot}%{_libdir}/libsystemd-$lib.so{,.0.*}
455 done
456
457 # (ngompa) Purge links to services in /etc/systemd/system
458 # It *shouldn't* break anything, but if it does, we'll recreate elsewhere..
459 rm -rf %{buildroot}%{_sysconfdir}/systemd/system/*
460
461 %find_lang %{name}
462
463 %if %{with check}
464 %check
465 if [ `systemd-detect-virt -c` == "systemd-nspawn" ]; then
466 echo "Skipping package tests because of issues in mock nspawn containers"
467 exit 0
468 else
469 %meson_test
470 fi
471 %endif
472
473 %triggerin -- glibc
474 # reexec daemon on self or glibc update to avoid busy / on shutdown
475 # trigger is executed on both self and target install so no need to have
476 # extra own post
477 if [ $1 -ge 2 -o $2 -ge 2 ] ; then
478 %{_bindir}/systemctl daemon-reexec 2>&1 || :
479 fi
480
481 %pre
482 # (cg) Cannot use rpm-helper scripts as it results in a cyclical dep as
483 # rpm-helper requires systemd-units which in turn requires systemd...
484 getent group systemd-journal &>/dev/null || groupadd -r -g 190 systemd-journal 2>&1 || :
485 getent group systemd-coredump &>/dev/null || groupadd -r systemd-coredump 2>&1 || :
486 getent passwd systemd-coredump &>/dev/null || useradd -r -l -g systemd-coredump -d / -s /sbin/nologin -c "systemd Core Dumper" systemd-coredump &>/dev/null || :
487 getent group systemd-network &>/dev/null || groupadd -r -g 192 systemd-network 2>&1 || :
488 getent passwd systemd-network &>/dev/null || useradd -r -u 192 -l -g systemd-network -d / -s /sbin/nologin -c "systemd Network Management" systemd-network &>/dev/null || :
489 getent group systemd-resolve &>/dev/null || groupadd -r -g 193 systemd-resolve 2>&1 || :
490 getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-resolve -d / -s /sbin/nologin -c "systemd Resolver" systemd-resolve &>/dev/null || :
491
492
493 # Write on first install or upgrade from MGA3.
494 if [ ! -r %{_prefix}/lib/sysctl.d/50-default.conf ]; then
495 if [ ! -d %{_sysconfdir}/sysctl.d ]; then
496 mkdir -m 0755 %{_sysconfdir}/sysctl.d
497 fi
498 cat > %{_sysconfdir}/sysctl.d/51-alt-sysrq.conf << EOF
499 # This file ensures that the Alt+SysRq Magic keys still work.
500 # This setting is insecure, although commonly expected and you can remove this
501 # file to disable this feature. It will not be readded on future systemd
502 # upgrades/updates.
503 # http://en.wikipedia.org/wiki/Magic_SysRq_key#Security
504 kernel.sysrq = 1
505 EOF
506
507 fi
508
509 %post
510 %{_bindir}/systemd-machine-id-setup > /dev/null 2>&1 || :
511 %{_prefix}/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || :
512
513 if [ $1 -eq 1 ] ; then
514 # Try to read default runlevel from the old inittab if it exists
515 runlevel=$(%{_bindir}/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
516 if [ -z "$runlevel" ] ; then
517 target="%{_prefix}/lib/systemd/system/multi-user.target"
518 else
519 target="%{_prefix}/lib/systemd/system/runlevel$runlevel.target"
520 fi
521
522 # And symlink what we found to the new-style default.target
523 %{_bindir}/ln -sf "$target" %{_sysconfdir}/systemd/system/default.target || :
524
525 # Flag to %posttrans
526 touch %{_sysconfdir}/systemd/.installing-units
527 fi
528
529 # (martinw) Run as posttrans as there was a circular dependency between systemd
530 # and systemd-units (mga#22620).
531 %posttrans
532 if [ -f %{_sysconfdir}/systemd/.installing-units ] ; then
533 rm -f %{_sysconfdir}/systemd/.installing-units
534
535 # Enable the services we install by default.
536 %{_bindir}/systemctl --quiet preset \
537 remote-fs.target \
538 getty@.service \
539 serial-getty@.service \
540 console-getty.service \
541 debug-shell.service \
542 systemd-timesyncd.service \
543 systemd-networkd.service \
544 systemd-networkd-wait-online.service \
545 systemd-resolved.service \
546 || :
547 fi
548
549 hostname_new=`cat %_sysconfdir/hostname 2>/dev/null`
550 if [ -z $hostname_new ]; then
551 hostname_old=`cat /etc/sysconfig/network 2>/dev/null | grep HOSTNAME | cut -d "=" -f2`
552 if [ ! -z $hostname_old ]; then
553 echo $hostname_old >> %_sysconfdir/hostname
554 else
555 echo "localhost" >> %_sysconfdir/hostname
556 fi
557 fi
558
559 %preun
560 if [ $1 -eq 0 ] ; then
561 %{_bindir}/systemctl --quiet disable \
562 getty@.service \
563 remote-fs.target \
564 2>&1 || :
565
566 %{_bindir}/rm -f %_sysconfdir/systemd/system/default.target 2>&1 || :
567 fi
568
569 %postun
570 if [ $1 -ge 1 ] ; then
571 %{_bindir}/systemctl daemon-reload 2>&1 || :
572 fi
573
574 # automatic systemd daemon reload on rpm installs/removals
575 %transfiletriggerin -- /usr/lib/systemd/system/ /etc/systemd/system/ /etc/init.d/ /etc/rc.d/init.d/
576 if [ -d %{_rundir}/systemd/system ]; then
577 if [ -x %{_bindir}/systemctl ]; then
578 %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
579 %{_bindir}/systemctl reload-or-restart --marked >/dev/null 2>&1 || :
580 fi
581 fi
582
583 %transfiletriggerpostun -P 1000100 -- /usr/lib/systemd/system /etc/systemd/system
584 if [ -d %{_rundir}/systemd/system ]; then
585 if [ -x %{_bindir}/systemctl ]; then
586 %{_bindir}/systemctl daemon-reload >/dev/null 2>&1 || :
587 fi
588 fi
589
590 %transfiletriggerpostun -P 10000 -- /usr/lib/systemd/system /etc/systemd/system
591 if [ -d %{_rundir}/systemd/system ]; then
592 if [ -x %{_bindir}/systemctl ]; then
593 %{_bindir}/systemctl reload-or-restart --marked >/dev/null 2>&1 || :
594 fi
595 fi
596
597 # sysusers (make sure to run before tmpfiles)
598 %transfiletriggerin -P 100700 -- /usr/lib/sysusers.d/
599 # TODO Make sysusers support --quiet
600 %{_bindir}/systemd-sysusers || :
601
602 # tmpfiles (make sure to run early just incase the tmpfiles created are needed by other filetriggers)
603 %transfiletriggerin -P 100500 -- /usr/lib/tmpfiles.d/
604 %{_bindir}/systemd-tmpfiles --create || :
605
606 # hwdb
607 %transfiletriggerin -- /usr/lib/udev/hwdb.d/
608 exec %{_bindir}/systemd-hwdb update
609
610 # journal catalog
611 %transfiletriggerin -- /usr/lib/systemd/catalog/
612 exec %{_bindir}/journalctl --update-catalog
613
614 %triggerpostun -- systemd-units <= 245.4-4.mga8
615 # fix the damage done by the obsoleted systemd-units's preun scriptlet:
616 /bin/systemctl enable \
617 getty@.service \
618 remote-fs.target
619
620 %files -f %{name}.lang
621 # (cg) Note some of these directories are empty, but that is intended
622 %dir %{_sysconfdir}/systemd
623 %dir %{_sysconfdir}/systemd/system
624 %dir %{_sysconfdir}/systemd/user
625 %dir %{_sysconfdir}/tmpfiles.d
626 %dir %{_sysconfdir}/sysctl.d
627 %dir %{_sysconfdir}/modules-load.d
628 %dir %{_sysconfdir}/binfmt.d
629 %dir %{_datadir}/bash-completion
630 %dir %{_prefix}/lib/systemd
631 %{_datadir}/bash-completion/completions
632 %{_datadir}/zsh/site-functions
633 %{_prefix}/lib/systemd/system
634 %{_prefix}/lib/systemd/system-preset
635 %{_prefix}/lib/systemd/user
636 %{_prefix}/lib/systemd/user-preset
637 %{_prefix}/lib/environment.d/99-environment.conf
638 %{_prefix}/lib/systemd/resolv.conf
639 %{_prefix}/lib/systemd/user-environment-generators/30-systemd-environment-d-generator
640 %dir %{_prefix}/lib/modprobe.d
641 %{_prefix}/lib/modprobe.d/README
642 %{_prefix}/lib/modprobe.d/systemd.conf
643
644 %ifarch %{ix86} x86_64
645 %dir %{_prefix}/lib/systemd/boot
646 %dir %{_prefix}/lib/systemd/boot/efi
647 %endif
648 %dir %{_prefix}/lib/systemd/network
649 %dir %{_prefix}/lib/systemd/ntp-units.d
650 %dir %{_prefix}/lib/systemd/portable
651 %dir %{_prefix}/lib/systemd/portable/profile
652 %dir %{_prefix}/lib/systemd/portable/profile/default
653 %dir %{_prefix}/lib/systemd/portable/profile/nonetwork
654 %dir %{_prefix}/lib/systemd/portable/profile/strict
655 %dir %{_prefix}/lib/systemd/portable/profile/trusted
656 %dir %{_prefix}/lib/systemd/system-generators
657 %dir %{_prefix}/lib/systemd/system-shutdown
658 %dir %{_prefix}/lib/systemd/system-sleep
659 %dir %{_prefix}/lib/systemd/user-generators
660 %dir %{_prefix}/lib/tmpfiles.d
661 %dir %{_prefix}/lib/sysctl.d
662 %dir %{_prefix}/lib/modules-load.d
663 %dir %{_prefix}/lib/kernel
664 %dir %{_prefix}/lib/kernel/install.d
665 %dir %{_prefix}/lib/binfmt.d
666 %config(noreplace) %{_sysconfdir}/sysconfig/udev_net
667 %config(noreplace) %{_sysconfdir}/systemd/coredump.conf
668 %config(noreplace) %{_sysconfdir}/systemd/journald.conf
669 %config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf
670 %config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf
671 %config(noreplace) %{_sysconfdir}/systemd/networkd.conf
672 %config(noreplace) %{_sysconfdir}/systemd/pstore.conf
673 %config(noreplace) %{_sysconfdir}/systemd/resolved.conf
674 %config(noreplace) %{_sysconfdir}/systemd/sleep.conf
675 %config(noreplace) %{_sysconfdir}/systemd/system.conf
676 %config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf
677 %config(noreplace) %{_sysconfdir}/systemd/logind.conf
678 %config(noreplace) %{_sysconfdir}/systemd/user.conf
679 %config(noreplace) %{_sysconfdir}/udev/udev.conf
680 %{_sysconfdir}/profile.d/40systemd.sh
681 %{_sysconfdir}/modules-load.d/*.conf
682 %ghost %{_sysconfdir}/udev/hwdb.bin
683 %{_sysconfdir}/xdg/systemd
684 %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/crypttab
685 %ghost %config(noreplace) %{_sysconfdir}/hostname
686 %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf
687 %ghost %config(noreplace) %{_sysconfdir}/locale.conf
688 %ghost %config(noreplace) %{_sysconfdir}/machine-id
689 %ghost %config(noreplace) %{_sysconfdir}/machine-info
690 %ghost %config(noreplace) %{_sysconfdir}/timezone
691 %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
692 %ghost %attr(0664,root,utmp) /var/log/btmp
693 %ghost %attr(0664,root,utmp) /var/log/wtmp
694 # (cg) NB dbus policy files are not really config that users are expected to
695 # edit manually and thus should NOT be marked as config(noreplace).
696 # This should really be fixed in upstream dbus (work in progress)
697 # to separate these policy files from /etc and ship them in /usr instead
698 # but allow override by admins by copying to /etc.
699 # There are security implications here (CVE's have been issued due to mistakes
700 # in these type of files)
701 %{_datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf
702 %{_datadir}/dbus-1/system.d/org.freedesktop.import1.conf
703 %{_datadir}/dbus-1/system.d/org.freedesktop.locale1.conf
704 %{_datadir}/dbus-1/system.d/org.freedesktop.login1.conf
705 %{_datadir}/dbus-1/system.d/org.freedesktop.machine1.conf
706 %{_datadir}/dbus-1/system.d/org.freedesktop.network1.conf
707 %{_datadir}/dbus-1/system.d/org.freedesktop.portable1.conf
708 %{_datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf
709 %{_datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf
710 %{_datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf
711 %{_datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf
712 %{_sysconfdir}/pam.d/%{name}-user
713 %dir %{_sysconfdir}/udev/rules.d
714 %{_sysconfdir}/X11/xinit/xinitrc.d/50-systemd-user.sh
715 %ifarch %{ix86} x86_64
716 %{_prefix}/lib/systemd/boot/efi/linux*.efi.stub
717 %{_prefix}/lib/systemd/boot/efi/linux*.elf.stub
718 %{_prefix}/lib/systemd/boot/efi/systemd-boot*.efi
719 %endif
720 %{_prefix}/lib/systemd/import-pubring.gpg
721 %{_prefix}/lib/systemd/network/80-container-host0.network
722 %{_prefix}/lib/systemd/network/80-container-ve.network
723 %{_prefix}/lib/systemd/network/80-container-vz.network
724 %{_prefix}/lib/systemd/network/80-vm-vt.network
725 %{_prefix}/lib/systemd/network/80-wifi-adhoc.network
726 %{_prefix}/lib/systemd/network/80-wifi-ap.network.example
727 %{_prefix}/lib/systemd/network/80-wifi-station.network.example
728 %{_prefix}/lib/systemd/network/99-default.link
729 %{_prefix}/lib/systemd/ntp-units.d/80-systemd-timesync.list
730 %{_prefix}/lib/systemd/portable/profile/default/service.conf
731 %{_prefix}/lib/systemd/portable/profile/nonetwork/service.conf
732 %{_prefix}/lib/systemd/portable/profile/strict/service.conf
733 %{_prefix}/lib/systemd/portable/profile/trusted/service.conf
734 %{_prefix}/lib/sysctl.d/README
735 # (cg) NB See pre script for soemthing that relies on this name...
736 # If it is ever renamed, change the pre script too
737 %{_prefix}/lib/sysctl.d/50-default.conf
738 %ifarch x86_64 aarch64
739 %{_prefix}/lib/sysctl.d/50-pid-max.conf
740 %endif
741 %{_prefix}/lib/sysusers.d/README
742 %{_prefix}/lib/sysusers.d/basic.conf
743 %{_prefix}/lib/sysusers.d/systemd.conf
744 %{_prefix}/lib/sysusers.d/systemd-remote.conf
745 %{_prefix}/lib/tmpfiles.d/README
746 %{_prefix}/lib/tmpfiles.d/etc.conf
747 %{_prefix}/lib/tmpfiles.d/home.conf
748 %{_prefix}/lib/tmpfiles.d/journal-nocow.conf
749 %{_prefix}/lib/tmpfiles.d/legacy.conf
750 %{_prefix}/lib/tmpfiles.d/portables.conf
751 %{_prefix}/lib/tmpfiles.d/static-nodes-permissions.conf
752 %{_prefix}/lib/tmpfiles.d/systemd.conf
753 %{_prefix}/lib/tmpfiles.d/systemd-nologin.conf
754 %{_prefix}/lib/tmpfiles.d/systemd-nspawn.conf
755 %{_prefix}/lib/tmpfiles.d/systemd-pstore.conf
756 %{_prefix}/lib/tmpfiles.d/systemd-tmp.conf
757 %{_prefix}/lib/tmpfiles.d/tmp.conf
758 %{_prefix}/lib/tmpfiles.d/var.conf
759 %{_prefix}/lib/tmpfiles.d/x11.conf
760 %{_prefix}/lib/kernel/install.d/00-entry-directory.install
761 %{_prefix}/lib/kernel/install.d/50-depmod.install
762 %{_prefix}/lib/kernel/install.d/90-loaderentry.install
763 %{_bindir}/bootctl
764 %{_bindir}/busctl
765 %{_bindir}/coredumpctl
766 %{_bindir}/halt
767 %{_bindir}/hostnamectl
768 %{_bindir}/journalctl
769 %{_bindir}/kernel-install
770 %{_bindir}/localectl
771 %{_bindir}/loginctl
772 %{_bindir}/machinectl
773 %{_bindir}/networkctl
774 %{_bindir}/oomctl
775 %{_bindir}/systemd-dissect
776 %{_bindir}/portablectl
777 %{_bindir}/poweroff
778 %{_bindir}/reboot
779 %{_bindir}/resolvectl
780 %{_bindir}/systemd
781 %{_bindir}/systemd-ask-password
782 %{_bindir}/systemd-cryptenroll
783 %{_bindir}/systemd-escape
784 %{_bindir}/systemd-firstboot
785 %{_bindir}/systemd-hwdb
786 %{_bindir}/systemd-id128
787 %{_bindir}/systemd-inhibit
788 %{_bindir}/systemd-machine-id-setup
789 %{_bindir}/systemd-mount
790 %{_bindir}/systemd-notify
791 %{_bindir}/systemd-path
792 %{_bindir}/systemd-run
793 %{_bindir}/systemd-resolve
794 %{_bindir}/systemd-sysext
795 %{_bindir}/systemd-sysusers
796 %{_bindir}/systemd-tmpfiles
797 %{_bindir}/systemd-tty-ask-password-agent
798 %{_bindir}/systemd-umount
799 %{_bindir}/timedatectl
800 %{_bindir}/userdbctl
801 %{_sbindir}/halt
802 %{_sbindir}/init
803 %{_sbindir}/poweroff
804 %{_sbindir}/reboot
805 #{_sbindir}/resolvconf
806 %{_sbindir}/runlevel
807 %{_sbindir}/shutdown
808 %{_sbindir}/telinit
809 %{_sbindir}/udevadm
810 %{_prefix}/lib/systemd/systemd*
811 %{_prefix}/lib/systemd/libsystemd-shared-%{systemd_branch}.so
812 %{_prefix}/lib/systemd/system-generators/systemd-*
813 %{_prefix}/lib/systemd/user-generators/systemd-*
814 %{_prefix}/lib/udev
815 %{_libdir}/security/pam_systemd.so
816 %{_bindir}/systemctl
817 %{_bindir}/systemd-analyze
818 %{_bindir}/systemd-cat
819 %{_bindir}/systemd-cgls
820 %{_bindir}/systemd-cgtop
821 %{_bindir}/systemd-delta
822 %{_bindir}/systemd-detect-virt
823 %{_bindir}/systemd-nspawn
824 %{_bindir}/systemd-repart
825 %{_bindir}/systemd-socket-activate
826 %{_bindir}/systemd-stdio-bridge
827 %{_bindir}/udevadm
828 %dir %{_datadir}/systemd
829 %{_datadir}/systemd/kbd-model-map
830 %{_datadir}/systemd/language-fallback-map
831 %dir %{_datadir}/systemd/gatewayd
832 %{_datadir}/systemd/gatewayd/browse.html
833 %{_datadir}/dbus-1/system-services/org.freedesktop.oom1.service
834 %{_datadir}/dbus-1/system.d/org.freedesktop.oom1.conf
835 %{_mandir}/man1/bootctl.*
836 %{_mandir}/man1/busctl.*
837 %{_mandir}/man1/coredumpctl.*
838 %{_mandir}/man1/hostnamectl.*
839 %{_mandir}/man1/init.*
840 %{_mandir}/man1/journalctl.*
841 %{_mandir}/man1/localectl.*
842 %{_mandir}/man1/loginctl.*
843 %{_mandir}/man1/machinectl.*
844 %{_mandir}/man1/networkctl.*
845 %{_mandir}/man1/portablectl.*
846 %{_mandir}/man1/resolvconf.*
847 %{_mandir}/man1/resolvectl.*
848 %{_mandir}/man1/systemctl.*
849 %{_mandir}/man1/systemd.*
850 %{_mandir}/man1/systemd-*
851 %{_mandir}/man1/timedatectl.*
852 %{_mandir}/man1/userdbctl.1.*
853 %{_mandir}/man1/oomctl.1.*
854 %{_mandir}/man3/*
855 %{_mandir}/man5/*
856 %{_mandir}/man7/*
857 %{_mandir}/man8/30-systemd-environment-d-generator.8.*
858 %{_mandir}/man8/halt.*
859 %{_mandir}/man8/kernel-install.*
860 %{_mandir}/man8/shutdown.*
861 %{_mandir}/man8/pam_systemd.*
862 %{_mandir}/man8/poweroff.*
863 %{_mandir}/man8/rc-local.service.*
864 %{_mandir}/man8/reboot.*
865 %{_mandir}/man8/runlevel.*
866 %{_mandir}/man8/systemd-*
867 %{_mandir}/man8/telinit.*
868 %{_mandir}/man8/udevadm.*
869 %{_sysconfdir}/rc.d/init.d/README
870 %{_sysconfdir}/systemd/oomd.conf
871 %{_logdir}/README
872 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
873 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
874 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
875 %{_datadir}/dbus-1/system-services/org.freedesktop.import1.service
876 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
877 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
878 %{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
879 %{_datadir}/dbus-1/system-services/org.freedesktop.network1.service
880 %{_datadir}/dbus-1/system-services/org.freedesktop.portable1.service
881 %{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service
882 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
883 %{_datadir}/dbus-1/system-services/org.freedesktop.timesync1.service
884 %dir %{_datadir}/factory
885 %dir %{_datadir}/factory/etc
886 %{_datadir}/factory/etc/issue
887 %{_datadir}/factory/etc/nsswitch.conf
888 %dir %{_datadir}/factory/etc/pam.d
889 %{_datadir}/factory/etc/pam.d/other
890 %{_datadir}/factory/etc/pam.d/system-auth
891 %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
892 %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy
893 %{_datadir}/polkit-1/actions/org.freedesktop.import1.policy
894 %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
895 %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
896 %{_datadir}/polkit-1/actions/org.freedesktop.machine1.policy
897 %{_datadir}/polkit-1/actions/org.freedesktop.network1.policy
898 %{_datadir}/polkit-1/actions/org.freedesktop.portable1.policy
899 %{_datadir}/polkit-1/actions/org.freedesktop.resolve1.policy
900 %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
901 %{_datadir}/polkit-1/rules.d/systemd-networkd.rules
902 %{_docdir}/systemd
903 %{_prefix}/lib/systemd/catalog/systemd.catalog
904 # For RPM packages to utilize standard systemd runtime macros
905 %{_prefix}/lib/rpm/macros.d/macros.systemd
906 %lang(be) %{_prefix}/lib/systemd/catalog/systemd.be.catalog
907 %lang(be@latin) %{_prefix}/lib/systemd/catalog/systemd.be@latin.catalog
908 %lang(bg) %{_prefix}/lib/systemd/catalog/systemd.bg.catalog
909 %lang(de) %{_prefix}/lib/systemd/catalog/systemd.de.catalog
910 %lang(fr) %{_prefix}/lib/systemd/catalog/systemd.fr.catalog
911 %lang(it) %{_prefix}/lib/systemd/catalog/systemd.it.catalog
912 %lang(pl) %{_prefix}/lib/systemd/catalog/systemd.pl.catalog
913 %lang(pt_BR) %{_prefix}/lib/systemd/catalog/systemd.pt_BR.catalog
914 %lang(ru) %{_prefix}/lib/systemd/catalog/systemd.ru.catalog
915 %lang(zh_CN) %{_prefix}/lib/systemd/catalog/systemd.zh_CN.catalog
916 %lang(zh_TW) %{_prefix}/lib/systemd/catalog/systemd.zh_TW.catalog
917 %attr(02755,root,systemd-journal) %dir %{_logdir}/journal
918
919 %if %{with homed}
920 %files homed
921 %{_bindir}/homectl
922 %{_libdir}/security/pam_systemd_home.so
923 %{_datadir}/dbus-1/system-services/org.freedesktop.home1.service
924 %{_datadir}/dbus-1/system.d/org.freedesktop.home1.conf
925 %{_datadir}/polkit-1/actions/org.freedesktop.home1.policy
926 %{_mandir}/man1/homectl.1.*
927 %{_mandir}/man8/pam_systemd_home.8.*
928 %config(noreplace) %{_sysconfdir}/systemd/homed.conf
929 %endif
930
931 %files devel
932 %{_includedir}/systemd
933 %{_libdir}/libsystemd*.so
934 %{_libdir}/pkgconfig/libsystemd*.pc
935 # For allowing applications to find systemd runtime paths
936 %{_datadir}/pkgconfig/systemd.pc
937
938 %files tests
939 %{_prefix}/lib/systemd/tests/
940
941 %files -n nss-myhostname
942 %{_mandir}/man8/nss-myhostname.*
943 %{_mandir}/man8/libnss_myhostname.so.2.*
944 %{_libdir}/libnss_myhostname.so.2
945 # (cg) Yes, this is a hack for now, I'll likely rename the package to just lib[64]systemd-nss2 or something...
946 %{_mandir}/man8/nss-mymachines.*
947 %{_mandir}/man8/libnss_mymachines.so.2.*
948 %{_libdir}/libnss_mymachines.so.2
949 %{_mandir}/man8/nss-resolve.*
950 %{_mandir}/man8/libnss_resolve.so.2.*
951 %{_libdir}/libnss_resolve.so.2
952 %{_mandir}/man8/nss-systemd.8.*
953 %{_mandir}/man8/libnss_systemd.so.2.*
954 %{_libdir}/libnss_systemd.so.2
955
956 %files -n %{libname}
957 %{_libdir}/libsystemd.so.%{libsystemd_major}{,.*}
958
959 %files -n %{libudev}
960 %{_libdir}/libudev.so.%{libudev_major}{,.*}
961
962 %files -n %{libudev_devel}
963 %{_libdir}/libudev.so
964 %{_includedir}/libudev.h
965 %{_datadir}/pkgconfig/udev.pc
966 %{_libdir}/pkgconfig/libudev.pc

  ViewVC Help
Powered by ViewVC 1.1.30