From 8ced2e02fbe00f97b1ab2de209d5eb389a0b480c Mon Sep 17 00:00:00 2001 From: Kyungwook Tak Date: Fri, 18 Dec 2015 11:33:52 +0900 Subject: [PATCH] Remove perl dependency on image * 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 --- packaging/ca-certificates.manifest | 9 ++++++--- packaging/ca-certificates.spec | 41 +++++++++----------------------------- 2 files changed, 15 insertions(+), 35 deletions(-) diff --git a/packaging/ca-certificates.manifest b/packaging/ca-certificates.manifest index 017d22d..eafa8ab 100644 --- a/packaging/ca-certificates.manifest +++ b/packaging/ca-certificates.manifest @@ -1,5 +1,8 @@ - - - + + + + + + diff --git a/packaging/ca-certificates.spec b/packaging/ca-certificates.spec index bb90365..0ea7105 100644 --- a/packaging/ca-certificates.spec +++ b/packaging/ca-certificates.spec @@ -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} -- 2.7.4