Compare commits

...

17 commits

Author SHA1 Message Date
Alex Janka cd0d39541b lol
All checks were successful
/ publish-release-repo (push) Successful in 20s
/ build-forgejo-deb (push) Successful in 4m57s
/ installtest-bookworm-user (push) Successful in 30s
2024-07-14 14:22:09 +10:00
Alex Janka 49e0aa7021 update changelog 2024-07-14 14:22:09 +10:00
Alex Janka f24cdd64f8 get matching tagged release 2024-07-14 14:22:09 +10:00
Alex Janka 13de944abf add changelog for 7.0.2/7.0.3/7.0.4 2024-07-14 14:22:08 +10:00
Alex Janka 75b06cbc2f use forgejo-release@main 2024-07-14 14:21:52 +10:00
Alex Janka 81ad95dbb7 actually don't setup node first 2024-07-14 14:21:52 +10:00
Alex Janka 8da16fd2cb setup node first 2024-07-14 14:21:52 +10:00
Alex Janka 3a3a480540 remove forgejo-sqlite from debian control 2024-07-14 14:21:51 +10:00
Alex Janka 252eb37f7d run on tag + remove unused sqlite 2024-07-14 14:20:54 +10:00
Alex Janka ea1fde19e7 disable vuln checks 2024-07-14 14:20:23 +10:00
Alex Janka 7a740cf5d6 dont build repo deb packages 2024-07-14 14:20:23 +10:00
Alex Janka 1a80cada89 no docker specification + no buster 2024-07-14 14:20:23 +10:00
Alex Janka 2c58436bbf fix workflow for me 2024-07-14 14:20:23 +10:00
Alex Janka 7bb821c4f6 remove mirroring 2024-07-14 14:20:23 +10:00
Alex Janka c625377da9 arm64 2024-07-14 14:20:23 +10:00
crystal b5914277d3
[squash] split common data
instead of building the packaged binaries with the `bindata` tag, this
introduces a new forgejo-common package which contains common assets and
architecture independent files.

This is the first of a handful of PRs that will ultimately enable
building packages for multiple architectures.
2024-07-07 11:23:16 -06:00
Moritz Kobel 7fcc7721f8
Forgejo v7.0.5 2024-07-05 22:04:46 +02:00
12 changed files with 102 additions and 164 deletions

View file

