Browse code

Disable systemd services by default (PR 1844094) Change-Id: I303cb028dbf1d350964dd04a62bb82f02508d526 Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3120 Reviewed-by: Xiaolin Li <xiaolinl@vmware.com> Tested-by: Divya Thaluru <dthaluru@vmware.com>

dthaluru authored on 2017/06/30 04:18:21
Showing 8 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Kernel Audit Tool
5 5
 Name:           audit
6 6
 Version:        2.7.5
7
-Release:        2%{?dist}
7
+Release:        3%{?dist}
8 8
 Source0:        http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz
9 9
 %define sha1    audit=7aaae7ea80f2280b25f243916e8d18b7338b5f53
10 10
 License:        GPLv2+
... ...
@@ -92,6 +92,9 @@ mkdir -p %{buildroot}/%{_var}/log/audit
92 92
 mkdir -p %{buildroot}/%{_var}/spool/audit
93 93
 make install DESTDIR=%{buildroot}
94 94
 
95
+install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
96
+echo "disable auditd.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-auditd.preset
97
+
95 98
 %check
96 99
 make %{?_smp_mflags} check
97 100
 
... ...
@@ -112,6 +115,7 @@ make %{?_smp_mflags} check
112 112
 %{_sbindir}/*
113 113
 %{_libdir}/*.so.*
114 114
 %{_libdir}/systemd/system/auditd.service
115
+%{_libdir}/systemd/system-preset/50-auditd.preset
115 116
 %{_libexecdir}/*
116 117
 %{_mandir}/man5/*
117 118
 %{_mandir}/man7/*
... ...
@@ -154,6 +158,8 @@ make %{?_smp_mflags} check
154 154
 %{python3_sitelib}/*
155 155
 
156 156
 %changelog
157
+*   Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com>  2.7.5-3
158
+-   Disabled audit service by default
157 159
 *   Thu May 18 2017 Xiaolin Li <xiaolinl@vmware.com> 2.7.5-2
158 160
 -   Move python2 requires to python subpackage and added python3.
159 161
 *   Fri Apr 14 2017 Alexey Makhalov <amakhalov@vmware.com> 2.7.5-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Cyrus Simple Authentication Service Layer (SASL) library
2 2
 Name:           cyrus-sasl
3 3
 Version:        2.1.26
4
-Release:        11%{?dist}
4
+Release:        12%{?dist}
5 5
 License:        Custom
6 6
 URL:            http://cyrusimap.web.cmu.edu/
7 7
 Group:          System Environment/Security
... ...
@@ -98,6 +98,9 @@ RuntimeDirectory=saslauthd
98 98
 WantedBy=multi-user.target
99 99
 EOF
100 100
 
101
+install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
102
+echo "disable saslauthd.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-saslauthd.preset
103
+
101 104
 %check
102 105
 make %{?_smp_mflags} check
103 106
 
... ...
@@ -118,6 +121,7 @@ rm -rf %{buildroot}/*
118 118
 %defattr(-,root,root)
119 119
 /etc/sysconfig/saslauthd
120 120
 /lib/systemd/system/saslauthd.service
121
+%{_libdir}/systemd/system-preset/50-saslauthd.preset
121 122
 %{_includedir}/*
122 123
 %{_libdir}/*.so*
123 124
 %{_libdir}/pkgconfig/*
... ...
@@ -128,6 +132,8 @@ rm -rf %{buildroot}/*
128 128
 %{_mandir}/man8/saslauthd.8.gz
129 129
 
130 130
 %changelog
131
+*   Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com>  2.1.26-12
132
+-   Disabled saslauthd service by default
131 133
 *   Wed Dec 07 2016 Xiaolin Li <xiaolinl@vmware.com> 2.1.26-11
132 134
 -   BuildRequires Linux-PAM-devel
133 135
 *   Thu Nov 24 2016 Alexey Makhalov <amakhalov@vmware.com> 2.1.26-10
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        A filtering tool for a Linux-based bridging firewall.
2 2
 Name:           ebtables
3 3
 Version:        2.0.10
4
-Release:        2%{?dist}
4
+Release:        3%{?dist}
5 5
 License:        GPLv2+
6 6
 URL:            http://ebtables.netfilter.org/
7 7
 Group:          System Environment/Security
... ...
@@ -31,6 +31,9 @@ install -vdm755 %{buildroot}/etc/systemd/scripts
31 31
 install -m 755 %{SOURCE1} %{buildroot}/etc/systemd/scripts/ebtables
32 32
 install -m 644 %{SOURCE2} %{buildroot}/%{_libdir}/systemd/system/ebtables.service
33 33
 
34
+install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
35
+echo "disable ebtables.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-ebtables.preset
36
+
34 37
 %preun
35 38
 %systemd_preun ebtables.service
36 39
 
... ...
@@ -56,12 +59,15 @@ rm -rf %{buildroot}/*
56 56
 %{_libdir}/*.so
57 57
 %config(noreplace) %{_sysconfdir}/sysconfig/ebtables-config
58 58
 %{_libdir}/systemd/system/*
59
+%{_libdir}/systemd/system-preset/50-ebtables.preset
59 60
 %{_sysconfdir}/ethertypes
60 61
 %{_sysconfdir}/systemd/scripts/ebtables
61 62
 %exclude %{_sysconfdir}/rc.d/init.d/ebtables
62 63
 
63 64
 
64 65
 %changelog
66
+*   Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com>  2.0.10-3
67
+-   Disabled ebtables service by default
65 68
 *   Mon May 15 2017 Xiaolin Li <xiaolinl@vmware.com>  2.0.10-2
66 69
 -   Added systemd to Requires and BuildRequires.
67 70
 *   Wed Jan 18 2017 Xiaolin Li <xiaolinl@vmware.com>  2.0.10-1
... ...
@@ -3,7 +3,7 @@
3 3
 Summary:        Userland logical volume management tools 
4 4
 Name:           lvm2
5 5
 Version:        2.02.171
6
-Release:        2%{?dist}
6
+Release:        3%{?dist}
7 7
 License:        GPLv2
8 8
 Group:          System Environment/Base
9 9
 URL:            http://sources.redhat.com/dm
... ...
@@ -224,6 +224,12 @@ make install_systemd_generators DESTDIR=%{buildroot}
224 224
 make install_tmpfiles_configuration DESTDIR=%{buildroot}
225 225
 cp %{SOURCE1} %{buildroot}/lib/systemd/system/lvm2-activate.service
226 226
 
227
+install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
228
+echo "disable lvm2-activate.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-lvm2.preset
229
+echo "disable lvm2-monitor.service" >> %{buildroot}%{_libdir}/systemd/system-preset/50-lvm2.preset
230
+echo "disable lvm2-lvmeatd.socket" >> %{buildroot}%{_libdir}/systemd/system-preset/50-lvm2.preset
231
+echo "disable lvm2-lvmeatd.service" >> %{buildroot}%{_libdir}/systemd/system-preset/50-lvm2.preset
232
+
227 233
 %preun
228 234
 %systemd_preun lvm2-lvmetad.service lvm2-lvmetad.socket lvm2-monitor.service lvm2-activate.service
229 235
 
... ...
@@ -325,6 +331,7 @@ cp %{SOURCE1} %{buildroot}/lib/systemd/system/lvm2-activate.service
325 325
 %{_unitdir}/../system-generators/lvm2-activation-generator
326 326
 %{_unitdir}/blk-availability.service
327 327
 %{_unitdir}/lvm2-*
328
+%{_libdir}/systemd/system-preset/50-lvm2.preset
328 329
 %{_libdir}/tmpfiles.d/lvm2.conf
329 330
 %dir %{_sysconfdir}/lvm
330 331
 %attr(644, -, -) %config(noreplace) %{_sysconfdir}/lvm/lvm.conf
... ...
@@ -335,6 +342,8 @@ cp %{SOURCE1} %{buildroot}/lib/systemd/system/lvm2-activate.service
335 335
 
336 336
 
337 337
 %changelog
338
+*   Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com>  2.02.171-3
339
+-   Disabled all lvm services by default
338 340
 *   Tue May 23 2017 Xiaolin Li <xiaolinl@vmware.com> 2.02.171-2
339 341
 -   Added python3 subpackage.
340 342
 *   Thu May 4  2017 Bo Gan <ganb@vmware.com> 2.02.171-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Network Time Protocol reference implementation
2 2
 Name:           ntp
3 3
 Version:        4.2.8p10
4
-Release:        2%{?dist}
4
+Release:        3%{?dist}
5 5
 License:        NTP
6 6
 URL:            http://www.ntp.org/
7 7
 Group:          System Environment/NetworkingPrograms
... ...
@@ -95,8 +95,13 @@ Restart=always
95 95
 [Install]
96 96
 WantedBy=multi-user.target
97 97
 EOF
98
+
99
+install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
100
+echo "disable ntpd.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-ntpd.preset
101
+
98 102
 %check
99 103
 make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
104
+
100 105
 %pre
101 106
 if ! getent group ntp >/dev/null; then
102 107
     groupadd -g 87 ntp
... ...
@@ -121,6 +126,7 @@ rm -rf %{buildroot}/*
121 121
 %attr(0750, root, root) %config(noreplace) /etc/ntp.conf
122 122
 %attr(0750, root, root) %config(noreplace) /etc/sysconfig/ntp
123 123
 /lib/systemd/system/ntpd.service
124
+%{_libdir}/systemd/system-preset/50-ntpd.preset
124 125
 %exclude %{_bindir}/ntpstat
125 126
 %exclude %{_mandir}/man8/ntpstat.8*
126 127
 %{_bindir}/*
... ...
@@ -138,6 +144,8 @@ rm -rf %{buildroot}/*
138 138
 %{_mandir}/man8/ntpstat.8*
139 139
 
140 140
 %changelog
141
+*   Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com>  4.2.8p10-3
142
+-   Disabled ntpd service by default
141 143
 *   Mon Apr 10 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.2.8p10-2
142 144
 -   add noquery to conf
143 145
 *   Wed Apr 05 2017 Anish Swaminathan <anishs@vmware.com> 4.2.8p10-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        RPC program number mapper
2 2
 Name:           rpcbind
3 3
 Version:        0.2.4
4
-Release:        2%{?dist}
4
+Release:        3%{?dist}
5 5
 License:        BSD
6 6
 URL:            http://nfsv4.bullopensource.org
7 7
 Group:          Applications/Daemons
... ...
@@ -46,6 +46,10 @@ install -m644 %{SOURCE1} %{buildroot}%{_unitdir}
46 46
 install -m644 %{SOURCE2} %{buildroot}%{_unitdir}
47 47
 install -m644 %{SOURCE3} %{buildroot}/etc/sysconfig/rpcbind
48 48
 
49
+install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
50
+echo "disable rpcbind.socket" > %{buildroot}%{_libdir}/systemd/system-preset/50-rpcbind.preset
51
+echo "disable rpcbind.service" >> %{buildroot}%{_libdir}/systemd/system-preset/50-rpcbind.preset
52
+
49 53
 %check
50 54
 make %{?_smp_mflags} check
51 55
 
... ...
@@ -56,6 +60,7 @@ make %{?_smp_mflags} check
56 56
 %{_mandir}/man8/*
57 57
 %dir %{_localstatedir}/lib/rpcbind
58 58
 %{_unitdir}/*
59
+%{_libdir}/systemd/system-preset/50-rpcbind.preset
59 60
 
60 61
 %pre
61 62
 rpcid=`getent passwd rpc | cut -d: -f 3`
... ...
@@ -89,6 +94,8 @@ fi
89 89
 rm -rf %{buildroot}/*
90 90
 
91 91
 %changelog
92
+*   Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com>  0.2.4-3
93
+-   Disabled rpcbind service by default
92 94
 *   Thu May 18 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.2.4-2
93 95
 -   Fix CVE-2017-8779
94 96
 *   Wed Apr 5 2017 Siju Maliakkal <smaliakkal@vmware.com> 0.2.4-1
... ...
@@ -3,7 +3,7 @@
3 3
 Summary:        Next generation system logger facilty
4 4
 Name:           syslog-ng
5 5
 Version:        3.9.1
6
-Release:        2%{?dist}
6
+Release:        3%{?dist}
7 7
 License:        GPL + LGPL
8 8
 URL:            https://syslog-ng.org/
9 9
 Group:          System Environment/Daemons
... ...
@@ -126,6 +126,9 @@ rm -rf %{buildroot}/%{_infodir}
126 126
 find %{buildroot} -name "*.la" -exec rm -f {} \;
127 127
 popd
128 128
 
129
+install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
130
+echo "disable syslog-ng.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-syslog-ng.preset
131
+
129 132
 %check
130 133
 make %{?_smp_mflags} check
131 134
 pushd ../p3dir
... ...
@@ -153,6 +156,7 @@ rm -rf %{buildroot}/*
153 153
 %config(noreplace) %{_sysconfdir}/syslog-ng/scl.conf
154 154
 %{_sysconfdir}/systemd/journald.conf.d/*
155 155
 %{_libdir}/systemd/system/syslog-ng.service
156
+%{_libdir}/systemd/system-preset/50-syslog-ng.preset
156 157
 /usr/bin/*
157 158
 /usr/sbin/syslog-ng
158 159
 /usr/sbin/syslog-ng-ctl
... ...
@@ -176,6 +180,8 @@ rm -rf %{buildroot}/*
176 176
 %{_libdir}/pkgconfig/*
177 177
 
178 178
 %changelog
179
+*   Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com>  3.9.1-3
180
+-   Disabled syslog-ng service by default
179 181
 *   Thu May 18 2017 Xiaolin Li <xiaolinl@vmware.com> 3.9.1-2
180 182
 -   Move python2 requires to python2 subpackage and added python3 binding.
181 183
 *   Tue Apr 11 2017 Vinay Kulkarni <kulkarniv@vmware.com> 3.9.1-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:  	xinetd -- A better inetd.
2 2
 Name:		xinetd
3 3
 Version:	2.3.15
4
-Release:	6%{?dist}
4
+Release:	7%{?dist}
5 5
 License:	BSD
6 6
 Group:		System Environment/Daemons
7 7
 Vendor:     	VMware, Inc.
... ...
@@ -33,7 +33,6 @@ mechanism to protect against port scanners, among other things.
33 33
 %install
34 34
 rm -rf %{buildroot}
35 35
 mkdir -p %{buildroot}/%{_sbindir}
36
-mkdir -p %{buildroot}/etc/rc.d/init.d
37 36
 mkdir -p %{buildroot}/etc/xinetd.d
38 37
 
39 38
 %makeinstall  
... ...
@@ -42,16 +41,15 @@ cp contrib/xinetd.d/* %{buildroot}/etc/xinetd.d
42 42
 mkdir -p %{buildroot}/lib/systemd/system
43 43
 cp %{SOURCE1} %{buildroot}/lib/systemd/system/xinetd.service
44 44
 
45
+install -vdm755 %{buildroot}%{_libdir}/systemd/system-preset
46
+echo "disable xinetd.service" > %{buildroot}%{_libdir}/systemd/system-preset/50-xinetd.preset
47
+
45 48
 %clean
46 49
 rm -rf %{buildroot}
47 50
 
48 51
 %post
49 52
 %{_sbindir}/ldconfig 
50
-if [ $1 -eq 1 ] ; then
51
-    # Initial installation
52
-    # Enabled by default per "runs once then goes away" exception
53
-    /bin/systemctl enable xinetd.service     >/dev/null 2>&1 || :
54
-fi
53
+%systemd_post xinetd.service
55 54
 
56 55
 %preun
57 56
 %systemd_preun xinetd.service
... ...
@@ -67,8 +65,11 @@ fi
67 67
 %attr(0750, root, root) %config(noreplace) /etc/xinetd.conf
68 68
 %attr(0750, root, root) %config(noreplace) /etc/xinetd.d/*
69 69
 /lib/systemd/system/xinetd.service
70
+%{_libdir}/systemd/system-preset/50-xinetd.preset
70 71
 
71 72
 %changelog
73
+*   Thu Jun 29 2017 Divya Thaluru <dthaluru@vmware.com>  2.3.15-7
74
+-   Disabled xinetd service by default
72 75
 *   Thu May 26 2016 Divya Thaluru <dthaluru@vmware.com>  2.3.15-6
73 76
 -   Fixed logic to restart the active services after upgrade 
74 77
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.3.15-5