]> git.puffer.fish Git - matthieu/frr.git/commitdiff
debian/backports: include in distfile, don't put files in ..
authorSilas McCroskey <smccroskey@cumulusnetworks.com>
Tue, 14 Feb 2017 12:04:10 +0000 (19:04 +0700)
committerMartin Winter <mwinter@opensourcerouting.org>
Thu, 8 Jun 2017 22:11:59 +0000 (15:11 -0700)
Testing-done: ran 'make dist', unpacked elsewhere, built from result

Adjusted target to build the .orig.tar.gz accordingly, since it must
exclude the debian/ subdirectory.  Allows for building any backport from
only a tarball.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
.gitignore
Makefile.am
configure.ac
debian/Makefile.am [new file with mode: 0644]
debian/backports/rules
debian/rules
debian/rules.orig

index d592e8b3f3518579508a9b9fe7f13d5fa8c8af5b..0eeca07666f0a93cac28acc55609fe85e27ae869 100644 (file)
@@ -27,6 +27,7 @@ aclocal.m4
 Makefile.in
 *.tar.gz
 *.tar.gz.asc
+*.tar.?z
 .nfs*
 libtool
 .arch-inventory
@@ -55,6 +56,10 @@ debian/quagga.prerm.debhelper
 debian/quagga.substvars
 debian/quagga/
 debian/tmp/
+*.deb
+*.ddeb
+*.dsc
+*.changes
 *.swp
 cscope.*
 *.pb.h
index 3e73bd0cdd13dbebc24aa60af88f0ba7e8a3c538..ec633c83d53cf0f91fd218a527eae99386019ab1 100644 (file)
@@ -7,7 +7,8 @@ SUBDIRS = lib qpb fpm @ZEBRA@ @LIBRFP@ @RFPTEST@ \
 
 DIST_SUBDIRS = lib qpb fpm zebra bgpd ripd ripngd ospfd ospf6d ldpd \
          isisd watchfrr vtysh ospfclient doc m4 pkgsrc redhat tests \
-         solaris pimd @LIBRFP@ @RFPTEST@ tools cumulus snapcraft
+         solaris pimd @LIBRFP@ @RFPTEST@ tools cumulus snapcraft \
+         debian
 
 EXTRA_DIST = aclocal.m4 SERVICES REPORTING-BUGS \
        update-autotools \
index 9b0f627362bf958bc00ff240f2918a41c1d76ebf..1e84929b3ab2514fa35812f2874e5994075f7bca 100755 (executable)
@@ -1598,6 +1598,7 @@ AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile
          pimd/Makefile
          redhat/Makefile
          tools/Makefile
+         debian/Makefile
          cumulus/Makefile
          pkgsrc/Makefile
          fpm/Makefile
diff --git a/debian/Makefile.am b/debian/Makefile.am
new file mode 100644 (file)
index 0000000..56e3708
--- /dev/null
@@ -0,0 +1,36 @@
+
+EXTRA_DIST = README.Debian README.Maintainer \
+       changelog compat control copyright \
+       rules source/format tests/control \
+       tests/daemons watch watchquagga.rc \
+       backports/README backports/rules \
+       backports/ubuntu12.04/debian/control \
+       backports/ubuntu12.04/debian/quagga.install \
+       backports/ubuntu12.04/debian/quagga.postinst \
+       backports/ubuntu12.04/debian/rules \
+       backports/ubuntu12.04/debian/source/format \
+       backports/ubuntu12.04/exclude \
+       backports/ubuntu12.04/versionext \
+       backports/ubuntu14.04/debian/control \
+       backports/ubuntu14.04/debian/quagga.install \
+       backports/ubuntu14.04/debian/rules \
+       backports/ubuntu14.04/debian/source/format \
+       backports/ubuntu14.04/exclude \
+       backports/ubuntu14.04/versionext \
+       backports/ubuntu16.04/debian/source/format \
+       backports/ubuntu16.04/exclude \
+       backports/ubuntu16.04/versionext \
+       patches/50_vtysh__vtysh.conf.sample.diff \
+       patches/75_vtysh__vtysh.c__PAGER.diff \
+       patches/80_vtysh__vtysh.c__privs.diff \
+       patches/82_vtysh__vtysh_user.c__pam.diff \
+       patches/90_configure_ncurses.diff patches/series \
+       po/POTFILES.in po/cs.po po/da.po po/de.po po/es.po po/fr.po \
+       po/it.po po/ja.po po/nl.po po/pt.po po/pt_BR.po po/ru.po \
+       po/sv.po po/templates.pot \
+       quagga-doc.docs quagga-doc.info quagga-doc.install \
+       quagga-doc.lintian-overrides quagga.conf quagga.config \
+       quagga.dirs quagga.docs quagga.install \
+       quagga.lintian-overrides quagga.logrotate \
+       quagga.manpages quagga.pam quagga.postinst quagga.postrm \
+       quagga.preinst quagga.prerm
index a5b8991d135760f08cc2fe721d1814c9f9e53e5f..f2ae9cc9abd6fd95715b62dd0d8b97d2baa67735 100644 (file)
@@ -12,7 +12,7 @@ $(if $(filter-out $(wildcard $(required_files)),$(required_files)), \
                see debian/backports/README) \
 )
 
-TARBALLDIR ?= $(shell dh_testdir debian/changelog && realpath ../)
+TARBALLDIR ?= $(shell dh_testdir debian/changelog && realpath .)
 
 define backports-targets
 # if this file is empty, no automatic changelog entry is created
@@ -71,12 +71,14 @@ $(1): $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc ;
 # bypassing the usual checks (which wouldn't like our combination-of-
 # directories approach)
 $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc:
-       # -b directory unused (but required) for '3.0 (custom)' source format
+       # -b directory does nothing but determine will the .dsc will end up
+       # for the custom source format. Put it in the current directory by
+       # specifying one of its subdirs.
        dpkg-source -l$$(BACKPORTDIR_$(1))/debian/changelog \
                -c$$(CONTROL_$(1)) \
                --format='3.0 (custom)' \
                --target-format='$$(SOURCEFORMAT_$(1))' \
-               -b . $$^
+               -b debian $$^
 
 ifeq ($$(SOURCEFORMAT_$(1)),3.0 (quilt))
 # this target depends on the orig.tar.gz file, for which there is no target in
index 348e7eafd8dce6b6ada62e809e55c8cc9a40ff18..7ab74b1dd3d3b4b7864d2a0f3081950e35c55915 100755 (executable)
@@ -107,12 +107,22 @@ DEBIAN_VERSION := $(shell dh_testdir && \
 -include debian/backports/rules
 
 ifneq ($(TARBALLDIR),)
+ifeq ($(wildcard quagga-$(ORIG_VERSION).tar.gz),quagga-$(ORIG_VERSION).tar.gz)
+
+$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz: \
+               quagga-$(ORIG_VERSION).tar.gz
+       gunzip -c < $< | tar --delete quagga-$(ORIG_VERSION)/debian/ \
+               | gzip -c > $@
+
+else # wildcard quagga-$(ORIG_VERSION).tar.gz
+
 # 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).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.
+               "\"./bootstrap.sh && ./configure && make dist\"".
        exit 1
-endif # def TARBALLDIR
+
+endif # wildcard quagga-$(ORIG_VERSION).tar.gz
+endif # TARBALLDIR nonempty
index 98bf6222b85b99e266676e89b4bd0bf2867127d6..348e7eafd8dce6b6ada62e809e55c8cc9a40ff18 100755 (executable)
@@ -102,13 +102,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\"" \