Re: [arch-general] pacman and hooks

2016-02-03 Thread Magnus Therning

Doug Newgard writes:

> On Tue, 02 Feb 2016 23:51:16 +0100
> Magnus Therning  wrote:
>
>> Doug Newgard writes:
>> 
>> > On Tue, 02 Feb 2016 23:25:58 +0100
>> > Magnus Therning  wrote:
>> >  
>> >> Stefan Tatschner writes:
>> >>   
>> >> > On 01.02.2016 23:05, Magnus Therning wrote:
>> >> >> Is there more information about this feature available somewhere?
>> >> >
>> >> > $ man 5 alpm-hooks
>> >> 
>> >> Excellent. I also found this https://github.com/andrewgregory/pachooks.
>> >> 
>> >> I'm guessing that link contains one erroneos bit of information though,
>> >> the location of the hooks. Since `pacman` includes the dir
>> >> `/usr/share/libalpm/hooks/` I'm guessing that's where hooks should go,
>> >> right? (It could be a nice touch to put a README file there ;)
>> >> 
>> >> /M
>> >>   
>> >
>> > That's where packages should put hooks, not users/admins.  
>> 
>> Ah, so admins should put site-specific hooks in the locations mentioned
>> in at the link above?
>> 
>> /M
>> 
>
> No, even those are for packages. Users/admins should use /etc/pacman.d/hooks.
> Not sure about scripts.

Ah, I just now found a mention of the default hook dir, it's in
pacman.conf(5)! I must admit I was surprised to *not* find it mentioned
in alpm-hooks(5).

As far as I understand it

|--+-|
| /usr/share/libalpm/hooks | system dir, used by packages|
|--+-|
| /etc/pacman.d/hooks  | suggested dir for use by local stuff, needs |
|  | to be configured in /etc/pacman.conf|
|--+-|

Is that correct?

/M

-- 
Magnus Therning  OpenPGP: 0x927912051716CE39
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

As we enjoy great advantages from the inventions of others we should
be glad of an opportunity to serve others by any invention of
ours, and this we should do freely and generously.
 -- Benjamin Franklin


signature.asc
Description: PGP signature


Re: [arch-general] pacman and hooks

2016-02-02 Thread Doug Newgard
On Tue, 2 Feb 2016 21:06:14 -0500
Eli Schwartz  wrote:

> On 02/02/2016 09:00 PM, Andrew Gregory wrote:
> > Neither hooks.bin nor hooks.local are used by alpm/pacman in any way.
> > They are merely my own personal suggestions for where packages should
> > put scripts and inactive hooks.  The intent for hooks.local is for
> > packages to place any hooks that shouldn't be automatically enabled
> > there, then for users to selectively enable them by symlinking them
> > into /etc/pacman.d/hooks.
> > 
> > apg
> >   
> 
> Duh... "inactive hooks for users to enable"
> 
> I should have realized.
> 
> Of course, three of those hooks are things that should (eventually) be
> replacing standard install scripts. So they should be going in
> /usr/share/libalpm/hooks/
> 
> Speaking of which, does anyone know what plans there are for globally
> transitioning common actions like gtk-update-icon-cache,
> update-{mime,desktop}-database, vim helptags, install-info, etc. to hooks?
> 
> Will these be part of pacman, or part of the packages that provide the
> executables they use?
> 

So far, the thinking is that they would be part of the package that provides
the executable in most cases. I'm sure there would be exceptions, possibly with
icon themes or others. The details haven't been hashed out AFAIK.


Re: [arch-general] pacman and hooks

2016-02-02 Thread Eli Schwartz
On 02/02/2016 09:00 PM, Andrew Gregory wrote:
> Neither hooks.bin nor hooks.local are used by alpm/pacman in any way.
> They are merely my own personal suggestions for where packages should
> put scripts and inactive hooks.  The intent for hooks.local is for
> packages to place any hooks that shouldn't be automatically enabled
> there, then for users to selectively enable them by symlinking them
> into /etc/pacman.d/hooks.
> 
> apg
> 

Duh... "inactive hooks for users to enable"

