Blame README-epel-8-packaging.md

e98c609
# EPEL-8 Packaging Procedures
e98c609
e98c609
## Introduction
e98c609
e98c609
When a new Red Hat Enterprise Linux occurs, one of the steps to get
e98c609
EPEL going for it is branching of various packages into new
e98c609
namespace. The EPEL Steering Committee does not mass branch all
e98c609
existing packages into the namespace because it has caused multiple
e98c609
problems:
e98c609
e98c609
1. The package maintainers did not want to support the package in the
e98c609
newer version of EPEL. Package maintainers may only want to support
e98c609
certain versions of Enterprise Linux or may want to wait until their
e98c609
favourite derivative appears.
e98c609
e98c609
2. The package does not work in the latest version of RHEL. With
e98c609
multiple years between releases, software which worked on Fedora 18
e98c609
which would branch to EPEL-7 may not exist anymore with Fedora 28 and
e98c609
EPEL-8 would need a completely different version.
e98c609
e98c609
## Consumer request for packages
e98c609
e98c609
People who are interested in getting packages into EPEL should contact
e98c609
the package maintainer through
e98c609
[bugzilla](https://bugzilla.redhat.com/). This allows for the requests
e98c609
to be tracked and if the primary maintainer is not interested in
e98c609
branching to EPEL, other ones can step in and do so.
e98c609
0bf1a81
## EPEL Next
0bf1a81
0bf1a81
EPEL packages are built against RHEL.  EPEL Next is an additional repository
0bf1a81
that allows package maintainers to alternatively build against CentOS Stream.
0bf1a81
This is sometimes necessary when CentOS Stream contains an upcoming RHEL
0bf1a81
library rebase, or if an EPEL package has a minimum version build requirement
0bf1a81
that is already in CentOS Stream but not yet in RHEL.  EPEL Next has its own
0bf1a81
distgit branches, koji build targets, and bodhi releases.
0bf1a81
0bf1a81
EPEL Next packages have `.next` appended to the disttag (e.g. a disttag of
0bf1a81
`.el8.next` for epel8-next) to provide an upgrade path from an EPEL package
0bf1a81
that was built from the same distgit commit.  A package maintainer can rebuild
0bf1a81
the same commit for both EPEL and EPEL Next and get two different NVRs in koji.
0bf1a81
Within six months, the build requirement necessitating building in EPEL Next
0bf1a81
should be in RHEL, and at that time the package maintainer can do a normal
0bf1a81
release bump commit in the EPEL branch and get a newer NVR than both the
0bf1a81
previous EPEL and EPEL Next packages.
0bf1a81
0bf1a81
To get started with EPEL Next, request the corresponding branch for the EPEL
0bf1a81
release you are targeting, e.g. request an epel8-next branch to rebuild an
0bf1a81
epel8 package against CentOS Stream 8.  Once the branch is created you can
0bf1a81
merge commits from other branches and submit a build just like you would for
0bf1a81
other EPEL or Fedora branches.
0bf1a81
e98c609
## EPEL Playground
e98c609
eff7537
EPEL Playground was shut down in January 2022
eff7537
eff7537
EPEL 8 Playground was a place that developers and maintainers could 
eff7537
"play around" with updated, or changed packages in epel. EPEL Playground
eff7537
never really worked out and ended up being more burden than helpful.
eff7537
eff7537
If developers or maintainers want something similar to EPEL Playground 
eff7537
we recommend Fedora COPR, which has availability for EPEL builds.
eff7537
e98c609
e98c609
## Developer request for branching multiple packages
e98c609
e98c609
Branching is handled the same way as requesting a branch using `fedpkg
e98c609
request-branch`. A maintainer can request an epel8 branch using
e98c609
`fedpkg request-branch epel8` which will create a ticket in
e98c609
https://pagure.io/releng/fedora-scm-requests/issues and Release
e98c609
Engineering will process these requests.
e98c609
e98c609
To branch multiple packages please use this or a variant of this
e98c609
script:
e98c609
e98c609
```
e98c609
#!/usr/bin/sh
e98c609
# Reminder to get an updated pagure token for releng tickets
e98c609
# Usage: epel-8.sh foo bar goo blah blech
e98c609
if [ $# -lt 1 ]
e98c609
then
e98c609
    echo "At least one package name should be provided"
e98c609
else
e98c609
    TMPDIR=`mktemp -d /tmp/epel8.XXXXXX`
e98c609
    pushd "$TMPDIR"
e98c609
    for pkg in "$@"
e98c609
    do
e98c609
        fedpkg clone "$pkg"
e98c609
        pushd "$pkg"
e98c609
        fedpkg request-branch epel8
e98c609
	    fedpkg request-branch epel8-playground
e98c609
        popd
e98c609
    done
e98c609
    rm -rfv "$TMPDIR"
e98c609
fi
e98c609
```
e98c609
e98c609
Releng will then work through the tickets in the system which is
e98c609
adding branches to the PDC and src.fedoraproject.org.
e98c609
e98c609
e98c609
## Known Issues
e98c609
e98c609
1. /usr/bin/python does not exist. Choose ``/usr/bin/python3`` or
e98c609
``/usr/bin/python2`` and patch appropriately.
e98c609
e98c609
2. ``python2-sphinx`` is not shipped. Most packages should work with
e98c609
python3-sphinx, and if it doesn't please open a bug. The python team
e98c609
has been good about making fixes for this.
e98c609
e98c609
3. When branching python packages, be aware that python in EL-8 is
e98c609
python36 and not the version currently in rawhide. This has come up
e98c609
with a couple of test packages where they assumed python37 or later.
e98c609
e98c609
4. ``systemd-rpm-macros`` is not a separate packages. If needed, used
e98c609
``BuildRequires: systemd``
e98c609
e98c609
5. While EL-8 comes with platform-python, it should NOT be used in
e98c609
``Requires:`` unless absolutely neccessary. python3 should be used
e98c609
instead. (Exceptions can be made but will be rare and need
e98c609
justification.)
e98c609
e98c609
**Accepted Exceptions:**
e98c609
* Use python3.6dist(coverage) instead of python3-coverage. This
e98c609
  package is not shipped but is needed in %check code.
e98c609
e98c609
6. Sometimes RHEL8 only has a python3 package for a dependency you
e98c609
need for your build. (Example: python-bleach requires
e98c609
python2-html5lib, but RHEL8 provides only python3-html5lib). For
e98c609
EPEL-8.0 we only suggest one choice:
e98c609
e98c609
* Choose not to have the python2 part of your package and patch
e98c609
  whatever to use python3.
e98c609
e98c609
7. Python2 packages are discouraged. RHEL-8 will contain python2.7
e98c609
until probably the end of life of RHEL-7. However support upstream
e98c609
will only be minimal. When modularity occurs, we suggest that you make
e98c609
whatever python2 packages modules which can be pulled out when
e98c609
RHEL-8.N no longer has python2.
e98c609
e98c609
8. While a RHEL src.rpm might produce a -devel package, it may not
e98c609
currently be in the build repository. When running into this please
e98c609
open a ticket with https://pagure.io/epel/new_issue for us to put in a
e98c609
request for it to be added to Red Hat's Code Ready Builder. After
e98c609
modularity is enabled, changes to what is done will be needed.
e98c609
e98c609
9. EPEL-8.0 may not work with the RHEL-8.1 beta. There seem to be
e98c609
changes in dnf and zchunk which we have not worked out. This line will
e98c609
be updated.
e98c609
e98c609
e98c609
## Definitions
e98c609
e98c609
1. Package maintainer. Person who has accepted responsibility to
e98c609
package and maintain software in the Fedora Project ecosystem. The
e98c609
main packager is usually someone focused on Fedora Linux, and
e98c609
secondary packagers may be focused on particular use cases like EPEL.
e98c609
e98c609
2. Consumer. A person who has subscribed to EPEL for packages but is
e98c609
not a maintainer.
e98c609
e98c609
3. PDC. Product Definition Center. A tool to help list the lifetime
e98c609
and permissions that a product has so that branching and updates can
e98c609
be better managed.