[aur-general] Easy way to find out package dependencies
Hello, is there an easy way to find out, which package dependencies a package has? Say, i want to write the PKGBUILD for a package, and the compilation on my system (.7configure/cmake and make) does work without problems. Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies. Possibly with ldd the linked stuff can be found out, but the library names not necessarily are the same as the names of the package that provide these libraries. So, it may need some effort to find out the packages. Is there an easy way to find out the package names? Maybe someone already has written a script that reverse-lookups the package names from ldd-output? Any ideas on that? Ciao, Oliver
On Sat, Mar 02, 2013 at 11:35:40PM +0100, oliver wrote:
Hello,
is there an easy way to find out, which package dependencies a package has?
Say, i want to write the PKGBUILD for a package, and the compilation on my system (.7configure/cmake and make) does work without problems.
Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies.
Possibly with ldd the linked stuff can be found out, but the library names not necessarily are the same as the names of the package that provide these libraries.
So, it may need some effort to find out the packages.
Is there an easy way to find out the package names?
Maybe someone already has written a script that reverse-lookups the package names from ldd-output?
Any ideas on that?
Ciao, Oliver
This is probably what you're looking for: https://github.com/falconindy/bin-scripts/blob/master/elf2pkgs You can get a concise list by running this over the pkg/ directory after building: find pkg/ -type f -executable -exec elf2pkgs {} + 2>/dev/null d
On 02/03/2013 23:46, Dave Reisner wrote:
On Sat, Mar 02, 2013 at 11:35:40PM +0100, oliver wrote:
Hello,
is there an easy way to find out, which package dependencies a package has?
Say, i want to write the PKGBUILD for a package, and the compilation on my system (.7configure/cmake and make) does work without problems.
Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies.
Possibly with ldd the linked stuff can be found out, but the library names not necessarily are the same as the names of the package that provide these libraries.
So, it may need some effort to find out the packages.
Is there an easy way to find out the package names?
Maybe someone already has written a script that reverse-lookups the package names from ldd-output?
Any ideas on that?
Ciao, Oliver
This is probably what you're looking for:
https://github.com/falconindy/bin-scripts/blob/master/elf2pkgs
You can get a concise list by running this over the pkg/ directory after building:
find pkg/ -type f -executable -exec elf2pkgs {} + 2>/dev/null
d
Wouldn't it be easier to just use namcap, or am I missing something?
On Sat, Mar 02, 2013 at 11:50:57PM +0100, Johannes Löthberg wrote:
On 02/03/2013 23:46, Dave Reisner wrote:
On Sat, Mar 02, 2013 at 11:35:40PM +0100, oliver wrote:
Hello,
is there an easy way to find out, which package dependencies a package has?
Say, i want to write the PKGBUILD for a package, and the compilation on my system (.7configure/cmake and make) does work without problems.
Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies.
Possibly with ldd the linked stuff can be found out, but the library names not necessarily are the same as the names of the package that provide these libraries.
So, it may need some effort to find out the packages.
Is there an easy way to find out the package names?
Maybe someone already has written a script that reverse-lookups the package names from ldd-output?
Any ideas on that?
Ciao, Oliver
This is probably what you're looking for:
https://github.com/falconindy/bin-scripts/blob/master/elf2pkgs
You can get a concise list by running this over the pkg/ directory after building:
find pkg/ -type f -executable -exec elf2pkgs {} + 2>/dev/null
d
Wouldn't it be easier to just use namcap, or am I missing something?
Probably. I run pacman from git, so namcap doesn't work for me.
Actually, remy just applied a patch to fix pyalpm compilation, and you can use this PKGBUILD to get it working with pacman-git: https://github.com/neersighted/PKGBUILDs/blob/master/pyalpm-pacman41-git/PKG... On Sat, Mar 2, 2013, at 03:01 PM, Dave Reisner wrote:
On Sat, Mar 02, 2013 at 11:50:57PM +0100, Johannes Löthberg wrote:
On 02/03/2013 23:46, Dave Reisner wrote:
On Sat, Mar 02, 2013 at 11:35:40PM +0100, oliver wrote:
Hello,
is there an easy way to find out, which package dependencies a package has?
Say, i want to write the PKGBUILD for a package, and the compilation on my system (.7configure/cmake and make) does work without problems.
Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies.
Possibly with ldd the linked stuff can be found out, but the library names not necessarily are the same as the names of the package that provide these libraries.
So, it may need some effort to find out the packages.
Is there an easy way to find out the package names?
Maybe someone already has written a script that reverse-lookups the package names from ldd-output?
Any ideas on that?
Ciao, Oliver
This is probably what you're looking for:
https://github.com/falconindy/bin-scripts/blob/master/elf2pkgs
You can get a concise list by running this over the pkg/ directory after building:
find pkg/ -type f -executable -exec elf2pkgs {} + 2>/dev/null
d
Wouldn't it be easier to just use namcap, or am I missing something?
Probably. I run pacman from git, so namcap doesn't work for me.
-- Neer Sighted, Hacker http://neersighted.com | neersighted@myopera.com {01DC2056}
On Sat, Mar 2, 2013 at 5:35 PM, oliver <oliver@first.in-berlin.de> wrote:
Hello,
is there an easy way to find out, which package dependencies a package has?
Say, i want to write the PKGBUILD for a package, and the compilation on my system (.7configure/cmake and make) does work without problems.
Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies.
Possibly with ldd the linked stuff can be found out, but the library names not necessarily are the same as the names of the package that provide these libraries.
So, it may need some effort to find out the packages.
Is there an easy way to find out the package names?
Maybe someone already has written a script that reverse-lookups the package names from ldd-output?
Any ideas on that?
Ciao, Oliver
You can install devtools and use extra-{x86_64,i686}-build instead of directly using makepkg, which will build in a Linux container and won't let you miss any dependencies.
On 03.03.2013 09:59, Daniel Micay wrote:
On Sat, Mar 2, 2013 at 5:35 PM, oliver <oliver@first.in-berlin.de> wrote:
Hello,
is there an easy way to find out, which package dependencies a package has?
Say, i want to write the PKGBUILD for a package, and the compilation on my system (.7configure/cmake and make) does work without problems.
Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies.
Possibly with ldd the linked stuff can be found out, but the library names not necessarily are the same as the names of the package that provide these libraries.
So, it may need some effort to find out the packages.
Is there an easy way to find out the package names?
Maybe someone already has written a script that reverse-lookups the package names from ldd-output?
Any ideas on that?
Ciao, Oliver
You can install devtools and use extra-{x86_64,i686}-build instead of directly using makepkg, which will build in a Linux container and won't let you miss any dependencies.
This would only work if there is some kind of already existing PGKBUILD, but I think he tries to write one from scratch for a software not yet in the official repos or the AUR. Using namcap and elf2pkgs is then the best solution to figure out the corresponding packages in the repos. HTH, Christoph
This would only work if there is some kind of already existing PGKBUILD, but I think he tries to write one from scratch for a software not yet in the official repos or the AUR.
Using namcap and elf2pkgs is then the best solution to figure out the corresponding packages in the repos.
HTH, Christoph
Well, the way I interpreted this was that he was already able to put it together, and was wondering how to find the dependencies without ldd and guesswork:
Say, i want to write the PKGBUILD for a package, and the compilation on my system (.7configure/cmake and make) does work without problems.
Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies.
On Sun, Mar 03, 2013 at 04:06:18AM -0500, Daniel Micay wrote:
This would only work if there is some kind of already existing PGKBUILD, but I think he tries to write one from scratch for a software not yet in the official repos or the AUR.
Using namcap and elf2pkgs is then the best solution to figure out the corresponding packages in the repos.
HTH, Christoph
Well, the way I interpreted this was that he was already able to put it together, and was wondering how to find the dependencies without ldd and guesswork:
Say, i want to write the PKGBUILD for a package, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and the compilation on my system (.7configure/cmake and make) does work without problems.
The ./configure or cmake followed by make, as described in the README/INSTALL of a source package.
Then I don't get a message about missing libraries. So, it's easy to compile the stuff, but needs some effort to find out the dependencies.
I don't get a message, if the needed libs are installed, but I have to figure out, which must be inserted into the PKGBUILD. Hope, that clarifies my intent. If a package really is missing, this (hoipefully) will be reported clearly. In this case, it's easier to figure out whats missing. Ciao, Oliver
On Sun, Mar 03, 2013 at 10:02:57AM +0100, Christoph Vigano wrote: [...]
This would only work if there is some kind of already existing PGKBUILD, but I think he tries to write one from scratch for a software not yet in the official repos or the AUR. [...]
Yes, that's correct. I start with the sources and a PKGBUILD-template from another project.
Using namcap and elf2pkgs is then the best solution to figure out the corresponding packages in the repos.
OK. So I can use the build mechanism from the original sources, and then use elf2pkgs and/or namcap and it gives me the pkgnames? These then I can put into the PKGBUILD and things should work. If this is the recipe, i will try it... Ciao, Oliver
On 03/03/2013 04:13 PM, oliver wrote:
On Sun, Mar 03, 2013 at 10:02:57AM +0100, Christoph Vigano wrote:
Using namcap and elf2pkgs is then the best solution to figure out the corresponding packages in the repos.
OK.
So I can use the build mechanism from the original sources, and then use elf2pkgs and/or namcap and it gives me the pkgnames? These then I can put into the PKGBUILD and things should work.
If this is the recipe, i will try it...
Ciao, Oliver
Pretty much. Check out https://wiki.archlinux.org/index.php/Creating_Packages#Testing_the_PKGBUILD_... -- Kindest Regards, Johannes Löthberg PGP Key ID: 583664EF Fingerprint: 14FD DCA8 4D41 FF41 78EF DD49 35CA 3661 5836 64EF
participants (7)
-
Christoph Vigano
-
Daniel Micay
-
Dave Reisner
-
Johannes Löthberg
-
Johannes Löthberg
-
Neer Sighted
-
oliver