CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 43070
Server: Apache/2.4.62 (Unix)
Last-Modified: Wed, 02 Jul 2025 17:30:08 GMT
ETag: "a83e-638f59cc0f633"
Strict-Transport-Security: max-age=31556956
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
Content-Type: text/html; charset=ISO-8859-1
Accept-Ranges: bytes
Age: 0
Date: Wed, 16 Jul 2025 06:47:10 GMT
Via: 1.1 varnish
X-Served-By: cache-bom4744-BOM
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1752648429.942762,VS0,VE1383
The pkgsrc guide
The pkgsrc guide | ||
---|---|---|
? | ? | ?Next |
Documentation on the NetBSD packages system
Copyright ? 1994-2025 The NetBSD Foundation, Inc
$NetBSD: index.html,v 1.266 2025/07/02 16:30:38 leot Exp $
Abstract
pkgsrc is a centralized package management system for Unix-like operating systems. This guide provides information for users and developers of pkgsrc. It covers installation of binary and source packages, creation of binary and source packages and a high-level overview about the infrastructure.
Table of Contents
- 1. What is pkgsrc?
- I. The pkgsrc user's guide
- 2. Getting help
- 3. Where to get pkgsrc and how to keep it up-to-date
- 4. Using pkgsrc on systems other than NetBSD
- 5. Using pkgsrc
- 5.1. Using binary packages
- 5.1.1. Finding binary packages
- 5.1.2. Installing binary packages
- 5.1.3. Updating packages
- 5.1.4. Deinstalling packages
- 5.1.5. Getting information about installed packages
- 5.1.6. Checking for security vulnerabilities in installed packages
- 5.1.7. Finding if newer versions of your installed packages are in pkgsrc
- 5.1.8. Other administrative functions
- 5.2. Building packages from source
- 6. Configuring pkgsrc
- 7. Creating binary packages
- 8. Creating binary packages for everything in pkgsrc (bulk builds)
- 8.1. Preparations
- 8.2. Running a bulk build
- 8.3. Requirements of a full bulk build
- 8.4. Bulk build variants
- 8.4.1. Detect unknown configure options
- 8.4.2. Detect classes of bugs by forcing compiler warnings
- 8.4.3. Force compiler options only in the build phase
- 8.4.4. Use custom directories
- 8.4.5. Turn warnings into errors
- 8.4.6. Reject packages for which pkglint reports errors
- 8.4.7. Reject packages that contain forbidden strings
- 8.4.8. Reject packages whose self-test fails
- 8.4.9. Reject packages that use undefined shell variables
- 8.4.10. Turn off verbose logging
- 8.5. Creating a multiple CD-ROM packages collection
- 9. Directory layout of the installed files
- 10. Frequently Asked Questions
- 10.1. Are there any mailing lists for pkg-related discussion?
- 10.2. Utilities for package management (pkgtools)
- 10.3. How to use pkgsrc as non-root
- 10.4. How to resume transfers when fetching distfiles?
- 10.5. How can I install/use modular X.org from pkgsrc?
- 10.6. How to fetch files from behind a firewall
- 10.7. How to fetch files from HTTPS sites
- 10.8. How do I tell make fetch to do passive FTP?
- 10.9. How to fetch all distfiles at once
- 10.10. What does “Don't know how to make /usr/share/tmac/tmac.andoc” mean?
- 10.11. What does “Could not find bsd.own.mk” mean?
- 10.12. Using 'sudo' or `priv` with pkgsrc
- 10.13. How do I change the location of configuration files?
- 10.14. Automated security checks
- 10.15. Why do some packages ignore my
CFLAGS
? - 10.16. A package does not build. What shall I do?
- 10.17. What does “Makefile appears to contain unresolved cvs/rcs/??? merge conflicts” mean?
- II. The pkgsrc developer's guide
- 11. Getting help
- 12. Package components - files, directories and contents
- 13. The build process
- 13.1. Introduction
- 13.2. Program location
- 13.3. Directories used during the build process
- 13.4. Running a phase
- 13.5. The fetch phase
- 13.6. The checksum phase
- 13.7. The extract phase
- 13.8. The patch phase
- 13.9. The tools phase
- 13.10. The wrapper phase
- 13.11. The configure phase
- 13.12. The build phase
- 13.13. The test phase
- 13.14. The install phase
- 13.15. The package phase
- 13.16. Cleaning up
- 13.17. Other helpful targets
- 14. Creating a new pkgsrc package from scratch
- 15. Programming in
Makefile
s - 16. Options handling
- 17. Tools needed for building or running
- 18. Buildlink methodology
- 19. PLIST issues
- 19.1. RCS ID
- 19.2. Semi-automatic
PLIST
generation - 19.3. Tweaking output of make print-PLIST
- 19.4. Variable substitution in PLIST
- 19.5. Man page compression
- 19.6. Changing PLIST source with
PLIST_SRC
- 19.7. Platform-specific and differing PLISTs
- 19.8. Build-specific PLISTs
- 19.9. Sharing directories between packages
- 20. The pkginstall framework
- 21. Making your package work
- 21.1. General operation
- 21.1.1. How to pull in user-settable variables from
mk.conf
- 21.1.2. User interaction
- 21.1.3. Handling licenses
- 21.1.4. Restricted packages
- 21.1.5. Handling dependencies
- 21.1.6. Handling conflicts with other packages
- 21.1.7. Packages that cannot or should not be built
- 21.1.8. Packages which should not be deleted, once installed
- 21.1.9. Handling packages with security problems
- 21.1.10. How to handle incrementing versions when fixing an existing package
- 21.1.11. Substituting variable text in the package files (the SUBST framework)
- 21.1.1. How to pull in user-settable variables from
- 21.2. The fetch phase
- 21.3. The configure phase
- 21.4. Programming languages
- 21.5. The build phase
- 21.6. The install phase
- 21.6.1. Creating needed directories
- 21.6.2. Where to install documentation
- 21.6.3. Installing highscore files
- 21.6.4. Adding DESTDIR support to packages
- 21.6.5. Packages with hardcoded paths to other interpreters
- 21.6.6. Packages installing Perl modules
- 21.6.7. Packages installing pkg-config files
- 21.6.8. Packages installing info files
- 21.6.9. Packages installing man pages
- 21.6.10. Packages installing X11 fonts
- 21.6.11. Packages installing SGML or XML data
- 21.6.12. Packages installing extensions to the MIME database
- 21.6.13. Packages using intltool
- 21.6.14. Packages installing startup scripts
- 21.6.15. Packages installing TeX modules
- 21.6.16. Packages supporting running binaries in emulation
- 21.6.17. Packages installing hicolor icons
- 21.6.18. Packages installing desktop files
- 21.7. Marking packages as having problems
- 22. GNOME packaging and porting
- 23. Submitting and Committing
- 23.1. Submitting binary packages
- 23.2. Submitting source packages (for non-NetBSD-developers)
- 23.3. General notes when adding, updating, or removing packages
- 23.4. Commit Messages
- 23.5. Committing: Adding a package to CVS
- 23.6. Updating a package to a newer version
- 23.7. Renaming a package in pkgsrc
- 23.8. Moving a package in pkgsrc
- 24. pkgsrc Policies
- 25. Frequently Asked Questions
- III. The pkgsrc infrastructure internals
- 26. Design of the pkgsrc infrastructure
- 27. Regression tests
- 28. Porting pkgsrc
- A. A simple example package: bison
- B. Security hardening
- C. Build logs
- D. Directory layout of the pkgsrc FTP server
- E. Help topics
- F. Editing guidelines for the pkgsrc guide
List of Tables
? | ? | ?Next |
? | ? | ?Chapter?1.?What is pkgsrc? |