[packages/ca-certificates] - rewrite pretrans in lua to fix chicken-egg problem with /bin/sh on first install, rel 2
baggins
baggins at pld-linux.org
Sun Oct 17 01:50:50 CEST 2021
commit c3747db91d366f3a0d10c3c09b811f081cf55392
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Oct 17 01:49:49 2021 +0200
- rewrite pretrans in lua to fix chicken-egg problem with /bin/sh on first install, rel 2
ca-certificates.spec | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/ca-certificates.spec b/ca-certificates.spec
index 7b2ecc8..49e1f6f 100644
--- a/ca-certificates.spec
+++ b/ca-certificates.spec
@@ -13,7 +13,7 @@ Summary(pl.UTF-8): Pliki PEM popularnych certyfikatów CA
Name: ca-certificates
%define ver_date 20211016
Version: %{ver_date}
-Release: 1
+Release: 2
License: GPL v2 (scripts), MPL v2 (mozilla certs), distributable (other certs)
Group: Base
Source0: http://ftp.debian.org/debian/pool/main/c/ca-certificates/%{name}_%{version}.tar.xz
@@ -246,10 +246,11 @@ rm -rf $RPM_BUILD_ROOT
%postun update
/usr/bin/find "%{openssldir}" -xtype l -delete || :
-%pretrans
-if [ -L /etc/ssl/certs ]; then
- rm -f /etc/ssl/certs
-fi
+%pretrans -p <lua>
+local mode = posix.stat("/etc/ssl/certs")
+if mode["type"] == "link" then
+ posix.unlink("/etc/ssl/certs")
+end
%files
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ca-certificates.git/commitdiff/c3747db91d366f3a0d10c3c09b811f081cf55392
More information about the pld-cvs-commit
mailing list