-
Notifications
You must be signed in to change notification settings - Fork 1
CI-5748 Add .deb package and build workflow #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
643646c
CI-5748 Add .deb package
uaqq c9382c0
remove changelog, rename workflow, change workflow rules
uaqq cb86e0d
change workflow reference
uaqq e74d541
support both ubuntu versions
uaqq b33145a
change workflow reference
uaqq a2cb785
change workflow reference
uaqq 35847f0
add postinst and postrm scripts
uaqq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Build deb | ||
|
|
||
| on: | ||
| push: | ||
| branches: ['master'] | ||
| tags: ['**'] | ||
| pull_request: | ||
| branches: ['**'] | ||
|
|
||
| jobs: | ||
| build_deb: | ||
| strategy: | ||
| matrix: | ||
| ubuntu_version: ["22.04", "24.04"] | ||
| uses: greengagedb/greengage-ci/.github/workflows/greengage-reusable-deb-native.yml@v43 | ||
| with: | ||
| go_version: "1.20" | ||
| artifact_name: "gpbackup-deb-ubuntu${{ matrix.ubuntu_version }}" | ||
| build_command: "make deb" | ||
| runner: "ubuntu-${{ matrix.ubuntu_version }}" | ||
| test_docker: "ubuntu:${{ matrix.ubuntu_version }}" | ||
| add_greengage_repo: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Source: gpbackup | ||
| Maintainer: Greengage <greengage@greengagedb.org> | ||
| Section: database | ||
| Build-Depends: debhelper (>= 13), | ||
| build-essential | ||
| Standards-Version: 4.6.0 | ||
|
|
||
| Package: gpbackup | ||
| Architecture: any | ||
| Depends: ${shlibs:Depends}, | ||
| greengage6 | greengage7 | ||
| Description: Greengage Backup and Restore utilities | ||
| gpbackup and gprestore are Go utilities for performing Greengage Database | ||
| backups and restores. gpbackup_helper is used with the --single-data-file flag. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| @GPBACKUP_HOME_REL@/bin/gpbackup | ||
| @GPBACKUP_HOME_REL@/bin/gprestore | ||
| @GPBACKUP_HOME_REL@/bin/gpbackup_helper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| GPBACKUP_BIN=/opt/greengagedb/gpbackup/bin | ||
|
|
||
| for gphome in /opt/greengagedb/greengage*/; do | ||
| [ -d "${gphome}bin" ] || continue | ||
| for binary in gpbackup gprestore gpbackup_helper; do | ||
| ln -sf "${GPBACKUP_BIN}/${binary}" "${gphome}bin/${binary}" | ||
| done | ||
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| for gphome in /opt/greengagedb/greengage*/; do | ||
| [ -d "${gphome}bin" ] || continue | ||
| for binary in gpbackup gprestore gpbackup_helper; do | ||
| rm -f "${gphome}bin/${binary}" | ||
| done | ||
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #!/usr/bin/make -f | ||
|
|
||
| DH_VERBOSE = 1 | ||
|
|
||
| GPBACKUP_HOME ?= /opt/greengagedb/gpbackup | ||
| GPBACKUP_HOME_REL := $(GPBACKUP_HOME:/%=%) | ||
|
|
||
| export DH_OPTIONS := $(DH_OPTIONS) | ||
| export DEB_BUILD_OPTIONS = nocheck | ||
| export PATH := /usr/local/go/bin:$(PATH) | ||
| export CGO_ENABLED = 1 | ||
| export GOPATH ?= $(HOME)/go | ||
|
|
||
| BUILD_DIR := $(CURDIR)/_build | ||
|
|
||
| %: | ||
| dh $@ | ||
|
|
||
| override_dh_auto_clean: | ||
| @echo "Skipping clean" | ||
|
|
||
| override_dh_auto_configure: | ||
| @echo "=== Generating .install files ===" | ||
| sed 's|@GPBACKUP_HOME_REL@|$(GPBACKUP_HOME_REL)|g' debian/gpbackup.install.in > debian/gpbackup.install | ||
|
|
||
| override_dh_auto_build: | ||
| @echo "=== Building gpbackup binaries ===" | ||
| mkdir -p $(BUILD_DIR) | ||
| $(MAKE) build BIN_DIR=$(BUILD_DIR) | ||
|
|
||
| override_dh_auto_install: | ||
| @echo "=== Installing gpbackup binaries ===" | ||
| install -D -m 755 $(BUILD_DIR)/gpbackup $(CURDIR)/debian/tmp/$(GPBACKUP_HOME_REL)/bin/gpbackup | ||
| install -D -m 755 $(BUILD_DIR)/gprestore $(CURDIR)/debian/tmp/$(GPBACKUP_HOME_REL)/bin/gprestore | ||
| install -D -m 755 $(BUILD_DIR)/gpbackup_helper $(CURDIR)/debian/tmp/$(GPBACKUP_HOME_REL)/bin/gpbackup_helper | ||
|
|
||
| override_dh_dwz: | ||
| @echo "Skipping debug symbols compression (not working properly with Golang)" | ||
|
|
||
| override_dh_gencontrol: | ||
| @echo "=== Generating control files ===" | ||
| dh_gencontrol | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.