First time (trying) to create a port I need guidance

mrd if your intent is to become a port maintainer, this will be an excellent experience. If not, you can do the simpler path of creating an issue in bugzilla and attaching the patch there. Regardless, everyone appreciates your efforts.
 
Hello mrd!

It need not be in /usr/ports. For example, if you did a 'git clone' of freebsd-ports to a different directory, you could use that.

To protect my own sanity when doing this kind of work, I create a separate branch for the new code. I can do a diff between main and working branches to confirm changes. Since your work spans multiple ports, you may need to separate them into different branches. If the ports are tightly coupled it would make sense to me to include them all in the same "hail mary" patch but that also makes the size of the review larger. You could start with the port with the least dependencies and submit that first. Some of the feeback would likely apply to the other ports. I leave that choice up to you.

Submit a git-diff style patch created from the port's own working directory. Do a make clean first so that only the minimum number of files remain. Also, the patch should be flattened so that, when applied, it appears as a single commit. Attach the patch to a new issue in bugzilla.

A more elaborate way is to use phabricator. Given the size of your patch (multiple ports), this may be better.


You can create a review that looks something like this (not the best as it's an X11 font) example:


Odds are you will get some feedback in the review. The wiki page above describes a tool called arcanist that helps streamline the process of updating your patch.
If you don't want to create local branch and anything new is added into ports tree, procedure below at the top of your ports tree (basically /usr/ports by default) allows to generate wanted style of diff.
Code:
git stash --include-untracked
git stash show -p --include-untracked > /filename/to/save/patch
git stash pop

This would contain noises if your ports tree has changes anything others than you want. So cleanups of the generated patch is needed in this case.

The last command is to restore your changes.

Now you have proper patch to upload to Bugzilla (bugs.freebsd.org).

For patches to upload to Phabricator (review.freebsd.org), additional -U999999 option is needed for the 2nd command.

This is how I'm generating patches.
 
mrd if your intent is to become a port maintainer, this will be an excellent experience. If not, you can do the simpler path of creating an issue in bugzilla and attaching the patch there. Regardless, everyone appreciates your efforts.
Maintainers are not forced to create branches.
But committers is required to do so as they need to push the changes to master repo. Note that no one who are NOT committers cannot push changes to master repo. And recently the assignee of PRs on Bugzilla is mandated to be a committer (before the change in policy, non-committer maintainers can be a assignee).
 
Back
Top