@ -8,6 +8,10 @@ CI_VERIFY_RETRY_COUNT=30 # How many times to retry before giving up if the pipel
case "$1" in
"submodule-build")
cd "$2"
LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.StaticRootPath=/usr/share/forgejo\""
LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/forgejo\""
LDFLAGS="$LDFLAGS -X \"code.gitea.io/gitea/modules/setting.CustomConf=/etc/forgejo/app.ini\""
export LDFLAGS
make build
EXIT_STATUS=$?
mv gitea ../"$3"
@ -123,16 +127,16 @@ case "$1" in
CI_COMMIT_TAG="$CI_COMMIT_TAG_RESOLVE"
fi
if [ $CI_COMMIT_TAG ] ; then
CI_RELEASE_ASSETS=$(curl $CI_VERIFY_API/api/v1/repos/$CI_VERIFY_REPO/releases/tags/$CI_COMMIT_TAG | jq -c '.assets[]' | grep linux-amd64)
CI_RELEASE_BINARY_URL=$(echo "$CI_RELEASE_ASSETS" | grep linux-amd64\" | jq -r --jsonargs .browser_download_url)
CI_RELEASE_SHA256=$(curl $(echo "$CI_RELEASE_ASSETS" | grep linux-amd64.sha256\" | jq -r --jsonargs .browser_download_url) | cut -d ' ' -f1)
CI_RELEASE_ASSETS=$(curl $CI_VERIFY_API/api/v1/repos/$CI_VERIFY_REPO/releases/tags/$CI_COMMIT_TAG | jq -c '.assets[]' | grep linux-arm64)
CI_RELEASE_BINARY_URL=$(echo "$CI_RELEASE_ASSETS" | grep linux-arm64\" | jq -r --jsonargs .browser_download_url)
CI_RELEASE_SHA256=$(curl $(echo "$CI_RELEASE_ASSETS" | grep linux-arm64.sha256\" | jq -r --jsonargs .browser_download_url) | cut -d ' ' -f1)
wget -nv --content-disposition $CI_RELEASE_BINARY_URL
DOWNLOAD_SHA256=$(sha256sum forgejo-*-linux-amd64 | cut -d ' ' -f1)
DOWNLOAD_SHA256=$(sha256sum forgejo-*-linux-arm64 | cut -d ' ' -f1)
if [ $CI_RELEASE_SHA256 != $DOWNLOAD_SHA256 ] ; then
echo "ERROR: Downloaded file didn't match expected SHA256 sum"
exit 1
fi
mv forgejo-*-linux-amd64 $2
mv forgejo-*-linux-arm64 $2
chmod +x $2
exit 0
else
@ -145,11 +149,14 @@ case "$1" in
mkdir deb/forgejo-sqlite-bin
mv forgejo-bin deb/forgejo-bin/forgejo
mv forgejo-sqlite-bin deb/forgejo-sqlite-bin/forgejo
cp -r forgejo/public deb/public
cp -r forgejo/templates deb/templates
cp -r forgejo/options deb/options
if [ -x forgejo-bin-dl ] ; then
mkdir deb/forgejo-bin-dl
mv forgejo-bin-dl deb/forgejo-bin-dl/forgejo
mv deb/.forgejo-bin.install deb/debian/forgejo-bin.install
ln -s forgejo.preinst deb/debian/forgejo-bin.preinst
ln -s forgejo-common.preinst deb/debian/forgejo-bin.preinst
ln -s forgejo.postinst deb/debian/forgejo-bin.postinst
ln -s forgejo.prerm deb/debian/forgejo-bin.prerm
echo >> deb/debian/control
@ -192,13 +199,27 @@ case "$1" in
"install-run-test")
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y ./"$2"
[ -f "/etc/default/forgejo" ] && . /etc/default/forgejo
[ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo
[ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo
sudo -u $FORGEJO_USER USER=$FORGEJO_USER \
HOME=$FORGEJO_HOME FORGEJO_WORK_DIR=$FORGEJO_HOME \
forgejo web -q --config /etc/forgejo/app.ini &
if [ "$2" = "${2#"./forgejo-bin_"}" ] ; then
APT_FORGEJO_COMMON_RESOLVE="$(ls -1 ./forgejo-common_*_all.deb)"
if [ -f "$APT_FORGEJO_COMMON_RESOLVE" ] ; then
APT_FORGEJO_COMMON="./$APT_FORGEJO_COMMON_RESOLVE"
else
echo "ERR! Unable to find the necessary forgejo-common package!"
exit 96
fi
fi
apt install -y $APT_FORGEJO_COMMON ./"$2"
if [ -f "/etc/default/forgejo" ] || [ "$2" != "${2#"./forgejo-bin_"}" ] ; then
[ -f "/etc/default/forgejo" ] && . /etc/default/forgejo
[ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo
[ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo
sudo -u $FORGEJO_USER USER=$FORGEJO_USER \
HOME=$FORGEJO_HOME FORGEJO_WORK_DIR=$FORGEJO_HOME \
forgejo web -q --config /etc/forgejo/app.ini &
else
echo "No env setup! Run testing defaults using hardcoded vars..."
sudo -u forgejo USER=forgejo forgejo web -q &
fi
sleep 10
curl http://localhost:3000/ | grep -A 4 "Powered by Forgejo"
exit $?

View file

@ -1,21 +1,11 @@
on: [push, pull_request]
on:
push:
tags:
- "*"
jobs:
mirror:
runs-on: bookworm
if: github.event_name == 'push' && github.repository == 'forgejo-contrib/forgejo-deb'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "mirror repo: code.forgejo.org"
env:
FORGEJO_DEST: code.forgejo.org
FORGEJO_KEY: ${{ secrets.cfo_api_key }}
run: ./.action-forgejo-mirror.sh
build-forgejo-deb:
runs-on: bullseye
runs-on: bookworm
steps:
- uses: actions/checkout@v4
with:
@ -48,24 +38,17 @@ jobs:
cd forgejo
git update-ref refs/heads/tag_test $(git rev-parse --verify HEAD)
- run: ./.ci-make.sh submodule-make forgejo security-check
# - run: ./.ci-make.sh submodule-make forgejo security-check
- run: ./.ci-make.sh submodule-make forgejo frontend
- run: ./.ci-make.sh submodule-make forgejo checks-backend
# - run: ./.ci-make.sh submodule-make forgejo checks-backend
- name: Download Forgejo binary
run: ./.ci-make.sh download-binary forgejo-bin-dl
- name: Build Forgejo for amd64
- name: Build Forgejo for arm64
run: ./.ci-make.sh submodule-build forgejo forgejo-bin
env:
TAGS: bindata
- name: Build Forgejo (with SQLite) for amd64
run: ./.ci-make.sh submodule-build forgejo forgejo-sqlite-bin
env:
TAGS: bindata sqlite sqlite_unlock_notify
- run: ./.ci-make.sh package-prep
- run: ./.ci-make.sh package-build-deps
@ -74,70 +57,17 @@ jobs:
- run: ./.ci-make.sh package-clean
- name: build repo package
run: |
cd repo-deb
./build.sh actions
- name: generate sha256
run: |
./.ci-make.sh pkg-gen-sha256
./.ci-make.sh preview-sha256
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
- uses: actions/upload-artifact@v3
with:
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
path: |
*.deb
*.deb.sha256
repo-deb/*.deb
installtest-bookworm-sqlite:
runs-on: bookworm
steps:
- uses: actions/checkout@v4
- name: "actions prep: installtest"
id: ciprep
run: ./.ci-make.sh actions-prep installtest
- uses: actions/download-artifact@v3
with:
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
installtest-bullseye-sqlite:
runs-on: bullseye
steps:
- uses: actions/checkout@v4
- name: "actions prep: installtest"
id: ciprep
run: ./.ci-make.sh actions-prep installtest
- uses: actions/download-artifact@v3
with:
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
installtest-buster-sqlite:
runs-on: buster
steps:
- uses: actions/checkout@v4
- name: "actions prep: installtest"
id: ciprep
run: ./.ci-make.sh actions-prep installtest
- uses: actions/download-artifact@v3
with:
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
installtest-bookworm-user:
runs-on: bookworm
@ -153,44 +83,10 @@ jobs:
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
- run: ./.ci-make.sh test-userinst-prep
- run: ./.ci-make.sh install-run-test ./forgejo_*_amd64.deb
testsuite-repo-upgrade-sqlite:
runs-on: bookworm
steps:
- uses: actions/checkout@v4
- name: "actions prep: installtest"
id: ciprep
run: ./.ci-make.sh actions-prep installtest
- uses: actions/download-artifact@v3
with:
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
- run: ./.ci-make.sh install-repo-test ./repo-deb/forgejo-deb-repo_0-0_all.deb forgejo-sqlite
- run: ./.ci-make.sh force-clean-forgejo
- run: ./.ci-make.sh install-run-test ./forgejo-sqlite_*_amd64.deb
- run: ./.ci-make.sh verify-data-dir-chmod
installtest-buster-bin:
runs-on: buster
steps:
- uses: actions/checkout@v4
- name: "actions prep: installtest"
id: ciprep
run: ./.ci-make.sh actions-prep installtest
- uses: actions/download-artifact@v3
with:
name: forgejo-deb-${{ steps.ciprep.outputs.artifactlabel }}
- run: ./.ci-make.sh install-run-test ./forgejo-bin_*_amd64.deb
- run: ./.ci-make.sh install-run-test ./forgejo_*_arm64.deb
publish-release-repo:
runs-on: bookworm
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.repository == 'forgejo-contrib/forgejo-deb'
steps:
- uses: actions/checkout@v4
@ -206,27 +102,20 @@ jobs:
- run: mkdir forgejo-release
- run: mv *.deb *.deb.sha256 forgejo-release/
- uses: actions/forgejo-release@v1
- uses: actions/forgejo-release@main
with:
direction: upload
url: https://codeberg.org
token: ${{ secrets.codeberg_api_key }}
release-dir: forgejo-release
- uses: actions/forgejo-release@v1
with:
direction: upload
url: https://code.forgejo.org
token: ${{ secrets.cfo_api_key }}
url: https://git.alexjanka.com
token: ${{ secrets.PACKAGING_TOKEN }}
release-dir: forgejo-release
- name: Debian package registry publish
env:
FORGEJO_SITE: https://code.forgejo.org
FORGEJO_OWNER: forgejo-contrib
DEBIAN_DIST: bullseye
DEBIAN_COMPONENT: forgejo-lts
FORGEJO_KEY: ${{ secrets.cfo_api_key }}
FORGEJO_SITE: https://git.alexjanka.com
FORGEJO_OWNER: alex
DEBIAN_DIST: testing
DEBIAN_COMPONENT: forgejo
FORGEJO_KEY: ${{ secrets.PACKAGING_TOKEN }}
run: |
cd forgejo-release
../.ci-forgejo-apt.sh *.deb

View file

@ -1,8 +1,8 @@
Package: forgejo-bin
Architecture: amd64
Architecture: arm64
Priority: optional
Provides: forgejo,gitea
Provides: forgejo, gitea
Depends: adduser (>= 3.11), git
Conflicts: forgejo,forgejo-sqlite,forgejo-common
Conflicts: forgejo, forgejo-sqlite, forgejo-common
Description: Forgejo: Beyond Coding. We Forge. (binary)
The official Forgejo release binary in a Debian package

View file

@ -1,4 +1,4 @@
forgejo (7.0.1-1) unstable; urgency=medium
forgejo (7.0.1-2) unstable; urgency=medium
WARNING: Forgejo will be upgraded to v7.0.1 LTS

View file

@ -1,7 +1,37 @@
forgejo (7.0.5-1) unstable; urgency=medium
* Forgejo version 7.0.5
* See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#7-0-5
* Split `forgejo-common` package for extra data
-- crystal <crystal@noreply.codeberg.org> Sun, 07 July 2024 17:22:00 +0000
forgejo (7.0.4-1) unstable; urgency=medium
* Forgejo version 7.0.4
* See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#7-0-4
-- alex <noreply@alexjanka.com> Sat, 15 Jun 2024 00:00:00 +0000
forgejo (7.0.3-1) unstable; urgency=medium
* Forgejo version 7.0.3
* See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#7-0-3
-- alex <noreply@alexjanka.com> Sat, 15 Jun 2024 00:00:00 +0000
forgejo (7.0.2-1) unstable; urgency=medium
* Forgejo version 7.0.2
* See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#7-0-2
-- alex <noreply@alexjanka.com> Sat, 15 Jun 2024 00:00:00 +0000
forgejo (7.0.1-1) unstable; urgency=medium
* Forgejo version 7.0.1
* See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#7-0-1
* Forgejo Actions based build process
-- crystal <crystal@noreply.codeberg.org> Sat, 27 Apr 2024 15:35:00 +0000
@ -190,4 +220,3 @@ forgejo (1.18.3.0-1) unstable; urgency=medium
* See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#1-18-3-0
-- crystal <crystal@noreply.codeberg.org> Fri, 3 Feb 2023 12:38:00 +0000

View file

@ -5,19 +5,18 @@ Maintainer: crystal <crystal@noreply.codeberg.org>
Build-Depends: debhelper (>= 10)
Package: forgejo
Architecture: amd64
Architecture: arm64
Priority: optional
Provides: gitea
Depends: adduser (>= 3.11),git
Conflicts: forgejo-sqlite,forgejo-bin
Depends: forgejo-common (= ${source:Version}), adduser (>= 3.11), git
Conflicts: forgejo-sqlite, forgejo-bin
Description: Forgejo: Beyond Coding. We Forge.
Forgejo with bindata ONLY - Use this package for MySQL or PostgreSQL setup
Package: forgejo-sqlite
Architecture: amd64
Package: forgejo-common
Architecture: all
Priority: optional
Provides: forgejo,gitea
Depends: adduser (>= 3.11),git
Conflicts: forgejo,forgejo-bin
Description: Forgejo: Beyond Coding. We Forge. (SQLite)
Forgejo with bindata and SQLite support - Use this package to get started immediately
Depends: forgejo | forgejo-sqlite (= ${source:Version})
Conflicts: forgejo-bin
Description: Common files for Forgejo
Common data used for all Forgejo packages and architectures.

View file

@ -0,0 +1,5 @@
public/ /usr/share/forgejo
templates/ /usr/share/forgejo
options/ /usr/share/forgejo
forgejo.service /usr/lib/systemd/system
app.ini /etc/forgejo

View file

@ -1,3 +1 @@
forgejo-sqlite-bin/forgejo /usr/bin
forgejo.service /usr/lib/systemd/system
app.ini /etc/forgejo

View file

@ -1 +0,0 @@
forgejo.preinst

View file

@ -1,3 +1 @@
forgejo-bin/forgejo /usr/bin
forgejo.service /usr/lib/systemd/system
app.ini /etc/forgejo

@ -1 +1 @@
Subproject commit 554f3697fc4519b44fb583925259db97eb3a8f5b
Subproject commit 65a89ce6be62018ea50cb01c080072973ce87efb