summaryrefslogtreecommitdiff
path: root/dh_runit
AgeCommit message (Collapse)Author
2019-05-29Create marker files for use by "invoke-run"Dmitry Bogatov
Create marker file in /usr/share, that is checked by "invoke-run". If marker file is absent, package was unstalled, but not purged (runscripts are conffiles), and service must be put into "down" state. To not break already-existing runscript, using "invoke-run", such check is only performed when it is known, that marker file existed. It can be known by checking presence of /etc/sv/{name}/.meta/installed. Gbp-Closes: #929693
2019-05-29Refactor dh_runitDmitry Bogatov
Introduce new function "create_empty_file" and reuse it for side-effect of creating parent directories in "template_from_data_directory" and to avoid manual open/close calls in main function.
2019-05-28Refactor creation of logscriptDmitry Bogatov
Instead of using interpolation and here-strings, write function that renders mustache template. This approach makes code cleaner and more scalable. * data/logscript: add mustach template of 'log/run' script, that is installed when "logscript" option in effect. * Makefile: set DH_RUNIT_DATADIR variable in "check" target. This way, templates from ./data/ directory are used, not from system location. * debian/control: add dependency on Text::Hogan library -- implementation of "mustache" templating standard. * dh_runit(template_from_data_directory): new function * dh_runit: install 'log/run' with "template_from_data_directory" function. * t/928935.t: check that "logscript" option correctly creates 'log/run' script, with correct permissions.
2019-05-28Change path of "noreplace" flag fileDmitry Bogatov
First of all, "noreplace" flag file is architecture-independent and is not meant to be edited by system administrator, so it does not belong to /var. New namings scheme provides more options for extensibility, i.e introducing more flag files. While it is definitely not good thing to have, it seems, unfortunately, necessary to support, e.g uninstalled-not-purged situation.
2019-05-14Add option to mark service as non-restartableDmitry Bogatov
2019-03-20Make permissions of supervise directories 0700, as created by sv(8). ↵Dmitry Bogatov
(Closes: #924903)
2019-03-12Fix missing directory error when installing runscript directory.Dmitry Bogatov
2019-03-05Correctly create symlinks in /etc/service in post-inst on first revision of ↵Dmitry Bogatov
package, that introduced runscript. (Closes: #923233)
2019-02-28Do not create /etc/sv directory if there is no runscript (Closes: #923439)Dmitry Bogatov
2019-02-24Generate breaks with runit version, predating 'invoke-run' script.Dmitry Bogatov
2019-02-01Copy-edit dh_runit(1) documentation. (Closes: #920963)Dmitry Bogatov
2019-01-22Document runit:Breaks substitution variableDmitry Bogatov
2018-12-16Make `/etc/runit/runsvdir/default' directory part of package, providing ↵Dmitry Bogatov
runscript.
2018-12-16Do not impose dependency on `runit' binary packageDmitry Bogatov
Instead, generate conflict relation with old `runit' version, not providing `runit-log' user.
2018-12-12Make auto-generated runscripts invoke svlogd(8) as `runit-log' user.Dmitry Bogatov
* Make auto-generated runscripts invoke svlogd(8) as `runit-log' user. * Impose dependency on (runit >= 2.1.2-20), which provides `runit-log' user.
2018-05-27Do not re-enable serice on upgradeDmitry Bogatov
* Do not make symbolic link /etc/runit/runsvdir/default/$name -> /etc/sv/$name part of package files {in which case it will be unconditionally created on upgrade}; instead manage it in maintainer scripts: create it in postinst script on fresh install and remove on purge/remove in postrm. * Force versioned dependency on runit-helper, to make sure that versioned dependency on dh-runit would close #899242
2017-03-02Introduce new binary package 'runit-helper', allowing packages to access ↵Dmitry Bogatov
fixes and improvements in 'dh-runit' without rebuild.
2017-03-02Remove 'logdir' option for simplicity sake. Strictly speaking it is ↵Dmitry Bogatov
backward-incompatible change, hence the version major bump, but I am unaware of any actual users of this option.
2017-03-02Improve readability of code, generating /etc/sv/<daemon>/log/run script ↵Dmitry Bogatov
using here-doc notation.
2016-10-31Change naming of generated system users for logging to start with underscore.Dmitry Bogatov
2016-09-14Remove from 'dh_runit' code to install no longer present prerm maintainer ↵Dmitry Bogatov
script.
2016-09-03Do not create symbolic link in /etc/runit/runsvdir/ in maintainer script, ↵Dmitry Bogatov
make it part of binary package. It makes sure, that dpkg will make right thing.
2016-08-31Do not create /etc/service symbolic link in maintainer script of -run ↵Dmitry Bogatov
packages. It simplifies maintainace at cost of creation of empty directories in runit binary package. But since it is rare to install runit, but none of -run packages, trade-off seems justified.
2016-08-31Do not create /etc/runit/runsvdir/default directory. Instead, it is provided ↵Dmitry Bogatov
by runit binary package. It saved us trouble of ensuring, that directory is removed at apporiate time.
2016-08-14Create supervise symbolic link for generated log scriptsDmitry Bogatov
2016-08-14Fix attempt to create directory under /Dmitry Bogatov
2016-08-14* Breaking change package.runit file format to improve interoperabilityDmitry Bogatov
with other tools (supply dh_runit arguments on command line) and make format extensible. See dh_runit(1). * Introduce support for automatic generation of log scripts.
2016-07-28Fix bug, that caused dh-runit to attemt to create directory under /.Dmitry Bogatov
2016-07-15Support for runlevelsDmitry Bogatov
2016-06-12drop documentation about package.runit as runscriptDmitry Bogatov
2016-06-09Improve handling of maintainer scriptsDmitry Bogatov
* checking for /etc/service symlink is moved into preinst * runscripts are enabled in postinst * runscripts are disables in prerm * supervise directory is purged on 'postrm purge'
2016-06-09style: use install_dir over manual install(1) invokationDmitry Bogatov
2016-06-09Automatically generate dependency on runitDmitry Bogatov
2016-06-09Use filedoublearray to simplify codeDmitry Bogatov
2016-06-08Improve created /etc/sv/${NAME} directoryDmitry Bogatov
* ensure that run/finish scripts are executable * create 'supervise' symlink to not pollute /etc/ directory
2016-06-07Fix typosDmitry Bogatov
2016-06-06Write maintainer scriptsDmitry Bogatov
2016-06-04Initial commitDmitry Bogatov