Page MenuHomeFreeBSD

Allow override of the pkg command used for 'make packages'
ClosedPublic

Authored by matthew on Oct 2 2016, 9:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 9:16 AM
Unknown Object (File)
Feb 23 2024, 8:32 PM
Unknown Object (File)
Feb 3 2024, 6:11 PM
Unknown Object (File)
Jan 22 2024, 12:25 AM
Unknown Object (File)
Dec 27 2023, 4:32 PM
Unknown Object (File)
Dec 27 2023, 4:31 PM
Unknown Object (File)
Dec 25 2023, 10:01 AM
Unknown Object (File)
Dec 25 2023, 10:01 AM

Details

Summary

Allow a user-overridable setting 'PKG_CMD' to control the command used
to create a repo during 'make packages'

This would have been useful for a situation I found myself in where
pkg(8) had been upgraded to a version that wanted the FBSD_1.5 ABI
version but libc.so.7 had not been upgraded, and only provided
FBSD_1.4. I found I needed to update libc in order to run pkg, and I
also needed to use pkg to update libc... Which is why pkg-static
exists, but there's currently no way to tell the build system to use
pkg-static instead of pkg.

This creates a variable PKG_CMD, default value 'pkg', that can be
overridden from the command line.

Test Plan

1:

# cd /usr/src
# make packages

2:

# make PKG_CMD=/usr/local/sbin/pkg-static packages

3:

(making sure that nothing is still using 'pkg' when the override is in place)

# cp /usr/local/sbin/{pkg,pkg-dynamic}
# cat /dev/null > /usr/local/sbin/pkg
# make PKG_CMD=/usr/local/sbin/pkg-dynamic packages

Diff Detail

Event Timeline

matthew retitled this revision from to Allow override of the pkg command used for 'make packages'.
matthew updated this object.
matthew edited the test plan for this revision. (Show Details)
matthew added reviewers: brd, gjb, bapt.
gjb edited edge metadata.
This revision is now accepted and ready to land.Nov 28 2016, 7:49 PM
This revision was automatically updated to reflect the committed changes.

Can this be reverted for now as this breaks installing ports?

Can this be reverted for now as this breaks installing ports?

Done.

Matthew, I have a different idea how to do this. I'll do some testing.

If bapt's suggestion in D8677 is applied then this should no longer be a problem.

Otherwise, shifting the definition of $PKG_CMD out of bsd.own.mk should fix things.

If bapt's suggestion in D8677 is applied then this should no longer be a problem.

If it does, please feel free to re-commit the change.

Otherwise, shifting the definition of $PKG_CMD out of bsd.own.mk should fix things.

This is the direction I was going to go.

Given the rename of PKG_CMD to PKG_REGISTER in D8677 was committed by swills in r427523 about two weeks ago, can we try again with this?

This revision is now accepted and ready to land.Dec 16 2016, 1:49 PM

Given the rename of PKG_CMD to PKG_REGISTER in D8677 was committed by swills in r427523 about two weeks ago, can we try again with this?

Yes, please go ahead. Please revert my change that undid your original commit with 'svn merge -c -rNNNNNN /path/to/head' so the merge history is not broken.

In D8120#182580, @gjb wrote:

Given the rename of PKG_CMD to PKG_REGISTER in D8677 was committed by swills in r427523 about two weeks ago, can we try again with this?

Yes, please go ahead. Please revert my change that undid your original commit with 'svn merge -c -rNNNNNN /path/to/head' so the merge history is not broken.

Where rNNNNNNN is r309339. Wilco.

This revision was automatically updated to reflect the committed changes.