openhab / openhab-linuxpkg

Repo for Linux packages
Eclipse Public License 2.0
18 stars 33 forks source link

Add configuration folders as deb conffiles #3

Closed BClark09 closed 7 years ago

BClark09 commented 7 years ago

CONFIG | NOREPLACE doesn't seem to be behaving correctly, and the current implentation will always overwrite conf files. If we use confgurationFile() then Debian upgrades become aware of them.

I've tested this from gradle build to gradle build AND from cloudbees to gradle build and it looks like conf file pathing is the same in each with this change. Just in case I've missed something, please test this as well.

(Also spotted another ./karaf/bin instead of ./bin so updated accordingly)

Signed-off-by: Ben Clark ben@benjyc.uk

theoweiss commented 7 years ago

Thanks very much for figuring this out.

BClark09 commented 7 years ago

@theoweiss I can't be sure what removing the fileType does, so I will try it tomorrow when I can test and get back to you. From what I see on the plugin wiki fileType should be used, but configurationFile() is a specific script which appends what should and shouldn't be seen as a conffile by deb.

BClark09 commented 7 years ago

All tested without the fileType call, all seems well and have updated this PR.

I can confirm that these files are correctly kept from any upgrade route, any changes to the default deb will prompt the user, and finally each of these config files will only be removed on a purge; just as expected.

theoweiss commented 7 years ago

Very good. Thanks.