[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Needing branches for releases ?



On 2025-07-09 19:53, Clint Adams wrote:
> On Wed, Jul 09, 2025 at 01:09:39PM +0000, Rix, Tom wrote:
>>Is there a sed-ing pattern in Debian we could leverage?
> 
> Any build-time modifications of the source would need to be
> reversed in the `clean' target.  So, theoretically, you
> could copy each relevant files to an .orig, run your sed
> transformation, and then in `clean' mv the .orig files back.

To expand on that: remember d/rules is still just a Makefile, so you can
run any command before, instead of, or after one of the dh steps (dh
being triggered by the "%" target). From within a source package, you
can list the steps that dh would run with

  $ dh binary --no-act

However if you change the *source*, you'll need to undo the change in
the clean step as Client mentions, otherwise dpkg-source will detect
this and error out.

Build artifacts you can just change, they are deleted in the clean step.

> Whether or not maintaining that would be less hassle than
> refreshing patches, I don't know.

Though the linked example may not be representative, at least for that
example, I think patches, and forwarding them upstream, would be the
better solution anyway.

If something distributed as a tarball can't be built without Git
installed, I've always treated this as a bug, and so far all my
upstreams have accepted the patches I created to fix that. If some
dependency or standard is under-specified, same thing. If alternative
BLAS implementations should be reasonably supported, then the build
system should be patched to make this an option, and the patch
forwarded. etc.

Best,
Christian


Reply to: