On Fri, 16 Oct 2026 11:11:26 +0200
Marc Espie <[email protected]> wrote:

> On Fri, Oct 16, 2026 at 07:57:44AM +0100, Stuart Henderson wrote:
> > Could this be done as a suffix rather than a prefix or is that just
> > going to be too messy? ("debug" is definitely too generic in this
> > position, but e.g. "squid-7.7p0v0-krb5-dbg").
> How about this ?

I built my first few debug packages with your debug-suffix diff,

7zip-26.03p0.tgz
7zip-debug-26.03p0.tgz
7zip-rar-26.03p0.tgz
7zip-rar-debug-26.03p0.tgz
minivmac-36.04p5.tgz
minivmac-debug-36.04p5.tgz
minivmac-ii-36.04p5.tgz
minivmac-ii-debug-36.04p5.tgz
minivmac-m128k-36.04p5.tgz
minivmac-m128k-debug-36.04p5.tgz

1: we have a package bochs-3.1p1-debug.tgz; its debug package would
have the confusing name bochs-debug-3.1p1-debug.tgz.

2: /var/db/pkg/7zip-debug-26.03p0/+CONTENTS says,

@conflict debug-7zip-*
@conflict debug-p7zip-*

but debug-7zip is still not a legal package name.  The line hasn't
caused a problem; it just looks wrong.

People trying 7zip-debug can apply my 7zip diff at the end of this
mail, as it adds DEBUG_PACKAGES and removes a cc -s that would strip
the debug info.
--gkoehler

