openSUSE:Specfile pseudotags

Jump to: navigation, search

This page documents some specfile pseudo tags. Those are lines that look similar to other rpm fields, but are commented because rpm would reject them.

#norootforbuild
#!BuildIgnore:  xyz
#Git-Web:       http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary
#Git-Clone:     git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod

needsrootforbuild

This tag is interpreted by autobuild (/usr/bin/build) and used to indicate that it should run the rpmbuild subprocess as the root user.

norootforbuild

This tag is interpreted by autobuild and used to indicate that it should run rpmbuild as an unprivileged user. This is the default since a very long time (at least since openSUSE's inception). Specfiles that had not had their ancient cruft cleaned out yet may still feature this line.

needsbinariesforbuild

This tag is interpreted by autobuild and is used to request the dependencies be made available as RPM files in /.build.binaries within the build root.

This tag is interpreted by the bs_worker process and disables the use of preinstall images (BRPM-free population of portions of the buildroot).

needsappxsslcertforbuild

This tag is interpreted by the bs_worker process as part of the Open Build Service. It is used to make the OBS project certificate available in a file called _projectcert.crt, and in the AppxSignature.p7x format (this is used for Windows/MSI/MSIX/AppX installers).

needssslcertforbuild

This tag is interpreted by the bs_worker process as part of the Open Build Service. It is used to make the OBS project certificate available in a file called _projectcert.crt.

needspubkeyforbuild

This tag is interpreted by the bs_worker process as part of the Open Build Service. It is used to make the OBS project public key available in a file called _pubkey.

BuildIgnore

This tag is interpreted by the bs_sched process as part of the Open Build Service. It is used to ignore a build requirement that comes up during dependency resolution. See also prjconf documentation. Possible uses cases:

  • Foregoing the promotion of runtime requirements to become build-time requirements. For example, gstreamer runtime-requires gstreamer-0_10-plugins-base, audacity.spec buildrequires gstreamer, therefore the plugins also become an implicit buildrequire. But those plugins are not actually exercised, so audacity cuts them (and further dependencies) off with BuildIgnore.
  • Ignoring a specfile's own products to break cycles in bootstrap. For example, gcc.spec BuildIgnores gcc-PIE (a product of gcc.spec itself).

Git-Clone

This tag is not interpreted by any tooling as of 2023; it has documentation value only, and meant to cover these use cases:

  • In the absence of a _service file, to convey the location of the project's git repository.
  • For a developer to download the entire codebase with entire history so as to (locally) search for, and/or extract, a particular commit, e.g. a bug fix.
  • To help curate a changelog entry for a .changes file from a bunch of loose commits as per "Creating a changes file" second ordered list, point 4 about SCM messages.

References:

Git-Web

This tag is not interpreted by any tooling as of 2023; it has documentation value only, and shall aid packagers to determine the newest version (tag) of a software in the absence of notifications.

On GitHub (and sites like it), a user can subscribe to receive notifications about newly-created releases (requires annotated tags and a release object). However, some projects are not on GitHub (or any site that offers notifications), some projects are not using annotated tags (even though they should), some project make annotated tags but no formal releases, and some sites are too obscure to warrant registering for them. A packager may then periodically visit the Git-Web page manually to see if there is a newer tag/release available. (Cloning the entire repository is not desired.)

openSUSE does not have a mechanism like Debian's uscan in place that could generate notifications, nor does openSUSE have an active bot scans e.g. repology.org and generate notifications that way. There is however an active bot that scans freshcode.club.