commit ae31baec3848ddc3678940a399676ea0d12842b3 Author: Ward Nakchbandi (Cosmic Fusion) Date: Mon Jun 26 13:00:32 2023 +0300 first commit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..147efc2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: PikaOS Package Release + +on: + workflow_dispatch + +jobs: + build: + runs-on: self-hosted + container: + image: ghcr.io/pikaos-linux/pika-package-container:latest + volumes: + - /proc:/proc + options: --privileged -it + + steps: + - uses: actions/checkout@v3 + + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v5 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: replace + + - name: Update apt cache + run: apt update + + - name: Build Package + run: ./main.sh + + - name: Release Package + run: ./release.sh + + - name: Purge cache + uses: jakejarvis/cloudflare-purge-action@master + env: + # Zone is required by both authentication methods + CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} + + CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} + PURGE_URLS: '["https://ppa.pika-os.com/dists/lunar/InRelease", "https://ppa.pika-os.com/dists/lunar/main/binary-i386/Packages.gz", "https://ppa.pika-os.com/dists/lunar/main/binary-amd64/Packages.gz", "https://ppa.pikaos.com/dists/lunar/pika-sources.deb", "https://ppa.pika-os.com/dists/lunar/main/source/Sources.gz" ]' diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..72ee328 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +fvs (0.3.4-99pika1.lunar) lunar; urgency=medium + + * Initial Creation + + -- Ward Nakchbandi Fri, 09 Oct 2022 21:38:00 +0300 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b4fc294 --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: fvs +Section: python +Priority: optional +Maintainer: Debian Python Team +Build-Depends: debhelper-compat (= 13), + pybuild-plugin-pyproject, + dh-python, + python3-all-dev, + python3-setuptools, + libyaml-dev (>= 0.2.2~), + cython3, + python3-orjson +Rules-Requires-Root: no +Standards-Version: 4.6.1 +Homepage: https://github.com/mirkobrombin/FVS + +Package: python3-fvs +Architecture: any +Multi-Arch: allowed +Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}, python3-orjson +Description: File Versioning System with hash comparison, deduplication and data storage to create unlinked states that can be deleted diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..443674f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Mirko Brombin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..3abfc5d --- /dev/null +++ b/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all +export PYBUILD_NAME=FVS + +build3vers := $(shell py3versions -sv) + +%: + dh $@ --with python3 --buildsystem pybuild diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/main.sh b/main.sh new file mode 100755 index 0000000..1c0aac9 --- /dev/null +++ b/main.sh @@ -0,0 +1,15 @@ +# Clone Upstream +git clone https://github.com/mirkobrombin/FVS -b 0.3.4 ./fvs +cp -rvf ./debian ./fvs/ +cd ./fvs + +# Get build deps +apt-get build-dep ./ -y + +# Build package +dpkg-buildpackage --no-sign + +# Move the debs to output +cd ../ +mkdir -p ./output +mv ./*.deb ./output/ diff --git a/orig.source.txt b/orig.source.txt new file mode 100644 index 0000000..8e583da --- /dev/null +++ b/orig.source.txt @@ -0,0 +1 @@ +https://github.com/mirkobrombin/FVS diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..98eac6c --- /dev/null +++ b/release.sh @@ -0,0 +1,11 @@ +# Sign the packages +dpkg-sig --sign builder ./output/*.deb + +# Pull down existing ppa repo db files etc +rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo + +# Add the new package to the repo +reprepro -V --basedir ./output/repo/ includedeb lunar ./output/*.deb + +# Push the updated ppa repo to the server +rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/