Page MenuHomeFreeBSD

sysutils/debootstrap: Fix several issues
ClosedPublic

Authored by zirias on Feb 24 2023, 8:36 AM.
Tags
None
Referenced Files
F89309336: D38754.diff
Fri, Jul 26, 11:08 AM
Unknown Object (File)
Sat, Jul 6, 4:37 PM
Unknown Object (File)
Wed, Jul 3, 12:39 AM
Unknown Object (File)
Sat, Jun 29, 3:11 AM
Unknown Object (File)
Jun 21 2024, 11:09 PM
Unknown Object (File)
May 17 2024, 1:22 AM
Unknown Object (File)
May 7 2024, 12:02 PM
Unknown Object (File)
May 6 2024, 9:48 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.