1

I'm building some in-house configuration packages for Debian-based OS.

There is a package (in default Debian repositories) which contains some service (as a binary) and all machinery needed to run it, but it's not started automatically during installation (and it does not even create the appropriate user for it to be run under).

I've successfully built a custom dependent configuration package which creates a dedicated system user to run this service, adjusts the configuration, and starts this service instance via systemd.

However I'm not sure how to handle original service package update case. I think that my service instance (running under custom system user with custom configuration) should be restarted in case of such upstream update but I can't find a good way to do it. According to official documentation apt/dpkg doesn't notify (call) any maintainer scripts of a package's dependency graph - only those of the package being directly updated. Currently I'm thinking about some inotify-based workarounds to watch for service binary file changes and trigger my service instance restart manually but it feels... hacky =)

So here goes the question: Is there any existing infrastructure in apt/dpkg to notify dependent packages about updates of their dependencies?

tripleee
  • 175,061
  • 34
  • 275
  • 318
zeronineseven
  • 129
  • 2
  • 6
  • Possible duplicate of [dpkg: How to use trigger?](https://stackoverflow.com/questions/15276535/dpkg-how-to-use-trigger) – tripleee Jan 30 '19 at 09:10
  • 1
    I *think* you are looking for `dpkg` triggers. See also https://wiki.debian.org/DpkgTriggers – tripleee Jan 30 '19 at 09:10
  • You had dangling [1] and [2] which did not link to any URLs, which I edited out; perhaps if you can figure out what you wanted to link to, you might want to add them back, with the actual URLs. – tripleee Jan 30 '19 at 09:13

0 Answers0