I should have realized.

Of course, three of those hooks are things that should (eventually) be
replacing standard install scripts. So they should be going in
/usr/share/libalpm/hooks/

Speaking of which, does anyone know what plans there are for globally
transitioning common actions like gtk-update-icon-cache,
update-{mime,desktop}-database, vim helptags, install-info, etc. to hooks?

Will these be part of pacman, or part of the packages that provide the
executables they use?

-- 
Eli Schwartz


Re: [arch-general] pacman and hooks

2016-02-02 Thread Andrew Gregory
On 02/02/16 at 08:43pm, Eli Schwartz wrote:
> On 02/02/2016 06:54 PM, Doug Newgard wrote:
> > No, even those are for packages. Users/admins should use 
> > /etc/pacman.d/hooks.
> > Not sure about scripts.
> 
> I would guess that scripts can be put anywhere, I would probably just
> put them in the HookDir (matching *.{hook,sh} files).
> 
> But why would anyone use the /usr/share/alpm/hooks.local directory at
> all? It doesn't appear to be used by default -- I guess you could add a
> HookDir in pacman.conf, but that shouldn't be depended on by packages...
> 
> It looks like a *personal* choice for user/admin hooks.

Neither hooks.bin nor hooks.local are used by alpm/pacman in any way.
They are merely my own personal suggestions for where packages should
put scripts and inactive hooks.  The intent for hooks.local is for
packages to place any hooks that shouldn't be automatically enabled
there, then for users to selectively enable them by symlinking them
into /etc/pacman.d/hooks.

apg


Re: [arch-general] pacman and hooks

2016-02-02 Thread Eli Schwartz
On 02/02/2016 06:54 PM, Doug Newgard wrote:
> No, even those are for packages. Users/admins should use /etc/pacman.d/hooks.
> Not sure about scripts.

I would guess that scripts can be put anywhere, I would probably just
put them in the HookDir (matching *.{hook,sh} files).

But why would anyone use the /usr/share/alpm/hooks.local directory at
all? It doesn't appear to be used by default -- I guess you could add a
HookDir in pacman.conf, but that shouldn't be depended on by packages...

It looks like a *personal* choice for user/admin hooks.

-- 
Eli Schwartz


Re: [arch-general] pacman and hooks

2016-02-02 Thread Doug Newgard
On Tue, 02 Feb 2016 23:51:16 +0100
Magnus Therning  wrote:

> Doug Newgard writes:
> 
> > On Tue, 02 Feb 2016 23:25:58 +0100
> > Magnus Therning  wrote:
> >  
> >> Stefan Tatschner writes:
> >>   
> >> > On 01.02.2016 23:05, Magnus Therning wrote:
> >> >> Is there more information about this feature available somewhere?
> >> >
> >> > $ man 5 alpm-hooks
> >> 
> >> Excellent. I also found this https://github.com/andrewgregory/pachooks.
> >> 
> >> I'm guessing that link contains one erroneos bit of information though,
> >> the location of the hooks. Since `pacman` includes the dir
> >> `/usr/share/libalpm/hooks/` I'm guessing that's where hooks should go,
> >> right? (It could be a nice touch to put a README file there ;)
> >> 
> >> /M
> >>   
> >
> > That's where packages should put hooks, not users/admins.  
> 
> Ah, so admins should put site-specific hooks in the locations mentioned
> in at the link above?
> 
> /M
> 

No, even those are for packages. Users/admins should use /etc/pacman.d/hooks.
Not sure about scripts.


Re: [arch-general] pacman and hooks

2016-02-02 Thread Magnus Therning

Doug Newgard writes:

> On Tue, 02 Feb 2016 23:25:58 +0100
> Magnus Therning  wrote:
>
>> Stefan Tatschner writes:
>> 
>> > On 01.02.2016 23:05, Magnus Therning wrote:  
>> >> Is there more information about this feature available somewhere?  
>> >
>> > $ man 5 alpm-hooks  
>> 
>> Excellent. I also found this https://github.com/andrewgregory/pachooks.
>> 
>> I'm guessing that link contains one erroneos bit of information though,
>> the location of the hooks. Since `pacman` includes the dir
>> `/usr/share/libalpm/hooks/` I'm guessing that's where hooks should go,
>> right? (It could be a nice touch to put a README file there ;)
>> 
>> /M
>> 
>
> That's where packages should put hooks, not users/admins.

