Compare commits

..
Author SHA1 Message Date
DragonSlayer_14 cc1643cb8b Merge pull request 'Merge testing in main: 1.0.0 Release' (#14) from testing into main
Main Release & Publish / Build, Publish Packages (Stable) & Create Release (push) Successful in 52s
Reviewed-on: #14
2026-08-24 18:03:33 +00:00
7 changed files with 27 additions and 112 deletions
-5
View File
@@ -1,5 +0,0 @@
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
[target.i686-unknown-linux-gnu]
linker = "i686-linux-gnu-gcc"
+8 -22
View File
@@ -19,12 +19,6 @@ jobs:
toolchain: stable toolchain: stable
cache: false cache: false
- name: Install Cross-Compilation Toolchains & Dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu gcc-i686-linux-gnu
rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu i686-unknown-linux-gnu
- name: Install Packaging Tools (Prebuilt Binaries) - name: Install Packaging Tools (Prebuilt Binaries)
run: | run: |
mkdir -p ~/.cargo/bin mkdir -p ~/.cargo/bin
@@ -36,29 +30,21 @@ jobs:
run: | run: |
cargo test cargo test
- name: Build Release Binaries - name: Build Release Binary
run: | run: |
cargo build --release --target x86_64-unknown-linux-gnu cargo build --release
cargo build --release --target aarch64-unknown-linux-gnu
cargo build --release --target i686-unknown-linux-gnu
- name: Build Debian Packages (.deb) - name: Build Debian Package (.deb)
run: | run: |
cargo deb --target x86_64-unknown-linux-gnu --no-build cargo deb
cargo deb --target aarch64-unknown-linux-gnu --no-build
cargo deb --target i686-unknown-linux-gnu --no-build
- name: Build Fedora / RPM Packages (.rpm) - name: Build Fedora / RPM Package (.rpm)
run: | run: |
cargo generate-rpm --target x86_64-unknown-linux-gnu -o target/generate-rpm cargo generate-rpm
cargo generate-rpm --target aarch64-unknown-linux-gnu -o target/generate-rpm
cargo generate-rpm --target i686-unknown-linux-gnu -o target/generate-rpm
- name: Build Arch Linux Packages (.pkg.tar.zst) - name: Build Arch Linux Package (.pkg.tar.zst)
run: | run: |
python3 scripts/package-arch.py --target x86_64-unknown-linux-gnu python3 scripts/package-arch.py
python3 scripts/package-arch.py --target aarch64-unknown-linux-gnu
python3 scripts/package-arch.py --target i686-unknown-linux-gnu
- name: Publish Packages to Gitea Package Registry - name: Publish Packages to Gitea Package Registry
env: env:
+8 -22
View File
@@ -19,12 +19,6 @@ jobs:
toolchain: stable toolchain: stable
cache: false cache: false
- name: Install Cross-Compilation Toolchains & Dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu gcc-i686-linux-gnu
rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu i686-unknown-linux-gnu
- name: Install Packaging Tools (Prebuilt Binaries) - name: Install Packaging Tools (Prebuilt Binaries)
run: | run: |
mkdir -p ~/.cargo/bin mkdir -p ~/.cargo/bin
@@ -36,29 +30,21 @@ jobs:
run: | run: |
cargo test cargo test
- name: Build Release Binaries - name: Build Release Binary
run: | run: |
cargo build --release --target x86_64-unknown-linux-gnu cargo build --release
cargo build --release --target aarch64-unknown-linux-gnu
cargo build --release --target i686-unknown-linux-gnu
- name: Build Debian Packages (.deb) - name: Build Debian Package (.deb)
run: | run: |
cargo deb --target x86_64-unknown-linux-gnu --no-build cargo deb
cargo deb --target aarch64-unknown-linux-gnu --no-build
cargo deb --target i686-unknown-linux-gnu --no-build
- name: Build Fedora / RPM Packages (.rpm) - name: Build Fedora / RPM Package (.rpm)
run: | run: |
cargo generate-rpm --target x86_64-unknown-linux-gnu -o target/generate-rpm cargo generate-rpm
cargo generate-rpm --target aarch64-unknown-linux-gnu -o target/generate-rpm
cargo generate-rpm --target i686-unknown-linux-gnu -o target/generate-rpm
- name: Build Arch Linux Packages (.pkg.tar.zst) - name: Build Arch Linux Package (.pkg.tar.zst)
run: | run: |
python3 scripts/package-arch.py --target x86_64-unknown-linux-gnu python3 scripts/package-arch.py
python3 scripts/package-arch.py --target aarch64-unknown-linux-gnu
python3 scripts/package-arch.py --target i686-unknown-linux-gnu
- name: Publish Packages to Gitea Package Registry - name: Publish Packages to Gitea Package Registry
env: env:
Generated
+1 -1
View File
@@ -29,7 +29,7 @@ checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
[[package]] [[package]]
name = "docker-update" name = "docker-update"
version = "1.0.1" version = "1.0.0"
dependencies = [ dependencies = [
"confy", "confy",
"libc 1.0.0-alpha.4", "libc 1.0.0-alpha.4",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "docker-update" name = "docker-update"
version = "1.0.1" version = "1.0.0"
edition = "2024" edition = "2024"
authors = ['DragonSlayer_14'] authors = ['DragonSlayer_14']
readme = "README.md" readme = "README.md"
+6 -9
View File
@@ -29,7 +29,7 @@ auf neuere Versionen prüft, aktualisiert und neu startet.
## Voraussetzungen ## Voraussetzungen
- **Betriebssystem**: Linux (amd64 / x86_64, arm64 / aarch64, i386 / i686) - **Betriebssystem**: Linux (x86_64, aarch64)
- **Laufzeit-Abhängigkeiten**: - **Laufzeit-Abhängigkeiten**:
- `docker` (inkl. Docker Compose Plugin `docker compose` oder Standalone `docker-compose`) - `docker` (inkl. Docker Compose Plugin `docker compose` oder Standalone `docker-compose`)
- `sudo` - `sudo`
@@ -159,7 +159,7 @@ Füge das Repository in `/etc/pacman.conf` ein:
```ini ```ini
[stable] [stable]
SigLevel = Optional TrustAll SigLevel = Optional TrustAll
Server = https://gitea.creative-dragonslayer.de/api/packages/Linuxapps/arch/stable/$arch Server = https://gitea.creative-dragonslayer.de/api/packages/Linuxapps/arch/stable/x86_64
``` ```
Installiere das Paket anschließend: Installiere das Paket anschließend:
@@ -175,7 +175,7 @@ Füge das Testing-Repository in `/etc/pacman.conf` ein:
```ini ```ini
[testing] [testing]
SigLevel = Optional TrustAll SigLevel = Optional TrustAll
Server = https://gitea.creative-dragonslayer.de/api/packages/Linuxapps/arch/testing/$arch Server = https://gitea.creative-dragonslayer.de/api/packages/Linuxapps/arch/testing/x86_64
``` ```
Installiere das Paket: Installiere das Paket:
@@ -268,19 +268,16 @@ Die Paketkonfiguration und Abhängigkeiten (`sudo`, `docker.io | docker-ce`) sin
Die Paketmetadaten und Abhängigkeiten für Arch Linux sind direkt in `Cargo.toml` unter `[package.metadata.arch]` Die Paketmetadaten und Abhängigkeiten für Arch Linux sind direkt in `Cargo.toml` unter `[package.metadata.arch]`
hinterlegt. Das Paket kann nach dem Kompilieren des Release-Builds über das Skript `scripts/package-arch.py` (analog zu hinterlegt. Das Paket kann nach dem Kompilieren des Release-Builds über das Skript `scripts/package-arch.py` (analog zu
CI/CD) erzeugt werden (optional mit `--target <TRIPLE>` für Cross-Builds): CI/CD) erzeugt
werden:
```bash ```bash
# Release kompilieren # Release kompilieren
cargo build --release cargo build --release
# Arch Linux-Paket (.pkg.tar.zst) erstellen (Standard: Host/x86_64) # Arch Linux-Paket (.pkg.tar.zst) erstellen
python3 scripts/package-arch.py python3 scripts/package-arch.py
# Optional für spezifische Zielarchitektur:
# python3 scripts/package-arch.py --target aarch64-unknown-linux-gnu
# python3 scripts/package-arch.py --target i686-unknown-linux-gnu
# Installation des erstellten Pakets # Installation des erstellten Pakets
sudo pacman -U target/arch/docker-update-*.pkg.tar.zst sudo pacman -U target/arch/docker-update-*.pkg.tar.zst
``` ```
+3 -52
View File
@@ -1,28 +1,12 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse
import json import json
import os import os
import subprocess import subprocess
import tempfile import tempfile
import time import time
TARGET_ARCH_MAP = {
"x86_64-unknown-linux-gnu": "x86_64",
"x86_64-unknown-linux-musl": "x86_64",
"x86_64": "x86_64",
"amd64": "x86_64",
"aarch64-unknown-linux-gnu": "aarch64",
"aarch64-unknown-linux-musl": "aarch64",
"aarch64": "aarch64",
"arm64": "aarch64",
"i686-unknown-linux-gnu": "i686",
"i686-unknown-linux-musl": "i686",
"i686": "i686",
"i386": "i686",
}
def main():
def build_package(target_triple=None, target_arch=None):
metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--format-version", "1", "--no-deps"])) metadata = json.loads(subprocess.check_output(["cargo", "metadata", "--format-version", "1", "--no-deps"]))
pkg = metadata["packages"][0] pkg = metadata["packages"][0]
name = pkg["name"] name = pkg["name"]
@@ -35,31 +19,7 @@ def build_package(target_triple=None, target_arch=None):
arch_meta = pkg.get("metadata", {}).get("arch", {}) arch_meta = pkg.get("metadata", {}).get("arch", {})
pkgrel = arch_meta.get("pkgrel", "1") pkgrel = arch_meta.get("pkgrel", "1")
default_arch = arch_meta.get("arch", "x86_64") arch = arch_meta.get("arch", "x86_64")
if target_arch:
arch = TARGET_ARCH_MAP.get(target_arch, target_arch)
elif target_triple:
arch = TARGET_ARCH_MAP.get(target_triple, default_arch)
else:
arch = default_arch
candidate_paths = []
if target_triple:
candidate_paths.append(f"target/{target_triple}/release/{name}")
candidate_paths.append(f"target/release/{name}")
bin_path = None
for p in candidate_paths:
if os.path.exists(p):
bin_path = p
break
if not bin_path:
raise FileNotFoundError(
f"Keine kompilierte Binary für {name} gefunden. Gesuchte Pfade: {candidate_paths}"
)
depends = arch_meta.get("depends", ["gcc-libs", "glibc", "sudo", "docker-ce-cli", "docker-compose-plugin"]) depends = arch_meta.get("depends", ["gcc-libs", "glibc", "sudo", "docker-ce-cli", "docker-compose-plugin"])
optdepends = arch_meta.get("optdepends", ["docker-compose: Unterstützung für Docker Compose v1"]) optdepends = arch_meta.get("optdepends", ["docker-compose: Unterstützung für Docker Compose v1"])
@@ -71,7 +31,7 @@ def build_package(target_triple=None, target_arch=None):
os.makedirs(doc_dir, exist_ok=True) os.makedirs(doc_dir, exist_ok=True)
os.makedirs(lic_dir, exist_ok=True) os.makedirs(lic_dir, exist_ok=True)
subprocess.run(["install", "-m", "755", bin_path, f"{bin_dir}/{name}"], check=True) subprocess.run(["install", "-m", "755", f"target/release/{name}", f"{bin_dir}/{name}"], check=True)
if os.path.exists("LICENSE"): if os.path.exists("LICENSE"):
subprocess.run(["install", "-m", "644", "LICENSE", f"{lic_dir}/LICENSE"], check=True) subprocess.run(["install", "-m", "644", "LICENSE", f"{lic_dir}/LICENSE"], check=True)
if os.path.exists("README.md"): if os.path.exists("README.md"):
@@ -107,14 +67,5 @@ def build_package(target_triple=None, target_arch=None):
print(f"Arch-Paket erfolgreich erstellt: {output_file}") print(f"Arch-Paket erfolgreich erstellt: {output_file}")
def main():
parser = argparse.ArgumentParser(description="Erstellt Arch Linux-Pakete (.pkg.tar.zst)")
parser.add_argument("--target", help="Rust Target-Triple (z.B. x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, i686-unknown-linux-gnu)")
parser.add_argument("--arch", help="Architektur (z.B. x86_64, aarch64, i686)")
args = parser.parse_args()
build_package(target_triple=args.target, target_arch=args.arch)
if __name__ == "__main__": if __name__ == "__main__":
main() main()