Ports
/Errors /ToBePorted/PeerTube /ToBePorted/Pleroma /Workshops /Workshops/201802 /Workshops/Preparation |
Contents
-
Ports
- Development
- Usage
- Tools
- Ports etiquette
Development
/etc/make.conf
DEVELOPER=YES DEV_WARNING_WAIT=0
Testing
It is suggested to use devel/poudriere-devel for testing instead of ports-mgmt/porttools.
How to work on ports without being root all the time?
How to add patches to the files directory?
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.
How to modify port's options in a non-interactive way (BATCH=yes)?
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.
What does the error "make: ... line ...: Malformed conditional ..." mean?
You probably forgot to add the following line to your Makefile:
.include <bsd.port.options.mk>
References
npm ports
Articles and tutorials
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
Usage
- 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.
Tools
Troubleshooting
General hints:
Check your logs: /usr/local/poudriere/data/logs/bulk/${jailname}/latest/
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.
Ports etiquette
- 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).