Index | Thread | Search

From:
Jeremie Courreges-Anglas <jca@wxcvbn.org>
Subject:
Re: pkg_create: @lib without LIBname_VERSION
To:
George Koehler <kernigh@gmail.com>
Cc:
Marc Espie <marc.espie.openbsd@gmail.com>, Andrew Hewus Fresh <andrew@afresh1.com>, Stuart Henderson <stu@spacehopper.org>, ports@openbsd.org
Date:
Thu, 27 Nov 2025 12:58:44 +0100

Download raw body.

Thread
  • Marc Espie:

    pkg_create: @lib without LIBname_VERSION

  • Marc Espie:

    pkg_create: @lib without LIBname_VERSION

  • On Mon, Nov 24, 2025 at 08:11:21PM -0500, George Koehler wrote:
    > I'm looking for oks for this pkg_create diff (from espie, with the
    > \Q$k\E fix).  After jca committed libtalloc on Friday, I can't find
    > any other ports that would break.  (One can find these ports with
    > "make print-plist-all" or databases/pkglocatedb.)  I built only a few
    > ports.  It works with both perl 5.40.1 and 5.42.0.
    > 
    > To recap, the diff prevents a warning in 5.42 from "!$x =~ m/y/", and
    > requires that every @lib in a plist has its ${LIBname_VERSION}.
    
    Makes sense and survived a arm64 bulk build with no fallout (probably
    not needed but better safe than sorry).  ok jca@
    
    PS: could you please zap the stray space after "Incorrectly versioned
    shared library: #1"?
    
    > --gkoehler
    > 
    > Index: OpenBSD/PkgCreate.pm
    > ===================================================================
    > RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm,v
    > diff -u -p -r1.200 PkgCreate.pm
    > --- OpenBSD/PkgCreate.pm	15 Sep 2025 01:59:37 -0000	1.200
    > +++ OpenBSD/PkgCreate.pm	23 Nov 2025 00:35:15 -0000
    > @@ -771,11 +771,13 @@ sub check_version($self, $state, $unsubs
    >  {
    >  	my @l  = $self->parse($self->name);
    >  	if (defined $l[0]) {
    > -		if (!$unsubst =~ m/\$\{LIB$l[0]_VERSION\}/) {
    > -			$state->error(
    > -			    "Incorrectly versioned shared library: #1", 
    > -			    $unsubst);
    > +		my $k = "LIB$l[0]_VERSION";
    > +		my $r = $state->{subst}->do($unsubst, $k);
    > +		if ($r =~ m/\blib\Q$l[0]\E\.so\.\$\{\Q$k\E\}$/) {
    > +			return;
    >  		}
    > +		$state->error("Incorrectly versioned shared library: #1", 
                                                                             ^
    
    -- 
    jca
    
    
  • Marc Espie:

    pkg_create: @lib without LIBname_VERSION

  • Marc Espie:

    pkg_create: @lib without LIBname_VERSION