Skip to content

Commit

Permalink
debian: fix dpkg tool invocations to work on Ubuntu 12.04
Browse files Browse the repository at this point in the history
dpkg-parsechangelog and dpkg-source were both using flags
not yet available in the versions available on 12.04.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
  • Loading branch information
Silas McCroskey authored and mwinter-osr committed Nov 18, 2017
1 parent a8247b2 commit 79c81c2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion debian/backports/rules
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc:
-c$$(CONTROL_$(1)) \
--format='3.0 (custom)' \
--target-format='$$(SOURCEFORMAT_$(1))' \
--build . $$^
-b . $$^

ifeq ($$(SOURCEFORMAT_$(1)),3.0 (quilt))
# this target depends on the orig.tar.gz file, for which there is no target in
Expand Down
5 changes: 3 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ KNOWN_BACKPORTS = ubuntu12.04 ubuntu14.04 ubuntu16.04
ORIG_VERSION := $(shell dh_testdir && grep -E < configure.ac '^AC_INIT\(.*\)' \
| cut -d, -f2 | xargs echo)
DEBIAN_VERSION := $(shell dh_testdir && \
dpkg-parsechangelog -c1 -Sversion < debian/changelog)
dpkg-parsechangelog -c1 < debian/changelog | \
sed -rn 's/^Version: ?//p')
-include debian/backports/rules

ifneq ($(TARBALLDIR),)
# better error message on missing .orig.tar.gz
$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz:
@ echo "\`$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz'" not
@ echo "\`$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz'" not \
found and not generated by debian/rules. Provided you have the \
necessary packages installed, you can generate it yourself via \
"\"./bootstrap.sh && ./configure && make dist\"" \
Expand Down
19 changes: 19 additions & 0 deletions debian/rules.orig
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,22 @@ override_dh_systemd_start:
override_dh_systemd_enable:
dh_systemd_enable frr.service

# backports
SRCPKG = frr
KNOWN_BACKPORTS = ubuntu12.04 ubuntu14.04 ubuntu16.04
ORIG_VERSION := $(shell dh_testdir && grep -E < configure.ac '^AC_INIT\(.*\)' \
| cut -d, -f2 | xargs echo)
DEBIAN_VERSION := $(shell dh_testdir && \
dpkg-parsechangelog -c1 -Sversion < debian/changelog)
-include debian/backports/rules

ifneq ($(TARBALLDIR),)
# better error message on missing .orig.tar.gz
$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz:
@ echo "\`$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz'" not
found and not generated by debian/rules. Provided you have the \
necessary packages installed, you can generate it yourself via \
"\"./bootstrap.sh && ./configure && make dist\"" \
and renaming the resulting file.
exit 1
endif # def TARBALLDIR

0 comments on commit 79c81c2

Please sign in to comment.