Download raw body.
pkg_create: @lib without LIBname_VERSION
On Wed, Nov 12, 2025 at 10:55:16AM +0000, Stuart Henderson wrote:
> I'd appreciate leaving the python libname craziness as-is until 3.13 is in :)
And so, once python 3.13 is in (hopefully soon !!!)
This does take care of actually matching the libname against the actual
substituted variables, simply by matching the unsubst value against the
pattern we want, and just doing a substitute on that to expand any
variables we may need.
Thus fixing libtalloc.
Index: OpenBSD/PkgCreate.pm
===================================================================
RCS file: /vide/cvs/src/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm,v
diff -u -p -r1.167 PkgCreate.pm
--- OpenBSD/PkgCreate.pm 26 Jan 2020 12:50:17 -0000 1.167
+++ OpenBSD/PkgCreate.pm 12 Nov 2025 12:22:30 -0000
@@ -792,15 +792,19 @@ package OpenBSD::PackingElement::Lib;
sub check_version
{
my ($self, $state, $unsubst) = @_;
- my @l = $self->parse($self->name);
+ $state->{has_libraries} = 1;
+ 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);
+ if ($unsubst =~ m/\$\{LIB(.*?)\_VERSION\}$/) {
+ my $name = $state->{subst}->do($1);
+ if ($name eq $l[0]) {
+ return;
+ }
}
+ $state->error("Incorrectly versioned shared library: #1", $unsubst);
} else {
$state->error("Invalid shared library #1", $unsubst);
}
- $state->{has_libraries} = 1;
}
package OpenBSD::PackingElement::DigitalSignature;
@@ -1253,7 +1257,7 @@ sub read_fragments
# XXX some things, like @comment no checksum, don't produce an object
my $o = &$cont($s);
if (defined $o) {
- $o->check_version($state, $s);
+ $o->check_version($state, $l);
$self->annotate($o, $l, $file);
}
}
pkg_create: @lib without LIBname_VERSION