SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well it certainly won't be something that is 'wham bam' done over night. It is a project. It will evolve as time goes on. It won't be much when it opens but it'll get the ball rolling.
I have found a host. I have not setup everything yet though. I am still waiting on a few things, real life stuff
But as I said, there should be a site within the next few weeks. At least, that is the time frame I am looking at to get this started so people can start contributing their ideas. I'm really insterested in what people will contribute, or at least their comments.
As a newbie , i think this thing can teach me a lot of stuff.
and by "me" i mean all the newbies (:P)
Wish this thing will go on a few years till one day i could contribute myself.
I would like to see this aswell. Earlier I wanted to read about every package to find out what it does and why it is needed. As I got a cheep SSD disk as / and /home I don't have much spare storage space on those partitions (The SSD is 80GB). Therefor I would like a working minimalized desktop system. But the DVD contain so many packages and getting an overview of the system as a whole is a huge task. I had some pretty good tagfiles that stripped my installation to ~2-3GB with desktop and everything. (Shame on me for not checking my backup :P). With a full installation (And some extra apps like mplayer, openoffice etc) my installation is 7GB, and use 50% of my root partition (/ is 15GB). I don't like that, because it's at least 3GB wasted space.
So, instead of me getting an overview, I want to use my computer (It's a tool, isn't it? ) to do this. Currently I've made a script where you can enter a package, and every dependencies that package would need (Using ldd on included binaries and libraries) is printed. It doesn't print a dependency as a file, but as a package. (This needs a full installation obviously). My plan was to make a new file for every package containing the dependent packages for this single package. So when building a system from scratch you could use these files as a guideline by seeing what you want, and take care of the dependencies afterwards. (Perhaps even generate tagfiles based on what you want to include and depencencies are taken care of, but this is in any case a longterm project)
But as I've worked with this script, I realized two things. First, using a bash-script is _incredible_ slow and I should be wring it as a c(++) program (But I'm not going to. Atleast not for a long while). Initially my plan was that any one that would be interested in such a script/minimal system would be running this for them selves and eventually it would print out a list of unused packages based upon packages the user said he wanted. But because it is so slow, I think I have to make a general list of dependencies and upload them somewhere (As described above). The problem now is of course the problems when one wants to install packages which is not included in a standard slackware system after it is stripped.
And second, every package seem to need a lot of strange dependencies. And frankly I believe that many of the deps actually can be excluded even tho ldd says its dependent upon a particular lib. Could this be? Is there anyone out there that could confirm this?
I.e.
ldd /usr/bin/fbrun
(Fluxbox run popup thingy)
is dependent upon libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb7d1a000)
Is this really the case? I understand that it obliviously depending on gcc to compile, but to run?
So generally if this can't be "trusted", I need to find a different approach. Does anyone have any tricks up there sleeves? Or an idea how to do this? Would there be an interest for such a project? If my approach would work. Does anyone have an effective way of using this data I generate? Should the dep-file contain the dependencies of the dependencies, or should that be a user-opperation? Any suggestions/thoughts around this is more then welcome.
Dependency on gcc_s.so is common for programs written in C++. The lib is part of the gcc package, but is also include in aaa_elflibs.
There is a perl program called slackdeptrack which does the same thing your bash script sounds like it does. It is probably somewhat faster than uisng bash. Still, I'd like to see your bash script, if you could post it here. I have similar code in my src2pkg program which finds out what packages a newly-built package depends on.
I wouldn't even try to list depends recursively -that could take ages and ages. Plus, any program which proposed to resolve the dependencies or anything, would take care of that.
No system for Slackware will work perfectly simply because the system for tracking and listing depends must be closely tied to the content of the packages themselves. And since Slackware doesn't make any changes to make this easier, you are stuck creating code work-arounds.
The case you mention gcc_s.so is a good example -it'S the only 'duplicate' library which is part of aaa_elflibs which isn't also supplied by some other, fairly small, package. What I'm getting at is this: showing dependencies on aaa_elflibs is not a good idea, but if you don't, then gcc_s.so will resolve to show dependency on the gcc package. For a runtime-only system (without development tools), this doesn't make any sense.
Or simply install src2pkg and you'll find it in /usr/libexec/src2pkg/14-make_doinst
Since my code is not stand-alone, it may be a little harder to get a hold on what it is doing, but it does show some ways to handle exceptional cases -mostly dealing with the aaa_elflibs situation. My code, by default, also ignores dependency on glibc. Basically, if slackware packaged gcc_s.so separately, you could ignore aaa_elflibs completely and listed depends would make more sense without turning so complex.
I'd like to see your stand-alone code -I may be able to suggest some tweaks that would speed it up a bit.
Thank you gnashley for your informative post. I wasn't aware of that perl solution. I have no doubt that it will be faster then bash. I will certainly check it out. No reason to re-invent the wheel
For those who might be interested in the script. Note that it is really buggy. It doesn't (atleast yet) work as intended, and it's slow. I'm not a very good scripter either, but I know enough to do some simple ineffective things.
Code:
#!/bin/bash
#Usage: ./something <complete_packagename> (As listed in /var/log/packages/, but without path)
#This first piece of code search trough every file and sort out lines
#with bin/libs and checks that it actually is an executable.
PKG=$1
for i in $(cat /var/log/packages/$pkg); do
tmp=/$(echo $i | grep -e bin -e lib)
if [ -f $tmp ] && [ -x $tmp ] ; then
#If it is an executable it searches for packages
#containing every library needed for every executable.
ldd $tmp > libs.tmp
for j in $(cat libs.tmp | cut -d ' ' -f 1); do
grep $j /var/log/packages/* | cut -d ':' -f 1 >> pkg.tmp
done #Search for packages
fi #Check that its an executable
done #Searching trough package
#To print only unique packages, the list needs to
#be sorted because of the way uniq works.
sort -u pkg.tmp | uniq -u
rm libs.tmp pkg.tmp
This is something i cooked up when I was bored at work. I've done some testing after I got home now, and it seems to be buggy. First I haven't done anything about your suggestions (yet). And this won't actually work as intended. The main reason is because it doesn't take into account that several packages can include the same libraries. So therefor it will display more packages then I would actually need. In some situations it displays a lot of packages where it actually really need one of them.
Last edited by Dinithion; 05-24-2009 at 09:34 AM.
Reason: Added how to use the script
In terms of micro-Slack... isn't Slax closely based on Slackware 12.2?
The problem as I see it is to generate a base list of slackware packages to install from the standard disks. For me, a minimal system includes Xorg and slapt-get. I can install the rest myself as need be.
My intention is to boot up slax, deactivate all the lzm modules except the base and xorg modules, and printout the remaining packages from /var/log/packages. Maybe cull or add the list a bit?
I can then use that list as a guide to install normally from the slackwware install disks. Or is that not a good plan?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.