Information about basex
------------------------------

This package was debianized using the mh_make command
from the maven-debian-helper package.

The build system uses Maven but prevents it from downloading
anything from the Internet, making the build compliant with
the Debian policy.

The upstream sources have been repacked to exclude sources not used
in the resulting Debian package; the repack is advertised with a +ds
suffix on the upstream version.  See the Files-Excluded stanza in
debian/copyright for details.

Maintaining and upgrading this package
--------------------------------------

This is a git-buildpackage repository (branches: debian/latest,
upstream/latest, pristine-tar).  To import a new upstream release and
build in a clean chroot:

    gbp import-orig --uscan --pristine-tar      # pull + repack per debian/watch
    dch -v <version>+ds-1 "New upstream release <version>"
    gbp buildpackage --git-builder='sbuild --unshare'

The +ds in the version marks the repacked (Files-Excluded) upstream
tarball; debian/watch sets Repack/Repacksuffix so uscan applies it.

Because the build runs Maven offline (Debian policy), every dependency
must exist as a Debian package.  When the build fails to resolve an
artifact, adjust debian/control (Build-Depends), debian/maven.rules
(version mapping) and/or debian/maven.ignoreRules (artifacts to skip).

Refresh quilt patches against new upstream with `quilt push -a` /
`quilt refresh`.  The full QA pipeline (lintian, autopkgtest, piuparts,
reprotest, ...) runs via debian/salsa-ci.yml on Salsa CI (the project's
CI/CD configuration file must point to debian/salsa-ci.yml).

Building and testing in a Debian sid container
----------------------------------------------

The package must be built against unstable (sid), but developers usually
run a stable release -- or, since sbuild --unshare is Linux-only, a non-Linux
host such as macOS.  A throwaway sid container provides that environment on
any host.  From the top of this git checkout (it must be the gbp repository,
so the pristine-tar branch is available):

    docker run --rm -it -v "$PWD":/src -w /src debian:sid bash

Then, inside the container:

    apt-get update
    apt-get install -y --no-install-recommends \
        build-essential devscripts lintian git-buildpackage pristine-tar
    git config --global --add safe.directory /src   # repo is owned by the host user
    apt-get build-dep -y ./                          # Build-Depends from debian/control
    gbp buildpackage --git-ignore-branch --git-pristine-tar \
        --git-export-dir=/tmp/build-area \
        --git-builder='dpkg-buildpackage -us -uc'    # Maven runs offline (Debian policy)
    lintian --info /tmp/build-area/basex_*.changes

gbp regenerates the .orig tarball from the pristine-tar branch and builds in
/tmp/build-area, leaving this checkout untouched.  Because the build resolves
Maven artifacts only from installed Debian packages, a missing dependency
surfaces as a Maven resolution error -- fix it in debian/control /
debian/maven.rules / debian/maven.ignoreRules (see above).

Smoke-test the built package and run the autopkgtests against it (the HTML
example additionally needs libtagsoup-java):

    apt-get install -y /tmp/build-area/basex_*_all.deb libtagsoup-java
    basex -q '1+1'                                   # -> 2
    sh debian/tests/smoke
    AUTOPKGTEST_TMP=$(mktemp -d) sh debian/tests/examples
