forked from Mirror/frr
debian: make package "official"
Move us into place in debian/ Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
93b389bb9e
commit
b3c4c164b5
|
@ -124,7 +124,7 @@ include watchfrr/subdir.am
|
|||
include qpb/subdir.am
|
||||
include fpm/subdir.am
|
||||
include tools/subdir.am
|
||||
include debianpkg/subdir.am
|
||||
include debian/subdir.am
|
||||
include solaris/subdir.am
|
||||
|
||||
include bgpd/subdir.am
|
||||
|
|
|
@ -2198,7 +2198,7 @@ AC_CONFIG_FILES([
|
|||
config.version
|
||||
redhat/frr.spec
|
||||
solaris/Makefile
|
||||
debianpkg/changelog-auto
|
||||
debian/changelog-auto
|
||||
alpine/APKBUILD
|
||||
snapcraft/snapcraft.yaml
|
||||
lib/version.h
|
||||
|
|
|
@ -22,8 +22,8 @@ which itself is a fork of Zebra.
|
|||
Zebra was developed by Kunihiro Ishiguro.
|
||||
|
||||
|
||||
* Build Profiles used in the upstream debianpkg/
|
||||
================================================
|
||||
* Build Profiles used in the upstream debian/
|
||||
=============================================
|
||||
|
||||
The following Build Profiles have been added:
|
||||
|
0
debianpkg/changelog → debian/changelog
vendored
0
debianpkg/changelog → debian/changelog
vendored
0
debianpkg/compat → debian/compat
vendored
0
debianpkg/compat → debian/compat
vendored
0
debianpkg/control → debian/control
vendored
0
debianpkg/control → debian/control
vendored
0
debianpkg/copyright → debian/copyright
vendored
0
debianpkg/copyright → debian/copyright
vendored
0
debianpkg/frr.conf → debian/frr.conf
vendored
0
debianpkg/frr.conf → debian/frr.conf
vendored
0
debianpkg/frr.dirs → debian/frr.dirs
vendored
0
debianpkg/frr.dirs → debian/frr.dirs
vendored
0
debianpkg/frr.docs → debian/frr.docs
vendored
0
debianpkg/frr.docs → debian/frr.docs
vendored
0
debianpkg/frr.pam → debian/frr.pam
vendored
0
debianpkg/frr.pam → debian/frr.pam
vendored
0
debianpkg/frr.prerm → debian/frr.prerm
vendored
0
debianpkg/frr.prerm → debian/frr.prerm
vendored
2
debianpkg/rules → debian/rules
vendored
2
debianpkg/rules → debian/rules
vendored
|
@ -103,5 +103,5 @@ override_dh_missing:
|
|||
|
||||
override_dh_auto_clean:
|
||||
# we generally do NOT want a full distclean since that wipes both
|
||||
# debianpkg/changelog and config.version
|
||||
# debian/changelog and config.version
|
||||
if test -f Makefile; then make redistclean; fi
|
45
debian/subdir.am
vendored
Normal file
45
debian/subdir.am
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# debian
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
debian/README.Debian \
|
||||
debian/README.Maintainer \
|
||||
debian/changelog \
|
||||
debian/changelog-auto \
|
||||
debian/compat \
|
||||
debian/control \
|
||||
debian/copyright \
|
||||
debian/rules \
|
||||
debian/source/format \
|
||||
debian/source/lintian-overrides \
|
||||
debian/tests/control \
|
||||
debian/tests/daemons \
|
||||
debian/watchfrr.rc \
|
||||
debian/watch \
|
||||
\
|
||||
debian/frr-dbg.lintian-overrides \
|
||||
debian/frr-doc.doc-base \
|
||||
debian/frr-doc.info \
|
||||
debian/frr-doc.install \
|
||||
debian/frr-doc.lintian-overrides \
|
||||
debian/frr-pythontools.install \
|
||||
debian/frr-pythontools.lintian-overrides \
|
||||
debian/frr-rpki-rtrlib.install \
|
||||
debian/frr-rpki-rtrlib.lintian-overrides \
|
||||
debian/frr-snmp.install \
|
||||
debian/frr-snmp.lintian-overrides \
|
||||
debian/frr.conf \
|
||||
debian/frr.dirs \
|
||||
debian/frr.docs \
|
||||
debian/frr.install \
|
||||
debian/frr.lintian-overrides \
|
||||
debian/frr.logrotate \
|
||||
debian/frr.manpages \
|
||||
debian/frr.pam \
|
||||
debian/frr.postinst \
|
||||
debian/frr.postrm \
|
||||
debian/frr.preinst \
|
||||
debian/frr.prerm \
|
||||
debian/not-installed \
|
||||
# end
|
0
debianpkg/watch → debian/watch
vendored
0
debianpkg/watch → debian/watch
vendored
|
@ -1,45 +0,0 @@
|
|||
#
|
||||
# debianpkg
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
debianpkg/README.Debian \
|
||||
debianpkg/README.Maintainer \
|
||||
debianpkg/changelog \
|
||||
debianpkg/changelog-auto \
|
||||
debianpkg/compat \
|
||||
debianpkg/control \
|
||||
debianpkg/copyright \
|
||||
debianpkg/rules \
|
||||
debianpkg/source/format \
|
||||
debianpkg/source/lintian-overrides \
|
||||
debianpkg/tests/control \
|
||||
debianpkg/tests/daemons \
|
||||
debianpkg/watchfrr.rc \
|
||||
debianpkg/watch \
|
||||
\
|
||||
debianpkg/frr-dbg.lintian-overrides \
|
||||
debianpkg/frr-doc.doc-base \
|
||||
debianpkg/frr-doc.info \
|
||||
debianpkg/frr-doc.install \
|
||||
debianpkg/frr-doc.lintian-overrides \
|
||||
debianpkg/frr-pythontools.install \
|
||||
debianpkg/frr-pythontools.lintian-overrides \
|
||||
debianpkg/frr-rpki-rtrlib.install \
|
||||
debianpkg/frr-rpki-rtrlib.lintian-overrides \
|
||||
debianpkg/frr-snmp.install \
|
||||
debianpkg/frr-snmp.lintian-overrides \
|
||||
debianpkg/frr.conf \
|
||||
debianpkg/frr.dirs \
|
||||
debianpkg/frr.docs \
|
||||
debianpkg/frr.install \
|
||||
debianpkg/frr.lintian-overrides \
|
||||
debianpkg/frr.logrotate \
|
||||
debianpkg/frr.manpages \
|
||||
debianpkg/frr.pam \
|
||||
debianpkg/frr.postinst \
|
||||
debianpkg/frr.postrm \
|
||||
debianpkg/frr.preinst \
|
||||
debianpkg/frr.prerm \
|
||||
debianpkg/not-installed \
|
||||
# end
|
|
@ -37,7 +37,7 @@ Release Build Procedure for FRR Maintainers
|
|||
|
||||
4. Update Changelog for Debian Packages:
|
||||
|
||||
Edit :file:`debianpkg/changelog.in`:
|
||||
Edit :file:`debian/changelog-auto.in`:
|
||||
|
||||
- Change last (top of list) entry from ``@VERSION@`` to previous fixed
|
||||
version number, i.e.::
|
||||
|
|
|
@ -1,29 +1,16 @@
|
|||
Packaging Debian
|
||||
================
|
||||
|
||||
(Tested on Ubuntu 12.04, 14.04, 16.04, 17.10, 18.04, Debian 8 and 9)
|
||||
|
||||
.. note::
|
||||
|
||||
If you try to build for a different distro, then it will most likely fail
|
||||
because of the missing backport. See :ref:`deb-backports` about adding a new
|
||||
backport.
|
||||
(Tested on Ubuntu 14.04, 16.04, 17.10, 18.04, Debian jessie, stretch and
|
||||
buster.)
|
||||
|
||||
1. Install build dependencies for your platform as outlined in :ref:`building`.
|
||||
|
||||
2. Install the following additional packages:
|
||||
|
||||
- on Ubuntu 12.04, 14.04, 16.04, 17.10, Debian 8 and 9:
|
||||
2. Install the general Debian package building tools:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
apt-get install realpath equivs groff fakeroot debhelper devscripts
|
||||
|
||||
- on Ubuntu 18.04: (realpath is now part of preinstalled by coreutils)
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
apt-get install equivs groff fakeroot debhelper devscripts
|
||||
apt-get install equivs fakeroot debhelper devscripts
|
||||
|
||||
3. Checkout FRR under a **unprivileged** user account:
|
||||
|
||||
|
@ -38,13 +25,21 @@ Packaging Debian
|
|||
|
||||
git checkout <branch>
|
||||
|
||||
4. Run ``bootstrap.sh`` and make a dist tarball:
|
||||
4. Build Debian package dependencies and install them as needed.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
sudo mk-build-deps --install debian/control
|
||||
|
||||
5. Run ``bootstrap.sh``:
|
||||
|
||||
(This step should be omitted if you are using a "debian" branch, as opposed
|
||||
to the "master", a "stable/X.X" or any other non-"debian" branch.)
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
./bootstrap.sh
|
||||
./configure --with-pkg-extra-version=-MyDebPkgVersion
|
||||
make dist
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -52,48 +47,7 @@ Packaging Debian
|
|||
except the `with-pkg-extra-version` if you want to give the Debian
|
||||
package a specific name to mark your own unoffical build.
|
||||
|
||||
5. Edit :file:`debianpkg/rules` and set the configuration as needed.
|
||||
|
||||
Look for section ``dh_auto_configure`` to modify the configure options as
|
||||
needed. Options might be different between the top-level ``rules``` and
|
||||
:file:`backports/XXXX/debian/rules`. Please adjust as needed on all files.
|
||||
|
||||
6. Create backports debian sources
|
||||
|
||||
Rename the :file:`debianpkg` directory to :file:`debian` and create the
|
||||
backports (Debian requires to not ship a :file:`debian` directory inside the
|
||||
source directory to avoid build conflicts with the reserved ``debian``
|
||||
subdirectory name during the build):
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mv debianpkg debian
|
||||
make -f debian/rules backports
|
||||
|
||||
This will create a :file:`frr_*.orig.tar.gz` with the source (same as the
|
||||
dist tarball), as well as multiple :file:`frr_*.debian.tar.xz` and
|
||||
:file:`frr_*.dsc` corresponding to each distribution for which a backport is
|
||||
available.
|
||||
|
||||
7. Create a new directory to build the package and populate with package
|
||||
source.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mkdir frrpkg
|
||||
cd frrpkg
|
||||
tar xf ~/frr/frr_*.orig.tar.gz
|
||||
cd frr*
|
||||
. /etc/os-release
|
||||
tar xf ~/frr/frr_*${ID}${VERSION_ID}*.debian.tar.xz
|
||||
|
||||
8. Build Debian package dependencies and install them as needed.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
sudo mk-build-deps --install debian/control
|
||||
|
||||
9. Build Debian Package
|
||||
6. Build Debian Package
|
||||
|
||||
Building with standard options:
|
||||
|
||||
|
@ -101,80 +55,9 @@ Packaging Debian
|
|||
|
||||
debuild -b -uc -us
|
||||
|
||||
Or change some options (see `rules` file for available options):
|
||||
7. Done!
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
debuild --set-envvar=WANT_BGP_VNC=1 --set-envvar=WANT_CUMULUS_MODE=1 -b -uc -us
|
||||
|
||||
To build with RPKI:
|
||||
|
||||
- Download the librtr packages from
|
||||
https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
|
||||
|
||||
- install librtr-dev on the build server
|
||||
|
||||
Then build with:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
debuild --set-envvar=WANT_RPKI=1 -b -uc -us
|
||||
|
||||
RPKI packages have an additonal dependency of ``librtr0`` which can be found
|
||||
at the same URL.
|
||||
|
||||
10. Done!
|
||||
|
||||
If all worked correctly, then you should end up with the Debian packages under
|
||||
:file:`frrpkg`. If distributed, please make sure you distribute it together
|
||||
with the sources (``frr_*.orig.tar.gz``, ``frr_*.debian.tar.xz`` and
|
||||
If all worked correctly, then you should end up with the Debian packages in
|
||||
the parent directory. If distributed, please make sure you distribute it
|
||||
together with the sources (``frr_*.orig.tar.gz``, ``frr_*.debian.tar.xz`` and
|
||||
``frr_*.dsc``)
|
||||
|
||||
The build procedure can also be executed automatically using the ``tools/build-debian-package.sh``
|
||||
script. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
EXTRA_VERSION="-myversion" WANT_SNMP=1 WANT_CUMULUS_MODE=1 tools/build-debian-package.sh
|
||||
|
||||
.. _deb-backports:
|
||||
|
||||
Debian Backports
|
||||
----------------
|
||||
|
||||
The :file:`debianpkg/backports` directory contains the Debian directories for
|
||||
backports to other Debian platforms. These are built via the ``3.0 (custom)``
|
||||
source format, which allows one to build a source package directly out of
|
||||
tarballs (e.g. an orig.tar.gz tarball and a debian.tar.gz file), at which point
|
||||
the format can be changed to a real format (e.g. ``3.0 (quilt)``).
|
||||
|
||||
Source packages are assembled via targets of the same name as the system to
|
||||
which the backport is done (e.g. ``precise``), included in :file:`debian/rules`.
|
||||
|
||||
To create a new Debian backport:
|
||||
|
||||
- Add its name to ``KNOWN_BACKPORTS``, defined in :file:`debian/rules`.
|
||||
- Create a directory of the same name in :file:`debian/backports`.
|
||||
- Add the files ``exclude``, ``versionext``, and ``debian/source/format`` under
|
||||
this directory.
|
||||
|
||||
For the last point, these files should contain the following:
|
||||
|
||||
``exclude``
|
||||
Contains whitespace-separated paths (relative to the root of the source dir)
|
||||
that should be excluded from the source package (e.g.
|
||||
:file:`debian/patches`).
|
||||
|
||||
``versionext``
|
||||
Contains the suffix added to the version number for this backport's build.
|
||||
Distributions often have guidelines for what this should be. If left empty,
|
||||
no new :file:`debian/changelog` entry is created.
|
||||
|
||||
``debian/source/format``
|
||||
Contains the source format of the resulting source package. As of of the
|
||||
writing of this document the only supported format is ``3.0 (quilt)``.
|
||||
|
||||
- Add appropriate files under the :file:`debian/` subdirectory. These will be
|
||||
included in the source package, overriding any top-level :file:`debian/`
|
||||
files with equivalent paths.
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ if test -d "$src/.git"; then
|
|||
# if there have been changes to packaging or tests, it's still the
|
||||
# same release
|
||||
changes="`git diff --name-only "$gittag" $commit | \
|
||||
egrep -v '\.git|^m4/|^config|^README|^alpine/|^debianpkg/|^pkgsrc/|^ports/|^redhat/|^snapcraft/|^solaris/|^tests/|^gdb/|^docker/|^\.' | \
|
||||
egrep -v '\.git|^m4/|^config|^README|^alpine/|^debian/|^pkgsrc/|^ports/|^redhat/|^snapcraft/|^solaris/|^tests/|^tools/|^gdb/|^docker/|^\.' | \
|
||||
wc -l`"
|
||||
if test "$changes" -eq 0; then
|
||||
adjchangelog=true
|
||||
|
@ -206,7 +206,7 @@ if test -d "$src/.git"; then
|
|||
test $extraset = false -a -f "$tmpdir/.gitpr" && extraver="-PR`cat \"$tmpdir/.gitpr\"`$extraver"
|
||||
fi
|
||||
|
||||
debsrc="( git ls-files debianpkg/; echo debianpkg/changelog )"
|
||||
debsrc="git ls-files debian/"
|
||||
else
|
||||
if $nongit; then
|
||||
echo -e "\033[31;1mWARNING: this script should be executed from a git tree\033[m" >&2
|
||||
|
@ -214,7 +214,7 @@ else
|
|||
echo -e "\033[31;1mERROR: this script should be executed from a git tree\033[m" >&2
|
||||
exit 1
|
||||
fi
|
||||
debsrc="echo debianpkg"
|
||||
debsrc="echo debian"
|
||||
fi
|
||||
|
||||
if $writeversion; then
|
||||
|
@ -265,22 +265,21 @@ lsfiles="frr-${PACKAGE_VERSION}.tar.$zip"
|
|||
|
||||
if $debian; then
|
||||
mkdir -p "$tmpdir/debian/source"
|
||||
cp debianpkg/changelog "$tmpdir/debian/changelog"
|
||||
cat debian/changelog > "$tmpdir/debian/changelog"
|
||||
if $adjchangelog; then
|
||||
if grep -q 'autoconf changelog entry' debianpkg/changelog; then
|
||||
tail -n +9 debianpkg/changelog > "$tmpdir/debian/changelog"
|
||||
if grep -q 'autoconf changelog entry' debian/changelog; then
|
||||
tail -n +9 debian/changelog > "$tmpdir/debian/changelog"
|
||||
fi
|
||||
fi
|
||||
echo '3.0 (quilt)' > "$tmpdir/debian/source/format"
|
||||
DEBVER="`dpkg-parsechangelog -l\"$tmpdir/debian/changelog\" -SVersion`"
|
||||
|
||||
# rename debianpkg to debian while tar'ing
|
||||
eval $debsrc | tar -cho $taropt \
|
||||
--exclude-vcs --exclude debianpkg/source/format \
|
||||
--exclude debianpkg/changelog \
|
||||
--exclude debianpkg/changelog.in \
|
||||
--exclude debianpkg/subdir.am \
|
||||
--transform 's%^debianpkg%debian%' \
|
||||
--exclude-vcs --exclude debian/source/format \
|
||||
--exclude debian/changelog \
|
||||
--exclude debian/changelog-auto \
|
||||
--exclude debian/changelog-auto.in \
|
||||
--exclude debian/subdir.am \
|
||||
-T - -f ../frr_${DEBVER}.debian.tar
|
||||
# add specially prepared files from above
|
||||
tar -uf ../frr_${DEBVER}.debian.tar $taropt -C "$tmpdir" debian/source/format debian/changelog
|
||||
|
@ -290,7 +289,7 @@ if $debian; then
|
|||
|
||||
# pack up debian files proper
|
||||
ln -s "$outdir/frr-${PACKAGE_VERSION}.tar.$zip" ../frr_${PACKAGE_VERSION}.orig.tar.$zip
|
||||
dpkg-source -l"$tmpdir/debian/changelog" -c"`pwd`/debianpkg/control" \
|
||||
dpkg-source -l"$tmpdir/debian/changelog" \
|
||||
--format='3.0 (custom)' --target-format='3.0 (quilt)' \
|
||||
-b . frr_${PACKAGE_VERSION}.orig.tar.$zip frr_${DEBVER}.debian.tar.$zip
|
||||
|
||||
|
|
Loading…
Reference in a new issue