Bug#1059187: samba: installs files into /lib/...

2023-12-24 Thread Chris Hofstaedtler
On Sun, Dec 24, 2023 at 12:54:09PM +0300, Michael Tokarev wrote:
> Control: tag -1 + confirmed moreinfo
> 
> 21.12.2023 03:09, Chris Hofstaedtler :
> > For the correct place of the systemd system units, you can ask:
> > pkg-config --variable=systemdsystemunitdir systemd
> > Provided you add systemd-dev to Build-Depends.
> 
> /lib/systemd is currently hard-coded in samba's d/rules (and repeated
> in multiple places).  It's easy to fix, but.
> 
> The same samba package is being built on multiple distributions and
> releases, including ubuntu focal and jammy, debian bullseye and buster, -
> I provide sort of backports for these releases and this service has
> become quite popular.  The suggested
> 
>   pkg-config --variable=systemdsystemunitdir systemd
> 
> does not work on bullseye already.

This should work on bullseye, provided you Build-Depend: systemd.

> What's an alternative way to determine if we should use /lib or /usr/lib
> which works in older releases too - for systemd and for system libs like
> libnss*?

For systemd, please use systemd.pc.

For everything else, it is harder:

One option is to use dh_movetousr if available in debhelper, and
otherwise skip it (= on old suites).

For PAM, I'm guessing you can query libdir from pam.pc. 
Note that there is no coordinated plan for PAM yet, so while I hope
pam.pc will, in the future, have a /usr/lib/... libdir, you cannot
exactly rely on it. However, because the paths are aliased, if you
move today it will still work.

For nsswitch, I have no useful answer. Maybe piggyback on something
else (pam?) even if that is technically wrong, or hardcode old suite
names?

Chris



Bug#1059187: samba: installs files into /lib/...

2023-12-24 Thread Michael Tokarev

Control: tag -1 + confirmed moreinfo

21.12.2023 03:09, Chris Hofstaedtler :

Source: samba
Version: 2:4.19.3+dfsg-2
User: helm...@debian.org
Usertags: dep17m2

Hi!

The samba binary packages installs a number of files below /lib. For
the ongoing Debian UsrMerge effort [1], these should be moved below
/usr/lib.

Currently the files installed are:

 - lib/systemd/system/ctdb.service
 - lib/systemd/system/nmb.service -> nmbd.service
 - lib/systemd/system/nmbd.service
 - lib/systemd/system/samba-ad-dc.service
 - lib/systemd/system/samba.service -> samba-ad-dc.service
 - lib/systemd/system/smb.service -> smbd.service
 - lib/systemd/system/smbd.service
 - lib/systemd/system/winbind.service
 - lib/x86_64-linux-gnu/libnss_winbind.so.2
 - lib/x86_64-linux-gnu/libnss_wins.so.2
 - lib/x86_64-linux-gnu/security/pam_winbind.so

Please investigate moving these below /usr/lib. When doing so, make
sure your packages do not install empty directories inside /lib (or
/lib itself).

For the correct place of the systemd system units, you can ask:
pkg-config --variable=systemdsystemunitdir systemd
Provided you add systemd-dev to Build-Depends.


/lib/systemd is currently hard-coded in samba's d/rules (and repeated
in multiple places).  It's easy to fix, but.

The same samba package is being built on multiple distributions and
releases, including ubuntu focal and jammy, debian bullseye and buster, -
I provide sort of backports for these releases and this service has
become quite popular.  The suggested

  pkg-config --variable=systemdsystemunitdir systemd

does not work on bullseye already.

What's an alternative way to determine if we should use /lib or /usr/lib
which works in older releases too - for systemd and for system libs like
libnss*?

Thanks,

/mjt



Bug#1059187: samba: installs files into /lib/...

2023-12-20 Thread Chris Hofstaedtler
Source: samba
Version: 2:4.19.3+dfsg-2
User: helm...@debian.org
Usertags: dep17m2

Hi!

The samba binary packages installs a number of files below /lib. For
the ongoing Debian UsrMerge effort [1], these should be moved below
/usr/lib.

Currently the files installed are:

- lib/systemd/system/ctdb.service
- lib/systemd/system/nmb.service -> nmbd.service
- lib/systemd/system/nmbd.service
- lib/systemd/system/samba-ad-dc.service
- lib/systemd/system/samba.service -> samba-ad-dc.service
- lib/systemd/system/smb.service -> smbd.service
- lib/systemd/system/smbd.service
- lib/systemd/system/winbind.service
- lib/x86_64-linux-gnu/libnss_winbind.so.2
- lib/x86_64-linux-gnu/libnss_wins.so.2
- lib/x86_64-linux-gnu/security/pam_winbind.so

Please investigate moving these below /usr/lib. When doing so, make
sure your packages do not install empty directories inside /lib (or
/lib itself).

For the correct place of the systemd system units, you can ask:
   pkg-config --variable=systemdsystemunitdir systemd
Provided you add systemd-dev to Build-Depends.

Please see the wiki [1] for further information and on uploading to
experimental first.

Chris

[1] https://wiki.debian.org/UsrMerge