New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deb package should not replace configs #113
Comments
My idea is to change the name of default config created by .deb package to something like /etc/marathon-consul.d/config.json.template. Only downside is that new installations won't be as smooth as they are now. |
I think adding this file to conffiles should be enough but can't verify it now :( |
conffiles is also good idea but goxc doesn't support conffiles/postinst files. Fpm supports this but lacks Github features. |
goxc #86 suggest using fpm for generating debs. I think we can go with template option. It won't change current behavior becouse deb config is generated from default values so there shouldn't be any change in deb installation behavior. |
Prepared PR for debber debber/debber-v0.3#2 (part of goxc used for creating debs). Once it's get merged we need to apply following patch diff --git a/resources/debian/conffiles b/resources/debian/conffiles
new file mode 100644
index 0000000..834b1ae
--- /dev/null
+++ b/resources/debian/conffiles
@@ -0,0 +1,3 @@
+/etc/init/marathon-consul.conf
+/etc/marathon-consul.d/config.json
+/etc/systemd/system/marathon-consul.service |
It looks like debber and goxc is no logner maintained and my fix is not enought. I'll try incorporate fpm. fpm --verbose -s dir -t deb \
-n marathon-consul \
-v 1.0.0-alpha7 \
--url="https://github.com/allegro/marathon-consul" \
--vendor=Allegro \
--maintainer="Allegro Group <opensource@allegro.pl>" \
--description "Marathon-consul service (performs Marathon Tasks registration as Consul Services for service discovery) Marathon-consul takes information provided by the Marathon event bus and forwards it to Consul agents. It also re-syncs all the information from Marathon to Consul on startup and repeats it with given interval." \
--deb-priority optional \
--workdir /tmp/ \
--license "Apache License, version 2.0" \
./bin/marathon-consul=/usr/bin/marathon-consul \
./debian/marathon-consul.service=/etc/systemd/system/marathon-consul.service \
./debian/marathon-consul.upstart=/etc/init/marathon-consul.conf \
./debian/config.json=/etc/marathon-consul.d/config.json |
When you install marathon-consul from deb it will overwrite
/etc/marathon-consul.d/config.json
. Instead user should be asked what should happen.https://www.debian.org/doc/debian-policy/ch-files.html#s-config-files
The text was updated successfully, but these errors were encountered: