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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Bryan Drewery-6
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


signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Bryan Drewery-6
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


signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[FreeBSD-Ports-Announce] Pkg 1.3.7 out. Special handling recommended to avoid reinstalls.

Bryan Drewery-6
Pkg 1.3.7 is now released. The port is updated. pkg.FreeBSD.org packages
are now published with fixed shared libraries.

It was found that 'pkg update -f' may be required as well.

Here are the updated instructions:

- Binary package users should run 'pkg update -f' and 'pkg check -Ba'
after upgrading to pkg-1.3.7 and before updating any other packages.
This avoids needing to reinstall anything not needed due to changed
shared libraries.
   For binary package users:
    # pkg install ports-mgmt/pkg
    # pkg update -f
    # pkg check -Ba
    # pkg upgrade
   For port users:
    # portsnap fetch update
    # make -C /usr/ports/ports-mgmt/pkg build deinstall install clean
    # pkg check -Ba
- People building packages for serving to other systems need to rebuild
  all packages with 1.3.7.


The previous announcement explaining this in more detail is at
http://lists.freebsd.org/pipermail/freebsd-ports-announce/2014-August/000086.html


--
Regards,
Bryan Drewery


signature.asc (499 bytes) Download Attachment