Hello community,

here is the log from the commit of package exim for openSUSE:Factory checked in 
at 2020-05-20 18:44:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/exim (Old)
 and      /work/SRC/openSUSE:Factory/.exim.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "exim"

Wed May 20 18:44:42 2020 rev:61 rq:807583 version:4.93.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/exim/exim.changes        2020-05-15 
23:51:25.033440153 +0200
+++ /work/SRC/openSUSE:Factory/.exim.new.2738/exim.changes      2020-05-20 
18:45:33.121294421 +0200
@@ -0,0 +1,5 @@
+Tue May 19 13:47:05 CEST 2020 - [email protected]
+- switch pretrans to use lua
+  (fixes bsc#1171877)
+  
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ exim.spec ++++++
--- /var/tmp/diff_new_pack.KTZxQv/_old  2020-05-20 18:45:34.113296650 +0200
+++ /var/tmp/diff_new_pack.KTZxQv/_new  2020-05-20 18:45:34.117296659 +0200
@@ -73,7 +73,7 @@
 Requires(pre):  fileutils textutils
 %endif
 Version:        4.93.0.4
-Release:        3
+Release:        4
 %if %{with_mysql}
 BuildRequires:  mysql-devel
 %endif
@@ -382,20 +382,22 @@
 # apparmor profile
 install -D -m 0644 $RPM_SOURCE_DIR/apparmor.usr.sbin.exim 
$RPM_BUILD_ROOT/usr/share/apparmor/extra-profiles/usr.sbin.exim
 
-%pretrans
-if [ -d "%{_docdir}/%{name}/doc/cve-2019-13917" ]; then
-    moved_suffix=""
-    moved_index=""
-    while [ -d 
"%{_docdir}/%{name}/doc/cve-2019-13917.rpmmoved${moved_suffix}${moved_index}" 
]; do
-        if [ -z "${moved_suffix}" ]; then
-            moved_suffix="."
-            moved_index="0"
-        else
-            moved_index=$((${moved_index} + 1))
-        fi
-    done
-       mv "%{_docdir}/%{name}/doc/cve-2019-13917" 
"%{_docdir}/%{name}/doc/cve-2019-13917.rpmmoved${moved_suffix}${moved_index}"
-fi
+%pretrans -p <lua>
+docdir = rpm.expand('%{_docdir}')
+pkgname = rpm.expand('%{name}')
+path = docdir .. '/' .. pkgname .. '/doc/cve-2019-13917'
+st = posix.stat(path)
+if st and st.type == "directory" then
+  status = os.rename(path, path .. ".rpmmoved")
+  if not status then
+    suffix = 0
+    while not status do
+      suffix = suffix + 1
+      status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
+    end
+    os.rename(path, path .. ".rpmmoved")
+  end
+end
 
 %pre
 %if 0%{?suse_version} > 1220




Reply via email to