Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build-order.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
. buster,bullseye
. trixie
2 changes: 2 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ export DH_ALWAYS_EXCLUDE=.coverage

%:
dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_test:
27 changes: 27 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}
Expand Down
11 changes: 10 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down