Change-Id: Iac717c214874c573261d13f3f754510e031bf1b3
Reviewed-on: http://photon-jenkins.eng.vmware.com/807
Reviewed-by: Priyesh Padmavilasom <ppadmavilasom@vmware.com>
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: Sharath George
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Advanced Trivial File Transfer Protocol (ATFTP) - TFTP server |
2 | 2 |
Name: atftp |
3 | 3 |
Version: 0.7.1 |
4 |
-Release: 3%{?dist} |
|
4 |
+Release: 4%{?dist} |
|
5 | 5 |
URL: http://sourceforge.net/projects/atftp |
6 | 6 |
License: GPLv2+ and GPLv3+ and LGPLv2+ |
7 | 7 |
Group: System Environment/Daemons |
... | ... |
@@ -84,25 +84,25 @@ ATFTPD_BIND_ADDRESSES= |
84 | 84 |
EOF |
85 | 85 |
|
86 | 86 |
%pre |
87 |
-getent group tftp >/dev/null || groupadd -r tftp |
|
88 |
-getent passwd tftp >/dev/null || useradd -c "tftp" -s /bin/false -g tftp -M -r tftp |
|
89 |
- |
|
87 |
+if [ $1 -eq 1 ] ; then |
|
88 |
+ getent group tftp >/dev/null || groupadd -r tftp |
|
89 |
+ getent passwd tftp >/dev/null || useradd -c "tftp" -s /bin/false -g tftp -M -r tftp |
|
90 |
+fi |
|
90 | 91 |
%preun |
91 |
-/bin/systemctl disable atftpd.socket |
|
92 |
- |
|
93 |
- |
|
92 |
+%systemd_preun atftpd.socket |
|
94 | 93 |
%post |
95 |
-/bin/systemctl enable atftpd.socket |
|
96 |
- |
|
94 |
+/sbin/ldconfig |
|
95 |
+%systemd_post atftpd.socket |
|
97 | 96 |
%postun |
98 | 97 |
/sbin/ldconfig |
99 |
-if getent passwd tftp >/dev/null; then |
|
100 |
- userdel tftp |
|
98 |
+if [ $1 -eq 0 ] ; then |
|
99 |
+ if getent passwd tftp >/dev/null; then |
|
100 |
+ userdel tftp |
|
101 |
+ fi |
|
102 |
+ if getent group tftp >/dev/null; then |
|
103 |
+ groupdel tftp |
|
104 |
+ fi |
|
101 | 105 |
fi |
102 |
-if getent group tftp >/dev/null; then |
|
103 |
- groupdel tftp |
|
104 |
-fi |
|
105 |
- |
|
106 | 106 |
%clean |
107 | 107 |
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf $RPM_BUILD_ROOT |
108 | 108 |
|
... | ... |
@@ -124,6 +124,8 @@ fi |
124 | 124 |
|
125 | 125 |
|
126 | 126 |
%changelog |
127 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 0.7.1-4 |
|
128 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
127 | 129 |
* Thu Dec 10 2015 Xiaolin Li <xiaolinl@vmware.com> 0.7.1-3 |
128 | 130 |
- Add systemd to Requires and BuildRequires. |
129 | 131 |
- Use systemctl to enable/disable service. |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Kernel Audit Tool |
2 | 2 |
Name: audit |
3 | 3 |
Version: 2.5 |
4 |
-Release: 1%{?dist} |
|
4 |
+Release: 2%{?dist} |
|
5 | 5 |
Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz |
6 | 6 |
%define sha1 audit=b684a8dca31776a4184044733cd5fd4b1b652298 |
7 | 7 |
License: GPLv2+ |
... | ... |
@@ -68,13 +68,14 @@ make install DESTDIR=%{buildroot} |
68 | 68 |
|
69 | 69 |
%post |
70 | 70 |
/sbin/ldconfig |
71 |
-/bin/systemctl enable auditd.service |
|
72 |
- |
|
73 |
-%preun |
|
74 |
-/bin/systemctl disable auditd.service |
|
71 |
+%systemd_post auditd.service |
|
75 | 72 |
|
76 | 73 |
%postun |
77 | 74 |
/sbin/ldconfig |
75 |
+%systemd_postun auditd.service |
|
76 |
+ |
|
77 |
+%preun |
|
78 |
+%systemd_preun auditd.service |
|
78 | 79 |
|
79 | 80 |
%files |
80 | 81 |
%defattr(-,root,root) |
... | ... |
@@ -117,6 +118,8 @@ make install DESTDIR=%{buildroot} |
117 | 117 |
%{_includedir}/*.h |
118 | 118 |
|
119 | 119 |
%changelog |
120 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 2.5-2 |
|
121 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
120 | 122 |
* Tue Feb 23 2016 Anish Swaminathan <anishs@vmware.com> 2.5-1 |
121 | 123 |
- Upgrade to 2.5 |
122 | 124 |
* Fri Jan 29 2016 Anish Swaminathan <anishs@vmware.com> 2.4.4-4 |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Bourne-Again SHell |
2 | 2 |
Name: bash |
3 | 3 |
Version: 4.3.30 |
4 |
-Release: 2%{?dist} |
|
4 |
+Release: 3%{?dist} |
|
5 | 5 |
License: GPLv3 |
6 | 6 |
URL: http://www.gnu.org/software/bash/ |
7 | 7 |
Group: System Environment/Base |
... | ... |
@@ -221,15 +221,17 @@ dircolors -p > %{buildroot}/etc/dircolors |
221 | 221 |
rm -rf %{buildroot}/%{_infodir} |
222 | 222 |
|
223 | 223 |
%post |
224 |
-test -e /root/.bash_profile || cp /etc/skel/.bash_profile /root |
|
225 |
-test -e /root/.bashrc || cp /etc/skel/.bashrc /root |
|
226 |
-test -e /root/.bash_logout || cp /etc/skel/.bash_logout /root |
|
227 |
- |
|
224 |
+if [ $1 -eq 1 ] ; then |
|
225 |
+ if [ ! -f "/root/.bash_logout" ] ; then |
|
226 |
+ cp /etc/skel/.bash_logout /root/.bash_logout |
|
227 |
+ fi |
|
228 |
+fi |
|
228 | 229 |
%postun |
229 |
-rm -f /root/.bashrc |
|
230 |
-rm -f /root/.bash_profile |
|
231 |
-rm -f /root/.bash_logout |
|
232 |
- |
|
230 |
+if [ $1 -eq 0 ] ; then |
|
231 |
+ if [ -f "/root/.bash_logout" ] ; then |
|
232 |
+ rm -f /root/.bash_logout |
|
233 |
+ fi |
|
234 |
+fi |
|
233 | 235 |
%files |
234 | 236 |
%defattr(-,root,root) |
235 | 237 |
/bin/* |
... | ... |
@@ -242,13 +244,15 @@ rm -f /root/.bash_logout |
242 | 242 |
%defattr(-,root,root) |
243 | 243 |
|
244 | 244 |
%changelog |
245 |
-* Thu Mar 10 2016 Divya Thaluru <dthaluru@vmware.com> 4.3.30-2 |
|
246 |
-- Adding compile options to load bash.bashrc file and |
|
247 |
- loading source file during non-inetractive non-login shell |
|
248 |
-* Tue Jan 12 2016 Xiaolin Li <xiaolinl@vmware.com> 4.3.30-1 |
|
249 |
-- Updated to version 4.3.30 |
|
250 |
-* Wed Aug 05 2015 Kumar Kaushik <kaushikk@vmware.com> 4.3-4 |
|
251 |
-- Adding post unstall section. |
|
245 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 4.3.30-3 |
|
246 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
247 |
+* Thu Mar 10 2016 Divya Thaluru <dthaluru@vmware.com> 4.3.30-2 |
|
248 |
+- Adding compile options to load bash.bashrc file and |
|
249 |
+ loading source file during non-inetractive non-login shell |
|
250 |
+* Tue Jan 12 2016 Xiaolin Li <xiaolinl@vmware.com> 4.3.30-1 |
|
251 |
+- Updated to version 4.3.30 |
|
252 |
+* Wed Aug 05 2015 Kumar Kaushik <kaushikk@vmware.com> 4.3-4 |
|
253 |
+- Adding post unstall section. |
|
252 | 254 |
* Wed Jul 22 2015 Alexey Makhalov <amakhalov@vmware.com> 4.3-3 |
253 | 255 |
- Fix segfault in save_bash_input. |
254 | 256 |
* Tue Jun 30 2015 Alexey Makhalov <amakhalov@vmware.com> 4.3-2 |
... | ... |
@@ -1,6 +1,6 @@ |
1 | 1 |
Name: cloud-init |
2 | 2 |
Version: 0.7.6 |
3 |
-Release: 7%{?dist} |
|
3 |
+Release: 8%{?dist} |
|
4 | 4 |
Summary: Cloud instance init scripts |
5 | 5 |
Group: System Environment/Base |
6 | 6 |
License: GPLv3 |
... | ... |
@@ -60,30 +60,23 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/cloud/cloud.cfg |
60 | 60 |
%clean |
61 | 61 |
rm -rf $RPM_BUILD_ROOT |
62 | 62 |
|
63 |
- |
|
64 | 63 |
%post |
65 |
-if [ $1 -eq 1 ] ; then |
|
66 |
- # Initial installation |
|
67 |
- # Enabled by default per "runs once then goes away" exception |
|
68 |
- /bin/systemctl enable cloud-config.service >/dev/null 2>&1 || : |
|
69 |
- /bin/systemctl enable cloud-final.service >/dev/null 2>&1 || : |
|
70 |
- /bin/systemctl enable cloud-init.service >/dev/null 2>&1 || : |
|
71 |
- /bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || : |
|
72 |
-fi |
|
64 |
+%systemd_post cloud-config.service |
|
65 |
+%systemd_post cloud-final.service |
|
66 |
+%systemd_post cloud-init.service |
|
67 |
+%systemd_post cloud-init-local.service |
|
73 | 68 |
|
74 | 69 |
%preun |
75 |
-if [ $1 -eq 0 ] ; then |
|
76 |
- # Package removal, not upgrade |
|
77 |
- /bin/systemctl --no-reload disable cloud-config.service >/dev/null 2>&1 || : |
|
78 |
- /bin/systemctl --no-reload disable cloud-final.service >/dev/null 2>&1 || : |
|
79 |
- /bin/systemctl --no-reload disable cloud-init.service >/dev/null 2>&1 || : |
|
80 |
- /bin/systemctl --no-reload disable cloud-init-local.service >/dev/null 2>&1 || : |
|
81 |
- # One-shot services -> no need to stop |
|
82 |
-fi |
|
70 |
+%systemd_preun cloud-config.service |
|
71 |
+%systemd_preun cloud-final.service |
|
72 |
+%systemd_preun cloud-init.service |
|
73 |
+%systemd_preun cloud-init-local.service |
|
83 | 74 |
|
84 | 75 |
%postun |
85 |
-/bin/systemctl daemon-reload >/dev/null 2>&1 || : |
|
86 |
-# One-shot services -> no need to restart |
|
76 |
+%systemd_postun cloud-config.service |
|
77 |
+%systemd_postun cloud-final.service |
|
78 |
+%systemd_postun cloud-init.service |
|
79 |
+%systemd_postun cloud-init-local.service |
|
87 | 80 |
|
88 | 81 |
%files |
89 | 82 |
%license LICENSE |
... | ... |
@@ -97,6 +90,8 @@ fi |
97 | 97 |
|
98 | 98 |
|
99 | 99 |
%changelog |
100 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 0.7.6-8 |
|
101 |
+- Clean up post, preun, postun sections in spec file. |
|
100 | 102 |
* Thu Dec 10 2015 Xiaolin Li <xiaolinl@vmware.com> |
101 | 103 |
- Add systemd to Requires and BuildRequires. |
102 | 104 |
* Thu Sep 17 2015 Kumar Kaushik <kaushikk@vmware.com> |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Cron Daemon |
2 | 2 |
Name: cronie |
3 | 3 |
Version: 1.5.0 |
4 |
-Release: 7%{?dist} |
|
4 |
+Release: 8%{?dist} |
|
5 | 5 |
License: GPLv2+ and MIT and BSD and ISC |
6 | 6 |
URL: https://fedorahosted.org/cronie |
7 | 7 |
Source0: https://fedorahosted.org/releases/c/r/cronie/%{name}-%{version}.tar.gz |
... | ... |
@@ -63,16 +63,20 @@ install -m 644 contrib/cronie.systemd %{buildroot}%{_libdir}/systemd/system/cron |
63 | 63 |
install -c -m755 %{SOURCE1} %{buildroot}/%{_bindir}/run-parts |
64 | 64 |
|
65 | 65 |
ln -sfv ./crond.service %{buildroot}/usr/lib/systemd/system/cron.service |
66 |
+ |
|
66 | 67 |
%check |
67 | 68 |
make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
68 |
-%preun |
|
69 |
-/bin/systemctl disable crond.service |
|
70 | 69 |
|
71 | 70 |
%post |
72 | 71 |
/sbin/ldconfig |
73 |
-/bin/systemctl enable crond.service |
|
72 |
+%systemd_post crond.service |
|
74 | 73 |
|
75 |
-%postun -p /sbin/ldconfig |
|
74 |
+%postun |
|
75 |
+/sbin/ldconfig |
|
76 |
+%systemd_postun crond.service |
|
77 |
+ |
|
78 |
+%preun |
|
79 |
+%systemd_preun crond.service |
|
76 | 80 |
|
77 | 81 |
%files |
78 | 82 |
%defattr(-,root,root) |
... | ... |
@@ -100,6 +104,8 @@ make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
100 | 100 |
/var/spool/anacron/cron.monthly |
101 | 101 |
/var/spool/anacron/cron.weekly |
102 | 102 |
%changelog |
103 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 1.5.0-8 |
|
104 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
103 | 105 |
* Thu Mar 24 2016 Xiaolin Li <xiaolinl@vmware.com> 1.5.0-7 |
104 | 106 |
- Add run-parts command. |
105 | 107 |
* Fri Mar 04 2016 Anish Swaminathan <anishs@vmware.com> 1.5.0-6 |
... | ... |
@@ -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: 5%{?dist} |
|
4 |
+Release: 6%{?dist} |
|
5 | 5 |
License: Custom |
6 | 6 |
URL: http://cyrusimap.web.cmu.edu/ |
7 | 7 |
Group: System Environment/Security |
... | ... |
@@ -102,14 +102,14 @@ EOF |
102 | 102 |
make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
103 | 103 |
%post |
104 | 104 |
%{_sbindir}/ldconfig |
105 |
-if [ $1 -eq 1 ] ; then |
|
106 |
- # Initial installation |
|
107 |
- # Enabled by default per "runs once then goes away" exception |
|
108 |
- /bin/systemctl preset saslauthd.service >/dev/null 2>&1 || : |
|
109 |
-fi |
|
110 |
-%postun -p /sbin/ldconfig |
|
105 |
+%systemd_post saslauthd.service |
|
106 |
+ |
|
107 |
+%postun |
|
108 |
+/sbin/ldconfig |
|
109 |
+%systemd_postun saslauthd.service |
|
110 |
+ |
|
111 | 111 |
%preun |
112 |
-/bin/systemctl disable saslauthd.service |
|
112 |
+%systemd_preun saslauthd.service |
|
113 | 113 |
|
114 | 114 |
%clean |
115 | 115 |
rm -rf %{buildroot}/* |
... | ... |
@@ -126,6 +126,8 @@ rm -rf %{buildroot}/* |
126 | 126 |
%{_datadir}/licenses/%{name}/LICENSE |
127 | 127 |
%{_mandir}/man8/saslauthd.8.gz |
128 | 128 |
%changelog |
129 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 2.1.26-6 |
|
130 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
129 | 131 |
* Thu Dec 10 2015 Xiaolin Li <xiaolinl@vmware.com> 2.1.26-5 |
130 | 132 |
- Add systemd to Requires and BuildRequires. |
131 | 133 |
* Wed Nov 11 2015 Xiaolin Li <xiaolinl@vmware.com> 2.1.26-4 |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Docbook-xml-4.5 |
2 | 2 |
Name: docbook-xml |
3 | 3 |
Version: 4.5 |
4 |
-Release: 4%{?dist} |
|
4 |
+Release: 5%{?dist} |
|
5 | 5 |
License: MIT |
6 | 6 |
URL: http://www.docbook.org |
7 | 7 |
Source0: http://www.docbook.org/xml/4.5/%{name}-%{version}.zip |
... | ... |
@@ -126,14 +126,44 @@ do |
126 | 126 |
"file:///etc/xml/docbook" \ |
127 | 127 |
/etc/xml/catalog |
128 | 128 |
done |
129 |
-%postun |
|
130 |
-rm /etc/xml/catalog |
|
131 |
-rm /etc/xml/docbook |
|
129 |
+ |
|
130 |
+%preun |
|
131 |
+if [ $1 -eq 0 ] ; then |
|
132 |
+ if [ -f /etc/xml/catalog ]; then |
|
133 |
+ xmlcatalog --noout --del \ |
|
134 |
+ "file:///etc/xml/docbook" /etc/xml/catalog |
|
135 |
+ fi |
|
136 |
+ if [ -f /etc/xml/docbook ]; then |
|
137 |
+ xmlcatalog --noout --del \ |
|
138 |
+ "file:///usr/share/xml/docbook/docbook-xml-4.5" /etc/xml/docbook |
|
139 |
+ |
|
140 |
+ for DTDVERSION in 4.1.2 4.2 4.3 4.4 %{version} |
|
141 |
+ do |
|
142 |
+ xmlcatalog --noout --del \ |
|
143 |
+ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" /etc/xml/docbook |
|
144 |
+ done |
|
145 |
+ |
|
146 |
+ for file in `find /usr/share/xml/docbook/%{name}-%{version}/*.dtd -printf "%f\n"` |
|
147 |
+ do |
|
148 |
+ xmlcatalog --noout --del \ |
|
149 |
+ "file:///usr/share/xml/docbook/docbook-xml-4.5/$file" /etc/xml/docbook |
|
150 |
+ done |
|
151 |
+ |
|
152 |
+ for file in `find /usr/share/xml/docbook/%{name}-%{version}/*.mod -printf "%f\n"` |
|
153 |
+ do |
|
154 |
+ xmlcatalog --noout --del \ |
|
155 |
+ "file:///usr/share/xml/docbook/docbook-xml-4.5/$file" /etc/xml/docbook |
|
156 |
+ done |
|
157 |
+ fi |
|
158 |
+fi |
|
159 |
+ |
|
132 | 160 |
%files |
133 | 161 |
%defattr(-,root,root) |
134 | 162 |
/usr/share/xml/docbook/%{name}-%{version} |
135 | 163 |
/etc/xml |
136 | 164 |
%changelog |
165 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 4.5-5 |
|
166 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
137 | 167 |
* Thu Mar 10 2016 XIaolin Li <xiaolinl@vmware.com> 4.5.1-4 |
138 | 168 |
- Correct the local folder name. |
139 | 169 |
* Mon Jul 6 2015 Mahmoud Bassiouny <mbassiouny@vmware.com> 4.5.1-3 |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Docbook-xsl-1.79.1 |
2 | 2 |
Name: docbook-xsl |
3 | 3 |
Version: 1.79.1 |
4 |
-Release: 1%{?dist} |
|
4 |
+Release: 2%{?dist} |
|
5 | 5 |
License: Apache License |
6 | 6 |
URL: http://www.docbook.org |
7 | 7 |
Source0: http://downloads.sourceforge.net/docbook/%{name}-%{version}.tar.bz2 |
... | ... |
@@ -65,14 +65,20 @@ xmlcatalog --noout --add "rewriteURI" \ |
65 | 65 |
"/usr/share/xml/docbook/xsl-stylesheets-1.79.1" \ |
66 | 66 |
/etc/xml/catalog |
67 | 67 |
%postun |
68 |
-rm -rf /etc/xml/catalog |
|
69 |
- |
|
68 |
+if [ $1 -eq 0 ] ; then |
|
69 |
+ if [ -f /etc/xml/catalog ]; then |
|
70 |
+ xmlcatalog --noout --del \ |
|
71 |
+ "/usr/share/xml/docbook/xsl-stylesheets-1.79.1" /etc/xml/catalog |
|
72 |
+ fi |
|
73 |
+fi |
|
70 | 74 |
%files |
71 | 75 |
%defattr(-,root,root) |
72 | 76 |
/usr/share/xml/docbook/* |
73 | 77 |
%{_docdir}/* |
74 | 78 |
|
75 | 79 |
%changelog |
80 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 1.79.1-2 |
|
81 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
76 | 82 |
* Thu Feb 25 2016 Kumar Kaushik <kaushikk@vmware.com> 1.79.1-1 |
77 | 83 |
- Updated version. |
78 | 84 |
* Wed May 20 2015 Touseef Liaqat <tliaqat@vmware.com> 1.78.1-2 |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Docker |
2 | 2 |
Name: docker |
3 | 3 |
Version: 1.11.0 |
4 |
-Release: 2%{?dist} |
|
4 |
+Release: 3%{?dist} |
|
5 | 5 |
License: ASL 2.0 |
6 | 6 |
URL: http://docs.docker.com |
7 | 7 |
Group: Applications/File |
... | ... |
@@ -30,13 +30,13 @@ cp %{SOURCE2} %{buildroot}/lib/systemd/system/docker-containerd.service |
30 | 30 |
%check |
31 | 31 |
make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
32 | 32 |
%preun |
33 |
-/bin/systemctl disable docker.service |
|
34 |
-/bin/systemctl disable docker-containerd.service |
|
33 |
+%systemd_preun docker.service |
|
34 |
+%systemd_preun docker-containerd.service |
|
35 | 35 |
|
36 | 36 |
%post |
37 | 37 |
/sbin/ldconfig |
38 |
-#/bin/systemctl enable docker-containerd.service |
|
39 |
-#/bin/systemctl enable docker.service |
|
38 |
+#%systemd_post docker-containerd.service |
|
39 |
+#%systemd_post docker.service |
|
40 | 40 |
|
41 | 41 |
%postun -p /sbin/ldconfig |
42 | 42 |
|
... | ... |
@@ -50,6 +50,8 @@ rm -rf %{buildroot}/* |
50 | 50 |
/lib/systemd/system/docker-containerd.service |
51 | 51 |
|
52 | 52 |
%changelog |
53 |
+* Tue May 3 2016 Divya Thaluru <dthaluru@vmware.com> 1.11.0-3 |
|
54 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
53 | 55 |
* Sat Apr 30 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.11.0-2 |
54 | 56 |
- Add $DOCKER_OPTS to start in docker.service |
55 | 57 |
* Fri Apr 15 2016 Anish Swaminathan <anishs@vmware.com> 1.11.0-1 |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Highly reliable distributed coordination |
2 | 2 |
Name: zookeeper |
3 | 3 |
Version: 3.4.8 |
4 |
-Release: 2%{?dist} |
|
4 |
+Release: 3%{?dist} |
|
5 | 5 |
URL: http://zookeeper.apache.org/ |
6 | 6 |
License: Apache License, Version 2.0 |
7 | 7 |
Group: Applications/System |
... | ... |
@@ -59,21 +59,22 @@ getent group hadoop >/dev/null || /usr/sbin/groupadd -r hadoop |
59 | 59 |
getent passwd zookeeper >/dev/null || /usr/sbin/useradd --comment "ZooKeeper" --shell /bin/bash -M -r --groups hadoop --home %{_prefix}/share/zookeeper zookeeper |
60 | 60 |
|
61 | 61 |
%post |
62 |
-source %{_sysconfdir}/profile.d/java-exports.sh |
|
63 |
-bash %{_prefix}/sbin/update-zookeeper-env.sh \ |
|
62 |
+if [ $1 -eq 1 ] ; then |
|
63 |
+ # Initial installation |
|
64 |
+ # Enabled by default per "runs once then goes away" exception |
|
65 |
+ source %{_sysconfdir}/profile.d/java-exports.sh |
|
66 |
+ bash %{_prefix}/sbin/update-zookeeper-env.sh \ |
|
64 | 67 |
--prefix=%{_prefix} \ |
65 | 68 |
--conf-dir=%{_sysconfdir}/zookeeper \ |
66 | 69 |
--log-dir=%{_var}/log/zookeeper \ |
67 | 70 |
--pid-dir=%{_var}/run/zookeeper \ |
68 | 71 |
--var-dir=%{_var}/zookeeper |
69 |
-%{_sbindir}/ldconfig |
|
70 |
-if [ $1 -eq 1 ] ; then |
|
71 |
- # Initial installation |
|
72 |
- # Enabled by default per "runs once then goes away" exception |
|
73 |
- /bin/systemctl enable zookeeper.service || : |
|
74 | 72 |
fi |
75 |
- |
|
73 |
+%{_sbindir}/ldconfig |
|
74 |
+%systemd_post zookeeper.service |
|
75 |
+ |
|
76 | 76 |
%preun |
77 |
+if [ $1 -eq 0 ] ; then |
|
77 | 78 |
source %{_sysconfdir}/profile.d/java-exports.sh |
78 | 79 |
bash %{_prefix}/sbin/update-zookeeper-env.sh \ |
79 | 80 |
--prefix=%{_prefix} \ |
... | ... |
@@ -82,10 +83,15 @@ bash %{_prefix}/sbin/update-zookeeper-env.sh \ |
82 | 82 |
--pid-dir=%{_var}/run/zookeeper \ |
83 | 83 |
--var-dir=%{_var}/zookeeper \ |
84 | 84 |
--uninstall |
85 |
-/bin/systemctl disable zookeeper.service |
|
85 |
+fi |
|
86 |
+%systemd_preun zookeeper.service |
|
86 | 87 |
|
87 | 88 |
%postun |
88 |
-/usr/sbin/userdel zookeeper |
|
89 |
+%systemd_postun zookeeper.service |
|
90 |
+if [ $1 -eq 0 ] ; then |
|
91 |
+ /usr/sbin/userdel zookeeper |
|
92 |
+ /usr/sbin/groupdel hadoop |
|
93 |
+fi |
|
89 | 94 |
/sbin/ldconfig |
90 | 95 |
|
91 | 96 |
%files |
... | ... |
@@ -98,6 +104,8 @@ bash %{_prefix}/sbin/update-zookeeper-env.sh \ |
98 | 98 |
%{_prefix} |
99 | 99 |
|
100 | 100 |
%changelog |
101 |
+* Mon May 2 2016 Divya Thaluru <dthaluru@vmware.com> 3.4.8-3 |
|
102 |
+- Fixing spec file to handle rpm upgrade scenario correctly |
|
101 | 103 |
* Thu Apr 28 2016 Divya Thaluru <dthaluru@vmware.com> 3.4.8-2 |
102 | 104 |
- Added logic to set classpath |
103 | 105 |
* Wed Feb 24 2016 Kumar Kaushik <kaushikk@vmware.com> 3.4.8-1 |