nicm / fdm

fdm source code
270 stars 50 forks source link

MANUAL: Debian does not enable PCRE by default #120

Closed koitsu closed 1 year ago

koitsu commented 1 year ago

MANUAL states the following at the bottom of the file:

The Debian package and FreeBSD port both use PCRE by default.

Debian (nor Ubuntu) enable PCRE by default in fdm. Maybe at some point in the past they did, but it doesn't look that way since at least 2018.

I discovered this whilst migrating a FreeBSD system to Ubuntu 20.04 focal, and was shocked that apt-cache show fdm showed no dependency on libpcre3:amd64 ("older" PCRE implementation, i.e. not PCRE2 (yes I know you just recently merged code to support PCRE2 :) )). I went as far as to examine the Debian and Ubuntu 20.04 focal source tarballs (and this has not changed with Ubuntu 22.04 jammy either), as well as installing the fdm package anyway and using ldd -- no PCRE:

$ sudo apt install fdm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  fdm
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 145 kB of archives.
After this operation, 361 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 fdm amd64 1.9+git20181219-1 [145 kB]
Fetched 145 kB in 1s (157 kB/s)
Selecting previously unselected package fdm.
(Reading database ... 120308 files and directories currently installed.)
Preparing to unpack .../fdm_1.9+git20181219-1_amd64.deb ...
Unpacking fdm (1.9+git20181219-1) ...
Setting up fdm (1.9+git20181219-1) ...
Processing triggers for man-db (2.9.1-1) ...
$ ldd /usr/bin/fdm
        linux-vdso.so.1 (0x00007ffcfcdd3000)
        libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fc599a6c000)
        libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fc599796000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc59977a000)
        libtdb.so.1 => /lib/x86_64-linux-gnu/libtdb.so.1 (0x00007fc599760000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fc599744000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc599552000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc59952d000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc599527000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc599b4d000)

The Debian package maintainer is @ft and I would be curious to hear his reasoning behind this (particularly if PCRE support was removed at some point in the past).

ft commented 1 year ago

Hi there, indeed I am that person. The debian packaging is actually tracked in here: https://github.com/ft/pkg-fdm

This is unintentional. debian/control still lists libpcre3-dev as a dependency. It's probably debian's tooling that removes the superfluous dependency when it realises that nothing links to it.

I think I broke this in https://github.com/ft/pkg-fdm/commit/a085d6dd0296ce763af14e8adfeddd894277b309 when I ported the old build process to modern debhelper. But nobody seems to have noticed. :)

I'll try and take a look soonish. Thanks for bringing this up!