Accepting request 950189 from home:DarkWav

- Add 0001-fix-minimize_writes.patch to fix minimize_writes not working, fixes boo#1195113

I'm still relatively inexperienced with packaging, if I made some mistake, let me know!

OBS-URL: https://build.opensuse.org/request/show/950189
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=598
This commit is contained in:
Michael Schröder 2022-02-18 13:42:34 +00:00 committed by Git OBS Bridge
parent 257b5b1ec6
commit 93f7afff8a
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,27 @@
From 03f146e955e099c24f7a49eff461645e1c0a0fd7 Fri 28 1 16:00:15 2022
From: Simon Vogl <simon.vogl@gmx.net>
Date: Fri, 28 Jan 2022 16:00:15 UTC
Subject: [PATCH] Fix minimize_writes not minimizing writes
A regression in commit 13f70e3 caused minimize_writes
to actually not minimize anything. FA_TOUCH needs different kind of verification, stat the file instead
to see if it needs creating afterall.
diff --git a/lib/fsm.c b/lib/fsm.c
index af0125db4..935a0a5c6 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -945,7 +945,12 @@ int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
}
/* Assume file does't exist when tmp suffix is in use */
if (!fp->suffix) {
- rc = fsmVerify(fp->fpath, fi);
+ if (fp->action == FA_TOUCH) {
+ struct stat sb;
+ rc = fsmStat(fp->fpath, 1, &sb);
+ } else {
+ rc = fsmVerify(fp->fpath, fi);
+ }
} else {
rc = RPMERR_ENOENT;
}

View File

@ -3,6 +3,11 @@ Tue Feb 1 12:47:02 UTC 2022 - Dirk Müller <dmueller@suse.com>
- invoke find-lang.sh with bash, it is a bash script (bsc#1195391)
-------------------------------------------------------------------
Fri Jan 28 17:00:15 CEST 2022 - simon.vogl@gmx.net
- Added 0001-fix-minimize_writes.patch to fix minimize_writes not working
-------------------------------------------------------------------
Fri Jan 28 14:19:02 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -71,6 +71,8 @@ Source8: rpmconfigcheck
Source9: sysconfig.services-rpm
Source12: baselibs.conf
Source13: rpmconfigcheck.service
# PATCH-FIX-UPSTREAM
Patch1: 0001-fix-minimize_writes.patch
# quilt patches start here
Patch5: usr-lib-sysimage-rpm.patch
Patch13: ignore-auxv.diff
@ -262,6 +264,9 @@ popd
%patch6464
%endif
# minimize_writes patch
%patch1 -p1
rm -f m4/libtool.m4
rm -f m4/lt*.m4