Re: managing symlinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tony Earnshaw wrote:
> install -m 644 db.h %{buildroot}/usr/local/BerkeleyDB.4.2/include
> install -m 644 db_cxx.h %{buildroot}/usr/local/BerkeleyDB.4.2/include
> install -m 755 .libs/libdb* %{buildroot}/usr/local/BerkeleyDB.4.2/lib
> install -m 755 libdb.a %{buildroot}/usr/local/BerkeleyDB.4.2/lib
> pushd %{buildroot}/usr/local/BerkeleyDB.4.2/lib/
>   ln -s libdb-4.2.so libdb.so
> popd

The %install script is run with /bin/sh by default.  You should not be
using pushd and popd there.  Those are not standard commands and would
fail if /bin/sh were a different shell than bash.  And you don't need
them here anyway.

The common idiom is to perform chdirs in a subshell.  Something like this.

 (cd %{buildroot}/usr/local/BerkeleyDB.4.2/lib/ && ln -s libdb-4.2.so libdb.so)

But you don't need to chdir here at all.  Just create the link.

  ln -s libdb-4.2.so %{buildroot}/usr/local/BerkeleyDB.4.2/lib/libdb.so

> tir, 28.06.2005 kl. 17.55 skrev Bob Proulx:
> > That is not the behavior that I am seeing here.  Can you show your
> > spec file?  I do this all of the time and it works for me.
> 
> Could you please comment? I'm open for everything at the moment ...

> %files
> 
> [...]

Uhm, your %files section is completely empty.  You need to list
something there in order to have your symlinks in the package.  This
can't be your actual spec file.

Since you are trying to package the Berkeley DB which has been
packaged many times before, you might try to find another version of
the package and look at the techniques used by the other packager.
Using http://www.rpmfind.net to find another package might be helpful.

Bob


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux