OpenSolaris

You are not signed in. Sign in or register.

Frequently Asked Questions about the pkgbase project

  1. What is the pkgbase project?
  2. What is a build recipe?
  3. What exactly are the pkgbase management tools? What do they do?
  4. Can I use pkgbase as a source-based repository? E.g. like Gentoo's e-builds?
  5. How do I use pkgtool to fetch and install packages from a binary repository? Does it work like Debian/Ubuntu apt-get?
  6. I don't see some of my favorite F/OSS packages in the repository so I'm thinking of contributing them. Please show me what a really basic spec file looks like.
  7. Is it easy to get commit access?


Q: What is the pkgbase project?
A: Pkgbase provides build recipes and binary packages for popular opensource software (F/OSS) for Solaris Nevada. It also provides a set of related management tools. For example there is pkgbuild, which is modeled after rpmbuild.

Q: What is a build recipe?
A1 -- Here's the short answer: pkgbase employs the RPM spec file format for build recipes.

A2 -- Here's the long answer: Just as food recipes specify ingredients and procedure for creating a food item, pkgbase recipes (called spec files) specify ingredients and procedure for creating a "software item" -- or more specifically a Solaris Nevada SVr4 package. Spec files are designed mainly to be machine-readable (e.g. see the next question), but they are also fairly human-readable with a little practice.

Q: What exactly are the pkgbase management tools? What do they do?
A: There are two main tools, pkgbuild and pkgtool...
  • pkgbuild: this tool is analogous to rpmbuild -- it reads a single build recipe and executes the requested phases:
    %prep
    sets up a source tree from tarballs and patches (diffs)
    %build
    executes commands that create binaries from the sources; in the GNU world, this typically means setting environment variables like CFLAGS and LDFLAGS, then running configure and make.
    %install
    lays out the binaries and other files that will be included in the SVr4 packages in a "proto area". A proto area has the same directory stucture as the package and the root of the proto area ($RPM_BUILD_ROOT) corresponds to / (the root of the file system). In the GNU world, this phase is usually make install DESTDIR=$RPM_BUILD_ROOT
    %clean
    removes unnecessary file after creating the package(s).
    %files
    the recipe assigns each file in the proto area to an SVr4 package.
  • pkgtool: this is a higher level tool that controls the build from multiple spec files and helps locating the sources (downloading them or locating previously downloaded tarballs), it copies patches, spec files, etc into the directories where pkgbuild expects to find them

Q: Can I use pkgbase as a source-based repository? E.g. like Gentoo's e-builds?
A: The scope is narrower than Gentoo e-builds, but yes, the basic idea is the same. The management tools can transparently build a given set of packages from source, in the correct order, and (optionally) install them.

Q: How do I use pkgtool to fetch and install packages from a binary repository? Does it work like Debian/Ubuntu apt-get?
A: No, pkgtool doesn't install binary packages. A separate install script will be provided for pkgbase binary packages. (would you like to help writing it?)

Q: I don't see some of my favorite F/OSS packages in the repository so I'm thinking of contributing them. Please show me what a really basic spec file looks like.
A: Here is a simple example: FIXME: link here And here is a template: FIXME link here

Q: Is it easy to get commit access?
A: Yes, please send your changes or spec files to pkgbase dash dev at opensolaris dot org. Existing pkgbase team members will review your changes and may suggest changes or help finish them. At the end of your first successful review, you will get subversion commit access. Please continue to have your changes reviewed unless they are really trivial. See the code-review process FIXME:link of the JDS community for more details.