Compare commits
No commits in common. "2445a59d9da9eacb7be2e2a5056ff8552b39ca8c" and "26960a82bd2c22ebced2963f3e3908b1348f0c7d" have entirely different histories.
2445a59d9d
...
26960a82bd
11
.gitignore
vendored
Normal file
11
.gitignore
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Ignore downloaded binaries and verification files
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# Ignore build artifacts
|
||||||
|
*.deb
|
||||||
|
build/
|
||||||
|
tmp/
|
||||||
|
|
||||||
|
# Ignore common system files
|
||||||
|
.DS_Store
|
||||||
|
*.swp
|
7
amd64/DEBIAN/control
Normal file
7
amd64/DEBIAN/control
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Package: gitea
|
||||||
|
Version: 1.23.4-1
|
||||||
|
Architecture: amd64
|
||||||
|
Maintainer: Micha Espey <tracer@24unix.net>
|
||||||
|
Depends: adduser, ca-certificates, git, openssh-server, gpg, jq
|
||||||
|
Description: Gitea - Git with a cup of tea
|
||||||
|
A painless self-hosted Git service.
|
11
amd64/DEBIAN/postinst
Executable file
11
amd64/DEBIAN/postinst
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Ensure systemd is aware of the new service file
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
# Enable and start Gitea service
|
||||||
|
systemctl enable gitea
|
||||||
|
systemctl restart gitea || true
|
||||||
|
|
||||||
|
exit 0
|
7
amd64/DEBIAN/prerm
Executable file
7
amd64/DEBIAN/prerm
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Stop the Gitea service before updating/removal
|
||||||
|
systemctl stop gitea || true
|
||||||
|
|
||||||
|
exit 0
|
19
amd64/etc/systemd/system/gitea.service
Normal file
19
amd64/etc/systemd/system/gitea.service
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Gitea (Git with a cup of tea)
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
Requires=mariadb.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=2s
|
||||||
|
Type=simple
|
||||||
|
User=gitea
|
||||||
|
Group=gitea
|
||||||
|
WorkingDirectory=/opt/gitea/
|
||||||
|
ExecStart=/opt/gitea/bin/gitea web --config /etc/gitea/app.ini
|
||||||
|
Restart=always
|
||||||
|
Environment="GITEA_WORK_DIR=/opt/gitea/gitea"
|
||||||
|
Environment="GITEA_CUSTOM=/opt/gitea/custom"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
BIN
amd64/opt/gitea/bin/gitea
Executable file
BIN
amd64/opt/gitea/bin/gitea
Executable file
Binary file not shown.
7
arm64/DEBIAN/control
Normal file
7
arm64/DEBIAN/control
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Package: gitea
|
||||||
|
Version: 1.23.4-1
|
||||||
|
Architecture: arm64
|
||||||
|
Maintainer: Micha Espey <tracer@24unix.net>
|
||||||
|
Depends: adduser, ca-certificates, git, openssh-server, gpg, jq
|
||||||
|
Description: Gitea - Git with a cup of tea
|
||||||
|
A painless self-hosted Git service.
|
11
arm64/DEBIAN/postinst
Executable file
11
arm64/DEBIAN/postinst
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Ensure systemd is aware of the new service file
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
# Enable and start Gitea service
|
||||||
|
systemctl enable gitea
|
||||||
|
systemctl restart gitea || true
|
||||||
|
|
||||||
|
exit 0
|
7
arm64/DEBIAN/prerm
Executable file
7
arm64/DEBIAN/prerm
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Stop the Gitea service before updating/removal
|
||||||
|
systemctl stop gitea || true
|
||||||
|
|
||||||
|
exit 0
|
19
arm64/etc/systemd/system/gitea.service
Normal file
19
arm64/etc/systemd/system/gitea.service
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Gitea (Git with a cup of tea)
|
||||||
|
After=syslog.target
|
||||||
|
After=network.target
|
||||||
|
Requires=mariadb.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
RestartSec=2s
|
||||||
|
Type=simple
|
||||||
|
User=gitea
|
||||||
|
Group=gitea
|
||||||
|
WorkingDirectory=/opt/gitea/
|
||||||
|
ExecStart=/opt/gitea/bin/gitea web --config /etc/gitea/app.ini
|
||||||
|
Restart=always
|
||||||
|
Environment="GITEA_WORK_DIR=/opt/gitea/gitea"
|
||||||
|
Environment="GITEA_CUSTOM=/opt/gitea/custom"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
BIN
arm64/opt/gitea/bin/gitea
Executable file
BIN
arm64/opt/gitea/bin/gitea
Executable file
Binary file not shown.
60
build.sh
Executable file
60
build.sh
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e # Exit on error
|
||||||
|
|
||||||
|
# Set Variables
|
||||||
|
VERSION=$(curl -s https://dl.gitea.com/gitea/version.json | jq -r '.latest.version')
|
||||||
|
ARCHS=("amd64" "arm64")
|
||||||
|
GITEA_BASE_URL="https://dl.gitea.com/gitea/${VERSION}"
|
||||||
|
FILES=("xz" "xz.asc" "xz.sha256" "xz.sha256.asc")
|
||||||
|
|
||||||
|
# Download Gitea Binaries and Signatures
|
||||||
|
for ARCH in "${ARCHS[@]}"; do
|
||||||
|
echo "Downloading Gitea ${VERSION} for ${ARCH}..."
|
||||||
|
for FILE in "${FILES[@]}"; do
|
||||||
|
FILE_NAME="gitea-${VERSION}-linux-${ARCH}.${FILE}"
|
||||||
|
FILE_URL="${GITEA_BASE_URL}/${FILE_NAME}"
|
||||||
|
TARGET_FILE="dist/${ARCH}/${FILE_NAME}"
|
||||||
|
if [[ -f "$TARGET_FILE" ]]; then
|
||||||
|
echo "✅ File already exists: $TARGET_FILE (Skipping)"
|
||||||
|
else
|
||||||
|
echo "⬇️ Downloading: $FILE_URL"
|
||||||
|
wget -q "$FILE_URL" -O "$TARGET_FILE"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# Verify GPG Signatures
|
||||||
|
for ARCH in "${ARCHS[@]}"; do
|
||||||
|
echo "Verifying GPG signature for ${ARCH}..."
|
||||||
|
gpg --verify "dist/${ARCH}/gitea-${VERSION}-linux-${ARCH}.xz.asc" "dist/${ARCH}/gitea-${VERSION}-linux-${ARCH}.xz"
|
||||||
|
gpg --verify "dist/${ARCH}/gitea-${VERSION}-linux-${ARCH}.xz.sha256.asc" "dist/${ARCH}/gitea-${VERSION}-linux-${ARCH}.xz.sha256"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# Verify Checksums
|
||||||
|
for ARCH in "${ARCHS[@]}"; do
|
||||||
|
echo "Verifying SHA256 checksum for ${ARCH}..."
|
||||||
|
(cd "dist/${ARCH}" && sha256sum -c gitea-${VERSION}-linux-${ARCH}.xz.sha256)
|
||||||
|
done
|
||||||
|
|
||||||
|
# expand the Gitea binray to the target
|
||||||
|
for ARCH in "${ARCHS[@]}"; do
|
||||||
|
xz -dc "dist/${ARCH}/gitea-${VERSION}-linux-${ARCH}.xz" > "${ARCH}/opt/gitea/bin/gitea" || { echo "❌ Extraction failed for ${ARCH}"; exit 1; }
|
||||||
|
|
||||||
|
# Verify the extracted file isn't empty
|
||||||
|
if [[ ! -s "${ARCH}/opt/gitea/bin/gitea" ]]; then
|
||||||
|
echo "❌ Extracted file is empty for ${ARCH}. Something went wrong!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
chmod +x "${ARCH}/opt/gitea/bin/gitea"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Build Debian Packages
|
||||||
|
for ARCH in "${ARCHS[@]}"; do
|
||||||
|
echo "Building package for ${ARCH}..."
|
||||||
|
dpkg-deb --build "${ARCH}" "gitea_${VERSION}_${ARCH}.deb"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "All packages built successfully:"
|
||||||
|
ls -lh gitea_${VERSION}_*.deb
|
||||||
|
|
0
gitea-release.asc
Normal file
0
gitea-release.asc
Normal file
Loading…
x
Reference in New Issue
Block a user