Closed bjornwiberguuse closed 3 years ago
That's correct for the /etc/default/rock
: it is not flagged as a config file at all.
For the /etc/rock/*
it should normally be the case: These files get special treatment during package installation to ensure that local changes to the configuration are not lost. Is the noreplace
modifier really needed?
Hello Yannick!
Thank you for your reply!
Yes, sadly, it is needed, because otherwise the customized configuration files will simply be saved as "
With %config(noreplace) the stock (package) versions will be saved as "
Please try with 1.0.11-beta. Now I got this:
[vagrant@fedora32 ~]$ rpm -q --qf '[%{filenames}: %{fileflags}\n]' rock
/etc/default/rock: 17
/etc/rock: 16
/etc/rock/Rprofile.R: 17
/etc/rock/Rserv.conf: 17
/etc/rock/application.yml: 17
/etc/rock/logback.xml: 17
/etc/rock/system.info.R: 17
/usr/lib/systemd/system/rock.service: 17
/usr/share/rock-1.0.11-beta/bin: 0
/usr/share/rock-1.0.11-beta/bin/start.sh: 0
/usr/share/rock-1.0.11-beta/bin/update.sh: 0
/usr/share/rock-1.0.11-beta/lib: 0
/usr/share/rock-1.0.11-beta/lib/rock-1.0.11-beta.jar: 0
/var/lib/rock: 0
/var/log/rock: 0
Hello Yannick, and thank you for your reply!
Looks good, except that /usr/lib/systemd/system/rock.service should actually not be a configuration file at all, as any overrides should be performed in /etc/systemd/system (as per https://www.freedesktop.org/software/systemd/man/systemd.unit.html#id-1.14.3) -- and that the directory /etc/rock should not itself be flagged as %config, only the specific configuration files (as per http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-FLIST-CONFIG-DIRECTIVE and https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s05s03.html).
ok for the rock.service
not being a config!
That's what I get in the RPM specs:
%config(noreplace) %attr(750,rock,adm) "/etc/rock"
%config(noreplace) %attr(644,-,-) "/etc/default/rock"
and after install:
[vagrant@fedora32 ~]$ rpm -q --qf '[%{filenames}: %{fileflags}\n]' rock
/etc/default/rock: 17
/etc/rock: 16
/etc/rock/Rprofile.R: 17
/etc/rock/Rserv.conf: 17
/etc/rock/application.yml: 17
/etc/rock/logback.xml: 17
/etc/rock/system.info.R: 17
/usr/lib/systemd/system/rock.service: 0
/usr/share/rock-1.0-SNAPSHOT/bin: 0
/usr/share/rock-1.0-SNAPSHOT/bin/start.sh: 0
/usr/share/rock-1.0-SNAPSHOT/bin/update.sh: 0
/usr/share/rock-1.0-SNAPSHOT/lib: 0
/usr/share/rock-1.0-SNAPSHOT/lib/rock-1.0-SNAPSHOT.jar: 0
/var/lib/rock: 0
/var/log/rock: 0
Are you sure there is a problem with having the /etc/rock
directory being flagged? I am not sure that the spec's line is in conflict with what stated in the doc.
Hello Yannick!
I'm unsure whether tagging /etc/rock as %config or %config(noreplace) would have any side-effects (e.g. acting as a "default" for files placed there, similar to %docdir).
Is it correct that the Maven RPM plugin only "operates" on directories, and that files cannot be enumerated one by one? If so, I guess we'll simply have to live with /etc/rock being tagged with %config(noreplace). :-)
Same changes applied to opal, mica2 and agate, thanks (again)!
Hello again Yannick!
When will these new RPMs (opal-server, mica2 and agate) with the %config(noreplace) be published at https://obiba.jfrog.io/ui/native/rpm-local? It appears that there are only "older" versions there.
Thanks in advance!
Hi, I have just released rock 1.0.11.
Hello, Yannick, and thank you!
Will this be applied also to opal-server, mica2 and agate in the near future? (Many thanks in advance!)
Yes, this week or next week.
Thank you very much, Yannick! It is much appreciated!
Hello Yannick!
It appears that the Rock configuration files are not marked as %noreplace, resulting in configuration overwrite on updates:
Would it be possible to have the configuration files in /etc/rock marked as %config + %noreplace so that any custom changes persist on updates?
Also, /etc/default/rock is not tagged as a configuration file at all, so any Java argument changes (for example) are lost on upgrades. Perhaps that one should be marked as %config + %noreplace too?
Many thanks in advance!