From d37a0d2bebbbc63ac916a5215e77566e09503384 Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sat, 14 Mar 2026 15:24:45 +0530 Subject: [PATCH 1/9] fix packaging issues --- debian/changelog | 6 +- debian/control | 11 ++-- debian/copyright | 2 - .../{ladybug-cli.install => ladybug.install} | 0 debian/ladybug.manpages | 1 + debian/lbug.1 | 66 +++++++++++++++++++ debian/source/lintian-overrides | 3 + 7 files changed, 78 insertions(+), 11 deletions(-) rename debian/{ladybug-cli.install => ladybug.install} (100%) create mode 100644 debian/ladybug.manpages create mode 100644 debian/lbug.1 create mode 100644 debian/source/lintian-overrides diff --git a/debian/changelog b/debian/changelog index e04888a..3c88b45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ ladybug (0.15.1-1) unstable; urgency=medium - * Initial release. - * Package lbug CLI, shared runtime library, and development headers. + * Initial release (CLoses: #1130583) + * Package ladybug CLI, shared runtime library, and development headers. - -- Arun Mon, 09 Mar 2026 11:55:00 -0700 + -- Ally Heev Mon, 09 Mar 2026 11:55:00 -0700 diff --git a/debian/control b/debian/control index b86f2d4..dc94528 100644 --- a/debian/control +++ b/debian/control @@ -1,18 +1,17 @@ Source: ladybug Section: database Priority: optional -Maintainer: Arun +Maintainer: Ally Heev Rules-Requires-Root: no Build-Depends: debhelper-compat (= 13), - cmake, - g++ -Standards-Version: 4.7.0 + cmake +Standards-Version: 4.7.2 Homepage: https://ladybugdb.com/ Vcs-Browser: https://github.com/LadybugDB/ladybug Vcs-Git: https://github.com/LadybugDB/ladybug.git -Package: ladybug-cli +Package: ladybug Architecture: any Depends: ${misc:Depends}, @@ -21,7 +20,7 @@ Description: Embedded graph database command-line client Ladybug is an embedded graph database optimized for query speed and scalability. . - This package provides the lbug interactive shell CLI. + This package provides the LadybugDB interactive shell CLI `lbug`. Package: liblbug0 Section: libs diff --git a/debian/copyright b/debian/copyright index 8d3c8fd..ff6d57c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -23,5 +23,3 @@ License: Expat LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -License: Expat diff --git a/debian/ladybug-cli.install b/debian/ladybug.install similarity index 100% rename from debian/ladybug-cli.install rename to debian/ladybug.install diff --git a/debian/ladybug.manpages b/debian/ladybug.manpages new file mode 100644 index 0000000..82c5364 --- /dev/null +++ b/debian/ladybug.manpages @@ -0,0 +1 @@ +debian/lbug.1 diff --git a/debian/lbug.1 b/debian/lbug.1 new file mode 100644 index 0000000..77bcda4 --- /dev/null +++ b/debian/lbug.1 @@ -0,0 +1,66 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH LBUG "1" "March 09, 2026" "Ladybug 0.15.1" "User Commands" +.SH NAME +Lbug \- LadybugDB interactive shell CLI +.SH SYNOPSIS +lbug [databasePath] {OPTIONS} +.SH DESCRIPTION +lbug is an interactive shell CLI for LadybugDB. +You can use it to run OpenCypher queries directly on the database. +.SH DATABASEPATH +Path to the database. If not given or +set to ":memory:", the database will be +opened under in\-memory mode. +.SH OPTIONS +.TP +\fB\-h\fR, \fB\-\-help\fR +Display this help menu +.TP +\fB\-d\fR, \fB\-\-default_bp_size\fR, \fB\-\-defaultbpsize\fR +Size of buffer pool for default and +large page sizes in megabytes +.TP +\fB\-\-max_db_size\fR=\fI\,[max_db_size]\/\fR, \fB\-\-maxdbsize\fR=\fI\,[max_db_size]\/\fR +Maximum size of the database in bytes +.HP +\fB\-\-no_compression\fR, \fB\-\-nocompression\fR Disable compression +.TP +\fB\-r\fR, \fB\-\-read_only\fR, \fB\-\-readonly\fR +Open database in read\-only mode. +.TP +\fB\-p\fR, \fB\-\-path_history\fR +Path to directory for shell history +.TP +\fB\-v\fR, \fB\-\-version\fR +Display current database version +.TP +\fB\-m\fR, \fB\-\-mode\fR +Set the output mode of the shell +.TP +\fB\-s\fR, \fB\-\-no_stats\fR, \fB\-\-nostats\fR +Disable query stats +.TP +\fB\-b\fR, \fB\-\-no_progress_bar\fR, \fB\-\-noprogressbar\fR +Disable query progress bar +.TP +\fB\-w\fR, \fB\-\-ignore_wal_replay_errors\fR +By default something goes wrong when +replaying the WAL an exception will be +thrown. With this flag enabled we will +instead ignore these errors and stop +replaying the WAL. +.TP +\fB\-i\fR, \fB\-\-init\fR +Path to the script file to run on +startup +.HP +\fB"\-\-"\fR can be used to terminate flag options and force all following +arguments to be treated as positional options +.SH SEE ALSO +https://docs.ladybugdb.com/client-apis/cli/ +.br +https://ladybugdb.github.io/wasm-shell/ (a WASM build of the shell) +.SH AUTHOR +LadybugDB contributors +.SH COPYRIGHT +LadybugDB contributors diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..363bd80 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,3 @@ +# ignore this lintian rule as it is not recommended +# for C++ libraries +liblbug0 source: no-symbols-control-file \ No newline at end of file From cdbc095aa9d6fc26ecb3ad61581967006a7828c0 Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sat, 14 Mar 2026 17:13:23 +0530 Subject: [PATCH 2/9] add hardening to deb build --- debian/rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/rules b/debian/rules index 99cf623..bc5d7f2 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,8 @@ include /usr/share/dpkg/architecture.mk +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + %: dh $@ --buildsystem=cmake From 2c4e612fa43faa337329919d20ea2a2bdee8f791 Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sat, 14 Mar 2026 17:14:06 +0530 Subject: [PATCH 3/9] improve ladybug pkg description --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index dc94528..4096000 100644 --- a/debian/control +++ b/debian/control @@ -20,7 +20,8 @@ Description: Embedded graph database command-line client Ladybug is an embedded graph database optimized for query speed and scalability. . - This package provides the LadybugDB interactive shell CLI `lbug`. + This package provides the LadybugDB interactive shell command + line client (lbug). Package: liblbug0 Section: libs From ee83e8d1199266f5dee64a75dd83a77aac80fe1b Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sat, 14 Mar 2026 18:01:47 +0530 Subject: [PATCH 4/9] fix no-symbols-control-file rule --- debian/liblbug0.lintian-overrides | 2 ++ debian/source/lintian-overrides | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 debian/liblbug0.lintian-overrides delete mode 100644 debian/source/lintian-overrides diff --git a/debian/liblbug0.lintian-overrides b/debian/liblbug0.lintian-overrides new file mode 100644 index 0000000..9f11c06 --- /dev/null +++ b/debian/liblbug0.lintian-overrides @@ -0,0 +1,2 @@ +# ABI not stable yet +liblbug0: no-symbols-control-file \ No newline at end of file diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides deleted file mode 100644 index 363bd80..0000000 --- a/debian/source/lintian-overrides +++ /dev/null @@ -1,3 +0,0 @@ -# ignore this lintian rule as it is not recommended -# for C++ libraries -liblbug0 source: no-symbols-control-file \ No newline at end of file From e25dbb3b434482688200addc7c5414efc47445ef Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sun, 15 Mar 2026 11:32:25 +0530 Subject: [PATCH 5/9] add soname patch for shared lib --- debian/liblbug-dev.install | 1 + debian/liblbug0.install | 2 +- debian/patches/series | 1 + debian/patches/soname.patch | 18 ++++++++++++++++++ debian/rules | 2 +- 5 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 debian/patches/series create mode 100644 debian/patches/soname.patch diff --git a/debian/liblbug-dev.install b/debian/liblbug-dev.install index d30823b..d24d750 100644 --- a/debian/liblbug-dev.install +++ b/debian/liblbug-dev.install @@ -1,2 +1,3 @@ usr/include/lbug.h usr/lib/*/liblbug.a +usr/lib/*/liblbug.so diff --git a/debian/liblbug0.install b/debian/liblbug0.install index 3e49f6e..f4b342c 100644 --- a/debian/liblbug0.install +++ b/debian/liblbug0.install @@ -1 +1 @@ -usr/lib/*/liblbug.so +usr/lib/*/liblbug.so.0* diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..4db24c4 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +soname.patch diff --git a/debian/patches/soname.patch b/debian/patches/soname.patch new file mode 100644 index 0000000..04751e5 --- /dev/null +++ b/debian/patches/soname.patch @@ -0,0 +1,18 @@ +Description: Add SONAME for shared library +Author: Ally Heev +Forwarded: not-needed + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -23,6 +23,11 @@ + add_library(lbug STATIC ${ALL_OBJECT_FILES}) + add_library(lbug_shared SHARED ${ALL_OBJECT_FILES}) + ++set_target_properties(lbug_shared PROPERTIES ++ VERSION ${PROJECT_VERSION} ++ SOVERSION ${PROJECT_VERSION_MAJOR} ++) ++ + set(LBUG_LIBRARIES antlr4_cypher antlr4_runtime brotlidec brotlicommon fast_float utf8proc re2 fastpfor parquet snappy thrift yyjson zstd miniz mbedtls lz4 roaring_bitmap simsimd) + if (NOT __SINGLE_THREADED__) + set(LBUG_LIBRARIES ${LBUG_LIBRARIES} Threads::Threads) diff --git a/debian/rules b/debian/rules index bc5d7f2..549f9e9 100755 --- a/debian/rules +++ b/debian/rules @@ -26,7 +26,7 @@ override_dh_auto_install: # Upstream installs libraries to /usr/lib; move to multiarch path. if [ -d debian/tmp/usr/lib ]; then \ mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH); \ - for f in debian/tmp/usr/lib/liblbug.so debian/tmp/usr/lib/liblbug.a; do \ + for f in debian/tmp/usr/lib/liblbug.*; do \ if [ -e "$${f}" ]; then mv "$${f}" debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; fi; \ done; \ fi From 017af68e8491decca74d5d13d03f2b7ef43804a6 Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sun, 15 Mar 2026 11:48:23 +0530 Subject: [PATCH 6/9] move README up --- README.md | 14 ++++++++++++++ debian/README.source | 6 ------ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 README.md delete mode 100644 debian/README.source diff --git a/README.md b/README.md new file mode 100644 index 0000000..f61669e --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# LadybugDB Debian Packaging + +Packaging follows Debian source format 3.0 (quilt). + +To build from upstream source: + 1. Download the Ladybug release tarball. + 2. Rename it to ladybug_.orig.tar.gz. + 3. Extract the tarball to a new directory. Don't delete the tarball after extraction, we need it for the build process + 4. Copy the `debian/` directory from this repository into the extracted directory and `cd` into it. + 5. Run `export DH_BUILD_SYSTEM=cmake_ninja && dpkg-buildpackage -us -uc` + +## References +- https://arnaudr.io/2016/01/14/first-debian-package/ +- https://arnaudr.io/2016/10/01/publishing-a-debian-package-mentors-sponsorship/ diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index 445daa8..0000000 --- a/debian/README.source +++ /dev/null @@ -1,6 +0,0 @@ -This packaging follows Debian source format 3.0 (quilt). - -To build from upstream source: - 1. Download the Ladybug release tarball. - 2. Rename to ladybug_.orig.tar.gz. - 3. Run: dpkg-buildpackage -us -uc From 54748e3aa3d23ef561caafed025ac033fc1d4dff Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sun, 15 Mar 2026 20:21:20 +0530 Subject: [PATCH 7/9] fix version tag in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f61669e..8e11e7d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Packaging follows Debian source format 3.0 (quilt). To build from upstream source: 1. Download the Ladybug release tarball. - 2. Rename it to ladybug_.orig.tar.gz. + 2. Rename it to ladybug_\.orig.tar.gz. 3. Extract the tarball to a new directory. Don't delete the tarball after extraction, we need it for the build process 4. Copy the `debian/` directory from this repository into the extracted directory and `cd` into it. 5. Run `export DH_BUILD_SYSTEM=cmake_ninja && dpkg-buildpackage -us -uc` From e92ae578560dd1db5599b58304ba93ef3c5d7de2 Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sun, 15 Mar 2026 21:03:26 +0530 Subject: [PATCH 8/9] update timestamps --- debian/changelog | 2 +- debian/lbug.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3c88b45..6229f6d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,4 +3,4 @@ ladybug (0.15.1-1) unstable; urgency=medium * Initial release (CLoses: #1130583) * Package ladybug CLI, shared runtime library, and development headers. - -- Ally Heev Mon, 09 Mar 2026 11:55:00 -0700 + -- Ally Heev Sun, 15 Mar 2026 20:26:00 +0530 diff --git a/debian/lbug.1 b/debian/lbug.1 index 77bcda4..40d0d7c 100644 --- a/debian/lbug.1 +++ b/debian/lbug.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH LBUG "1" "March 09, 2026" "Ladybug 0.15.1" "User Commands" +.TH LBUG "1" "March 15, 2026" "Ladybug 0.15.1" "User Commands" .SH NAME Lbug \- LadybugDB interactive shell CLI .SH SYNOPSIS From 72f065579f4a096dac6b8fdbd8762a3126c08411 Mon Sep 17 00:00:00 2001 From: Ally Heev Date: Sun, 15 Mar 2026 22:13:00 +0530 Subject: [PATCH 9/9] fix so path in liblbug0 --- debian/liblbug0.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/liblbug0.install b/debian/liblbug0.install index f4b342c..f2993dd 100644 --- a/debian/liblbug0.install +++ b/debian/liblbug0.install @@ -1 +1 @@ -usr/lib/*/liblbug.so.0* +usr/lib/*/liblbug.so.*