[bibtool] 03/03: debianization: CI material
This is an automated email from the git hooks/post-receive script.
calculus-guest pushed a commit to branch master
in repository bibtool.
commit ff37ec8d11b39f1dbbf907d486f116163e9abdb2
Author: Jerome Benoit <calculus@rezozer.net>
Date: Sun Dec 20 08:11:38 2015 +0100
debianization: CI material
---
debian/changelog | 8 +-
debian/patches/cleanup-upstream.patch | 11 ---
debian/patches/debianization-regex.patch | 11 ---
debian/patches/debianization.patch | 9 +++
debian/patches/rationalization-upstream-test.patch | 94 ++++++++++++++++++++++
debian/patches/reproducible-upstream-doc.patch | 2 +
debian/patches/series | 1 +
debian/tests/control | 2 +
8 files changed, 113 insertions(+), 25 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ca876fc..79d13ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,13 @@
-bibtool (2.61+ds-2) UNRELEASE; urgency=medium
+bibtool (2.61+ds-2) unstable; urgency=medium
* Debianization:
- debian/control:
- Vcs-Browser field, correct;
- - debian/patches/reproducible-upstream-doc.patch, introduce (unrep fix).
+ - debian/patches/reproducible-upstream-doc.patch, introduce (unrep fix);
+ - debian/patches/rationalization-upstream-test.patch, introduce (CI);
+ - debian/tests/control, initiate (CI).
- -- Jerome Benoit <calculus@rezozer.net> Sun, 20 Dec 2015 02:15:50 +0000
+ -- Jerome Benoit <calculus@rezozer.net> Sun, 20 Dec 2015 07:10:24 +0000
bibtool (2.61+ds-1) unstable; urgency=medium
diff --git a/debian/patches/cleanup-upstream.patch b/debian/patches/cleanup-upstream.patch
index 2bf536b..00fd724 100644
--- a/debian/patches/cleanup-upstream.patch
+++ b/debian/patches/cleanup-upstream.patch
@@ -16,14 +16,3 @@ kpse_set_progname is deprecated.
/* */
init_type(); /* */
init_symbols(); /* */
---- a/test/makefile
-+++ b/test/makefile
-@@ -29,7 +29,7 @@
- BIBTOOL = ../bibtool$(EXT)
- PERL = perl
-
--default all: $(BIBTOOL) $(SUITES)
-+default all: $(BIBTOOL)
- @${PERL} -MBUnit -e "exit all()"
-
- $(BIBTOOL): ../*.c ../*.h ../include/bibtool/*.h ../regex-0.12/*.[ch]
diff --git a/debian/patches/debianization-regex.patch b/debian/patches/debianization-regex.patch
index d5e03f7..429a1ec 100644
--- a/debian/patches/debianization-regex.patch
+++ b/debian/patches/debianization-regex.patch
@@ -49,14 +49,3 @@ use regex functions from glibc
AC_OUTPUT(makefile:AutoConf/makefile.in)
---- a/test/makefile
-+++ b/test/makefile
-@@ -32,7 +32,7 @@
- default all: $(BIBTOOL)
- @${PERL} -MBUnit -e "exit all()"
-
--$(BIBTOOL): ../*.c ../*.h ../include/bibtool/*.h ../regex-0.12/*.[ch]
-+$(BIBTOOL): ../*.c ../*.h ../include/bibtool/*.h
- (cd ..; make)
-
- clean:
diff --git a/debian/patches/debianization.patch b/debian/patches/debianization.patch
index cc65da5..9ac8065 100644
--- a/debian/patches/debianization.patch
+++ b/debian/patches/debianization.patch
@@ -72,3 +72,12 @@ debianization
# =============================================================================
#
# This file is part of BibTool.
+@@ -67,7 +67,7 @@
+ # Variable: $BIBTOOLPROG
+ # Description:
+ #
+-our $BIBTOOLPROG = '/usr/local/bin/bibtool';
++our $BIBTOOLPROG = '/usr/bin/bibtool';
+ if (defined $ENV{'BIBTOOLPROG'}) { $BIBTOOLPROG = $ENV{'BIBTOOLPROG'} ; }
+
+ #------------------------------------------------------------------------------
diff --git a/debian/patches/rationalization-upstream-test.patch b/debian/patches/rationalization-upstream-test.patch
new file mode 100644
index 0000000..e7fe352
--- /dev/null
+++ b/debian/patches/rationalization-upstream-test.patch
@@ -0,0 +1,94 @@
+attempt to render test doable outside the build tree:
+BIBTOOL variable name is replaced by BIBTOOLPROG variable
+name in order to avoid interferences with the environment
+variable BIBTOOL used by bibtool itself; changes are meant
+to be compatible with previous usage; tests can be run by
+passing BIBTOOLPROG as environment variable (e.g.;
+ $make -C test check BIBTOOLPROG=/usr/bin/bibtool ; );
+the changes allow automatic tests against bibtool as
+performed by the Debian Continuous Integration (CI) machinery
+( https://ci.debian.net/doc/ ).
+
+--- a/test/makefile
++++ b/test/makefile
+@@ -26,14 +26,13 @@
+ EXT =
+
+ # -----------------------------------------------------------------------------
+-BIBTOOL = ../bibtool$(EXT)
++BIBTOOLPROG ?= ../bibtool$(EXT)
+ PERL = perl
+
+-default all: $(BIBTOOL) $(SUITES)
+- @${PERL} -MBUnit -e "exit all()"
++default all: check
+
+-$(BIBTOOL): ../*.c ../*.h ../include/bibtool/*.h ../regex-0.12/*.[ch]
+- (cd ..; make)
++check:
++ @BIBTOOLPROG=${BIBTOOLPROG} ${PERL} -MBUnit -e "exit all()"
+
+ clean:
+ ${RM} *.log *.err *.???-expected *.out *~ *.bak
+@@ -44,7 +43,7 @@
+
+ .SUFFIXES: .t .test $(SUFFIXES)
+
+-.t.test: $(BIBTOOL)
+- @${PERL} -I. $<
++.t.test:
++ @BIBTOOLPROG=${BIBTOOLPROG} ${PERL} -I. $<
+
+ #
+--- a/test/BUnit.pm
++++ b/test/BUnit.pm
+@@ -64,10 +64,11 @@
+ our $VERSION = ('$Revision: 1.17 $ ' =~ m/[0-9.]+/ ? $& : '0.0' );
+
+ #------------------------------------------------------------------------------
+-# Variable: $BIBTOOL
++# Variable: $BIBTOOLPROG
+ # Description:
+ #
+-our $BIBTOOL = '../bibtool';
++our $BIBTOOLPROG = '/usr/local/bin/bibtool';
++if (defined $ENV{'BIBTOOLPROG'}) { $BIBTOOLPROG = $ENV{'BIBTOOLPROG'} ; }
+
+ #------------------------------------------------------------------------------
+ # Variable: %summary
+@@ -124,7 +125,7 @@
+ my $bib = store_file(TEST_BIB, $a{bib}, TEST_BIB);
+ my $args = $a{args} || '';
+
+- `$BIBTOOL $rsc $args $bib <$null 1>$out 2>$err`;
++ `$BIBTOOLPROG $rsc $args $bib <$null 1>$out 2>$err`;
+
+ if ( run_check($name, $a{check}) +
+ check($a{expected_out}, $out, 'out', $a{fct_out}) +
+@@ -210,7 +211,7 @@
+ $ENV{HOME} = getcwd;
+
+
+- die "*** '$BIBTOOL' executable not found\n" if not -x $BIBTOOL;
++ die "*** '$BIBTOOLPROG' executable not found\n" if not -x $BIBTOOLPROG;
+ die "*** Current dircetory is not writable\n" if not -w '.';
+ die "*** .bibtoolrsc exists in current directory. Aborted\n"
+ if -e ".bibtoolrsc";
+@@ -275,7 +276,7 @@
+ #
+ sub get_library_path {
+ my $err = '_lib.err';
+- `$BIBTOOL -h 2>$err`;
++ `$BIBTOOLPROG -h 2>$err`;
+
+ my $library_path;
+ local $_;
+@@ -293,7 +294,7 @@
+ #
+ sub get_configuration_options {
+ my $err = '_lib.err';
+- `$BIBTOOL -h 2>$err`;
++ `$BIBTOOLPROG -h 2>$err`;
+
+ my $options;
+ local $_;
diff --git a/debian/patches/reproducible-upstream-doc.patch b/debian/patches/reproducible-upstream-doc.patch
index 89ae573..a72eb80 100644
--- a/debian/patches/reproducible-upstream-doc.patch
+++ b/debian/patches/reproducible-upstream-doc.patch
@@ -1,4 +1,6 @@
attempt to render reproducible TeX documents
+(see https://wiki.debian.org/ReproducibleBuilds/About ).
+
--- a/doc/make_version.pl
+++ b/doc/make_version.pl
@@ -57,7 +57,7 @@
diff --git a/debian/patches/series b/debian/patches/series
index a418e99..f5ba6b2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
cleanup-upstream.patch
+rationalization-upstream-test.patch
reproducible-upstream-doc.patch
rationalization-upstream-doc.patch
secure-upstream-doc.patch
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d94ad22
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Test-command: make -C test check BIBTOOLPROG=/usr/bin/bibtool
+Restrictions: rw-build-tree, allow-stderr
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/bibtool.git
Reply to: