From 9c2d90c8a0b04d0abb32721a1b26e7393fe13ca2 Mon Sep 17 00:00:00 2001 From: Weblate Date: May 13 2022 15:26:21 +0000 Subject: Added translation using Weblate (Chinese (Simplified)) Co-authored-by: Weblate --- diff --git a/po/zh_Hans/master/pages/index.po b/po/zh_Hans/master/pages/index.po new file mode 100644 index 0000000..de120ea --- /dev/null +++ b/po/zh_Hans/master/pages/index.po @@ -0,0 +1,5612 @@ +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2022-04-12 21:54+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: zh_Hans\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. type: Title = +#: ./pages/index.adoc:1 +#, no-wrap +msgid "Fedora Packaging Guidelines" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:14 +msgid "" +"The Packaging Guidelines are a collection of common issues and the severity " +"that should be placed on them. While these guidelines should not be " +"ignored, they should also not be blindly followed. If you think that your " +"package should be exempt from part of the Guidelines, please bring the issue " +"to the {packaging-committee}." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:25 +msgid "" +"These documents cover the fine details of acceptable Fedora packaging and " +"while they may include various examples they will not be particularly useful " +"as a tutorial. They also do not cover the details and policies relating to " +"gaining access to the Fedora repositories as a packager, or the mechanics of " +"actually creating and releasing packages as part of the distribution. For " +"documents which cover those issues, please see the following:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:27 +msgid "" +"https://docs.fedoraproject.org/en-US/package-maintainers/Joining_the_Package_Maintainers/[Join " +"the Package Maintainers]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:28 +msgid "" +"https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_Existing_Contributors/[New " +"Package Process for Existing Contributors]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:29 +msgid "" +"https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/index.html[Creating " +"RPM packages]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:37 +msgid "" +"It is the package reviewer's responsibility to point out specific problems " +"with a package and a packager's responsibility to deal with those issues. " +"The reviewer and packager work together to determine the severity of the " +"issues (whether they block a package or can be worked on after the package " +"is in the repository.) Please remember that any package that you submit " +"must also conform to the xref:ReviewGuidelines.adoc[Review Guidelines]." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:43 +msgid "" +"The original author of these documents is " +"https://fedoraproject.org/wiki/TomCallaway[Tom 'spot' Callaway], though they " +"were originally based on many other documents. They have been significantly " +"modified over the years by many members of the Packaging Committee." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:46 +msgid "" +"Report issues with these guidelines, including typos, " +"https://pagure.io/packaging-committee[here]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:49 +#, no-wrap +msgid "Applicability" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:61 +msgid "" +"In general, these guidelines apply to the currently released, " +"non-end-of-life versions of Fedora, as well as the development version of " +"Fedora (Rawhide). If a particular portion of these guidelines is relevant " +"only to a subset of those releases, this will be specifically noted. " +"However, please note that Rawhide can change rapidly, and there will be " +"times when changes are visible there which are not yet reflected here." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:72 +msgid "" +"The guidelines also to some degree cover packages for EPEL, but only when " +"combined with the " +"https://docs.fedoraproject.org/en-US/epel/epel-packaging/[EPEL packaging " +"guidelines]. Fedora packaging changes far more rapidly than EPEL packaging, " +"so over time these guidelines will drift further away from any particular " +"EPEL release and for the older supported EPEL release the differences can be " +"quite significant. Portions of these guidelines which do not apply to EPEL " +"will not generally be indicated." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:73 +#, no-wrap +msgid "General Exception Policy" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:81 +msgid "" +"As these guidelines can never cover all possible contingencies, there will " +"always be packages which need exceptions. It is the packager's " +"responsibility to follow these guidelines as closely as is feasible and to " +"clearly document, as comments in the package specfile, instances where they " +"cannot be followed." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:87 +msgid "" +"If, in a guideline, the language \"should\" or \"is suggested\" is used and " +"it is not feasible for the package to conform to that guideline, the " +"packager may deviate from the it. The nature of the deviation and the " +"reasoning behind it MUST be documented in the specfile." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:94 +msgid "" +"Where the language \"must\", \"is required to\" or \"needs to\" is used, the " +"packager may deviate from the guideline only with approval from the " +"packaging committee. Please follow the procedure at the " +"https://fedoraproject.org/wiki/Packaging_Committee#Bringing_Issues_to_the_Committee[Packaging " +"Committee] page for making these requests." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:95 +#, no-wrap +msgid "Allowed Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:100 +msgid "" +"Please review xref:what-can-be-packaged.adoc[What Can Be Packaged] to ensure " +"that what is to be packaged is allowed in Fedora." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:101 +#, no-wrap +msgid "Naming" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:106 +msgid "" +"You should go through the xref:Naming.adoc[Naming Guidelines] to ensure that " +"your package is named appropriately." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:107 +#, no-wrap +msgid "Version and Release" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:111 +msgid "" +"Documentation covering the proper way to use the Version and Release fields " +"can be found xref:Versioning.adoc[here]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:112 +#, no-wrap +msgid "Licensing" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:119 +msgid "" +"You should review https://fedoraproject.org/wiki/Licensing:Main and the " +"xref:LicensingGuidelines.adoc[Licensing Guidelines] to ensure that your " +"package is licensed appropriately and that the license is properly " +"indicated." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:120 +#, no-wrap +msgid "Fedora Trademarks" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:131 +msgid "" +"Packagers *MUST NOT* add any Fedora trademark assets including the Fedora " +"logo, Fedora logo icons, or graphics that include the Fedora logo. Those " +"assets *MUST* be added to the fedora-logos package. Your packages(s) " +"install the logos by depending on the fedora-logos package. If the upstream " +"contains Fedora trademark assets that you believe are used inappropriately, " +"email legal@fedoraproject.org" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:142 +msgid "" +"This is because the Fedora logo is a trademark, which are handled under a " +"different legal framework than code. It must only be distributed under " +"terms that protect the trademark. Keeping Fedora trademarks separate in " +"their own package instead of scattered across various other packages is also " +"an essential practice for enabling remixes that necessarily must " +"https://fedoraproject.org/wiki/Legal:Trademark_guidelines#Secondary_Mark[not " +"use the Fedora trademark], and instead roll their own *-logos package or use " +"the generic-logos package." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:143 +#, no-wrap +msgid "Libraries and Applications" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:150 +msgid "" +"Many language- or domain-specific guidelines refer to \"libraries\", " +"\"modules\", \"plug-ins\" or other terms specific to the language or " +"domain. This is specifically important to package naming. Some applications " +"may include libraries, and some libraries may include applications, so the " +"distinction is not always clear." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:151 +#, no-wrap +msgid "Library or Application?" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:159 +msgid "" +"If the primary purpose of a package is to provide executables to be run by " +"users, it SHOULD be packaged as an application. If it also includes " +"libraries which may be imported or linked to by other code, see <> below." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:164 +msgid "" +"If the primary purpose of a package is to provide libraries intended to be " +"imported or loaded into other code, it is considered a library and MUST be " +"packaged as such. If it contains utility programs that can be run by users " +"as well, see <> below." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:169 +msgid "" +"It is left to the packager to determine the primary purpose of a package. " +"Often times upstream will already have done this with their choice of naming " +"and that choice SHOULD be followed by the Fedora packager." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:170 +#, no-wrap +msgid "Mixed Use Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:180 +msgid "" +"Many packages, regardless of their primary purpose, include both " +"applications and libraries. In this case one or both SHOULD be packaged in " +"subpackages in order to allow other applications to depend on only the " +"library and not the associated application(s). Installing an application " +"that depends on a library or service should not automatically pull in other " +"applications associated with that library or service." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:181 +#, no-wrap +msgid "Package Independence" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:186 +msgid "" +"Packages SHOULD be installable independently whenever this is technically " +"feasible, but they MUST specify dependencies of correct type on other " +"packages if necessary, see <> below." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:196 +msgid "" +"Desktop applications MUST NOT depend on other desktop applications unless " +"strictly required. In particular, packages that contain a visible " +"`.desktop` file (a `.desktop` file that does not contain the line " +"`+NoDisplay=true+`) SHOULD NOT have a `Requires`, `Recommends`, or " +"`Supplements` on any other package containing a visible desktop file, " +"directly or indirectly." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:205 +msgid "" +"For example, it would be reasonable for a video game level editor to require " +"the associated video game in order to function, or for an application's " +"plugin to require the associated application. But it would not be " +"reasonable for an application that happens to use a database library to " +"depend on a database management suite associated with that library, or for " +"an application that happens to use a particular programming language to " +"depend on management tools associated with that programming language." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:208 +msgid "" +"If a source package provides multiple graphical applications, those " +"applications SHOULD be packaged in separate subpackages when feasible." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:209 +#, no-wrap +msgid "Spec Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:218 +msgid "" +"The spec file (\"spec\") is a fundamental element in the packaging " +"workflow. Any change that is made to the package will include a change to " +"the spec. Because packages in Fedora are maintained by a community of " +"packagers as well as automated tooling, it is important for the specs to " +"follow certain conventions. The bulk of these packaging guidelines involves " +"what goes into a spec, but here are a few general items." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:219 +#, no-wrap +msgid "Spec File Naming" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:224 +msgid "" +"The spec file MUST be named `+%{name}.spec+`. That is, if your package is " +"named `+example+`, the spec file must be named `+example.spec+`." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:225 +#, no-wrap +msgid "Spec Legibility" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:229 +msgid "" +"All spec files MUST be legible and maintained in such a way that the " +"community of packagers is able to understand and work with them." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:237 +msgid "" +"To help facilitate legibility, only macros and conditionals for Fedora and " +"EPEL are allowed to be used in Fedora Packages. Use of macros and " +"conditionals for other distributions, including Fedora derivatives, is not " +"permitted in spec files of packages in the main Fedora repositories unless " +"those macros and conditionals are also present in Fedora." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:238 +#, no-wrap +msgid "Spec File Encoding" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:248 +msgid "" +"Unless you need to use characters outside the " +"https://commons.wikimedia.org/wiki/File:Ascii_full.png[ASCII repertoire], " +"you will not need to be concerned about the encoding of the spec file. If " +"you do need non-ASCII characters, save your spec files as UTF-8. If you're " +"in doubt as to what characters are ASCII, please refer to " +"https://commons.wikimedia.org/wiki/File:Ascii_full.png[this chart]." +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:249 +#, no-wrap +msgid "Non-ASCII Filenames" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:260 +msgid "" +"Similarly, filenames that contain non-ASCII characters must be encoded as " +"UTF-8. Since there's no way to note which encoding the filename is in, " +"using the same encoding for all filenames is the best way to ensure users " +"can read the filenames properly. If upstream ships filenames that are not " +"encoded in UTF-8 you can use a utility like convmv (from the convmv package) " +"to convert the filename in your %install section." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:261 +#, no-wrap +msgid "Spec Maintenance and Canonicity" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:275 +msgid "" +"Fedora's git repository is the canonical location for Fedora spec files. " +"Maintainers MUST expect that other maintainers and automated tooling will " +"make changes to their packages, potentially without communicating prior to " +"doing so (though communication is always encouraged). If some maintainers " +"are also attempting to keep copies of a spec in an outside repository, they " +"MUST be prepared to merge changes made to the spec in Fedora's repository, " +"and MUST NOT overwrite those changes with a copy from an external repository " +"or using `+fedpkg import+`." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:276 +#, no-wrap +msgid "Source File Verification" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:280 +msgid "" +"Where the upstream project publishes OpenPGP signatures of their releases, " +"Fedora packages *SHOULD* verify that signature as part of the RPM build " +"process." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:289 +msgid "" +"Although a checksum in the sources file certifies that a file retreived from " +"the lookaside cache is the one that the packager uploaded, it is silent on " +"whether the file is what the upstream project released. A signature by the " +"upstream developers certifies that the source is identical to what they " +"released. Verifying the signature as part of the build ensures that " +"packagers don't forget to verify it." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:290 +#, no-wrap +msgid "Obtaining the Correct Keys" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:297 +msgid "" +"The verification method requires an OpenPGP keyring file with one or more " +"public keys from the upstream project. The keyring shall contain all the " +"keys that are trusted to certify the authenticity of the sources, and *MUST " +"NOT* contain any other keys." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:306 +msgid "" +"Ideally the upstream project publishes such a keyring as a downloadable " +"file. You shall download that file and do everything you reasonably can to " +"verify that it is authentic. Then you shall add it unmodified to the " +"package SCM, and provide its URL in the spec file so that others can verify " +"it. The URL *MUST* use HTTPS or a similarly authenticated protocol if at " +"all possible." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:313 +msgid "" +"Even if you are unable to verify the key at the first addition, it still " +"enhances security in a trust-on-first-use way. It will ensure that future " +"attacks will be detected if the key is the right one, or that a current " +"attack will be detected later if future releases are signed by the correct " +"key." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:314 +#, no-wrap +msgid "Verifying Signatures" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:324 +msgid "" +"When source file verification is done, it *MUST* be done first in the " +"`%prep` section of the spec file, before any potentially compromised code is " +"executed. The verification *MUST* be done with the macro `+%{gpgverify}+`, " +"which expands into a command whose parameters shall be the pathnames of the " +"keyring, the signature and the signed file. `BuildRequires: gnupg2` is " +"necessary for the verification to work." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:329 +msgid "" +"Any detached signature file (e.g. foo.tar.gz.asc or foo.tar.gz.sig) must be " +"uploaded to the package lookaside cache alongside the source code, while the " +"keyring must be committed directly to the package SCM." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:331 +msgid "The following format must be used:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:342 +#, no-wrap +msgid "" +"Source0: ftp://ftp.example.com/pub/foo/%{name}-%{version}.tar.gz\n" +"Source1: ftp://ftp.example.com/pub/foo/%{name}-%{version}.tar.gz.asc\n" +"Source2: " +"https://www.example.com/gpgkey-0123456789ABCDEF0123456789ABCDEF.gpg\n" +"…\n" +"BuildRequires: gnupg2\n" +"…\n" +"%prep\n" +"%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' " +"--data='%{SOURCE0}'\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:347 +msgid "" +"The first source is the actual tarball, the second one is the signature from " +"upstream, and the third one is the keyring." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:348 ./pages/index.adoc:518 +#, no-wrap +msgid "Exceptions" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:356 +msgid "" +"If the upstream tarball of a package needs to be modified, for example " +"because it contains forbidden items, then the tarball cannot be verified as " +"part of the build process. In this case the upstream OpenPGP keyring must " +"still be included in the package SCM and the instructions/script used to " +"build the stripped-down tarball needs to verify the upstream source." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:367 +msgid "" +"If the upstream project does not publish a keyring file (for example if they " +"publish only a fingerprint on their website and refer to a keyserver network " +"for downloading the key), then you may need to create a keyring after you " +"have verified the key. In this case there is no upstream URL to the " +"keyring, so instead you should document how you created the keyring in a " +"comment in the spec file. A minimal keyring with the key with the " +"fingerprint `7D33D762FD6C35130481347FDB4B54CBA4826A18` can be created with " +"the following command:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:370 +#, no-wrap +msgid "" +"gpg2 --export --export-options export-minimal " +"7D33D762FD6C35130481347FDB4B54CBA4826A18 > " +"gpgkey-7D33D762FD6C35130481347FDB4B54CBA4826A18.gpg\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:377 +msgid "" +"If upstream signed a tarball differently, for example by signing only the " +"uncompressed tarball but distributing a compressed version, then the " +"verification step must be adjusted accordingly, for example:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:388 +#, no-wrap +msgid "" +"Source0: ftp://ftp.example.com/pub/foo/%{name}-%{version}.tar.xz\n" +"Source1: ftp://ftp.example.com/pub/foo/%{name}-%{version}.tar.asc\n" +"Source2: " +"https://www.example.com/gpgkey-0123456789ABCDEF0123456789ABCDEF.gpg\n" +"…\n" +"BuildRequires: gnupg2 xz\n" +"…\n" +"%prep\n" +"xzcat '%{SOURCE0}' | %{gpgverify} --keyring='%{SOURCE2}' " +"--signature='%{SOURCE1}' --data=-\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:393 +msgid "" +"Packages that are vital during bootstrapping of Fedora may use a " +"<> to skip the verification before GnuPG has " +"been built." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:394 +#, no-wrap +msgid "Help" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:401 +msgid "" +"If you need help getting your package compliant to this guideline, or if you " +"do not know what to do if a build fails on a signature verification, then " +"you should seek help on the Fedora devel mailing list before circumventing " +"the check, to make sure that you do not build compromised software." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:402 +#, no-wrap +msgid "Architecture Support" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:411 +msgid "" +"All Fedora packages must successfully compile and build into binary rpms on " +"at least one supported primary architecture, except where the package is " +"useful only on a secondary architecture (such as an architecture-specific " +"boot utility, microcode loader, or hardware configuration tool). Fedora " +"packagers should make every effort to support all " +"https://fedoraproject.org/wiki/Architectures#Primary_Architectures[primary " +"architectures]." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:414 +msgid "" +"Content, code which does not need to compile or build, and architecture " +"independent code (noarch) are notable exceptions." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:415 +#, no-wrap +msgid "Architecture Build Failures" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:432 +msgid "" +"If a Fedora package does not successfully compile, build or work on an " +"architecture, then those architectures should be listed in the spec in " +"`+ExcludeArch+`. Each architecture listed in `+ExcludeArch+` needs to have " +"a bug filed in bugzilla, describing the reason that the package does not " +"compile/build/work on that architecture. The bug number should then be " +"placed in a comment, next to the corresponding `+ExcludeArch+` line. New " +"packages will not have bugzilla entries during the review process, so they " +"should put this description in the comment until the package is approved, " +"then file the bugzilla entry, and replace the long explanation with the bug " +"number. The bug should be marked as blocking one (or more) of the " +"following bugs to simplify tracking such issues:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:434 +msgid "https://bugzilla.redhat.com/show_bug.cgi?id=F-ExcludeArch-x86[F-ExcludeArch-x86]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:435 +msgid "https://bugzilla.redhat.com/show_bug.cgi?id=F-ExcludeArch-x64[F-ExcludeArch-x64]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:436 +msgid "https://bugzilla.redhat.com/show_bug.cgi?id=F-ExcludeArch-ARM[F-ExcludeArch-ARM]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:437 +msgid "https://bugzilla.redhat.com/show_bug.cgi?id=PPCTracker[PPCTracker]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:438 +msgid "https://bugzilla.redhat.com/show_bug.cgi?id=F-ExcludeArch-s390x[F-ExcludeArch-s390x]" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:439 +#, no-wrap +msgid "Noarch with Unported Dependencies" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:451 +msgid "" +"Sometimes you are working on a noarch package that can only run in locations " +"that a different, arched package builds on. This is common for packages " +"written in a scripting language which depend on the language's interpreter " +"package, for instance. If the arched package that your package deps on " +"isn't available on all architectures Fedora (or EPEL) targets you run into a " +"situation where you may need to exclude your package from certain " +"architectures' package repositories or prevent it from building on certain " +"architectures in the buildsystem." +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:452 +#, no-wrap +msgid "Arch-Specific Runtime and Build-Time Dependencies" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:457 +msgid "" +"You can limit both the architectures used to build a noarch package, and the " +"repositories to which the built noarch package will be added, by using " +"either the `+ExcludeArch:+` or `+ExclusiveArch:+` tags:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:463 +#, no-wrap +msgid "" +"BuildArch: noarch\n" +"# List the arches that the dependent package builds on below\n" +"ExclusiveArch: %{ix86} %{arm} x86_64 noarch\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:473 +msgid "" +"Sometimes a language runtime you are packaging for will provide a macro for " +"the arches it's available on, for instance, `+%{nodejs_arches}+`. If it " +"does exist, then you can use something like `+ExclusiveArch: " +"%{nodejs_arches} noarch+` in your spec file. Take a look at the guidelines " +"for the language to see if such a macro exists." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:474 +#, no-wrap +msgid "No Arch-Specific Sources or Patches" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:479 +msgid "" +"Packages MUST NOT have `+Source:+` or `+Patch:+` tags which are " +"conditionalized on architecture. For example, this is forbidden:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:485 +#, no-wrap +msgid "" +"%ifarch ppc64\n" +"Patch0: build-fix-for-ppc64.patch\n" +"%endif\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:490 +msgid "" +"Conditionalizing `+Source:+` or `+Patch:+` tags by architecture causes the " +"contents of the source package to differ depending on the architecture which " +"was used to build it." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:500 +msgid "" +"Note that this unfortunately prevents `+%autosetup+` from being used to " +"apply patches when some of those patches apply only to certain " +"architectures. The best solution is to write patches which simply work on " +"all architectures. If that is not possible, then simply use `+%setup+` and " +"to use the `+%patch+` macro to apply each patch using `+%ifarch+` or " +"`+%ifnarch+` as appropriate. For example:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:508 +#, no-wrap +msgid "" +"%prep\n" +"%setup -q\n" +"%ifarch s390x\n" +"%patch0 -p1\n" +"%endif\n" +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:510 +#, no-wrap +msgid "Filesystem Layout" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:517 +msgid "" +"Fedora follows the https://refspecs.linuxfoundation.org/fhs.shtml[Filesystem " +"Hierarchy Standard] with regards to filesystem layout, with exceptions noted " +"below. The FHS defines where files should be placed on the system." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:521 +msgid "Fedora allows cross-compilers to place files in `+/usr/target+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:524 +msgid "" +"Fedora does not allow new directories directly under `+/+` or `+/usr+` " +"without FPC approval." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:525 +#, no-wrap +msgid "Libexecdir" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:534 +msgid "" +"The https://www.pathname.com/fhs/[Filesystem Hierarchy Standard] does not " +"include any provision for libexecdir, but Fedora packages MAY store " +"appropriate files there. Libexecdir (aka, `+/usr/libexec+` on Fedora " +"systems) should only be used as the directory for executable programs that " +"are designed primarily to be run by other programs rather than by users." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:540 +msgid "" +"Fedora's rpm includes a macro for libexecdir, `+%{_libexecdir}+`. Packagers " +"are highly encouraged to store libexecdir files in a package-specific " +"subdirectory of `+%{_libexecdir}+`, such as `+%{_libexecdir}/%{name}+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:552 +msgid "" +"If upstream's build scripts support the use of `+%{_libexecdir}+` then that " +"is the most appropriate place to configure it (e.g., passing " +"`+--libexecdir=%{_libexecdir}/%{name}+` to autotools configure). If " +"upstream's build scripts do not support that, `+%{_libdir}/%{name}+` is a " +"valid second choice. If you have to patch support for using one of these " +"directories in, then you should patch in LIBEXECDIR, preferably configurable " +"at build time (so distributions that do not have `+/usr/libexec+` can set " +"LIBEXECDIR to another directory more appropriate for their distro)." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:553 +#, no-wrap +msgid "Multilib Exempt Locations" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:564 +msgid "" +"If a package is exempt from multilib, it may use `+%{_prefix}/lib+` instead " +"of `+%{_libdir}+`. Packages that contain architecture specific files that " +"would ordinarily be installed into `+%{_libexecdir}+` are always considered " +"ineligible for multilib. However, you should be sure that the (sub)package " +"that they are in does not have other content that would be considered " +"eligible for multilib. If this is not the case for the files you wish to do " +"this in for your package or you are just unsure, ask FESCo for an explicit " +"multilib exemption." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:565 +#, no-wrap +msgid "`+/run+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:572 +msgid "" +"System services should store small volatile run-time data in `+/run+`. This " +"is a tmpfs backed directory that is mounted in very early boot, before any " +"services are started (and before `+/var+` is available). `+/var/run+` is a " +"legacy symlink to `+/run+`." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:573 +#, no-wrap +msgid "No Files or Directories Under `+/srv+`, `+/usr/local+`, or `+/home/$USER+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:576 +msgid "" +"The " +"https://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM[FHS " +"says]:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:581 +#, no-wrap +msgid "" +"\"...no program should rely on a specific subdirectory structure of /srv " +"existing\n" +"or data necessarily being stored in /srv. However /srv should always exist " +"on FHS\n" +"compliant systems and should be used as the default location for such " +"data.\n" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:584 +#, no-wrap +msgid "" +"Distributions must take care not to remove locally placed files in these\n" +"directories without administrator permission.\"\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:591 +msgid "" +"The FHS is explicitly handing control of the directory structure under " +"`+/srv+` to the system administrator rather than the distribution. " +"Therefore, no Fedora packages can have any files or directories under " +"`+/srv+`, come preconfigured to use specific files or directories under " +"`+/srv+`, to remove files there, or to modify the files there in any way." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:594 +msgid "" +"In addition, no Fedora package can contain files or directories or modify " +"files under:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:598 +msgid "" +"`+/usr/local+` as these directories are not permitted to be used by " +"Distributions in the FHS" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:606 +msgid "" +"`+/home/$USER+` as users can arbitrarily modify the files in their home " +"directories and rpm packages that modify those files run the risk of " +"destroying user data. Additionally, sites may be nfs mounting `+/home+` on " +"many different types of systems or even network automounting them on " +"demand. Modifying files in home directories that are thus configured will " +"have negative effects in both of these situations." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:611 +msgid "" +"It is important to note that the software in a Fedora package, once " +"installed and configured by a user, can use `+/srv+` as a location for " +"data. The package simply must not do this out of the box" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:612 +#, no-wrap +msgid "Limited Usage of `+/opt+`, `+/etc/opt+`, and `+/var/opt+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:626 +msgid "" +"`+/opt+` and its related directories (`+/etc/opt+` and `+/var/opt+`) is " +"reserved for the use of vendors in the FHS. We have reserved the `+fedora+` " +"name with https://www.lanana.org/lsbreg/providers/providers.txt[LANANA] for " +"our use. If a package installs files into `+/opt+` it may only use " +"directories in the `+/opt/fedora+` hierarchy. Fedora attempts to organize " +"this directory by allocating a subdirectory of our `+/opt/fedora+` directory " +"for specific subsystems. If you think you need to use `+/opt/fedora+` " +"please file an FPC ticket to decide whether it's a valid use of `+/opt+` and " +"what subdirectory should be allocated for your use." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:630 +msgid "" +"Currently, we have allocated `+/opt/fedora/scls+`, `+/etc/opt/fedora/scls+`, " +"and `+/var/opt/fedora/scls+` for use by {scl-guidelines}." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:642 +msgid "" +"Because the Google-supplied Chrome packaging has chosen a specific file " +"location for extension-specific files which, if used, would conflicts with " +"the above guidelines, the Packaging Committee has approved the following " +"exception: A package MAY install files into the " +"`+/etc/opt/chrome/native-messaging-hosts+` directory, and may create that " +"directory hierarchy, as long as package as a whole also supports Chromium. " +"(The Chromium support MAY be in a different subpackage.) If Chrome in the " +"future allows a more standard directory to be used for this purpose, this " +"exception will be removed." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:643 +#, no-wrap +msgid "Effect of the UsrMove Fedora Feature" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:647 +msgid "" +"Fedora has merged several directories in `+/+` with their counterparts in " +"`+/usr/+`:" +msgstr "" + +#. type: Table +#: ./pages/index.adoc:667 +#, no-wrap +msgid "" +"|Path|Merged with|RPM Macro\n" +"\n" +"|`+/bin+`\n" +"|`+/usr/bin+`\n" +"|`+{_bindir}+`\n" +"\n" +"|`+/sbin+`\n" +"|`+/usr/sbin+`\n" +"|`+%{_sbindir}+`\n" +"\n" +"|`+/lib64+` or `+/lib+`\n" +"|`+/usr/lib64+` or `+/usr/lib+`\n" +"|`+%{_libdir}+`\n" +"\n" +"|`+/lib+`\n" +"|`+/usr/lib+`\n" +"|`+%{_prefix}/lib+`\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:671 +msgid "" +"For example, end users will find that `+/bin/sh+` is the same file as " +"`+/usr/bin/sh+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:676 +msgid "" +"However, rpm file dependencies don't work according to what's on the " +"filesystem, they work according to the path specified in the rpm `+%files+` " +"section. So an rpm which specified:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:681 +#, no-wrap +msgid "" +"%files\n" +"/bin/sh\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:698 +msgid "" +"would be able to satisfy a file dependency for `+/bin/sh+` but not for " +"`+/usr/bin/sh+`. As a packager you may need to pay attention to where other " +"packages expect to find your files. Things that history has placed into " +"`+/bin+`, `+/sbin+`, `+/lib+`, or `+/lib64+` should be listed in the " +"`+%files+` section as being in those directories. Things that history " +"placed in `+/usr/bin+`, `+/usr/sbin+`, etc, should be listed in the " +"`+%files+` section as being in `+%{_bindir}+`, `+%{_sbindir}+`, etc. If you " +"feel that there is some historical confusion as to which directory a program " +"is placed in, you can use a Virtual Provides to list the alternate path. " +"For instance:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:705 +#, no-wrap +msgid "" +"Provides: %{_sbindir}/ifconfig\n" +"[...]\n" +"%files\n" +"/sbin/ifconfig\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:712 +msgid "" +"If you are a packager who uses file dependencies to Require the proper " +"dependencies then you may need to make sure that the file dependencies are " +"pointing to the location that the packager of that file specified to rpm. " +"Here's an example of doing this:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:716 +#, no-wrap +msgid "" +"$ rpm -ql $(rpm -qf /usr/sbin/ifconfig)|grep sbin/ifconfig\n" +"/sbin/ifconfig\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:719 +msgid "So you'd want to use `+Requires: /sbin/ifconfig+` in your spec file." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:720 +#, no-wrap +msgid "Use `+rpmlint+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:735 +msgid "" +"Run rpmlint on binary and source rpms to examine them for common errors, and " +"fix them (unless rpmlint is wrong, which can happen, too). If you find " +"rpmlint's output cryptic, the `+-i+` switch to it can be used to get more " +"verbose descriptions of most errors and warnings. Note that rpmlint will " +"perform additional checks if given the name of an installed package. For " +"example, `+dnf install foo-1.0-1.f20.x86_64.rpm; rpmlint foo+` will perform " +"a set of tests on the foo package that `+rpmlint foo-1.0-1.f20.x86_64.rpm+` " +"cannot. A community-maintained page on rpmlint issues can be found " +"https://fedoraproject.org/wiki/Common_Rpmlint_issues[here]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:736 +#, no-wrap +msgid "Tags and Sections" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:740 +msgid "" +"The `+Copyright:+`, `+Packager:+`, `+Vendor:+` and `+PreReq:+` tags MUST NOT " +"be used." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:742 +msgid "" +"The `+BuildRoot:+` tag, `+Group:+` tag, and `+%clean+` section SHOULD NOT be " +"used." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:744 +msgid "" +"The contents of the buildroot SHOULD NOT be removed in the first line of " +"`+%install+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:745 +msgid "The `+Summary:+` tag value SHOULD NOT end in a period." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:750 +msgid "" +"The `+Source:+` tags document where to find the upstream sources for the " +"package. In most cases this SHOULD be a complete URL to the upstream " +"tarball. For special cases, please see the xref:SourceURL.adoc[SourceURL " +"Guidelines]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:751 +#, no-wrap +msgid "Package Dependencies" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:756 +msgid "" +"All package dependencies (build-time or runtime, regular, weak or otherwise) " +"MUST ALWAYS be satisfiable within the official Fedora repositories." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:761 +msgid "" +"RPM can automatically determine dependencies for most compiled libraries and " +"for some scripting languages such as Perl. Automatically determined " +"dependencies MUST NOT be duplicated by manual dependencies." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:767 +msgid "" +"Build dependencies, however, MUST be explicitly listed, unless you are using " +"an automatic build dependency generator " +"(e.g. xref:Rust.adoc#_buildrequires[Rust] or " +"xref:Python.adoc#_build_time_dependency_generator[Python]). Refer to the " +"<>." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:775 +msgid "" +"Versioned dependencies (build-time or runtime) SHOULD ONLY be used when " +"actually necessary to guarantee that the proper version of a package is " +"present. If a versioned dependency would be satisfied by a version present " +"in three previous Fedora releases then a versioned dependency is not needed " +"and a regular unversioned dependency SHOULD be used instead." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:779 +msgid "" +"A versioned dependency on a package with a defined Epoch MUST be included in " +"that dependency. Otherwise the dependency will not function as expected." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:780 +#, no-wrap +msgid "Dependency Types" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:784 +msgid "" +"`Requires` MUST be used if the dependency is required for the software to " +"function correctly." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:795 +#, no-wrap +msgid "" +"If the package functions correctly but in diminished capacity,\n" +"then `Recommends` or `Suggests` SHOULD be used.\n" +"If the functionality should be available by default for users,\n" +"`Recommends` SHOULD be used,\n" +"and `Suggests` otherwise.\n" +"Alternatively, the reverse dependencies\n" +"`Supplements` or `Enhances\n" +" may be used in the other package.\n" +"See xref:WeakDependencies.adoc[Packaging:WeakDependencies]\n" +"for guidelines on using those dependency types.\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:796 +#, no-wrap +msgid "Architecture-specific Dependencies" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:801 +msgid "" +"A dependency is made arch-specific by appending the macro `+%{?_isa}+` to " +"the package name. For example:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:805 +#, no-wrap +msgid "Requires: foo\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:808 +msgid "becomes:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:812 +#, no-wrap +msgid "Requires: foo%{?_isa}\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:818 +msgid "" +"If the foo-devel package has a foo-config script, you can try doing a " +"foo-config --libs and foo-config --cflags to get strong hints what packages " +"should be marked as foo's requirements. For example:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:824 +#, no-wrap +msgid "" +"$ gtk-config --cflags\n" +"-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include " +"-I/usr/X11R6/include\n" +"$ gtk-config --libs\n" +"-L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi " +"-lXext -lX11 -lm\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:827 +msgid "This means that gtk+-devel should contain" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:829 +msgid "" +"`+Requires: glib-devel%{?_isa} libXi-devel%{?_isa} libXext-devel%{?_isa} " +"libX11-devel%{?_isa}+`" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:830 +#, no-wrap +msgid "Rich/Boolean Dependencies" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:835 +msgid "" +"Packages MAY make full use of the " +"https://rpm-software-management.github.io/rpm/manual/boolean_dependencies.html[rich " +"(or Boolean) dependency feature] supported in RPM." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:836 +#, no-wrap +msgid "File and Directory Dependencies" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:842 +msgid "" +"RPM gives you the ability to depend on arbitrary files or directories " +"instead of packages. Packages SHOULD NOT include file dependencies outside " +"of the following directories:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:844 +msgid "`+/usr/bin+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:845 +msgid "`+/usr/sbin+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:846 +msgid "`+/etc+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:853 +msgid "" +"Please also note that it is not uncommon for multiple packages to provide " +"the same directory. Directory dependencies SHOULD ONLY be used to express " +"the dependency on that directory existing, not on any other functionality of " +"any other package that might provide that directory." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:860 +msgid "" +"When declaring file and directory dependencies, " +"xref:RPMMacros.adoc#macros_installation[installation path macros] like " +"`+%{_bindir}+` MUST NOT be used. `+%{_bindir}+` of the package that " +"provides `+sometool+` may be different from `+%{_bindir}+` of a package that " +"requires `+sometool+`. In such case, `+BuildRequires: %{_bindir}/sometool+` " +"does not work as expected." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:861 +#, no-wrap +msgid "Explicit Requires" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:883 +msgid "" +"Explicit Requires are Requires added manually by the packager in the spec " +"file. Packages must not contain unnecessary explicit Requires on " +"libraries. We generally rely on rpmbuild to automatically add dependencies " +"on library SONAMEs. Modern package management tools are capable of " +"resolving such dependencies to determine the required packages in many " +"cases. However, present versions of rpmbuild only add deps on library " +"SONAMES, not the library's full version. This can be a problem if a library " +"has added features over the course of time without backwards " +"incompatibilities that would cause SONAMES to be changed. This can lead to " +"a case where the user has an old version of a library installed, the new " +"version of the library with new ABI is built in Fedora and an application " +"using that ABI is built. If the user just attempts to install or update " +"that one application without also updating the library, the application will " +"install fine (because the SONAME dependency is satisfied) but will fail " +"when run because the library installed on the system is missing features it " +"needs." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:898 +msgid "" +"Although you do need to add explicit library dependencies to keep this from " +"occurring, there are drawbacks to manually specifying this in all your " +"packages. History has shown that such dependencies add confusion when " +"library/files are moved from one package to another, when packages get " +"renamed, when one out of multiple alternative packages would suffice, and " +"when versioned explicit dependencies become out-of-date and inaccurate. " +"Additionally, in some cases, old explicit dependencies on package names " +"require unnecessary updates/rebuilds. For example, Fedora packages are only " +"required to retain historical provides for two full release cycles." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:903 +msgid "" +"Because of this and because we hope to have this fixed in rpmbuild, this is " +"something to be aware of but it's not required that you explicitly specify " +"the libraries you require with their version information." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:908 +msgid "" +"When explicit library Requires are necessary, explicit library dependencies " +"should typically be arch-specific (unless the packages involved are noarch) " +"and there should be a spec file comment justifying it:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:914 +#, no-wrap +msgid "" +"# The automatic dependency on libfubar.so.1 is insufficient,\n" +"# as we strictly need at least the release that fixes two segfaults.\n" +"Requires: libfubar%{?_isa} >= 0:1.2.3-7\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:921 +msgid "" +"Packagers should revisit an explicit dependency as appropriate to avoid it " +"becoming inaccurate and superfluous. For instance in the example above, " +"when no current Fedora release shipped with libfubar < 1.2.3-7, it is no " +"longer necessary to list the explicit, versioned requirement." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:922 +#, no-wrap +msgid "Filtering Auto-Generated Requires" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:930 +msgid "" +"RPM attempts to auto-generate Requires (and Provides) at build time, but in " +"some situations, the auto-generated Requires/Provides are not correct or not " +"wanted. For more details on how to filter out auto-generated Requires or " +"Provides, please see: " +"xref:AutoProvidesAndRequiresFiltering.adoc[Packaging:AutoProvidesAndRequiresFiltering]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:932 +#, no-wrap +msgid "Build-Time Dependencies (BuildRequires)" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:942 +msgid "" +"It is important that your package list all necessary build dependencies " +"using the `+BuildRequires:+` tag. You MAY assume that enough of an " +"environment exists for RPM to function, to build packages and execute basic " +"shell scripts, but you SHOULD NOT assume any other packages are present as " +"RPM dependencies and anything brought into the buildroot by the build system " +"can change over time." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:943 +#, no-wrap +msgid "BuildRequires and `+%{_isa}+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:949 +msgid "" +"You MUST NOT use arched BuildRequires. The arch ends up in the built SRPM " +"but SRPMs need to be architecture independent. For instance, if you did " +"this:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:954 +#, no-wrap +msgid "" +"# Example of what *not* to do\n" +"BuildRequires: foo%{?_isa} >= 3.3\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:958 +msgid "" +"Then the SRPM that is built in Fedora would have one of these Requirements " +"depending on what builder the SRPM was created on:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:963 +#, no-wrap +msgid "" +"foo(x86-32) >= 3.3\n" +"# or\n" +"foo(x86-64) >= 3.3\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:968 +msgid "" +"This would prevent yum-builddep or similar tools that use the SRPM's " +"requirements from operating correctly." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:969 +#, no-wrap +msgid "BuildRequires Based on `+pkg-config+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:976 +msgid "" +"Fedora packages which use `+pkg-config+` to build against a library " +"(e.g. 'foo') on which they depend, *SHOULD* express their build dependency " +"correctly as `+pkgconfig(foo)+`. For more information, see " +"xref:PkgConfigBuildRequires.adoc[Packaging:PkgConfigBuildRequires]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:977 +#, no-wrap +msgid "Conditional Build-Time Dependencies" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:988 +msgid "" +"If the spec file contains conditional dependencies selected based on " +"presence of optional `+--with(out) foo+` arguments to `+rpmbuild+`, build " +"the source RPM to be submitted with the default options, i.e., so that none " +"of these arguments are present in the `+rpmbuild+` command line. The reason " +"is that those requirements get \"serialized\" into the resulting source RPM, " +"i.e., the conditionals no longer apply." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:989 +#, no-wrap +msgid "Summary and Description" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1002 +msgid "" +"The summary should be a short and concise description of the package. The " +"description expands upon this. Do not include installation instructions in " +"the description; it is not a manual. If the package requires some manual " +"configuration or there are other important instructions to the user, refer " +"the user to the documentation in the package. Add a _README.Fedora_, or " +"similar, if you feel this is necessary. Also, please make sure that there " +"are no lines in the description longer than 80 characters." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1008 +msgid "" +"Please put personal preferences aside and use American English spelling in " +"the summary and description. Packages can contain additional translated " +"summary/description for supported Non-English languages, if available." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1009 +#, no-wrap +msgid "Trademarks in Summary or Description" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1014 +msgid "" +"Packagers should be careful how they use trademarks in Summary or " +"Description. There are a few rules to follow:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1018 +msgid "" +"Never use `\\(TM)` or `\\(R)` (or the Unicode equivalents, ™/®). It is " +"incredibly complicated to use these properly, so it is actually safer for us " +"to not use them at all." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1020 +msgid "" +"Use trademarks in a way that is not ambiguous. Avoid phrasing like " +"\"similar to\" or \"like\". Some examples:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1022 +#, no-wrap +msgid "*BAD:* It is similar to Adobe Photoshop.\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1023 +#, no-wrap +msgid "*GOOD:* It supports Adobe Photoshop PSD files, ...\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1025 +#, no-wrap +msgid "*BAD:* A Linux version of Microsoft Office\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1026 +#, no-wrap +msgid "*GOOD:* A word-processor with support for Microsoft Office DOC files\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1031 +msgid "" +"If you're not sure, ask yourself, is there any chance someone may get " +"confused and think that this package is the trademarked item? When in doubt, " +"try to leave the trademark out." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1032 +#, no-wrap +msgid "Documentation" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1046 +msgid "" +"Any relevant documentation included in the source distribution should be " +"included in the package in the proper documentation directory. Irrelevant " +"documentation includes build instructions, the omnipresent _INSTALL_ file " +"containing generic build instructions, or example, and documentation for " +"non-Linux systems, e.g. _README.MSDOS_. Also pay attention about which " +"subpackage you include documentation in. For example API documentation " +"belongs in the `+-devel+` subpackage, not the main one. Or if there's a lot " +"of documentation, consider putting it into a subpackage. In this case, it " +"is recommended to use `+*-doc+` as the subpackage name." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1057 +msgid "" +"Marking a _relative_ path with `+%doc+` in the `+%files+` section will cause " +"RPM to copy the referenced file or directory from `+%_builddir+` to the " +"proper location for documentation. Files can also be placed in " +"`+%_pkgdocdir+`, and the build scripts of the software being packaged may do " +"this automatically when called in `+%install+`. However, mixing these " +"methods is problematic and may result in duplicated or conflicting files, so " +"use of `+%doc+` with _relative_ paths and installation of files directly " +"into `+%_pkgdocdir+` in the same source package is forbidden." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1062 +msgid "" +"Files marked as documentation must not cause the package to pull in more " +"dependencies than it would without the documentation. One simple way to " +"ensure this in most cases is to remove all executable permissions from files " +"in `+%_pkgdocdir+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1068 +msgid "" +"Files located in `+%_pkgdocdir+` must not affect the runtime of the packaged " +"software. The software must function properly and with unchanged " +"functionality if those files are modified, removed or not installed at all." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1073 +msgid "" +"Although license files are documentation, they are treated specially " +"(including using a different tag). Please see " +"xref:LicensingGuidelines.adoc[Licensing Guidelines] for how to handle them." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1074 +#, no-wrap +msgid "Separate Documentation Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1088 +msgid "" +"If building documentation requires many additional dependencies then you MAY " +"elect to not build it in the main package and instead create a separate " +"*-doc source package which builds only the documentation. This separately " +"packaged documentation MUST correspond to the version of the packaged " +"software. In other words, if a new release of the software includes changes " +"to the documentation, then the documentation package MUST also be updated. " +"But if the new version of the software does not include documentation " +"changes, then you MAY choose not to update the documentation package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1091 +msgid "" +"A comment SHOULD be added near Version tag of the main package to remind " +"maintainers to update the separate *-doc package when needed." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1093 +#, no-wrap +msgid "Changelogs" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1101 +msgid "" +"_Every time_ you make changes, that is, whenever you increment the E-V-R of " +"a package, add a changelog entry. This is important not only to have an " +"idea about the history of a package, but also to enable users, fellow " +"packagers, and QA people to easily spot the changes that you make." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1104 +msgid "" +"If a particular change is related to a Bugzilla bug, include the bug ID in " +"the changelog entry for easy reference, e.g." +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1110 +#, no-wrap +msgid "" +"%changelog\n" +"* Wed Jun 14 2003 Joe Packager - 1.0-2\n" +"- Added README file (#42).\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1113 +msgid "You must use one of the following formats:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1119 +#, no-wrap +msgid "" +"%changelog\n" +"* Fri Jun 23 2006 Jesse Keating - 0.6-4\n" +"- And fix the link syntax.\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1126 +#, no-wrap +msgid "" +"%changelog\n" +"* Fri Jun 23 2006 Jesse Keating 0.6-4\n" +"- And fix the link syntax.\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1134 +#, no-wrap +msgid "" +"%changelog\n" +"* Fri Jun 23 2006 Jesse Keating \n" +"- 0.6-4\n" +"- And fix the link syntax.\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1148 +msgid "" +"Changelog entries should provide a brief summary of the changes done to the " +"package between releases, including noting updating to a new version, adding " +"a patch, fixing other spec sections, note bugs fixed, and CVE's if any. " +"They must never simply contain an entire copy of the source CHANGELOG " +"entries. The intent is to give the user a hint as to what changed in a " +"package update without overwhelming them with the technical details. Links " +"to upstream changelogs can be entered for those who want additional " +"information. If you wish to \"scramble\" or \"obfuscate\" your email " +"address in the changelog, you may do so, provided that it is still " +"understandable by humans." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1149 +#, no-wrap +msgid "Multiple Changelog Entries per Release" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1155 +msgid "" +"In some situations, it may be useful for packagers to have multiple " +"changelog entries in the spec file, but not increment the release field for " +"each one. There are two supported methods for doing this:" +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:1156 +#, no-wrap +msgid "Updating and replacing the existing date line" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1160 ./pages/index.adoc:1193 +msgid "" +"In this situation, you have added this changelog entry, but have not built " +"the package yet:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1166 ./pages/index.adoc:1199 +#, no-wrap +msgid "" +"%changelog\n" +"* Nov 12 2010 Toshio Kuratomi - 1.0-1\n" +"- Fix spelling errors in package description\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1172 +msgid "" +"The next day, you make additional changes to the spec, and need to add a new " +"changelog line, then you would update the existing date line for 1.0-1, and " +"append any new notes, making the changelog look like this:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1179 +#, no-wrap +msgid "" +"%changelog\n" +"* Nov 13 2010 Toshio Kuratomi - 1.0-1\n" +"- Fix spelling errors in package description\n" +"- Add a patch to fix compilation problems on F15\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1182 ./pages/index.adoc:1217 +msgid "" +"Please remember that this is only acceptable if 1.0-1 has not yet been " +"built." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1188 ./pages/index.adoc:1222 +msgid "" +"You can do this any number of times, until you actually build 1.0-1 in the " +"buildsystem. Once you've done that, you must change the E-V-R and any new " +"entries should be added as described in <>." +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:1189 +#, no-wrap +msgid "Repeat the old version release with a new entry" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1205 +msgid "" +"The next day, you make additional changes to the spec, and need to add a new " +"changelog line. Now, you can add an additional changelog item with the new " +"date, but the same Version-Release, so your new changelog looks like this:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1211 +#, no-wrap +msgid "" +"%changelog\n" +"* Nov 13 2010 Toshio Kuratomi - 1.0-1\n" +"- Add a patch to fix compilation problems on F15\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1214 +#, no-wrap +msgid "" +"* Nov 12 2010 Toshio Kuratomi - 1.0-1\n" +"- Fix spelling errors in package description\n" +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1223 +#, no-wrap +msgid "Manpages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1236 +msgid "" +"As man pages are the traditional method of getting help on a Unix system, " +"packages SHOULD contain them for all executables. If some man pages are " +"absent, packagers SHOULD work with upstream to add them. It is also " +"occasionally possible to find pages created by other distributions, or to " +"use the output of the `+help2man+` program; those are often useful as a " +"starting point. When installing man pages, note that RPM will re-compress " +"them into its preferred format. So the `+%files+` section MUST reference " +"manpages with a pattern that takes this into account:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1241 +#, no-wrap +msgid "" +"%files\n" +"%{_mandir}/man1/foo.1*\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1246 +msgid "" +"Note also that files installed in `+%{_mandir}+` are automatically marked by " +"RPM as documentation. Thus it is not necessary to use `+%doc+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1249 +msgid "" +"For localised manpages, use `+%find_lang --with-man+` as described in " +"<>." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1251 +#, no-wrap +msgid "Compiler" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1260 +msgid "" +"Fedora packages should default to using gcc as the compiler (for all " +"languages that gcc supports) or clang if upstream does not support building " +"with gcc. However, if there is a good technical reason, packagers may " +"choose not to use the default compiler. Examples of valid technical reasons " +"to not use the default compiler, include but are not limited to:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1262 +msgid "The default compiler cannot build a package correctly." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1264 +msgid "" +"The packager needs to disable a compiler feature (e.g. LTO) in order for " +"the default compiler to correctly compile their package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1265 +msgid "The default compiler takes significantly longer to build a package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1266 +msgid "The default compiler is missing a feature that would benefit the package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1269 +msgid "" +"Packagers choosing to use a non-default compiler should document the reason " +"for this decision in a comment in the spec file." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1270 +#, no-wrap +msgid "Compiler Macros" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1274 +msgid "" +"If clang is being used to build a package, packagers must set the %toolchain " +"macro to clang:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1278 +#, no-wrap +msgid "%global toolchain clang\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1282 +msgid "" +"This ensures that Fedora's clang-specific compiler flags are used when " +"compiling." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1286 +msgid "" +"If a packager wants to use conditional macros in a spec file to make it " +"easier to switch between two different compilers, then the following macros " +"names should be used:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1291 +#, no-wrap +msgid "" +"%bcond_with toolchain_clang\n" +"%bcond_with toolchain_gcc\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1297 +msgid "" +"Packagers may also use the %build_cc, %build_cxx, or %build_cpp macros in " +"the spec file in place of hard-coding the compiler name. The values of " +"these variables are controled by setting the %toolchain macro to either " +"clang or gcc." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1299 +#, no-wrap +msgid "Compiler Flags" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1306 +msgid "" +"Compilers used to build packages must honor the applicable compiler flags " +"set in the system rpm configuration. Honoring means that the contents of " +"that variable is used as the basis of the flags actually used by the " +"compiler during the package build." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1319 +msgid "" +"For C, {cpp}, and Fortran code, the " +"xref:RPMMacros.adoc#build-flags-macros-and-variables[%\\{optflags} macro] " +"contains these flags. Overriding these flags for performance optimizations " +"(for instance, -O3 instead of -O2) is generally discouraged. If you can " +"present benchmarks that show a significant speedup for this particular code, " +"this could be revisited on a case-by-case basis. Adding to and overriding " +"or filtering parts of these flags is permitted if there's a good reason to " +"do so; the rationale for doing so must be documented in the specfile." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1323 +msgid "" +"There are certain, security related flags that are commonly allowed. These " +"flags may degrade performance slightly but the increased security can be " +"worthwhile for some programs." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1324 +#, no-wrap +msgid "PIE" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1334 +msgid "" +"PIE adds security to executables by composing them entirely of " +"position-independent code. Position-independent code (PIC) is machine " +"instruction code that executes properly regardless of where in memory it " +"resides. PIE allows Exec Shield to use address space layout randomization " +"to prevent attackers from knowing where existing executable code is during a " +"security attack using exploits that rely on knowing the offset of the " +"executable code in the binary, such as return-to-libc attacks." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1337 +msgid "In Fedora, PIE is enabled by default. To disable it in your spec, add:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1341 +#, no-wrap +msgid "%undefine _hardened_build\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1345 +msgid "" +"If your package meets any of the following criteria you MUST NOT disable the " +"PIE compiler flags:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1349 +msgid "" +"Your package is long running. This means it's likely to be started and keep " +"running until the machine is rebooted, not start on demand and quit on idle." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1351 +msgid "Your package has suid binaries, or binaries with capabilities." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1353 +msgid "Your package runs as root." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1354 +#, no-wrap +msgid "Debuginfo Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1363 +msgid "" +"Packages should produce useful `+-debuginfo+` packages, or explicitly " +"disable them when it is not possible to generate a useful one but rpmbuild " +"would do it anyway. Whenever a `+-debuginfo+` package is explicitly " +"disabled, an explanation why it was done is required in the specfile. " +"Debuginfo packages are discussed in more detail in a separate document, " +"xref:Debuginfo.adoc[Packaging:Debuginfo]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1364 +#, no-wrap +msgid "Devel Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1371 +msgid "" +"Fedora packages must be designed with a logical separation of files. " +"Specifically, -devel packages must be used to contain files which are " +"intended solely for development or needed only at build-time. This is done " +"to minimize the install footprint for users. There are some types of files " +"which almost always belong in a -devel package:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1373 +msgid "Header files (foo.h), usually found in /usr/include" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1376 +msgid "" +"Static library files when the package does not provide any matching shared " +"library files. See <> for more information " +"about this scenario." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1379 +msgid "" +"Unversioned shared system library files, when a matching versioned shared " +"system library file is also present. For example, if your package contains:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1384 +#, no-wrap +msgid "" +" /usr/lib/libfoo.so.3.0.0\n" +" /usr/lib/libfoo.so.3\n" +" /usr/lib/libfoo.so\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1405 +msgid "" +"The versioned shared library files (/usr/lib/libfoo.so.3.2.0 and " +"/usr/lib/libfoo.so.3) are necessary for users to run programs linked " +"against libfoo, so they belong in the base package. The other, unversioned, " +"shared library file (/usr/lib/libfoo.so) is only used to actually link " +"libfoo to code being compiled, and is not necessary to be installed on a " +"users system. This means that it belongs in a -devel package. Please note " +"that in most cases, only the fully versioned shared library file " +"(/usr/lib/libfoo.so.3.2.0) is an actual file, all of the other files are " +"symbolic links to it. When a shared library file is only provided in an " +"unversioned format, the packager should ask upstream to consider providing a " +"properly versioned library file. However, in such cases, if the shared " +"library file is necessary for users to run programs linked against it, it " +"must go into the base package. If upstream versions the shared library file " +"at a future point, packagers must be careful to move to the versioned layout " +"described above." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1421 +msgid "" +"As an additional complication, some software generates unversioned shared " +"objects which are not intended to be used as system libraries. These files " +"are usually plugins or modular functionality specific to an application, and " +"are not located in the ld library paths or cache. This means that they are " +"not located directly in /usr/lib or /usr/lib64, or in a directory listed as " +"a library path in /etc/ld.so.conf (or an /etc/ld.so.conf.d/config file). " +"Usually, these unversioned shared objects can be found in a dedicated " +"subdirectory under /usr/lib or /usr/lib64 (e.g. /usr/lib/purple-2/ is the " +"plugin directory used for libpurple applications). In these cases, the " +"unversioned shared objects do not need to be placed in a -devel package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1423 +msgid "There are some notable exceptions to this packaging model, specifically:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1427 +msgid "" +"compilers often include development files in the main package because " +"compilers are themselves only used for software development, thus, a split " +"package model does not make any sense." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1433 +msgid "" +"When in doubt as to whether a file belongs in the base package or in -devel, " +"packagers should consider whether the file is necessary to be present for a " +"user to use or execute the functionality in the base package properly, or if " +"it is only necessary for development. If it is only necessary for " +"development, it must go into a -devel package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1440 +msgid "" +"As with all Fedora Packaging Guidelines, it is recognized that there are " +"unique situations that fall outside of the boundaries of this model. Should " +"you come across such a case, please open a ticket with the " +"{packaging-committee} and explain it to us so that we can extend the " +"Guidelines to address it." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1441 +#, no-wrap +msgid "Pkgconfig Files (`+foo.pc+`)" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1448 +msgid "" +"The placement of pkgconfig(.pc) files depends on their usecase. Since they " +"are almost always used for development purposes, they should be placed in a " +"-devel package. A reasonable exception is when the main package itself is a " +"development tool not installed in a user runtime, e.g. gcc or gdb." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1449 +#, no-wrap +msgid "Requiring Base Package" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1462 +msgid "" +"Subpackages are often extensions for their base package and in that case " +"they should require their base package. It is almost always better to over " +"specify the version, so it is best practice to just use a fully versioned " +"dependency: Requires: %\\{name}%\\{?_isa} = %\\{version}-%\\{release}. " +"Devel packages are an example of a package that must require their base " +"packages using a fully versioned dependency. -libs subpackages which only " +"contain shared libraries do not normally need to explicitly depend on " +"%\\{name}%\\{?_isa} = %\\{version}-%\\{release}, as they usually do not need " +"the base package to be functional libraries." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1467 +msgid "" +"If you end up in a situation where the main package depends on the " +"subpackage and the subpackage on the main package you should think carefully " +"about why you don't have everything in the main package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1471 +msgid "" +"When a subpackage requires the base package, it must do so using a fully " +"versioned arch-specific (for non-noarch packages) dependency:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1475 +#, no-wrap +msgid "Requires: %{name}%{?_isa} = %{version}-%{release}\n" +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1477 +#, no-wrap +msgid "Shared Libraries" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1482 +msgid "" +"Whenever possible (and feasible), Fedora packages containing libraries " +"SHOULD build them as shared libraries. It is not necessary to call " +"`+ldconfig+` when installing shared libraries." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1483 +#, no-wrap +msgid "Listing Shared Library Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1489 +msgid "" +"Shared libraries installed directly into `+%{_libdir}+` *SHOULD NOT* be " +"listed in the `%files` section of the spec by using a glob in a way that " +"conceals important parts of the file name (e.g. `libfoo.so*`), since changes " +"to the `SONAME` also result in a changed file name in most cases." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1493 +msgid "" +"Otherwise, when the library bumps its `SONAME` as part of an update, this " +"change might remain unnoticed and cause problems like broken dependencies " +"(see the relevant {updates-policy} section for further information)." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1499 +msgid "" +"However, if the use of globs is deemed useful by the packager - for example, " +"if the `Y` and `Z` parts of a library named `libfoo.so.X.Y.Z` change " +"frequently, using something like `libfoo.so.X{,.*}` is recommended instead, " +"since dependent packages usually don't have to be rebuilt for changes of " +"this kind." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1500 +#, no-wrap +msgid "Downstream `+.so+` Name Versioning" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1505 +msgid "" +"In cases where upstream ships unversioned .so *library* (so this is not " +"needed for plugins, drivers, etc.), the packager *MUST* try to convince " +"upstream to start versioning it." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1512 +msgid "" +"If that fails due to unwilling or unresponsive upstream, the packager may " +"start versioning downstream but this must be done with caution and ideally " +"only in rare cases. We don't want to create a library that could conflict " +"with upstream if they later start providing versioned shared libraries. " +"Under no circumstances should the unversioned library be shipped in Fedora." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1514 +msgid "For downstream versioning, the name should be composed like this:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1517 +#, no-wrap +msgid "libfoobar.so.0.n\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1524 +msgid "" +"The _n_ should initially be a small integer (for instance, \"1\"). we use " +"two digits here (\"0.n\") because the common practice with upstreams is to " +"use only a single digit here. Using multiple digits helps us avoid " +"potential future conflicts. Do not forget to add the SONAME field (see " +"below) to the library." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1529 +msgid "" +"When new versions of the library are released, you should use an " +"{abi-comparison-tool} to check for ABI differences in the built shared " +"libraries. If it detects any incompatibilities, bump the _n_ number by one." +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:1530 +#, no-wrap +msgid "SONAME Handling" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1537 +msgid "" +"When running an executable linked to shared object with SONAME field, the " +"dynamic linker checks for this field instead of filename to determine the " +"object with which it should link. This allows developers to simply link " +"against the unversioned library symlink and the dynamic linker will link " +"against the correct object." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1548 +msgid "" +"Keep in mind that although the filename is usually the library's SONAME plus " +"an incrementing minor version there's nothing that intrinsically links " +"these. ldconfig uses the SONAME as the value for a symlink to the actual " +"filename. The dynamic linker then uses that symlink to find the library, " +"disregarding the actual filename. The dynamic linker merely does a simple " +"equality check on the field and does not check for ABI incompatibilities or " +"similar problems. This is the main reason for using an " +"{abi-comparison-tool} and incrementing the SONAME." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1552 +msgid "" +"The SONAME field is written to the shared object by linker, using (at least " +"in case of `+ld+`) the `+-soname SONAME+` flags. This can be passed as an " +"option to `+gcc+` like this:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1555 +#, no-wrap +msgid "$ gcc $CFLAGS -Wl,-soname,libfoo.so.0.n -o libfoo.so.0.n\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1559 +msgid "" +"If you want to check if the SONAME field is set and what value it has, use " +"the `+objdump+` command (from `+binutils+`):" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1562 +#, no-wrap +msgid "$ objdump -p /path/to/libfoo.so.0.n | grep 'SONAME'\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1565 ./pages/index.adoc:1587 +#, no-wrap +msgid "Packaging Static Libraries" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1571 +msgid "" +"Packages including libraries SHOULD exclude static libs as far as possible " +"(e.g., by configuring with _--disable-static_). Applications linking " +"against libraries SHOULD link against shared libraries not static versions." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1583 +msgid "" +"Libtool archives, _foo.la_ files, SHOULD NOT be included. Packages using " +"libtool will install these by default even if you configure with " +"_--disable-static_, so they may need to be removed before packaging. Due to " +"bugs in older versions of libtool or bugs in programs that use it, there are " +"times when it is not always possible to remove *.la files without modifying " +"the program. In most cases it is fairly easy to work with upstream to fix " +"these issues. Note that if you are updating a library in a stable release " +"(not devel) and the package already contains *.la files, removing the *.la " +"files SHOULD be treated as an API/ABI change" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1586 +msgid "" +"i.e., removing them changes the interface that the library gives to the rest " +"of the world thus MUST follow Fedora policies for potentially destabilizing " +"updates." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1590 +msgid "In general, packagers SHOULD NOT ship static libraries." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1595 +msgid "" +"We want to be able to track which packages are using static libraries (so we " +"can find which packages need to be rebuilt if a security flaw in a static " +"library is fixed, for instance). There are two scenarios in which static " +"libraries are packaged:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1606 +#, no-wrap +msgid "" +"*Static libraries and shared libraries.*\n" +"In this case, the static libraries MUST be placed in a _*-static_ " +"subpackage.\n" +"Separating the static libraries from the other development files\n" +"in _*-devel_ allow us to track this usage by checking which packages\n" +"`+BuildRequire+` the _*-static_ package.\n" +"The intent is that whenever possible,\n" +"packages will move away from using these static libraries,\n" +"to the shared libraries.\n" +"If the _*-static_ subpackage requires headers or other files\n" +"from _*-devel_ in order to be useful it MUST require the _*-devel_ " +"subpackage.\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1611 +#, no-wrap +msgid "" +"*Static libraries only.*\n" +"When a package only provides static libraries\n" +"you MAY place all the static library files in the _*-devel_ subpackage.\n" +"When doing this you also MUST have a virtual Provide\n" +"for the _*-static_ package:\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1616 ./pages/index.adoc:1642 +#, no-wrap +msgid "" +"%package devel\n" +"Provides: foo-static = %{version}-%{release}\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1621 +msgid "" +"Packages which explicitly need to link against the static version MUST " +"`+BuildRequire: foo-static+`, so that the usage can be tracked." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1627 +msgid "" +"If (and only if) a package has shared libraries which require static " +"libraries to be functional, the static libraries can be included in the " +"_*-devel_ subpackage. The devel subpackage must have a virtual Provide for " +"the _*-static_ package, and packages dependent on it must `+BuildRequire+` " +"the _*-static_ package." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1628 +#, no-wrap +msgid "Packaging Header Only Libraries" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1634 +msgid "" +"Certain libraries, especially some {cpp} template libraries, are header only " +"libraries. Since the code is generated during compile time, they act just " +"like static libraries and need to be treated as such." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1637 +msgid "" +"Place all of the header files in the _*-devel_ subpackage and then you must " +"have a virtual Provide for the _*-static_ package:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1646 +msgid "" +"Packages which use the header library must `+BuildRequire: foo-static+`, so " +"that the usage can be tracked." +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:1647 +#, no-wrap +msgid "Use noarch only in subpackages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1653 +msgid "" +"The base package for a header library MUST NOT be marked noarch. This " +"ensures that any tests are run on all architectures, and makes it possible " +"to detect whether the build or install process has modified the headers " +"based on the build architecture." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1658 +msgid "" +"When the contents of subpackages, including the `+-devel+` package, are " +"actually architecture-independent, they may still be marked noarch. Since " +"the base package for a header library typically has no `+%files+` list, this " +"may result in an arched package that builds only noarch rpms." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1659 +#, no-wrap +msgid "Statically Linking Executables" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1667 +msgid "" +"Executables and libraries SHOULD NOT be linked statically against libraries " +"which come from other packages. (It is of course acceptable for files " +"generated during a package's build process to be linked statically against " +"`+.a+` files generated as part of that build process.)" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1672 +msgid "" +"If it is necessary to link against `+.a+` files from a different package, a " +"build dependency on the `+-static+` package (not just the `+-devel+` " +"package) which provides those files MUST be present so that the usage can " +"be tracked." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1674 +#, no-wrap +msgid "Bundling and Duplication of System Libraries" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1679 +msgid "" +"Fedora packages SHOULD make every effort to avoid having multiple, separate, " +"upstream projects bundled together in a single package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1688 +msgid "" +"All packages whose upstreams allow them to be built against system libraries " +"MUST be built against system libraries. In this case, bundled libraries " +"(and/or their source code) MUST be explicitly deleted during `+%prep+`. " +"Build scripts may need to be patched to deal with this situation. Whenever " +"possible, the patch should conditionalize the use of the bundled libraries, " +"so that the patch can be sent upstream for consideration." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1695 +msgid "" +"All packages whose upstreams have no mechanism to build against system " +"libraries MAY opt to carry bundled libraries, but if they do, they MUST " +"include an indication of what they bundle. This provides a mechanism for " +"locating libraries with bundled code which can, for example, assist in " +"locating packages which may have particular security vulnerabilities." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1698 +msgid "" +"To indicate an instance of bundling, first determine the name and version of " +"the bundled library:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1704 +msgid "" +"If the bundled package also exists separately in the distribution, use the " +"name of that package. Otherwise consult the xref:Naming.adoc[Naming " +"Guidelines] to determine an appropriate name for the library as if it were " +"entering the distribution as a separate package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1710 +msgid "" +"Use the xref:Versioning.adoc[Versioning Guidelines] to determine an " +"appropriate version for the library, if possible. If the library has been " +"forked from an upstream, use the upstream version that was most recently " +"merged in or rebased onto, or the version the original library carried at " +"the time of the fork." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1717 +msgid "" +"Then at an appropriate place in your spec, add `+Provides: " +"bundled() = +` where `++` and `++` are " +"the name and version you determined above. If it was not possible to " +"determine a version, use `+Provides: bundled()+` instead." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1725 +msgid "" +"In addition to indicating bundling in this manner, packages whose upstreams " +"have no mechanism to build against system libraries must be contacted " +"publicly about a path to supporting system libraries. If upstream refuses, " +"this must be recorded in the spec file, either in comments placed adjacent " +"to the Provides: above, or in an additional file checked into the SCM and " +"referenced by a comment placed adjacent to the `+Provides:+` above." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1726 +#, no-wrap +msgid "Avoid Bundling of Fonts in Other Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1735 +msgid "" +"Fonts in general-purpose formats such as Type1, OpenType TT (TTF) or " +"OpenType CFF (OTF) are subject to specific packaging guidelines " +"(xref:FontsPolicy.adoc[Packaging/FontsPolicy]), and should always be " +"packaged in the system-wide font repositories instead of private application " +"directories. For more information, see: " +"xref:FontsPolicy.adoc[Packaging/FontsPolicy]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1736 +#, no-wrap +msgid "Beware of `+rpath+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1749 +msgid "" +"Sometimes, code will hardcode specific library paths when linking binaries " +"(using the -rpath or -R flag). This is commonly referred to as an rpath. " +"Normally, the dynamic linker and loader (ld.so) resolve the executable's " +"dependencies on shared libraries and load what is required. However, when " +"-rpath or -R is used, the location information is then hardcoded into the " +"binary and is examined by ld.so in the beginning of the execution. Since " +"the Linux dynamic linker is usually smarter than a hardcoded path, we " +"usually do not permit the use of rpath in Fedora." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1754 +msgid "" +"There is a tool called _check-rpaths_ which is included in the _rpmdevtools_ " +"package. It is a good idea to add it to the `+%__arch_install_post+` macro " +"in your `+~/.rpmmacros+` config file:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1760 +#, no-wrap +msgid "" +"%__arch_install_post \\\n" +"/usr/lib/rpm/check-rpaths \\\n" +"/usr/lib/rpm/check-buildroot\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1763 +msgid "When _check-rpaths_ is run, you might see output like this:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1766 +#, no-wrap +msgid "" +"ERROR 0001: file '/usr/bin/xapian-tcpsrv' contains a standard rpath " +"'/usr/lib64' in [/usr/lib64]\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1769 +msgid "Any rpath flagged by check-rpaths *MUST* be removed." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1770 +#, no-wrap +msgid "`+rpath+` for Internal Libraries" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1780 +msgid "" +"When a program installs internal libraries they are often not installed in " +"the system path. These internal libraries are only used for the programs " +"that are present in the package (for example, to factor out code that's " +"common to the executables). These libraries are not intended for use " +"outside of the package. When this occurs, it is acceptable for the programs " +"within the package to use an rpath to find these libraries." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1782 ./pages/index.adoc:2808 +msgid "Example:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1788 +#, no-wrap +msgid "" +"# Internal libraries for myapp are present in:\n" +"%{_libdir}/myapp/\n" +"%{_libdir}/myapp/libmyapp.so.0.3.4\n" +"%{_libdir}/myapp/libmyapp.so\n" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1792 +#, no-wrap +msgid "" +"# myapp has an rpath to %{_libdir}/myapp/\n" +"readelf -d /usr/bin/myapp | grep RPATH\n" +" 0x0000000f (RPATH) Library rpath: [/usr/lib/myapp]\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1801 +#, no-wrap +msgid "" +"*Non-Internal Libraries*: When programs outside of the package\n" +"are supposed to link against the library,\n" +"it is better to use the\n" +"<>\n" +"or simply move the libraries into `+%{_libdir}+` instead.\n" +"That way the dynamic linker can find the libraries\n" +"without having to link all the programs with an rpath.\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1803 +#, no-wrap +msgid "Alternatives to `+rpath+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1813 +msgid "" +"Often, rpath is used because a binary is looking for libraries in a " +"non-standard location (standard locations are /lib, /usr/lib, /lib64, " +"/usr/lib64). If you are storing a library in a non-standard location " +"(e.g. /usr/lib/foo/), you should include a custom config file in " +"/etc/ld.so.conf.d/. For example, if I was putting 32 bit libraries of " +"libfoo in /usr/lib/foo, I would want to make a file called \"foo32.conf\" in " +"/etc/ld.so.conf.d/, which contained the following:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1816 +#, no-wrap +msgid "/usr/lib/foo\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1820 +msgid "" +"Make sure that you also make a 64bit version of this file (e.g. foo64.conf) " +"as well (unless the package is disabled for 64bit architectures, of course)." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1821 +#, no-wrap +msgid "Removing `+rpath+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1824 +msgid "There are several different ways to fix the rpath issue:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1827 +msgid "" +"If the application uses configure, try passing the _--disable-rpath_ flag to " +"configure." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1829 +msgid "" +"If the application uses a local copy of libtool, add the following lines to " +"the spec after %configure:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1835 +#, no-wrap +msgid "" +"%configure\n" +"sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"\"|g' " +"libtool\n" +"sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1840 +msgid "" +"Sometimes, the code/Makefiles can be patched to remove the _-rpath_ or _-R_ " +"flag from being called. This is not always easy or sane to do, however." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1844 +msgid "" +"As a last resort, Fedora has a package called _chrpath_. When this package " +"is installed, you can run `+chrpath --delete+` on the files which contain " +"rpaths. So, in our earlier example, we'd run:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1847 +#, no-wrap +msgid "chrpath --delete $RPM_BUILD_ROOT%{_bindir}/xapian-tcpsrv\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1851 +msgid "" +"Make sure that you remember to add a *BuildRequires: chrpath* if you end up " +"using this method." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1852 +#, no-wrap +msgid "Configuration Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1855 +msgid "Configuration files must be marked as such in packages." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1868 +msgid "" +"As a rule of thumb, use `+%config(noreplace)+` instead of plain `+%config+` " +"unless your best, educated guess is that doing so will break things. In " +"other words, think hard before overwriting local changes in configuration " +"files n package upgrades. An example case when *not* to use `+noreplace+` " +"is when a package's configuration file changes so that the new package " +"revision wouldn't work with the config file from the previous package " +"revision. Whenever plain `+%config+` is used, add a brief comment to the " +"specfile explaining why." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1871 +msgid "" +"Don't use %config or %config(noreplace) under /usr. /usr is deemed to not " +"contain configuration files in Fedora." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1872 +#, no-wrap +msgid "Configuration of Package Managers" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1877 +msgid "" +"Packages MUST NOT install repository configuration files which violate the " +"https://docs.fedoraproject.org/en-US/fesco/Third_Party_Repository_Policy/[Third " +"Party Repository Policy], unless those files are installed under " +"`+%{_docdir}+`." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1878 +#, no-wrap +msgid "Per-Product Configuration" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1889 +msgid "" +"In the Fedora.next world, we will have a set of curated Fedora Products as " +"well as the availability of classic Fedora. Historically, we have " +"maintained a single set of configuration defaults for all Fedora installs " +"but different target use-cases have different needs. Please see the " +"xref:Per-Product_Configuration.adoc[Per-Product Configuration Guidelines] " +"for instructions on how to create packages that need to behave differently " +"between Fedora.next Products." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1890 +#, no-wrap +msgid "Initscripts" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1894 +msgid "" +"SystemV-style initscripts are forbidden in Fedora. Systemd units must be " +"used instead." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1895 +#, no-wrap +msgid "Systemd Units" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1899 +msgid "" +"Detailed guidelines for packaging systemd units and systemd-managed services " +"are xref:Systemd.adoc[here]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1900 +#, no-wrap +msgid "Desktop Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1914 +msgid "" +"If a package contains a GUI application, then it needs to also include a " +"properly installed .desktop file. For the purposes of these guidelines, a " +"GUI application is defined as any application which draws an X window and " +"runs from within that window. Installed .desktop files MUST follow the " +"https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html[desktop-entry-spec], " +"paying particular attention to validating correct usage of Name, " +"GenericName, " +"https://standards.freedesktop.org/menu-spec/latest/apa.html[Categories], " +"https://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt[StartupNotify] " +"entries." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1915 +#, no-wrap +msgid "Icon Tag in Desktop Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1918 +msgid "The icon tag can be specified in two ways:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1920 +msgid "Full path to specific icon file:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1922 +msgid "`+Icon=/usr/share/pixmaps/comical.png+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1924 +msgid "Short name without file extension:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1926 +msgid "`+Icon=comical+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1931 +msgid "" +"The short name without file extension is preferred, because it allows for " +"icon theming (it assumes .png by default, then tries .svg and finally .xpm), " +"but either method is acceptable." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1932 +#, no-wrap +msgid "`+.desktop+` File Creation" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1940 +msgid "" +"If the package doesn't already include and install its own .desktop file, " +"you need to make your own. You can do this by including a .desktop file you " +"create as a Source: (e.g. Source3: %\\{name}.desktop) or generating it in " +"the spec file. Here are the contents of a sample .desktop file " +"(comical.desktop):" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:1951 +#, no-wrap +msgid "" +"[Desktop Entry]\n" +"Name=Comical\n" +"GenericName=Comic Archive Reader\n" +"Comment=Open .cbr & .cbz files\n" +"Exec=comical\n" +"Icon=comical\n" +"Terminal=false\n" +"Type=Application\n" +"Categories=Graphics;\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:1953 +#, no-wrap +msgid "`+desktop-file-install+` Usage" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1966 +msgid "" +"It is not simply enough to just include the .desktop file in the package, " +"one MUST run `+desktop-file-install+` (in `+%install+`) OR " +"`+desktop-file-validate+` (in `+%check+` or `+%install+`) and have " +"`+BuildRequires: desktop-file-utils+`, to help ensure .desktop file safety " +"and spec-compliance. `+desktop-file-install+` MUST be used if the package " +"does not install the file or there are changes desired to the .desktop file " +"(such as add/removing categories, etc). `+desktop-file-validate+` MAY be " +"used instead if the .desktop file's content/location does not need " +"modification. Here are some examples of usage:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1972 +#, no-wrap +msgid "" +"desktop-file-install \\\n" +"--dir=%{buildroot}%{_datadir}/applications \\\n" +"%{SOURCE3}\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1981 +#, no-wrap +msgid "" +"desktop-file-install \\\n" +"--add-category=\"AudioVideo\" \\\n" +"--delete-original \\\n" +"--dir=%{buildroot}%{_datadir}/applications \\\n" +"%{buildroot}/%{_datadir}/applications/foo.desktop\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:1986 +#, no-wrap +msgid "desktop-file-validate %{buildroot}/%{_datadir}/applications/foo.desktop\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1989 +msgid "Do *not* apply a vendor tag to .desktop files (using --vendor)." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1990 +#, no-wrap +msgid "AppData Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:1994 +msgid "" +"Packages containing graphical applications should include AppData files. " +"See xref:AppData.adoc[Packaging:AppData] for the relevant guidelines." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:1995 +#, no-wrap +msgid "Macros" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2003 +msgid "" +"Packagers are strongly encouraged to use macros instead of hard-coded " +"directory names (see xref:RPMMacros.adoc[RPMMacros]). However, in " +"situations where the macro is longer than the path it represents, or " +"situations where the packager feels it is cleaner to use the actual path, " +"the packager is permitted to use the actual path instead of the macro. " +"There are several caveats to this approach:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2007 +msgid "" +"The package must be consistent. For any given path, within the same spec, " +"use either a hard-coded path or a macro, not a combination of the two." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2009 +msgid "" +"%\\{_libdir} must always be used for binary libraries due to multi-lib, you " +"may not substitute a hard-coded path." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2015 +msgid "" +"Macro forms of system executables SHOULD NOT be used except when there is a " +"need to allow the location of those executables to be configurable. For " +"example, `+rm+` should be used in preference to `+%{__rm}+`, but " +"`+%{__python3}+` is acceptable." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2023 +msgid "" +"Having macros in a Source: or Patch: line is a matter of style. Some people " +"enjoy the ready readability of a source line without macros. Others prefer " +"the ease of updating for new versions when macros are used. In all cases, " +"remember to be consistent in your spec file and verify that the URLs you " +"list are valid. spectool (from the rpmdevtools package) can aid you in " +"checking that whether the URL contains macros or not." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2027 +msgid "" +"If you need to determine the actual string when it contains macros, you can " +"use rpm. For example, to determine the actual Source: value, you can run:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:2030 +#, no-wrap +msgid "rpm -q --specfile foo.spec --qf \"$(grep -i ^Source foo.spec)\\n\"\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2032 +#, no-wrap +msgid "`+%autosetup+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2047 +msgid "" +"As an alternative to the usual `+%setup+` macro, the `+%autosetup+` can be " +"used. In addition to the normal %setup tasks, it will apply all defined " +"Patch# items in the spec automatically. It is also capable of handling VCS " +"formatted patch files, but this will require additional BuildRequires, and " +"assumes that _all_ patch files in the spec are formatted for that single VCS " +"type. For this reason, it is not recommended that you specify a VCS with " +"`+%autosetup+`. For more details on proper use of `+%autosetup+`, refer to " +"the https://rpm-software-management.github.io/rpm/manual/autosetup.html[RPM " +"documentation]." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2048 +#, no-wrap +msgid "" +"Using `+%{buildroot}+` and `+%{optflags}+` vs `+$RPM_BUILD_ROOT+` and " +"`+$RPM_OPT_FLAGS+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2052 +msgid "" +"There are two styles of defining the rpm Build Root and Optimization Flags " +"in a spec file:" +msgstr "" + +#. type: Table +#: ./pages/index.adoc:2057 +#, no-wrap +msgid "" +"| |macro style |variable style\n" +"|Build Root |%\\{buildroot} |$RPM_BUILD_ROOT\n" +"|Opt. Flags |%\\{optflags} |$RPM_OPT_FLAGS\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2062 +msgid "" +"There is very little value in choosing one style over the other, since they " +"will resolve to the same values in all scenarios. You should pick a style " +"and use it consistently throughout your packaging." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2066 +msgid "" +"Mixing the two styles, while valid, is bad from a QA and usability point of " +"view, and should not be done in Fedora packages." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2067 +#, no-wrap +msgid "Why the `+%makeinstall+` Macro Should Not Be Used" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2074 +msgid "" +"Fedora's RPM includes a `+%makeinstall+` macro but it must *NOT* be used " +"when make install DESTDIR=%\\{buildroot} works. %makeinstall is a kludge " +"that can work with Makefiles that don't make use of the DESTDIR variable but " +"it has the following potential issues:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2079 +msgid "" +"`+%makeinstall+` overrides a set of Make variables during \"make install\" " +"and prepends the %\\{buildroot} path, i.e. it performs make " +"prefix=\"%\\{buildroot}%\\{_prefix}\" libdir=\"%\\{buildroot}%\\{_libdir} " +"...\"." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2083 +msgid "" +"It is error-prone and can have unexpected effects when run against less than " +"perfect Makefiles, e.g., the buildroot path may be included in installed " +"files where variables are substituted at install-time." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2085 +msgid "" +"It can trigger unnecessary and wrong rebuilds when executing \"make " +"install\", since the Make variables have different values compared with the " +"%build section." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2087 +msgid "" +"If a package contains libtool archives, it can cause broken *.la files to be " +"installed." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2092 +msgid "" +"Instead, Fedora packages should use: `+%make_install+` (Note the \"_\" !), " +"`+make DESTDIR=%{buildroot} install+` or `+make DESTDIR=$RPM_BUILD_ROOT " +"install+`. Those all do the same thing." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2093 +#, no-wrap +msgid "Source RPM Buildtime Macros" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2101 +msgid "" +"All macros in `+Summary:+` and `+%description+` need to be expandable at " +"srpm buildtime. Because SRPMs are built without the package's BuildRequires " +"installed, depending on macros defined outside of the spec file can easily " +"lead to the unexpanded macros showing up in the built SRPM. One way to " +"check is to create a minimal chroot and build the srpm:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:2110 +#, no-wrap +msgid "" +"mock --init\n" +"mock --copyin [SRPM] /\n" +"mock --shell bash\n" +"rpm -ivh [SRPM]\n" +"cd /builddir/build/SPECS\n" +"rpmbuild -bs --nodeps [SRPM]\n" +"rpm -qpiv /builddir/build/SRPMS/[SRPM]\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2116 +msgid "" +"Check the `+rpm+` output for unexpanded macros (`+%{foo}+`) or missing " +"information (when`+%{?foo}+` is expanded to the empty string). Even easier " +"is to simply avoid macros in `+Summary:+` and `+%description+` unless they " +"are defined in the current spec file." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2117 +#, no-wrap +msgid "Improper Use of `+%_sourcedir+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2124 +msgid "" +"Packages which use files itemized as Source# files, must refer to those " +"files by their `+Source#+` macro name, and must not use `+$RPM_SOURCE_DIR+` " +"or `+%{sourcedir}+` to refer to those files. See " +"xref:RPM_Source_Dir.adoc[Packaging:RPM_Source_Dir] for full details." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2125 +#, no-wrap +msgid "Software Collection Macros" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2129 +msgid "" +"{scl-guidelines} are to be kept to separate packages from mainstream " +"packages similar to how xref:MinGW.adoc[MingW packages] are managed." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2135 +msgid "" +"In the past, SCL macros were allowed to be present inside of mainstream " +"packages if they were not used. Since we're now building SCLs, we are now " +"enforcing a strict separation. Packages *MUST* be updated to restrict SCL " +"macros to only those packages particularly approved as part of an SCL." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2136 +#, no-wrap +msgid "Packaging of Additional RPM Macros" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2140 +msgid "" +"Additional RPM macros must be stored in %\\{_rpmmacrodir}. They must be " +"named using the syntax \"macros.$PACKAGE\" (e.g. macros.perl)." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2147 +msgid "" +"Normally, these files are packaged in the -devel subpackage, since they are " +"usually only needed for building other packages. However, in some " +"situations, this is not always ideal and packagers are encouraged to use " +"their best judgment when determining the proper package for these files. " +"RPM macro files MUST NOT be marked as `+%config+`." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2148 +#, no-wrap +msgid "Scripting Inside of Specfiles" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2155 +msgid "" +"Sometimes it is necessary to write a short script (perhaps a one-liner) " +"that is executed in the %prep, %build, or %install sections of a spec file " +"to get some information about the build environment. In order to simplify " +"the dependency graph, spec files should only use the following languages for " +"this purpose:" +msgstr "" + +#. type: Block title +#: ./pages/index.adoc:2156 +#, no-wrap +msgid " Python" +msgstr "" + +#. type: Block title +#: ./pages/index.adoc:2157 +#, no-wrap +msgid " Perl" +msgstr "" + +#. type: Block title +#: ./pages/index.adoc:2158 +#, no-wrap +msgid " Standard programs used in shell programing, for instance gawk or sed" +msgstr "" + +#. type: Block title +#: ./pages/index.adoc:2159 +#, no-wrap +msgid " Lua (as supported by the native lua interpreter in rpm)" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2166 +msgid "" +"Additionally, if your package cannot build without a specific scripting " +"language (such as Ruby, or Tcl), and therefore already has a BuildRequires " +"on that language, it may also be called from the spec file." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2170 +msgid "" +"Note: If you call Perl or Python in your spec file (and it is not already a " +"BuildRequires for the package), you need to explicitly add a BuildRequires " +"for Perl or Python." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2171 +#, no-wrap +msgid "`+%global+` Preferred Over `+%define+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2176 +msgid "" +"Use `+%global+` instead of `+%define+`, unless you really need only locally " +"defined submacros within other macro definitions (a very rare case)." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2179 +msgid "" +"Rationale: The two macro defining statements behave the same when they are " +"at the top level of rpm's nesting level." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2184 +msgid "" +"But when they are used in nested macro expansions (like in `+%{!?foo: " +"... }+` constructs, `+%define+` theoretically only lasts until the end brace " +"(local scope), while `+%global+` definitions have global scope." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2189 +msgid "" +"Note that %define and %global differ in more ways than just scope: the body " +"of a %define'd macro is lazily expanded (i.e., when used), but the body of " +"%global is expanded at definition time. It's possible to use %%-escaping to " +"force lazy expansion of %global." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2191 +#, no-wrap +msgid "Handling Locale Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2197 +msgid "" +"Translation files may be handled by different programs for different " +"frameworks. Make sure you add BuildRequires: for the correct package or " +"else your package could fail to generate translation files in the buildroot." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2199 +msgid "If the package uses gettext for translations, add" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2203 +#, no-wrap +msgid "BuildRequires: gettext\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2207 +msgid "" +"For Qt-based packages that use the Linguist tool chain, for the localization " +"utilities add" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2211 +#, no-wrap +msgid "BuildRequires: qt-devel\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2223 +msgid "" +"If you have few enough locale files that they can all go into one package, " +"you can use the `+%find_lang+` macro. (If you need to split your package " +"into separate language packs, please see xref:Langpacks.adoc[the langpack " +"guidelines].) This macro will locate all of the them belonging to your " +"package (by name), and put this list in a file. You can then use that file " +"to include all of the locales. `+%find_lang+` should be run in the %install " +"section of your spec file, after all of the files have been installed into " +"the buildroot. The correct syntax for `+%find_lang+` is usually:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2227 +#, no-wrap +msgid "%find_lang %{name}\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2242 +msgid "" +"In some cases, the application may use a different \"name\" for its " +"locales. You may have to look at the locale files and see what they are " +"named. If they are named `+myapp.mo+`, then you will need to pass `+myapp+` " +"to `+%find_lang+` instead of `+%{name}+`. After `+%find_lang+` is run, it " +"will generate a file in the active directory (by default, the top level of " +"the source dir). This file will be named based on what you passed as the " +"option to the `+%find_lang+` macro. Usually, it will be named " +"`+%{name}.lang+`. You should then use this file in the `+%files+` list to " +"include the locales detected by `+%find_lang+`. To do this, you should " +"include it with the -f parameter to `+%files+`." +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2248 +#, no-wrap +msgid "" +"%files -f %{name}.lang\n" +"%{_bindir}/foobar\n" +"...\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2252 +msgid "" +"Note that `+%find_lang+` by default searches for gettext locales, but it can " +"also handle Qt translations, localised manpages and help files." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2254 +msgid "To process GNOME help files put into `+/usr/share/gnome/help/+` use" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2258 +#, no-wrap +msgid "%find_lang %{name} --with-gnome\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2261 +msgid "To process KDE help files put into `+/usr/share/doc/HTML/+` use" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2265 +#, no-wrap +msgid "%find_lang %{name} --with-kde\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2268 +msgid "To process Qt's `+.qm+` binary translation files use" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2272 +#, no-wrap +msgid "%find_lang %{name} --with-qt\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2276 +msgid "" +"To process localised manpages (doesn't include the default, non-localised " +"one), use" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2280 +#, no-wrap +msgid "%find_lang %{name} --with-man\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2283 +msgid "To see all the options, run `+/usr/lib/rpm/find-lang.sh+` in the terminal." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2286 +msgid "" +"Names different from `+%{name}+` (e.g. multiple manpages) must be handled " +"via separate calls to `+%find_lang+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2290 +msgid "" +"Here is an example of proper usage of `+%find_lang+`, in `+foo.spec+` with " +"the \"foo\" application localised using gettext and man pages named \"bar\" " +"instead of \"foo\":" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2297 +#, no-wrap +msgid "" +"Name: foo\n" +"...\n" +"%prep\n" +"%setup -q\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2301 +#, no-wrap +msgid "" +"%build\n" +"%configure --with-cheese\n" +"make %{?_smp_mflags}\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2306 +#, no-wrap +msgid "" +"%install\n" +"make DESTDIR=%{buildroot} install\n" +"%find_lang %{name}\n" +"%find_lang bar --with-man\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2312 +#, no-wrap +msgid "" +"%files -f %{name}.lang -f bar.lang\n" +"%license LICENSE\n" +"%doc README\n" +"%{_bindir}/%{name}\n" +"%{_mandir}/man1/bar.1*\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2316 +#, no-wrap +msgid "" +"%changelog\n" +"* Fri Jan 13 2012 Karel Volny 0.1-2\n" +"- add man pages example\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2319 +#, no-wrap +msgid "" +"* Thu May 4 2006 Tom \"spot\" Callaway 0.1-1\n" +"- sample spec that uses %%find_lang\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2321 +#, no-wrap +msgid "Why do we need to use %find_lang?" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2325 +msgid "" +"Using `+%find_lang+` helps keep the spec file simple, and helps avoid " +"several other packaging mistakes." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2328 +msgid "" +"Packages that use `+%{_datadir}/*+` to grab all the locale files in one line " +"also grab ownership of the locale directories, which is not permitted." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2330 +msgid "" +"Most packages that have locales have lots of locales. Using `+%find_lang+` " +"is much easier in the spec file than having to do:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2339 +#, no-wrap +msgid "" +"%{_datadir}/locale/ar/LC_MESSAGES/%{name}.mo\n" +"%{_datadir}/locale/be/LC_MESSAGES/%{name}.mo\n" +"%{_datadir}/locale/cs/LC_MESSAGES/%{name}.mo\n" +"%{_datadir}/locale/de/LC_MESSAGES/%{name}.mo\n" +"%{_datadir}/locale/es/LC_MESSAGES/%{name}.mo\n" +"...\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2344 +msgid "" +"As new locale files appear in later package revisions, `+%find_lang+` will " +"automatically include them when it is run, preventing you from having to " +"update the spec any more than is necessary." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2349 +msgid "" +"Keep in mind that usage of `+%find_lang+` in packages containing locales is " +"a MUST unless the locale files are broken out into langpacks. In which " +"case, you should follow xref:Langpacks.adoc[the langpack guidelines]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2350 +#, no-wrap +msgid "Log Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2357 +msgid "" +"Packages which generate log files should write out their logfiles in a " +"package-specific (and package owned) directory under " +"%\\{_localstatedir}/log. Unless the software being packaged rotates its own " +"logs, it must also ship a logrotate config file to rotate its log file(s)." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2358 +#, no-wrap +msgid "`+logrotate+` Config File" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2366 +msgid "" +"Logrotate config files should be named in a way that matches the " +"daemon/software which is generating the logs, which is usually (though not " +"always) the same name as the package. When unsure, use \"%\\{name}.conf\". " +"These files must be placed in %\\{_sysconfdir}/logrotate.d, and should use " +"standard file permissions (0644) and ownership (root:root)." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2369 +msgid "" +"Since these are config files, they must be marked as %config(noreplace) in " +"the %files list." +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:2370 +#, no-wrap +msgid "Example Minimal `+logrotate+` Config File" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:2379 +#, no-wrap +msgid "" +"/var/log/example/*log {\n" +" missingok # If the log file is missing, go on to the next one " +"without issuing an error message\n" +" notifempty # Don't do any rotation if the logfile is empty\n" +" compress # Compress older files with gzip\n" +" delaycompress # Don't compress yesterdays files\n" +"}\n" +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2381 +#, no-wrap +msgid "Timestamps" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2386 +msgid "" +"When adding file copying commands in the spec file, consider using a command " +"that preserves the files' timestamps, e.g., `+cp -p+` or `+install -p+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2393 +msgid "" +"When downloading sources, patches etc., consider using a client that " +"preserves the upstream timestamps. For example `+wget -N+` or `+curl -R+`. " +"To make the change global for wget, add this to your `+~/.wgetrc+`: " +"`+timestamping = on+`, and for curl, add to your `+~/.curlrc+`: `+-R+`." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2394 +#, no-wrap +msgid "Parallel Make" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2397 +msgid "Whenever possible, invocations of `+make+` should be done as" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2401 +#, no-wrap +msgid "%make_build\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2404 +msgid "This generally speeds up builds and especially on SMP machines." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2408 +msgid "" +"Do make sure, however, that the package builds cleanly this way as some make " +"files do not support parallel building. Therefore you should consider " +"adding" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2412 +#, no-wrap +msgid "%_smp_mflags -j3\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2416 +msgid "" +"to your `+~/.rpmmacros+` file -- even on UP machines -- as this will expose " +"most of these errors." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2417 +#, no-wrap +msgid "Scriptlets" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2422 +msgid "" +"Great care should be taken when using scriptlets in Fedora packages. If " +"scriptlets are used, those scriptlets must be sane. Some common scriptlets " +"are documented xref:Scriptlets.adoc[here]." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2423 +#, no-wrap +msgid "Scriplets are only allowed to write in certain directories" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2432 +msgid "" +"Build scripts of packages (%prep, %build, %install, %check and %clean) may " +"only alter files (create, modify, delete) under %\\{buildroot}, " +"%\\{_builddir} and valid temporary locations like /tmp, /var/tmp (or $TMPDIR " +"or %\\{_tmppath} as set by the rpmbuild process) according to the following " +"matrix" +msgstr "" + +#. type: Table +#: ./pages/index.adoc:2441 +#, no-wrap +msgid "" +"| |/tmp, /var/tmp, $TMPDIR, %\\{_tmppath} |%\\{_builddir} " +"|%\\{buildroot}\n" +"|%prep |yes |yes |no\n" +"|%build |yes |yes |no\n" +"|%install |yes |yes |yes\n" +"|%check |yes |yes |no\n" +"|%clean |yes |yes |yes\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2444 +msgid "" +"Further clarification: That should hold true irrespective of the builder's " +"uid." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2445 +#, no-wrap +msgid "Build Packages with Separate User Accounts" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2451 +msgid "" +"When building software, which you have not conducted a full security-audit " +"on, protect sensitive data, such as your GPG private key, in a separate user " +"account." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2455 +msgid "" +"The same applies to reviewers/testers. Rebuild src.rpms in a separate " +"account which does not have access to any sensitive data." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2456 +#, no-wrap +msgid "Relocatable Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2466 +msgid "" +"The use of RPM's facility for generating relocatable packages is strongly " +"discouraged. It is difficult to make work properly, impossible to use from " +"the installer or from yum, and not generally necessary if other packaging " +"guidelines are followed. However, in the unlikely event that you have a " +"good reason to make a package relocatable, you MUST state this intent and " +"reasoning in the request for package review." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2467 +#, no-wrap +msgid "File and Directory Ownership" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2471 +msgid "" +"Your package should own all of the files that are installed as part of the " +"%install process." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2478 +msgid "" +"In most cases, it should not be necessary for multiple packages to contain " +"identical copies of the same file. However, if it is necessary, multiple " +"packages may contain identical copies of the same file, as long as the " +"following requirements are met:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2481 +msgid "" +"The packages sharing ownership of the identical files are built from a " +"single SRPM." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2483 +msgid "OR" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2489 +msgid "" +"The packages sharing ownership of the identical files are not in a " +"dependency chain (e.g. if package A requires package B, they should not both " +"contain identical files, either A or B must own the common files, but not " +"both.)" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2494 +msgid "" +"In addition, identical files are defined as files which are always identical " +"in content, checksum, permissions, and location on the filesystem in each " +"package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2501 +msgid "" +"One notable type of file that is often shared identically between " +"subpackages is the license text. There are certain situations where it is " +"required to duplicate the license text across multiple %files section within " +"a package. For more details, please refer to " +"xref:LicensingGuidelines.adoc#subpackage-licensing[Subpackage Licensing]." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2504 +msgid "" +"Directory ownership is a little more complex than file ownership. Packages " +"must own all directories they put files in, except for:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2507 +msgid "" +"any directories owned by the `+filesystem+`, `+man+`, or other explicitly " +"created `+-filesystem+` packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2509 +msgid "" +"any directories owned by other packages in your package's natural dependency " +"chain" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2516 +msgid "" +"In this context, a package's \"natural dependency chain\" is defined as the " +"set of packages necessary for that package to function normally. To be " +"specific, you do not need to require a package for the sole fact that it " +"happens to own a directory that your package places files in. If your " +"package already requires that package for other reasons, then your package " +"should not also own that directory." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2521 +msgid "" +"In all cases we are guarding against unowned directories being present on a " +"system. Please see " +"xref:UnownedDirectories.adoc[Packaging:UnownedDirectories] for the details." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2525 +msgid "" +"When co-owning directories, you *must* ensure that the ownership and " +"permissions on the directory match in all packages that own it." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2528 +msgid "" +"Here are examples that describe how to handle most cases of directory " +"ownership." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2529 +#, no-wrap +msgid "" +"The directory is wholly contained in your package, or involves core " +"functionality of your package" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2532 ./pages/index.adoc:2543 ./pages/index.adoc:2561 +msgid "An example:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:2535 +#, no-wrap +msgid "gnucash places many files under the /usr/share/gnucash directory\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2539 +msgid "" +"Solution: the `+gnucash+` package should own the `+/usr/share/gnucash+` " +"directory" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2540 +#, no-wrap +msgid "" +"The directory is also owned by a package implementing required functionality " +"of your package" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:2548 +#, no-wrap +msgid "" +"pam owns the /etc/pam.d directory\n" +"gdm places files into /etc/pam.d\n" +"gdm depends on pam to function normally, and would Require: pam (either " +"implicitly or explicitly) separate from the directory ownership.\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2552 +msgid "" +"Solution: the `+pam+` package should own the `+/etc/pam.d+` directory, and " +"`+gdm+` should `+Require:+` the `+pam+` package." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2553 +#, no-wrap +msgid "" +"The directory is owned by a package which is not required for your package " +"to function" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2559 +msgid "" +"Some packages create and own directories with the intention of permitting " +"other packages to store appropriate files, but those other packages do not " +"need that original package to be present to function properly." +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:2567 +#, no-wrap +msgid "" +"gtk-doc owns the /usr/share/gtk-doc/ directory\n" +"evolution puts files into /usr/share/gtk-doc/\n" +"evolution does not need gtk-doc in order to function properly.\n" +"Nothing in evolution's dependency chain owns /usr/share/gtk-doc/\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2573 +msgid "" +"Solution: the `+evolution+` package should own the `+/usr/share/gtk-doc+` " +"directory. There is no need to add an explicit Requires on gtk-doc solely " +"for the directory ownership." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2585 +msgid "" +"Sometimes, it may be preferable for such directories to be owned by an " +"\"artificial filesystem\" package, such as `+mozilla-filesystem+`. These " +"packages are designed to be explicitly required when other packages store " +"files in their directories, thus, in such situations, these packages should " +"explicitly Require the artificial filesystem package and not multiply own " +"those directories. Packagers should consider the number of affected " +"directories and packages when determining whether to create artificial " +"filesystem packages, and use their own best judgement to determine if this " +"is necessary or not." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2592 +#, no-wrap +msgid "" +"*Rule of Thumb*: When determining whether this exception applies,\n" +"packagers and reviewers should ask this question:\n" +"Do the files in this common directory enhance\n" +"or add functionality to another package,\n" +"where that other package is not necessary to be present\n" +"for the primary functionality of this package?\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2593 +#, no-wrap +msgid "" +"The package you depend on to provide a directory may choose to own a " +"different directory in a later version and your package will run unmodified " +"with that later version" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2596 +msgid "An example involving Perl modules:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2610 +msgid "" +"Assume `+perl-A-B+` depends on `+perl-A+` and installs files into " +"/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/A/B. The base Perl " +"package guarantees that it will own " +"/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi for as long as it " +"remains compatible with version 5.8.8, but a future upgrade of the " +"`+perl-A+` package may install into (and thus own) " +"/usr/lib/perl5/vendor_perl/5.9.0/i386-linux-thread-multi/A. So the " +"`+perl-A-B+` package needs to own " +"/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/A as well as " +"/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/A/B in order to " +"maintain proper ownership." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2611 +#, no-wrap +msgid "File Permissions" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2620 +msgid "" +"Permissions on files MUST be set properly. Inside of /usr, files should be " +"owned by root:root unless a more specific user or group is needed for " +"security. They MUST be universally readable (and executable if " +"appropriate). Outside of /usr, non-config and non-state files SHOULD be " +"owned by root:root, universally readable (and executable if appropriate) " +"unless circumstances require otherwise." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2628 +msgid "" +"The default file mode is 0644 or 0755. Directories should be mode 0755. " +"Most well behaved build scripts and rpm will use these defaults. If the " +"directory needs to be group writable, it SHOULD also have the setgid bit set " +"so that files written there are owned by that group. These directories " +"SHOULD have mode 2775." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2632 +msgid "" +"The %defattr directive in the %files list SHOULD ONLY be used when setting a " +"non-default value, or to reset to the default value after having set a " +"non-default value." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2633 +#, no-wrap +msgid "Explicit lists" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2636 +msgid "Packagers *SHOULD NOT* simply glob everything under a shared directory." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2638 +msgid "In particular, the following *SHOULD NOT* be used in `+%files+`:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2640 +msgid "`+%{_bindir}/*+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2641 +msgid "`+%{_datadir}/*+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2642 +msgid "`+%{_includedir}/*+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2643 +msgid "`+%{_mandir}/*+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2644 +msgid "`+%{_docdir}/*+`" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2648 +msgid "" +"This rule serves as a check against common mistakes which are otherwise hard " +"to detect. It does limit some possibilities for automation." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2653 +msgid "" +"The most common mistake this rule prevents is upstream adding new commands " +"in `+%{_bindir}/*+`. You should always check such changes for " +"https://docs.fedoraproject.org/en-US/packaging-guidelines/Conflicts/#_common_conflicting_files_cases_and_solutions[conflicts], " +"and keep the list of such files explicit and auditable." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2654 +#, no-wrap +msgid "Users and Groups" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2660 +msgid "" +"Some packages require or benefit from dedicated runtime user and/or group " +"accounts. Guidelines for handling these cases are in a " +"xref:UsersAndGroups.adoc[separate document]." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2664 +msgid "" +"Note that system services packaged for Fedora MUST NOT run as the `+nobody+` " +"user, but MUST instead allocate their own system user." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2665 +#, no-wrap +msgid "Web Applications" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2670 +msgid "" +"Web applications packaged in Fedora should put their content into " +"/usr/share/%\\{name} and NOT into /var/www/. This is done because:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2673 +msgid "" +"/var is supposed to contain variable data files and logs. /usr/share is " +"much more appropriate for this." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2675 +msgid "" +"Many users already have content in /var/www, and we do not want any Fedora " +"package to step on top of that." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2676 +msgid "/var/www is no longer specified by the Filesystem Hierarchy Standard" +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2677 +#, no-wrap +msgid "Conflicts" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2683 +msgid "" +"Whenever possible, Fedora packages should avoid conflicting with each " +"other. Unfortunately, this is not always possible. For full details on " +"Fedora's Conflicts policy, see: xref:Conflicts.adoc[Conflicts]." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2686 +msgid "" +"Tools such as Alternatives and Environment Modules can also help prevent " +"package conflicts." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2687 +#, no-wrap +msgid "Alternatives" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2693 +msgid "" +"The \"alternatives\" tool provides a means for parallel installation of " +"packages which provide the same functionality by maintaining sets of " +"symlinks. For full details on how to properly use alternatives, see " +"xref:Alternatives.adoc[Alternatives]." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2694 +#, no-wrap +msgid "Environment Modules" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2702 +msgid "" +"When there are multiple variants that each serve the needs of some user and " +"thus must be available simultaneously by users, the alternatives system " +"simply isn't enough since it is system-wide. In such situations, use of " +"Environment Modules can avoid conflicts. For full details on how to " +"properly use Environment Modules, see " +"xref:EnvironmentModules.adoc[Environment Modules]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2703 +#, no-wrap +msgid "Patch Guidelines" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2705 +#, no-wrap +msgid "All patches should have an upstream bug link or comment" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2713 +msgid "" +"All patches in Fedora spec files *SHOULD* have a comment above them about " +"their upstream status. Any time you create a patch, it is best practice to " +"file it in an upstream bug tracker, and include a link to that in the " +"comment above the patch. For example:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2718 +#, no-wrap +msgid "" +"# https://bugzilla.gnome.org/show_bug.cgi?id=12345\n" +"Patch: gnome-panel-fix-frobnicator.patch\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2723 +msgid "" +"The above is perfectly acceptable; but if you prefer, a brief comment about " +"what the patch does above can be helpful:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2729 +#, no-wrap +msgid "" +"# Don't crash with frobnicator applet\n" +"# https://bugzilla.gnome.org/show_bug.cgi?id=12345\n" +"Patch: gnome-panel-fix-frobnicator.patch\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2736 +msgid "" +"Sending patches upstream and adding this comment will help ensure that " +"Fedora is acting as a good FLOSS citizen " +"(https://docs.fedoraproject.org/en-US/package-maintainers/Staying_Close_to_Upstream_Projects/[Staying " +"Close to Upstream Projects]). It will help others (and even you) down the " +"line in package maintenance by knowing what patches are likely to appear in " +"a new upstream release." +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:2737 +#, no-wrap +msgid "If upstream doesn't have a bug tracker" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2740 +msgid "You can indicate that you have sent the patch upstream and any known status:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2745 +#, no-wrap +msgid "" +"# Sent upstream via email 20080407\n" +"Patch: foobar-fix-the-bar.patch\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2751 +#, no-wrap +msgid "" +"# Upstream has applied this in SVN trunk\n" +"Patch: foobar-fix-the-baz.patch\n" +msgstr "" + +#. type: Title ==== +#: ./pages/index.adoc:2753 +#, no-wrap +msgid "Fedora-specific (or rejected upstream) patches" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2756 +msgid "It may be that some patches truly are Fedora-specific; in that case, say so:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2761 +#, no-wrap +msgid "" +"# This patch is temporary until we land the long term System.loadLibrary fix " +"in OpenJDK\n" +"Patch: jna-jni-path.patch\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2763 +#, no-wrap +msgid "Applying Patches" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2774 +msgid "" +"Normally, patches to a package SHOULD be listed in `+PatchN:+` tags in the " +"RPM spec file and applied using the %patch or %autosetup macros. The files " +"MUST then be checked into the Fedora Package revision control system " +"(currently the git repos on pkgs.fedoraproject.org and commonly accessed via " +"fedpkg). Storing the files in this way allows people to use standard tools " +"to visualize the changes between revisions of the files and track additions " +"and removals without a layer of indirection (as putting them into lookaside " +"would do)." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2778 +msgid "" +"Applying patches directly from RPM_SOURCE_DIR IS NOT ALLOWED. Please see " +"xref:RPM_Source_Dir.adoc[Packaging:RPM_Source_Dir] for the complete " +"rationale." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2796 +msgid "" +"The maintainer MAY deviate from this rule when the upstream of the package " +"provides an extremely large patch or a tarball of patches against a base " +"release. In this case the tarball of patches MAY be listed as a " +"`+SourceN:+` line and the patches would be applied by untarring the archive " +"and then applying the distributed patch(es) using the regular " +"/usr/bin/patch command. Additional patches to the package (for instance, " +"generated by the Fedora maintainer to fix bugs) MUST still be listed in " +"`+PatchN:+` lines and be applied by %patch macros after the patches from the " +"tarball were applied. Maintainers and reviewers should be cautious when " +"exercising this exception as shipping an update as a patchset may be a sign " +"that the patchset is not from the actual upstream or that the patches should " +"be reviewed for correctness rather than simply accepted as the upstream code " +"base." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2797 +#, no-wrap +msgid "Use of Epochs" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2806 +msgid "" +"RPM supports a field called \"Epoch:\", which is a numeric field, that, if " +"set, adds another qualifier for RPM to use in doing package comparisons. " +"Specifically, if set, the Epoch of a package trumps all other comparisons " +"(except for a larger Epoch). If Epoch is not set in a package, RPM treats " +"it the same as if it was set to 0." +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2814 +#, no-wrap +msgid "" +"Version: 1.2\n" +"Release: 3%{?dist}\n" +"Epoch: 1\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2823 +msgid "" +"A package with those definitions would be considered greater than a package " +"with a higher version or a higher release. Since Epoch is confusing to " +"humans (and can never be removed from a package once used), it should only " +"be used in Fedora *as a last resort* to resolve upgrade ordering of a " +"package, and should be avoided wherever possible." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2829 +msgid "" +"Also, Epoch complicates normal packaging guidelines. If a package uses an " +"Epoch, it must be referred to in any place where `+%{version}-%{release}+` " +"is used. For example, if a package being depended upon has an Epoch, this " +"must be listed when adding a versioned dependency:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2833 +#, no-wrap +msgid "Requires: foo = %{epoch}:%{version}-%{release}\n" +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2835 +#, no-wrap +msgid "Epochs from Third Party Repositories" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2841 +msgid "" +"If a package to be imported is or previously was present in a publicly " +"accessible repository, the packager can optionally include an Epoch tag " +"equal to that of the most recent version of the third-party package." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2842 +#, no-wrap +msgid "Symlinks" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2849 +msgid "" +"There are two ways of making a symlink, either as a relative link or an " +"absolute link. In Fedora, neither method is required. Packagers should use " +"their best judgement when deciding which method of symlink creation is " +"appropriate." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2850 +#, no-wrap +msgid "Relative Symlinks" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2855 +msgid "" +"A relative symlink is a symlink which points to a file or directory relative " +"to the position of the symlink. For example, this command would create a " +"relative symlink:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:2858 +#, no-wrap +msgid "ln -s ../..%{_bindir}/foo %{buildroot}%{_bindir}/bar\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2861 ./pages/index.adoc:2883 +msgid "Pros:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2863 +msgid "Relative symlinks will point to the same file inside or outside of a chroot." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2865 ./pages/index.adoc:2889 +msgid "Cons:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2867 +msgid "Much more complicated to create than absolute symlinks" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2869 +msgid "" +"Relative symlinks may break or behave unexpectedly when a part of a " +"filesystem is mounted to a custom location." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2870 +msgid "Relative symlinks may break when bind mounting or symlinking directories." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2871 +msgid "Relative symlinks may make it more difficult to use rpm system macros." +msgstr "" + +#. type: Title === +#: ./pages/index.adoc:2872 +#, no-wrap +msgid "Absolute Symlinks" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2877 +msgid "" +"An absolute symlink is a symlink which points to an absolute file or " +"directory path. For example, this command would create an absolute symlink:" +msgstr "" + +#. type: delimited block . +#: ./pages/index.adoc:2880 +#, no-wrap +msgid "ln -s %{_bindir}/foo %{buildroot}%{_bindir}/bar\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2885 +msgid "Much easier to create than relative symlinks." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2886 +msgid "" +"Absolute symlinks work properly when bind mounting or symlinking " +"directories." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2887 +msgid "Absolute symlinks work well with rpm system macros." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2891 +msgid "Absolute symlinks may break when used with chroots." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2892 +#, no-wrap +msgid "Replacing a Symlink to a Directory or a Directory to Any Type File" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2896 +msgid "" +"In some cases replacing a symlink to a directory requires special handling. " +"Replacing a directory with any type of file always requires special " +"handling." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2899 +msgid "" +"See xref:Directory_Replacement.adoc[Packaging:Directory_Replacement] for " +"information about doing this." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2900 +#, no-wrap +msgid "Test Suites" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2905 +msgid "" +"If the source code of the package provides a test suite, it should be " +"executed in the `+%check+` section, whenever it is practical to do so." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2906 +#, no-wrap +msgid "binfmt.d, sysctl.d and tmpfiles.d" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2911 +msgid "" +"If you install a sysctl configuration snippet foobar.conf into " +"%\\{_sysctldir} (/usr/lib/sysctl.d/) you must invoke %sysctl_apply in your " +"%post section:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2915 +#, no-wrap +msgid "%sysctl_apply foobar.conf\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2920 +msgid "" +"If you install a binfmt configuration snippet waldo.conf into " +"%\\{_binfmtdir} (/usr/lib/binfmt.d/) you must invoke %binfmt_apply in your " +"%post section:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2924 +#, no-wrap +msgid "%binfmt_apply waldo.conf\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2929 +msgid "" +"These have the effect of making the appropriate changes immediately upon " +"package installation instead of requiring a reboot or manual activation." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2933 +msgid "" +"There are specific guidelines for handling tmpfiles.d configurations and " +"directories (in /run and /run/lock): xref:Tmpfiles.d.adoc[Tmpfiles.d]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:2935 +#, no-wrap +msgid "Renaming/Replacing or Removing Existing Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2939 +msgid "" +"https://docs.fedoraproject.org/en-US/package-maintainers/Package_Renaming_Process/[Package " +"Renaming Process] should be followed when renaming an existing package." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2943 +msgid "" +"In the event that it becomes necessary to rename or replace an existing " +"package, the new package should make the change transparent to end users to " +"the extent applicable." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2949 +msgid "" +"If a package is being renamed without any functional changes, or is a " +"compatible enough replacement to an existing package (where \"enough\" means " +"that it includes only changes of magnitude that are commonly found in " +"version upgrade changes), provide clean upgrade paths and compatibility " +"with:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:2954 +#, no-wrap +msgid "" +"Provides: oldpackagename = $provEVR\n" +"Obsoletes: oldpackagename < $obsEVR\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2967 +msgid "" +"$provEVR refers to an (Epoch-)Version-Release tuple the original unchanged " +"package would have had if it had been version or release bumped. You " +"usually use macros here because the provides EVR should continue to go up as " +"the renamed package advances in version and release. $obsEVR is an " +"(Epoch-)Version-Release tuple arranged so that there is a clean upgrade path " +"but without gratuitously polluting the version space upwards. You usually " +"do not use macros for this as you're simply trying to advance beyond the " +"last known release under the old name." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2971 +msgid "" +"If a package supersedes/replaces an existing package without being a " +"sufficiently compatible replacement as defined above, use only the " +"`+Obsoletes:+` line from the above example." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2978 +#, no-wrap +msgid "" +"*Take `+%{?dist}+` into account*:\n" +"When deciding what $obsEVR should be,\n" +"remember that it needs to be higher than the previous `Release:`\n" +"with `+%{?dist}+` expanded.\n" +"Example: if the package previously had `+Release: 4%{?dist}+`\n" +"the release in $obsEVR should be at least 5.\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2989 +msgid "" +"If retired packages need to be removed from end user machines because they " +"cause dependency issues which interfere with upgrades or are otherwise " +"harmful, a packager SHOULD request that `+Obsoletes:+` be added to " +"`+fedora-obsolete-packages+`. Simply file a bugzilla ticket " +"https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&version=rawhide&component=fedora-obsolete-packages[here]. " +"Please include information on which packages need to be obsoleted, the exact " +"versions which need to be obsoleted, and the reasons why they cannot be " +"allowed to remain installed." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:2997 +msgid "" +"If the obsoleted package had an Epoch set, it must be preserved in both the " +"`+Provides:+` and `+Obsoletes:+`. For example, assume foo being renamed to " +"bar, bar is compatible with foo, and the last foo package release being " +"foo-1.0-3%\\{?dist} with Epoch: 2. The following should be added to bar " +"(and similarly for all subpackages as applicable):" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:3002 +#, no-wrap +msgid "" +"Provides: foo = 2:%{version}-%{release}\n" +"Obsoletes: foo <= 2:1.0-4 # Important: We set the Obsoletes release to 4 " +"to be higher than the previous Release: 3%{?dist}\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3019 +msgid "" +"Explicit `+Provides:+` need to be aware of whether the package is supplying " +"things that can be used in an arch-independent or arch-specific fashion. " +"For packages that are not noarch, `+Provides:+` should be made arch-specific " +"by applying the `+%{?_isa}+` macro to the end of the text string in Provides " +"(e.g. `+Provides: foo%{?_isa} = 2:%{version}-%{release}+`). Packages that " +"explicitly provide things that can be used in an arch-independent way (for " +"example, those whose dependents don't need to be of the same arch) need not " +"apply this macro. In some cases, a package will supply multiple elements, " +"some of which may be consumed only by dependents of an identical arch and " +"some which may be consumed by dependents of any arch. In such cases, both " +"arch-specific and arch-independent Provides: are warranted." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3035 +msgid "" +"Examples of packages that should explicitly provide only arch-specific " +"`+Provides:+` include native code libraries or plug-ins and their associated " +"-devel packages. Packages that should explicitly provide only " +"arch-independent `+Provides:+` include most stand-alone programs (in " +"addition to all noarch packages). Even though these programs may themselves " +"be arch-specific, clients that run them should not care about their arch in " +"most cases. A package that explicitly provides, for example, both a native " +"code library as well as an interpreted language interface to that library " +"should have both arch-specific (for clients of the native code library) and " +"arch-independent (for clients of the interpreted language interface) " +"Provides:." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3051 +msgid "" +"If there is no standard naming for a package or other long term naming " +"compatibility requirements involved with the rename, the Provides should be " +"assumed to be deprecated and short lived and removed in the distro release " +"after the next one (i.e., if introduced in FC-X, keep in all subsequent " +"package revisions for distros FC-X and FC-(X+1), drop in FC-(X+2)), and the " +"distro version where it is planned to be dropped documented in a comment in " +"the specfile. Maintainers of affected packages should be notified and " +"encouraged to switch to use the new name. Forward compatibility Provides: " +"in older distro branches can be considered in order to make it possible for " +"package maintainers to keep same simple specfiles between branches but still " +"switch to the newer name." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3060 +msgid "" +"For packages that are not usually pulled in by using the package name as the " +"dependency such as library only packages (which are pulled in through " +"library soname depenencies), there's usually no need to add the Provides. " +"Note however that the -devel subpackages of lib packages are pulled in as " +"build dependencies using the package name, so adding the Provides is often " +"appropriate there." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3061 +#, no-wrap +msgid "Deprecating Packages" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3066 +msgid "" +"A procedure exists for indicating that a package is deprecated and may leave " +"the distribution in the future. See " +"xref:deprecating-packages.adoc[Deprecating Packages]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3067 +#, no-wrap +msgid "Networking Support" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3072 +msgid "" +"If an application contains native and stable support for both IPv4 and IPv6, " +"and support for IPv6 does not negatively affect IPv4 then both MUST be " +"enabled in the Fedora package." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3073 +#, no-wrap +msgid "Cron Files" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3077 +msgid "" +"For details on how to package cron files, refer to: " +"xref:CronFiles.adoc[CronFiles]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3078 +#, no-wrap +msgid "Security Updates to Resolve Known CVE Issues" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3084 +msgid "" +"If an update to your package resolves a known security concern (at the time " +"of the update) with a Common Vulnerabilities and Exposures (CVE) number " +"assigned to it, you should mention the CVE number in the RPM changelog " +"entry." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3085 +#, no-wrap +msgid "Build Time Network Access" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3093 +msgid "" +"Packages in the Fedora buildsystem are built in a mock chroot with no access " +"to the internet. Packages must not depend or or use any network resources " +"that they don't themselves create (i.e., for tests). In no cases should " +"source code be downloaded from any external sources, only from the lookaside " +"cache and/or the Fedora git repository." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3095 +#, no-wrap +msgid "Bootstrapping" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3099 +msgid "" +"If your package introduces build time circular dependencies, you should use " +"this macro to bootstrap your package:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:3104 +#, no-wrap +msgid "" +"# When we are bootstrapping, we drop some dependencies, and/or build time " +"tests.\n" +"%bcond_with bootstrap\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:3106 ./pages/index.adoc:3113 +#, no-wrap +msgid "[...]\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:3111 +#, no-wrap +msgid "" +"%if %{without bootstrap}\n" +"# dependencies for %%check\n" +"BuildRequires: foo\n" +"%endif\n" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:3118 +#, no-wrap +msgid "" +"%if %{without bootstrap}\n" +"%check\n" +"make check\n" +"%endif\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3129 +#, no-wrap +msgid "" +"Since Fedora 30,\n" +" as a nice side-effect,\n" +" when bootstrapping mode is enabled,\n" +" the `+~bootstrap+` suffix is appended to the dist tag.\n" +" This avoids the need to bump release\n" +" between bootstrap and final build.\n" +" You can temporarily enable bootstrapping by commit,\n" +" which changes `+%bcond_with bootstrap+` to `+%bcond_without " +"bootstrap+`\n" +" and later reverting the commit to do final build.\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3134 +#, no-wrap +msgid "" +"Since Fedora 31,\n" +" you can disable the automatic suffix addition\n" +" by specifying `+%global __bootstrap %{nil}+`\n" +" in your spec file.\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3138 +msgid "" +"If your package explicitly `+Provides:+` some functionality that is missing " +"when bootstrapped, then that `+Provides:+` should look like:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:3144 +#, no-wrap +msgid "" +"%if %{without bootstrap}\n" +"Provides: bar(some_functionality)\n" +"%endif\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3149 +msgid "" +"Please note that usage of pre-built binaries in bootstrap still needs an " +"exception from the Packaging Committee as stated in <>." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3150 +#, no-wrap +msgid "System Cryptographic Policies" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3154 +msgid "" +"Applications which make use the SSL or TLS cryptographic protocols MUST " +"follow xref:CryptoPolicies.adoc[Crypto Policies]." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3155 +#, no-wrap +msgid "Shebang Lines" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3161 +msgid "" +"When packaging script files, where the interpreter to be used is specified " +"in the first line of the script (the shebang line) following `+#!+`, the " +"following rules apply:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3165 +msgid "" +"`+env+`, `+/bin/env+` and `+/usr/bin/env+` MUST NOT be used. The " +"interpreter used to run packaged applications cannot depend upon what the " +"user has in their personal `+$PATH+`." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3166 +msgid "Files which are not installed as executables SHOULD NOT have shebang lines." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3167 +msgid "Language-specific guidelines may have additional restrictions." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3176 +msgid "" +"Shebang lines for executable scripts are automatically modified to convert " +"calls to `+env+` into direct use of the proper executable in `+/usr/bin+`. " +"Various checks are also applied to verify that the shebang lines are valid, " +"and the build process can fail as a result of these. Finally, other " +"language-specific modifications may also be made. It is thus generally " +"unnecessary to manually modify executable scripts to fix `+env+` usage as " +"long as this functionality is enabled." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3179 +msgid "" +"If the automatic checks and modifications break a package, there are two " +"primary options:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3182 +msgid "" +"The packager can elect to fix the shebang lines manually (using patches, " +"scripting via sed, or other similar methods)." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3184 +msgid "" +"The packager can remove the executable permission from the script so that " +"the checks and modifications are not made." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3197 +msgid "" +"If (and only if) the script needs to remain executable and cannot be " +"modified to pass the checks, then the maintainer MAY elect to disable the " +"checks and modifications. It is also possible to disable the functionality " +"for specific paths or for specific shebang lines by setting " +"`+%__brp_mangle_shebangs_exclude_from+` and " +"`+%__brp_mangle_shebangs_exclude+`, respectively, using the same syntax as " +"the settings described in " +"xref:AutoProvidesAndRequiresFiltering.adoc[Packaging:AutoProvidesAndRequiresFiltering]. " +"It is also possible to disable the functionality entirely by adding " +"`+%undefine __brp_mangle_shebangs+` near the beginning of the specfile." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3198 +#, no-wrap +msgid "BRP (BuildRoot Policy) Scripts" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3204 +msgid "" +"BRP scripts are injected at the end of `+%install+` (via the " +"`+%__os_install_post+` macro) and perform some automatic sanity checks of, " +"or adjustments to, files installed in the build root." +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3210 +msgid "" +"All packages SHOULD always be subject to all the BRP scripts, but sometimes " +"it is necessary for a package to opt-out of certain ones. It is possible to " +"disable any BRP script simply by defining the corresponding variable to " +"`+%{nil}+`. For example, to disable the brp-python-bytecompile script:" +msgstr "" + +#. type: delimited block - +#: ./pages/index.adoc:3216 +#, no-wrap +msgid "" +"# Turn off Python bytecode compilation because this is a Jython\n" +"# package and we will generate JVM bytecode instead\n" +"%global __brp_python_bytecompile %{nil}\n" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3222 +msgid "" +"Any package that disables a BRP script this way MUST also note the reason in " +"an accompanying comment. For a list of the BRP scripts run by default, " +"invoke:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3224 +#, no-wrap +msgid " fgrep '%__brp_' /usr/lib/rpm/redhat/macros\n" +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3225 +#, no-wrap +msgid "Packaging for EPEL" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3234 +msgid "" +"For the most part, these guidelines and the application-specific guidelines " +"below cover packaging for both Fedora and EPEL. However, there are " +"necessarily some differences. When packaging for EPEL, please also consult " +"https://fedoraproject.org/wiki/EPEL:Packaging[the EPEL packaging guidelines] " +"for additional information." +msgstr "" + +#. type: Title == +#: ./pages/index.adoc:3235 +#, no-wrap +msgid "Domain Specific Guidelines" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3239 +msgid "" +"Some applications, languages and build systems have specific guidelines " +"written for them, located on their own pages:" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3241 +msgid "xref:Ada.adoc[Ada]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3242 +msgid "xref:BLAS_LAPACK.adoc[BLAS/LAPACK]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3243 +msgid "xref:C_and_C++.adoc[C and {cpp}]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3244 +msgid "xref:CMake.adoc[CMake]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3245 +msgid "xref:D.adoc[D]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3246 +msgid "xref:Drupal7.adoc[Drupal7]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3247 +msgid "xref:Emacs.adoc[Emacs]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3248 +msgid "xref:FontsPolicy.adoc[Fonts]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3249 +msgid "xref:Fortran.adoc[Fortran]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3250 +msgid "xref:GAP.adoc[GAP]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3251 +msgid "xref:Haskell.adoc[Haskell]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3252 +msgid "xref:Java.adoc[Java]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3253 +msgid "xref:JavaScript.adoc[JavaScript]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3254 +msgid "xref:Langpacks.adoc[Language packs]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3255 +msgid "xref:LibreOfficeExtensions.adoc[LibreOffice Extensions]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3256 +msgid "xref:Lisp.adoc[Lisp]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3257 +msgid "xref:Meson.adoc[Meson]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3258 +msgid "xref:MinGW.adoc[MinGW]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3259 +msgid "xref:Mono.adoc[Mono]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3260 +msgid "xref:MPI.adoc[MPI]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3261 +msgid "xref:Node.js.adoc[Node.js]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3262 +msgid "xref:OCaml.adoc[OCaml]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3263 +msgid "xref:Octave.adoc[Octave]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3264 +msgid "xref:Perl.adoc[Perl]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3265 +msgid "xref:PHP.adoc[PHP]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3266 +msgid "xref:Python.adoc[Python]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3267 +msgid "xref:R.adoc[R]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3268 +msgid "xref:Ruby.adoc[Ruby]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3269 +msgid "xref:Rust.adoc[Rust]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3270 +msgid "xref:SugarActivityGuidelines.adoc[Sugar activities]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3271 +msgid "xref:Tcl.adoc[Tcl/Tk extensions]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3272 +msgid "xref:Web_Assets.adoc[Web Assets]" +msgstr "" + +#. type: Plain text +#: ./pages/index.adoc:3272 +msgid "xref:WordPress_plugin_packaging_guidelines.adoc[WordPress extensions]" +msgstr ""