=== tomreyn_ is now known as tomreyn [09:41] Does anyone know of a clean way to detect in a postinst script if we're installing via apt (or a libapt-using application) vs manual install ? [09:42] That sounds like a very weird requirement. What are you trying to do? [09:43] Packages are not normally permitted to care about that. [09:45] I'm working on making pam use needrestart, and as a first step I'd like for it to just not run its hand-rolled version if running in APT context with the needrestart hook installed. [09:46] If this is for an official Ubuntu package then I'm pretty sure you'll need to find another approach. [09:47] (There are probably aspects of the environment that would hint at this, but nothing guaranteed by policy) [09:48] I took the idea from the openssl package, which already does this regardless of the way dpkg is called : https://git.launchpad.net/ubuntu/+source/openssl/tree/debian/libssl1.1.postinst#n59 [09:49] To clarify, what I mean is that packages are not permitted to detect whether they're running inside apt [09:49] As far as I know [09:49] I have no opinion about how needrestart might be hooked up :) [11:37] schopin: maybe your check really ought to be reframed to "needrestart is installed and enabled"? Then you could do various things to detect that which less depend on the packaging infrastructure. Eg. /etc/default/, if there's nothing else already. [11:57] rbasak: it all depends on what is the definition of "enabled" for needrestart. AFAICT it only uses APT hooks to do its job, not DPKG triggers, so even if I can tell that it is enabled on the system, I cannot be sure it is going to be active on this particular package installation. [12:31] schopin: I don't think you need to know that. It would do if you know if it's _supposed_ (ie. configured) to be enabled. [12:32] You don't need to defend yourself against misconfiguration so much, IMHO. [12:49] OK then, anyone feeling like sponsoring the needrestart patch to pam ? LP #1935972 [12:49] Launchpad bug 1935972 in pam (Ubuntu) "postinst: Rely on needrestart when present on the system" [Undecided, New] https://launchpad.net/bugs/1935972 [12:49] vorlon perhaps? ^ === lucas__ is now known as lucascastro === didrocks999 is now known as didrocks === jpnurmi_ is now known as jpnurmi [14:36] schopin: I can and did have a look at pam. The changelog should have impish so it can be more easily sponsored. [14:37] schopin: also given that you opened a bug about this you should reference it in the changelog i.e. (LP: #1935972) [14:37] Launchpad bug 1935972 in pam (Ubuntu) "postinst: Rely on needrestart when present on the system" [Undecided, New] https://launchpad.net/bugs/1935972 [14:54] bdmurray: thanks for the review! Fixed. === genii-core is now known as genii [19:02] anyone know how to generate the by-hash metadata on a repo? [19:55] cjwatson: o/ you used to have a fork of Debian Policy published somewhere for Ubuntu. But I can't find it any more. Is that still current / intended to form Ubuntu policy?