[med-svn] [Git][med-team/gbwt][master] 4 commits: Rebase packaging for gbwt 1.6

Andreas Tille (@tille) gitlab at salsa.debian.org
Thu Oct 22 09:58:33 BST 2026



Andreas Tille pushed to branch master at Debian Med / gbwt


Commits:
c30826b8 by Andreas Tille at 2026-10-22T10:32:22+02:00
Rebase packaging for gbwt 1.6

Drop the obsolete divsufsort patch and refresh the remaining patches
against the new upstream build layout.  Require the vgteam SDSL fork
(2.3.1 or later) and add the missing libzstd and pkg-config build
dependencies.  Install the static library from lib/ instead of the
source root.

- - - - -
293c1557 by Andreas Tille at 2026-10-22T10:32:31+02:00
Require libsdsl 2.4+dfsg and add an autopkgtest smoke test

libsdsl 2.4+dfsg is the first Debian version based on the vgteam
fork with simple-sds support that gbwt 1.6 needs.  Build-depend on it
and require it from libgbwt-dev.

Add an autopkgtest that compiles and runs a small program using the
installed headers, static library, libsdsl, and libzstd.

- - - - -
307e8908 by Andreas Tille at 2026-10-22T10:35:39+02:00
Cleanup packaging, add myself to Uploaders

- - - - -
4cfa17cc by Andreas Tille at 2026-10-22T10:40:08+02:00
s/pkg-config/pkgconf/

- - - - -


11 changed files:

- debian/changelog
- debian/control
- − debian/lintian-overrides
- debian/patches/add_ldflags_cppflags
- − debian/patches/drop_unneeded_divsufsort
- debian/patches/series
- debian/patches/use_debian_sdsl
- debian/rules
- + debian/tests/control
- + debian/tests/smoke
- + debian/tests/smoke.cpp


Changes:

=====================================
debian/changelog
=====================================
@@ -1,15 +1,5 @@
 gbwt (1.6-1) UNRELEASED; urgency=medium
 
