diff --git a/README.md b/README.md new file mode 100644 index 0000000..8e11e7d --- /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 diff --git a/debian/changelog b/debian/changelog index e04888a..6229f6d 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 Sun, 15 Mar 2026 20:26:00 +0530 diff --git a/debian/control b/debian/control index b86f2d4..4096000 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,8 @@ 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 command + line client (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..40d0d7c --- /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 15, 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/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..f2993dd 100644 --- a/debian/liblbug0.install +++ b/debian/liblbug0.install @@ -1 +1 @@ -usr/lib/*/liblbug.so +usr/lib/*/liblbug.so.* 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/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 99cf623..549f9e9 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 @@ -24,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