> Index: infrastructure/bin/build-debug-info
> ===================================================================
> RCS file: /build/data/openbsd/cvs/ports/infrastructure/bin/build-debug-info,v
> diff -u -p -r1.50 build-debug-info
> --- infrastructure/bin/build-debug-info       2 Jul 2026 15:38:45 -0000       
> 1.50
> +++ infrastructure/bin/build-debug-info       16 Oct 2026 09:08:08 -0000
> @@ -140,11 +140,11 @@ sub write_debug_info($self, $base, $fh, 
>  
>  sub write_debug_entry($self, $fh, $dir, $dbg, $o)
>  {
> -     print $fh $dbg, "\n";
>       if (!exists $o->{dirstash}{$dir}) {
>               print $fh $dir, "\n";
>               $o->{dirstash}{$dir} = 1;
>       }
> +     print $fh $dbg, "\n";
>       $o->{ostash}{$dbg} = 1;
>       delete $o->{empty};
>  }
> @@ -269,7 +269,11 @@ for my $l (@{$self->{lists}}) {
>       $name = $state->{pkgdir}."/".(basename $name);
>       my $fh = $state->openfile($name);
>       $self->{first_cwd} = 1;
> -     $l->olist->write_debug_info($base, $fh, $self);
> +
> +     my $p = $l->olist;
> +     say $fh "\@conflict ", "debug-", 
> +         OpenBSD::PackageName::splitstem($p->pkgname), "-*";
> +     $p->write_debug_info($base, $fh, $self);
>       close($fh) or $state->fatal("Can't write plist: #1", $!);
>       $self->warn_if_empty($state, $l);
>  }
> Index: infrastructure/mk/bsd.port.mk
> ===================================================================
> RCS file: /build/data/openbsd/cvs/ports/infrastructure/mk/bsd.port.mk,v
> diff -u -p -r1.1653 bsd.port.mk
> --- infrastructure/mk/bsd.port.mk     14 Oct 2026 11:11:29 -0000      1.1653
> +++ infrastructure/mk/bsd.port.mk     16 Oct 2026 09:07:26 -0000
> @@ -989,7 +989,7 @@ PKGFILES += ${PKGFILE${_s}}
>  PKGPATHS += ${FULLPKGPATH${_s}}
>  .  if ${DEBUG_PACKAGES:M${_s}}
>  PKGFILES += ${_PKG_REPO}${_DBG_PKGFILE${_s}}
> -PKGNAMES += debug-${FULLPKGNAME${_s}}
> +PKGNAMES += ${FULLPKGNAME${_s}:C/(-[0-9])/-debug\1/}
>  #PKGPATHS += debug/${FULLPKGPATH${_s}} # XXX sqlports doesn't like it
>  .  endif 
>  .endfor
> @@ -1004,7 +1004,7 @@ PKGFILE = ${_PKG_REPO}${_PKGFILE${SUBPAC
>  
>  .for _S in ${MULTI_PACKAGES}
>  _PKGFILE${_S} = ${FULLPKGNAME${_S}}.tgz
> -_DBG_PKGFILE${_S} = debug-${_PKGFILE${_S}}
> +_DBG_PKGFILE${_S} = ${_PKGFILE${_S}:C/(-[0-9])/-debug\1/}
>  .  if ${PKG_ARCH${_S}} == "*"
>  _PKG_REPO${_S} = ${_PKG_REPO_NO_ARCH}
>  .  else
> Index: devel/quirks/Makefile
> ===================================================================
> RCS file: /build/data/openbsd/cvs/ports/devel/quirks/Makefile,v
> diff -u -p -r1.1829 Makefile
> --- devel/quirks/Makefile     16 Oct 2026 06:30:35 -0000      1.1829
> +++ devel/quirks/Makefile     16 Oct 2026 09:10:40 -0000
> @@ -3,7 +3,7 @@ CATEGORIES =  devel databases
>  DISTFILES =
>  
>  # API.rev
> -PKGNAME =    quirks-7.236
> +PKGNAME =    quirks-7.237
>  PKG_ARCH =   *
>  MAINTAINER = Marc Espie <[email protected]>
>  
> Index: devel/quirks/files/Quirks.pm
> ===================================================================
> RCS file: /build/data/openbsd/cvs/ports/devel/quirks/files/Quirks.pm,v
> diff -u -p -r1.1843 Quirks.pm
> --- devel/quirks/files/Quirks.pm      16 Oct 2026 06:30:35 -0000      1.1843
> +++ devel/quirks/files/Quirks.pm      16 Oct 2026 09:10:23 -0000
> @@ -808,6 +808,12 @@ sub may_add_stems
>  {
>       my ($self, $object, $stem, $state) = @_;
>  
> +     # transparently update old debug names into new
> +     my $dbg = $stem;
> +     if ($dbg =~ s/^debug-(.*)/$1-debug/) {
> +             $object->add_stem($dbg);
> +     }
> +
>       my $extra = $stem_extensions->{$stem};
>       if (defined $extra) {
>               if (ref $extra) {
> 

Index: Makefile
===================================================================
RCS file: /cvs/ports/archivers/7zip/Makefile,v
diff -u -p -r1.1.1.1 Makefile
--- Makefile    17 Sep 2026 16:41:17 -0000      1.1.1.1
+++ Makefile    25 Oct 2026 02:39:40 -0000
@@ -1,5 +1,7 @@
 COMMENT-main =         file archiver with a high compression ratio
 COMMENT-rar =          RAR decompression for 7-Zip
+REVISION-main =                0
+REVISION-rar =         0
 
 V =                    26.03
 DISTNAME =             7z${V:S/.//}-src
@@ -37,6 +39,8 @@ RUN_DEPENDS-rar =     ${BUILD_PKGPATH}
 MULTI_PACKAGES =       -main -rar
 
 USE_GMAKE =            Yes
+
+DEBUG_PACKAGES =       ${BUILD_PACKAGES}
 
 MAKE_FILE_base-clang =         ../../cmpl_clang.mak
 MAKE_FILE_ports-gcc =  ../../cmpl_gcc.mak
Index: patches/patch-CPP_7zip_7zip_gcc_mak
===================================================================
RCS file: /cvs/ports/archivers/7zip/patches/patch-CPP_7zip_7zip_gcc_mak,v
diff -u -p -r1.1.1.1 patch-CPP_7zip_7zip_gcc_mak
--- patches/patch-CPP_7zip_7zip_gcc_mak 17 Sep 2026 16:41:17 -0000      1.1.1.1
+++ patches/patch-CPP_7zip_7zip_gcc_mak 25 Oct 2026 02:39:40 -0000
@@ -10,7 +10,13 @@ Index: CPP/7zip/7zip_gcc.mak
  endif
  
  # for object file
-@@ -50,7 +50,7 @@ endif
+@@ -45,12 +45,12 @@ CFLAGS_DEBUG = -g
+ else
+ CFLAGS_DEBUG = -DNDEBUG
+ ifneq ($(CC), $(CROSS_COMPILE)clang)
+-LFLAGS_STRIP = -s
++# LFLAGS_STRIP = -s
+ endif
  endif
  
  # CFLAGS_BASE_LIST = -S

Reply via email to