Browse code

Fix post scripts in some packages

Change-Id: I2add2a1cc0ddb31786d6d6bbc9d8c13680920161
Reviewed-on: http://photon-jenkins.eng.vmware.com/506
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: suezzelur <anishs@vmware.com>

suezzelur authored on 2016/02/05 09:25:18
Showing 3 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Certificate Authority certificates 
2 2
 Name:		ca-certificates
3 3
 Version:	20160109
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	Custom
6 6
 URL:		http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/
7 7
 Group:		System Environment/Security
... ...
@@ -220,7 +220,7 @@ install -Dm644 bin/remove-expired-certs.sh %{buildroot}/bin/remove-expired-certs
220 220
 %{_fixperms} %{buildroot}/*
221 221
 %post 
222 222
 cd /etc/ssl/certs;
223
-for file in *.pem; do ln -s $file `openssl x509 -hash -noout -in $file`.0; done
223
+for file in *.pem; do ln -sf $file `openssl x509 -hash -noout -in $file`.0; done
224 224
 exit 0
225 225
 %clean
226 226
 %files
... ...
@@ -231,6 +231,8 @@ exit 0
231 231
 /bin/remove-expired-certs.sh
232 232
 /bin/make-cert.pl
233 233
 %changelog
234
+*	Mon Feb 03 2016 Anish Swaminathan <anishs@vmware.com> 20160109-3
235
+-	Force create links for certificates
234 236
 *	Mon Feb 01 2016 Anish Swaminathan <anishs@vmware.com> 20160109-2
235 237
 -	Remove c_rehash dependency
236 238
 *       Wed Jan 13 2016 Divya Thaluru <dthaluru@vmware.com> 20160109-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Userland logical volume management tools 
2 2
 Name:		lvm2
3 3
 Version:	2.02.141
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	GPLv2
6 6
 Group:		System Environment/Base
7 7
 URL:		http://sources.redhat.com/dm
... ...
@@ -115,16 +115,20 @@ Summary:	Device-mapper event daemon
115 115
 Group:		System Environment/Base
116 116
 Requires:	device-mapper = %{version}-%{release}
117 117
 Requires:	device-mapper-event-libs = %{version}-%{release}
118
+Requires:       systemd
118 119
 
119 120
 %description -n device-mapper-event
120 121
 This package contains the dmeventd daemon for monitoring the state
121 122
 of device-mapper devices.
122 123
 
123 124
 %post -n device-mapper-event
125
+%systemd_post dm-event.socket
124 126
 systemctl enable dm-event.service
127
+systemctl enable dm-event.socket
128
+systemctl start dm-event.socket
125 129
 
126 130
 %preun -n device-mapper-event
127
-systemctl disable dm-event.service
131
+%systemd_preun dm-event.service dm-event.socket
128 132
 
129 133
 %package -n	device-mapper-event-libs
130 134
 Summary:	Device-mapper event daemon shared library
... ...
@@ -259,8 +263,8 @@ systemctl enable lvm2-activate.service
259 259
 %defattr(-,root,root,-)
260 260
 %attr(555, -, -) %{_sbindir}/dmeventd
261 261
 %{_mandir}/man8/dmeventd.8.gz
262
-/lib/systemd/system/dm-event.service
263
-/lib/systemd/system/dm-event.socket
262
+%{_unitdir}/dm-event.socket
263
+%{_unitdir}/dm-event.service
264 264
 
265 265
 %files -n device-mapper-event-libs
266 266
 %defattr(555,root,root,-)
... ...
@@ -410,14 +414,16 @@ systemctl enable lvm2-activate.service
410 410
 /etc/lvm/profile/cache-smq.profile
411 411
 
412 412
 %changelog
413
-* Thu Jan 28 2016 Anish Swaminathan <anishs@vmware.com> 2.02.141-2 
414
-- Adding device mapper event to Requires
413
+*   Thu Jan 28 2016 Anish Swaminathan <anishs@vmware.com> 2.02.141-3 
414
+-   Fix post scripts for lvm
415
+*   Thu Jan 28 2016 Anish Swaminathan <anishs@vmware.com> 2.02.141-2 
416
+-   Adding device mapper event to Requires
415 417
 *   Tue Jan 12 2016 Anish Swaminathan <anishs@vmware.com>  2.02.116-4
416 418
 -   Change config file attributes.
417 419
 *   Thu Dec 10 2015 Xiaolin Li <xiaolinl@vmware.com>  2.02.116-3
418 420
 -   Add systemd to Requires and BuildRequires
419
-* Thu Sep 10 2015 Divya Thaluru <dthaluru@vmware.com> 2.02.116-2
420
-- Packaging systemd service and configuration files
421
-* Thu Feb 26 2015 Divya Thaluru <dthaluru@vmware.com> 2.02.116-1
422
-- Initial version
421
+*   Thu Sep 10 2015 Divya Thaluru <dthaluru@vmware.com> 2.02.116-2
422
+-   Packaging systemd service and configuration files
423
+*   Thu Feb 26 2015 Divya Thaluru <dthaluru@vmware.com> 2.02.116-1
424
+-   Initial version
423 425
 
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	RPC program number mapper
2 2
 Name:		rpcbind
3 3
 Version:	0.2.3
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	BSD
6 6
 URL:		http://nfsv4.bullopensource.org
7 7
 Group:	    Applications/Daemons
... ...
@@ -50,9 +50,9 @@ install -m644 %{SOURCE3} %{buildroot}/etc/sysconfig/rpcbind
50 50
 
51 51
 %check
52 52
 make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
53
+
53 54
 %preun
54
-systemctl disable rpcbind.socket >/dev/null 2>&1
55
-systemctl disable rpcbind.service >/dev/null 2>&1
55
+%systemd_preun rpcbind.service rpcbind.socket
56 56
 
57 57
 %post
58 58
 /sbin/ldconfig
... ...
@@ -69,18 +69,20 @@ systemctl enable rpcbind.service >/dev/null 2>&1
69 69
 
70 70
 %postun
71 71
 /sbin/ldconfig
72
+%systemd_postun_with_restart rpcbind.service rpcbind.socket
72 73
 if getent passwd rpc >/dev/null; then
73 74
 	userdel rpc
74 75
 fi
75 76
 if getent group rpc >/dev/null; then
76 77
 	groupdel rpc
77 78
 fi
78
-systemctl disable rpcbind.socket >/dev/null 2>&1
79
-systemctl disable rpcbind.service >/dev/null 2>&1
79
+
80 80
 %clean
81 81
 rm -rf %{buildroot}/*
82 82
 %changelog
83
-*   Thu Dec 10 2015 Xiaolin Li <xiaolinl@vmware.com>  0.2.3-2
84
--   Add systemd to Requires and BuildRequires.
83
+*	Mon Feb 03 2016 Anish Swaminathan <anishs@vmware.com> 0.2.3-3
84
+-	Edit scripts in the rpm
85
+*   	Thu Dec 10 2015 Xiaolin Li <xiaolinl@vmware.com>  0.2.3-2
86
+-   	Add systemd to Requires and BuildRequires.
85 87
 *	Tue Dec 8 2015 Divya Thaluru <dthaluru@vmware.com> 0.2.3-1
86 88
 -	Initial build.	First version