Page MenuHomeFreeBSD

sysutils/debootstrap: Fix several issues
ClosedPublic

Authored by zirias on Feb 24 2023, 8:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 12:51 PM
Unknown Object (File)
Fri, Nov 29, 12:51 PM
Unknown Object (File)
Fri, Nov 29, 12:51 PM
Unknown Object (File)
Wed, Nov 13, 9:17 PM
Unknown Object (File)
Wed, Nov 13, 2:58 AM
Unknown Object (File)
Mon, Nov 11, 1:48 PM
Unknown Object (File)
Nov 11 2024, 7:05 AM
Unknown Object (File)
Nov 10 2024, 7:19 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
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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–37

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–37

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.