-  [ Michael R. Crusoe ]
   * Initial release. (Closes: #XXXXXX)
 
-  [ Andreas Tille ]
-  * New upstream version
-  * Standards-Version: 4.7.4 (routine-update)
-  * debhelper-compat 13 (routine-update)
-  * Reflow Uploaders field (cme)
-  * Remove Priority field (cme)
-  * Remove trailing whitespace in debian/control (routine-update)
-  * lintian-brush: add d/u/metadata (routine-update)
-
  -- Andreas Tille <tille at debian.org>  Wed, 21 Oct 2026 17:25:54 +0200


=====================================
debian/control
=====================================
@@ -3,11 +3,14 @@ Standards-Version: 4.7.4
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders:
  Michael R. Crusoe <michael.crusoe at gmail.com>,
+ Andreas Tille <tille at debian.org>,
 Section: science
 Build-Depends:
  debhelper-compat (= 14),
  libgtest-dev,
- libsdsl-dev,
+ libsdsl-dev (>= 2.4),
+ libzstd-dev,
+ pkgconf,
 Vcs-Browser: https://salsa.debian.org/med-team/gbwt
 Vcs-Git: https://salsa.debian.org/med-team/gbwt.git
 Homepage: https://github.com/jltsiren/gbwt
@@ -17,6 +20,8 @@ Architecture: any
 Section: libdevel
 Depends:
  ${misc:Depends},
+ libsdsl-dev (>= 2.4),
+ libzstd-dev,
 Description: Substring index for paths in a graph
  Graph BWT is an independent implementation of the graph extension (gPBWT) of
  the positional Burrows-Wheeler transform (PBWT). Its initial purpose is to


=====================================
debian/lintian-overrides deleted
=====================================
@@ -1,2 +0,0 @@
-# see https://lists.debian.org/debian-med/2018/06/msg00043.html
-#PKGNAME#: script-with-language-extension usr/bin/*.*


=====================================
debian/patches/add_ldflags_cppflags
=====================================
@@ -1,61 +1,17 @@
---- gbwt.orig/Makefile
-+++ gbwt/Makefile
-@@ -1,6 +1,12 @@
- # Multithreading with OpenMP.
- PARALLEL_FLAGS=-fopenmp -pthread
--LIBS=-L$(LIB_DIR) -lsdsl
-+LDLIBS += -lsdsl
-+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-+DPKG_EXPORT_BUILDFLAGS = 1
-+include /usr/share/dpkg/buildflags.mk
-+
-+CXXFLAGS += $(OTHER_FLAGS) $(MY_CXX_OPT_FLAGS)
-+CPPFLAGS += -Iinclude
- 
- ifeq ($(shell uname -s),Darwin)
-     # Our compiler might be clang that lacks -fopenmp support.
-@@ -29,37 +35,36 @@
- 
- OTHER_FLAGS=$(PARALLEL_FLAGS)
- 
--CXX_FLAGS=$(MY_CXX_FLAGS) $(OTHER_FLAGS) $(MY_CXX_OPT_FLAGS) -I$(INC_DIR) -Iinclude
- LIBOBJS=algorithms.o bwtmerge.o dynamic_gbwt.o files.o gbwt.o internal.o support.o utils.o variants.o
- SOURCES=$(wildcard *.cpp)
- HEADERS=$(wildcard include/gbwt/*.h)
- OBJS=$(SOURCES:.cpp=.o)
--
-+LDFLAGS += $(PARALLEL_FLAGS)
- LIBRARY=libgbwt.a
- PROGRAMS=prepare_text build_gbwt merge_gbwt benchmark metadata
- 
- all:$(LIBRARY) $(PROGRAMS)
+Description: Add CPPFLAGS, CXXFLAGS and LDFLAGS to the test build
+Assisted-By: opencode/deepseek-v4.1-flash-free
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -65,10 +65,10 @@
+ all:$(PROGRAMS)
  
  %.o:%.cpp $(HEADERS)
 -	$(MY_CXX) $(CXX_FLAGS) -c $<
-+	$(MY_CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
- 
- $(LIBRARY):$(LIBOBJS)
- 	ar rcs $@ $(LIBOBJS)
- 
- prepare_text:prepare_text.o $(LIBRARY)
--	$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
-+	$(MY_CXX) $(LDFLAGS) -o $@ $< $(LIBRARY) $(LDLIBS)
- 
- build_gbwt:build_gbwt.o $(LIBRARY)
--	$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
-+	$(MY_CXX) $(LDFLAGS) -o $@ $< $(LIBRARY) $(LDLIBS)
- 
- merge_gbwt:merge_gbwt.o $(LIBRARY)
--	$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
-+	$(MY_CXX) $(LDFLAGS) -o $@ $< $(LIBRARY) $(LDLIBS)
- 
- benchmark:benchmark.o $(LIBRARY)
--	$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
-+	$(MY_CXX) $(LDFLAGS) -o $@ $< $(LIBRARY) $(LDLIBS)
++	$(MY_CXX) $(CPPFLAGS) $(CXXFLAGS) $(CXX_FLAGS) -c $<
  
- metadata:metadata.o $(LIBRARY)
+ $(PROGRAMS):%:%.o $(LIBRARY)
 -	$(MY_CXX) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
-+	$(MY_CXX) $(LDFLAGS) -o $@ $< $(LIBRARY) $(LDLIBS)
++	$(MY_CXX) $(LDFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(CXX_FLAGS) -o $@ $< $(LIBRARY) $(LIBS)
  
- test:$(LIBRARY)
- 	cd tests && make test
+ test:$(PROGRAMS)
+ 	$(foreach PROG,$(PROGRAMS),./$(PROG) || exit 1;)


=====================================
debian/patches/drop_unneeded_divsufsort deleted
=====================================
@@ -1,21 +0,0 @@
---- gbwt.orig/Makefile
-+++ gbwt/Makefile
-@@ -1,6 +1,6 @@
- # Multithreading with OpenMP.
- PARALLEL_FLAGS=-fopenmp -pthread
--LIBS=-L$(LIB_DIR) -lsdsl -ldivsufsort -ldivsufsort64
-+LIBS=-L$(LIB_DIR) -lsdsl
- 
- ifeq ($(shell uname -s),Darwin)
-     # Our compiler might be clang that lacks -fopenmp support.
---- gbwt.orig/tests/Makefile
-+++ gbwt/tests/Makefile
-@@ -3,7 +3,7 @@
- 
- # Multithreading with OpenMP.
- PARALLEL_FLAGS=-fopenmp -pthread
--LIBS=-L$(LIB_DIR) -lsdsl -ldivsufsort -ldivsufsort64 -lgtest -lgtest_main
-+LIBS=-L$(LIB_DIR) -lsdsl -lgtest -lgtest_main
- 
- ifeq ($(shell uname -s),Darwin)
-     # Our compiler might be clang that lacks -fopenmp support.


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,2 @@
 use_debian_sdsl
-drop_unneeded_divsufsort
 add_ldflags_cppflags


=====================================
debian/patches/use_debian_sdsl
=====================================
@@ -1,20 +1,21 @@
 Author: Michael R. Crusoe <michael.crusoe at gmail.com>
 Description: Use sdsl from libsdsl-dev
---- gbwt.orig/Makefile
-+++ gbwt/Makefile
+Assisted-By: opencode/deepseek-v4.1-flash-free
+--- a/Makefile
++++ b/Makefile
 @@ -1,6 +1,3 @@
 -SDSL_DIR=../sdsl-lite
 -include $(SDSL_DIR)/Make.helper
 -
- # Multithreading with OpenMP.
- PARALLEL_FLAGS=-fopenmp -pthread
- LIBS=-L$(LIB_DIR) -lsdsl -ldivsufsort -ldivsufsort64
---- gbwt.orig/tests/Makefile
-+++ gbwt/tests/Makefile
+ BUILD_BIN=bin
+ BUILD_LIB=lib
+ BUILD_OBJ=obj
+--- a/tests/Makefile
++++ b/tests/Makefile
 @@ -1,6 +1,3 @@
 -SDSL_DIR=../../sdsl-lite
 -include $(SDSL_DIR)/Make.helper
 -
- GBWT_DIR=..
- LIBRARY=$(GBWT_DIR)/libgbwt.a
+ MAIN_DIR=..
+ LIBRARY=$(MAIN_DIR)/lib/libgbwt.a
  


=====================================
debian/rules
=====================================
@@ -4,32 +4,23 @@
 export LC_ALL=C.UTF-8
 
 include /usr/share/dpkg/default.mk
-# this provides:
-# DEB_SOURCE: the source package name
-# DEB_VERSION: the full version of the package (epoch + upstream vers. + revision)
-# DEB_VERSION_EPOCH_UPSTREAM: the package's version without the Debian revision
-# DEB_VERSION_UPSTREAM_REVISION: the package's version without the Debian epoch
-# DEB_VERSION_UPSTREAM: the package's upstream version
-# DEB_DISTRIBUTION: the distribution(s) listed in the current entry of debian/changelog
-# SOURCE_DATE_EPOCH: the source release date as seconds since the epoch, as
-#                    specified by <https://reproducible-builds.org/specs/source-date-epoch/>
 
 # for hardening you might like to uncomment this:
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
 CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) -DNDEBUG
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
 %:
 	dh $@
 
 override_dh_auto_build:
-	dh_auto_build -- CXXFLAGS="$(CXXFLAGS)" MY_CXX=g++ INC_DIR=/usr/include LIB_DIR=/usr/lib
+	dh_auto_build -- CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" MY_CXX=g++ INC_DIR=/usr/include LIB_DIR=/usr/lib
 
 override_dh_auto_install:
-	dh_auto_install
-	mkdir -p debian/libgbwt-dev/usr/lib/$(shell dpkg-architecture --query DEB_HOST_MULTIARCH)/
-	cp libgbwt.a debian/libgbwt-dev/usr/lib/$(shell dpkg-architecture --query DEB_HOST_MULTIARCH)/
+	install -D -m 0644 lib/libgbwt.a debian/libgbwt-dev/usr/lib/$(shell dpkg-architecture --query DEB_HOST_MULTIARCH)/libgbwt.a
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	dh_auto_test -- CXXFLAGS="$(CXXFLAGS)" MY_CXX=g++ INC_DIR=/usr/include LIB_DIR=/usr/lib
+	dh_auto_test -- CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" MY_CXX=g++ INC_DIR=/usr/include LIB_DIR=/usr/lib
 endif


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Tests: smoke
+Depends: @, g++
+Restrictions: allow-stderr


=====================================
debian/tests/smoke
=====================================
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+if [ -z "$AUTOPKGTEST_TMP" ]; then
+    AUTOPKGTEST_TMP=$(mktemp -d)
+    trap 'rm -rf "$AUTOPKGTEST_TMP"' EXIT INT TERM
+fi
+
+cp "$(dirname "$0")/smoke.cpp" "$AUTOPKGTEST_TMP/"
+cd "$AUTOPKGTEST_TMP"
+
+g++ -std=c++17 -O2 -Wall -Wextra -fopenmp -o smoke smoke.cpp -lgbwt -lsdsl -lzstd
+./smoke


=====================================
debian/tests/smoke.cpp
=====================================
@@ -0,0 +1,20 @@
+#include <gbwt/gbwt.h>
+
+#include <sdsl/simple_sds.hpp>
+
+#include <cstdio>
+#include <string>
+
+int main()
+{
+  gbwt::GBWT index;
+  const std::string filename = "gbwt-smoke.gbwt";
+
+  sdsl::simple_sds::serialize_to(index, filename);
+
+  gbwt::GBWT loaded;
+  sdsl::simple_sds::load_from(loaded, filename);
+  std::remove(filename.c_str());
+
+  return loaded.empty() ? 0 : 1;
+}



View it on GitLab: https://salsa.debian.org/med-team/gbwt/-/compare/427f2c38708b7050bcfc82fe574c70301ad0d997...4cfa17cc0a264f61b904f27a3b9ee970f690f10f

-- 
View it on GitLab: https://salsa.debian.org/med-team/gbwt/-/compare/427f2c38708b7050bcfc82fe574c70301ad0d997...4cfa17cc0a264f61b904f27a3b9ee970f690f10f
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261022/9dec7ba0/attachment-0001.htm>


More information about the debian-med-commit mailing list