-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_append
92 lines (75 loc) · 4.34 KB
/
install_append
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!rpm
# All users should be defined in the systemd-config package
rm -f %{buildroot}/usr/lib/sysusers.d/basic.conf
rm -f %{buildroot}/usr/lib/sysusers.d/systemd.conf
rm -f %{buildroot}/usr/lib/sysusers.d/systemd-remote.conf
rm -f %{buildroot}/usr/lib/sysusers.d/systemd-coredump.conf
rm -f %{buildroot}/usr/lib/sysusers.d/systemd-journal.conf
rm -f %{buildroot}/usr/lib/sysusers.d/systemd-network.conf
rm -f %{buildroot}/usr/lib/sysusers.d/systemd-oom.conf
rm -f %{buildroot}/usr/lib/sysusers.d/systemd-resolve.conf
rm -f %{buildroot}/usr/lib/sysusers.d/systemd-timesync.conf
rm -f %{buildroot}/usr/lib/sysusers.d/README
rmdir %{buildroot}/usr/lib/sysusers.d
# No external linking of this shared object should happen
rm -f %{buildroot}/usr/lib/systemd/libsystemd-shared.so
# These configuration files, are actually documentation only
# We have manpages for that
rm -f %{buildroot}/etc/systemd/journald.conf
rm -f %{buildroot}/etc/systemd/logind.conf
rm -f %{buildroot}/etc/systemd/resolved.conf
rm -f %{buildroot}/etc/systemd/system.conf
rm -f %{buildroot}/etc/systemd/timesyncd.conf
rm -f %{buildroot}/etc/systemd/user.conf
rm -f %{buildroot}/etc/udev/udev.conf
rm -f %{buildroot}/etc/udev/iocost.conf
rmdir %{buildroot}/etc/udev/hwdb.d
rmdir %{buildroot}/etc/udev/rules.d
rmdir %{buildroot}/etc/udev
# These are unwanted and would end up in -autostart, because %exclude isn't
# honored by -autostart auto subrpm
rm -f %{buildroot}/usr/lib/systemd/system/sysinit.target.wants/ldconfig.service
rm -f %{buildroot}/usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service
rm -f %{buildroot}/usr/lib/systemd/system/sysinit.target.wants/systemd-hwdb-update.service
rm -f %{buildroot}/usr/lib/systemd/system/sysinit.target.wants/systemd-journal-catalog-update.service
rm -f %{buildroot}/usr/lib/systemd/system/sysinit.target.wants/systemd-sysusers.service
rm -f %{buildroot}/usr/lib/systemd/system/sysinit.target.wants/systemd-update-done.service
rm -f %{buildroot}/usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
rm -f %{buildroot}/usr/lib/systemd/system/sockets.target.wants/systemd-journald-audit.socket
# Do not ship broken symlinks
rm -f %{buildroot}/etc/xdg/systemd/user
rm -f %{buildroot}/usr/lib/environment.d/99-environment.conf
# Move config file into system PAM location
mv %{buildroot}/usr/lib/pam.d %{buildroot}/usr/share/.
# Move pc files to default pkgconfig dir
mv %{buildroot}/usr/share/pkgconfig/* %{buildroot}/usr/lib64/pkgconfig/
rmdir %{buildroot}/usr/share/pkgconfig/
# exclude hwdb for pci device id vendors - we don't want this in containers
# or VMs. An update trigger will remake the full hwdb for non-vm cases.
mkdir -p %{buildroot}/usr/lib/udev/hwdb.d/20
mv %{buildroot}/usr/lib/udev/hwdb.d/20-* %{buildroot}/usr/lib/udev/hwdb.d/20
# Pre-generate and pre-ship hwdb, to speed up first boot
builddir/udevadm hwdb --root %{buildroot} --update --usr
# restore 20-* hwdb files
mv %{buildroot}/usr/lib/udev/hwdb.d/20/* %{buildroot}/usr/lib/udev/hwdb.d/
rmdir %{buildroot}/usr/lib/udev/hwdb.d/20
# Compute catalog
builddir/journalctl --root %{buildroot} --update-catalog
# Add a hook to integrate telemetrics crashprobe with systemd-coredump
cp src/coredump/coredump-wrapper %{buildroot}/usr/lib/systemd/
# only supported plugin is "clear.install"
rm -rvf %{buildroot}/usr/lib/kernel
# Remove unused systemd plka
rm -rvf %{buildroot}/var/lib/polkit-1
# Services that are OK to restart after software update
mkdir -p %{buildroot}/usr/share/clr-service-restart
ln -sf /usr/lib/systemd/system/systemd-timesyncd.service %{buildroot}/usr/share/clr-service-restart/systemd-timesyncd.service
ln -sf /usr/lib/systemd/system/systemd-resolved.service %{buildroot}/usr/share/clr-service-restart/systemd-resolved.service
ln -sf /usr/lib/systemd/system/systemd-udevd.service %{buildroot}/usr/share/clr-service-restart/systemd-udevd.service
ln -sf /usr/lib/systemd/system/systemd-journald.service %{buildroot}/usr/share/clr-service-restart/systemd-journald.service
# fix systemd-timesyncd v242 - dir expected, was symlink before in /var/state/timesync
mkdir -p %{buildroot}/usr/lib/systemd/system/update-triggers.target.wants
ln -s ../systemd-timesyncd-fix-localstatedir.service %{buildroot}/usr/lib/systemd/system/update-triggers.target.wants/systemd-timesyncd-fix-localstatedir.service
# remove catalog
rm -rvf %{buildroot}/var/lib/systemd
chmod a-x %{buildroot}/usr/share/man/man*/*