Skip to content

Commit

Permalink
Revert "debian: Remove the changelog-auto automation in favor of dch"
Browse files Browse the repository at this point in the history
This reverts commit cace1d9.
  • Loading branch information
qlyoung committed Nov 19, 2020
1 parent 2013e82 commit fb0b359
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -28,6 +28,7 @@
/aclocal.m4
/libtool
/libtool.orig
/debian/changelog-auto

/Makefile
/Makefile.in
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -2484,6 +2484,7 @@ AC_CONFIG_FILES([Makefile],[

AC_CONFIG_FILES([
config.version
debian/changelog-auto
redhat/frr.spec
alpine/APKBUILD
snapcraft/snapcraft.yaml
Expand Down
7 changes: 7 additions & 0 deletions debian/changelog-auto.in
@@ -0,0 +1,7 @@
frr (@VERSION@-0) UNRELEASED; urgency=medium

* autoconf changelog entry -- for git autobuilds only.
remove and replace when creating releases!
(tools/tarsource.sh will handle this)

-- FRRouting-Dev <dev@lists.frrouting.org> @DATE@
9 changes: 6 additions & 3 deletions doc/developer/packaging-debian.rst
Expand Up @@ -35,11 +35,14 @@ buster.)
Alternatively, you can manually install build dependencies for your
platform as outlined in :ref:`building`.

4. Install `git-buildpackage` package:
4. Run ``tools/tarsource.sh -V``:

.. code-block:: shell
sudo apt-get install git-buildpackage
./tools/tarsource.sh -V
This script sets up the ``debian/changelog-auto`` file with proper version
information.

5. (optional) Append a distribution identifier if needed (see below under
:ref:`multi-dist`.)
Expand All @@ -48,7 +51,7 @@ buster.)

.. code-block:: shell
gbp-buildpackage --git-builder=debuild $options
dpkg-buildpackage $options
Where `$options` may contain any or all of the following items:

Expand Down
11 changes: 6 additions & 5 deletions tools/tarsource.sh
Expand Up @@ -271,16 +271,17 @@ lsfiles="frr-${PACKAGE_VERSION}.tar.$zip"

if $debian; then
if ! $adjchangelog; then
dch --force-bad-version \
--force-distribution \
--preserve \
--newversion "$DEBVER" \
"autoconf changelog entry -- for git autobuilds only."
GIT_DATE=$(git log --format=format:%ad -1 --date=rfc)
sed -e "s/@DATE@/$GIT_DATE/" \
< debian/changelog-auto \
> "$tmpdir/debian/changelog"
fi
cat debian/changelog >> "$tmpdir/debian/changelog"
DEBVER="`dpkg-parsechangelog -l\"$tmpdir/debian/changelog\" -SVersion`"

eval $debsrc | tar -cho $taropt \
--exclude debian/changelog \
--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/changelog
Expand Down

0 comments on commit fb0b359

Please sign in to comment.