summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Debian/Dgit/GDR.pm26
-rw-r--r--Makefile32
-rw-r--r--debian/control11
-rwxr-xr-xdebian/rules5
-rw-r--r--debian/tests/control2
-rwxr-xr-xgit-debrebase1
-rwxr-xr-xtests/enumerate-tests2
8 files changed, 69 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 2a5d032..e821bb4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*~
tests/tmp
debian/dgit
+debian/git-debrebase
debian/dgit-infrastructure
debian/files
debian/*.substvars
diff --git a/Debian/Dgit/GDR.pm b/Debian/Dgit/GDR.pm
new file mode 100644
index 0000000..ca7e621
--- /dev/null
+++ b/Debian/Dgit/GDR.pm
@@ -0,0 +1,26 @@
+# -*- perl -*-
+
+package Debian::Dgit::GDR;
+
+use strict;
+use warnings;
+
+# Scripts and programs which are going to `use Debian::Dgit' but which
+# live in git-debrebase (ie are installed with install-gdr)
+# should `use Debian::Dgit::GDR' first. All this module does is
+# adjust @INC so that the script gets the version of the script from
+# the git-debrebase package (which is installed in a different
+# location and may be a different version).
+
+# To use this with ExitStatus, put at the top (before use strict, even):
+#
+# END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
+# use Debian::Dgit::GDR;
+# use Debian::Dgit::ExitStatus;
+#
+# and then replace every call to `exit' with `finish'.
+# Add a `finish 0' to the end of the program.
+
+# unshift @INC, q{/usr/share/dgit/gdr/perl5}; ###substituted###
+
+1;
diff --git a/Makefile b/Makefile
index 21ccc1b..0073b42 100644
--- a/Makefile
+++ b/Makefile
@@ -33,11 +33,8 @@ infraexamplesdir=$(prefix)/share/doc/dgit-infrastructure/examples
txtdocdir=$(prefix)/share/doc/dgit
absurddir=$(prefix)/share/dgit/absurd
-PROGRAMS=dgit dgit-badcommit-fixup git-debrebase
-MAN1PAGES=dgit.1 \
- git-debrebase.1
-
-MAN5PAGES=git-debrebase.5
+PROGRAMS=dgit dgit-badcommit-fixup
+MAN1PAGES=dgit.1
MAN7PAGES=dgit.7 \
dgit-user.7 dgit-nmu-simple.7 \
@@ -49,6 +46,14 @@ TXTDOCS=README.dsc-import
PERLMODULES=Debian/Dgit.pm Debian/Dgit/ExitStatus.pm
ABSURDITIES=git
+GDR_PROGRAMS=git-debrebase
+GDR_PERLMODULES= \
+ Debian/Dgit.pm \
+ Debian/Dgit/GDR.pm \
+ Debian/Dgit/ExitStatus.pm
+GDR_MAN1PAGES=git-debrebase.1
+GDR_MAN5PAGES=git-debrebase.5
+
INFRA_PROGRAMS=dgit-repos-server dgit-ssh-dispatch \
dgit-repos-policy-debian dgit-repos-admin-debian \
dgit-repos-policy-trusting dgit-mirror-rsync
@@ -58,7 +63,8 @@ INFRA_PERLMODULES= \
Debian/Dgit/Infra.pm \
Debian/Dgit/Policy/Debian.pm
-MANPAGES=$(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES)
+MANPAGES=$(MAN1PAGES) $(MAN5PAGES) $(MAN7PAGES) \
+ $(GDR_MAN1PAGES) $(GDR_MAN5PAGES)
all: $(MANPAGES) $(addprefix substituted/,$(PROGRAMS))
@@ -73,7 +79,6 @@ install: installdirs all
$(INSTALL_PROGRAM) $(addprefix absurd/,$(ABSURDITIES)) \
$(DESTDIR)$(absurddir)
$(INSTALL_DATA) $(MAN1PAGES) $(DESTDIR)$(man1dir)
- $(INSTALL_DATA) $(MAN5PAGES) $(DESTDIR)$(man5dir)
$(INSTALL_DATA) $(MAN7PAGES) $(DESTDIR)$(man7dir)
$(INSTALL_DATA) $(TXTDOCS) $(DESTDIR)$(txtdocdir)
set -e; for m in $(PERLMODULES); do \
@@ -87,6 +92,14 @@ installdirs:
$(DESTDIR)$(txtdocdir) $(DESTDIR)$(absurddir) \
$(addprefix $(DESTDIR)$(perldir)/, $(dir $(PERLMODULES)))
+install-gdr: installdirs-gdr
+ $(INSTALL_PROGRAM) $(GDR_PROGRAMS) $(DESTDIR)$(bindir)
+ $(INSTALL_DATA) $(GDR_MAN1PAGES) $(DESTDIR)$(man1dir)
+ $(INSTALL_DATA) $(GDR_MAN5PAGES) $(DESTDIR)$(man5dir)
+ set -e; for m in $(GDR_PERLMODULES); do \
+ $(INSTALL_DATA) $$m $(DESTDIR)$(perldir)/$${m%/*}; \
+ done
+
install-infra: installdirs-infra
$(INSTALL_PROGRAM) $(addprefix infra/, $(INFRA_PROGRAMS)) \
$(DESTDIR)$(bindir)
@@ -96,6 +109,11 @@ install-infra: installdirs-infra
$(INSTALL_DATA) $$m $(DESTDIR)$(perldir)/$${m%/*}; \
done
+installdirs-gdr:
+ $(INSTALL_DIR) $(DESTDIR)$(bindir) \
+ $(DESTDIR)$(man1dir) $(DESTDIR)$(man5dir) \
+ $(addprefix $(DESTDIR)$(perldir)/, $(dir $(GDR_PERLMODULES)))
+
installdirs-infra:
$(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(infraexamplesdir) \
$(addprefix $(DESTDIR)$(perldir)/, $(dir $(INFRA_PERLMODULES)))
diff --git a/debian/control b/debian/control
index 3180c85..224e52a 100644
--- a/debian/control
+++ b/debian/control
@@ -15,7 +15,7 @@ Depends: perl, libwww-perl, libdpkg-perl, git-core, devscripts, dpkg-dev,
libdigest-sha-perl, dput, curl, apt,
libjson-perl, ca-certificates,
libtext-iconv-perl, libtext-glob-perl
-Recommends: ssh-client, libfile-fnmatch-perl
+Recommends: ssh-client
Suggests: sbuild
Architecture: all
Description: git interoperability with the Debian archive
@@ -26,6 +26,15 @@ Description: git interoperability with the Debian archive
.
dgit clone and dgit fetch construct git commits from uploads.
+Package: git-debrebase
+Depends: perl, git-core, libdpkg-perl, libfile-fnmatch-perl
+ ${misc:Depends}
+Recommends: dgit, git-buildpackage
+Architecture: all
+Description: rebasing git workflow tool for Debian packaging
+ git-debrebase is a tool for representing in git, and manpulating,
+ Debian packages based on upstream source code.
+
Package: dgit-infrastructure
Depends: ${misc:Depends}, perl, git-core, gpgv, chiark-utils-bin,
libjson-perl, libdigest-sha-perl, libdbd-sqlite3-perl, sqlite3,
diff --git a/debian/rules b/debian/rules
index e51f893..baff8f8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,9 +32,12 @@ override_dh_gencontrol:
globalperl=/usr/share/perl5
-override_dh_auto_install: specpkg_install_infra
+override_dh_auto_install: specpkg_install_gdr specpkg_install_infra
make install prefix=/usr DESTDIR=debian/dgit
+specpkg_install_gdr: p=git-debrebase
+specpkg_install_gdr: pm=GDR
+
specpkg_install_infra: p=dgit-infrastructure
specpkg_install_infra: pm=Infra
diff --git a/debian/tests/control b/debian/tests/control
index ee9b7d7..a72f1b8 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -18,7 +18,7 @@ Restrictions: x-dgit-intree-only x-dgit-git-only
Tests: gdr-diverge-nmu gdr-diverge-nmu-dgit gdr-edits gdr-import-dgit gdr-newupstream-v0 gdr-subcommands gdr-viagit
Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage, libfile-fnmatch-perl, faketime
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-debrebase, git-buildpackage, faketime
Tests: gitattributes
Tests-Directory: tests/tests
diff --git a/git-debrebase b/git-debrebase
index 1295360..216d7df 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -19,6 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
+use Debian::Dgit::GDR;
use Debian::Dgit::ExitStatus;
use strict;
diff --git a/tests/enumerate-tests b/tests/enumerate-tests
index 52cc289..bf86d66 100755
--- a/tests/enumerate-tests
+++ b/tests/enumerate-tests
@@ -60,7 +60,7 @@ dependencies-gencontrol () {
case "$dep" in
NO-DEFAULT) dependencies='' ;;
GDR) gencontrol-add-deps \
- git-buildpackage libfile-fnmatch-perl faketime
+ git-debrebase git-buildpackage faketime
;;
*) gencontrol-add-deps "$dep" ;;
esac