From 902a3c65037ad8c84dc2de121dc659b8b3b867f7 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Apr 21 2026 19:39:17 +0000 Subject: Migrate to Fedora Forge --- diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b9b1e82..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/build/ -/cache/ -/public/ -/guidelines/**/*.html diff --git a/Makefile b/Makefile deleted file mode 100644 index 52c9fae..0000000 --- a/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) -mkfile_dir := $(patsubst %/,%,$(dir $(mkfile_path))) -docsbuilder := $(abspath $(mkfile_dir)/docsbuilder.sh) - -doc: - $(docsbuilder) -b - -build: doc - -.ONESHELL: -serve: - $(info *** Make sure to refresh pages without cache ***) - $(docsbuilder) -p - -watch: - $(docsbuilder) -a - -linkcheck: - $(docsbuilder) -k - $(docsbuilder) -p - linkchecker http://localhost:8080 --check-extern --no-robots \ - --ignore-url "drupal.org" \ - --ignore-url "file:///antora" \ - --ignore-url 'http://localhost:8080/en-US' - $(docsbuilder) -k - -.DEFAULT_GOAL := doc -.PHONY: doc linkcheck serve watch diff --git a/README.md b/README.md index 591ce37..03e8eae 100644 --- a/README.md +++ b/README.md @@ -1,96 +1,3 @@ -# Fedora Packaging Committee +# Migrated to Fedora Forge -Welcome! This is the Pagure instance for the Fedora Packaging Committee. - -The Pagure repository is used to store the source of Packaging Guidelines, -track related issues -and accept changes via pull requests. - -For more information on the committee and its processes, -see the page in the main Fedora wiki -[here](https://fedoraproject.org/wiki/Packaging_Committee). - -You can view the actual packaging guidelines -[here](https://docs.fedoraproject.org/en-US/packaging-guidelines/). - -## Packaging Guideline Development - -### Checking the Effect of Your Changes - -To quickly check whether the changes you have made to a .adoc file -cause the desired changes to the HTML code, -use Asciidoctor. -It is in the package rubygem-asciidoctor, -and is, despite the package name, usable from a command prompt: - -``` -$ asciidoctor path/to/file.adoc -``` - -This will generate an HTML file corresponding to the input file. -The style will differ -but the HTML code as such is supposed to match what will end up on the website, -allowing you to see whether the Asciidoc code works as you intended. - -### Quick Preview in the Browser - -You can install the Asciidoctor browser extension -from https://github.com/asciidoctor/asciidoctor-browser-extension -to get a quick browser preview. -As with running asciidoctor directly, -the results won't look exactly -like the final result will, -but it's reasonable for checking the formatting. - -This will also work to preview files from within Pagure, -which is handy for checking the results of pull requests -without pulling and locally generating the documents. -Simply navigate to a file and click the `Raw` button. - -Note that under Firefox, -the extension will not run on `file://` URLs -unless you press enter on the URL bar. - -### Building the Whole Set of Guidelines - -For building the whole set of guidelines locally -and viewing them in the same style as on the website, -there is a container-based build procedure. -This will download and execute container blobs containing Antora, -and produce a complete set of HTML documents and stylesheets, -which can then be browsed through a temporary HTTP server. - -Prerequisites: - -* `make` -* `podman` -* `python3` - -Run the following commands and open http://localhost:8000/ - -``` -$ make -$ make serve -``` - -### Writing - -[Antora](https://antora.org/) is used for -managing the various documents which comprise the guidelines -and integrating them into the rest of Fedora Documentation. - -The guidelines themselves are written in -[AsciiDoc](https://asciidoc.org). -Some useful information about AsciiDoc can be found below: - -* [AsciiDoc Syntax Quick Reference](https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/) -* [AsciiDoc Writer's Guide](https://asciidoctor.org/docs/asciidoc-writers-guide/) - -### Conventions and Preferences - -The Packaging Committee tries to follow the following, -and it is preferred that pull requests do the same. - -* Use [Semantic Line Breaks](https://sembr.org/) to make diffing simpler. -* Prefer `https://example.com[here]` over `link:https://example.com[here]` -* Prefer `[#some-ref]` over `[[some-ref]]` +https://forge.fedoraproject.org/packaging/guidelines diff --git a/docsbuilder.sh b/docsbuilder.sh deleted file mode 100755 index fcb54d6..0000000 --- a/docsbuilder.sh +++ /dev/null @@ -1,292 +0,0 @@ -#!/bin/bash -# script to watch source directory for changes, and re-run build and preview -# -# License: MIT -# https://fedoraproject.org/wiki/Licensing:MIT#Another_Minimal_variant_(found_in_libatomic_ops) -# -# Copyright (c) Fedora community contributors. -# -# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR -# IMPLIED. ANY USE IS AT YOUR OWN RISK. -# -# Permission is hereby granted to use or copy this program for any purpose, -# provided the above notices are retained on all copies. Permission to modify -# the code and to distribute modified code is granted, provided the above -# notices are retained, and a notice that the code was modified is included -# with the above copyright notice. - - -script_name="docsbuilder.sh" -script_source="https://gitlab.com/fedora/docs/templates/fedora-docs-template/-/raw/main/${script_name}" -version="1.2.0" -image="docker.io/antora/antora" -cmd="--html-url-extension-style=indexify site.yml" -srcdir="guidelines" -buildir="public" -previewpidfile="preview.pid" - -# 4913: for vim users, vim creates a temporary file to test it can write to -# directory -# https://groups.google.com/g/vim_dev/c/sppdpElxY44 -# .git: so we don't get rebuilds each time git metadata changes -inotifyignore="\.git.*|4913" - -watch_and_build () { - if ! command -v inotifywait > /dev/null - then - echo "inotifywait command could not be found. Please install inotify-tools." - echo "On Fedora, run: sudo dnf install inotify-tools" - stop_preview_and_exit - else - # check for git - # required to get ignorelist - if ! command -v git > /dev/null - then - echo "git command could not be found. Please install git." - echo "On Fedora, run: sudo dnf install git-core" - stop_preview_and_exit - else - # Get files not being tracked, we don't watch for changes in these. - # Could hard code, but people use different editors that may create - # temporary files that are updated regularly and so on, so better - # to get the list from git. It'll also look at global gitingore - # settings and so on. - inotifyignore="$(git status -s --ignored | grep '^!!' | sed -e 's/^!! //' | tr '\n' '|')${inotifyignore}" - fi - - while true - do - echo "Watching current directory (excluding: ${inotifyignore}) for changes and re-building as required. Use Ctrl C to stop." - inotifywait -q --exclude "($inotifyignore)" -e modify,create,delete,move -r . && echo "Change detected, rebuilding.." && build - done - fi -} - -build () { - if [ "$(uname)" == "Darwin" ]; then - # Running on macOS. - # Let's assume that the user has the Docker CE installed - # which doesn't require a root password. - echo "" - echo "This build script is using Docker container runtime to run the build in an isolated environment." - echo "" - docker run --rm -it -v $(pwd):/antora $image $cmd - - elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - # Running on Linux. - # Check whether podman is available, else faill back to docker - # which requires root. - - if [ -n "$(command -v podman)" ]; then - echo "" - echo "This build script is using Podman to run the build in an isolated environment." - echo "" - podman run --rm -it -v $(pwd):/antora:z $image $cmd --stacktrace - - elif [ -n "$(command -v docker)" ]; then - echo "" - echo "This build script is using Docker to run the build in an isolated environment." - echo "" - - if groups | grep -wq "docker"; then - docker run --rm -it -v $(pwd):/antora:z $image $cmd - else - echo "" - echo "This build script is using $runtime to run the build in an isolated environment. You might be asked for your password." - echo "You can avoid this by adding your user to the 'docker' group, but be aware of the security implications. See https://docs.docker.com/install/linux/linux-postinstall/." - echo "" - sudo docker run --rm -it -v $(pwd):/antora:z $image $cmd - fi - - else - echo "" - echo "Error: Container runtime haven't been found on your system. Fix it by:" - echo "$ sudo dnf install podman" - exit 1 - fi - fi -} - -start_preview () { - - # clean up a preview that may be running - stop_preview - - # always run an initial build so preview shows latest version - build - - if [ "$(uname)" == "Darwin" ]; then - # Running on macOS. - # Let's assume that the user has the Docker CE installed - # which doesn't require a root password. - echo "The preview will be available at http://localhost:8080/" - docker run --rm -v $(pwd):/antora:ro -v $(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro -p 8080:80 nginx - - elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - # Running on Linux. - # Fedora Workstation has python3 installed as a default, so using that - echo "" - echo "The preview is available at http://localhost:8080" - echo "" - pushd "${buildir}" > /dev/null 2>&1 - python3 -m http.server 8080 & - echo "$!" > ../"${previewpidfile}" - popd > /dev/null 2>&1 - fi -} - -stop_preview () { - if [ -e "${previewpidfile}" ] - then - PID=$(cat "${previewpidfile}") - kill $PID - echo "Stopping preview server (running with PID ${PID}).." - rm -f "${previewpidfile}" - else - echo "No running preview server found to stop: no ${previewpidfile} file found." - fi -} - -stop_preview_and_exit () -{ - # stop and also exit the script - - # if stop_preview is trapped, then SIGINT doesn't stop the build loop. So - # we need to make sure we also exit the script. - - # stop_preview is called before other functions, so we cannot add exit to - # it. - stop_preview - exit 0 -} - - -# https://apple.stackexchange.com/questions/83939/compare-multi-digit-version-numbers-in-bash/123408#123408 -version () { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } - - -check_update () { - if ! command -v curl > /dev/null - then - echo "curl command could not be found. Please install curl." - echo "On Fedora, run: sudo dnf install curl" - exit 0 - fi - script_version="$(grep "^version=" ${script_name} | cut -d '=' -f2 | tr --delete '"')" - tempdir="$(mktemp -d)" - echo "$tempdir" - pushd "$tempdir" > /dev/null 2>&1 - curl "$script_source" --silent --output "${script_name}" - upstream_version="$(grep "^version=" ${script_name} | cut -d '=' -f2 | tr --delete '"')" - echo "${upstream_version}" - if [ $(version $upstream_version) -gt $(version $script_version) ]; then - echo "Update available" - echo "Script version $upstream_version is available at $script_source" - echo "This version is $script_version." - echo "Please use the '-U' option to update." - echo - fi - popd > /dev/null 2&>1 -} - -install_update () { - if ! command -v curl > /dev/null - then - echo "curl command could not be found. Please install curl." - echo "On Fedora, run: sudo dnf install curl" - exit 0 - fi - curl "$script_source" --silent --output "${script_name}.new" - mv "${script_name}.new" "${script_name}" - chmod +x "${script_name}" -} - -usage() { - echo "$0: Build and preview Fedora antora based documentation" - echo - echo "Usage: $0 [-awbpkh]" - echo - echo "-a: start preview, start watcher and rebuilder" - echo "-w: start watcher and rebuilder" - echo "-b: rebuild" - echo "-p: start_preview" - echo "-k: stop_preview" - echo "-h: print this usage text and exit" - echo "-u: check builder script update" - echo "-U: install builder script from upstream" - echo - echo "Maintained by the Fedora documentation team." - echo "Please contact on our channels: https://docs.fedoraproject.org/en-US/fedora-docs/#find-docs" -} - -# check if the script is being run in a Fedora docs repository -if [ ! -e "site.yml" ] -then - echo "site.yml not be found." - echo "This does not appear to be a Fedora Antora based documentation repository." - echo "Exiting." - echo - usage - exit 1 -fi - - -if [ $# -lt 1 ] -then - echo "No options provided, running preview with watch and build." - echo "Run script with '-h' to see all available options." - echo - echo - trap stop_preview_and_exit INT - start_preview - watch_and_build - stop_preview -fi - -# parse options -while getopts "awbpkhuU" OPTION -do - case $OPTION in - a) - # handle sig INT to stop the preview - trap stop_preview_and_exit INT - start_preview - watch_and_build - stop_preview - exit 0 - ;; - w) - watch_and_build - exit 0 - ;; - b) - build - exit 0 - ;; - p) - start_preview - echo "Please run ./${script_name} -k to stop the preview server" - exit 0 - ;; - k) - stop_preview - exit 0 - ;; - h) - usage - exit 0 - ;; - u) - check_update - exit 0 - ;; - U) - install_update - exit 0 - ;; - ?) - usage - exit 1 - ;; - esac -done diff --git a/guidelines/antora.yml b/guidelines/antora.yml deleted file mode 100644 index 76b864a..0000000 --- a/guidelines/antora.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Name will be mostly visible in the URL. Treat it as an indentifier. -# Tip: If you want to use the local preview scripts that come with this repository, please change this value in the site.yml file as well. (under site/start_page) -name: packaging-guidelines - -# Title will be visible on the page. -title: Packaging Guidelines - -# If you don't plan to have multiple versions of the docs (for example, to document multiple versions of some software), you can ignore this field. Otherwise, change "master" to a specific version. -version: master - -# We encourage you to name the index page as "index.adoc". If you absolutely have to use a different name, please reflect it here. You can ignore this field otherwise. -start_page: ROOT:index.adoc - -# This lists all the menu definitions of your component. -nav: -- modules/ROOT/nav.adoc diff --git a/guidelines/modules/ROOT/examples/addon.metainfo.xml b/guidelines/modules/ROOT/examples/addon.metainfo.xml deleted file mode 100644 index 19d5d09..0000000 --- a/guidelines/modules/ROOT/examples/addon.metainfo.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - gedit-bookmarks - gedit.desktop - Bookmarks - Easy document navigation with bookmarks - https://wiki.gnome.org/Apps/Gedit/ShippedPlugins - https://bugzilla.gnome.org/enter_bug.cgi?product=gedit&component=Plugins - CC0-1.0 - GPL-2.0+ - diff --git a/guidelines/modules/ROOT/examples/app.metainfo.xml b/guidelines/modules/ROOT/examples/app.metainfo.xml deleted file mode 100644 index e285c08..0000000 --- a/guidelines/modules/ROOT/examples/app.metainfo.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - comical.desktop - CC0-1.0 - GPL-2.0+ and GFDL-1.3 - Comical - A Comic Archive Reader - Un Comic Archive Lecteur - -

- Comical is an easy to use and cross-platform CBR and CBZ reader which - prefetches and caches pages for speed. -

-

- Comical est une CBR et CBZ lecteur facile à utiliser et - multi-plateforme qui prélectures et caches pages pour la vitesse. -

-

- Resized images are crisp, and you can view pages one or two at a time. - Comical is open-source, so feel free to contribute new features! -

-

- Images redimensionnées sont nettes, et vous pouvez voir une ou deux pages à la fois. - Comical est open-source, alors n'hésitez pas à apporter de nouvelles fonctionnalités! -