Ah, so admins should put site-specific hooks in the locations mentioned
in at the link above?

/M

-- 
Magnus Therning  OpenPGP: 0x927912051716CE39
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

Some operating systems are called 'user friendly', Linux however is
'expert friendly'.


signature.asc
Description: PGP signature


Re: [arch-general] pacman and hooks

2016-02-02 Thread Doug Newgard
On Tue, 02 Feb 2016 23:25:58 +0100
Magnus Therning  wrote:

> Stefan Tatschner writes:
> 
> > On 01.02.2016 23:05, Magnus Therning wrote:  
> >> Is there more information about this feature available somewhere?  
> >
> > $ man 5 alpm-hooks  
> 
> Excellent. I also found this https://github.com/andrewgregory/pachooks.
> 
> I'm guessing that link contains one erroneos bit of information though,
> the location of the hooks. Since `pacman` includes the dir
> `/usr/share/libalpm/hooks/` I'm guessing that's where hooks should go,
> right? (It could be a nice touch to put a README file there ;)
> 
> /M
> 

That's where packages should put hooks, not users/admins.


Re: [arch-general] pacman and hooks

2016-02-02 Thread Magnus Therning

Stefan Tatschner writes:

> On 01.02.2016 23:05, Magnus Therning wrote:
>> Is there more information about this feature available somewhere?
>
> $ man 5 alpm-hooks

Excellent. I also found this https://github.com/andrewgregory/pachooks.

I'm guessing that link contains one erroneos bit of information though,
the location of the hooks. Since `pacman` includes the dir
`/usr/share/libalpm/hooks/` I'm guessing that's where hooks should go,
right? (It could be a nice touch to put a README file there ;)

/M

-- 
Magnus Therning  OpenPGP: 0x927912051716CE39
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

Eagles may soar, but weasels don't get sucked into jet engines.


signature.asc
Description: PGP signature


Re: [arch-general] pacman and hooks

2016-02-01 Thread Bruno Pagani
Le 01/02/2016 23:05, Magnus Therning a écrit :
> I just noticed an email in this list mentioning that with pacman 5.0 we
> know have support for hooks. I proceeded to look at the man pages for
> /pacman/, /makepkg/, and /PKGBUILD/ but only found one mention of a
> /hookdir/.
>
> Is there more information about this feature available somewhere?
>
> /M

They are some bits here:
https://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks

I’m very interested in this feature, maybe I will be able to automate
very nicely the job of localepurge.

Bruno



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] pacman and hooks

2016-02-01 Thread Magnus Therning

Bruno Pagani writes:

> Le 01/02/2016 23:05, Magnus Therning a écrit :
>> I just noticed an email in this list mentioning that with pacman 5.0 we
>> know have support for hooks. I proceeded to look at the man pages for
>> /pacman/, /makepkg/, and /PKGBUILD/ but only found one mention of a
>> /hookdir/.
>>
>> Is there more information about this feature available somewhere?
>>
>> /M
>
> They are some bits here:
> https://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks
>
> I’m very interested in this feature, maybe I will be able to automate
> very nicely the job of localepurge.

Yes, I found that one. It just lacks an air of officialty about it ;)

I'm hoping it can be used to limit the re-building of the documentation
index for Haskell packages.

/M

-- 
Magnus Therning  OpenPGP: 0x927912051716CE39
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

I invented the term Object-Oriented, and I can tell you I did not have
C++ in mind.
 -- Alan Kay


signature.asc
Description: PGP signature


Re: [arch-general] pacman and hooks

2016-02-01 Thread Stefan Tatschner
On 01.02.2016 23:05, Magnus Therning wrote:
> Is there more information about this feature available somewhere?

$ man 5 alpm-hooks

S