Re: Run script after package install, update?

2025-06-15 Thread Max Nikulin
On 15/06/2025 23:08, tomas wrote: On Sun, Jun 15, 2025 at 11:33:09AM -0400, Greg Wooledge wrote: According to the apt.conf(5) man page: Pre-Invoke, Post-Invoke [...] That's clear as mud. What is "list notation"? [...] Aaah. I guess they mean Perl-y lists, like ["foo", "bar", "baz"]

Re: Run script after package install, update

2025-06-15 Thread David Wright
On Sun 15 Jun 2025 at 13:33:41 (-0400), Greg Wooledge wrote: > On Sun, Jun 15, 2025 at 12:14:30 -0500, David Wright wrote: > > Well, I just plagiarised /etc/apt/apt.conf.d/99needrestart: > > > > $ cat /etc/apt/apt.conf.d/99redogrub > > DPkg::Post-Invoke {"test -x /var/local/bin/redo && /var/l

Re: Run script after package install, update

2025-06-15 Thread Greg Wooledge
On Sun, Jun 15, 2025 at 12:14:30 -0500, David Wright wrote: > Well, I just plagiarised /etc/apt/apt.conf.d/99needrestart: > > $ cat /etc/apt/apt.conf.d/99redogrub > DPkg::Post-Invoke {"test -x /var/local/bin/redo && /var/local/bin/redo || > true"; }; > $ > > and wrote /var/local/bin/redo

Re: Run script after package install, update

2025-06-15 Thread Boyan Penkov
On Sun, Jun 15, 2025 at 1:15 PM David Wright wrote: > > On Sun 15 Jun 2025 at 11:33:09 (-0400), Greg Wooledge wrote: > > On Sun, Jun 15, 2025 at 11:07:41 -0400, Boyan Penkov wrote: > > > So ultimately, my problem is addressed; however, the larger question > > > is still open: is there in fact a st

Re: Run script after package install, update

2025-06-15 Thread David Wright
On Sun 15 Jun 2025 at 11:33:09 (-0400), Greg Wooledge wrote: > On Sun, Jun 15, 2025 at 11:07:41 -0400, Boyan Penkov wrote: > > So ultimately, my problem is addressed; however, the larger question > > is still open: is there in fact a straightforward way for a user, not > > the package maintainer, t

Re: Run script after package install, update?

2025-06-15 Thread tomas
On Sun, Jun 15, 2025 at 06:08:08PM +0200, to...@tuxteam.de wrote: [...] > Aaah. I guess they mean Perl-y lists, like ["foo", "bar", "baz"]. Gah, no. That'd make an array ref. I wanted to write ("foo", "bar", "baz"). Cheers -- t signature.asc Description: PGP signature

Re: Run script after package install, update?

2025-06-15 Thread tomas
On Sun, Jun 15, 2025 at 11:33:09AM -0400, Greg Wooledge wrote: > On Sun, Jun 15, 2025 at 11:07:41 -0400, Boyan Penkov wrote: > > So ultimately, my problem is addressed; however, the larger question > > is still open: is there in fact a straightforward way for a user, not > > the package maintainer,

Re: Run script after package install, update?

2025-06-15 Thread Boyan Penkov
Thanks for looking, Greg! I learned a few things following your note though, line, by line... On Sun, Jun 15, 2025 at 11:33 AM Greg Wooledge wrote: > > On Sun, Jun 15, 2025 at 11:07:41 -0400, Boyan Penkov wrote: > > So ultimately, my problem is addressed; however, the larger question > > is stil

Re: Run script after package install, update?

2025-06-15 Thread Greg Wooledge
On Sun, Jun 15, 2025 at 11:07:41 -0400, Boyan Penkov wrote: > So ultimately, my problem is addressed; however, the larger question > is still open: is there in fact a straightforward way for a user, not > the package maintainer, to tell the package management system: "If and > only if your operatio

Re: Run script after package install, update?

2025-06-15 Thread Boyan Penkov
Hello folks, Thanks for the robust and insightful responses here; I'd like to summarize: -- nickgeovanis suggested using ansible; this is a good insight, but I do have the sense that it's overkill for my use case (if you're provisioning 1000 identical machines, deploying this playbook by hand or

Re: Run script after package install, update

2025-06-15 Thread David Wright
On Sun 15 Jun 2025 at 06:23:20 (-0400), The Wanderer wrote: > On 2025-06-15 at 04:01, to...@tuxteam.de wrote: > > OK, here is the screwdriver (from man apt.conf(5)): > > > >Pre-Invoke, Post-Invoke > >This is a list of shell commands to run before/after > >invoking

Re: Run script after package install, update?

2025-06-15 Thread Darac Marjal
On 15/06/2025 00:10, Boyan Penkov wrote: Hello folks, I'm wiring to ask how to get apt to run a script after a particular package is installed or updated. Am I looking for dpkg-triggers or some apt conf? Specifically, I have GRUB installed to *every* drive, with the expectation that all but on

Re: Run script after package install, update?

2025-06-15 Thread The Wanderer
On 2025-06-15 at 04:01, to...@tuxteam.de wrote: > On Sun, Jun 15, 2025 at 09:31:45AM +0200, Anders Andersson wrote: > >> On Sun, Jun 15, 2025 at 7:45 AM Nicholas Geovanis >> wrote: >>> You could easily do this with ansible. In perhaps 30 lines of >>> YAML you could install those fixes, and do th

Re: Run script after package install, update?

2025-06-15 Thread tomas
On Sun, Jun 15, 2025 at 09:31:45AM +0200, Anders Andersson wrote: > On Sun, Jun 15, 2025 at 7:45 AM Nicholas Geovanis > wrote: > > > > > > > > On Sat, Jun 14, 2025, 9:15 PM Boyan Penkov wrote: > >> > >> Hello folks, > >> > >> I'm wiring to ask how to get apt to run a script after a particular > >

Re: Run script after package install, update?

2025-06-15 Thread Anders Andersson
On Sun, Jun 15, 2025 at 7:45 AM Nicholas Geovanis wrote: > > > > On Sat, Jun 14, 2025, 9:15 PM Boyan Penkov wrote: >> >> Hello folks, >> >> I'm wiring to ask how to get apt to run a script after a particular >> package is installed or updated. Am I looking for dpkg-triggers or >> some apt conf?

Re: Run script after package install, update?

2025-06-14 Thread Nicholas Geovanis
On Sat, Jun 14, 2025, 9:15 PM Boyan Penkov wrote: > Hello folks, > > I'm wiring to ask how to get apt to run a script after a particular > package is installed or updated. Am I looking for dpkg-triggers or > some apt conf? > > Specifically, I have GRUB installed to *every* drive, with the > expe

Run script after package install, update?

2025-06-14 Thread Boyan Penkov
Hello folks, I'm wiring to ask how to get apt to run a script after a particular package is installed or updated. Am I looking for dpkg-triggers or some apt conf? Specifically, I have GRUB installed to *every* drive, with the expectation that all but one drives can fail and the machine will stil