pkgsrc-Users archive

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

Re: 'make package' packing wrong binaries?



"John D. Baker" <jdbaker%consolidated.net@localhost> writes:

> When packages are rebuilt, however, I've been having the problem that the
> binary installed in 'make replace' uses the newer version of the library,
> but the binary that was packaged uses the old version of the library.  Thus,
> when I go to install/update that package on a system which never had the
> old version of the library, the installation (or worse, the update) fails.

This seems very strange.   It is not making sense to me because make
package basically tars up what is in work/.destdir, and make replace
basically does pkg_add -u with the package that was just created.  There
is a wrinkle that make replace uses the package in work/.something, and
make package not only creates that but copies it.

So double check that your permissions are ok, that there are no errors,
etc.  After make package, compare the packages/All/foo-x.y.tgz to the
one in work/.

My guess is that you aren't actually storing a new package.


Beyond that, I suggest that you inspect the intermediate files
carefully, including "ls -l" to verify modification times.

Specifically:

  After 'make install', look in work/.destdir, find the binaries, use
  objdump -x and ldd

  after make package, unpack the newly created package someplace and
  again use objdump-x/ldd.

  before make replace, inspect the binaries on your system

  after make replace, again inspect the binaries on your system

and depending  on what you find, perhaps something else.


> The most common offender is "security/sudo".  The binary installed on the
> build host in 'make replace' uses "/usr/lib/libcrypto.so.16", but the binary
> that was packaged uses "/usr/lib/libcrypto.so.15".  Then when I use that
> package to update another machine which only has "libcrypto.so.16", the
> old version of sudo is removed and the update fails and I'm left without
> 'sudo'.
>
> More recently, "ups-nut" has done the same thing, but with "libssl.so*".
> The binaries installed on the build host during 'make replace' use the
> current "libssl.so.16", but the binaries that were packaged use
> "libssl.so.15".
>
> Going back and running 'make package' again packages binaries using the
> correct libraries.  So it looks like the package-creation stage of at
> least "sudo" and "ups-nut" are packaging the binaries that are installed
> (before "replace" happens) instead of the binaries that were installed to
> ".destdir".


Home | Main Index | Thread Index | Old Index