-
- - - http://comical.sourceforge.net/images/comical-0.5-linux.jpg - - - http://comical.sourceforge.net/images/comical-0.6-win32.jpg - - - http://comical.sourceforge.net/ - richard_at_hughsie.com -
diff --git a/guidelines/modules/ROOT/examples/fonts/after-fontconfig-fixes.txt b/guidelines/modules/ROOT/examples/fonts/after-fontconfig-fixes.txt deleted file mode 100644 index 068b015..0000000 --- a/guidelines/modules/ROOT/examples/fonts/after-fontconfig-fixes.txt +++ /dev/null @@ -1,110 +0,0 @@ -Accanthis ADF Std Regular Accanthis ADF Std 100 80 0 131400 /usr/share/fonts/adf-accanthis-fonts/AccanthisADFStd-Regular.otf -Accanthis ADF Std Italic Accanthis ADF Std Italic 100 80 100 131400 /usr/share/fonts/adf-accanthis-fonts/AccanthisADFStd-Italic.otf -Accanthis ADF Std Bold Accanthis ADF Std Bold 100 200 0 131400 /usr/share/fonts/adf-accanthis-fonts/AccanthisADFStd-Bold.otf -Accanthis ADF Std Bold Italic Accanthis ADF Std Bold Italic 100 200 100 131400 /usr/share/fonts/adf-accanthis-fonts/AccanthisADFStd-BoldItalic.otf -Dai Banna SIL Light Dai Banna SIL Light 100 50 0 1 /usr/share/fonts/sil-dai-banna-fonts/DBSILLR.ttf -Dai Banna SIL Light Italic Dai Banna SIL Light Italic 100 80 100 1 /usr/share/fonts/sil-dai-banna-fonts/DBSILLO.ttf -Dai Banna SIL Medium Italic Dai Banna SIL Medium Italic 100 80 100 2 /usr/share/fonts/sil-dai-banna-fonts/DBSILBO.ttf -Dai Banna SIL Medium Dai Banna SIL Medium 100 100 0 2 /usr/share/fonts/sil-dai-banna-fonts/DBSILBR.ttf -Dai Banna SIL Medium Dai Banna SIL Medium 100 100 0 1 /usr/share/fonts/sil-dai-banna-fonts/DBSILLB.ttf -Dai Banna SIL Black Italic Dai Banna SIL Black Italic 100 200 100 2 /usr/share/fonts/sil-dai-banna-fonts/DBSILBC.ttf -Dai Banna SIL Medium Italic Dai Banna SIL Medium Italic 100 200 100 1 /usr/share/fonts/sil-dai-banna-fonts/DBSILLC.ttf -Dai Banna SIL Black Dai Banna SIL Black 100 210 0 2 /usr/share/fonts/sil-dai-banna-fonts/DBSILBB.ttf -IBM Plex Sans IBM Plex Sans [85 100] [0 200] 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans IBM Plex Sans [85 100] [0 200] 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiCondensed Thin IBM Plex Sans SemiCondensed Thin 85 0 0 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Thin.otf -IBM Plex Sans SemiCondensed Thin IBM Plex Sans SemiCondensed Thin 85 0 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiCondensed Thin Italic IBM Plex Sans SemiCondensed Thin Italic 85 0 100 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-ThinItalic.otf -IBM Plex Sans SemiCondensed Thin Italic IBM Plex Sans SemiCondensed Thin Italic 85 0 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiCondensed ExtraLight IBM Plex Sans SemiCondensed ExtraLight 85 40 0 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-ExtraLight.otf -IBM Plex Sans SemiCondensed ExtraLight IBM Plex Sans SemiCondensed ExtraLight 85 40 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiCondensed ExtraLight Italic IBM Plex Sans SemiCondensed ExtraLight Italic 85 40 100 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-ExtraLightItalic.otf -IBM Plex Sans SemiCondensed ExtraLight Italic IBM Plex Sans SemiCondensed ExtraLight Italic 85 40 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiCondensed Light IBM Plex Sans SemiCondensed Light 85 50 0 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Light.otf -IBM Plex Sans SemiCondensed Light IBM Plex Sans SemiCondensed Light 85 50 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiCondensed Light Italic IBM Plex Sans SemiCondensed Light Italic 85 50 100 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-LightItalic.otf -IBM Plex Sans SemiCondensed Light Italic IBM Plex Sans SemiCondensed Light Italic 85 50 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiCondensed IBM Plex Sans SemiCondensed 85 80 0 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Regular.otf -IBM Plex Sans SemiCondensed IBM Plex Sans SemiCondensed 85 80 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiCondensed Italic IBM Plex Sans SemiCondensed Italic 85 80 100 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Italic.otf -IBM Plex Sans SemiCondensed Italic IBM Plex Sans SemiCondensed Italic 85 80 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiCondensed Text IBM Plex Sans SemiCondensed Text 85 90 0 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Text.otf -IBM Plex Sans SemiCondensed Text IBM Plex Sans SemiCondensed Text 85 90 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiCondensed Text Italic IBM Plex Sans SemiCondensed Text Italic 85 90 100 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-TextItalic.otf -IBM Plex Sans SemiCondensed Text Italic IBM Plex Sans SemiCondensed Text Italic 85 90 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiCondensed Medium IBM Plex Sans SemiCondensed Medium 85 100 0 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Medium.otf -IBM Plex Sans SemiCondensed Medium IBM Plex Sans SemiCondensed Medium 85 100 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiCondensed Medium Italic IBM Plex Sans SemiCondensed Medium Italic 85 100 100 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-MediumItalic.otf -IBM Plex Sans SemiCondensed Medium Italic IBM Plex Sans SemiCondensed Medium Italic 85 100 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiCondensed SemiBold IBM Plex Sans SemiCondensed SemiBold 85 180 0 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-SemiBold.otf -IBM Plex Sans SemiCondensed SemiBold IBM Plex Sans SemiCondensed SemiBold 85 180 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiCondensed SemiBold Italic IBM Plex Sans SemiCondensed SemiBold Italic 85 180 100 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-SemiBoldItalic.otf -IBM Plex Sans SemiCondensed SemiBold Italic IBM Plex Sans SemiCondensed SemiBold Italic 85 180 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiCondensed Bold IBM Plex Sans SemiCondensed Bold 85 200 0 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Bold.otf -IBM Plex Sans SemiCondensed Bold IBM Plex Sans SemiCondensed Bold 85 200 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiCondensed Bold Italic IBM Plex Sans SemiCondensed Bold Italic 85 200 100 6 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-BoldItalic.otf -IBM Plex Sans SemiCondensed Bold Italic IBM Plex Sans SemiCondensed Bold Italic 85 200 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Thin IBM Plex Sans Thin 100 0 0 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Thin.otf -IBM Plex Sans Thin IBM Plex Sans Thin 100 0 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Thin IBM Plex Sans Thin 100 0 0 4 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Thin.otf -IBM Plex Sans Thin IBM Plex Sans Thin 100 0 0 3 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Thin.otf -IBM Plex Sans Thin IBM Plex Sans Thin 100 0 0 2 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Thin.otf -IBM Plex Sans Thin IBM Plex Sans Thin 100 0 0 1 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Thin.otf -IBM Plex Sans Thin Italic IBM Plex Sans Thin Italic 100 0 100 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-ThinItalic.otf -IBM Plex Sans Thin Italic IBM Plex Sans Thin Italic 100 0 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans ExtraLight IBM Plex Sans ExtraLight 100 40 0 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-ExtraLight.otf -IBM Plex Sans ExtraLight IBM Plex Sans ExtraLight 100 40 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans ExtraLight IBM Plex Sans ExtraLight 100 40 0 4 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-ExtraLight.otf -IBM Plex Sans ExtraLight IBM Plex Sans ExtraLight 100 40 0 3 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-ExtraLight.otf -IBM Plex Sans ExtraLight IBM Plex Sans ExtraLight 100 40 0 2 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-ExtraLight.otf -IBM Plex Sans ExtraLight IBM Plex Sans ExtraLight 100 40 0 1 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-ExtraLight.otf -IBM Plex Sans ExtraLight Italic IBM Plex Sans ExtraLight Italic 100 40 100 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-ExtraLightItalic.otf -IBM Plex Sans ExtraLight Italic IBM Plex Sans ExtraLight Italic 100 40 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Light IBM Plex Sans Light 100 50 0 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Light.otf -IBM Plex Sans Light IBM Plex Sans Light 100 50 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Light IBM Plex Sans Light 100 50 0 4 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Light.otf -IBM Plex Sans Light IBM Plex Sans Light 100 50 0 3 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Light.otf -IBM Plex Sans Light IBM Plex Sans Light 100 50 0 2 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Light.otf -IBM Plex Sans Light IBM Plex Sans Light 100 50 0 1 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Light.otf -IBM Plex Sans Light Italic IBM Plex Sans Light Italic 100 50 100 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-LightItalic.otf -IBM Plex Sans Light Italic IBM Plex Sans Light Italic 100 50 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Regular IBM Plex Sans 100 80 0 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Regular.otf -IBM Plex Sans Regular IBM Plex Sans 100 80 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Regular IBM Plex Sans 100 80 0 4 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Regular.otf -IBM Plex Sans Regular IBM Plex Sans 100 80 0 3 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Regular.otf -IBM Plex Sans Regular IBM Plex Sans 100 80 0 2 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Regular.otf -IBM Plex Sans Regular IBM Plex Sans 100 80 0 1 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Regular.otf -IBM Plex Sans Italic IBM Plex Sans Italic 100 80 100 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Italic.otf -IBM Plex Sans Italic IBM Plex Sans Italic 100 80 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Text IBM Plex Sans Text 100 90 0 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Text.otf -IBM Plex Sans Text IBM Plex Sans Text 100 90 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Text IBM Plex Sans Text 100 90 0 4 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Text.otf -IBM Plex Sans Text IBM Plex Sans Text 100 90 0 3 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Text.otf -IBM Plex Sans Text IBM Plex Sans Text 100 90 0 2 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Text.otf -IBM Plex Sans Text IBM Plex Sans Text 100 90 0 1 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Text.otf -IBM Plex Sans Text Italic IBM Plex Sans Text Italic 100 90 100 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-TextItalic.otf -IBM Plex Sans Text Italic IBM Plex Sans Text Italic 100 90 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Medium IBM Plex Sans Medium 100 100 0 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Medium.otf -IBM Plex Sans Medium IBM Plex Sans Medium 100 100 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Medium IBM Plex Sans Medium 100 100 0 4 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Medium.otf -IBM Plex Sans Medium IBM Plex Sans Medium 100 100 0 3 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Medium.otf -IBM Plex Sans Medium IBM Plex Sans Medium 100 100 0 2 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Medium.otf -IBM Plex Sans Medium IBM Plex Sans Medium 100 100 0 1 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Medium.otf -IBM Plex Sans Medium Italic IBM Plex Sans Medium Italic 100 100 100 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-MediumItalic.otf -IBM Plex Sans Medium Italic IBM Plex Sans Medium Italic 100 100 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans SemiBold IBM Plex Sans SemiBold 100 180 0 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-SemiBold.otf -IBM Plex Sans SemiBold IBM Plex Sans SemiBold 100 180 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans SemiBold IBM Plex Sans SemiBold 100 180 0 4 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-SemiBold.otf -IBM Plex Sans SemiBold IBM Plex Sans SemiBold 100 180 0 3 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-SemiBold.otf -IBM Plex Sans SemiBold IBM Plex Sans SemiBold 100 180 0 2 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-SemiBold.otf -IBM Plex Sans SemiBold IBM Plex Sans SemiBold 100 180 0 1 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-SemiBold.otf -IBM Plex Sans SemiBold Italic IBM Plex Sans SemiBold Italic 100 180 100 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-SemiBoldItalic.otf -IBM Plex Sans SemiBold Italic IBM Plex Sans SemiBold Italic 100 180 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Bold IBM Plex Sans Bold 100 200 0 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Bold.otf -IBM Plex Sans Bold IBM Plex Sans Bold 100 200 0 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Bold IBM Plex Sans Bold 100 200 0 4 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Bold.otf -IBM Plex Sans Bold IBM Plex Sans Bold 100 200 0 3 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Bold.otf -IBM Plex Sans Bold IBM Plex Sans Bold 100 200 0 2 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Bold.otf -IBM Plex Sans Bold IBM Plex Sans Bold 100 200 0 1 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Bold.otf -IBM Plex Sans Bold Italic IBM Plex Sans Bold Italic 100 200 100 7 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-BoldItalic.otf -IBM Plex Sans Bold Italic IBM Plex Sans Bold Italic 100 200 100 5 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf diff --git a/guidelines/modules/ROOT/examples/fonts/before-fontconfig-fixes.txt b/guidelines/modules/ROOT/examples/fonts/before-fontconfig-fixes.txt deleted file mode 100644 index b1579c3..0000000 --- a/guidelines/modules/ROOT/examples/fonts/before-fontconfig-fixes.txt +++ /dev/null @@ -1,110 +0,0 @@ -Accanthis ADF Std Regular AccanthisADFStd-Regular 100 80 0 131400 /usr/share/fonts/adf-accanthis-fonts/AccanthisADFStd-Regular.otf -Accanthis ADF Std Italic AccanthisADFStd-Italic 100 80 100 131400 /usr/share/fonts/adf-accanthis-fonts/AccanthisADFStd-Italic.otf -Accanthis ADF Std Bold AccanthisADFStd-Bold 100 200 0 131400 /usr/share/fonts/adf-accanthis-fonts/AccanthisADFStd-Bold.otf -Accanthis ADF Std Bold Italic AccanthisADFStd-BoldItalic 100 200 100 131400 /usr/share/fonts/adf-accanthis-fonts/AccanthisADFStd-BoldItalic.otf -Dai Banna SIL Book Regular Dai Banna SIL Book 100 80 0 144179 /usr/share/fonts/sil-dai-banna-fonts/DBSILBR.ttf -Dai Banna SIL Book Italic Dai Banna SIL Book Italic 100 80 100 144179 /usr/share/fonts/sil-dai-banna-fonts/DBSILBO.ttf -Dai Banna SIL Book Bold Dai Banna SIL Book Bold 100 200 0 144179 /usr/share/fonts/sil-dai-banna-fonts/DBSILBB.ttf -Dai Banna SIL Book Bold Italic Dai Banna SIL Book Bold Italic 100 200 100 144179 /usr/share/fonts/sil-dai-banna-fonts/DBSILBC.ttf -Dai Banna SIL Light Regular Dai Banna SIL Light 100 80 0 144179 /usr/share/fonts/sil-dai-banna-fonts/DBSILLR.ttf -Dai Banna SIL Light Italic Dai Banna SIL Light Italic 100 80 100 144179 /usr/share/fonts/sil-dai-banna-fonts/DBSILLO.ttf -Dai Banna SIL Light Bold Dai Banna SIL Light Bold 100 200 0 144179 /usr/share/fonts/sil-dai-banna-fonts/DBSILLB.ttf -Dai Banna SIL Light Bold Italic Dai Banna SIL Light Bold Italic 100 200 100 144179 /usr/share/fonts/sil-dai-banna-fonts/DBSILLC.ttf -IBM Plex Sans Thin IBM Plex Sans Thin 100 0 0 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Thin.otf -IBM Plex Sans Thin Italic IBM Plex Sans Thin Italic 100 0 100 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-ThinItalic.otf -IBM Plex Sans ExtraLight IBM Plex Sans ExtraLight 100 40 0 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-ExtraLight.otf -IBM Plex Sans ExtraLight Italic IBM Plex Sans ExtraLight Italic 100 40 100 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-ExtraLightItalic.otf -IBM Plex Sans Light IBM Plex Sans Light 100 50 0 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Light.otf -IBM Plex Sans Light Italic IBM Plex Sans Light Italic 100 50 100 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-LightItalic.otf -IBM Plex Sans Regular IBM Plex Sans 100 80 0 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Regular.otf -IBM Plex Sans Italic IBM Plex Sans Italic 100 80 100 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Italic.otf -IBM Plex Sans Text IBM Plex Sans Text 100 90 0 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Text.otf -IBM Plex Sans Text Italic IBM Plex Sans Text Italic 100 90 100 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-TextItalic.otf -IBM Plex Sans Medium IBM Plex Sans Medium 100 100 0 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Medium.otf -IBM Plex Sans Medium Italic IBM Plex Sans Medium Italic 100 100 100 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-MediumItalic.otf -IBM Plex Sans SemiBold IBM Plex Sans SemiBold 100 180 0 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-SemiBold.otf -IBM Plex Sans SemiBold Italic IBM Plex Sans SemiBold Italic 100 180 100 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-SemiBoldItalic.otf -IBM Plex Sans Bold IBM Plex Sans Bold 100 200 0 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-Bold.otf -IBM Plex Sans Bold Italic IBM Plex Sans Bold Italic 100 200 100 196673 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSans-BoldItalic.otf -IBM Plex Sans Arabic Thin IBM Plex Sans Arabic Thin 100 0 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Thin.otf -IBM Plex Sans Arabic ExtraLight IBM Plex Sans Arabic ExtraLight 100 40 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-ExtraLight.otf -IBM Plex Sans Arabic Light IBM Plex Sans Arabic Light 100 50 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Light.otf -IBM Plex Sans Arabic Regular IBM Plex Sans Arabic 100 80 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Regular.otf -IBM Plex Sans Arabic Text IBM Plex Sans Arabic Text 100 90 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Text.otf -IBM Plex Sans Arabic Medium IBM Plex Sans Arabic Medium 100 100 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Medium.otf -IBM Plex Sans Arabic SemiBold IBM Plex Sans Arabic SemiBold 100 180 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-SemiBold.otf -IBM Plex Sans Arabic Bold IBM Plex Sans Arabic Bold 100 200 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansArabic-Bold.otf -IBM Plex Sans Condensed Thin IBM Plex Sans Condensed Thin 75 0 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Thin.otf -IBM Plex Sans Condensed Thin Italic IBM Plex Sans Condensed Thin Italic 75 0 100 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-ThinItalic.otf -IBM Plex Sans Condensed ExtraLight IBM Plex Sans Condensed ExtraLight 75 40 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-ExtraLight.otf -IBM Plex Sans Condensed ExtraLight Italic IBM Plex Sans Condensed ExtraLight Italic 75 40 100 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-ExtraLightItalic.otf -IBM Plex Sans Condensed Light IBM Plex Sans Condensed Light 75 50 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Light.otf -IBM Plex Sans Condensed Light Italic IBM Plex Sans Condensed Light Italic 75 50 100 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-LightItalic.otf -IBM Plex Sans Condensed Regular IBM Plex Sans Condensed 75 80 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Regular.otf -IBM Plex Sans Condensed Italic IBM Plex Sans Condensed Italic 75 80 100 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Italic.otf -IBM Plex Sans Condensed Text IBM Plex Sans Condensed Text 75 90 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Text.otf -IBM Plex Sans Condensed Text Italic IBM Plex Sans Condensed Text Italic 75 90 100 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-TextItalic.otf -IBM Plex Sans Condensed Medium IBM Plex Sans Condensed Medium 75 100 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Medium.otf -IBM Plex Sans Condensed Medium Italic IBM Plex Sans Condensed Medium Italic 75 100 100 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-MediumItalic.otf -IBM Plex Sans Condensed SemiBold IBM Plex Sans Condensed SemiBold 75 180 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-SemiBold.otf -IBM Plex Sans Condensed SemiBold Italic IBM Plex Sans Condensed SemiBold Italic 75 180 100 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-SemiBoldItalic.otf -IBM Plex Sans Condensed Bold IBM Plex Sans Condensed Bold 75 200 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-Bold.otf -IBM Plex Sans Condensed Bold Italic IBM Plex Sans Condensed Bold Italic 75 200 100 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansCondensed-BoldItalic.otf -IBM Plex Sans Devanagari Thin IBM Plex Sans Devanagari Thin 100 0 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Thin.otf -IBM Plex Sans Devanagari ExtraLight IBM Plex Sans Devanagari ExtraLight 100 40 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-ExtraLight.otf -IBM Plex Sans Devanagari Light IBM Plex Sans Devanagari Light 100 50 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Light.otf -IBM Plex Sans Devanagari Regular IBM Plex Sans Devanagari 100 80 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Regular.otf -IBM Plex Sans Devanagari Text IBM Plex Sans Devanagari Text 100 90 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Text.otf -IBM Plex Sans Devanagari Medium IBM Plex Sans Devanagari Medium 100 100 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Medium.otf -IBM Plex Sans Devanagari SemiBold IBM Plex Sans Devanagari SemiBold 100 180 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-SemiBold.otf -IBM Plex Sans Devanagari Bold IBM Plex Sans Devanagari Bold 100 200 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansDevanagari-Bold.otf -IBM Plex Sans Hebrew Thin IBM Plex Sans Hebrew Thin 100 0 0 65667 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Thin.otf -IBM Plex Sans Hebrew ExtraLight IBM Plex Sans Hebrew ExtraLight 100 40 0 65667 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-ExtraLight.otf -IBM Plex Sans Hebrew Light IBM Plex Sans Hebrew Light 100 50 0 65667 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Light.otf -IBM Plex Sans Hebrew Regular IBM Plex Sans Hebrew 100 80 0 65667 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Regular.otf -IBM Plex Sans Hebrew Text IBM Plex Sans Hebrew Text 100 90 0 65667 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Text.otf -IBM Plex Sans Hebrew Medium IBM Plex Sans Hebrew Medium 100 100 0 65667 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Medium.otf -IBM Plex Sans Hebrew SemiBold IBM Plex Sans Hebrew SemiBold 100 180 0 65667 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-SemiBold.otf -IBM Plex Sans Hebrew Bold IBM Plex Sans Hebrew Bold 100 200 0 65667 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansHebrew-Bold.otf -IBM Plex Sans Thai Thin IBM Plex Sans Thai Thin 100 0 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Thin.otf -IBM Plex Sans Thai ExtraLight IBM Plex Sans Thai ExtraLight 100 40 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-ExtraLight.otf -IBM Plex Sans Thai Light IBM Plex Sans Thai Light 100 50 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Light.otf -IBM Plex Sans Thai Regular IBM Plex Sans Thai 100 80 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Regular.otf -IBM Plex Sans Thai Text IBM Plex Sans Thai Text 100 90 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Text.otf -IBM Plex Sans Thai Medium IBM Plex Sans Thai Medium 100 100 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Medium.otf -IBM Plex Sans Thai SemiBold IBM Plex Sans Thai SemiBold 100 180 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-SemiBold.otf -IBM Plex Sans Thai Bold IBM Plex Sans Thai Bold 100 200 0 65601 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansThai-Bold.otf -IBM Plex Sans Var IBM Plex Sans Var Regular [85 100] [0 200] 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var IBM Plex Sans Var Italic [85 100] [0 200] 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Thin Condensed IBM Plex Sans Var Thin Condensed 85 0 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Thin Condensed Italic IBM Plex Sans Var Thin Condensed Italic 85 0 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var ExtraLight Condensed IBM Plex Sans Var ExtraLight Condensed 85 40 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var ExtraLight Condensed Italic IBM Plex Sans Var ExtraLight Condensed Italic 85 40 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Light Condensed IBM Plex Sans Var Light Condensed 85 50 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Light Condensed Italic IBM Plex Sans Var Light Condensed Italic 85 50 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Condensed IBM Plex Sans Var Condensed 85 80 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Condensed Italic IBM Plex Sans Var Condensed Italic 85 80 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Text Condensed IBM Plex Sans Var Text Condensed 85 90 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Text Condensed Italic IBM Plex Sans Var Text Condensed Italic 85 90 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Medium Condensed IBM Plex Sans Var Medium Condensed 85 100 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Medium Condensed Italic IBM Plex Sans Var Medium Condensed Italic 85 100 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var SemiBold Condensed IBM Plex Sans Var SemiBold Condensed 85 180 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var SemiBold Condensed Italic IBM Plex Sans Var SemiBold Condensed Italic 85 180 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Bold Condensed IBM Plex Sans Var Bold Condensed 85 200 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Bold Condensed Italic IBM Plex Sans Var Bold Condensed Italic 85 200 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Thin IBM Plex Sans Var Thin 100 0 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Thin Italic IBM Plex Sans Var Thin Italic 100 0 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var ExtraLight IBM Plex Sans Var ExtraLight 100 40 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var ExtraLight Italic IBM Plex Sans Var ExtraLight Italic 100 40 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Light IBM Plex Sans Var Light 100 50 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Light Italic IBM Plex Sans Var Light Italic 100 50 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Regular IBM Plex Sans Var Regular 100 80 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Italic IBM Plex Sans Var Italic 100 80 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Text IBM Plex Sans Var Text 100 90 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Text Italic IBM Plex Sans Var Text Italic 100 90 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Medium IBM Plex Sans Var Medium 100 100 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Medium Italic IBM Plex Sans Var Medium Italic 100 100 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var SemiBold IBM Plex Sans Var SemiBold 100 180 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var SemiBold Italic IBM Plex Sans Var SemiBold Italic 100 180 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf -IBM Plex Sans Var Bold IBM Plex Sans Var Bold 100 200 0 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Roman.ttf -IBM Plex Sans Var Bold Italic IBM Plex Sans Var Bold Italic 100 200 100 65536 /usr/share/fonts/ibm-plex-sans-fonts/IBMPlexSansVar-Italic.ttf diff --git a/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-0-simple.spec b/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-0-simple.spec deleted file mode 100644 index 9fed5b2..0000000 --- a/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-0-simple.spec +++ /dev/null @@ -1,91 +0,0 @@ -# Packaging template: basic single-family fonts packaging. -# -# SPDX-License-Identifier: MIT -# -# This template documents the minimal set of spec declarations, necessary to -# package a single font family, from a single dedicated source archive. -# -# It is part of the following set of packaging templates: -# “fonts-0-simple”: basic single-family fonts packaging -# “fonts-1-full”: less common patterns for single-family fonts packaging -# “fonts-2-multi”: multi-family fonts packaging -# “fonts-3-sub”: packaging fonts, released as part of something else -# -# A font family is composed of font files, that share a single design, and -# differ ONLY in: -# — Weight Bold, Black… -# – Width∕Stretch Narrow, Condensed, Expanded… -# — Slope/Slant Italic, Oblique -# Optical sizing Caption… -# -# Those parameters correspond to the default axes of OpenType variable fonts: -# https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#registered-axis-tags -# The variable fonts model is an extension of the WWS model described in the -# WPF Font Selection Model whitepaper (2007): -# https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/02/24/90/36/WPF%20Font%20Selection%20Model.pdf -# -# Do not rely on the naming upstream chose, to define family boundaries, it -# will often be wrong. -# -# Declaration order is chosen to limit divergence between those templates, and -# simplify cut and pasting. -# -Version: -Release: -URL: - -# The identifier of the entity, that released the font family. -%global foundry -# The font family license identifier. Adjust as necessary. The OFL is our -# recommended font license. -%global fontlicense OFL -# -# The following directives are lists of space-separated shell globs -# – matching files associated with the font family, -# – as they exist in the build root, -# — at the end of the %build stage: -# – legal files (licensing…) -%global fontlicenses OFL.txt -# – documentation files -%global fontdocs *.txt -# – exclusions from the ”fontdocs” list -%global fontdocsex %{fontlicenses} - -# The human-friendly font family name, whitespace included, restricted to the -# the Basic Latin Unicode block. -%global fontfamily -%global fontsummary -# -# More shell glob lists: -# – font family files -%global fonts *.otf -# – fontconfig files -%global fontconfs %{SOURCE10} -# -# A multi-line description block for the generated package. -%global fontdescription %{expand: -} - -Source0: -# Adjust as necessary. Keeping the filename in sync with the package name is a good idea. -# See the fontconfig templates in fonts-rpm-templates for information on how to -# write good fontconfig files and choose the correct priority [number]. -Source10: [number]-%{fontpkgname}.conf - -%fontpkg - -%prep -%setup - -%build -%fontbuild - -%install -%fontinstall - -%check -%fontcheck - -%fontfiles - -%changelog diff --git a/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-1-full.spec b/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-1-full.spec deleted file mode 100644 index 8c74b11..0000000 --- a/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-1-full.spec +++ /dev/null @@ -1,95 +0,0 @@ -# Packaging template: less common patterns for single-family fonts packaging. -# -# SPDX-License-Identifier: MIT -# -# This template documents less common spec declarations, used when packaging a -# single font family, from a single dedicated source archive. -# -# It is part of the following set of packaging templates: -# “fonts-0-simple”: basic single-family fonts packaging -# “fonts-1-full”: less common patterns for single-family fonts packaging -# “fonts-2-multi”: multi-family fonts packaging -# “fonts-3-sub”: packaging fonts, released as part of something else -# -Version: -Release: -URL: - -%global foundry -%global fontlicense OFL -# -# The following directives are lists of space-separated shell globs -# – matching files associated with the font family, -# – as they exist in the build root, -# — at the end of the %build stage: -# – legal files (licensing…) -%global fontlicenses OFL.txt -# – exclusions from the “fontlicenses” list -%global fontlicensesex -# – documentation files -%global fontdocs -# – exclusions from the “fontdocs” list -%global fontdocsex %{fontlicenses} - -%global fontfamily -%global fontsummary -# A container for additional subpackage declarations. -%global fontpkgheader %{expand: -Obsoletes: -} -# -# More shell glob lists: -# – font family files -%global fonts -# – exclusions from the “fonts” list) -%global fontsex -# – fontconfig files -%global fontconfs %{SOURCE10} -# – exclusions from the “fontconfs” list -%global fontconfsex -# – appstream files, if any (generated automatically otherwise) -%global fontappstreams -# – exclusions from the “fontappstreams” list -%global fontappstreamsex -# -%global fontdescription %{expand: -} - -Source0: -Source10: [number]-%{fontpkgname}.conf - -%fontpkg - -# Font creators love to bundle bulky documentation files, that show off their -# font (typically, as pdf specimens). Split those files in a dedicated optional -# doc package. -%package doc -Summary: %{name} optional documentation files -BuildArch: noarch -%description doc -This package provides optional documentation files shipped with %{name}. - -%prep -%setup -# Convert upstream files to UTF-8 and Unix end of lines if necessary -# Optional arguments: -# -e [encoding] source OS encoding (auto-detected otherwise) -# -n do not recode files, only adjust folding and end of lines -%linuxtext *.txt - -%build -%fontbuild - -%install -%fontinstall - -%check -%fontcheck - -%fontfiles - -%files doc -%license OFL.txt -%doc *.pdf - -%changelog diff --git a/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-2-multi.spec b/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-2-multi.spec deleted file mode 100644 index a56646b..0000000 --- a/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-2-multi.spec +++ /dev/null @@ -1,132 +0,0 @@ -# Packaging template: multi-family fonts packaging. -# -# SPDX-License-Identifier: MIT -# -# This template documents spec declarations, used when packaging multiple font -# families, from a single dedicated source archive. The source rpm is named -# after the first (main) font family). Look up “fonts-3-sub” when the source -# rpm needs to be named some other way. -# -# It is part of the following set of packaging templates: -# “fonts-0-simple”: basic single-family fonts packaging -# “fonts-1-full”: less common patterns for single-family fonts packaging -# “fonts-2-multi”: multi-family fonts packaging -# “fonts-3-sub”: packaging fonts, released as part of something else -# -Version: -Release: -URL: - -# The following declarations will be aliased to [variable]0 and reused for all -# generated *-fonts packages unless overriden by a specific [variable][number] -# declaration. -%global foundry -%global fontlicense -%global fontlicenses -%global fontlicensesex -%global fontdocs -%global fontdocsex %{fontlicenses} - -# A text block that can be reused as part of the description of each generated -# subpackage. -%global common_description %{expand: -} - -# Declaration for the subpackage containing the first font family. Also used as -# source rpm info. All the [variable]0 declarations are equivalent and aliased -# to [variable]. - -%global fontfamily0 -%global fontsummary0 -%global fontpkgheader0 %{expand: -} -%global fonts0 -%global fontsex0 -%global fontconfs0 %{SOURCE10} -%global fontconfsex0 -%global fontappstreams0 -%global fontappstreamsex0 -%global fontdescription0 %{expand: -%{common_description} -Additional text…} - -# Declaration for the subpackage containing the second font family. -%global fontfamily1 -%global fontsummary1 -%global fontpkgheader1 %{expand: -} -%global fonts1 -%global fontsex1 -%global fontconfs1 %{SOURCE11} -%global fontconfsex1 -%global fontappstreams1 -%global fontappstreamsex1 -%global fontdescription1 %{expand: -%{common_description} -Other Additional text…} -# -# Continue as necessary… - -Source0: -Source10: [number]-%{fontpkgname0}.conf -Source11: [number]-%{fontpkgname1}.conf - -# “fontpkg” will generate the font subpackage headers corresponding to the -# elements declared above. -# “fontpkg” accepts the following selection arguments: -# – “-a” process everything -# – “-z [number]” process a specific declaration block -# If no flag is specified it will only process the zero/nosuffix block. -%fontpkg -a - -# “fontmetapkg” will generate a font meta(sub)package header for all the font -# subpackages generated in this spec. Optional arguments: -# – “-n [name]” use [name] as metapackage name -# – “-s [variable]” use the content of [variable] as metapackage summary -# – “-d [variable]” use the content of [variable] as metapackage description -# – “-z [numbers]” restrict metapackaging to [numbers] comma-separated list -# of font package suffixes -%fontmetapkg - -%package doc -Summary: %{name} optional documentation files -BuildArch: noarch -%description doc -This package provides optional documentation files shipped with %{name}. - -%prep -%setup -%linuxtext *.txt - -%build -# “fontbuild” accepts the usual selection arguments: -# – “-a” process everything -# – “-z [number]” process a specific declaration block -# If no flag is specified it will only process the zero/nosuffix block. -%fontbuild -a - -%install -# “fontinstall” accepts the usual selection arguments: -# – “-a” process everything -# – “-z [number]” process a specific declaration block -# If no flag is specified it will only process the zero/nosuffix block. -%fontinstall -a - -%check -# “fontcheck” accepts the usual selection arguments: -# – “-a” process everything -# – “-z [number]” process a specific declaration block -# If no flag is specified it will only process the zero/nosuffix block. -%fontcheck -a - -# “fontfiles” accepts the usual selection arguments: -# – “-a” process everything -# – “-z [number]” process a specific declaration block -# If no flag is specified it will only process the zero/nosuffix block -%fontfiles -a - -%files doc -%license -%doc - -%changelog diff --git a/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-3-sub.spec b/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-3-sub.spec deleted file mode 100644 index 061db1d..0000000 --- a/guidelines/modules/ROOT/examples/fonts/spectemplate-fonts-3-sub.spec +++ /dev/null @@ -1,108 +0,0 @@ -# Packaging template: packaging fonts, released as part of something else -# -# SPDX-License-Identifier: MIT -# -# This template documents spec declarations, used when packaging one or several -# font families from a source rpm which is not named after the first packaged -# font family: -# – either because the project name differs from the main font family name -# – or when the source archive and rpm are used to package more than fonts. -# -# It is part of the following set of packaging templates: -# “fonts-0-simple”: basic single-family fonts packaging -# “fonts-1-full”: less common patterns for single-family fonts packaging -# “fonts-2-multi”: multi-family fonts packaging -# “fonts-3-sub”: packaging fonts, released as part of something else -# -# The packaging style is identical to the one documented in “fonts-2-multi”, -# EXCEPT it should not use the zero/nosuffix declaration block, as this block -# will attempt to generate source rpm declarations by default. -# -# Usually appropriate for fonts-only packages -BuildArch: noarch - -Version: -Release: -License: -URL: - -%global foundry -# If different from the main License -%global fontlicense -%global fontlicenses -%global fontlicensesex -%global fontdocs -%global fontdocsex %{fontlicenses} - -%global common_description %{expand: -} - -%global fontfamily1 -%global fontsummary1 -%global fontpkgheader1 %{expand: -} -%global fonts1 -%global fontsex1 -%global fontconfs1 %{SOURCE11} -%global fontconfsex1 -%global fontappstreams1 -%global fontappstreamsex1 -%global fontdescription1 %{expand: -%{common_description} -Additional text…} - -%global fontfamily2 -%global fontsummary2 -%global fontpkgheader2 %{expand: -} -%global fonts2 -%global fontsex2 -%global fontconfs2 %{SOURCE12} -%global fontconfsex2 -%global fontappstreams2 -%global fontappstreamsex2 -%global fontdescription2 %{expand: -%{common_description} -Other Additional text…} -# -# Continue as necessary… - -Source0: -Source11: [number]-%{fontpkgname1}.conf -Source12: [number]-%{fontpkgname2}.conf - -Name: -Summary: -%description -%wordwrap -v common_description - -%fontpkg -a - -%fontmetapkg - -%package doc -Summary: %{name} optional documentation files -BuildArch: noarch -%description doc -This package provides optional documentation files shipped with %{name}. - -%prep -%setup -%linuxtext *.txt - -%build -%fontbuild -a - -%install -%fontinstall -a - -%check -%fontcheck -a - -%fontfiles -a - -%files doc -%license -%doc - -%changelog diff --git a/guidelines/modules/ROOT/examples/golang/golang-cloud-google-go.spec b/guidelines/modules/ROOT/examples/golang/golang-cloud-google-go.spec deleted file mode 100644 index 5365be5..0000000 --- a/guidelines/modules/ROOT/examples/golang/golang-cloud-google-go.spec +++ /dev/null @@ -1,187 +0,0 @@ -# Generated by go2rpm -%bcond_without check -%bcond_without bootstrap - -# https://github.com/GoogleCloudPlatform/google-cloud-go -%global goipath cloud.google.com/go -%global forgeurl https://github.com/GoogleCloudPlatform/google-cloud-go -Version: 0.37.4 - -%gometa - -%if %{without bootstrap} -%global goipaths0 cloud.google.com/go -%global goipathsex0 cloud.google.com/go/compute -%endif - -%global goipaths1 cloud.google.com/go/compute - -%global common_description %{expand: -Go packages for Google Cloud Platform services.} - -%global golicenses LICENSE -%global godocs AUTHORS CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTORS RELEASING.md old-news.md CHANGES.md README.md - -Name: %{goname} -Release: 1%{?dist} -Summary: Google Cloud client libraries for Go - -# Upstream license specification: Apache-2.0 -License: Apache-2.0 -URL: %{gourl} -Source: %{gosource} - -%if %{without bootstrap} -BuildRequires: golang(github.com/golang/mock/gomock) -BuildRequires: golang(github.com/golang/protobuf/proto) -BuildRequires: golang(github.com/golang/protobuf/ptypes) -BuildRequires: golang(github.com/golang/protobuf/ptypes/any) -BuildRequires: golang(github.com/golang/protobuf/ptypes/duration) -BuildRequires: golang(github.com/golang/protobuf/ptypes/empty) -BuildRequires: golang(github.com/golang/protobuf/ptypes/struct) -BuildRequires: golang(github.com/golang/protobuf/ptypes/timestamp) -BuildRequires: golang(github.com/golang/protobuf/ptypes/wrappers) -BuildRequires: golang(github.com/google/btree) -BuildRequires: golang(github.com/google/go-cmp/cmp) -BuildRequires: golang(github.com/google/martian) -BuildRequires: golang(github.com/google/martian/fifo) -BuildRequires: golang(github.com/google/martian/httpspec) -BuildRequires: golang(github.com/google/martian/martianhttp) -BuildRequires: golang(github.com/google/martian/martianlog) -BuildRequires: golang(github.com/google/martian/mitm) -BuildRequires: golang(github.com/google/pprof/profile) -BuildRequires: golang(github.com/googleapis/gax-go/v2) -BuildRequires: golang(go.opencensus.io/plugin/ocgrpc) -BuildRequires: golang(go.opencensus.io/stats) -BuildRequires: golang(go.opencensus.io/stats/view) -BuildRequires: golang(go.opencensus.io/tag) -BuildRequires: golang(go.opencensus.io/trace) -BuildRequires: golang(golang.org/x/oauth2) -BuildRequires: golang(golang.org/x/oauth2/google) -BuildRequires: golang(golang.org/x/oauth2/jwt) -BuildRequires: golang(golang.org/x/sync/errgroup) -BuildRequires: golang(golang.org/x/sync/semaphore) -BuildRequires: golang(golang.org/x/text/language) -BuildRequires: golang(golang.org/x/time/rate) -BuildRequires: golang(google.golang.org/api/bigquery/v2) -BuildRequires: golang(google.golang.org/api/clouddebugger/v2) -BuildRequires: golang(google.golang.org/api/cloudresourcemanager/v1) -BuildRequires: golang(google.golang.org/api/cloudtrace/v1) -BuildRequires: golang(google.golang.org/api/compute/v1) -BuildRequires: golang(google.golang.org/api/container/v1) -BuildRequires: golang(google.golang.org/api/gensupport) -BuildRequires: golang(google.golang.org/api/googleapi) -BuildRequires: golang(google.golang.org/api/iterator) -BuildRequires: golang(google.golang.org/api/option) -BuildRequires: golang(google.golang.org/api/storage/v1) -BuildRequires: golang(google.golang.org/api/support/bundler) -BuildRequires: golang(google.golang.org/api/transport) -BuildRequires: golang(google.golang.org/api/transport/grpc) -BuildRequires: golang(google.golang.org/api/transport/http) -BuildRequires: golang(google.golang.org/genproto/googleapis/api/expr/v1alpha1) -BuildRequires: golang(google.golang.org/genproto/googleapis/api/label) -BuildRequires: golang(google.golang.org/genproto/googleapis/api/metric) -BuildRequires: golang(google.golang.org/genproto/googleapis/api/monitoredres) -BuildRequires: golang(google.golang.org/genproto/googleapis/appengine/logging/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/bigtable/admin/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/bigtable/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/asset/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/asset/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/audit) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/dataproc/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/dialogflow/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/iot/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/irm/v1alpha2) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/kms/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/language/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/language/v1beta2) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/oslogin/common) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/oslogin/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/oslogin/v1beta) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/redis/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/redis/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/scheduler/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/securitycenter/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/speech/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/talent/v4beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/tasks/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/tasks/v2beta2) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/tasks/v2beta3) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/texttospeech/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/videointelligence/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/videointelligence/v1beta2) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/vision/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/vision/v1p1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/cloud/webrisk/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/container/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/datastore/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/devtools/clouddebugger/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/devtools/clouderrorreporting/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/devtools/cloudtrace/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/devtools/cloudtrace/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1) -BuildRequires: golang(google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/grafeas) -BuildRequires: golang(google.golang.org/genproto/googleapis/firestore/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/iam/admin/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/iam/credentials/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/iam/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/logging/type) -BuildRequires: golang(google.golang.org/genproto/googleapis/logging/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/longrunning) -BuildRequires: golang(google.golang.org/genproto/googleapis/monitoring/v3) -BuildRequires: golang(google.golang.org/genproto/googleapis/privacy/dlp/v2) -BuildRequires: golang(google.golang.org/genproto/googleapis/pubsub/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/rpc/code) -BuildRequires: golang(google.golang.org/genproto/googleapis/rpc/errdetails) -BuildRequires: golang(google.golang.org/genproto/googleapis/rpc/status) -BuildRequires: golang(google.golang.org/genproto/googleapis/spanner/admin/database/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/spanner/admin/instance/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/spanner/v1) -BuildRequires: golang(google.golang.org/genproto/googleapis/type/latlng) -BuildRequires: golang(google.golang.org/genproto/protobuf/field_mask) -BuildRequires: golang(google.golang.org/grpc) -BuildRequires: golang(google.golang.org/grpc/codes) -BuildRequires: golang(google.golang.org/grpc/credentials) -BuildRequires: golang(google.golang.org/grpc/keepalive) -BuildRequires: golang(google.golang.org/grpc/metadata) -BuildRequires: golang(google.golang.org/grpc/status) - -%if %{with check} -# Tests -BuildRequires: golang(github.com/google/go-cmp/cmp/cmpopts) -BuildRequires: golang(google.golang.org/api/iterator/testing) -BuildRequires: golang(google.golang.org/api/logging/v2) -%endif -%endif - -%description -%{common_description} - -%gopkg - -%prep -%goprep - -%install -%gopkginstall - -%if %{without bootstrap} -%if %{with check} -%check -%gocheck -%endif -%endif - -%gopkgfiles - -%changelog -* Tue Apr 23 09:48:52 CEST 2019 Robert-André Mauchin - 0.37.4-1 -- Release 0.37.4 diff --git a/guidelines/modules/ROOT/examples/golang/golang-github-sirupsen-logrus.spec b/guidelines/modules/ROOT/examples/golang/golang-github-sirupsen-logrus.spec deleted file mode 100644 index e83eaec..0000000 --- a/guidelines/modules/ROOT/examples/golang/golang-github-sirupsen-logrus.spec +++ /dev/null @@ -1,45 +0,0 @@ -# https://github.com/sirupsen/logrus -%global goipath github.com/sirupsen/logrus -Version: 1.4.0 - -%gometa - -%global goaltipaths github.com/Sirupsen/logrus - -%global common_description %{expand: -Logrus is a structured logger for Go (golang), completely API compatible with -the standard library logger.} - -%global golicenses LICENSE -%global godocs *.md - -Name: %{goname} -Release: 1%{?dist} -Summary: Structured logger for Go -License: MIT -URL: %{gourl} -Source: %{gosource} - -BuildRequires: golang(golang.org/x/crypto/ssh/terminal) -BuildRequires: golang(github.com/stretchr/testify/assert) - -%description -%{common_description} - -%gopkg - -%prep -%goprep - -%install -%gopkginstall - -%check -%gocheck - -%gopkgfiles - - -%changelog -* Wed Oct 31 2018 Robert-André Mauchin - 1.4.0-1 -- First package for Fedora diff --git a/guidelines/modules/ROOT/examples/golang/golang-github-stretchr-testify.spec b/guidelines/modules/ROOT/examples/golang/golang-github-stretchr-testify.spec deleted file mode 100644 index 59c9d08..0000000 --- a/guidelines/modules/ROOT/examples/golang/golang-github-stretchr-testify.spec +++ /dev/null @@ -1,49 +0,0 @@ -# https://github.com/stretchr/testify -%global goipath github.com/stretchr/testify -Version: 1.2.2 - -%gometa - -%global common_description %{expand: -Golang set of packages that provide many tools for testifying -that your code will behave as you intend. - -Features include: - - - Easy assertions - - Mocking - - Testing suite interfaces and functions} - -%global golicenses LICENSE - -Name: %{goname} -Release: 1%{?dist} -Summary: Tools for testifying that your code will behave as you intend -License: MIT -URL: %{gourl} -Source: %{gosource} - -BuildRequires: golang(github.com/davecgh/go-spew/spew) -BuildRequires: golang(github.com/pmezard/go-difflib/difflib) -BuildRequires: golang(github.com/stretchr/objx) - -%description -%{common_description} - -%gopkg - -%prep -%goprep - -%install -%gopkginstall - -%check -%gocheck - -%gopkgfiles - - -%changelog -* Thu Mar 21 22:20:22 CET 2019 Robert-André Mauchin - 1.2.2-1 -- First package for Fedora diff --git a/guidelines/modules/ROOT/examples/golang/golang-gopkg-square-jose-2.spec b/guidelines/modules/ROOT/examples/golang/golang-gopkg-square-jose-2.spec deleted file mode 100644 index 40250d7..0000000 --- a/guidelines/modules/ROOT/examples/golang/golang-gopkg-square-jose-2.spec +++ /dev/null @@ -1,67 +0,0 @@ -# https://github.com/square/go-jose -%global goipath gopkg.in/square/go-jose.v2 -%global forgeurl https://github.com/square/go-jose -Version: 2.1.9 - -%gometa - -%global common_description %{expand: -Package jose aims to provide an implementation of the Javascript Object -Signing and Encryption set of standards. This includes support for JSON Web -Encryption, JSON Web Signature, and JSON Web Token standards.} - -%global golicenses LICENSE -%global godocs *.md - -%global godevelheader %{expand: -# The devel package will usually benefit from corresponding project binaries. -Requires: %{name} = %{version}-%{release} -} - -Name: %{goname} -Release: 1%{?dist} -Summary: An implementation of JOSE standards (JWE, JWS, JWT) in Go -# Detected licences -# - *No copyright* Apache License (v2.0) at 'LICENSE' -# json/ is BSD-3-Clause -License: Apache-2.0 AND BSD-3-Clause -URL: %{gourl} -Source: %{gosource} - -BuildRequires: golang(golang.org/x/crypto/ed25519) -BuildRequires: golang(golang.org/x/crypto/pbkdf2) -BuildRequires: golang(github.com/stretchr/testify/assert) -BuildRequires: golang(gopkg.in/alecthomas/kingpin.v2) - -%description -%{common_description} - -%gopkg - -%prep -%goprep - -%build -for cmd in jose-util jwk-keygen; do - %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd -done - -%install -%gopkginstall -install -m 0755 -vd %{buildroot}%{_bindir} -install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ - -%check -%gocheck - -%files -%license %{golicenses} -%doc %{godocs} -%{_bindir}/* - -%gopkgfiles - -%changelog -* Thu Mar 21 21:59:10 CET 2019 Robert-André Mauchin - 2.1.9-1 -- First package for Fedora - diff --git a/guidelines/modules/ROOT/examples/golang/spectemplate-go-0-source-minimal.spec b/guidelines/modules/ROOT/examples/golang/spectemplate-go-0-source-minimal.spec deleted file mode 100644 index ac1266c..0000000 --- a/guidelines/modules/ROOT/examples/golang/spectemplate-go-0-source-minimal.spec +++ /dev/null @@ -1,140 +0,0 @@ -# Minimal Go source code packaging template. -# -# This template documents the minimal set of spec declarations, necessary to -# publish Go source code to other packages. The sister “go-1-source-full” -# template documents less common declarations; read it if your needs exceed -# this file. -# -# All the “go-*-” spec templates complement one another without documentation -# overlaps. Try to read them all. -# -# The master Go import path of the project. Take the time to identify it -# accurately, changing it later will be inconvenient: -# – it may differ from the repository URL; -# – generally, the correct value will be the one used by the project in its -# documentation, coding examples, and build assertions; -# – use the gopkg import path for all code states when a project uses it. -# If upstream confused itself after multiple forks and renamings, you need to -# fix references to past names in the Go source files, unit tests included. -# Perform this fixing in “prep”. -%global goipath -# -# “gometa” is a thin Go-specific wrapper around “forgemeta”. Therefore, define -# “version”, “tag”, “commit”… before the “gometa” line, as you would with -# “forgemeta”. Only define the rpm variables actually needed by the spec file. -# – define “forgeurl”, including “https://” prefixing, if the import path -# does not match the repository URL; otherwise it is not necessary, -%global forgeurl -# – move the Version: line before the “gometa” call if you are packaging a -# release. -Version: -%global tag -%global commit -# -# Like “forgemeta”, “gometa” accepts a “-i” flag to output the rpm variables it -# reads and sets. Most of those can be overriden before or after the “gometa” -# call. If you use “-i” , remove it before committing and pushing to the -# buildsystem. -# See the “forge” spec templates for detailed “forgemeta” documentation. -%gometa - -# A space-separated list of shell globs matching the project license files. -%global golicenses -# A space-separated list of shell globs matching the project documentation files. -# The Go rpm macros will pick up “.md” files by default without this. -%global godocs - -# A multiline description block shared between subpackages -%global common_description %{expand: -} - -# The following lines use “go*” variables computed by gometa as default values. -# You can replace them with manual definitions. For example, replace “gourl” -# with the project homepage if it exists separately from the repository URL. Be -# careful to only replace “go*” variables when it adds value to the specfile -# and you understand the consequences. Otherwise you will just add -# maintenance-intensive discrepancies in the distribution. -Name: %{goname} -# If not set before -Version: -Release: 1%{?dist} -Summary: -URL: %{gourl} -Source: %{gosource} -%description -%{common_description} - -# Generate package declarations for all known kinds of Go subpackages. -# You can replace if with “godevelpkg” to generate Go devel subpackages only. -%gopkg - -%prep -# “goprep” unpacks the Go source archives and creates the project “GOPATH” tree -# used in the rest of the spec file. It removes vendored (bundled) code: -# – use the “-k” flag if you wish to keep this vendored code, and deal with the -# consequences in the rest of the spec. -# – use the “-e” flag if you wish to perform extraction yourself, and just use -# the “GOPATH” creation logic. -%goprep -# -# “goprep” only performs basic vendoring detection. It will miss inventive ways -# to vendor code. Remove manually missed vendor code, after the “goprep” line. -# “goprep” will not fix upstream sources for you. Since all the macro calls that -# follow “goprep” assume clean problem-free sources, you need to correct them -# just after the “goprep” line: -# – replace calls to deprecated import paths with their correct value -# – patch code problems -# – remove dead code (some upstreams deliberately ship broken source code in -# the hope someone will get around to fix it) -# Remember to send fixes and problem reports upstream. -# When you package an import path, that participates in a dependency loop, you -# need bootstraping to manage the initial builds: -# https://docs.fedoraproject.org/en-US/packaging-guidelines/#bootstrapping -# For Go code, that means your bootstrap section should: -# – remove unit tests that import other parts of the loop -# – remove code that imports other parts of the loop -# Sometimes one can resolve dependency loops just by splitting specific -# subdirectories in a separate -devel subpackage. See also the “go-6-multi” -# template. -# - -# Anything outputed in this rpm section will be installed in the build -# environment by mock -%generate_buildrequires -# “go_generate_buildrequires” computes the build dependencies of the packaged -# Go code. Right now, it only knows how to compute version-less dependencies. -# If that is not good enough for you you need to filter and rework its output. -%go_generate_buildrequires - -%install -# Perform installation steps for all known kinds of Go subpackages -# You can replace if with “godevelinstall” to process Go devel subpackages only -%gopkginstall - -%check -# “gocheck” runs all the unit tests found in the project. This is useful to catch -# API breakage early. Unfortunately, the following kinds of unit tests are -# incompatible with a secure build environment: -# – tests that call a remote server or API over the Internet, -# – tests that attempt to reconfigure the system, -# – tests that rely on a specific app running on the system, like a database -# or syslog server. -# You can disable those tests with the following exclusion flags, that can be -# repeated: -# – “-d ” exclude the files contained in -# not recursive (subdirectories are not excluded) -# – “-t ” exclude the files contained in -# recursive (subdirectories are excluded) -# – “-r ” exclude files matching , -# If a test is broken for some other reason, you can disable it -# the same way. However, you should also report the problem upstream. -# Remember to trace in a comment why each check was disabled, with links to -# eventual upstream problem reports. -%gocheck - -# Generate file sections for all known kinds of Go subpackages -# You can replace if with “godevelfiles” to process Go devel subpackages only -%gopkgfiles - -%changelog - diff --git a/guidelines/modules/ROOT/examples/golang/spectemplate-go-1-source-full.spec b/guidelines/modules/ROOT/examples/golang/spectemplate-go-1-source-full.spec deleted file mode 100644 index 8b7ec9b..0000000 --- a/guidelines/modules/ROOT/examples/golang/spectemplate-go-1-source-full.spec +++ /dev/null @@ -1,104 +0,0 @@ -# Complete Go source code packaging template. -# -# This template complements “go-0-source-minimal”, with less usual spec -# declarations. -# -# All the “go-*-” spec templates complement one another without documentation -# overlaps. Try to read them all. -# -%global goipath -Version: -%global tag -%global commit -# -# A compatibility id that should be used in the package naming. It will change -# the generated “goname” to something derived from -# compat-golang-goipath-gocid-devel. -# “gocids” are used to disambiguate compatibility packages from the package -# tracking the recommended distribution version. Usual values: -# – the version major (if different), -# – a shortened commit tag such as -# %{lua:print(string.sub(rpm.expand("%{?commit}"), 1, 7))} -%global gocid -%gometa - -# rpm variables used to tweak the generated golang-*devel package. -# Most of them won’t be needed by the average Go spec file. -# -# A space-separated list of Go import paths to include. Unless specified -# otherwise the first element in the list will be used to name the subpackage. -# (by default, “goipath”) -%global goipaths -# A space-separated list of Go import paths to exclude. Usually, subsets of the -# elements in goipaths. -%global goipathsex -# A compatibility id that should be used in the package naming. -# (by default, “gocid”) -%global godevelcid -# A value that will replace the computed subpackage name. -# (by default “gorpmname-devel”) -%global godevelname -# The subpackage summary. -# (by default, “summary”) -%global godevelsummary -# A container for additional subpackage declarations. -%global godevelheader %{expand: -Requires: -Obsoletes: -} -# The subpackage base description. -# (by default, “common_description”) -%global godeveldescription %{expand: -} -%global golicenses -# A space-separated list of shell globs matching files you wish to exclude from -# license lists. -%global golicensesex -%global godocs -# A space-separated list of shell globs matching files you wish to exclude from -# documentation lists. Only works for “godocs”-specified files. -%global godocsex -# A space separated list of extentions that should be included in the devel -# package in addition to Go default file extensions. -%global goextensions -# A space-separated list of shell globs matching other files to include in the -# devel package. -%global gosupfiles -# A space-separated list of shell globs matching other files ou wish to exclude from -# package lists. Only works with “gosupfiles”-specified files. -%global gosupfilesex -# The filelist name associated with the subpackage. Setting this should never -# be necessary unless the default name clashes with something else. -%global godevelfilelist - -%global common_description %{expand: -} - -Name: %{goname} -# If not set before -Version: -Release: 1%{?dist} -Summary: -URL: %{gourl} -Source: %{gosource} -%description -%{common_description} - -%gopkg - -%prep -%goprep - -%generate_buildrequires -%go_generate_buildrequires - -%install -%gopkginstall - -%check -%gocheck - -%gopkgfiles - -%changelog - diff --git a/guidelines/modules/ROOT/examples/golang/spectemplate-go-2-alternative-import-path-minimal.spec b/guidelines/modules/ROOT/examples/golang/spectemplate-go-2-alternative-import-path-minimal.spec deleted file mode 100644 index 72ba86a..0000000 --- a/guidelines/modules/ROOT/examples/golang/spectemplate-go-2-alternative-import-path-minimal.spec +++ /dev/null @@ -1,69 +0,0 @@ -# Minimal Go alternative import path packaging template. -# -# Sometimes Go projects keep importing deprecated import path names, or use -# forks with different names. Ideally, all codebases should be fixed to use the -# current canonical import path, but that is not always possible. -# -# This template documents the minimal set of spec declarations, necessary to -# publish alternative Go import paths to other packages. The sister -# “go-3-alternative import-path-full” template documents less common -# declarations; read it if your needs exceed this file. -# -# All the “go-*-” spec templates complement one another without documentation -# overlaps. Try to read them all. -# -# Simulating other import paths prevents the duplicate packaging of the a -# codebase when packagers do not notice an import path has been renamed. It -# keeps spec files that refer to the old name working. Those should still be -# fixed to use the new name as soon as possible. -# -%global goipath -Version: -%global tag -%global commit -%gometa - -%global golicenses -%global godocs - -# A space-separated list of import paths to simulate. Without this nothing will -# happen. -%global goaltipaths - -%global common_description %{expand: -} - -Name: %{goname} -# If not set before -Version: -Release: 1%{?dist} -Summary: -URL: %{gourl} -Source: %{gosource} -%description -%{common_description} - -# Generate package declarations for all known kinds of Go subpackages. You can -# replace if with separate “goaltpkg” and “godevelpkg” calls. -%gopkg - -%prep -%goprep - -%generate_buildrequires -%go_generate_buildrequires - -%install -# Perform installation steps for all known kinds of Go subpackages. You can -# replace if with separate “goaltinstall” and “godevelinstall” calls. -%gopkginstall - -%check -%gocheck - -# Generate file sections for all known kinds of Go subpackages. You can replace -# if with separate “goaltfiles” and “godevelfiles” calls. -%gopkgfiles - -%changelog - diff --git a/guidelines/modules/ROOT/examples/golang/spectemplate-go-3-alternative-import-path-full.spec b/guidelines/modules/ROOT/examples/golang/spectemplate-go-3-alternative-import-path-full.spec deleted file mode 100644 index 58d75bd..0000000 --- a/guidelines/modules/ROOT/examples/golang/spectemplate-go-3-alternative-import-path-full.spec +++ /dev/null @@ -1,89 +0,0 @@ -# Complete Go alternative import path packaging template. -# -# This template complements “go-2-alternative import-path-minimal”, with less -# usual spec declarations. -# -# All the “go-*-” spec templates complement one another without documentation -# overlaps. Try to read them all. -# -%global goipath -%global forgeurl -Version: -%global tag -%global commit -%global gocid -%gometa - -%global goipaths -%global goipathsex -%global godevelcid -%global godevelname -%global godevelsummary -%global godevelheader %{expand: -Requires: -Obsoletes: -} -%global golicenses -%global golicensesex -%global godocs -%global godocsex -%global goextensions -%global gosupfiles -%global gosupfilesex -%global godevelfilelist - -%global goaltipaths -# -# rpm variables used to tweak the generated compat-golang-*devel packages. -# Most of them won’t be needed by the average Go spec file. -# -# The import path that will be linked to. -# (by default, “goipath”) -%global gocanonipath -# A compatibility id that should be used in the package naming. -# (by default, “gocid”) -%global goaltcid -# The subpackage summary; -# (by default, “summary”) -%global goaltsummary -# A container for additional subpackage declarations. -%global goaltheader %{expand: -Requires: -Obsoletes: -} -# The subpackage base description; -# (by default, “common_description”) -%global goaltdescription %{expand: -} - -%global common_description %{expand: -} - -Name: %{goname} -# If not set before -Version: -Release: 1%{?dist} -Summary: -URL: %{gourl} -Source: %{gosource} -%description -%{common_description} - -%gopkg - -%prep -%goprep - -%generate_buildrequires -%go_generate_buildrequires - -%install -%gopkginstall - -%check -%gocheck - -%gopkgfiles - -%changelog - diff --git a/guidelines/modules/ROOT/examples/golang/spectemplate-go-4-binary-minimal.spec b/guidelines/modules/ROOT/examples/golang/spectemplate-go-4-binary-minimal.spec deleted file mode 100644 index c578324..0000000 --- a/guidelines/modules/ROOT/examples/golang/spectemplate-go-4-binary-minimal.spec +++ /dev/null @@ -1,79 +0,0 @@ -# Minimal Go binary packaging template. -# -# This template documents the minimal set of spec declarations, necessary to -# package Go projects that produce binaries. The sister “go-5-binary-full” -# template documents less common declarations; read it if your needs exceed -# this file. -# -# All the “go-*-” spec templates complement one another without documentation -# overlaps. Try to read them all. -# -# Building Go binaries is less automated than the rest of our Go packaging and -# requires more manual work. -# -%global goipath -Version: -%global tag -%global commit -%gometa - -%global _docdir_fmt %{name} - -%global golicenses -%global godocs -%global godevelheader %{expand: -# The devel package will usually benefit from corresponding project binaries. -Requires: %{name} = %{version}-%{release} -Obsoletes: -} - -%global common_description %{expand: -} - -# If one of the produced binaries is widely known it should be used to name the -# package instead of “goname”. Separate built binaries in different subpackages -# if needed. -Name: %{goname} -Version: -Release: 1%{?dist} -Summary: -URL: %{gourl} -Source: %{gosource} -%description -%{common_description} - -%gopkg - -%prep -%goprep - -%generate_buildrequires -%go_generate_buildrequires - -%build -# You need to identify manually the project parts that can be built, and how to -# name the result. Practically, it’s any directory containing a main() Go -# section. Nice projects put those in “cmd” subdirectories named after the -# command that will be built, which is what we will document here, but it is -# not a general rule. Sometimes the whole “goipath” builds as a single binary. -for cmd in cmd/* ; do - %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd -done - -%install -%gopkginstall -install -m 0755 -vd %{buildroot}%{_bindir} -install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ - -%check -%gocheck - -%files -%license %{golicenses} -%doc -%{_bindir}/* - -%gopkgfiles - -%changelog - diff --git a/guidelines/modules/ROOT/examples/golang/spectemplate-go-5-binary-full.spec b/guidelines/modules/ROOT/examples/golang/spectemplate-go-5-binary-full.spec deleted file mode 100644 index c98b731..0000000 --- a/guidelines/modules/ROOT/examples/golang/spectemplate-go-5-binary-full.spec +++ /dev/null @@ -1,91 +0,0 @@ -# Complete Go binary packaging template. -# -# This template complements “go-5-binary-minimal”, with less usual spec -# declarations. -# -# All the “go-*-” spec templates complement one another without documentation -# overlaps. Try to read them all -# -%global goipath -%global forgeurl -Version: -%global tag -%global commit -%global gocid -%gometa - -%global _docdir_fmt %{name} - -%global goipaths -%global goipathsex -%global godevelcid -%global godevelname -%global godevelsummary -%global godevelheader %{expand: -Requires: %{name} = %{version}-%{release} -Obsoletes: -} -%global golicenses -%global golicensesex -%global godocs -%global godocsex -%global goextensions -%global gosupfiles -%global gosupfilesex -%global godevelfilelist - -%global goaltipaths -%global gocannonipath -%global goaltcid -%global goaltsummary -%global goaltheader %{expand: -Requires: -Obsoletes: -} -%global goaltdescription %{expand: -} - -%global common_description %{expand: -} - - -Name: %{goname} -# If not set before -Version: -Release: 1%{?dist} -Summary: -URL: %{gourl} -Source: %{gosource} -%description -%{common_description} - -%gopkg - -%prep -%goprep - -%generate_buildrequires -%go_generate_buildrequires - -%build -for cmd in cmd/* ; do - %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd -done - -%install -%gopkginstall -install -m 0755 -vd %{buildroot}%{_bindir} -install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ - -%check -%gocheck - -%files -%license %{golicenses} -%doc -%{_bindir}/* - -%gopkgfiles - -%changelog - diff --git a/guidelines/modules/ROOT/examples/golang/spectemplate-go-6-multi.spec b/guidelines/modules/ROOT/examples/golang/spectemplate-go-6-multi.spec deleted file mode 100644 index 198eb63..0000000 --- a/guidelines/modules/ROOT/examples/golang/spectemplate-go-6-multi.spec +++ /dev/null @@ -1,193 +0,0 @@ -# This template documents advanced Go packaging with multiples of everything. -# Don’t try it before you understand how simpler Go packaging is done. -# -# All the “go-*-” spec templates complement one another without documentation -# overlaps. Try to read them all. -# -# Don’t hesitate to use “rpmspec -P ” to check the generated code. -# -# You can refer to several upstream archives using the “-a” “gometa” flag and -# blocks of declarations suffixed by a block number, like with “forgemeta”. -# No suffix or zero suffix refers to the main archive. Refer to the forge-multi -# template for more detailed information. -# IT IS A TERRIBLE IDEA TO TRY THIS UNLESS EVERY SOURCE ARCHIVE IS PERFECTLY -# VERSION-LOCKED WITH THE OTHERS. That will produce broken rpm versionning and -# broken upgrade paths. It is always simpler and safer to package separate -# projects with separate spec files. -# -# Main archive -%global goipath0 -%global forgeurl0 -Version: -%global tag0 -%global commit0 -%global gocid0 -# -# Second archive -%global goipath1 -%global forgeurl1 -%global version1 -%global tag1 -%global commit1 -%global gocid1 -# -# Continue as necessary… -# -# Alternatively, you can use the “-z ” “gometa” argument to process a -# specific declaration block only. -%gometa -a - -%global _docdir_fmt %{name} - -# Likewise, you can declare several devel subpackages, either one by source -# archive or with any other import path layout. -# -# First golang-*-devel subpackage. -# -# If unset, and no “goipaths” is defined in the spec, fallbacks to -# “goipath” -%global goipaths0 -%global goipathsex0 -%global godevelcid0 -%global godevelname0 -%global godevelsummary0 -%global godevelheader0 %{expand: -Requires: -Obsoletes: -} -%global golicenses0 -%global golicensesex0 -%global godocs0 -%global godocsex0 -%global goextensions0 -%global gosupfiles0 -%global gosupfilesex0 -%global godevelfilelist0 -# -# Second golang-*-devel subpackage. -%global goipaths1 -%global goipathsex1 -%global godevelcid1 -%global godevelname1 -%global godevelsummary1 -%global godevelheader1 %{expand: -Requires: -Obsoletes: -} -%global golicenses1 -%global golicensesex1 -%global godocs1 -%global godocsex1 -%global goextensions1 -%global gosupfiles1 -%global gosupfilesex1 -%global godevelfilelist1 -# -# Continue as necessary… - - -# Likewise, you can declare several alternative name sets that will generate -# the corresponding compat-golang-*-devel subpackages -# -# First compat-golang-*-devel subpackage set. -%global goaltipaths0 -# If unset, and no “gocanonipath” is defined in the spec, fallbacks to -# “goipath” -%global gocanonipath0 -%global goaltsummary0 -%global goaltheader0 %{expand: -Requires: -Obsoletes: -} -%global goaltdescription0 %{expand: -} -# -# Second compat-golang-*-devel subpackage set. -%global goaltipaths1 -%global gocanonipath1 -%global goaltsummary1 -%global goaltheader1 %{expand: -Requires: -Obsoletes: -} -%global goaltdescription1 %{expand: -} -# -# Continue as necessary… - -%global common_description %{expand: -} - -# Use usual naming rules when generating binaries. -Name: %{goname} -# If not set before -Version: -Release: 1%{?dist} -Summary: -URL: %{gourl} -# One for each of the previous goipath blocks -Source0: %{gosource0} -Source1: %{gosource1} -# … -%description -%{common_description} - -# “gopkg” will generate all the subpackages package declarations corresponding -# to the elements declared above. -# You can replace “gopkg” with “godevelpkg” and “goaltpkg” calls for finer -# control. -# “godevelpkg” and “goaltpkg” accept the usual selection arguments: -# – “-a” process everything -# – “-z ” process a specific declaration block -# If no flag is specified they only process the zero/nosuffix block. -%gopkg - -%prep -# “%goprep” and “go_generate_buildrequires” accept the usual selection arguments: -# – “-a” process everything -# – “-z ” process a specific declaration block -# If no flag is specified they only process the zero/nosuffix block. -%goprep -a - -%generate_buildrequires -%go_generate_buildrequires -a - -%build -# When your spec processes multiple Go source archives, you need to call -# “goenv” with the correct “-z ” argument before invoquing “%gobuild”. -# Otherwise the binaries risk being built with parameters corresponding to -# another source archive. -for cmd in cmd/* ; do - %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd -done - -%install -# You can replace “gopkginstall” with “godevelinstall” and “goaltinstall” -# calls for finer control. -# “godevelinstall” and “goaltinstall” accept the usual selection arguments: -# – “-a” process everything -# – “-z ” process a specific declaration block -# If no flag is specified they only process the zero/nosuffix block. -%gopkginstall - -install -m 0755 -vd %{buildroot}%{_bindir} -install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ - -%check -%gocheck - -%files -%license -%doc -%{_bindir}/* - -# You can replace “gopkgfiles” with “godevelfiles” and “goaltfiles” -# calls for finer control. -# “godevelfiles” and “goaltfiles” accept the usual selection arguments: -# – “-a” process everything -# – “-z ” process a specific declaration block -# If no flag is specified they only process the zero/nosuffix block. -%gopkgfiles - -%changelog - diff --git a/guidelines/modules/ROOT/examples/golang/spectemplate-go-7-manual.spec b/guidelines/modules/ROOT/examples/golang/spectemplate-go-7-manual.spec deleted file mode 100644 index a524b72..0000000 --- a/guidelines/modules/ROOT/examples/golang/spectemplate-go-7-manual.spec +++ /dev/null @@ -1,145 +0,0 @@ -# This template documents old-style semi-manual Go packaging. This packaging -# mode provides the most packager control. However, the result is also more -# difficult to get right and to maintain. -# -# Using this packaging mode is not recommended unless you really need it. If -# you prepare your sources correctly in prep you should not need it. -# -# All the “go-*-” spec templates complement one another without documentation -# overlaps. Try to read them all.. -# -%global goipath -%global forgeurl -Version: -%global tag -%global commit -%gometa - -# Old naming of the same project -%global oldgoipath xxxx -%global oldgoname %gorpmname %{oldgoipath} - -%global common_description %{expand: -} - -Name: %{goname} -# If not set before -Version: -Release: 1%{?dist} -Summary: -URL: %{gourl} -Source: %{gosource} -%description -%{common_description} - -%package -n %{goname}-devel -Summary: %{summary} - -# If the package builds some binaries -Requires: %{name} = %{version}-%{release} - -%description -n %{goname}-devel -%{common_description} - -This package contains the source code needed for building packages that -reference the following Go import paths: - – %{goipath} - -# If you’ve defined an alternative go name -%package -n compat-%{oldgoname}-devel -Summary: %{summary} -Obsoletes: %{oldgoname}-devel < %{version}-%{release} - -%description -n compat-%{oldgoname}-devel -%{common_description} - -This package provides symbolic links that alias the following Go import paths -to %{goipath}: - – %{oldgoipath} - -Aliasing Go import paths via symbolic links or http redirects is fragile. If -your Go code depends on this package, you should patch it to import directly -%{goipath}. - -%prep -%goprep - -%generate_buildrequires -%go_generate_buildrequires - -%install -# goinstall is our Go source installation workhorse. It accepts a huge and -# bewildering array of arguments. Most of those have good default values, -# changing them is more likely to compound existing spec problems than fix -# anything. -# -# Selection arguments, that can not be repeated: -# – “-a” process everything -# – “-z ” process a specific declaration block -# – “-i ” use the specified import path value -# default: %{goipath} -# -# If no “-a”, “-z” or “-i ”flag is specified goinstall will only process the -# zero/nosuffix Go import path. -# -# Miscellaneous settings: -# – “-b ” read binaries already produced in -# default: %{gobuilddir}/bin -# – “-s ” read expanded and prepared Go sources in -# /src -# should be populated in %prep -# default: %{gobuilddir} -# – “-o ” output installed file list in -# default: %{gofilelist} -# – “-O ” output in -# – “-l ” add those flags to LDFLAGS when building unit tests -# – “-v” be verbose -# -# Inclusion arguments, that can be repeated: -# – “-e ” include files with the provided extension -# -# Exclusion ar²guments, that can be repeated, relative to the go import path -# root: -# – “-d ” exclude the files contained in -# not recursive (subdirectories are not excluded) -# – “-t ” exclude the files contained in -# recursive (subdirectories are excluded) -# – “-r ” exclude files matching , -# -# Optional versionning metadata, that can not be repeated: -# – “-V ” should only be specified when creating subpackages -# with distinct versions. Excellent tool for producing -# broken packages. -# default: %{version}.%{release} -# – “-T ” default: %{tag} -# – “-C ” default: %{commit} -# – “-B ” default: %{branch} -# -%goinstall -# -# Old name aliasing -install -m 0755 -vd %{buildroot}%{gopath}/src/%(dirname %{oldgoipath}) -ln -s %{gopath}/src/%{goipath} %{buildroot}%{gopath}/src/%{oldgoipath} -# -install -m 0755 -vd %{buildroot}%{_bindir} -install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ - -%check -%gocheck - -%files -%license -%{_bindir}/* - -%files -n %{goname}-devel -f %{gofilelist} - -%files -n compat-%{oldgoname}-devel -# You need as many of those as necessary to own the levels of directories -# between %{gopath}/src and %{gopath}/src/%{oldgoipath}, that are not already -# owned by the %{goname}-devel subpackage -%dir %{gopath}/src/%(dirname %(dirname %{oldgoipath})) -%dir %{gopath}/src/%(dirname %{oldgoipath}) -%{gopath}/src/%{oldgoipath} - -%changelog - diff --git a/guidelines/modules/ROOT/examples/haskell-binary-library.spec b/guidelines/modules/ROOT/examples/haskell-binary-library.spec deleted file mode 100644 index de7a496..0000000 --- a/guidelines/modules/ROOT/examples/haskell-binary-library.spec +++ /dev/null @@ -1,81 +0,0 @@ -%global pkg_name @PACKAGE@ - -Name: %{pkg_name} -Version: @VERSION@ -Release: 1%{?dist} -Summary: @SUMMARY@ - -License: @LICENSE@ -URL: https://hackage.haskell.org/package/%{name} -Source: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz - -BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros -BuildRequires: ghc-base-prof - -%description -@DESCRIPTION@ - - -%package -n ghc-%{name} -Summary: Haskell %{name} library - -%description -n ghc-%{name} -This package contains the Haskell %{name} library. - - -%package -n ghc-%{name}-devel -Summary: Haskell %{name} library development files -Requires: ghc-compiler = %{ghc_version} -Requires: ghc-%{name} = %{version}-%{release} - -%description -n ghc-%{name}-devel -This package provides the Haskell %{pkg_name} library development files. - - -%package -n ghc-%{name}-doc -Summary: Haskell %{pkg_name} library documentation -BuildArch: noarch - -%description -n ghc-%{name}-doc -This package provides the Haskell %{pkg_name} library documentation. - - -%package -n ghc-%{name}-prof -Summary: Haskell %{pkg_name} profiling library -Requires: ghc-%{name}-devel%{?_isa} = %{version}-%{release} -Supplements: (ghc-%{name}-devel and ghc-prof) - -%description -n ghc-%{name}-prof -This package provides the Haskell %{pkg_name} profiling library. - - -%prep -%setup -q - - -%build -%ghc_lib_build - - -%install -%ghc_lib_install - - -%files -%license LICENSE -%{_bindir}/%{name} - - -%files -n ghc-%{name} -f ghc-%{name}.files -%license LICENSE - - -%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files - - -%files -n ghc-%{name}-doc -f ghc-%{name}-doc.files -%license LICENSE - - -%files -n ghc-%{name}-prof -f ghc-%{name}-prof.files diff --git a/guidelines/modules/ROOT/examples/haskell-binary-only.spec b/guidelines/modules/ROOT/examples/haskell-binary-only.spec deleted file mode 100644 index 28b0421..0000000 --- a/guidelines/modules/ROOT/examples/haskell-binary-only.spec +++ /dev/null @@ -1,32 +0,0 @@ -Name: @PACKAGE@ -Version: @VERSION@ -Release: 1%{?dist} -Summary: @SUMMARY@ - -License: @LICENSE@ -URL: https://hackage.haskell.org/package/%{name} -Source: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz - -BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros -BuildRequires: ghc-base-static - -%description -@DESCRIPTION@ - - -%prep -%setup -q - - -%build -%ghc_bin_build - - -%install -%ghc_bin_install - - -%files -%license LICENSE -%{_bindir}/%{name} diff --git a/guidelines/modules/ROOT/examples/haskell-library-only.spec b/guidelines/modules/ROOT/examples/haskell-library-only.spec deleted file mode 100644 index f8c3f7b..0000000 --- a/guidelines/modules/ROOT/examples/haskell-library-only.spec +++ /dev/null @@ -1,70 +0,0 @@ -%global pkg_name @PACKAGE@ - -Name: ghc-%{pkg_name} -Version: @VERSION@ -Release: 1%{?dist} -Summary: @SUMMARY@ - -License: @LICENSE@ -URL: https://hackage.haskell.org/package/%{pkg_name} -Source: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz - -BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros -BuildRequires: ghc-base-prof - -%description -@DESCRIPTION@ - -%package devel -Summary: Haskell %{pkg_name} library development files -Provides: %{name}-static = %{version}-%{release} -Provides: %{name}-static%{?_isa} = %{version}-%{release} -Requires: ghc-compiler = %{ghc_version} -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description devel -This package provides the Haskell %{pkg_name} library development files. - - -%package doc -Summary: Haskell %{pkg_name} library documentation -BuildArch: noarch - -%description doc -This package provides the Haskell %{pkg_name} library documentation. - - -%package prof -Summary: Haskell %{pkg_name} profiling library -Requires: %{name}-devel%{?_isa} = %{version}-%{release} -Supplements: (%{name}-devel and ghc-prof) - -%description prof -This package provides the Haskell %{pkg_name} profiling library. - - -%prep -%setup -q -n %{pkg_name}-%{version} - - -%build -%ghc_lib_build - - -%install -%ghc_lib_install - - -%files -f %{name}.files -%license LICENSE - - -%files devel -f %{name}-devel.files - - -%files doc -f %{name}-doc.files -%license LICENSE - - -%files prof -f %{name}-prof.files diff --git a/guidelines/modules/ROOT/examples/ocaml-dune-example.spec b/guidelines/modules/ROOT/examples/ocaml-dune-example.spec deleted file mode 100644 index 17c9cdf..0000000 --- a/guidelines/modules/ROOT/examples/ocaml-dune-example.spec +++ /dev/null @@ -1,67 +0,0 @@ -%ifnarch %{ocaml_native_compiler} -%global debug_package %{nil} -%endif - -Name: ocaml-foolib -Version: 1.2.3 -Release: %autorelease -Summary: OCaml library for fooing bars - -License: LGPL-2.1-or-later -URL: https://www.example.com/foolib -Source: https://www.example.com/foolib-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-dune - -%description -OCaml library for fooing bars. This library can also foo bazes. - - -%package devel -Summary: Development files for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%autosetup -n foolib-%{version} - - -%build -# Build all installable targets -%dune_build -# Build a specific set of targets -%dune_build -p bazzer,boffer -# Build non-default targets -%dune_build @install @doc - - -%install -# Install all installable targets -%dune_install -# Install a specific set of targets -%dune_install bazzer boffer - - -%check -# Check all installable targets -%dune_check -# Check a specific set of targets -%dune_check -p bazzer,boffer - - -%files -f .ofiles -%doc README -%license LICENSE - - -%files devel -f .ofiles-devel - - -%changelog -%autochangelog diff --git a/guidelines/modules/ROOT/examples/ocaml-example.spec b/guidelines/modules/ROOT/examples/ocaml-example.spec deleted file mode 100644 index 5167b9f..0000000 --- a/guidelines/modules/ROOT/examples/ocaml-example.spec +++ /dev/null @@ -1,74 +0,0 @@ -%ifnarch %{ocaml_native_compiler} -%global debug_package %{nil} -%endif - -Name: ocaml-foolib -Version: 1.2.3 -Release: %autorelease -Summary: OCaml library for fooing bars - -License: LGPL-2.1-or-later -URL: https://www.example.com/foolib -Source: https://www.example.com/foolib-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-findlib - -%description -OCaml library for fooing bars. This library can also foo bazes. - - -%package devel -Summary: Development files for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%autosetup -n foolib-%{version} - - -%build -# You may need a ./configure step here. -make byte -%ifarch %{ocaml_native_compiler} -make opt -%endif - - -%install -# These rules work if the library uses 'ocamlfind install' to install itself. -export OCAMLFIND_DESTDIR=%{buildroot}%{ocamldir} -mkdir -p $OCAMLFIND_DESTDIR/stublibs -%make_install - - -%files -%doc README -%license LICENSE -%{ocamldir}/foolib -%ifarch %{ocaml_native_compiler} -%exclude %{ocamldir}/foolib/*.a -%exclude %{ocamldir}/foolib/*.cmxa -%exclude %{ocamldir}/foolib/*.cmx -%endif -%exclude %{ocamldir}/foolib/*.mli -%{ocamldir}/stublibs/*.so -%{ocamldir}/stublibs/*.so.owner - - -%files devel -%ifarch %{ocaml_native_compiler} -%{ocamldir}/foolib/*.a -%{ocamldir}/foolib/*.cmxa -%{ocamldir}/foolib/*.cmx -%endif -%{ocamldir}/foolib/*.mli - - -%changelog -%autochangelog diff --git a/guidelines/modules/ROOT/examples/ocaml-topkg-example.spec b/guidelines/modules/ROOT/examples/ocaml-topkg-example.spec deleted file mode 100644 index 4365de2..0000000 --- a/guidelines/modules/ROOT/examples/ocaml-topkg-example.spec +++ /dev/null @@ -1,72 +0,0 @@ -%ifnarch %{ocaml_native_compiler} -%global debug_package %{nil} -%endif - -Name: ocaml-foolib -Version: 1.2.3 -Release: %autorelease -Summary: OCaml library for fooing bars - -License: LGPL-2.1-or-later -URL: https://www.example.com/foolib -Source: https://www.example.com/foolib-%{version}.tar.gz - -BuildRequires: ocaml -BuildRequires: ocaml-findlib -BuildRequires: ocaml-topkg-devel -BuildRequires: python3 - -%description -OCaml library for fooing bars. This library can also foo bazes. - - -%package devel -Summary: Development files for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} - - -%description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. - - -%prep -%autosetup -n foolib-%{version} - -# Enable debuginfo if upstream does not -echo true: debug >> _tags - - -%build -ocaml pkg/pkg.ml build --tests true - - -%install -mkdir -p %{buildroot}%{ocamldir}/foolib -cp -p _build/{opam,pkg/META} %{buildroot}%{ocamldir}/foolib -%ifarch %{ocaml_native_compiler} -cp -a _build/src/*.{a,cma,cmi,cmt,cmti,cmx,cmxa,cmxs,mli} \ - %{buildroot}%{ocamldir}/foolib -%else -cp -a _build/src/*.{cma,cmi,cmt,cmti,mli} %{buildroot}%{ocamldir}/foolib -%endif - -# This macro requires python3 in the buildroot -%ocaml_files - - -%check -ocaml pkg/pkg.ml test - - -%files -f .ofiles -%doc README -%license LICENSE - - -%files devel -f .ofiles-devel -%ifarch %{ocaml_native_compiler} - - -%changelog -%autochangelog diff --git a/guidelines/modules/ROOT/examples/python-example.spec b/guidelines/modules/ROOT/examples/python-example.spec deleted file mode 100644 index 3ef7da9..0000000 --- a/guidelines/modules/ROOT/examples/python-example.spec +++ /dev/null @@ -1,45 +0,0 @@ -%global srcname example - -Name: python-%{srcname} -Version: 1.2.3 -Release: 1%{?dist} -Summary: Example python module - -License: MIT -URL: https://pypi.python.org/pypi/example -Source: %{pypi_source} - -BuildArch: noarch - -%global _description %{expand: -A python module which provides a convenient example. This is the -rest of the description that provides more details.} - -%description %_description - -%package -n python3-%{srcname} -Summary: %{summary} -BuildRequires: python3-devel -BuildRequires: python3-setuptools - -%description -n python3-%{srcname} %_description - -%prep -%autosetup -n %{srcname}-%{version} - -%build -%py3_build - -%install -%py3_install - -%check -%{python3} setup.py test - -# Note that there is no %%files section for the unversioned python module -%files -n python3-%{srcname} -%license COPYING -%doc README.rst -%{python3_sitelib}/%{srcname}-*.egg-info/ -%{python3_sitelib}/%{srcname}/ -%{_bindir}/sample-exec diff --git a/guidelines/modules/ROOT/examples/spectemplate-forge-branch.spec b/guidelines/modules/ROOT/examples/spectemplate-forge-branch.spec deleted file mode 100644 index 3986a30..0000000 --- a/guidelines/modules/ROOT/examples/spectemplate-forge-branch.spec +++ /dev/null @@ -1,49 +0,0 @@ -# This template shows how to package a branch state using the forgemeta macro. -# -# BRANCH STATES ARE NOT REPRODUCIBLE AND SHOULD NEVER BE SHARED WITH OTHERS. -# -# For more explanations on forgemeta, read the forgemeta-release template. -# -# The project url on the forge -%global forgeurl -# -# The branch being packaged -%global branch -# -# – use the “-i” flag to display the variables forgemeta reads and sets -# – use the “-v” flag if you want verbose processing -# – remove “-i” and “-v” before commit -%forgemeta - -# The following lines use variables computed by forgemeta as default values. -# You can replace them with manual definitions. -# forgemeta will prepend branch information to dist. Release ordering is -# controlled by the packager with x%{?dist}/0.x%{?dist} number chains. -Name: -Version: -Release: 1%{?dist} -Summary: -URL: %{forgeurl} -Source: %{forgesource} -%description - - -%prep -# – an autosetup wrapper, forgeautosetup, is also provided -# – use the “-v” flag if you want verbose processing; remove it before commit -# – call forgesetup/autosetup directly if you do not like the result -%forgesetup -# -# After this point the archive extraction is done. forgemeta is no longer used. - -%build - -%install - -%check - -%files -%license -%doc - -%changelog diff --git a/guidelines/modules/ROOT/examples/spectemplate-forge-commit.spec b/guidelines/modules/ROOT/examples/spectemplate-forge-commit.spec deleted file mode 100644 index 0af8bb4..0000000 --- a/guidelines/modules/ROOT/examples/spectemplate-forge-commit.spec +++ /dev/null @@ -1,46 +0,0 @@ -# This template shows how to package a commit state using the forgemeta macro. -# For more explanations on forgemeta, read the forgemeta-release template. -# -# The project url on the forge -%global forgeurl -# -# The commit being packaged (when using git, a full hash) -%global commit -# -# – use the “-i” flag to display the variables forgemeta reads and sets -# – use the “-v” flag if you want verbose processing -# – remove “-i” and “-v” before commit -%forgemeta - -# The following lines use variables computed by forgemeta as default values. -# You can replace them with manual definitions. -# forgemeta will prepend commit information to dist. Release ordering is -# controlled by the packager with x%{?dist}/0.x%{?dist} numbers chains. -Name: -Version: -Release: 1%{?dist} -Summary: -URL: %{forgeurl} -Source: %{forgesource} -%description - - -%prep -# – an autosetup wrapper, forgeautosetup, is also provided -# – use the “-v” flag if you want verbose processing; remove it before commit -# – call forgesetup/autosetup directly if you do not like the result -%forgesetup -# -# After this point the archive extraction is done. forgemeta is no longer used. - -%build - -%install - -%check - -%files -%license -%doc - -%changelog diff --git a/guidelines/modules/ROOT/examples/spectemplate-forge-multi.spec b/guidelines/modules/ROOT/examples/spectemplate-forge-multi.spec deleted file mode 100644 index 3730473..0000000 --- a/guidelines/modules/ROOT/examples/spectemplate-forge-multi.spec +++ /dev/null @@ -1,81 +0,0 @@ -# This template shows how to package multiple source archives using the -# forgemeta macro. -# -# PACKAGING MULTIPLE PROJECT ARCHIVES IN A SINGLE SPEC IS DISCOURAGED. IT OFTEN -# REQUIRES ERROR-INDUCING VERSIONNING DECISIONS. In rpm, versioning is not an -# administrative decoration. Versioning controls the upgrade logic. If upstream -# deemed necessary to release a project through multiple archives, mirror its -# decision using multiple spec files. That will be safer, simpler, and -# ultimately less work. -# -# For more explanations on forgemeta, read the forgemeta-release template. -# -# Start by declaring the characteristics of each source using a number-suffixed -# variable block: -# – no suffix and zero suffix blocks are aliases -# – they are “special” and identify the main source archive -# — they use Version: to identify a release -# – other blocks use a version variable for the same need -# – the syntax is otherwise identical to single archive mode; see the various -# forge templates for examples. -# -# Main archive. In this example we package a full release -%global forgeurl0 -Version: - -# Second archive. -%global forgeurl1 -%global version1 - -# Third archive. This time a tag. Continue as necessary. -%global forgeurl2 -%global tag2 - -# – use the “-a” flag to process all the source archives in a single pass -# – use “-z ” to process only the declaration block suffixed with -# -# — without “-a” of “-z ” only the main archive is processed -# – use the “-i” flag to display the variables forgemeta reads and sets -# – use the “-v” flag if you want verbose processing -# – remove “-i” and “-v” before commit -%forgemeta -a - -# The following lines use variables computed by forgemeta as default values. -# You can replace them with manual definitions. -# Release ordering is controlled by the packager with x%{?dist}/0.x%{?dist} -# numbers chains. -Name: -Release: 1%{?dist} -Summary: -URL: %{forgeurl0} -# https://github.com/rpm-software-management/rpm/issues/539 -Source0: %{forgesource0} -Source1: %{forgesource1} -Source2: %{forgesource2} -%description - - -%prep -# – use the “-a” flag to process all the source archives in a single pass -# – use “-z ” to process only the declaration block suffixed with -# -# — without “-a” of “-z ” only the main archive is processed -# – an autosetup wrapper, forgeautosetup, is also provided -# – forgeautosetup does not understand “-a” -# – use the “-v” flag if you want verbose processing; remove it before commit -# – call forgesetup/autosetup directly if you do not like the result -%forgesetup -a -# -# After this point the archive extraction is done. forgemeta is no longer used. - -%build - -%install - -%check - -%files -%license -%doc - -%changelog diff --git a/guidelines/modules/ROOT/examples/spectemplate-forge-release.spec b/guidelines/modules/ROOT/examples/spectemplate-forge-release.spec deleted file mode 100644 index 7b7ec09..0000000 --- a/guidelines/modules/ROOT/examples/spectemplate-forge-release.spec +++ /dev/null @@ -1,58 +0,0 @@ -# This template shows how to package a commit state using the forgemeta macro. -# That should be the default target use case. -# Other less common use cases are documented in separate templates. -# -# The project url on the forge, for example -# https://gitlab.gnome.org/GNOME/gtk/ -%global forgeurl -# -# Packaging a release requires setting Version before calling forgemeta. -# Because most forges follow the git model, and git made no provision for -# release objects, forgemeta will try to guess the customary way to write -# release tags on the selected forge. -# If it guesses wrong use the forge-tag template instead of this one. -Version: -# -# forgemeta converts the suppplied rpm variables to variables that can be used -# in the spec file. Most of those can be overriden before or after the -# forgemeta call. -# – use the “-i” flag to display the variables forgemeta reads and sets -# – use the “-v” flag if you want verbose processing -# – remove “-i” and “-v” before commit -%forgemeta - -# The following lines use variables computed by forgemeta as default values. -# You can replace them with manual definitions. For example, replace forgeurl -# with the project homepage if it exists separately from the repository URL. -# Only replace the variables when it adds value to the spec file and you -# understand the consequences. Release ordering is controlled by the packager -# with x%{?dist}/0.x%{?dist} number chains. -Name: -Release: 1%{?dist} -Summary: -URL: %{forgeurl} -Source: %{forgesource} -%description - - -%prep -# forgesetup calls setup with the correct flags for archives downloaded from -# the selected forge. A forgeautosetup autosetup wrapper is also provided. If -# you disagree with the computed setup/autosetup flags, just call -# setup/autosetup directly. -# – use the “-v” flag if you want verbose processing -%forgesetup -# -# After this point the archive extraction is done. forgemeta is no longer used. - -%build - -%install - -%check - -%files -%license -%doc - -%changelog diff --git a/guidelines/modules/ROOT/examples/spectemplate-forge-tag.spec b/guidelines/modules/ROOT/examples/spectemplate-forge-tag.spec deleted file mode 100644 index bf0035b..0000000 --- a/guidelines/modules/ROOT/examples/spectemplate-forge-tag.spec +++ /dev/null @@ -1,46 +0,0 @@ -# This template shows how to package a tag state using the forgemeta macro. -# For more explanations on forgemeta, read the forgemeta-release template. -# -# The project url on the forge -%global forgeurl -# -# The tag being packaged -%global tag -# -# – use the “-i” flag to display the variables forgemeta reads and sets -# – use the “-v” flag if you want verbose processing -# – remove “-i” and “-v” before commit -%forgemeta - -# The following lines use variables computed by forgemeta as default values. -# You can replace them with manual definitions. -# forgemeta will prepend tag information to dist. Release ordering is -# controlled by the packager with x%{?dist}/0.x%{?dist} numbers chains. -Name: -Version: -Release: 1%{?dist} -Summary: -URL: %{forgeurl} -Source: %{forgesource} -%description - - -%prep -# – an autosetup wrapper, forgeautosetup, is also provided -# – use the “-v” flag if you want verbose processing; remove it before commit -# – call forgesetup/autosetup directly if you do not like the result -%forgesetup -# -# After this point the archive extraction is done. forgemeta is no longer used. - -%build - -%install - -%check - -%files -%license -%doc - -%changelog diff --git a/guidelines/modules/ROOT/nav.adoc b/guidelines/modules/ROOT/nav.adoc deleted file mode 100644 index 7c0c68a..0000000 --- a/guidelines/modules/ROOT/nav.adoc +++ /dev/null @@ -1,86 +0,0 @@ -* https://fedoraproject.org/wiki/EPEL:Packaging[EPEL-specific guidelines] - -* xref:Alternatives.adoc[Alternatives] -* xref:AppData.adoc[AppData] -* xref:AutoProvidesAndRequiresFiltering.adoc[Dependency Filtering] -* xref:Conflicts.adoc[Conflicts] -* xref:CryptoPolicies.adoc[Crypto Policies] -* xref:Debuginfo.adoc[Debuginfo] -* xref:DefaultServices.adoc[Default Services] -* xref:vpath.adoc[Defining source and build directories] -* xref:deprecating-packages.adoc[Deprecating Packages] -* xref:Directory_Replacement.adoc[Directory Replacement] -* xref:DistTag.adoc[Dist Tag] -* xref:Initial_Service_Setup.adoc[Initial Service Setup] -* xref:KDEPackaging.adoc[KDE Packaging Guidelines] -* xref:Langpacks.adoc[Language Packs] -* xref:LicensingGuidelines.adoc[Licensing] -* xref:manual-changelog.adoc[Manual Changelog] -* xref:Naming.adoc[Naming] -* xref:PatchUpstreamStatus.adoc[Patch Status] -* xref:Per-Product_Configuration.adoc[Per-Product Configuration] -* xref:PkgConfigBuildRequires.adoc[Pkgconfig Build Dependencies] -* xref:Pkcs11Support.adoc[PKCS#11 / Smartcard Support Guidelines] -* xref:ReviewGuidelines.adoc[Review Guidelines] -* xref:RPMMacros.adoc[RPM Macros] -* xref:RPM_Source_Dir.adoc[RPM Source Dir] -* xref:Scriptlets.adoc[Scriptlets] -* xref:SourceURL.adoc[SourceURL] -* xref:SSLCertificateHandling.adoc[SSL Certificate Handling] -* xref:Systemd.adoc[Systemd] -* xref:Tmpfiles.d.adoc[Tmpfiles.d] -* xref:UnownedDirectories.adoc[Unowned Directories] -* xref:UsersAndGroups.adoc[Users and Groups] -* xref:Versioning.adoc[Versioning] -* xref:WeakDependencies.adoc[Weak Dependencies] -* xref:what-can-be-packaged.adoc[What Can Be Packaged] - -* Build Systems -** xref:CMake.adoc[CMake] -** xref:Meson.adoc[Meson] - -* Programming Languages -** xref:Ada.adoc[Ada] -** xref:C_and_C++.adoc[C and {cpp}] -** xref:D.adoc[D] -** xref:Fortran.adoc[Fortran] -** xref:Golang.adoc[Golang] -*** xref:Golang_old.adoc[Legacy guidelines] -**** xref:Golang_advanced.adoc[Advanced uses cases] -**** xref:Golang_templates.adoc[Additional annotated templates] -** xref:Haskell.adoc[Haskell] -** xref:Java.adoc[Java] -*** xref:java-packaging-howto::index.adoc[Java Packaging HOWTO] -** xref:JavaScript.adoc[JavaScript] -** xref:Lisp.adoc[Lisp] -** xref:Lua.adoc[Lua] -** xref:Mono.adoc[Mono] -** xref:Node.js.adoc[Node.js] -** xref:OCaml.adoc[OCaml] -** xref:Octave.adoc[Octave] -** xref:Perl.adoc[Perl] -** xref:PHP.adoc[PHP] -** xref:Python.adoc[Python] -*** xref:Python_201x.adoc[Python (201x-era)] -*** xref:Python_Appendix.adoc[Python Appendix] -** xref:R.adoc[R] -** xref:Ruby.adoc[Ruby] -** xref:Rust.adoc[Rust] -** xref:Tcl.adoc[Tcl/Tk extensions] - -* Other Domain-specific Guidelines -** xref:Ansible_collections.adoc[Ansible Collections] -** xref:BLAS_LAPACK.adoc[BLAS/LAPACK] -** xref:CronFiles.adoc[CronFiles] -** xref:Emacs.adoc[Emacs] -** xref:EnvironmentModules.adoc[EnvironmentModules] -** xref:FontsPolicy.adoc[Fonts] -** xref:GAP.adoc[GAP] -** xref:LibreOfficeExtensions.adoc[LibreOffice Extensions] -** xref:MinGW.adoc[MinGW] -** xref:MPI.adoc[MPI] -** xref:ShellCompletions.adoc[Shell Completions] -** xref:SugarActivityGuidelines.adoc[Sugar activities] -** xref:Tree-sitter.adoc[Tree-sitter parsers] -** xref:Web_Assets.adoc[Web Assets] -** xref:WordPress_plugin_packaging_guidelines.adoc[WordPress extensions] diff --git a/guidelines/modules/ROOT/pages/Ada.adoc b/guidelines/modules/ROOT/pages/Ada.adoc deleted file mode 100644 index a8959f8..0000000 --- a/guidelines/modules/ROOT/pages/Ada.adoc +++ /dev/null @@ -1,209 +0,0 @@ -= Ada Packaging Guidelines - -:last-reviewed: 2019-04-04 - -This document describes the current policies for packaging -Ada programs and libraries for Fedora. -These are Ada-specific amendments to the generic Packaging Guidelines. -Ada packages must also conform to the link:../[Packaging Guidelines] -and the link:../ReviewGuidelines/[Review Guidelines]. - -== Compilation - -* Ada code in Fedora *MUST* be compiled using GNAT, - the default Ada compiler in Fedora. - All packages that contain Ada code *MUST* have “`+BuildRequires: gcc-gnat+`” - to ensure that the compiler is available. -* The GNAT tools are usually invoked through the builder GPRbuild, - so Ada packages typically need “`+BuildRequires: gprbuild+`”. -* There are a number of RPM macros that contain - Fedora’s standard compiler and linker flags adapted for GNAT. - The appropriate macro *MUST* be used in the build stage. - The right macro to use depends on what build tools the package uses. -** For packages that are built with GPRbuild or Gnatmake but without Comfignat - there are the macros - +++GPRbuild_flags+++ - and +++Gnatmake_flags+++, - which contain builder, compiler and linker flags. -** In case a package’s build system invokes the underlying GNAT tools - without using GPRbuild or Gnatmake, - then the appropriate macro for each tool *MUST* be used. - If for example Gnatlink is invoked directly, - then the expansion of +++Gnatlink_flags+++ shall be passed to it. -** For packages whose build systems use Comfignat - there is the macro +++Comfignat_make+++. - It expands to a Make command with appropriate values - for Comfignat’s configuration variables, - including builder, compiler and linker flags, - directory variables and the directories project. - Use it alone to build the default target: -+ -.... -%build -%{Comfignat_make} -.... -+ -If needed, a different target and/or additional variables may be appended: -+ -.... -%{Comfignat_make} demo_programs atomic_doodads=true -.... -+ -For the installation stage of Comfignat-using packages, -the macro +++make_install+++ (*not* +++makeinstall+++) -is recommended. -* The macros +++GPRbuild_arches+++ and +++GNAT_arches+++ -expand to a list of architectures -where GNAT packages are available in Fedora. -When there is a need to prevent attempts -to build an Ada package on secondary architectures -where GNAT has not been bootstrapped, -this *MUST* be done with either “`+ExclusiveArch: %{GPRbuild_arches}+`” -or “`+ExclusiveArch: %{GNAT_arches}+`”. -* All packages that contain Ada code *MUST* have -“`+BuildRequires: fedora-gnat-project-common+`” -to ensure that the necessary RPM macros are defined. -* If the upstream source package comes with a build system, -for example a GNAT project file or makefiles and a configuration script, -then it’s probably best to use that if possible. -If not, it is recommended that the packager write a GNAT project file -and use GPRbuild to control the compilation. - -=== Trampolines - -An executable stack has been made a linker error in Fedora. -This can affect Ada packages because -https://gcc.gnu.org/onlinedocs/gccint/Trampolines.html[GCC uses trampolines] -to implement some language constructs. -The compiler’s usage of trampolines has been greatly reduced, but -https://gcc.gnu.org/onlinedocs/gnat_rm/No_005fImplicit_005fDynamic_005fCode.html[some cases remain]. -One case that occurs is -when a nested subprogram in Ada -is passed as a callback routine -to a function written in C – -which means that the executable stack is also exposed to C code -that may contain buffer overflows. -In such cases the options are -to explicitly allow an executable stack -by passing “`+-largs -Wl,--no-warn-execstack+`” to GPRbuild, -or restructure the code to eliminate the need for trampolines. -Which option is best may depend on -how exposed the program is to potentially hostile input. - -Correct usage of the RPM macros -should result in a warning message from the compiler -that points out where in the code a trampoline is needed. - -== Runpaths - -GPRbuild adds a runpath to the built binaries by default. -Fedora’s builder flags normally include an option -to disable the automatic runpath. -There are however cases where it would be advantageous to allow a runpath. -Libraries can have test suites or auxiliary programs that aren’t installed -but run during the build and need to link to the library in the build directory, -and they may rely on an automatic runpath for this. -In those cases the spec file may define a macro named -+++GNAT_add_rpath+++. -The builder will then be allowed to add a runpath -in those parts of the spec file where -+++GNAT_add_rpath+++ is defined. - -NOTE: +++GNAT_add_rpath+++ does not exempt a package -from the Packaging Guidelines. -link:../#_beware_of_rpath[The policy on runpaths] still applies. - -== Devel packages - -* Ada library packages *MUST* have a -devel subpackage -containing all the files that are necessary for compilation of code -that uses the library. -This includes +Ada specification files (*.ads), -Ada body files (*.adb), -Ada library information files (*.ali) -and GNAT project files (*.gpr).+ -(There is no requirement to include all body files. -Typically only some body files are needed.) - -* The -devel package *MUST NOT* contain any makefiles -or other files that are only used for recompiling the library. - -* The -devel package *MUST NOT* contain any +*.o+ files. - -=== GNAT project files - -* The -devel package *MUST* contain one or more GNAT project files -to be imported by other projects that use the library. - -* Project files *MUST* be architecture-independent. -This means that the same project file must point to libraries in -/usr/lib or /usr/lib64 -depending on what target architecture the compiler is currently compiling for. -This *SHOULD* be done by importing the “directories” project -(that is, the project file directories.gpr) -and using the variable -+++Directories.Libdir+++ -which is defined there. -The value of -+++Directories.Libdir+++ -is set to either “/usr/lib” or “/usr/lib64” depending on the hardware platform. - -* Project files *MUST NOT* contain hard-coded directory names, -neither absolute nor relative; they should get them from some source. -The source may be an Autoconf-generated configuration script -or other build system. -Project files that aren’t pre-processed by such a build system -*SHOULD* use the variable -+++Directories.Includedir+++ -rather than a hard-coded “/usr/include”. - -* If the “directories” project is used, -then the -devel package *MUST* have an explicit -“`+Requires: fedora-gnat-project-common+`”. - -* Project files *MUST* have an -+++Externally_Built+++ -attribute equal to “true”. - -Here’s an example of what a project file installed with a library may look like: - -.... -with "directories"; -project Example is - for Library_Name use "example"; - for Source_Dirs use (Directories.Includedir & "/example"); - for Library_Dir use Directories.Libdir; - for Library_ALI_Dir use Directories.Libdir & "/example"; - for Externally_Built use "true"; -end Example; -.... - -== File placement - -* Ada source files in -devel packages (+*.ads and *.adb+) -*MUST* be placed in the `+%{_includedir}+` directory -or a subdirectory thereof. -Placing them directly in `+%{_includedir}+` may be appropriate -if there are very few of them in the package -and their names include the name of the library. -Otherwise they should usually be placed in a subdirectory, -for example `+%{_includedir}/%{name}+`. - -* Ada library information files (+*.ali+) -*MUST* be placed in a subdirectory of `+%{_libdir}+`, -for example `+%{_libdir}/%{name}+`. - -* GNAT projects files (+*.gpr+) -*MUST* be placed in the `+%{_GNAT_project_dir}+` directory -or a subdirectory thereof. -A subdirectory, for example `+%{_GNAT_project_dir}/%{name}+`, -may be a good idea if there are lots of project files in the same package -or if they have generic names. -Otherwise they should usually be placed directly in `+%{_GNAT_project_dir}+`. -The name of the library *MUST* be included -either in the name of each project file -or in the name of the subdirectory where the project files are placed. - -Packages that use GPRinstall in the installation phase -can use the macro +++GPRinstall_flags+++ -to pass the correct pathnames and other parameters to GPRinstall. diff --git a/guidelines/modules/ROOT/pages/Alternatives.adoc b/guidelines/modules/ROOT/pages/Alternatives.adoc deleted file mode 100644 index 31a3a87..0000000 --- a/guidelines/modules/ROOT/pages/Alternatives.adoc +++ /dev/null @@ -1,190 +0,0 @@ -= Alternatives - -:last-reviewed: 2019-04-04 - -Alternatives provide means for parallel installation of packages -which provide the same functionality by maintaining sets of symlinks -(one per package) pointing to alternativized files like this: -`+/path/original-file -> /etc/alternatives/packagename-original-file -> /path/original-file.suffix+` -For more information, see `+update-alternatives(8)+` manpage. - -== Usage within Fedora - -Alternatives *MAY* be used to allow parallel installation of software when: - -* the software can be used as a drop-in replacement -and functions with sufficient similarity -that users and other programs would, within reason, -not need to know which variant is currently installed - -*AND* - -* the selection of the software is only performed system-wide -by the system administrator -and end users do not have a need to switch between the variants. - -Inversely, alternatives *MUST NOT* be used when: - -* The software is not a drop-in replacement. -For instance, if common command line arguments are different -between the two variants, -alternatives *MUST NOT* be used. - -*OR* - -* End users will care which variant they are using. -If a non-root user would gain value by switching between the variants -then alternatives *MUST NOT* be used. - -A good example of using alternatives are the various MTAs -which all provide `+/usr/bin/sendmail+` with similar command line arguments. - -Bad examples of using alternatives include: - -* the various MPI environments where users care -both about which MPI environment they compile against -and which one they run against - -* choice of editor when the user invokes "vi" -where the user will care about feature availability, -compatibility with plugins, etc - -Cases where parallel installation is desirable but alternatives is unsuitable -may be scenarios where -link:../EnvironmentModules/[Environment Modules] -are appropriate. -MPI and python-sphinx (until Fedora 31) -are example packages using environment-modules for this purpose. - -== How to use alternatives - -If a package is using alternatives, -the files which would otherwise conflict MUST be installed -with an appropriate suffix -(for example: `+%{_bindir}/sendmail.postfix+` -instead of `+%{_bindir}/sendmail+`), -the original locations MUST be touched -(for example: `+touch %{_bindir}/sendmail+`), -the links set up by alternatives MUST be listed as %ghost in the file list -and proper Requires: MUST be added, like in the examples below. - -Putting the alternativized files in the file list -ensures that they are owned by respective packages, -which means that commands like: - -* rpm -qf /usr/bin/foo -* dnf install /usr/bin/foo -* repoquery --whatprovides /usr/bin/foo - -all work properly. -Using %ghost for this purpose allows using globs and generated file lists. - -== Examples - -Example from antlr.spec: - -[source, rpm-spec] ----- -Requires(post): %{_bindir}/update-alternatives -Requires(postun): %{_bindir}/update-alternatives -... -%install -... -touch %{buildroot}%{_bindir}/antlr - -%post -update-alternatives --install %{_bindir}/antlr \ - %{name} %{_bindir}/antlr-java 10 - -%postun -if [ $1 -eq 0 ] ; then - update-alternatives --remove %{name} %{_bindir}/antlr-java -fi -... -%files -... -%ghost %{_bindir}/antlr -%{_bindir}/antlr-java ----- - -And a more complex example of alternatives invocation from sendmail.spec, -slightly edited: - -[source, rpm-spec] ----- -Requires(post): %{_bindir}/update-alternatives -Requires(postun): %{_bindir}/update-alternatives -Requires(preun): %{_bindir}/update-alternatives -... -%install -... -# rename files for alternative usage -mv %{buildroot}%{_bindir}/sendmail %{buildroot}%{_bindir}/sendmail.sendmail -touch %{buildroot}%{_bindir}/sendmail -for i in mailq newaliases rmail; do - mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i.sendmail - touch %{buildroot}%{_bindir}/$i -done -mv %{buildroot}%{_mandir}/man1/mailq.1 %{buildroot}%{_mandir}/man1/mailq.sendmail.1 -touch %{buildroot}%{_mandir}/man1/mailq.1 -mv %{buildroot}%{_mandir}/man1/newaliases.1 %{buildroot}%{_mandir}/man1/newaliases.sendmail.1 -touch %{buildroot}%{_mandir}/man1/newaliases.1 -mv %{buildroot}%{_mandir}/man5/aliases.5 %{buildroot}%{_mandir}/man5/aliases.sendmail.5 -touch %{buildroot}%{_mandir}/man5/aliases.5 -mv %{buildroot}%{_mandir}/man8/sendmail.8 %{buildroot}%{_mandir}/man8/sendmail.sendmail.8 -touch %{buildroot}%{_mandir}/man8/sendmail.8 - -%postun -if [ "$1" -ge "1" ]; then - if [ "`readlink %{_sysconfdir}/alternatives/mta`" == "%{_bindir}/sendmail.sendmail" ]; then - %{_bindir}/alternatives --set mta %{_bindir}/sendmail.sendmail - fi -fi - -%post -# Set up the alternatives files for MTAs. -update-alternatives --install %{_bindir}/sendmail mta %{_bindir}/sendmail.sendmail 90 \ - --slave %{_bindir}/mailq mta-mailq %{_bindir}/mailq.sendmail \ - --slave %{_bindir}/newaliases mta-newaliases %{_bindir}/newaliases.sendmail \ - --slave %{_bindir}/rmail mta-rmail %{_bindir}/rmail.sendmail \ - --slave /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.sendmail \ - --slave %{_sysconfdir}/pam.d/smtp mta-pam %{_sysconfdir}/pam.d/smtp.sendmail \ - --slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man8/sendmail.sendmail.8.gz \ - --slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man1/mailq.sendmail.1.gz \ - --slave %{_mandir}/man1/newaliases.1.gz mta-newaliasesman %{_mandir}/man1/newaliases.sendmail.1.gz \ - --slave %{_mandir}/man5/aliases.5.gz mta-aliasesman %{_mandir}/man5/aliases.sendmail.5.gz \ - --initscript sendmail -... - -%preun -if [ $1 = 0 ]; then - update-alternatives --remove mta %{_bindir}/sendmail.sendmail -fi -... - -%files -... -%ghost %{_bindir}/sendmail -%ghost %{_bindir}/mailq -%ghost %{_bindir}/newaliases -%ghost %{_bindir}/rmail -%ghost /usr/lib/sendmail -%ghost %{_sysconfdir}/pam.d/smtp -%ghost %{_mandir}/man8/sendmail.8.gz -%ghost %{_mandir}/man1/mailq.1.gz -%ghost %{_mandir}/man1/newaliases.1.gz -%ghost %{_mandir}/man5/aliases.5.gz - -%{_bindir}/sendmail.sendmail -%{_bindir}/mailq.sendmail -%{_bindir}/newaliases.sendmail -%{_bindir}/rmail.sendmail -/usr/lib/sendmail.sendmail -%config(noreplace) %{_sysconfdir}/pam.d/smtp.sendmail -%{_mandir}/man8/sendmail.sendmail.8.gz -%{_mandir}/man1/mailq.sendmail.1.gz -%{_mandir}/man1/newaliases.sendmail.1.gz -%{_mandir}/man5/aliases.sendmail.5.gz - -%attr(0755,root,root) %{_initrddir}/sendmail ----- diff --git a/guidelines/modules/ROOT/pages/Ansible_collections.adoc b/guidelines/modules/ROOT/pages/Ansible_collections.adoc deleted file mode 100644 index 00d1238..0000000 --- a/guidelines/modules/ROOT/pages/Ansible_collections.adoc +++ /dev/null @@ -1,441 +0,0 @@ -= Ansible Collection Packaging Guidelines -:last-reviewed: 2022-09-25 - -== Forward - -Ansible collections are packaged units of Ansible content, -including modules and other types of plugins. -Most Ansible Plugins are written in Python or Powershell. - -Some collections are also included in Ansible Community's `+ansible+` -collection bundle, which is packaged in Fedora. -All collections, whether or not they are included in the `+ansible+` package, -MAY be packaged in Fedora. - -`+ansible+` depends on `+ansible-core+`, which contains the core engine and -CLI programs (e.g. `+ansible+`, `+ansible-playbook+`). -The `+ansible+` package has a different release cycle than individual collections, -and it may contain older versions of the individual components. -`+ansible+` installs collections in a different namespace and is parallel -installable with individual collections. -The Ansible engine searches for collections in the standalone collections -directory first. - -See https://fedoraproject.org/wiki/Changes/Ansible5[Changes/Ansible5] -for more information about the split between `+ansible+` and `+ansible-core+`. - -== Naming - -Collection packages MUST be named `+ansible-collection-NAMESPACE-NAME+`. -For example, the `+community.general+` collection package is named -`+ansible-collection-community-general+`. - - -== Collection Source - -Collection source code MUST be downloaded from the collection's respective -Git forge/other SCM repository. -While the tarballs published to Ansible Galaxy contain all of the -collection's Python/Powershell source code as well as some development files, -they do not include the `+galaxy.yml+` build configuration -and development files (e.g. unit tests) that the author may choose to remove. -Note that the Ansible Community collection requirements mandate that -collections tag releases in a public SCM repository. - -Collection packages SHOULD use `+%{ansible_collection_url NAMESPACE NAME}+` -as the package's `+URL:+`. -This points to the collection's homepage on Ansible Galaxy. - - -== Dependencies - -=== Buildtime - -Collections MUST have `+BuildRequires: ansible-packaging+`. -`+ansible-packaging+` provides macros and a dependency generator for packaging -Ansible Collections. -It also pulls in `+ansible-core+`, -so `+BuildRequires: ansible-core+` SHOULD NOT be added manually. - -=== Runtime - -The dependency generator will generate the appropriate dependency on the Ansible engine. -This ensures compatibility with Fedora 35 -which contains the classic `+ansible+` 2.9 package (instead of the collections bundle) -and `+ansible-core+`. Both versions of the Ansible engine support collections, -but they are not parallel installable. -Packages MUST NOT manually `+Require+` `+ansible-core+` or `+ansible+`, -unless they are known to require a specific version, -in which case the appropriate version constraints should be used. - -The dependency generator also handles inter-collection dependencies. - -==== External dependencies of plugins - -Ansible collections may contain various plugins that have -various external dependencies. -The Ansible dev guide -https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_best_practices.html#importing-and-using-shared-code[mandates] -that plugins fail cleanly if these dependencies are not installed. -Many times, external dependencies are only needed for a small subset of the -collection which may or may not be widely used. -Therefore, collection packages SHOULD weakly depend on these external libraries, -i.e. use Recommends instead of Requires. - -Module dependencies are only needed on the target node not the controller node. -Therefore, collection packages SHOULD NOT depend on these dependencies at all, -weakly or strongly. -Users are responsible for installing these dependencies on the target host. -Modules that are intended to be used with `+delegate_to: localhost+` are an -exception to this rule. - -The situation is a bit different for controller plugins, such as -filter plugins, lookup plugins, connection plugins, or inventory plugins. -Collections MAY add `+Recommends+` for dependencies of controller plugins. -However, packagers should use discretion when adding any type of dependency -and only do so when it is required for -the central functionality of the collection. -For instance, it makes sense for `+ansible-collection-community-docker+` -to Recommend `+python3-docker+`, -but it doesn't make sense for the larger, more general -ansible-collection-community-general collection to Recommend `+python3-redis+` -for the `+redis+` lookup plugin. -This guideline seeks to prevent ballooning collection packages. -`+ansible-core+` and `+ansible+` follow this same principle. - - -== Build and Installation - -To build the collection artifact, -packages MUST use `+%ansible_collection_build+` in `+%build+`. -`+%ansible_collection_install+` MUST be used in `+%install+` to install the -artifact. - -Packagers SHOULD use `+%files -f %{ansible_collection_filelist}+` to install -the collection. -The `+%{ansible_collection_filelist}+` is populated by `+%ansible_collection_install+`. - -== Unit Tests - -As per xref:index.adoc#_test_suites[the general Fedora Packaging Guidelines], -collection packages SHOULD run upstream unit tests in `+%check+` if practical. -Integration tests are impossible to run in the RPM build environment. -In order to run unit tests, collections MUST `+BuildRequire+` -`+ansible-packaging-tests+`, which pulls in the necessary dependencies. -Some collections have other testing dependencies, -which are usually specified in `+tests/unit/requirements.txt+`. -These have to be added manually. -The `+%ansible_test_unit+` macro MUST be used to run tests. - -[NOTE] -.EPEL Compatibility -==== -It is currently impossible to run unit tests on EPEL 8 and 9. - -ansible-core in RHEL 8 and 9 are built against alternative python stacks for -which the necessary test dependencies are not available. - -The rest of these guidelines are applicable to EPEL 8 and 9, -and `+ansible-packaging+` itself is available there. -==== - -== Unnecessary Files - -By default, collections ship with all of the files in the repository root, -unless they are manually excluded. -Therefore, many collections contain development files that are unwanted by users. - -Packagers SHOULD exclude these files, which SHOULD be done by patching the -collection's `+galaxy.yml+` to add these files to the `+build_ignore+` -configuration. -These files SHOULD NOT be removed with `+rm+`. -See the https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html#collection-galaxy-metadata-structure[Ansible documentation] -for more information on the `+galaxy.yml+` syntax. - -Common development files include: - -* The `+tests+` directory containing unit and integration tests -* SCM configuration such as `+.gitignore+` and `+.keep+` files -* The `+.azure-pipelines+` and `+.github+` directories that contain CI configuration - -These files often have to be removed downstream, as there are some unresolved -issues with pushing these changes to upstream community collections. These -issues are irrelevant in the Fedora context. - -== Shebangs - -Ansible plugins are not executable. However, many of them have `+#!/usr/bin/python+` -shebangs for legacy reasons. -These shebangs MUST be removed for the following reasons: - -1. Non-executable files shouldn't have shebangs -2. Keeping the shebangs results in an unnecessary dependency -on `+python-unversioned-command+`. - -`+%py3_shebang_fix+` MUST NOT be used, as it will break compatibility -with certain Ansible target nodes. -It won't fix the non-executable file issue, either. - -Shebangs can be removed with: - -[source,bash] ----- -find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' + ----- - - -== Documentation and License Files - -License files and documentation for collections are installed to the -collection's directory in `+/usr/share/ansible+`, by default. -Packagers MAY choose to either -mark the license and documentation files in this directory with `+%license+` -and `+%doc+` -or to add the correct paths to `+build_ignore+` in `+galaxy.yml+` and -install them into the standard directories. -Avoid duplicating these files in both places. - -Note that some multi-licensed collections store licenses in a `+LICENSES+` -directory. This whole directory MUST be marked with `+%license+`. - -Refer to the xref:legal::index.adoc[Legal docs] for the rules about -allowed licenses and determining the `+License:+` field. - - -== Example Specfile - -[source,rpm-spec] ----- -# Only run tests where the dependencies are available -%if %{defined fedora} -%bcond_without tests -%else -%bcond_with tests -%endif - -Name: ansible-collection-community-rabbitmq -Version: 1.2.2 -Release: 1%{?dist} -Summary: RabbitMQ collection for Ansible - -# plugins/module_utils/_version.py: Python Software Foundation License version 2 -License: GPL-3.0-or-later and PSF-2.0 -URL: %{ansible_collection_url community rabbitmq} -%global forgeurl https://github.com/ansible-collections/community.rabbitmq -Source0: %{forgeurl}/archive/%{version}/%{name}-%{version}.tar.gz -# Patch galaxy.yml to exclude unnecessary files from the built collection. -# This is a downstream only patch. -Patch0: build_ignore.patch - -BuildRequires: ansible-packaging -%if %{with tests} -BuildRequires: ansible-packaging-tests -# Collection specific test dependency -BuildRequires: glibc-all-langpacks -%endif - -BuildArch: noarch - -%description -%{summary}. - - -%prep -%autosetup -n community.rabbitmq-%{version} -p1 -find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' + - - -%build -%ansible_collection_build - - -%install -%ansible_collection_install - - -%if %{with tests} -%check -%ansible_test_unit -%endif - - -%files -f %{ansible_collection_filelist} -%license COPYING PSF-license.txt -%doc README.md CHANGELOG.rst - -%changelog ----- - -build_ignore.patch: - -[source, patch] ----- -diff --git a/galaxy.yml b/galaxy.yml -index 0b37162..acd029a 100644 ---- a/galaxy.yml -+++ b/galaxy.yml -@@ -13,3 +13,13 @@ repository: https://github.com/ansible-collections/community.rabbitmq - documentation: https://docs.ansible.com/ansible/latest/collections/community/rabbitmq/ - homepage: https://github.com/ansible-collections/community.rabbitmq - issues: https://github.com/ansible-collections/community.rabbitmq/issues -+build_ignore: -+ # Remove unnecessary development files from the built package. -+ - tests -+ - .azure-pipelines -+ - .gitignore -+ # Licenses and docs are installed with %%doc and %%license -+ - PSF-license.txt -+ - COPYING -+ - README.md -+ - CHANGELOG.rst ----- - - -== Macro Breakdown - -Here is a short breakdown of exactly what each macro included in -`+ansible-packaging+` does. - - -[#ansible_collection_url] -=== `+%ansible_collection_url+` - -*Usage:* - -[source,rpm-spec] ----- -URL: %{ansible_collection_url NAMESPACE NAME} ----- - -This macro points to a collection's Ansible Galaxy page. -It is intended to be used for the `+URL:+` tag in the specfile preamble. -It takes the collection namespace and collection name as arguments. - -If no arguments are passed to this macro, it falls back to the values -of `+%{collection_namespace}+` and `+%{collection_name}+` if they are set in the specfile. -New packages SHOULD explicitly pass the namespace and name as arguments. -The fallback may be removed in the future. -See the link:#legacy_macros[Legacy Macros] section for more information. - - -[#ansible_collection_build] - -=== `+%ansible_collection_build+` - -*Usage:* - -[source,rpm-spec] ----- -%build -%ansible_collection_build ----- - -This macro simply runs `+ansible-galaxy collection build+`. - - -[#ansible_collection_install] -=== `+%ansible_collection_install+` - -*Usage:* - -[source,rpm-spec] ----- -%install -%ansible_collection_install ----- - -This macro pulls out the collection namespace, name, and version from `+galaxy.yml+` -and then uses it to run `+ansible-galaxy collection install+`. -After that, it writes out `+%{ansible_collection_filelist}+` based on the -metadata it previously extracted - - -[#ansible_test_unit] -=== `+%ansible_test_unit+` - -*Usage:* - -[source,rpm-spec] ----- -%check -%ansible_test_unit ----- -This macro parses galaxy.yml to determine the collection namespace and name -that's needed to create the directory structure that ansible-test expects. -After creating a temporary build directory with the needed structure, the -script runs ansible-test units with the provided arguments. - - -[#ansible_collection_filelist] -=== `+%{ansible_collection_filelist}+` - -*Usage:* - -[source,rpm-spec] ----- -%files -f %{ansible_collection_filelist} -%doc ... -%license ... ----- - -This macro points a file list that's written out by `+%ansible_collection_install+`. -Currently, it only contains a single entry to own the collection's entire -directory in `+%{ansible_collections_dir}+` - - -[#ansible_collections_dir] - -This macro expands to `+%{_datadir}/ansible/collections/ansible_collections+`. -It is used internally by the other macros. -Packagers are expected to use `+%ansible_collection_install+` and -`+%ansible_collection_filelist+` instead of directly referencing this directory. - -[#legacy_macros] -=== Legacy macros - -[#collection_namespace] -==== `+%{collection_namepsace}+` -*Usage:* - -[source,rpm-spec] ----- -%global collection_namespace NAMESPACE ----- - -The ansible-packaging macros previously required -packagers to manually set `+%collection_namespace+` in specfiles. -Now, the macros extract the collection namespace from the `galaxy.yml`. - - -[#collection_name] -==== `+%{collection_name}+` - -*Usage:* - -[source,rpm-spec] ----- -%global collection_name NAME ----- - -The ansible-packaging macros previously required -packagers to manually set `+%collection_name+` in specfiles. -Now, the macros extract the collection name from the `galaxy.yml`. - - -[#ansible_collection_files] -==== `+%{ansible_collection_files}+` - -*Usage:* - -[source,rpm-spec] ----- -%files -%doc ... -%license ... -%{ansible_collection_files} ----- - -New specfiles should use `+%files -f %{ansible_collection_filelist}+` instead -of this macro. -`+%{ansible_collection_files}+` requires setting -`+%collection_namespace+` and `+%collection_name+`. diff --git a/guidelines/modules/ROOT/pages/AppData.adoc b/guidelines/modules/ROOT/pages/AppData.adoc deleted file mode 100644 index 18da9d9..0000000 --- a/guidelines/modules/ROOT/pages/AppData.adoc +++ /dev/null @@ -1,75 +0,0 @@ -= Packaging Guidelines for AppData Files -:last-reviewed: 2021-01-18 - -If a package contains a GUI application, -then it SHOULD install a `+.metainfo.xml+` file -into `+%{_metainfodir}+`. -Installed `+.metainfo.xml+` files MUST follow -the https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps[AppStream specification page]. - -If a package contains an add-on for GUI application, -then it SHOULD install a `+.metainfo.xml+` file -into `+%{_metainfodir}+`. -Installed `+.metainfo.xml+` files MUST follow -the https://www.freedesktop.org/software/appstream/docs/sect-Quickstart-Addons.html[AppStream add-ons specification]. - -The AppData files MUST correctly validate using -`+appstream-util validate-relax+`. - -.appdata.xml files -NOTE: For historical reasons, AppStream specification also allows using -extension `+.appdata.xml+` for GUI applications. If upstream provides metadata -with `+.appdata.xml+` extension, it MAY be used instead of `+.metainfo.xml+`. - -== .metainfo.xml file creation - -If the package doesn't already include and install -its own `+.metainfo.xml+` file, -you can make your own and send it upstream. -Some benefits of sending the file upstream are that -upstream can translate the file using -the existing translation resources -and can also modify the screenshots and descriptions -as the application changes over time. - -You may include an `+.metainfo.xml+` file you create -as a Source: (e.g. `+Source3: %{name}.metainfo.xml+`) -or generate it in the spec file. - -Here are the contents of a sample application `+.metainfo.xml+` file -(comical.metainfo.xml): - -[source,xml] ----- -include::{examplesdir}/app.metainfo.xml[] ----- - -Application's AppData file MUST be named with the same root as the .desktop file, -so if the .desktop file is named `+org.gnome.SomeApp.desktop+` -then the AppData file MUST be called `+org.gnome.SomeApp.metainfo.xml+`. - -Here are the contents of a sample addon `+.metainfo.xml+` file -(gedit-bookmarks.metainfo.xml): - -[source,xml] -.... -include::{examplesdir}/addon.metainfo.xml[] -.... - -You can use anything as the `++` -but it needs to be unique and sensible -and also match the `+.metainfo.xml+` filename prefix. - -== app-data-validate usage - -Although you can just include the .metainfo.xml file in the package, -you MUST run `+appstream-util validate-relax+` -(in `+%check+` or `+%install+`) -and have `+BuildRequires: libappstream-glib+`, -to help ensure the validity and safety -of the appdata files you're installing. -An example: - -.... -appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml -.... diff --git a/guidelines/modules/ROOT/pages/AutoProvidesAndRequiresFiltering.adoc b/guidelines/modules/ROOT/pages/AutoProvidesAndRequiresFiltering.adoc deleted file mode 100644 index 4762293..0000000 --- a/guidelines/modules/ROOT/pages/AutoProvidesAndRequiresFiltering.adoc +++ /dev/null @@ -1,268 +0,0 @@ -= Automatic Filtering of Provides and Requires - -:last-reviewed: 2019-04-04 - -== Summary - -The auto requires and provides system contained in RPM is quite useful; -however, it sometimes picks up "private" package capabilities -that shouldn't be advertised as global, -things that are "just wrong", -or things prohibited by policy (e.g. deps from inside `+%{_docdir}+`). - -For example: - -* Various "plugin" packages (e.g. Pidgin, Perl, Apache, KDE) -are marked as "providing" private shared libraries outside the system path. -* Files in `+%{_docdir}+` are routinely scanned, -and can trigger prov/req when this is explicitly forbidden by policy. - -This Guideline describes how to filter provides and requires on Fedora. - -* *MUST:* Packages must not provide RPM dependency information -when that information is not global in nature, -or are otherwise handled (e.g. through a virtual provides system). -e.g. a plugin package containing a binary shared library -must not "provide" that library -unless it is accessible through the system library paths. -* *MUST:* When filtering automatically generated RPM dependency information, -the filtering system implemented by Fedora must be used, -except where there is a compelling reason to deviate from it. - -== Usage - -=== Location of macro invocation - -It's strongly recommended -that these filtering macros be invoked before `+%description+`, -but after any other definitions. -This will keep them in a consistent place across packages, -and help prevent them from being mixed up with other sections. - -=== Regular Expression Variant - -These filters use regular expressions. -The regular expression variant used for these filters -follows the `POSIX.2` regular expression standard -(see the `+regex(7)+` manpage). -In this variant, -the literal characters `pass:c[^.[$()|*+?{]` need to be backslash escaped. -Because rpm interprets backslashes as part of its parsing of spec files, -you will need to use a *double backslash* for any escapes. -A literal backslash (`+\+`) is represented by four backslashes. - -The regex engine is only passed the final string, after RPM macro expansion. -So you can't use unescaped data via RPM macros. -For instance, if you generate a list of files to match in a macro -and that list contains `+libfoo.so+` -you'll have to use `+libfoo\\.so+` to escape the "pass:q[`.`]". -Example: - -[source, rpm-spec] ----- -%global to_exclude libfoo\\.so -%global __requires_exclude_from ^%{_datadir}/%{to_exclude}$ ----- - -=== Preventing files/directories from being scanned for deps (pre-scan filtering) - -The macros `+%__requires_exclude_from+` and `+%__provides_exclude_from+` -can be defined in a spec file to keep the dependency generator -from scanning specific files or directories for deps. -These macros should be defined with a regular expression -that matches all of the directories or files. -For instance: - -[source, rpm-spec] ----- -# Do not check any files in docdir for requires -%global __requires_exclude_from ^%{_docdir}/.*$ - -# Do not check .so files in an application-specific library directory -# or any files in the application's data directory for provides -%global __provides_exclude_from ^(%{_libdir}/%{name}/.*\\.so.*|%{_datadir}/myapp/.*)$ ----- - -Note that this macro replaces the `+%filter_provides_in+` macro -from the old filtering guidelines but it does not do the same thing. -In particular: - -* The old macro could be invoked multiple times. -This one will only use the regex defined last. - -* The old macro advised against anchoring the beginning of the regex -(Using `+^+`). -This macro recommends anchoring -as it doesn't suffer from the compatibility problems of the old one. -* With the old macro it was common to specify a directory name -to match everything in a directory recursively. -With the new macro you may need to specify `+.*+` -because you should be anchoring your regular expressions. - -=== Filtering provides and requires after scanning - -In addition to preventing RPM from scanning -files and directories for automatic dependency generation -you can also tell RPM to discard a discovered dependency -before it records the dependency in the RPM metadata. -Use `+__requires_exclude+` and `+__provides_exclude+` for this. -These macros should be defined as regular expressions. -If an entry that RPM's automatic dependency generator created -matches the regular expression -then it will be filtered out of the requires or provides. -For example: - -[source, rpm-spec] ----- -# This might be useful if plugins are being picked up by the dependency generator -%global __provides_exclude ^libfoo-plugin\\.so.*$ - -# Something like this could be used to prevent excess deps from an -# example python script in %doc -%global __requires_exclude ^/usr/bin/python$ ----- - -These macros serves a similar purpose to the old -`+%filter_from_provides+` macro -but it has a different implementation. -In particular, -that macro took sed expressions whereas this one needs a regular expression. - -=== Simplified macros for common cases - -In some cases, the filtering of extraneous `+Provides:+` -is fairly generic to all packages which provide similar things. -There are simple macros that setup filters correctly -for those cases so that you can do the filtering with one line. -If you need to filter a bit more than the simple macro provides, -you still have the option to use the macros listed above. - -==== Perl - -Perl extension modules can be filtered using this macro: - -[source, rpm-spec] ----- -%{?perl_default_filter} ----- - -Essentially, this filters dependencies arising from `+%doc+` files, -from non-Linux-related modules, -and from errors in the automatic dependency generator. - -If you want to use both custom filters and `+%perl_default_filter+` -then define your filters first and call `+%perl_default_filter+` afterwards. -The default filter macro will preserve the filters you previously defined. -For example: - -[source, rpm-spec] ----- -# Filter all provides from some directory -%global __provides_exclude_from %{_libexecdir}/autoinst -# Filter some specific requires by name -%global __requires_exclude ^perl\\((autotest|basetest) -# All of the default filters -%{?perl_default_filter} ----- - -== Examples - -=== Pidgin plugin package - -On a x86_64 machine, -the pidgin-libnotify provides `+pidgin-libnotify.so()(64bit)+` -which it shouldn't as this library is not inside the paths -searched by the system for libraries. -It's a private, not global, "provides" -and as such must not be exposed globally by RPM. - -To filter this out, we could use: - -[source, rpm-spec] ----- -%global __provides_exclude_from ^%{_libdir}/purple-2/.*\\.so$ ----- - -=== Private Libraries - -At this time, filtering of private libraries is non-trivial. -This is because the symbols you want to filter from the private libraries -are usually required by the public applications that the package ships. -In order to filter, -you need to find out what symbols RPM is extracting for the private library -and then remove those in both -`+%__provides_exclude+` and `+%__requires_exclude+`. - -As an example, pretend you are packaging an application foo that creates -`+%{_libdir}/foo/libprivate.so+` -that you want to filter and -`+%{_bindir}/foobar+` -that requires that private library. -You could: - -* First build the RPM: `+$ rpmbuild -ba foo.spec+` -* then determine what provides rpm decided for the private library: -`+$ rpm -qp foo-1.0-1.x86_64.rpm+`: - -.... -libprivate.so()(64bit) -foo = 1.0-1.fc19 -foo(x86-64) = 1.0-1.fc19 -.... - -* See that `+libprivate.so()(64bit)+` -appears to be the only symbol that RPM extracted for this package. -Note that on 32bit, the provides will be `+libprivate.so+` -so your regex needs to capture both. -+ -* Add the excludes to the spec file for both requires and provides: - -[source, rpm-spec] ----- -[...] -%global _privatelibs libprivate[.]so.* -%global __provides_exclude ^(%{_privatelibs})$ -%global __requires_exclude ^(%{_privatelibs})$ -[...] ----- - -You can take a look at a -https://lists.fedoraproject.org/pipermail/devel/2012-June/169190.html[more complex example] -on the mailing list. -This can be a pain to maintain -if the upstream changes the names of its private libraries -but it is the only way to deal with this at present. -There may be a better means in -https://lists.osuosl.org/pipermail/rpm-maint/2013-January/003349.html[the future] -but there are no solid plans on when those might be coded as of yet.. - -=== Arch-specific extensions to scripting languages - -e.g. to ensure an arch-specific `perl-*` package won't provide -or require things that it shouldn't, -we could use an invocation as such: - -[source, rpm-spec] ----- -# we don't want to provide private Perl extension libs -%{?perl_default_filter} ----- - -=== `+%{_docdir}+` filtering - -By policy, nothing under `+%{_docdir}+` is allowed -to either "provide" or "require" anything. -We can prevent this from happening -by preventing anything under `+%{_docdir}+` from being scanned: - -[source, rpm-spec] ----- -# we don't want to either provide or require anything from _docdir, per policy -%global __provides_exclude_from ^%{_docdir}/.*$ -%global __requires_exclude_from ^%{_docdir}/.*$ ----- - -== Additional Information - -Additional information about RPM's dependency generator can be found here: -https://rpm-software-management.github.io/rpm/manual/dependency_generators.html diff --git a/guidelines/modules/ROOT/pages/BLAS_LAPACK.adoc b/guidelines/modules/ROOT/pages/BLAS_LAPACK.adoc deleted file mode 100644 index 3ea9c28..0000000 --- a/guidelines/modules/ROOT/pages/BLAS_LAPACK.adoc +++ /dev/null @@ -1,157 +0,0 @@ -= Linear Algebra Libraries - -== Introduction - -BLAS (Basic Linear Algebra Subprograms) and LAPACK (Linear Algebra PACKage) -are routines that provide standard building blocks for performing a wide range of linear algebra operations. -There are stable reference implementations from https://netlib.org/[Netlib] written in Fortran, -with C interfaces available (called CBLAS and LAPACKE respectively), -as well as several optimized implementations providing fast subsets of these APIs. - -=== Available implementations - -* `blas`, `lapack` - Netlib's reference implementation of the Fortran and C interfaces. -* `atlas` - Automatically Tuned Linear Algebra Software. -* `blis` - BLAS-like Library Instantiation Software framework. -* `openblas` - OpenBLAS, an optimized BLAS based on GotoBLAS2. - -ATLAS, BLIS and OpenBLAS provide BLAS and a subset of LAPACK. -Both BLIS and OpenBLAS provide several flavors: -a sequential version, a threaded one, and another with OpenMP support -(all of them with or without support for 64-bit integers). - -Due to implementation differences, it is important that all components of a particular software stack link to the same BLAS/LAPACK implementation. -Also, users may want to choose a particular implementation that works best for them at run time. -This guideline gives a structure that can enforce the first while allowing the second, -as well as providing a transparent fallback mechanism to Netlib's reference implementation for those symbols not included in the selected backend -via https://www.mpi-magdeburg.mpg.de/projects/flexiblas[FlexiBLAS]. - -=== BLAS/LAPACK wrapper - -https://www.mpi-magdeburg.mpg.de/projects/flexiblas[FlexiBLAS] -is a framework that wraps both BLAS and LAPACK APIs in a single library. -BLAS/LAPACK consumers must link against FlexiBLAS, -and this wrapper is able to redirect calls to a selected optimized backend with negligible overhead. -It also provides transparent fallback to Netlib's reference implementation if a certain symbol is not present in the selected backend. -These are the main features: - -* Provides a 100% BLAS and LAPACK compatible ABI/API, with interfaces for both 32- and 64-bit integers. -* Runtime exchangeable BLAS and LAPACK backend without recompilation via an environment variable. -* Integration of user-owned BLAS libraries without administrator privileges, even in system-wide installed programs. -* Works with OpenBLAS, ATLAS and BLIS, as well as non-free alternatives such as Intel MKL, ACML... -* Flexible per-system/user/host configuration files. -* Basic profiling support. - -[NOTE] -==== -Fedora ships `openblas-openmp` as the system-wide default backend. -==== - -== Packaging BLAS/LAPACK dependent packages - -Consumers of any subset of BLAS and/or LAPACK MUST compile against FlexiBLAS (unless not supported; see below). - -[NOTE] -==== -.Exceptions -* Although support for LAPACKE is planned, the few packages using this interface are not yet supported by FlexiBLAS as of v3.1.2. - These packages MUST link against OpenBLAS instead, or `lapack` if the routines used are not supported by this backend. - Current exceptions of this type include `opencv`, `scamp` and `sextractor`. -* On rare occasions, a package may use an exceptional feature present in a particular backend - and cannot be adapted to FlexiBLAS by any means. - In such cases, the package MUST link against this backend. - Current exceptions of this type include `julia` (linked against OpenBLAS) and `psfex` (linked against ATLAS). -==== - -=== Build requirements - -First, only FlexiBLAS's development package MUST be listed in `BuildRequires`: - -.... -BuildRequires: flexiblas-devel -.... - -which brings all the necessary development files, -both for the 32-bit (the most common) and the 64-bit integer interface. - -[IMPORTANT] -==== -If the package *only* supports the interface for 64-bit integers, -then 32-bit architectures MUST be excluded -(see xref:index.adoc#_arch_specific_runtime_and_build_time_dependencies[Arch-Specific Runtime and Build-Time Dependencies]). -==== - -=== Configuration - -The packager MUST specify `flexiblas` or `flexiblas64` -(for the 32-bit or 64-bit interface respectively) -as both the BLAS and LAPACK library names where applicable, -and packages using `pkg-config` will automatically obtain the proper flags for the headers and libraries. -Similarly, CMake-based projects using `FindBLAS` will automatically detect -and configure the proper flags for FlexiBLAS (since CMake v3.19), -and no further action will be required from the packager. - -Unfortunately, many upstream projects present heterogeneous ways of accessing these APIs. -In a best-case scenario, the building framework may define specific options to explicitly set the BLAS and/or LAPACK libraries. -More commonly, the packager MUST ensure that `+%{_includedir}/flexiblas+` and `+%{_libdir}/flexiblas+` -(or `+%{_includedir}/flexiblas64+` and `+%{_libdir}/flexiblas64+`) -are injected as header and library locations in the proper flags and configuration files, -and/or `-lflexiblas` (or `-lflexiblas64`) is provided to the linker. -In rare occasions, hardcoded paths in source files MUST be modified, and patches MAY be required. -The packager SHOULD work with upstream to standardize the way in which these libraries are detected and configured. - -[IMPORTANT] -==== -To ensure that the program has been properly linked against FlexiBLAS, -the packager MUST check that the `Requires` are correct, -i.e., `libflexiblas` is listed, but not `libblas`, `liblapack` or any other backend. -==== - -=== Tests - -Optimized BLAS/LAPACK backends are much faster than Netlib's reference implementation, -but in return results may vary a little. -Consequently, tests that are too tight (with too small tolerances) may fail. -In these cases, the packager SHOULD enable the reference implementation in the `%check` section as follows: - -.... -export FLEXIBLAS=netlib -.... - -or, alternatively, via `FLEXIBLAS64` for builds using 64-bit integers. - -== Backend selection - -=== System-level selection - -A package compiled against FlexiBLAS pulls out the corresponding `flexiblas-netlib(64)` subpackage, -which in turn requires the default optimized backend (i.e., `flexiblas-openblas-openmp(64)`). -This is set via the "default=IMPLEMENTATION-NAME" key (by default, `default=openblas-openmp`), -present in the main configuration file shipped in the main subpackages, -`+%{_sysconfdir}/flexiblasrc+` and `+%{_sysconfdir}/flexiblas64rc+`. - -To allow system-level selection of other BLAS/LAPACK implementations, -more backends must be installed in the first place (e.g., flexiblas-atlas, flexiblas-blis-serial...), -and then they can be swapped system-wide via the `flexiblas` CLI tool, -or just by modifying the "default" key in the configuration file by hand. - -=== User-level selection - -Persistent user-level selection of system-provided BLAS/LAPACK implementations can be done via the CLI tool: - -.... -$ flexiblas set IMPLEMENTATION-NAME -$ flexiblas64 set IMPLEMENTATION-NAME -.... - -provided the sub-package for `IMPLEMENTATION-NAME` is installed. - -Non-persistent user-level selection can be triggered via an environment variable: - -.... -$ FLEXIBLAS=IMPLEMENTATION-NAME ./yourapp -$ FLEXIBLAS64=IMPLEMENTATION-NAME ./yourapp64 -.... - -User-level selection of user-owned BLAS/LAPACK libraries can be achieved just by changing `IMPLEMENTATION-NAME` -with a path to any custom BLAS/LAPACK-compatible library in the examples above. diff --git a/guidelines/modules/ROOT/pages/CMake.adoc b/guidelines/modules/ROOT/pages/CMake.adoc deleted file mode 100644 index 8bbacb6..0000000 --- a/guidelines/modules/ROOT/pages/CMake.adoc +++ /dev/null @@ -1,113 +0,0 @@ -:last-reviewed: 2020-07-18 - -= CMake Packaging Guidelines - -This document provides best practices for the usage of -https://cmake.org/[the CMake build system] -in Fedora packages. - -== Build Dependencies - -You *MUST* add following BuildRequires: - -[source, rpm-spec] ----- -BuildRequires: cmake ----- - -== Available Macros - -You will generally make use of these in your specs: - -`+%cmake+`:: -Defines CFLAGS, LDFLAGS, etc. and calls `+%__cmake+` -with appropriate parameters -(`+-DCMAKE_INSTALL_PREFIX:PATH=/usr+` and such). -You can pass `+-Doption=value+` to this macro -in order to set options for the buildsystem. - -`+%cmake_build+`:: -Builds the project (using `+%__cmake --build+`). - -`+%cmake_install+`:: -Installs the built project (using `+%__cmake --install+`). - -`+%ctest+`:: -Runs the tests that are defined with `+add_test()+` -in project (using `+%__ctest+`). - -When packaging KDE software, -you most likely would replace `+%cmake+` with either `+%cmake_kf5+` -or `+%cmake_kf6+`. For more information, see xref:KDEPackaging.adoc[KDE Packaging Guidelines]. - -It is rarely necessary (but permissible) to use or alter these: - -NOTE: All macros starting with double underscore is meant to be private, -NOT stable and likely to be removed in the future. - -`+%__cmake+`:: -The path to the cmake executable. - -`+%__ctest+`:: -The path to the ctest executable. - -`+%__cmake_in_source_build+`:: -Controls whether builds are done -https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds[out-of-source] -(when undefined, the default) -or in-source (when defined). -Whenever possible, using out-of-source builds is advised, -as this is the direction both Fedora and CMake upstream are moving. - -`+%__cmake_builddir+`:: -Holds the location of the actual directory where the build was made. -When making out-of-source builds, -this macro is the same as xref:vpath.adoc[%_vpath_builddir]. -When doing in-source builds, -this macro will hold the actual location that was used for the build. -+ -WARNING: This macro is suitable only for rare compatibility reasons. -For normal out-of-source builds, this macro is the same as `+%_vpath_builddir+`. -It may be removed in the future. - -== Example Usage - -[source, rpm-spec] ----- -%conf -%cmake - -%build -%cmake_build - -%install -%cmake_install - -%check -%ctest ----- - -*NOTE:* If building for < EPEL 10 then `%cmake` should be in `%build`. - -== Notes - -`+-DCMAKE_SKIP_RPATH:BOOL=ON+`. -With recent cmake-2.4, it should not be used. -This CMake version should handle RPATHs issues correctly -(set them in build-dir, remove them during installation). -Setting `+CMAKE_SKIP_RPATH+` for this version -would avoid RPATHs in build-dir too. -This might link binaries against system-libraries -(e.g. when a previous version of the package was installed) -instead of the libraries which were created by the build. - -Nevertheless, RPATH issues might arise when CMake was used improperly. -For example, installing a target with `+INSTALL(FILES ... RENAME ...)+` -will *not* strip rpaths; -in this case `+INSTALL(TARGETS ...)+` must be used -in combination with changing the `+OUTPUT_NAME+` property. - -CMake has good documentation in two places: - -* https://cmake.org/documentation/ -* https://gitlab.kitware.com/cmake/community/wikis/Home diff --git a/guidelines/modules/ROOT/pages/C_and_C++.adoc b/guidelines/modules/ROOT/pages/C_and_C++.adoc deleted file mode 100644 index 8af3669..0000000 --- a/guidelines/modules/ROOT/pages/C_and_C++.adoc +++ /dev/null @@ -1,180 +0,0 @@ -= C and C++ Packaging Guidelines -// https://github.com/asciidoctor/asciidoctor/commit/426d8389aa1706a589b66c96801542f587ae6b61 -:pp: ++ - -== Introduction - -The C and {cpp} languages and runtimes -are one of the most common development frameworks for packages in fedora. -As such there is a wide variety of quality, style, and convention -in all of those packages. -The follow document provides best practice -for certain aspects of C and {cpp} packaging. - -== Packaging - -=== BuildRequires and Requires - -If your application is a C or {cpp} application -you must list a `BuildRequires` against `gcc`, `gcc-c{pp}` or `clang`. -Those packages will include everything that is required -to build a standards conforming C or {cpp} application. - -If your library includes standard C or {cpp} headers, -you must list `BuildRequires` against `gcc`, `gcc-c{pp}`, or `clang` -to install the needed standards conforming headers. - -If at runtime you use `cpp` to process C or {cpp} language headers -then you have no choice but to use `Requires` for `gcc`, `gcc-c{pp}`, or `clang` -to install the required headers -for a standard conforming C or {cpp} application. -In the future this might change -if a set of standard C or {cpp} language headers are provided -by a special-purpose provides e.g. `c-headers` or `c{pp}-headers`. - -You need not include a `BuildRequires` or `Requires` on `glibc-headers`, -or any other core C or {cpp} implementation package -unless you have a specific and special need -e.g. static compilation requires the `.*-static` library packages -e.g. `BuildRequires: glibc-static`. -The default use case of a dynamically compiled C or {cpp} application -is taken care of by the `gcc`, `gcc-c{pp}`, and `clang` packages. - -Please refer to xref:index.adoc#compiler[Compiler Guidelines] -for the list of supported compilers for C and {cpp} compilers. - -=== Packaging Q&A - -[qanda] -Do I need a `Requires: glibc` to ensure I have the C runtime installed for my application?:: -No. -RPM will automatically determine what ELF libraries you need -based on the binaries in your package. -This is sufficient to cause glibc to be installed. - -Do I need to include a `Requires: libgcc`?:: -If you are using an API from `libgcc` directly, -then yes, you must have a `Requires: libgcc`. -In general though `glibc` requires `libgcc`, so it is always installed. - -== Libraries - -Libraries should have unique shared object names -(SONAMEs via `-Wl,-soname=libfoo.so`) -that do not conflict with other library SONAMEs used in the distribution. -For example there should be only one `libfoo.so` in the distribution. -The exception is when there are multiple implementations of the same library -`libfoo.so` provided by different authors and each conflicts with the other. -In this case both `libfoo.so` must provide exactly the same interface, -but with a different implementation. -Having two `libfoo.so` each with a different API is bad practice -and makes it harder to package and distribute those packages. - -== Versioned Symbols - -Without versioned symbols, RPM will generate a dependency expression -naming the library but without a version, effectively setting -"$Major.0.0" as the minimum version. Versioned symbols provide the -information required to ensure that libraries are actually new enough -to run the software that links to them. - -Examine the capabilities provided by the binary rpm: -`rpm -qp --provides `. A package with shared libraries will -list the library as `libc.so.6()(64bit)` and if the library provides -versioned symbols it will also list the library with versions as -`libm.so.6(GLIBC_2.41)(64bit)`. - -Package maintainers are encouraged to work with upstream projects to -add versioned symbols to libraries that do not include them yet. - -Adding symbol versions is simple for the majority of libraries, -initially requiring only a symbol map and one additional argument to -the linker during the build process. - -``` -generate_initial_map.sh: -#!/bin/sh -echo "# Avoid modifying a symbol set after it has been released" -echo "# When adding features in a new release, add a new set" -echo "# Removing features is a breaking change" -echo "$2 {" -echo " global:" -objdump -T $1 | \ - grep -F .text | \ - awk '{print $7;}' | \ - c++filt | \ - awk '/[() ]/ {print " \"" $0 "\";";} \ - !/[() ]/ {print " " $0 ";";}' | \ - sort -echo "}" -``` - -Run `generate_initial_map.sh /path/to/library.so.1 _` to -generate a map file. - -=== Adding version-script to Automake - -The GNU Portability Library link:https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html[manual] -includes examples of using version-script in automake. In Makefile.am: - -``` -if HAVE_LD_VERSION_SCRIPT -libfoo_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libfoo.map -endif -``` - -=== Adding version-script to CMake - -The BSD-3-Clause licensed link:https://github.com/protocolbuffers/protobuf[protobuf] -project includes examples of using version-script in CMake. - -In CMakeLists.txt, check the linker for support: - -``` -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmaketest.map -"{ - global: - main; - local: - *; -};") -# CheckLinkerFlag module available in CMake >=3.18. -if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18) - include(CheckLinkerFlag) - check_linker_flag(CXX -Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/cmaketest.map project_HAVE_LD_VERSION_SCRIPT) -endif() -file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/cmaketest.map) -``` - -And, where the library is defined: - -``` -if(project_HAVE_LD_VERSION_SCRIPT) - target_link_options(libfoo PRIVATE -Wl,--version-script=${protobuf_source_dir}/src/libfoo.map) - set_target_properties(libfoo PROPERTIES - LINK_DEPENDS ${project_source_dir}/src/libfoo.map) -endif() -``` - -=== Adding version-script to Meson - -Meson's link:https://github.com/mesonbuild/meson/blob/master/test%20cases/linuxlike/3%20linker%20script/meson.build[test cases] -include examples of using version-script. - -``` -# Solaris 11.4 ld supports --version-script only when you also specify -# -z gnu-version-script-compat -if meson.get_compiler('c').get_linker_id() == 'ld.solaris' - add_project_link_arguments('-Wl,-z,gnu-version-script-compat', language: 'C') -endif - -# Static map file -mapfile = 'bob.map' -vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) - -l = shared_library('bob', 'bob.c', link_args : vflag, link_depends : mapfile) -``` - -== Applications - -No additional suggestions are provided for applications at this time. diff --git a/guidelines/modules/ROOT/pages/Conflicts.adoc b/guidelines/modules/ROOT/pages/Conflicts.adoc deleted file mode 100644 index 38b1179..0000000 --- a/guidelines/modules/ROOT/pages/Conflicts.adoc +++ /dev/null @@ -1,298 +0,0 @@ -include::{partialsdir}/attributes.adoc[] - -= Conflicts Guidelines - -*Author:* https://fedoraproject.org/wiki/TomCallaway[ Tom 'spot' Callaway] + -*Revision:* 0.07 + -*Initial Draft:* Tuesday Dec 5, 2006 + -*Last Revised:* Wednesday Oct 31, 2012 + - - -== Conflicts - -Users should always be able to install the latest packages from Fedora's repos -regardless of what other Fedora packages are installed. -Therefore, whenever possible, -the latest Fedora packages of a release -should avoid conflicting with each other. -Conflicts result in a transaction set -where the user has to decipher the error message -and make some sort of decision. -The transaction set doesn't provide information to the user -about why two packages conflict to help them make an informed decision. - -As Fedora packagers, -we try to make it so that any subset of latest Fedora's packages -will install and run. -Unfortunately, this is not always possible -but we can usually make it so that conflicting packages can be installed -and the user can decide which package to enable afterwards. -In the few remaining cases, we have to use `+Conflicts:+` tags. -These guidelines illustrate how conflicts should be handled in Fedora, -specifically concerning when and when not to use the `+Conflicts:+` field. - -== Acceptable Uses of Conflicts: - -As a general rule, -Fedora packages must NOT contain any usage of the `+Conflicts:+` field. -This field is commonly misused, -when a `+Requires:+` would usually be more appropriate. -It confuses depsolvers and end-users for no good reason. -However, there are some cases in which using the `+Conflicts:+` field -is appropriate and acceptable. - -=== Implicit Conflicts - -Keep in mind that implicit conflicts are NEVER acceptable. -If your package conflicts with another package, -then you must either resolve the conflict, or mark it with `+Conflicts:+`. - -=== Optional Functionality - -Some software can utilize other optional software applications if present, -but do not require them to be installed. -If they are not installed, the software will still function properly. -However, if those other "optional applications" are too old, -then the software won't work. -This is an acceptable use of the `+Conflicts:+` field. -The packager must document the reason in a comment -above the `+Conflicts:+` field: - -*Example:* - -[source, rpm-spec] ----- -Conflicts: unrar < 2.0 ----- - -If the software links to the libraries of another package, -it must use `+Requires:+` instead of `+Conflicts:+` to mark that dependency. -Also, if the software does not function properly -without another package being installed, -it must use `+Requires:+` instead of `+Conflicts:+`. - -The packager should ask: - -_If the package (at the correct version) in Conflicts: is not present, -will my package be functional?_ - -If the answer is yes, then it is probably a valid use of `+Conflicts:+`. -If the answer is no, -then it is almost certainly a better case for `+Requires:+`. - -For example, if foo-game needs libbar to run, -but will not work with libbar that is older than 1.2.3: - -*WRONG:* Conflicts: libbar < 1.2.3 + -*RIGHT:* Requires: libbar >= 1.2.3 + -Packagers should keep usage of `+Conflicts:+` to a bare minimum. -Only upgrading from two previous release of Fedora is supported, -so Conflicts against older packages than that, while technically correct, -are unnecessary, and should not be included. - -=== Splitting Packages - -If contents from one package are split into a separate package -the new package usually contains files that also appear in the original package -which might lead to a implicit conflict -between the files in the new package and the original package. -Where the new package depends on the original package, -this can be resolved with a versioned Requires: - -[source, rpm-spec] ----- -# In the new package's spec file: -Requires: original-package > EVR_BEFORE_SPLIT ----- - -If the new package should be installable -independently of whether the original package is installed, -a versioned conflict is allowed: - -[source, rpm-spec] ----- -# In the new package's spec file: -Conflicts: original-package <= EVR_BEFORE_SPLIT ----- - -In both of these cases, -the new version of the original package should be updated -to not contain the conflicting files -and to depend on the new package -(at least in all stable Fedora releases). -This allows to install the latest releases of both packages without any problem. -The Conflicts are only there to resolve the case -where the new package is installed -and the older version of the original package was already installed. - -=== Compat Package Conflicts - -It is acceptable to use `+Conflicts:+` in some cases involving compat packages. -These are the cases where it is not feasible to patch applications -to look in alternate locations for the -compat files, -so the foo-devel and foo-compat-devel packages need to `+Conflict:+`. -Whenever possible, this should be avoided. - -=== Incompatible Binary Files with Conflicting Naming (and stubborn upstreams) - -In the specific case -where multiple software components generate identically named -(but incompatible) binaries, -Fedora Packagers should make every effort to convince the upstreams -to rename the binaries to resolve the conflict -(see: xref:#_binary_name_conflicts[Binary Name Conflicts]). -However, if neither upstream is willing to rename the binaries -to resolve the conflict, -*AND* the binaries are not viable candidates for alternatives -or environment modules (incompatible runtimes), -as long as there are no clear cases for both packages -to be installed simultaneously, -explicit Conflicts are permitted at the packager's discretion. -Both packages must carry Conflicts in this case. - -Be aware, adding explicit Conflicts means that -if any other packages depend on your package, -you may be creating a chain-of-conflicts that could cause user pain. -Please consider this as a last resort. - -== Common Conflicting Files Cases and Solutions - -There are many types of files which can conflict between multiple packages. -Fedora strongly discourages using `+Conflicts:+` to resolve these cases. -Here are some suggestions which can be used to resolve these conflicts -(note that not all file conflict cases are listed, -nor are all possible solutions): - -=== Man Page Name Conflicts - -* Rename the man pages to slightly alter the suffix of the man page -(e.g man1/check.1.gz and man1/check.1foo.gz) - -* Rename the man pages to include a prefix of the providing package -(e.g. foo-check.1.gz and bar-check.1.gz) - -=== Library Name Conflicts - -If the library is 100% ABI-compatible, you can use -xref:EnvironmentModules.adoc[Environment Modules] -to let the user switch between them. -If the library is not 100% ABI-compatible get one of the upstreams to rename. -See xref:#_approaching_upstream[Approaching Upstream] for ideas on persuasion. -If neither upstream will budge open a ticket for the {packaging-committee} -to evaluate what sort of hoops both packages would need to implement -to not conflict at runtime. - -=== Header Name Conflicts - -* Put the headers in a subdirectory of /usr/include. - -=== Binary Name Conflicts - -* Convince upstream to rename the binaries to something less generic -(or just less conflicting). -* In the case where the conflicting binaries provide the same functionality, -you can then rename the binaries with a prefix, -and use xref:Alternatives.adoc[Alternatives] -to let the system administrator select which generic name is the default. -Note that this is usually not the case. - -* In cases where the binaries provide similar functionality -xref:EnvironmentModules.adoc[EnvironmentModules] may be an option. -This is more flexible than alternatives -and is for things that each individual on a system may want to choose between -rather than a system administrator. - - -=== Approaching Upstream - -When renaming or putting files into subdirectories, -it is a good idea to try to get upstream to rename their conflicting files -(for instance if they both had commands named %\{_bindir}/trash). -Doing some research about which has been around longer may be useful -in this case but may or may not be persuasive to upstream. - -If neither upstream renames, we would then approach other distributions -(distributions-list[at]freedesktop.org is a good place to discuss this) -about renaming that can be done in all distros. -That helps end users going from one distro to another to have consistency. -Length of time that the projects have been around, -how popular each is, -and numerous other factors may play a role in this decision. -Once a decision is made, we would rename the Fedora packages to match. - -== Potential Conflicting Files - -We don't just try to avoid conflicts with existing packages within Fedora -but also potential conflicts. -This is because the first package to enter Fedora -is not always the one that should take on the name. -There are several scenarios in which this could come into play: - -1. There is a conflicting package that is not in Fedora yet -(found by doing a web search, for instance) - -2. There is no conflict yet -but the filename is likely to be used by another project -(something like `+/usr/bin/parser+`) - -In the first case, where a conflicting package is known to exist -but is not yet in Fedora, -we should go through the process of determining -which package has a more valid claim to the name -and rename the files in the package we're including -if it doesn't have the more valid claim. -If you think your situation is unique, please open a ticket -with the {packaging-committee}. - -In the second case, -where there is no known package to conflict with at this time, -it is up to the packager to make a decision. -Note that it is encouraged that you at least speak to upstream -about the potential for conflicts. -However, we can hope that any later projects that attempt to use that name -can be persuaded to rename based on this project being around longer. - -=== Standard Commands - -Common names are allowed for standard commands -since those will be the only commands to implement them. -Standard commands include -things provided for in published and widely implemented standards like POSIX -and de facto standards -such as a program that has traditionally been shipped -with a certain filename -as part of a large number of Unix variants. -If in doubt, send a message to fedora-devel-list[at]redhat.com -with details of what standards the command appears in, -how long it's been available on what Unix systems, -and whether you've found any conflicting programs -that implement a substantially different command with the same filename. - -== Conflicting Package Names - -Just as files can conflict, package names can as well. -Conflicting package names *MUST* be resolved. -Package names which differ only in case are still considered to be conflicting. -You should follow the same basic steps outlined in -xref:#_approaching_upstream[Approaching Upstream]. - -Renaming packages and replacing them with others can be difficult -if it has to occur at a later time -(for instance, upgrade paths can become complex in these situations) -so it is even more important to be aware of potential conflicts here -than it is with filenames. - -== Other Uses of Conflicts: - -If you find yourself in a situation -where you feel that your package has to conflict with another package -(either explicitly or implicitly), -but does not fit the documented accepted cases above, -then you need to make your case to the -https://pagure.io/packaging-committee[Fedora Packaging Committee]. -If they agree, then, and only then -can you use `+Conflicts:+` in a Fedora package. -Remember, whenever you use `+Conflicts:+`, -you are also required to include the reasoning -in a comment next to the `+Conflicts:+` entry, -so that it will be abundantly clear why it needed to exist. diff --git a/guidelines/modules/ROOT/pages/CronFiles.adoc b/guidelines/modules/ROOT/pages/CronFiles.adoc deleted file mode 100644 index 716ad98..0000000 --- a/guidelines/modules/ROOT/pages/CronFiles.adoc +++ /dev/null @@ -1,102 +0,0 @@ -= Fedora Cron Job Files - -This document describes the guidelines for packaging cron job files in Fedora. - -For the purposes of these guidelines, -a cron job file is defined as a script (e.g., a shell script or a Perl script). -These cron job files are scheduled to run on regular intervals by a cron daemon. - -== Cron Job Files on the filesystem - -Packages with cron job files must place those cron job files into -one or more of the following directories -/etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, /etc/cron.monthly -depending on the intended interval they should run. - -There is an exception to this rule: -If a certain cron job has to be executed at some frequency -or at a specific time interval other than the above, -then a custom crontab file should be added to /etc/cron.d -(with 0640 permissions). -In this case, the cron job file (the script) -must be placed in an appropriate system location -(e.g. %\{_bindir}, %\{_libexecdir}), and NOT in /etc/cron.d. - -Both cron job files and crontab definition files -installed in any of these directories -must be treated as configuration files -so that they can easily be modified by the local system administrator. - -== Cron Job file - -A typical cron job file is just a script like - -.... -#!/bin/sh -# My cron job script -# set -x - -echo "This is my simple cron job script" - -exit 0 -.... - -Example of crontab definition run at ever other hour -specified in /etc/cron.d/example - -.... -# .---------------- minute (0 - 59) -# | .------------- hour (0 - 23) -# | | .---------- day of month (1 - 31) -# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... -# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat -# | | | | | -# * * * * * user-name command to be executed - -0 */2 * * * root /usr/bin/example -.... - -== Cron job file names - -The file name of a cron job file should match -the name of the package from which it comes. - -If a package supplies multiple cron job files files in the same directory, -the file names should all start with the name of the package -followed by a hyphen (-) and a suitable suffix. - -== Cron Job Files Packaging - -Cron job file(s) in packages must be marked as %config(noreplace), -and their filename(s) should match the name of the package. - -Helper files used by cron job files should be placed -in appropriate system locations -(e.g. %\{_bindir} or %\{_libexecdir}) -and do not need to be marked as %config. - -Packages with cron job files must have an explicit -`+Requires: crontabs+`. -Since `+crontabs+` requires `+/etc/cron.d+` -and all cron daemon packages create (and own) that directory, -`+crontabs+` serves as a virtual requires for cron daemon functionality. - -=== Example of cron job packaging - -[source, rpm-spec] ----- -Name: -... -Source1: %{name}.cron -Requires: crontabs - -... - -%install -... -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.monthly -%{__install} -p -D -m 0750 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/cron.monthly/%{name} - -%files -%config(noreplace) %{_sysconfdir}/cron.monthly/%{name} ----- diff --git a/guidelines/modules/ROOT/pages/CryptoPolicies.adoc b/guidelines/modules/ROOT/pages/CryptoPolicies.adoc deleted file mode 100644 index b9c033b..0000000 --- a/guidelines/modules/ROOT/pages/CryptoPolicies.adoc +++ /dev/null @@ -1,110 +0,0 @@ -= Crypto Policies - -== Enforcing system crypto policies - -In Fedora there are policies for the usage of cryptographic protocols -such as TLS that are enforced system-wide. -Each application being added in Fedora must be checked -to comply with the policies. -Currently the policies are restricted to major libraries -such as GnuTLS, OpenSSL, NSS, libkrb5, -languages such as Java and major applications like OpenSSH and bind. -The rpmlint tool will warn when it detects that some action has to be taken; -that detection is based on heuristics -and limited to C programs, -so manual inspection is recommended. -Note however, -that there are applications which intentionally set weaker, -or custom settings on a purpose -(e.g., postfix); -those need not adhere to the policy. -When in doubt, -discuss with the -https://lists.fedoraproject.org/admin/lists/crypto-team.lists.fedoraproject.org/[Fedora crypto team]. - -=== New crypto libraries - -New crypto libraries must comply with the crypto policies to enter Fedora, -unless an exception has been granted by Fedora packaging committee. -If you wish to submit a package which does not comply with the crypto policies, -you MUST first consult with the -https://lists.fedoraproject.org/admin/lists/crypto-team.lists.fedoraproject.org/[Fedora crypto team]. -Once their approval has been granted, -open a ticket with the -https://pagure.io/packaging-committee[Fedora Packaging Committee] -requesting an exemption. Please link to any relevant discussion. - -=== C/C++ applications - -* *OpenSSL applications*: -** _If the application provides a configuration file_ -that allows to modify the cipher list string, -ensure that the shipped file contains "PROFILE=SYSTEM" as default. -In that case no further action is required. - -** _If the application doesn't have a configuration file_, -ensure that there is no default cipher list specified, -or that the default list is set as "PROFILE=SYSTEM". -That is, check the source code for *SSL_CTX_set_cipher_list*(). -If it is not present then nothing needs to be done (the default is used). -Otherwise, if that call is present -and provided a fixed string which does not contain PSK or SRP, -replace the string with "PROFILE=SYSTEM", -or remove the call. - -* *GnuTLS applications*: -** _If the application provides a configuration file_ -that allows to modify the cipher priority string, -the shipped file contains "@SYSTEM" as default. -In that case no further action is required. -** _If the application doesn't have a configuration file_, -ensure that it uses gnutls_set_default_priority(), -or that the default priority string is "@SYSTEM". -That is, check the source code for *gnutls_priority_set_direct*(), -*gnutls_priority_init*(); -if they are not present and gnutls_set_default_priority() is used, -nothing needs to be done. -Otherwise check the strings provided by the application. -If it contains PSK or SRP do nothing -(these applications are not currently covered by the default policy). -If not, then replace gnutls_priority_set_direct() -with gnutls_set_default_priority(). -If gnutls_priority_init() is used instead with a fixed string, -replace the string with "@SYSTEM". - -Applications utilizing other cryptographic libraries -do not adhere to the system wide crypto policies -(note that adherence to the system-wide policies -is work in progress for NSS libraries) - Applications in Fedora should use one of these libraries -when there is choice, -and preferrably the version recommended by upstream. - -=== Perl applications - -* *IO::Socket::SSL Perl applications*: -** Check the source code for passing *SSL_cipher_list* argument -to *IO::Socket::SSL*'s methods like *new()*, -*start_SSL()*, -*new_from_fd()*, -*set_defaults()*, -*set_client_defaults()*, -and *set_server_defaults()*. -If it is not present then nothing needs to be done (the default is used). -Otherwise, if that argument is present, -remove the argument or change its value as described in OpenSSL section. - -* *Net::SSLeay Perl applications*: -** Check the source code for *CTX_set_cipher_list()*, -*set_cipher_list()*, -and *set_pref_cipher()* subroutine calls -from *Net::SSLeay* name space. -If such a call presents, -follow instructions described in the OpenSSL section. - -* *LWP::UserAgent Perl applications*: -** Check the source code for passing *SSL_cipher_list* argument -to *ssl_opts()* method call -on a *LWP::UserAgent* object. -If such a call presents, -follow instructions described in the OpenSSL section. diff --git a/guidelines/modules/ROOT/pages/D.adoc b/guidelines/modules/ROOT/pages/D.adoc deleted file mode 100644 index a7fdc08..0000000 --- a/guidelines/modules/ROOT/pages/D.adoc +++ /dev/null @@ -1,108 +0,0 @@ -= D Packaging Guidelines - -== ldc - -All D packages depend on ldc to build, so every package must have ldc as BuildRequires. In addition, the ldc package includes some useful macros for D packages. - -=== Compiler options - -`+%{_d_optflags}+` must be used with ldc (normal `+%{optflags}+` do not apply to ldc, only to gcc). - -`+%{_d_optflags}+` is defined as: - -.... --release -w -g -O2 -.... - --release _disables asserts, invariants, contracts and boundscheck_ + --w _enables warnings_ + --g _generates debug information_ + --O2 _is the optimisation level_ - -Some D packages use Makefiles, which usually use the $DFLAGS variable in the same way that C packages with Makefiles use $CFLAGS. In this case, `+export DFLAGS="%{_d_optflags}"+` is usually appropriate. In other cases, the build script in the D package has an option to pass in `+%{_d_optflags}+`. It is the responsibility of the packager to ensure that `+%{_d_optflags}+` are used with ldc when the package is built. - -=== Header Files - -D packages contain header files, which end with .d or .di. These header files must be installed into `+%{_d_includedir}/%{name}+`. - -`+%{_d_includedir}+` is defined as: - -.... -/usr/include/d/ -.... - -== Libraries - -At this time, Linux does not support shared libraries for D code (only OSX does). -As a result, D packages are explicitly excluded from the restrictions against packaging static libraries. - -To build static libraries in D, you use the same tools that you would for C, specifically, ar, ranlib, and strip. - -If your D package contains static libraries, you must disable debuginfo generation, by adding this line to the top of your spec file: - -.... -%global debug_package %{nil} -.... - -Otherwise, it would generate an empty debuginfo package. - -All static libraries must be placed in the *-devel subpackage. When doing this, you must also have -`+Provides: %{name}-static = %{version}-%{release}+` in the devel package definition. - -It is possible that this will leave the root package empty, if this is the case, do not list a %files section for the root package, only for the -devel package. This is illustrated in the example template below. - -== Template - -.... -%global debug_package %{nil} - -Name: foo -Version: 1.2.3 -Release: 1%{?dist} -Summary: Does foo in D -Group: Development/Libraries -License: LGPL-2.1-or-later -URL: https://anywhere.com/ -Source: https://anywhere.com/%{name}-%{version}.tar.bz2 -BuildRequires: ldc -Requires: tango - -%description -Foo and bar. - -%package devel -Provides: %{name}-static = %{version}-%{release} -Summary: Support for developing D application -Group: Development/Libraries - -%prep -%setup -q - - -%build -export DFLAGS="%{_d_optflags}" -%configure -make %{?_smp_mflags} - -%install -mkdir -p %{buildroot}%{_libdir} -mkdir -p %{buildroot}%{_d_includedir}/%{name}/ - -make install DESTDIR=%{buildroot} - -install -m 0644 lib/* %{buildroot}%{_libdir} -install -m 0644 include/* %{buildroot}%{_d_includedir}/%{name}/ - -%clean -rm -rf %{buildroot} - -%files devel -%doc README.txt -%license LICENSE.txt -%{_d_includedir}/%{name}/ -%{_libdir}/*.a - -%changelog -* Wed Aug 25 2010 John Doe 1.2.3-1 -- initial package -.... diff --git a/guidelines/modules/ROOT/pages/Debuginfo.adoc b/guidelines/modules/ROOT/pages/Debuginfo.adoc deleted file mode 100644 index 3d706a5..0000000 --- a/guidelines/modules/ROOT/pages/Debuginfo.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= Debuginfo packages - -This page contains information about debuginfo packages and common pitfalls about them for packagers. For usage information and an explanation why debuginfo packages are important, see https://fedoraproject.org/wiki/StackTraces[StackTraces]. - -== Checking your debuginfo package for usefulness - -A useful debuginfo package contains stripped symbols from ELF binaries (`+*.debug+` in `+/usr/lib/debug+`) as well as the source code related to them (in `+/usr/src/debug+`). The script that generates the packages is `+/usr/lib/rpm/find-debuginfo.sh+`, read it through to get a basic understanding of how they're generated. If your debuginfo package doesn't contain any files, or is missing the sources or the size of the `+*.debug+` files in it is unexpectedly small (typically `+*.debug+` are larger than the corresponding binary it was stripped from), it's likely that there's a flaw in your package. That's not always the case though, read on. - -=== Useless or incomplete debuginfo packages due to packaging issues - -Useless or incomplete debuginfo packages are often a result of packaging flaws. Typical flaws that often manifest themselves as debuginfo packages containing no files: - -* The specfile or the package's build routines explicitly strip symbols out of the binaries. Look for invocations of `+strip+`, `+install -s+`, `+ld -s+`, or `+gcc -s+` etc and get rid of them (or the `+-s+` flags). The method how to do that varies, some examples cases include patching, using `+%configure+` or a `+make+` target that prevents the strip from happening, and/or overriding a strip command like for example `+make install STRIP=/bin/true+` -* The package is not marked as `+noarch+`, but does not contain any architecture dependent things (native binaries, architecture dependent paths etc). True `+noarch+` packages contain nothing rpmbuild could strip from them, so it's expected that they're empty if `+BuildArch: noarch+` is missing. If that's the case, make the package `+noarch+`. -* `+find-debuginfo.sh+` processes only files that are executable when it's run; for practical purposes one can assume that happens under the hood after the `+%install+` section. Make sure that all ELF binaries (executables, shared libraries, DSO's) are executable at end of `+%install+`. -* `+find-debuginfo.sh+` does not process setuid or setgid binaries. There's a https://bugzilla.redhat.com/117858[bug filed against rpmbuild] about that, but until it is fixed in the distros your package is targeted at, make sure that all your binaries do _not_ have the setuid/setgid bits at end of `+%install+`, and restore them in the `+%files+` section using `+%attr(...) /path/to/file+` - -Flaws that manifest themselves as unexpectedly small `+*.debug+` in the debuginfo package and/or source files missing: - -* The package was built without passing `+-g+` to `+gcc+` or `+g+++`. Without `+-g+`, no or insufficient information for debuginfo packages is generated, make sure that it is being used. -* Note that the default `+CFLAGS+` and `+CXXFLAGS+` of the distro already contain `+-g+`, so if those flags are being honored, it should be already in use. If not, suboptimal debuginfo packages are not the only problem; the package is probably also compiled without the security enhancing options of recent compiler versions. Make sure that `+$RPM_OPT_FLAGS+` is being honored and used. -* `+strip -g+` was used on the binaries; see above for possible remedies. - -=== Useless or incomplete debuginfo packages due to other reasons - -Empty debuginfo packages may also be generated in situations where there are no obvious packaging flaws present. Sometimes these are because of limitations of `+find-debuginfo.sh+`, sometimes not. Some usual cases: - -* Packages whose only architecture dependent binary part is a static library or many of them -* R and Mono packages *TODO: people knowledgeable of R and/or Mono, verify these* - -If you wish to disable generation of the useless debuginfo package while waiting for improvements to `+find-debuginfo.sh+` or if it's unlikely that it could be enhanced to produce a good debuginfo for your package (for example no architecture dependent files, but package is not noarch because of the installation paths it uses), use `+%global debug_package %{nil}+` in the specfile, and be sure to add a comment next to it explaining why it was done. - -== Missing debuginfo packages - -It is normal for noarch package builds to not produce a debuginfo package. If it's missing in other cases (where it has not been explicitly disabled), something's wrong. One such case is a https://bugzilla.redhat.com/192422[missing %build section] with some rpmbuild versions. - -== Don't obsolete debuginfo packages - -In case there is removed subpackage or the subpackage is changed from arch to noarch, the associated -debuginfo package might be left behind. This might be issue, when `+fedora-debuginfo+` repository is enabled during system upgrade. Nevertheless, because the debuginfo packages has no dependencies, they are parallel installable and useful for coredump analysis, don't obsolete them anywhere. - -== Resources - -* debuginfo package listings for Fedora, sorted by size. Most debuginfo packages roughly up to 20kB in size are candidates that should be examined - however significantly larger -debuginfo packages may suffer from the same problems too, esp. in the "missing -g" case. -** Note that due to the split repository, each directory must be examined separately. -** https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/debug/tree/Packages/a/?C=S;O=A -* https://fedoraproject.org/wiki/StackTraces[StackTraces] -* rpmlint >= 0.77 diff --git a/guidelines/modules/ROOT/pages/DefaultServices.adoc b/guidelines/modules/ROOT/pages/DefaultServices.adoc deleted file mode 100644 index 2e360c0..0000000 --- a/guidelines/modules/ROOT/pages/DefaultServices.adoc +++ /dev/null @@ -1,67 +0,0 @@ -= Default Services - -== What is a Service? - -For the purposes of this document, a "service" is defined as one or more of: - -* A daemon or process started using a https://www.freedesktop.org/software/systemd/man/systemd.service.html[systemd service unit]. -* A daemon or process that is invoked by socket activation, either by using a https://www.freedesktop.org/software/systemd/man/systemd.socket.html[systemd socket unit], https://standards.freedesktop.org/desktop-entry-spec/1.1/ar01s07.html[D-BUS activation] or similar behavior. -* A daemon or process that is invoked by hardware activation (i.e. started via a udev rule). -* A https://www.freedesktop.org/software/systemd/man/systemd.timer.html[systemd timer unit] that runs periodically. - -Note that this includes processes which are not persistent. If something started by a systemd service unit runs for a short period of time and then exits, it is still a service. An example would be `+iptables+`. -This also includes services in the user session (i.e. started per-user by the `systemd --user` manager). - -== Enabling Services by Default - -Only services that meet all criteria below MAY be enabled by default on package installation. - -=== Must not alter other services - -Installation of the package providing the unit auto-started by this preset MUST NOT change the behavior of any other service running (or potentially running) on the system. - -=== Must not require manual configuration to function - -The service MUST NOT require configuration before it starts properly. If the end-user/administrator must make some specific configuration change before the service is able to start without error then it MUST NOT be enabled by default. - -=== Must not fail under normal operating conditions - -The service MUST NOT, under normal operating conditions, exit with an error causing systemd to mark the unit as failed. A service which is started by default is permitted to fail under exceptional conditions. For example, a service could start when appropriate hardware is present, but would still be allowed to fail if that hardware is somehow malfunctioning. Or a service could fail to start with an error if a configuration file has been locally modified to be syntactically incorrect. - -=== Must not listen for outside connections - -The service MUST NOT listen on a network socket for connections originating on a separate physical or virtual machine. - -D-BUS services and hardware-activated services generally meet this requirement. - -== Hardware Support Services - -Some hardware requires some additional service to be started in order to be useful. This may come in the form of a non-persistent setup process or in the form of a continuously-running service. If the service can be hardware activated to only start when the relevant hardware is present and do nothing when not present, and otherwise it meets the above requirements, then it SHOULD be enabled by default upon package installation. - -If the service cannot be hardware activated, but it is possible to configure it such that it will exit without error and without marking the service as "failed" according to systemd, then it SHOULD be enabled by default upon package installation. This clean exit may be accomplished through https://www.freedesktop.org/software/systemd/man/systemd.unit.html#ConditionArchitecture=[systemd conditionals], by having the service (or a wrapper script) perform hardware detection and exit without indicating an error, or via other similar means. - -== Approved Exceptions - -Some services which are permitted to be enabled by default as specific exceptions. Services that should be enabled by default throughout all of Fedora must be approved by https://pagure.io/fesco[FESCo]. Services that should be enabled or disabled by default only on one or more of the Fedora Editions must be approved by those Editions' https://fedoraproject.org/wiki/Fedora.next#Working_groups[Working Groups]. - -Example: - -* FESCo approves openssh-server to run by default on Fedora in general. -* Workstation WG approves openssh-server to be disabled by default on the Workstation Edition. - -== Current list of enabled/disabled services - -* https://src.fedoraproject.org/rpms/fedora-release/blob/rawhide/f/90-default.preset[Fedora general] -* https://src.fedoraproject.org/rpms/fedora-release/blob/rawhide/f/90-default-user.preset[Fedora general (per-user)] -* https://src.fedoraproject.org/rpms/fedora-release/blob/rawhide/f/80-server.preset[Fedora Server] -* https://src.fedoraproject.org/rpms/fedora-release/blob/rawhide/f/81-desktop.preset[Fedora desktop (Workstation and KDE)] -* https://src.fedoraproject.org/rpms/fedora-release/blob/rawhide/f/80-workstation.preset[Fedora Workstation] - -== How to enable a service by default - -Unit files must correspond to the Fedora Packaging xref:Scriptlets.adoc#_systemd[Guidelines]. Services are enabled or disabled by default through https://www.freedesktop.org/software/systemd/man/systemd.preset.html[systemd preset files]. Preset files can be overridden by a local administrator, but a set of defaults are provided by Fedora. - -If the service should be enabled by default, it must be added to one of the distribution presets files (see above). - -For services which meet one of the conditions listed above, a ticket should be filed in -https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&format=fedora-systemd-request[bugzilla]. If the preset should be changed for versions other than rawhide, indicate that in the ticket. diff --git a/guidelines/modules/ROOT/pages/Directory_Replacement.adoc b/guidelines/modules/ROOT/pages/Directory_Replacement.adoc deleted file mode 100644 index dc309fe..0000000 --- a/guidelines/modules/ROOT/pages/Directory_Replacement.adoc +++ /dev/null @@ -1,108 +0,0 @@ -= Replacing a symlink with a directory or a directory with any type of file - -Due to a known limitation with RPM, -it is not possible to replace a directory -with any kind of file or symlink, -nor is it possible to replace a symlink -to a directory with a directory -without RPM producing file conflict errors -while trying to install the package. -For more information on the issues involved, refer to -https://bugzilla.redhat.com/show_bug.cgi?id=447156[bug 447156] -and https://bugzilla.redhat.com/show_bug.cgi?id=646523[bug 646523]. - -== Try to avoid the problem in the first place - -While it's obviously not possible to foresee all the cases -where the need might arise, -when the need *_is_* foreseeable, -such as with bundled libraries, -it is better to use a symlink from the beginning, -as the symlink target can be changed more easily. -For instance, -if you have a bundled `libfoo` library -inside the package's directory structure, -place it in, for example, a `libfoo.bundled` directory -and make libfoo a symlink to that. -When the bundling is eventually removed, -you just need to drop the directory -and change the symlink to point -to the corresponding system library directory, -without resorting to the scriptlets described below. - -== Working around it with scriptlets - -To work around this problem, -you must include a -xref:Scriptlets.adoc#pretrans[%pretrans scriptlet] -that manually performs the conversion -prior to RPM attempting to install the package. - -Note that '+%pretrans+' scriptlets MUST be written in Lua -and thus use `+-p +` -in order to function during initial system installation -when no shell has yet been installed. - -Please use whichever of the two following snippets is necessary -in packages that need this transition, -replacing `+/path/to/dir+` -with the path to the directory that is being converted. - -=== Scriptlet to replace a directory - -RPM cannot simply remove a directory -when it is replaced by a file or symlink, -since users may have added or modified files to the directory. -To protect against accidental data loss, -you MUST use the following scriptlet -which renames the directory with a `+.rpmmoved+` suffix -so that users can find the backed up directory -if they need to after the package is upgraded. -(It also will append an integer -to the suffix in the rare event that directory also exists.) - -.... -%pretrans -p --- Define the path to directory being replaced below. --- DO NOT add a trailing slash at the end. -path = "/path/to/dir" -st = posix.stat(path) -if st and st.type == "directory" then - status = os.rename(path, path .. ".rpmmoved") - if not status then - suffix = 0 - while not status do - suffix = suffix + 1 - status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) - end - os.rename(path, path .. ".rpmmoved") - end -end -.... - -Additionally, you should define the `+/path/to/dir.rpmmoved+` -directory as a `+%ghost+` entry in the `+%files+` list -in the package's spec file, -so that the directory is not entirely orphaned -and can be deleted if the package is ever uninstalled -and the directory is empty. - -=== Scriptlet to replace a symlink to a directory with a directory - -Replacing a symlink to a directory -with a regular directory is much simpler, -since there's no potential for accidentally removing files added externally. -The following scriptlet checks for and removes the symlink. -There is no need to create the directory here, -as RPM will do so later in the transaction -when the package is installed. - -.... -%pretrans -p --- Define the path to the symlink being replaced below. -path = "/path/to/dir" -st = posix.stat(path) -if st and st.type == "link" then - os.remove(path) -end -.... diff --git a/guidelines/modules/ROOT/pages/DistTag.adoc b/guidelines/modules/ROOT/pages/DistTag.adoc deleted file mode 100644 index d4b737b..0000000 --- a/guidelines/modules/ROOT/pages/DistTag.adoc +++ /dev/null @@ -1,166 +0,0 @@ -include::{partialsdir}/versions.adoc[] - -= Dist Tag Guidelines - -Use of the `+%{?dist}+` tag is mandatory in Fedora. - -You should consider this document as an addendum to the xref:Naming.adoc[Naming Guidelines]. - -== Purpose of the Dist Tag - -There are several uses for a `+%{?dist}+` tag. The original purpose was so that a single spec file could be used for multiple distribution releases. In doing this, there are cases in which BuildRequires: and Requires: will need to be different for different distribution releases. Hence, `+%{?dist}+` does double duty: - -* it differentiates multiple packages which would otherwise have the same `+%{name}-%{version}-%{release}+`, but very different dependencies. - -* it allows for a conditional check in the spec to deal with the differing dependencies. - -=== Do I Have To Use the Dist Tag? - -Yes. It is very useful in maintaining proper ordering between Fedora releases and consistency in release tags is very helpful to the automated tools which are used to perform mass rebuilds. - -== Using +%{?dist}+ - -Here is the important information to know: - -=== Possible values for +%{dist}+ - -When you run fedpkg commands like `+fedpkg build+`, the values for `+%{dist}+` and its helper variables are assigned according to the git branch that you are working in. You do NOT need to define these variables in your spec file. fedpkg will magically set `+%{?dist}+` for you. - -For reference purposes only, these are some possible values for `+%{dist}+`. Note that if `+%{dist}+` is undefined, `+%{?dist}+` simply becomes empty. Also note that Fedora releases use "fc" and not "f" in the tag for historical reasons. - -[cols=",",options="header",] -|================================================================================== -|OS |+%{?dist}+ tag -|RHEL 7 (all variants) |`.el7` -|RHEL 8 (all variants) |`.el8` -|RHEL 9 (all variants) |`.el9` -|Fedora {PREVVER} |`.fc{PREVVER}` -|Fedora {CURRENTVER} |`.fc{CURRENTVER}` -|Fedora {NEXTVER} |`.fc{NEXTVER}` -|(and so on) -|================================================================================== - -Development: - -The development branch takes the disttag of the next major unreleased version of Fedora. - -Note the leading period in the definition of `+%{?dist}+`. This is present so that it can easily be used in the release field. -These definitions can be found in common/branches. - -Note that RHEL dist tags are only defined for EPEL packages. - -=== +%{?dist}+ in the Release: field - -The `+%{?dist}+` tag is included in the Release field as follows: - -.... -Release: 1%{?dist} -.... - -This translates into: - -.... -If %{dist} is defined, insert its value here. If not, do nothing. -.... - -So, if we have the following in a spec file: - -.... -Name: logjam -Version: 1.4 -Release: 2%{?dist} -.... - -When this package is built in an i386 FC20 buildroot, it generates an rpm named: `+logjam-1.4-2.fc20.i386.rpm+`. - -Keep in mind that `+%{?dist}+` should *never* be used in the Name or Version fields, nor in %changelog entries. - -=== Conditionals - -Along with `+%{?dist}+`, there are several "helper" variables defined by the buildsystem. These variables are: - -`+%{rhel}+`: This variable is only defined on Red Hat Enterprise Linux builds. If defined, it is set to the release number of Red Hat Enterprise Linux present at build time. - -`+%{fedora}+`: This variable is only defined on Fedora builds. If defined, it is set to the release number of Fedora present at build time. - -`+%{rhl}+`: This variable is only defined on Red Hat Linux builds. If defined, it is set to the release number of Red Hat Linux present at build time. - -`+%{fc#}+`: This variable is only defined on Fedora builds. For example, on Fedora {CURRENTVER} builds, `%{fc{CURRENTVER}}` is defined to 1. - -`+%{el#}+`: This variable is only defined on Red Hat Enterprise Linux builds. For example, on RHEL 7 builds, `+%{el7}+` is defined to 1. - -All of these variables, if defined, will have a purely numeric value. -With `+%{dist}+` and these additional variables, you can create conditionals in a spec file to handle the differences between distributions. - -Here are some examples of how to use these variables in conditionals: - -.... -%if 0%{?rhel} -%endif - -%if 0%{?fedora} >= 21 -%endif - -%{?fedora:%global _with_xfce --with-xfce} - -%if 0%{?rhel} -%if 0%{?rhl} -%endif -%endif - -%if 0%{?rhl}%{?fedora} -%endif - -%{?fc20:Requires: foo} -%{?fc21:Requires: bar} -%{?fc22:Requires: baz} -.... - -Keep in mind that if you are checking for a specific family of distributions, that you need to use: - -.... -%if 0%{?rhel} -.... - -and *NOT* - -.... -%if %{?rhel} -.... - -Without the extra 0, if `+%{rhel}+` is undefined, the `+%if+` conditional will cease to exist, and the rpm will fail to build. - -=== Distribution-specific values - -Fedora 37 onwards, a few helper macros are defined to help packagers write distribution-agnostic spec files: - -`+%{dist_vendor}+`: The vendor of the distribution. For Fedora, this is `+Fedora+`. - -`+%{dist_name}+`: The name of the distribution. For Fedora, this is `+Fedora Linux+`. - -`+%{dist_home_url}+`: The URL of the homepage of the distribution. For Fedora, this is `+https://fedoraproject.org/+` - -`+%{dist_bug_report_url}+`: The URL for reporting bugs. For Fedora, this is `+https://bugzilla.redhat.com/+` - -`+%{dist_debuginfod_url}+`: The URL where the debuginfod server runs (if any). This is used -in elfutils.spec. For Fedora, this is `+https://debuginfod.fedoraproject.org/+`. - -These values are configured via the `+fedora-release+` package. Downstream distributions of -Fedora are expected to provide their distribution-specific values here. - -=== Things that you cannot use +%{?dist}+ for - -* You must not override the variables for `+%{dist}+` (or any of the related variables). -* You must not hardcode a value for `+%{dist}+` (or any of the related variables) in your spec. -* You must not hardcode a dist tag in the spec: *BAD:* Release: 1.fc{CURRENTVER} *GOOD:* Release: 1%{?dist} -* You cannot put any sort of "tagging" in `+%{dist}+` (or any of the related variables). `+%{dist}+` (and its related variables) exist ONLY to define the distribution that a package was built against. -* `+%{?dist}+` must never be used in the Name or Version fields, only Release, and only as documented above. -* `+%{fedora}+`, `+%{rhel}+`, `+%{rhl}+`, `+%{fc#}+`, `+%{el#}+` must never be used in the Name, Version, or Release fields. - -== Common questions - -Q: Why don't you just let the buildsystem (or packager) pass the value for dist to rpm, e.g. `+rpm --with dist el7+`? + -A: Actually, we do. The Fedora buildsystem defines the values for dist when you run `+fedpkg+`. - -Q: Why is use of `+%{?dist}+` mandatory? + -A: There are very few packages which didn't use it, the primary very old reason for not using it (sharing large data packages across Fedora releases) is no longer relevant because all Fedora releases are signed with a different key, and having consistent Release: tags simplifies the automated tools which may need to increment them. diff --git a/guidelines/modules/ROOT/pages/Emacs.adoc b/guidelines/modules/ROOT/pages/Emacs.adoc deleted file mode 100644 index 0f62fc8..0000000 --- a/guidelines/modules/ROOT/pages/Emacs.adoc +++ /dev/null @@ -1,247 +0,0 @@ -= Packaging of add-ons for GNU Emacs - -== Purpose - -The purpose of this document is to promote good practice in packaging add-ons for GNU Emacs, and to encourage the submission of more Emacs add-on packages to the package collection by providing easy to use spec file templates. - -== Important notes on these Guidelines - -The guidelines in the following sections make extensive use of the macros defined in `+/usr/lib/rpm/macros.d/macros.emacs+` which is installed with the `+emacs-common+` package. - -There are two distinct cases where consideration of these guidelines is required: - -1. This case refers to the situation where a package's principal purpose is to provide extra functionality for Emacs, and the package serves no purpose without the presence of Emacs. An example of this case is the VM mail reader, as packaged in `+emacs-vm+`. Below we refer to this as *Case I*. -2. This case refers to the situation where a package's principal functionality does not require Emacs, but the package also includes some auxiliary Elisp files to provide support for the package in Emacs. Below we refer to this as *Case II*. - -== Package naming and sub-package organization - -=== Case I - -Where a package is primarily an add-on for Emacs, the main package should be called `emacs-_foo_`. - -=== Case II - -Where a package's principal functionality does not require Emacs, but the package also includes some auxiliary Elisp files to provide support for the package in Emacs, these should be included in the main package which will need to Require the `+emacs-filesystem+` package. -More detail below. - -== Package contents - -=== Case I - -Files specific to GNU Emacs should be placed in the main package, `emacs-_foo_`. -This should contain the elisp source, compiled elisp and any other files needed to use the package or sub-package with GNU Emacs. - -=== Case II - -The compiled elisp source and the elisp source files should be packaged as part of the main package, and not split out into separate packages. - -== File locations - -File locations for GNU Emacs add-on (sub-)packages: - -* All elisp and related files for the package should be installed in the directory `+%{_emacs_sitelispdir}/foo+`. -* If the package requires a startup file this should be called `_foo_-init.el` and be placed in `+%{_emacs_sitestartdir}+`. - -== Package Requires - -=== Case I - -Package Requires for GNU Emacs add-on (sub-)packages: - -* Where relevant `emacs-_foo_` must have `Requires: emacs-common-_foo_ = +%{version}-%{release}+` -* `emacs-_foo_` must have `+Requires: emacs(bin)%{?_emacs_version: >= %{_emacs_version}}+` - -=== Case II - -If the package has auxillary files for use with GNU Emacs, the package must have `+Requires: emacs-filesystem >= %{_emacs_version}+` - -== Package BuildRequires - -Package BuildRequires for GNU Emacs add-on packages: - -* In general it should suffice to have `+BuildRequires: emacs-nw+` - -== Manual byte compilation - -Usually package Elisp compilation is handled via a make file shipped with the package, but on some occasions it may be necessary to add commands to the `+%build+` section of the spec file to byte compile files. -In that case, use `+%{_emacs_bytecompile} file.el+` - -It is a requirement that all Elisp files are byte compiled and packaged, unless there is a good reason not to, in which case this should be documented with a comment in the spec file. - -== Use of BuildArch: noarch - -If an add-on package requires only byte compilation of elisp then `+BuildArch: noarch+` should be used. This is highly unlikely to ever apply to Case II. - -== Example spec file templates - -=== Template for an add-on package for GNU Emacs (Case I) - -This is a template for a package for GNU Emacs. -The main package is called `emacs-_foo_` and contains all files needed to run package foo with GNU Emacs. -This includes both compiled and source elisp files. - -.... -%global pkg foo -%global pkgname Foo - -Name: emacs-%{pkg} -Version: -Release: %autorelease -Summary: - -Group: -License: -URL: -Source0: - -BuildArch: noarch -BuildRequires: emacs-nw -Requires: emacs(bin)%{?_emacs_version: >= %{_emacs_version}} - -%description -%{pkgname} is an add-on package for GNU Emacs. It does wonderful things... - - -%prep -%autosetup -n %{pkg}-%{version} - -%build - - -%install - - -%post - - -%preun - - -%files -%doc -%{_emacs_sitelispdir}/%{pkg} -%{_emacs_sitestartdir}/*.el - - -%changelog -%autochangelog -.... - -=== Template for a package which contains auxiliary GNU Emacs files (Case II) - -This is a skeleton of a package which also includes support files for GNU Emacs - -.... -Name: foo -Version: -Release: %autorelease -Summary: - -Group: -License: -URL: -Source0: - -BuildRequires: emacs-nw -Requires: emacs-filesystem%{?_emacs_version: >= %{_emacs_version}} - -%description -Foo is a package which contains auxiliary Emacs support files. - - -%prep -%autosetup - -%build - - -%install - - -%post - - -%preun - - -%files -%doc -%{_emacs_sitelispdir}/foo -%{_emacs_sitestartdir}/*.el - -%changelog -%autochangelog -.... - -== Principles behind the guidelines - -=== Location of installed files - -Files for add-on package foo should be placed in `+%{_emacs_sitelispdir}/foo+` which evaluates to `/usr/share/emacs/site-lisp/_foo_`. - -Usually an add-on package will require a startup file, and this should be called `_foo_-init.el` and be placed in `+%{_emacs_sitestartdir}+` which evaluates to `+/usr/share/emacs/site-lisp/site-start.d/+`. - -=== Packaging of source elisp files - -Typically, an Emacs add-on package will be compiled from source elisp files. -The resulting compiled elisp files will then be included in the relevant `emacs-_foo_` package. -It is important to also include the source elisp files for several reasons. -For example when debugging a problem with an Emacs package, the Elisp debugger can look up the relevant code or symbol definition in the source lisp file if present. -Also, it's sometimes helpful to jump to a variable description string from the Emacs help system. - -=== BuildArch for Emacs add-on packages - -You should set `+BuildArch: noarch+` for add-on packages which only compile elisp files during building. - -If the package building process also compiles programs in other languages, you may need to not set `+BuildArch+`. - -=== Requires for GNU Emacs - -Add-on packages should have appropriate Requires entries for the flavor of Emacs they are targeted at. -GNU Emacs is available in multiple packages - some details of these packages follow. - -1. The `+emacs+` package is built with pure GTK support to allow the user to run Emacs in a windowed environment. -2. The `+emacs-gtk+x11+` package is built with X11 support via the GTK toolkit to allow the user to run Emacs in a windowed environment. -3. The `+emacs-lucid+` package is built with X11 support via the Lucid toolkit to allow the user to run Emacs in a windowed environment. -4. The `+emacs-nw+` package is built without GUI support. It is suitable for running in a terminal. - -Note: - -* The `+emacs+`, `+emacs-gtk+x11+`, `+emacs-lucid+`, and `+emacs-nw+` packages all have Requires: emacs-common. -* The emacs, `+emacs-gtk+x11+`, `+emacs-lucid+`, and `+emacs-nw+` packages all have a virtual Provides: `+emacs(bin)+`. - -Assuming your add-on package will work in both a windowed and a console Emacs session, it is wrong to have `+Requires: emacs+` as that would pull in a dependency on GTK even if the console variant of Emacs is installed. -Rather you should use Requires: `+emacs(bin)+` for GNU Emacs add-on packages. - -If the package ONLY works with GTK support built into Emacs, then the package should have `+Requires: emacs+`. -This is very uncommon. - -==== Why we need versioned Requires - -Many elisp packages aim for backwards source level compatibility by checking whether some features exist in the Emacs in use when the package is being run or byte-compiled. -If yes, they use what's available. -If no, they provide their own versions of missing functions, macros etc. -This propagates into `+*.elc+` during byte compilation, and quite a few functions do get added between upstream Emacs releases. - -So let's say I byte-compile a package into `+*.elc+` with Emacs 29.3. -Elisp package `_quux_` checks if the `_foo-bar_` function is available in the Emacs being used to byte-compile it. -Yes, it is, so the internal backwards compat version of `_foo-bar_` included in `_quux_` does not end up in the `+*.elc+`. -Now, let's assume `_foo-bar_` was added in Emacs 29.3 and didn't exist in 29.2 and we're trying to run the `+*.elc+` with 29.2 -> boom, `_foo-bar_` is not available. -Note: this wouldn't happen if only `+*.el+` were shipped - `+*.elc+` are the potential and likely problem. -Requiring >= version of the Emacs used to byte-compile the `+*.elc+` is not the only solution (nor enough for all corner cases), but is the best one we currently have available. - -The main package and subpackages will need to have appropriately versioned Requires to ensure that a recent enough version of Emacs is installed. -Emacs byte compiled lisp is usually forward compatible with later Emacs versions, but is frequently not compatible with earlier versions of Emacs. - -==== Determining the Required Emacs version at package build time - -It is recommended to derive greater-than-or-equal-to valued versioned dependencies from the version of Emacs used to byte-compile the package at package build time. -The `+emacs-common+` package includes `+/usr/lib/rpm/macros.d/macros.emacs+` which defines a `+%{_emacs_version}+` macro containing the version of Emacs installed. - -=== Other packages containing Emacsen add-ons (Case II) - -It is often the case that a software package, while not being primarily an Emacs add-on package, will contain components for Emacs. -For example, the Gnuplot program contains some elisp files for editing Gnuplot input files in GNU Emacs and running Gnuplot from GNU Emacs. -In this case, we want to enable the Emacs support IF Emacs is installed, but we don't want to mandate the installation of Emacs on installation of this package since Emacs is not required for providing the core functionality of the package. -To enable this, the `+emacs-filesystem+` sub-package was created which owns the `+/usr/share/emacs/site-lisp+` directory. -A package can then Require the `+emacs-filesystem+` package in order to install its Elisp files without pulling in Emacs and its dependency chain. diff --git a/guidelines/modules/ROOT/pages/EnvironmentModules.adoc b/guidelines/modules/ROOT/pages/EnvironmentModules.adoc deleted file mode 100644 index c348263..0000000 --- a/guidelines/modules/ROOT/pages/EnvironmentModules.adoc +++ /dev/null @@ -1,61 +0,0 @@ -= Environment Modules - -== Introduction - -When one has multiple programs serving the same purpose (for instance SMTP servers such as sendmail, exim and postfix; or print servers such as lprng and cups), it is usual to wrap these using alternatives. Alternatives provides a clean way to have many types of software serving the same purpose installed at the same time and have the commands such as `+mail+` and `+lpr+` point to the wanted versions. - -However, 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. This has been reality on supercomputers and clusters for eons, and multiple implementations of a solution has been developed: http://modules.sourceforge.net/[environment modules] and https://www.tacc.utexas.edu/tacc-projects/lmod[Lmod]. Fedora currently makes use of this primarily for handling switching between different MPI implementations. - -Environment modules are also useful in situations where a package wants to install binaries that use common names and might conflict file in or otherwise pollute /usr/bin. Use must then load an environment module before being able to make use of those programs. - -== Using environment modules - -To see what modules are available, run `+$ module avail+`. -To load a module run e.g. `+$ module load mpi/openmpi-x86_64+`. -To unload a module, run e.g. `+$module unload mpi/openmpi-x86_64+`. - -The upstream documentation for the module command is available https://modules.readthedocs.io/en/stable/module.html[here] or with `+man module+`. - -== Creating environment modules - -To install an environment module, place a module file into `+%{_modulesdir}+`, which should evaluate to `+/usr/share/modulefiles+`. This macro is available in Fedora and EPEL 7+. The directory `+/usr/share/Modules/modulefiles+` is to be used only for internal modules of environment-modules. `+/etc/modulefiles+` is available to local system administrator use. - -The module files are plain text with optional tcl syntax, for instance an environment module for 64-bit OpenMPI `+mpi/openmpi-x86_64+`: - -.... -#%Module 1.0 -# -# OpenMPI module for use with 'environment-modules' package: -# -conflict mpi -prepend-path PATH /usr/lib64/openmpi/bin -prepend-path LD_LIBRARY_PATH /usr/lib64/openmpi/lib -prepend-path PYTHONPATH /usr/lib64/python2.7/site-packages/openmpi -prepend-path MANPATH /usr/share/man/openmpi-x86_64 -setenv MPI_BIN /usr/lib64/openmpi/bin -setenv MPI_SYSCONFIG /etc/openmpi-x86_64 -setenv MPI_FORTRAN_MOD_DIR /usr/lib64/gfortran/modules/openmpi-x86_64 -setenv MPI_INCLUDE /usr/include/openmpi-x86_64 -setenv MPI_LIB /usr/lib64/openmpi/lib -setenv MPI_MAN /usr/share/man/openmpi-x86_64 -setenv MPI_PYTHON_SITEARCH /usr/lib64/python2.7/site-packages/openmpi -setenv MPI_COMPILER openmpi-x86_64 -setenv MPI_SUFFIX _openmpi -setenv MPI_HOME /usr/lib64/openmpi -.... - -The module file begins with the magic cookie `+#%Module +`, where is the version of the module file used. The current version is 1.0. - -The above commands prepends the path with the bindir of the 64-bit OpenMPI (compiled with GCC) and adds the relevant library path. Then it sets various environment variables. - -It is also possible to set `+CFLAGS+` and `+LDFLAGS+` with the above manner, but in the case of MPI compilers it is not necessary since the compilers are invoked with the `+mpicc+`, `+mpicxx+`, `+mpif77+` and `+mpif90+` wrappers that already contain the necessary include and library paths. Also, in the case of development packages an override of `+CFLAGS+` and/or `+LDFLAGS+` is not sane, as it may cause trouble in building RPMs as it overrides `+%{optflags}+`. - -The upstream documentation for module files is available https://modules.readthedocs.io/en/stable/modulefile.html[here] or with `+man modulefile+`. - -== Switching between module implementations - -Switching between the environment-modules and Lmod implementations is done via alternatives. The shell init scripts /etc/profile.d/modules.\{csh,sh} are links to /etc/alternatives/modules.\{csh.sh} and can be manipulated with the alternatives command. - -== Lmod - -https://www.tacc.utexas.edu/tacc-projects/lmod[Lmod] is an environment modules implementation written in Lua, and can make use of module files written in Lua as well as Tcl. Such files have a ".lua" extensions. However, such files *must not* be installed /usr/share/modulefiles so as to not cause issues when the environment-modules package is in use. Instead install into %\{_datadir}/lmod/lmod/modulefiles/Core. diff --git a/guidelines/modules/ROOT/pages/FontsPolicy.adoc b/guidelines/modules/ROOT/pages/FontsPolicy.adoc deleted file mode 100644 index 9688c1e..0000000 --- a/guidelines/modules/ROOT/pages/FontsPolicy.adoc +++ /dev/null @@ -1,1068 +0,0 @@ -= Fonts - -== Foreword - -The bulk of Fedora software relies on OpenType compliance and was tested against compliant fonts. - -Unfortunately, most font makers feel the OpenType specification is a document written by “software people” for “software people”. -They spurn its recommendations. -They can not be relied upon to release fonts in a software-friendly state, -nor to fix the resulting problems, nor to provide useful advice. - -To enable the packaging of fonts by non experts, <> provides a list of sanity rules. -Most are short unambiguous one liners, easy to understand and apply. -Do read this list, even if it feels long. -Unless your upstream is a model of discipline, you WILL need it. -Avoid <> if you do not feel ambitious – here be dragons. - -Once you sorted what to package using the checklist, the rpm-specific part of fonts packaging is simple: - -* take our spec templates, -* fill in the blanks with descriptions and the file lists resulting from the sorting. - -Fedora automation will do the rest. - -<> provides in-depth documentation of those templates, and other operational tips. -The operational tips are useful. -The spec templates documentation, not so much. -The templates are commented and will usually be self-explanatory. - -Lastly, <> provides some help, in case a third party attempts to confuse you. -A lot of upstreams are dead set against applying OpenType recommendations. -They will provide elaborate argumentation, on why the common rule does not apply to them. - -== Checklist - -=== Legal - -* [x] Font files MUST comply with our https://docs.fedoraproject.org/en-US/legal/license-approval/#_licenses_allowed_for_fonts. -* [x] Trademark uses MUST be authorized by their owners, -** trademarks may occur in font naming or font content (logos…). -* [x] Registered names or trademarks MUST NOT prevent downstream modifications, -** requiring a rename on significant modification is acceptable. - -=== Packaging unit: an ideal font family - -Because fonts upstreams are, on average, extremely messy, -a large part of packaging fonts involves sorting files and fixing font file metadata to produce the consistent and -reliable font catalog expected by applications and users. - -[IMPORTANT] -==== -.Font family -A **font family** is composed of *font files, that share a single design, and differ ONLY in*: -[horizontal] -Weight:: Bold, Black… -Width∕Stretch:: Narrow, Condensed, Expanded… -Slope/Slant:: Italic, Oblique -Optical sizing:: Caption… - -Those parameters correspond to the -https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg#registered-axis-tags[default axes] -of OpenType variable fonts. -==== - -* [x] Packagers MUST apply the definition provided in this section to determine font family boundaries, -** it takes precedence over application support concerns, over upstream and packager habits and practices. - -See also the <> section. - -=== Font file formats - -[NOTE] -==== -.OpenType: one standard, five formats -https://en.wikipedia.org/wiki/OpenType[OpenType] uses an _SFNT_ container around bitmaps (`+*.otb+`) and -outlines in _TT_ (`+*.ttf+`) or _CFF_ (`+*.otf+`) formats. -Multiple fonts can be consolidated in a single collection (`+*.ttc+` or `+*.otc+`). -==== - -* [x] Other font formats MUST be converted to OpenType, -** except for fonts, intended to be used in the console (NOT a terminal emulator): see <>. -* [x] Font packages MUST NOT contain font files in non OpenType formats. - -[NOTE] -==== -.Font packages -A *font package*, is an installation (RPM) package, containing OpenType font files. -It MAY be produced by a source (SRPM) package, that also produces other (font or non-font) packages. -Other kinds of font packages are out of scope for this document. -==== - -* [x] A font family MUST NOT be packaged in multiple or mixed OpenType formats, -** except for variable font data, -** except when mixing is required, to achieve full symbol (glyph) coverage, -** except as an application workaround; see <>. -* [x] Both variable and non-variable OpenType font files, SHOULD be packaged, for a given font family. -* [x] OpenType format mixing SHOULD be justified in a comment within the `spec` file. -* [x] OpenType collection formats SHOULD be avoided. - -=== Fontconfig - -* [x] Font packages SHOULD include the fontconfig files, -that define the selection and substitution rules applying to their font files, -** written by the packager if upstream does not provide them. -* [x] Fontconfig rules MUST rewrite `family` and `style` when they are not compliant with -https://docs.microsoft.com/en-us/typography/opentype/spec/name#name-ids[OpenType WWS] rules: -** `family` MUST NOT contain _Weight_, _Width_ or _Slope_ attributes (ideal WWS family name, Name ID 21), -** `style` MUST contain only _Weight_, _Width_ or _Slope_ attributes (ideal WWS subfamily name, Name ID 22), -** Name ID 21 & 22 fields may exist or not in the packaged font files, and may be correct or not. The packager MUST set the correct value at the fontconfig level if the value fontconfig extracts from font files is incorrect. -* [x] Fontconfig rules MUST rewrite `family` to remove format attributes when they exist, -** for example: `OT`, `TT`, `Variable`, `Graphite`, `G`, etc, -** except when <>; -in that case the removal MUST only be done for the font package providing the default format. -* [x] Fontconfig rules MUST rewrite `family` to remove coverage attributes when they exist, -** for example: `Math`, `Emoji`, `Color Emoji`, `Hebrew`, `Arabic`, `Thai`, `LGC`, etc, -** except when several font files provide the same coverage, -requiring a qualifier to distinguish between them; -in that case the removal MUST be done for the default file, -and other files MUST be treated as parts of separate font families. -* [x] Fontconfig rules MUST rewrite `fullname` to `