[FreeBSD-Ports-Announce] HEADS UP: Pkg 1.3.7 will require rebuilding all packages and manual commands on clients recommended

Bryan Drewery bdrewery at FreeBSD.org
Thu Aug 21 16:04:36 UTC 2014


To clarify:

Only people serving packages for distribution need to rebuild so that
their users have fixed packages. If you are running
Poudriere/Tinderbox/Custom and are serving packages to other people or
machines, you should rebuild them on the build system AFTER 1.3.7 is
out. Running pkg check -Ba on the end systems (after upgrading to 1.3.7)
will then prevent needing to reinstall anything.

If you are building from ports then you do not need to rebuild all. You
do not need to reinstall all.

The goal of this announcement is to avoid anyone needing to reinstall
anything unneeded.

Sorry for the inconvenience.

On 8/20/2014 11:27 AM, Bryan Drewery wrote:
> There are 2 parts to this notice. One is strictly for those who build
> their own packages with poudriere or other means. The other part is for
> client-side users of Pkg (including ports users [1]).
> 
> Regardless of which version of Pkg you are on now (1.0, 1.1, 1.2, ...,
> 1.3.4, 1.3.6) it is recommended you follow these steps once upgrading to
> 1.3.7 or later.
> 
> Note that following these directions should only be followed once 1.3.7
> is released in a few days.
> 
> 
> Impact of doing nothing:
> 
> 'pkg upgrade' will suggest reinstalling packages due to 'needed shared
> library changed'. This can result in wasted bandwidth, time and IO on
> your systems. It should eventually work itself out though, but may cause
> various 'pkg upgrade' issues.
> 
> 
> Background:
> 
> Pkg tracks shared libraries that are both required and provided by
> packages. It determines these when building or installing the package.
> This is also true for using ports since it just registers a new package
> on install.
> 
> Before 1.3.0 Pkg would often incorrectly register a shared library with
> the wrong name internally rather than the official SONAME of the
> library. This could result in a library dependency as libname.so.1.2.3
> and the package providing the library advertising libname.so.1. Due to
> packages built from 1.3.0 onwards registering the proper name, the
> upgrade solver had difficulty in finding the proper packages for needed
> shared libraries. A workaround put in place for 1.3.6 was to ignore the
> shlib versions. This was not adequate though. In 1.3.7 we are removing
> the workaround from 1.3.6. There is also a fix in 1.3.7 for Pkg
> sometimes incorrectly registering a package as requiring its own shared
> libraries. This also causes solver confusion.
> 
> 
> Package builders:
> 
> For the sake of your users having proper packages available you should
> remove all existing packages and rebuild them once 1.3.7 is released.
> Poudriere can accomplish this with the '-c' flag to bulk. Or you can
> just remove All/* from your package repository. If your repository is
> using WITH_PKGNG=devel then you can do this now as alpha11 has the fixes.
> 
> 
> Pkg users:
> 
> It is recommended, but not required, to follow these steps once Pkg
> 1.3.7 is available.
> 
> 1. Upgrade Pkg to 1.3.7. Only upgrade Pkg, nothing else.
> 2. As root run 'pkg check -Ba'. This will analyze all of your installed
> packages and fix their registered required/provided shared library
> names. It may take anywhere between 1-15 minutes to complete.
> 3. Proceed with normal upgrade.
> 
> Example automated script:
>   pkg update
>   pkg_local_ver=`pkg query %v ports-mgmt/pkg`
>   pkg_remote_ver=`pkg rquery -U %v ports-mgmt/pkg`
>   # Special handling needed for upgrading <=1.3.6 to 1.3.7+
>   if [ "`pkg version -t ${pkg_local_ver} 1.3.7)`" = "<" ]; then
>     pkg install -Uy ports-mgmt/pkg
>     pkg check -Ba
>   fi
> 
>   # Normal upgrade can proceed...
>   pkg upgrade -Uy
> 
> 
> You might wonder why we do not just force the 1.3.7 upgrade to auto run
> 'pkg check -Ba'. The problem is that 1.3.0-1.3.6 self-upgrade is not
> properly running the new Pkg as it did in 1.2. Thus after 'pkg upgrade'
> self-upgrades to 1.3.7 it would still be running 1.3.6 until you reran
> 'pkg upgrade'. We may still add an automatic check, or periodic scrub
> script, in future versions.
> 
> 
> [1] Ports users:
> 
> If you strictly use ports and not remote packages then it is not
> required that you do anything. However if you do ever decide to switch
> to packages you will face the same 'needed shared library changed'
> message. It is recommend you also run 'pkg check -Ba' after upgrading to
> 1.3.7. It is possible tools such as portmaster may utilize this
> information some day, so it is good to ensure it is recorded properly.
> 

-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports-announce/attachments/20140821/287b01fa/attachment.sig>


More information about the freebsd-ports-announce mailing list