Script to get/set dependencies/required packages in a slackbuild
1 Attachment(s)
To get the dependencies of my packages, i used to use "requiredbuilder", but
it does not exactly what i want to. So, i wrote my own "get_deps.sh" which does the following:
Code:
... Feedback is welcome :-) |
Nice :)
I was giving it a try since my own buildscripts have support for installed requiredbuilder and will create a slack-required if requested. I don't know much about package managers and slack-required files, the code that is included in my buildscripts is mature and i do not use it myself anymore. Two questions: getdeps will produce a slack-required file like that: Code:
glibc-solibs,libdvdread Code:
glibc-solibs Code:
glibc-solibs >= 2.17-x86_64-10_slack14.1 I did another test for ffmpeg: requiredbuider: Code:
alsa-lib Code:
alsa-lib,bzip2,faac,glibc-solibs,jack,lame,libX11,libXext,libXv,libtheora,libva,libvdpau,libvorbis,libvpx,libwebp,libxcb,openjpeg2,opus,sdl,speex,twolame,x264,x265,xvidcore,xz,zlib Code:
--- slack-required.requiredbuilder 2016-01-09 19:31:22.699107496 +0100 |
That package is already included in slackware packages i believe
|
Quote:
I have a smiliar script but that is not like getdeps, it just checks all packages installed for bin/lib-files and their dependencies. I'm using ldd but the OP said he is using readelf. So me is just interested in his script (and maybe a replacement of requiredbuilder which is not maintained anymore... AFAIK) and the differences between ldd and readelf -d. |
@franzen : again, nice job :cool:
I just compared requiredbuilder with getdeps for ffmpeg: requiredbuilder: Quote:
Quote:
|
Quote:
Quote:
Quote:
ffmpeg actually has no dependency e.g. on db48, ffmpeg depends on a package that depends on db48. While this will for now work to install ffmpeg, it might not work if the repo is combinded with the next slackware-release, as dependencies might have changed/packages removed and so on. You might be forced to rebuild working software, not for a new version, but that the required-string is correct again. |
Quote:
|
Quote:
http://a4z.bitbucket.org/docs/sbbdep...e_query_option in this way it's possible to include it in a build I think it will be even faster, with the right options for sure and more correct, since it checks also for some internals, eg just including a required lib in a package does not necessary mean it will be found, on the other hand also files can be found that are not in a linker path but somewhere else on the system. whole documentation: http://a4z.bitbucket.org/docs/sbbdep/ I am moving the doc from here to the new location , so if something missing, check here https://bitbucket.org/a4z/sbbdep/wiki/Home |
Some tools parse the .info file for dependencies from the SBo tree.
Mostly everything already in the main Slackware tree is generally not listed. |
Quote:
that i wanted to get from my get_dep-script. Unfortunately, i can't build it on slackware 14.1, i used the instructions from your slackbuilds-buildscript, make says: Code:
[ 3%] Building CXX object CMakeFiles/sbbdep.dir/src/sbbdep/cache.cpp.o Quote:
In the installed packages, it only searches for deps which are in /etc/ld.so.conf, as the libs have to be located there to work with ldconfig and so on. If libs are somewhere in the package, this should be corrected when building a package, in my opinion. Question to sbbdep: according to your docs, it will for my usecase output something like this: Code:
[~]$sbbdep --quiet --short /var/adm/packages/boost-1.49.0-x86_64-3 aaa_elflibs should be avoided to be a dependency-package where possible, as the containing libs will never get (security)updates until the next slackware-release. Therefore i remove the "or-pipes" and aaa_elflibs in my script, if the dependency is covered by another package. Do you agree with that, or is there another intention to add aaa_elflibs? |
Quote:
Beside aaa_elflibs,cxxlibs and preferred solibs-packages, "sbbdep --quiet --short" seems to give me the same output as my script does. Sbbdep is very fast, if one doesn't take in account the initial indexing. Does the index get updated, if there are new/updated packages in /var/log/packages/ ? Sbbdep will help me with many tasks, thank you very much for creating such a great tool :cool: For my usecase described in the first post, i think will stick to my script, as i wanted to replace the external dependency(requiredbuilder) from my build-tools by bash-code, and i would have to "sed" the output of sbbdep to get what i want. |
sbbdep is also available via slackbuilds.org, you can have a look at the build script in how to use the options(or not to set the CMAKE_CXX_FLAGS ;-)
http://slackbuilds.org/repository/14...?search=sbbdep the index updates automatically, except if you disable it explicit via option of course. so after install/remove/update its good to not disable it at least once or run it without any options to just refresh the cache after install/remove/update. if there is nothing to update, the internal check does not take to much time, on ssd it's nearly irrelevant, on hds it depends if files are in the cache or not if it is measurable. I have to think about the aaa_elflibs, good that you mention this, thanks. maybe Slackware should care about the aaa_elflibs since it can, and therefore IMHO shoud be updated, see this thread. http://www.linuxquestions.org/questi...ge-4175537158/ not sure about the cxxlibs name, the salix dep files contain them, and as the aaa_elflibs, if you want a minimal installation you can use them. and both packages might be a real alternative for a minimum install I have to do some research for those packages, I already know that my personal opinion is that the distribution has to keep them actual, but my opinion might be for sure irrelevant. do you want to file an issue? https://bitbucket.org/a4z/sbbdep/issues it's not a big deal to avoid these packages, or enable user filter in general what might be the better way |
1 Attachment(s)
Quote:
My scripts do now support requiredbuilder and sbbdep. The missing feature in sbbdep from requiredbuilder using ADD or EXCLUDE to modify the slack-required file is a pitty but i added some code to emulate that missing feature. While i'm still interested in the get_deps.sh script it looks like this script does support that in the same way as requiredbuilder does. Since no one was able to answer my question about the comma-separated list of dependencies i modified the get_deps.sh script, see attached patch. I also added some code to add the version of the dependency, just use get_deps.sh --version. Default output: Code:
ffmpeg Code:
ffmpeg >= 2.8.3-x86_64-1slp Code:
--- get_deps.sh.orig 2016-01-10 07:49:56.000000000 +0100 |
Quote:
avoiding additional "find"s for better performance. The comma-separated list has no real technical difference to multiple rows, so far i know. But if listet in an a PACKAGES.TXT in a repository, i think it disturbs if there are hundreds of extralines. |
Quote:
One of the ideas of aaa_elflibs is to avoid upgrade-issues, so old libraries will have to there, also if newer versions gonna be added. It will grow if is has to contain "everything", which isn't very suitable for a minimal install i think. |
All times are GMT -5. The time now is 07:40 AM. |