[Slapt-get-devel] slack-required in Official Slackware Packages

Stefano Stabellini stefano at stabellini.net
Thu Sep 15 12:06:47 EDT 2005


First let me introduce myself:
I'm Italian and I have some little problems with English so be patient :)
I'm a great fan of Slackware and I like slapt-get very much.
I also do some package building work as you can see at linuxpackages.net.
But often I've found hard to handwrite all the dependencies of a package
so I wrote a little tool called requiredbuilder that should help
packages developers writing the slack-required file.
Lets suppose I want to build postfix, after having execute the
Slackbuild I use requiredbuilder to check every file in
/tmp/package-postfix, for example the file
/tmp/package-postfix/usr/libexec/postfix/smtp.
requiredbuilder automatically does the following:

root at desktop:/tmp/package-postfix/usr/libexec/postfix# ldd smtp
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x4002b000)
        libssl.so.0 => /usr/lib/libssl.so.0 (0x40042000)
        libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x40073000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40172000)
        libm.so.6 => /lib/libm.so.6 (0x40183000)
        libpcre.so.0 => /usr/lib/libpcre.so.0 (0x401a6000)
        libdb-4.2.so => /lib/libdb-4.2.so (0x401b7000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4028b000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x402a1000)
        libc.so.6 => /lib/libc.so.6 (0x402b4000)
        libdl.so.2 => /lib/libdl.so.2 (0x403d1000)
        /lib/ld-linux.so.2 (0x40000000)

then for every dependency:

cd /var/log/packages/
root at desktop:/var/log/packages# grep libsasl2.so.2 *
cyrus-sasl-2.1.21-i486-1stb:usr/lib/libsasl2.so.2.0.21

so now requiredbuilder knows that postfix needs the package
cyrus-sasl-2.1.21-i486-1stb in order to run, so it adds
cyrus-sasl-2.1.21-i486-1stb to /tmp/package-postfix/install/slack-required.

Naturally a package developer still can handwrite the slack-required
file and then run requiredbuilder: in this case requiredbuilder keeps
the handwritten dependencies and then adds other dependencies if it
finds any of them.
It isn't written so well but I have used this tool for a little while
and it always worked fine; I think it can be very useful even if it's
important to understand that IT CAN'T SUBSTITUTE THE PACKAGE DEVELOPER
(ldd can't do all the job).

That said, I was thinking if using a tool like that I could write
(almost) all the dependencies of all the official slackware packages,
simply executing a full slackware installation and then tracking the
dependencies of every file of every package installed, looking at
/var/log/packages.
So I have written a little bash script that takes the PACKAGES.TXT from
the official slackware and then adds the PACKAGE REQUIRED line in the
way I explained before.
The script is still in alpha stage: it isn't even online :P

But I can use it to write a new PACKAGES.TXT file with slapt-get support
and then use it to upgrade my system automatically with dependency
support (I'll try this for the first time with slack 10.2, after I
complete the downloads).

Now I have some questions:
are you interested in this subject?
What do you think about?
If I put online a slackware 10.2 version with the PACKAGES.TXT changed
but every .tgz untouched, does slapt-get work (with dependencies)?
I really don't want to fork the distro or to cause any problems so I
don't want to do that sort of things, I was just thinking...

Best regards,

Stefano Stabellini

--
stefano[AT]stabellini.net - http://www.stabellini.net

Perfection is achieved, not when there is nothing more to add, but when
there is nothing left to take away." - Antoine de Saint-Exupery


More information about the Slapt-get-devel mailing list