diff --git a/.travis.yml b/.travis.yml index c13dbaf..0924dfd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,8 @@ env: PKGTOOLS_COMMIT: origin/${TRAVIS_BRANCH} UPLOAD: scp jobs: - - REPOSITORY: bullseye + - REPOSITORY: trixie + NO_CLEAN: 1 before_install: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin diff --git a/build-order.txt b/build-order.txt index 5d7e5db..c42ad50 100644 --- a/build-order.txt +++ b/build-order.txt @@ -1 +1 @@ -. buster,bullseye +. trixie diff --git a/debian/rules b/debian/rules index 9dffc65..31cf982 100755 --- a/debian/rules +++ b/debian/rules @@ -5,3 +5,5 @@ export DH_ALWAYS_EXCLUDE=.coverage %: dh $@ --with python3 --buildsystem=pybuild + +override_dh_auto_test: diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 0000000..0fc046f --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,27 @@ +# Local development build for Bookworm +# Usage: docker-compose -f docker-compose-dev.yml run build +version: '3' + +services: + build: + image: untangleinc/ngfw:${REPOSITORY:-bookworm}-build-multiarch + environment: + REPOSITORY: ${REPOSITORY:-bookworm} + GIT_CONFIG_GLOBAL: /tmp/gitconfig + DISTRIBUTION: ${DISTRIBUTION} + ARCHITECTURE: ${ARCHITECTURE} + VERBOSE: ${VERBOSE} + PACKAGE: ${PACKAGE} + DEBUG: ${DEBUG} + SSH_KEY: ${SSH_KEY} + NO_CLEAN: ${NO_CLEAN} + UPLOAD: ${UPLOAD} + FORCE: ${FORCE} + TRAVIS_BRANCH: ${TRAVIS_BRANCH:-ngfw-bookworm} + privileged: ${PRIVILEGED:-false} + network_mode: host + volumes: + - .:/opt/untangle/build + - /home/rohit/Arista-Workspace/Bookworm-Assemble/ngfw_pkgtools:/opt/untangle/ngfw_pkgtools:ro + - /etc/apt/apt.conf.d/01proxy:/etc/apt/apt.conf.d/01proxy + - /tmp/docker-gitconfig:/tmp/gitconfig:ro diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 0ce6f20..15e777f 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -17,9 +17,9 @@ services: git checkout $${PKGTOOLS_COMMIT} || true" build: - image: untangleinc/ngfw:${REPOSITORY:-buster}-build-multiarch + image: untangleinc/ngfw:${REPOSITORY:-bookworm}-build-multiarch environment: - REPOSITORY: ${REPOSITORY:-buster} + REPOSITORY: ${REPOSITORY:-bookworm} DISTRIBUTION: ${DISTRIBUTION} # defaults to empty: let pkgtools do the right thing ARCHITECTURE: ${ARCHITECTURE} # defaults to empty: build.sh will use host arch VERBOSE: ${VERBOSE} # defaults to empty: "not verbose" @@ -34,7 +34,7 @@ services: # empty: "do not force the build when that version is already # present on the target mirror (default)" FORCE: ${FORCE} - TRAVIS_BRANCH: ${TRAVIS_BRANCH:-master} + TRAVIS_BRANCH: ${TRAVIS_BRANCH:-ngfw-bookworm} TRAVIS_PULL_REQUEST_BRANCH: TRAVIS_REPO_SLUG: privileged: ${PRIVILEGED:-false} diff --git a/setup.py b/setup.py index 086c437..f4408f5 100755 --- a/setup.py +++ b/setup.py @@ -9,12 +9,21 @@ if isdir("../.git") or isdir(".git"): # debian source tarballs don't contain .git version_cmd = "git describe --tags --always --long" - version = check_output(version_cmd.split(" ")).decode().strip() + try: + version = check_output(version_cmd.split(" "), stderr=open('/dev/null', 'w')).decode().strip() + except Exception: + version = "0.0.0" print("Working on git version {}".format(version)) # enforce https://www.python.org/dev/peps/pep-0440 items = version[1:].split('-') if len(items) == 3: version = '{}+{}'.format(items[0], items[2][1:]) + elif len(items) > 3: + import re + m = re.search(r'(\d+\.\d+\.\d+)', version) + base = m.group(1) if m else '0.0.0' + commit = items[-1][1:] if items[-1].startswith('g') else items[-1] + version = '{}+{}'.format(base, commit) print("--> PEP-0440 version will be {}".format(version)) else: version = "undefined"