Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2014 11:27:37 -0500
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports@FreeBSD.org, pkg@FreeBSD.org
Subject:   HEADS UP: Pkg 1.3.7 will require rebuilding all packages and manual commands on clients recommended
Message-ID:  <53F4CC79.5000607@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--goqP9LIaLMvlJuh91T8kFTTU9U6VSeSmR
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

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=3Ddevel then you can do this now as alpha11 has the fixe=
s.


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=3D`pkg query %v ports-mgmt/pkg`
  pkg_remote_ver=3D`pkg rquery -U %v ports-mgmt/pkg`
  # Special handling needed for upgrading <=3D1.3.6 to 1.3.7+
  if [ "`pkg version -t ${pkg_local_ver} 1.3.7)`" =3D "<" ]; 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.

--=20
Regards,
Bryan Drewery


--goqP9LIaLMvlJuh91T8kFTTU9U6VSeSmR
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iQEcBAEBAgAGBQJT9Mx5AAoJEDXXcbtuRpfPFdsIAKmvl5r8dq29yppU9EqDXGRE
7oj3wyG+5iZdstf46VRTqnpR4jiUUKEAkFsPWtgouRzV4CL08lRfqlY9MQAJn4X0
tW4anbLFWvFCBcMpjqKuW/8p+YztlJQ4ScnM7xT1ZLh5/vtaelBLnT67z1vxgaSk
2+rS14ohY2mAbm0eh94mDKVlDzsHgoCNTYIrvXx/+r4zwfPSevvpb4MyeE0tCxgy
bF/ip5/VNtAJ/w2XVQNRydxVl6VPbDOTNHJajezVL80TLTU6D4yzmKJD0PI3aV5K
GE2V+Up9OPzZhC1WFi2vYoey3h0R8VJORQ7ln0zRDbH3q70YNPFAWD3pkPdVfts=
=FYDF
-----END PGP SIGNATURE-----

--goqP9LIaLMvlJuh91T8kFTTU9U6VSeSmR--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53F4CC79.5000607>