Ports

DEVELOPER=YES
DEV_WARNING_WAIT=0

It is suggested to use devel/poudriere-devel for testing instead of ports-mgmt/porttools.

make patch does not work well with Git-like patches:

diff --git a/config.def.h b/config.def.h
index b41747f..eae969e 100644
--- a/config.def.h
+++ b/config.def.h

It cannot understand what files it should patch so it will nag the user with a File to patch: prompt for every modified file in the patch. To avoid this it is necessary to:

  • either modify the patch so that it looks more like this:
diff --git a/config.def.h b/config.def.h
index b41747f..eae969e 100644
--- ./config.def.h.orig
+++ ./config.def.h
  • or just set PATCH_STRIP, PATCH_DIST_STRIP (you can set those in PATCHFILES and EXTRA_PATCHES too). Example: EXTRA_PATCHES= ${FILESDIR}/bla.patch:-p1.

Also remember that it is possible to use git diff --no-prefix if you are in charge of generating those patches.

  • The easiest way is to configure the port once with make config.
  • If it is not an option then it is possible to set options in /etc/make.conf.
  • Otherwise, it is possible to set an option directly in the shell: make OPTIONS_FILE_SET=YOUROPTION.

You probably forgot to add the following line to your Makefile:

.include <bsd.port.options.mk>

References

General

If you cannot find a mechanism you are looking for in the Porter's Handbook it is worth trying to look at the files in /usr/ports/Mk.

Specific tools tutorials

  • For CURRENT there is no warranty the provided compiled packages are aligned with your installed system. The cluster is periodically updated.
  • By default, pkg uses the quarterly branch (mostly security update). To get the latest versions of software edit /etc/pkg/FreeBSD.conf and change it to the latest branch. See this answer on Unix Stack Exchange.

How to maintain a tree of custom, personal ports?

Ideally, we would like to have a repository with our custom ports only, which could be easily integrated with Poudriere for testing. Generally, there isn't a canonical solution to this problem. Some good sould have suggested me a couple of solutions, however:

Troubleshooting

General hints:

  1. Check your logs: /usr/local/poudriere/data/logs/bulk/${jailname}/latest/
  2. Check your options: /usr/local/etc/poudriere.d/options
How to deal with "Connection timeout" while checking out ports tree?

In case of connection timeouts of:

poudriere ports -c -m svn+https -p subversive

try to use Git instead:

poudriere ports -c -m git -p subversive
[00:00:00] Error: DISTFILES_CACHE directory does not exist. (cf. poudriere.conf)

You are probably missing /usr/ports/distfiles. Just create that directory.

poudriere testport outputs "Error: Unable to extract pkg."

If everything build and packaged fine and then you get this error then you might have a problem with conflicts. The package that you are testing might try to install files, which are conflicting with other already installed packages. Try poudriere testport in a fresh jail.

  • It is always fine to ping the maintainer of a port if your pull request is awaiting approval (unless you're sending them an email everyday).

  • mateuszpiotrowski/ports.txt
  • Last modified: 2021/04/10 04:57
  • by KubilayKocak