SHA256
1
0
forked from pool/exim

Accepting request 807311 from home:pwcau:branches:server:mail

- switch pretrans to use lua
  (fixes bsc#1171877)

OBS-URL: https://build.opensuse.org/request/show/807311
OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=237
This commit is contained in:
Peter Wullinger 2020-05-19 12:51:17 +00:00 committed by Git OBS Bridge
parent 0590ab6476
commit 7ea074a84c
2 changed files with 22 additions and 16 deletions

View File

@ -1,5 +1,7 @@
Tue May 19 13:47:05 CEST 2020 - wullinger@rz.uni-kiel.de Tue May 19 13:47:05 CEST 2020 - wullinger@rz.uni-kiel.de
- pre-require bash for pretrans - switch pretrans to use lua
(fixes bsc#1171877)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 12 08:19:17 UTC 2020 - wullinger@rz.uni-kiel.de Tue May 12 08:19:17 UTC 2020 - wullinger@rz.uni-kiel.de
- bring changes from current in +fixes branch - bring changes from current in +fixes branch

View File

@ -71,7 +71,6 @@ Requires(pre): user(mail)
Requires(pre): group(mail) Requires(pre): group(mail)
%endif %endif
Requires(pre): fileutils textutils Requires(pre): fileutils textutils
Requires(pre): bash
%endif %endif
Version: 4.93.0.4 Version: 4.93.0.4
Release: 4 Release: 4
@ -383,20 +382,25 @@ install -m 0755 $RPM_SOURCE_DIR/eximstats-html-update.py $RPM_BUILD_ROOT/%{_sbin
# apparmor profile # apparmor profile
install -D -m 0644 $RPM_SOURCE_DIR/apparmor.usr.sbin.exim $RPM_BUILD_ROOT/usr/share/apparmor/extra-profiles/usr.sbin.exim install -D -m 0644 $RPM_SOURCE_DIR/apparmor.usr.sbin.exim $RPM_BUILD_ROOT/usr/share/apparmor/extra-profiles/usr.sbin.exim
%pretrans %pretrans -p <lua>
if [ -d "%{_docdir}/%{name}/doc/cve-2019-13917" ]; then docdir = rpm.expand('%{_docdir}')
moved_suffix="" pkgname = rpm.expand('%{name}')
moved_index="" path = docdir .. '/' .. pkgname .. '/doc/cve-2019-13917'
while [ -d "%{_docdir}/%{name}/doc/cve-2019-13917.rpmmoved${moved_suffix}${moved_index}" ]; do st_path = posix.stat(path)
if [ -z "${moved_suffix}" ]; then if st_path then
moved_suffix="." moved_path = path .. '.rpmmoved'
moved_index="0" status = os.rename(path, moved_path)
else if not status then
moved_index=$((${moved_index} + 1)) moved_index = 0
fi moved_path = path .. '.rpmmoved.' .. moved_index
done status = os.rename(path, moved_path)
mv "%{_docdir}/%{name}/doc/cve-2019-13917" "%{_docdir}/%{name}/doc/cve-2019-13917.rpmmoved${moved_suffix}${moved_index}" while not status do
fi moved_index = moved_index + 1
moved_path = path .. '.rpmmoved.' .. moved_index
status = os.rename(path, moved_path)
end
end
end
%pre %pre
%if 0%{?suse_version} > 1220 %if 0%{?suse_version} > 1220