Skip to content
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

Update debcrafter to fix databases #231

Merged
merged 3 commits into from
Jul 19, 2024
Merged
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
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ on:

env:
USER_NAME: user
REPO_DIR: /home/user/cryptoanarchy-deb-repo-builder
BUILD_DIR: /home/user/cadr-build
IMAGE_NAME: cadr/cadr
CONTAINER_NAME: cadr
CI_SCRIPT: ci/build.sh
PODMAN_CMD: "sudo -E XDG_RUNTIME_DIR= podman"
SPAWN_CONTAINER: "$PODMAN_CMD run --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged --systemd=true -d -v $PWD:$BUILD_DIR --name=$CONTAINER_NAME $IMAGE_NAME"
SPAWN_CONTAINER: "$PODMAN_CMD run --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro --privileged --systemd=true -d -v $PWD:$REPO_DIR --name=$CONTAINER_NAME $IMAGE_NAME"
EXECUTE_CMD: "$PODMAN_CMD exec -u $USER_NAME -i $CONTAINER_NAME"

jobs:
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
- name: Get cache key
id: get-cache-key
run: |
eval $EXECUTE_CMD bash "${BUILD_DIR}/ci/get_cache_key.sh" "${{ matrix.source }}" >> $GITHUB_OUTPUT
eval $EXECUTE_CMD bash "${REPO_DIR}/ci/get_cache_key.sh" "${{ matrix.source }}" >> $GITHUB_OUTPUT
- name: Fetch package cache
id: cache-packages
uses: actions/cache@v3
Expand All @@ -83,17 +84,16 @@ jobs:
- name: Build packages
if: steps.cache-packages.outputs.cache-hit != 'true'
run: |
eval $EXECUTE_CMD bash "${BUILD_DIR}/$CI_SCRIPT" "${{ matrix.source }}"
sudo mkdir -p -m 777 packages
sudo mv -n build/*.deb packages
eval $EXECUTE_CMD bash "${REPO_DIR}/$CI_SCRIPT" "${{ matrix.source }}"
- name: Upload Debian Packages Just Built to Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.source }}
path: packages
- name: Check SHA256
run: |
sudo chown -R $USER build
sudo chown -R $USER packages
cd packages
for file in *.deb
do
Expand Down Expand Up @@ -123,8 +123,8 @@ jobs:
"bitcoin-timechain-mainnet", "electrs", "electrs-mainnet", "electrs-regtest",
"btcpayserver", "btcpayserver-system-mainnet", "btcpayserver-system-regtest",
"lnd", "lnd-system-mainnet", "lnd-system-regtest","lnd-unlocker-system-mainnet",
"lnd-unlocker-system-mainnet", "selfhost",
"selfhost-nginx", "selfhost-onion", "selfhost-clearnet",
"lnd-unlocker-system-mainnet", "nbxplorer", "nbxplorer-regtest", "nbxplorer-mainnet",
"selfhost", "selfhost-nginx", "selfhost-onion", "selfhost-clearnet",
"selfhost-clearnet-certbot", "tor-hs-patch-config", "thunderhub",
"thunderhub-system-mainnet", "thunderhub-system-regtest", "btc-rpc-explorer-mainnet",
"lndconnect", "selfhost-dashboard-bin", "selfhost-dashboard", "btc-transmuter",
Expand All @@ -133,7 +133,7 @@ jobs:
- uses: actions/checkout@v2
- name: Setup Test Prefix
run: |
echo "TEST_PREFIX=sudo chown -R $USER_NAME $BUILD_DIR && cd $BUILD_DIR && make BUILD_DIR=$BUILD_DIR/build" >> $GITHUB_ENV
echo "TEST_PREFIX=sudo chown -R $USER_NAME $REPO_DIR && cd $REPO_DIR && make BUILD_DIR=$REPO_DIR/packages" >> $GITHUB_ENV
- name: Prepare Podman Container Running Environment
run: |
sudo apt-get update
Expand All @@ -158,7 +158,7 @@ jobs:
- name: Test CADR Basic
run: |
mkdir -p build
mv packages/*/*.deb build/
mv packages/*/*.deb packages/
eval $SPAWN_CONTAINER
eval $EXECUTE_CMD bash -c "\"$TEST_PREFIX test-here-basic-${{ matrix.package }}\""
$PODMAN_CMD rm -f $CONTAINER_NAME
Expand All @@ -180,7 +180,7 @@ jobs:
- uses: actions/checkout@v2
- name: Setup Test Prefix
run: |
echo "TEST_PREFIX=sudo chown -R $USER_NAME $BUILD_DIR && cd $BUILD_DIR && make BUILD_DIR=$BUILD_DIR/build" >> $GITHUB_ENV
echo "TEST_PREFIX=sudo chown -R $USER_NAME $REPO_DIR && cd $REPO_DIR && make BUILD_DIR=$REPO_DIR/packages" >> $GITHUB_ENV
- name: Prepare Podman Container Running Environment
run: |
sudo apt-get update
Expand All @@ -204,8 +204,7 @@ jobs:
path: packages
- name: Test multi-package CADR integration
run: |
mkdir -p build
mv packages/*/*.deb build/
mv packages/*/*.deb packages
eval $SPAWN_CONTAINER
eval $EXECUTE_CMD bash -c "\"$TEST_PREFIX test-here-multi-package-${{ matrix.test }}\""
$PODMAN_CMD rm -f $CONTAINER_NAME
Expand Down
8 changes: 5 additions & 3 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
set -ex

BUILD_DIR=/home/user/cadr-build
REPO_DIR=/home/user/cryptoanarchy-deb-repo-builder
sudo apt-get update
sudo chown -R user $BUILD_DIR
cd $BUILD_DIR
MKCMD="make SOURCES="$1" BUILD_DIR=${BUILD_DIR}/build"
sudo chown -R user "$REPO_DIR"
cd "$REPO_DIR"
MKCMD="make SOURCES="$1" BUILD_DIR=${BUILD_DIR}"
$MKCMD build-dep
$MKCMD all
mv "$BUILD_DIR"/*.deb "$REPO_DIR/packages"
2 changes: 1 addition & 1 deletion ci/get_cache_key.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

cd /home/user/cadr-build
cd /home/user/cryptoanarchy-deb-repo-builder

dep="$1"
src="build_rules/$dep.yaml"
Expand Down
2 changes: 1 addition & 1 deletion debcrafter-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b60342e0ba393599fa86690e2f76acf5e1325431
588c26f896e3f51bebc840106bf4ebaa92833cbe
5 changes: 5 additions & 0 deletions pkg_specs/btc-transmuter.changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
btc-transmuter (0.0.55-3) buster; urgency=medium

* Fixed database handling

-- Martin Habovstiak <[email protected]> Thu, 18 Jul 2024 07:19:43 +0000
btc-transmuter (0.0.55-2) buster; urgency=medium

* Improved sandboxing of service
Expand Down
5 changes: 5 additions & 0 deletions pkg_specs/btcpayserver.changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
btcpayserver (1.13.4-2) buster; urgency=medium

* Fixed database handling

-- Martin Habovstiak <[email protected]> Thu, 18 Jul 2024 07:19:18 +0000
btcpayserver (1.13.4-1) buster; urgency=medium

* Updated upstream version
Expand Down
1 change: 1 addition & 0 deletions pkg_specs/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ template = """
postgres=User ID=_DBC_DBUSER_;Password=_DBC_DBPASS_;Host=_DBC_DBSERVER_;Port=_DBC_DBPORT_;Database=_DBC_DBNAME_;
"""
min_version = "13"
since = "2.4.5-1"

[map_variants.mainnet_enabled]
mainnet = "1"
Expand Down
5 changes: 5 additions & 0 deletions pkg_specs/nbxplorer.changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
nbxplorer (2.4.5-2) buster; urgency=medium

* Fixed database handling

-- Martin Habovstiak <[email protected]> Thu, 18 Jul 2024 07:18:24 +0000
nbxplorer (2.4.5-1) buster; urgency=medium

* Updated upstream version
Expand Down
5 changes: 5 additions & 0 deletions pkg_specs/selfhost-dashboard.changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
selfhost-dashboard (0.2.1-3) buster; urgency=medium

* Fixed database handling

-- Martin Habovstiak <[email protected]> Thu, 18 Jul 2024 07:19:27 +0000
selfhost-dashboard (0.2.1-2) bullseye; urgency=medium

* Bullseye build
Expand Down
Loading