From 81db6b2f6dabc707cc3bad1eed3bcd4006936fea Mon Sep 17 00:00:00 2001 From: curtis-leblanc Date: Wed, 26 Mar 2025 09:34:42 -0400 Subject: [PATCH] Build branch. --- .github/workflows/build-packages.yml | 36 +++++++++++++++++++++---- manifest.json | 7 ++++- packaging/debian-bookworm/changelog | 5 ++++ packaging/debian-bookworm/control.j2 | 13 +++++++++ packaging/debian-bookworm/copyright.j2 | 35 ++++++++++++++++++++++++ packaging/debian-bookworm/rules | 25 +++++++++++++++++ packaging/debian-bookworm/source/format | 1 + 7 files changed, 116 insertions(+), 6 deletions(-) create mode 100644 packaging/debian-bookworm/changelog create mode 100644 packaging/debian-bookworm/control.j2 create mode 100644 packaging/debian-bookworm/copyright.j2 create mode 100755 packaging/debian-bookworm/rules create mode 100644 packaging/debian-bookworm/source/format diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 8b9fe3c..c891248 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -2,12 +2,12 @@ name: Build Packages on: push: branches: - - main + - build-package tags: - 'v*.*.*' jobs: prebuild: - runs-on: buildinator-group + runs-on: buildinator-5 outputs: manifest: ${{ steps.prebuild.outputs.manifest }} matrix: ${{ steps.prebuild.outputs.matrix }} @@ -40,7 +40,7 @@ jobs: needs: - prebuild - build - runs-on: buildinator-group + runs-on: buildinator-5 steps: - name: Run sign playbook uses: 45drives/actions/ansible-playbook@main @@ -60,7 +60,7 @@ jobs: - prebuild - build - sign - runs-on: buildinator-group + runs-on: buildinator-5 steps: - id: push_local name: Push packages into local repository @@ -68,13 +68,39 @@ jobs: with: directory: ${{ github.workspace }} + create_release: + needs: + - prebuild + - build + - sign + - update_repositories + runs-on: buildinator-5 + steps: + - name: Set Variables + if: startsWith(github.ref, 'refs/tags/') + run: | + echo "PRERELEASE=$([ "$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.stable')" = "true" ] && echo false || echo "true")" >> $GITHUB_ENV + echo "TITLE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.title')" >> $GITHUB_ENV + echo "VERSION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.version')" >> $GITHUB_ENV + echo "REVISION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.build_number')" >> $GITHUB_ENV + - name: GitHub Release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v1 + with: + name: ${{env.TITLE}} ${{env.VERSION}} + prerelease: ${{env.PRERELEASE}} + body_path: ${{github.workspace}}/CHANGELOG.md + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + sync_repositories: needs: - prebuild - build - sign - update_repositories - runs-on: buildinator-group + - create_release + runs-on: buildinator-5 steps: - id: push_remote name: Sync local repository with remote repository diff --git a/manifest.json b/manifest.json index 542a099..6cab588 100644 --- a/manifest.json +++ b/manifest.json @@ -42,6 +42,11 @@ "os_name": "ubuntu-focal", "image": "ci.cr.45d.io/ci/simple/ubuntu-focal:1" }, + { + "group": "debian", + "os_name": "debian-bookworm", + "image": "ci.cr.45d.io/ci/simple/ubuntu-jammy:1" + }, { "group": "ubuntu", "os_name": "ubuntu-jammy", @@ -71,4 +76,4 @@ "packager": "Josh Boudreau ", "changes": [] } -} \ No newline at end of file +} diff --git a/packaging/debian-bookworm/changelog b/packaging/debian-bookworm/changelog new file mode 100644 index 0000000..f79f10e --- /dev/null +++ b/packaging/debian-bookworm/changelog @@ -0,0 +1,5 @@ +cockpit-navigator (0.5.10-1bookworm) bookworm; urgency=medium + + * build for bookworm + + -- Brett Kelly Mon, 24 Feb 2025 14:40:50 -0300 diff --git a/packaging/debian-bookworm/control.j2 b/packaging/debian-bookworm/control.j2 new file mode 100644 index 0000000..774ed2d --- /dev/null +++ b/packaging/debian-bookworm/control.j2 @@ -0,0 +1,13 @@ +Source: {{ name }} +Section: utils +Priority: optional +Maintainer: {{ author }} +Build-Depends: debhelper-compat (= 12) +Standards-Version: 4.4.1 +Homepage: {{ git_url }} +Vcs-Git: {{ git_url }} + +Package: {{ name }} +Architecture: {{ architecture.ubuntu }} +Depends: {{ dependencies.ubuntu_common | join(',') }} +Description: {{ description }} \ No newline at end of file diff --git a/packaging/debian-bookworm/copyright.j2 b/packaging/debian-bookworm/copyright.j2 new file mode 100644 index 0000000..91b5a5b --- /dev/null +++ b/packaging/debian-bookworm/copyright.j2 @@ -0,0 +1,35 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: "{{ name }}" +Upstream-Contact: "{{ author }}" +Source: "{{ git_url }}" + +Files: * +Copyright: 2021 Josh Boudreau +License: GPL-3.0+ + +Files: navigator/navigator.* +Copyright: 2021 Sam Silver +License: GPL-3.0+ + +Files: navigator/navigator.js +Copyright: 2021 Dawson Della Valle +License: GPL-3.0+ + +Files: debian/* +Copyright: 2021 Josh Boudreau +License: GPL-3.0+ + +License: GPL-3.0+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with the Onboard package. If not, please have a look at + /usr/share/common-licenses or . diff --git a/packaging/debian-bookworm/rules b/packaging/debian-bookworm/rules new file mode 100755 index 0000000..e310c6b --- /dev/null +++ b/packaging/debian-bookworm/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +export NAV_VERS := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ':') + +%: + dh $@ + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) diff --git a/packaging/debian-bookworm/source/format b/packaging/debian-bookworm/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/packaging/debian-bookworm/source/format @@ -0,0 +1 @@ +3.0 (native)