diff --git a/0001-fix-minimize_writes.patch b/0001-fix-minimize_writes.patch new file mode 100644 index 0000000..e0d59c9 --- /dev/null +++ b/0001-fix-minimize_writes.patch @@ -0,0 +1,31 @@ +commit 03f146e955e099c24f7a49eff461645e1c0a0fd7 +Author: Panu Matilainen +Date: Thu Jan 13 11:25:30 2022 +0200 + + Fix minimize_writes not minimizing writes since 4.15 regression + + Commit 13f70e3710b2df49a923cc6450ff4a8f86e65666 caused minimize_writes + to actually not minimize anything since fsmVerify() only "verifies" + the thing does NOT exist anymore when it exist. Sigh. + + FA_TOUCH needs different kind of verification, stat the file instead + to see if it needs creating afterall. This is all soooo broken... + + Fixes: #1881 + +--- lib/fsm.c.orig ++++ 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; + } diff --git a/rpm.changes b/rpm.changes index ae5c0ec..3533946 100644 --- a/rpm.changes +++ b/rpm.changes @@ -3,6 +3,12 @@ Tue Feb 1 12:47:02 UTC 2022 - Dirk Müller - 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 + +- Fix minimize_writes not minimizing writes since 4.15 regression + new patch: 0001-fix-minimize_writes.patch + ------------------------------------------------------------------- Fri Jan 28 14:19:02 UTC 2022 - Dirk Müller diff --git a/rpm.spec b/rpm.spec index ae0890d..9f66a3f 100644 --- a/rpm.spec +++ b/rpm.spec @@ -118,6 +118,7 @@ Patch132: verbosearg.diff Patch133: zstdpool.diff Patch134: zstdthreaded.diff Patch135: ocaml-cmxs.diff +Patch136: 0001-fix-minimize_writes.patch Patch200: finddebuginfo.diff Patch201: finddebuginfo-absolute-links.diff Patch202: debugsubpkg.diff @@ -246,7 +247,7 @@ rm -rf sqlite %patch -P 100 -P 102 -P 103 %patch -P 117 %patch -P 122 -P 123 -P 131 -P 132 -P 133 -P 134 -%patch -P 135 +%patch -P 135 -P 136 # debugedit patches pushd debugedit-5.0