tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Samba (3.x) getting rid of Perl



I was testing cross-compilation with pkgsrc some days ago and there are
cases where it can't succeed: when the program depends for running on
a package that tries, when building, to run an executable it creates.

Amongst these pkg freaks, there is Perl.

Samba (the 3.x series; 4.x with Python is another story) depends on Perl
only for one thing if I'm not mistaken:

$ pkg_info -L samba\
	| sed -n '/\/bin\//p'\
	| while read bin; do file $bin; done\
	| fgrep -i perl

/usr/pkg/bin/findsmb: Perl script text executable

This script uses Perl mainly because of gethostbyaddr; all the rest
could be done in a POSIX Bourne shell script using tmp files for arrays
(lists).

I have discovered that, on NetBSD from 7.0, getaddrinfo(1) was added
allowing to access by script this kind of information.

I wonder if it could be useful to provide a gethostbyaddr(1)---this
could be as simple as using getent(1) and dig(1) in a script---for a
general usage.

Even if creating such an utility would not be seen useful, it is indeed
possible to replace the only Perl dependant script in Samba by a POSIX
bourne shell script, dropping the run dependency on Perl. (Allowing then
cross-compilation or even simply dropping an unneeded dependency even
when compiling natively).

What is the sentiment of others about this?
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index