Remove perl dependency on image 00/54800/1 accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen accepted/tizen/mobile/20151218.084206 accepted/tizen/tv/20151218.084113 accepted/tizen/wearable/20151218.084145 submit/tizen/20151218.044115 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718
authorKyungwook Tak <k.tak@samsung.com>
Fri, 18 Dec 2015 02:33:52 +0000 (11:33 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Fri, 18 Dec 2015 03:17:03 +0000 (12:17 +0900)
 * Move update-ca-certificates util to devel package to be used only build time.
   Perl should be converted to bash later to be used on post step.
 * Set smack label on manifest for /etc/ssl/certs.
   Ownership of /etc/ssl/certs was duplicated with openssl package.
   /etc/ssl/certs will be removed on openssl package and ca-certificates will own alone.
 * Move ownership of ca-bundle orig file to ca-certificates-mozilla for temporary
   until perl in update-ca-certificates converted to bash.
   Because the package cannot rewrite the file which owned by other package in build time.

Change-Id: Ie9cd93f857291e4dc853b351db819855474225be
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
packaging/ca-certificates.manifest
packaging/ca-certificates.spec

index 017d22d..eafa8ab 100644 (file)
@@ -1,5 +1,8 @@
 <manifest>
- <request>
-    <domain name="_"/>
- </request>
+       <request>
+               <domain name="_"/>
+       </request>
+       <assign>
+               <filesystem path="/etc/ssl/certs" label="System::Shared" type="transmutable" />
+       </assign>
 </manifest>
index bb90365..0ea7105 100644 (file)
@@ -12,10 +12,6 @@ Source2:        GPL-2.0.txt
 Source3:        certbundle.run
 Source1001:     ca-certificates.manifest
 Url:            http://gitorious.org/opensuse/ca-certificates
-Requires:       openssl
-Requires:       smack
-Requires:       coreutils
-Requires(post): /usr/bin/rm
 Recommends:     ca-certificates-mozilla
 BuildArch:      noarch
 
@@ -26,7 +22,7 @@ Utilities for system wide CA certificate installation
 Summary:  Devel package of ca-certificates which contains RPM macros
 Group:    Development/Libraries
 License:  GPL-2.0+
-Requires: %name = %version
+BuildRequires: %name = %version
 
 %description devel
 ca-certificates devel package which contains RPM macros
@@ -57,14 +53,13 @@ mkdir -p %{buildroot}/%{_sbindir}
 mkdir -p %{buildroot}/%{_mandir}/man8
 mkdir -p %{buildroot}/etc/ca-certificates/update.d
 mkdir -p %{buildroot}%{_prefix}/lib/ca-certificates/update.d
-install -D -m 644 /dev/null %{buildroot}/%{cabundle}
+mkdir -p %{buildroot}/var/lib/ca-certificates
 install -m 644 /dev/null %{buildroot}/etc/ca-certificates.conf
 install -m 755 %{SOURCE3} %{buildroot}%{_prefix}/lib/ca-certificates/update.d
 ln -s %{cabundle} %{buildroot}%{usrcabundle}
 
 install -m 755 update-ca-certificates %{buildroot}/%{_sbindir}
 install -m 644 update-ca-certificates.8 %{buildroot}/%{_mandir}/man8
-install -m 644 /dev/null %{buildroot}/var/lib/ca-certificates/ca-bundle.pem
 
 mkdir -p %{buildroot}%{_sysconfdir}/rpm
 %define macro_ca_certificates %{_sysconfdir}/rpm/macros.ca-certificates
@@ -74,40 +69,22 @@ echo "%TZ_SYS_CA_CERTS_ORIG %{usrcadir}"    >> %{buildroot}%{macro_ca_certificat
 echo "%TZ_SYS_CA_BUNDLE     %{usrcabundle}" >> %{buildroot}%{macro_ca_certificates}
 echo "%TZ_SYS_CA_BUNDLE_RW  %{cabundle}"    >> %{buildroot}%{macro_ca_certificates}
 
-%post
-# this is just needed for those updating Factory,
-# can be removed before 11.3
-if [ "$1" -ge 1 ]; then
-  rm -f /etc/ca-certificates/update.d/certbundle.run
-fi
-# force rebuilding all certificate stores.
-# This also makes sure we update the hash links in /etc/ssl/certs
-# as openssl changed the hash format between 0.9.8 and 1.0
-update-ca-certificates -f || true
-
-chown root:system %{etccadir}
-chmod 775 %{etccadir}
-chsmack -a "System::Shared" %{etccadir}
-chsmack -t %{etccadir}
-
 %files
 %manifest %{name}.manifest
 %defattr(-, root, root)
-%dir %{usrcadir}
-%dir %{etccadir}
 %license COPYING
-%ghost %config(noreplace) /etc/ca-certificates.conf
+%dir %{usrcadir}
+%dir %attr(775, root, system) %{etccadir}
+%dir /var/lib/ca-certificates
 %{usrcabundle}
-%ghost %{cabundle}
+
+%files devel
+%config %{macro_ca_certificates}
+%ghost %config(noreplace) /etc/ca-certificates.conf
 %dir /etc/ca-certificates
 %dir /etc/ca-certificates/update.d
 %dir %{_prefix}/lib/ca-certificates
 %dir %{_prefix}/lib/ca-certificates/update.d
-%dir /var/lib/ca-certificates
 %{_prefix}/lib/ca-certificates/update.d/certbundle.run
 %{_sbindir}/update-ca-certificates
 %{_mandir}/man8/update-ca-certificates.8*
-%ghost %{cabundle}
-
-%files devel
-%config %{macro_ca_certificates}