Page MenuHomeFreeBSD

sysutils/debootstrap: Fix several issues
ClosedPublic

Authored by zirias on Feb 24 2023, 8:36 AM.
Tags
None
Referenced Files
F102850596: D38754.id.diff
Sun, Nov 17, 11:50 PM
F102832198: D38754.id.diff
Sun, Nov 17, 6:19 PM
F102819183: D38754.diff
Sun, Nov 17, 2:36 PM
Unknown Object (File)
Thu, Nov 14, 11:37 PM
Unknown Object (File)
Sun, Nov 10, 8:31 PM
Unknown Object (File)
Sun, Nov 10, 5:52 PM
Unknown Object (File)
Thu, Nov 7, 9:11 AM
Unknown Object (File)
Tue, Nov 5, 11:34 AM

Details

Summary
  • PORTVERSION may not contain '-', use 'n' instead to include the nmu-number from debian. (Pointy-hat: zirias)
  • Don't use substitutions on Makefile, pass variables instead
  • Eliminate "static" substitutions, use a patch-file instead
  • Fix hardcoded /usr/local in debootstrap script

PR: 269584

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 49985
Build 46877: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 24 2023, 8:43 AM

Also remove substitutions that are now no-ops.

This revision now requires review to proceed.Feb 24 2023, 8:48 AM

And also make portclippy happy, as it's almost for free here

Rebase after committing the PORTVERSION fix separately

This revision is now accepted and ready to land.Feb 24 2023, 9:43 AM

Fix more hardcoded /usr/local after comment in PR 269584

This revision now requires review to proceed.Feb 24 2023, 4:31 PM

Updates look good to me. I like '#!/usr/bin/env bash' better (see comments in bug 269584, but I understand the tendency of the project toward hard-coded shebangs in most cases.

sysutils/debootstrap/Makefile
35–36

Lots of extra REINPLACE_CMD calls here. Less efficient and it triggers warnings if DEVELOPER=yes.

See also Bug 269584, comment 18 & comment 22.

sysutils/debootstrap/Makefile
43

See also bug 255525 suggesting pcre[2]grep instead of gnu grep. If nothing else pcregrep is a BSD license and probably maintained a little better than gnu grep. One less gnu dependency is good. And it's probably somewhat more likely someone has devel/pcre{,2} installed than ggrep due to more dependencies on pcre than gnugrep.

Could also use 'ggrep' instead of full path with LOCALBASE/bin.

zirias added inline comments.
sysutils/debootstrap/Makefile
35–36

It's the same number of invocations as in your suggestion....

43

Here as well, I'm not a fan of fixing things that aren't broken. Plus, upstream is Debian, expecting GNU tools, so I'd consider using GNU grep here more robust regarding possible future changes.

sysutils/debootstrap/Makefile
43

Agreed - valid point.

I think it looks good, feel free to commit.

This revision is now accepted and ready to land.Mar 7 2023, 4:49 PM
This revision was automatically updated to reflect the committed changes.
zirias marked an inline comment as done.