Table of Contents
Our policy is that we accept binaries only from pkgsrc developers to guarantee that the packages don't contain any trojan horses etc. This is not to annoy anyone but rather to protect our users! You're still free to put up your home-made binary packages and tell the world where to get them. NetBSD developers doing bulk builds and wanting to upload them please see Section 7.3.8, “Uploading results of a bulk build”.
First, check that your package is complete, compiles and
runs well; see Chapter 20, Debugging and the rest of this
document. Next, generate an uuencoded gzipped tar(1)
archive that contains all files that make up the package.
Finally, send this package to the pkgsrc bug tracking system,
either with the send-pr(1) command, or if you don't have
that, go to the web page
which contains some instructions and a link to a form where you
can submit packages. The
sysutils/gtk-send-pr package is
also available as a substitute for either of the above two tools.
In the form of the problem report, the category should be “pkg”, the synopsis should include the package name and version number, and the description field should contain a short description of your package (contents of the COMMENT variable or DESCR file are OK). The uuencoded package data should go into the “fix” field.
If you want to submit several packages, please send a separate PR for each one, it's easier for us to track things that way.
Alternatively, you can also import new packages into pkgsrc-wip (“pkgsrc work-in-progress”); see the homepage at http://pkgsrc-wip.sourceforge.net/ for details.
Please note all package additions, updates, moves, and
pkgsrc/doc/CHANGES-. It's very
important to keep this file up to date and conforming to the
existing format, because it will be used by scripts to
automatically update pages on www.NetBSD.org and other
sites. Additionally, check the
pkgsrc/doc/TODO file and remove the entry
for the package you updated or removed, in case it was mentioned
PKGREVISION of a package is
bumped, the change should appear in
pkgsrc/doc/CHANGES- if it is security
related or otherwise relevant. Mass bumps that result from a
dependency being updated should not be mentioned. In all other
cases it's the developer's decision.
There is a make target that helps in creating proper
CHANGES- entries: make
changes-entry. It uses the optional
NETBSD_LOGIN_NAME variables. The general
usage is to first make sure that your
file is up-to-date (to avoid having to resolve conflicts later-on)
and then to cd to the package directory. For
package updates, make changes-entry is enough.
For new packages, or package moves or removals, set the
CTYPE variable on the command line to "Added",
"Moved", or "Removed". You can set
mk.conf if your local login name is
not the same as your NetBSD login name. The target also automatically
removes possibly existing entries for the package in the
TODO file. Don't forget to commit
the changes, e.g. by using make changes-entry-commit!
If you are not using a checkout directly from cvs.NetBSD.org, but e.g.
a local copy of the repository, you can set USE_NETBSD_REPO=yes. This
makes the cvs commands use the main repository.
This section is only of interest for pkgsrc developers with write access to the pkgsrc repository.
When the package is finished, “cvs add” the files.
Start by adding the directory and then files in the directory. Don't
forget to add the new package to the category's
Makefile. Make sure you don't forget any files;
you can check by running “cvs status”. An example:
$cvs add pkgname
$cvs add DESCR Makefile PLIST distinfo buildlink3.mk patches
$cvs add patches/p*
$cvs status | less
$vi Makefile # add SUBDIRS+=pkgname line
$cvs commit Makefile
The commit message of the initial import should include part of the
DESCR file, so people reading the mailing lists know
what the package is/does.
Also mention the new package in
Previously, “cvs import” was suggested, but it was much easier to get wrong than “cvs add”.
Please always put a concise, appropriate and relevant summary of the changes between old and new versions into the commit log when updating a package. There are various reasons for this:
A URL is volatile, and can change over time. It may go away completely or its information may be overwritten by newer information.
Having the change information between old and new versions in our CVS repository is very useful for people who use either cvs or anoncvs.
Having the change information between old and new versions in our CVS repository is very useful for people who read the pkgsrc-changes mailing list, so that they can make tactical decisions about when to upgrade the package.
Please also recognize that, just because a new version of a package has been released, it should not automatically be upgraded in the CVS repository. We prefer to be conservative in the packages that are included in pkgsrc - development or beta packages are not really the best thing for most places in which pkgsrc is used. Please use your judgement about what should go into pkgsrc, and bear in mind that stability is to be preferred above new and possibly untested features.
Renaming packages is not recommended.
When renaming packages, be sure to fix any references to old name in other Makefiles, options, buildlink files, etc.
Also When renaming a package, please define
SUPERSEDES to the package name and dewey version
pattern(s) of the previous package name.
This may be repeated for multiple renames.
The new package would be an exact replacement.
Note that “successor” in the
YYYY file doesn't necessarily
mean that it supersedes, as that successor may
not be an exact replacement but is a suggestion for the replaced
It is preferred that packages are not renamed or moved, but if needed please follow these steps.
Make a copy of the directory somewhere else.
Remove all CVS dirs.
Alternatively to the first two steps you can also do:
cvs -d user@cvs.NetBSD.org:/cvsroot export -D today pkgsrc/category/package
and use that for further work.
CATEGORIES and any
DEPENDS paths that just did “../package”
instead of “../../category/package”.
In the modified package's Makefile, consider setting
PREV_PKGPATH to the previous category/package
PREV_PKGPATH can be used by tools
for doing an update using pkgsrc building; for example, it can
search the pkg_summary(5) database for
SUPERSEDES) and then use the corresponding
PKGPATH for that moved package. Note that
it may have multiple matches, so the tool should also check on the
PKGBASE too. The
probably has no value unless
SUPERSEDES is not
PKGBASE stays the same.
cvs import the modified package in the new place.
Check if any package depends on it:
grep /package */*/Makefile* */*/buildlink*
Fix paths in packages from step 5 to point to new location.
cvs rm (-f) the package at the old location.
Commit the changed and removed files:
cvs commit oldcategory/package oldcategory/Makefile newcategory/Makefile
(and any packages from step 5, of course).