Config files from new rpms should always replace old ones (and not be created as .rpmnew) as long as old files have not been touched. However this is currently not true. If new rpms contain modified config files (compared to old rpms), they are created as .rpmnew (even if old configs have not been modified). This is not consistent with normal rpm behavior.
Reproducer:
Test: c-j-c-test
OS: Fedora 38
JDK old: java-17-openjdk-17.0.6.0.10-1.fc38.x86_64
JDK new: java-17-openjdk-17.0.7.0.7-5.fc38.x86_64
Failures (c-j-c-test):
...
TEST: Update, config files unmodified
...
warning: /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/java.security created as /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/java.security.rpmnew
warning: /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/nss.fips.cfg created as /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/nss.fips.cfg.rpmnew
...
S.5....T. c /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/java.security
S.5....T. c /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/nss.fips.cfg
FAILED: Verifying installed files (new)
...
FAIL: File exists /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/java.security.rpmnew !
...
FAILED: checking /etc/java/java-17-openjdk/${NVR_NEW}/conf/security/java.security
...
FAIL: File exists /etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/nss.fips.cfg.rpmnew !
...
FAILED: checking /etc/java/java-17-openjdk/${NVR_NEW}/conf/security/nss.fips.cfg
...
Other info:
I have checked unpacked rpms, failing config files indeed differ between packages.
diff -rq java-17-openjdk-headless-17.0.6.0.10-1.fc38.x86_64/etc/java/java-17-openjdk/java-17-openjdk-17.0.6.0.10-1.fc38.x86_64/ java-17-openjdk-headless-17.0.7.0.7-5.fc38.x86_64/etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/
Files java-17-openjdk-headless-17.0.6.0.10-1.fc38.x86_64/etc/java/java-17-openjdk/java-17-openjdk-17.0.6.0.10-1.fc38.x86_64/conf/security/java.security and java-17-openjdk-headless-17.0.7.0.7-5.fc38.x86_64/etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/java.security differ
Files java-17-openjdk-headless-17.0.6.0.10-1.fc38.x86_64/etc/java/java-17-openjdk/java-17-openjdk-17.0.6.0.10-1.fc38.x86_64/conf/security/nss.fips.cfg and java-17-openjdk-headless-17.0.7.0.7-5.fc38.x86_64/etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/conf/security/nss.fips.cfg differ
Files java-17-openjdk-headless-17.0.6.0.10-1.fc38.x86_64/etc/java/java-17-openjdk/java-17-openjdk-17.0.6.0.10-1.fc38.x86_64/lib/security/cacerts.upstream and java-17-openjdk-headless-17.0.7.0.7-5.fc38.x86_64/etc/java/java-17-openjdk/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/lib/security/cacerts.upstream differ
Config files from new rpms should always replace old ones (and not be created as
.rpmnew) as long as old files have not been touched. However this is currently not true. If new rpms contain modified config files (compared to old rpms), they are created as.rpmnew(even if old configs have not been modified). This is not consistent with normal rpm behavior.Reproducer:
Test:
c-j-c-testOS:
Fedora 38JDK old:
java-17-openjdk-17.0.6.0.10-1.fc38.x86_64JDK new:
java-17-openjdk-17.0.7.0.7-5.fc38.x86_64Failures (c-j-c-test):
Other info:
I have checked unpacked rpms, failing config files indeed differ between packages.