Page MenuHomeFreeBSD

ports(7): Fix package path and extension
AbandonedPublic

Authored by fernape on Feb 19 2021, 11:23 AM.

Details

Reviewers
0mp
gbe
Group Reviewers
manpages
Summary
  • s/tbz/txz
  • Fix the path where the package is left after creation.

The ports collection has been using txz for a while now.

The location of the pacakge depends on the WRKDIR variable but pkg is
hardcoded. It is not the current directory.

Note that I used .Pa for the path even when it includes a variable. I am not
sure if this is correct.

PR: 224370
Submitted by: jeromer@fastmail.net

Test Plan

Take a simple port like sysutils/cpdup and create the package:

sysutils/cpdup$ make package

===>  License BSD2CLAUSE accepted by the user
===>   cpdup-1.20 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by cpdup-1.20 for building
===>  Extracting for cpdup-1.20
=> SHA256 Checksum OK for cpdup-1.20.tar.xz.
===>  Patching for cpdup-1.20
===>  Configuring for cpdup-1.20
===>  Building for cpdup-1.20

...
...

====> Running Q/A tests (stage-qa)
===>  Building package for cpdup-1.20

sysutils/cpdup$ ls
distinfo   Makefile   pkg-descr  work/

sysutils/cpdup$ ls work/pkg/
cpdup-1.20.txz

We can check how we construct the path where the package is left:

sysutils/cpdup$ grep WRKDIR_PKGFILE= ../../Mk/bsd.port.mk
WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}

PKG_SUFX is an internal variable, so we should not mention it in the man page.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 37183
Build 34072: arc lint + arc unit