* inst not installing library dependencies of shared objects
@ 2011-01-25 2:59 Jon Ander Hernandez
[not found] ` <AANLkTimXftdnoFMyoHHKF3H4B+x46Hpf8tJbYBEz5QwC-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jon Ander Hernandez @ 2011-01-25 2:59 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Hello,
I'm trying to add plymouth support to dracut on Ubuntu, and I'm having
some troubles because some files
(/lib/plymouth/{script.so,renderers/drm.so,...}) are not executable
(as Fedora does for example), and that makes inst not install some
libraries as libpng, libply-splash-graphics.so.2...
Any suggestions?
Thanks in advance,
JonAn.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: inst not installing library dependencies of shared objects
[not found] ` <AANLkTimXftdnoFMyoHHKF3H4B+x46Hpf8tJbYBEz5QwC-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-01-26 20:47 ` Jon Ander Hernandez
[not found] ` <AANLkTi=jb1_kyzDLisXnMigs6aCyuG2eQhvVGhQHZTqs-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jon Ander Hernandez @ 2011-01-26 20:47 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
Hello,
2011/1/25 Jon Ander Hernandez <jonan.h-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> Hello,
>
> I'm trying to add plymouth support to dracut on Ubuntu, and I'm having
> some troubles because some files
> (/lib/plymouth/{script.so,renderers/drm.so,...}) are not executable
> (as Fedora does for example), and that makes inst not install some
> libraries as libpng, libply-splash-graphics.so.2...
I modified inst_binary to also act with non-executable shared objects.
I have also fixed a bug when installing a libraries whose directory
links to another directory (better explained which commands) :
$ ldd `which bash` | grep ld
/lib64/ld-linux-x86-64.so.2 (0x00007fa1cc3ff000)
$ readlink -f /lib64/ld-linux-x86-64.so.2
/lib/ld-2.12.1.so
So inst_library /lib64/ld-linux-x86-64.so.2 was doing :
(cd "/tmp/initramfs.4uaeD9/lib64" && ln -s "/lib/ld-2.12.1.so"
"ld-linux-x86-64.so.2")
But, /tmp/initramfs.4uaeD9/lib64 -> /lib... :-S
diff --git a/dracut-functions b/dracut-functions
index 2232dc9..473c68c 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -299,6 +299,8 @@ inst_library() {
lib=${src##*/}
inst_simple "$reallib" "$reallib"
inst_dir "${dest%/*}"
+ [[ -L ${initdir}${dest%/*} ]] && \
+ dest=$(readlink -f ${initdir}${dest%/*})/
(cd "${initdir}${dest%/*}" && ln -s "$reallib" "$lib")
else
inst_simple "$src" "$dest"
@@ -317,7 +319,9 @@ inst_library() {
# search in the usual places to find the binary.
find_binary() {
local binpath="/bin /sbin /usr/bin /usr/sbin" p
- [[ -z ${1##/*} && -x $1 ]] && { echo $1; return 0; }
+ [[ -z ${1##/*} ]] &&
+ ( [[ -x $1 ]] || ( [[ -e $1 ]] && file $1 | grep -q "shared
object.*dynamically linked" )) &&
+ { echo $1; return 0; }
for p in $binpath; do
[[ -x $p/$1 ]] && { echo "$p/$1"; return 0; }
done
Regards,
JonAn.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: inst not installing library dependencies of shared objects
[not found] ` <AANLkTi=jb1_kyzDLisXnMigs6aCyuG2eQhvVGhQHZTqs-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-02-17 9:52 ` Harald Hoyer
0 siblings, 0 replies; 3+ messages in thread
From: Harald Hoyer @ 2011-02-17 9:52 UTC (permalink / raw)
To: Jon Ander Hernandez; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
Am 26.01.2011 21:47, schrieb Jon Ander Hernandez:
> Hello,
>
> 2011/1/25 Jon Ander Hernandez <jonan.h-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>> Hello,
>>
>> I'm trying to add plymouth support to dracut on Ubuntu, and I'm having
>> some troubles because some files
>> (/lib/plymouth/{script.so,renderers/drm.so,...}) are not executable
>> (as Fedora does for example), and that makes inst not install some
>> libraries as libpng, libply-splash-graphics.so.2...
>
> I modified inst_binary to also act with non-executable shared objects.
>
> I have also fixed a bug when installing a libraries whose directory
> links to another directory (better explained which commands) :
>
> $ ldd `which bash` | grep ld
> /lib64/ld-linux-x86-64.so.2 (0x00007fa1cc3ff000)
>
> $ readlink -f /lib64/ld-linux-x86-64.so.2
> /lib/ld-2.12.1.so
>
> So inst_library /lib64/ld-linux-x86-64.so.2 was doing :
>
> (cd "/tmp/initramfs.4uaeD9/lib64" && ln -s "/lib/ld-2.12.1.so"
> "ld-linux-x86-64.so.2")
>
> But, /tmp/initramfs.4uaeD9/lib64 -> /lib... :-S
>
> diff --git a/dracut-functions b/dracut-functions
> index 2232dc9..473c68c 100755
> --- a/dracut-functions
> +++ b/dracut-functions
> @@ -299,6 +299,8 @@ inst_library() {
> lib=${src##*/}
> inst_simple "$reallib" "$reallib"
> inst_dir "${dest%/*}"
> + [[ -L ${initdir}${dest%/*} ]] && \
> + dest=$(readlink -f ${initdir}${dest%/*})/
> (cd "${initdir}${dest%/*}" && ln -s "$reallib" "$lib")
> else
> inst_simple "$src" "$dest"
> @@ -317,7 +319,9 @@ inst_library() {
> # search in the usual places to find the binary.
> find_binary() {
> local binpath="/bin /sbin /usr/bin /usr/sbin" p
> - [[ -z ${1##/*} && -x $1 ]] && { echo $1; return 0; }
> + [[ -z ${1##/*} ]] &&
> + ( [[ -x $1 ]] || ( [[ -e $1 ]] && file $1 | grep -q "shared
> object.*dynamically linked" )) &&
> + { echo $1; return 0; }
> for p in $binpath; do
> [[ -x $p/$1 ]] && { echo "$p/$1"; return 0; }
> done
>
> Regards,
>
> JonAn.
Thanks! Pushed.. Let me know, if
http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commitdiff;h=81c6e7fb69a0b7ef5169d13f8b4a4025db923ead
works also for you.
The other patch is:
http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commitdiff;h=172d85b9c949b321771d63dbd5f06ecf19cf94f0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-17 9:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-25 2:59 inst not installing library dependencies of shared objects Jon Ander Hernandez
[not found] ` <AANLkTimXftdnoFMyoHHKF3H4B+x46Hpf8tJbYBEz5QwC-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-26 20:47 ` Jon Ander Hernandez
[not found] ` <AANLkTi=jb1_kyzDLisXnMigs6aCyuG2eQhvVGhQHZTqs-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-17 9:52 ` Harald Hoyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox