Create nym-repo-setup debian package and nym-vpn meta package (#4837)
* Create nym-repo-setup * update * Add postrm * Add README * Add Makefile * Move to subdir * Bundle the list file instead * Create nym-vpn metapackage * Rename top-level dir * Set version of meta package to 0.1 * Add dpkg-name * Create workflow for creating the debs * Restrict to amd64 only * Rename to build-deb-meta.yml * name to upload-artifact * Set names * typo * Extend version and set amd64 only * Bump to 1.0.1
This commit is contained in:
@@ -5,5 +5,35 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: arc-ubuntu-22.04
|
||||
|
||||
steps:
|
||||
run: "echo hello"
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Build Environment
|
||||
run: sudo apt-get update && sudo apt-get install -y make dpkg-dev
|
||||
|
||||
- name: Build Debian Packages
|
||||
working-directory: ppa/packages
|
||||
run: make
|
||||
|
||||
- name: Find .deb files
|
||||
working-directory: ppa/packages
|
||||
run: |
|
||||
echo "file1=$(ls nym-repo-setup*.deb)" >> $GITHUB_ENV
|
||||
echo "file2=$(ls nym-vpn*.deb)" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload nym-repo-setup
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.file1 }}
|
||||
path: ppa/packages/nym-repo-setup*.deb
|
||||
retention-days: 10
|
||||
|
||||
- name: Upload nym-vpn
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.file2 }}
|
||||
path: ppa/packages/nym-vpn*.deb
|
||||
retention-days: 10
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
all: deb
|
||||
|
||||
REPO_DEB=nym-repo-setup.deb
|
||||
REPO_SRC=nym-repo-setup
|
||||
|
||||
META_DEB=nym-vpn.deb
|
||||
META_SRC=nym-vpn
|
||||
|
||||
ALL_DEB=$(REPO_DEB) $(META_DEB)
|
||||
|
||||
deb: $(ALL_DEB)
|
||||
|
||||
$(REPO_DEB):
|
||||
dpkg-deb --build $(REPO_SRC) $(REPO_DEB)
|
||||
dpkg-name -o $(REPO_DEB)
|
||||
|
||||
$(META_DEB):
|
||||
dpkg-deb --build $(META_SRC) $(META_DEB)
|
||||
dpkg-name -o $(META_DEB)
|
||||
|
||||
clean:
|
||||
rm $(ALL_DEB)
|
||||
@@ -0,0 +1,13 @@
|
||||
# Nym deb meta packages
|
||||
|
||||
## Nymtech repo setup
|
||||
|
||||
`nym-repo-setup.deb` is a debian package that sets up the nymtech debian repo by copying the keyring file and adding `nymtech.list` to `/etc/apt/sources.list.d`.
|
||||
|
||||
## Nym VPN meta package
|
||||
|
||||
A basic meta package which only purpose is to depend on the daemon and UI.
|
||||
|
||||
# Build
|
||||
|
||||
They can all be built by running `make`.
|
||||
@@ -0,0 +1,9 @@
|
||||
Package: nym-repo-setup
|
||||
Version: 1.0.1
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: apt (>= 1.0.0)
|
||||
Maintainer: Nym Technologies SA <contact@nymtech.net>
|
||||
Description: Setup script to add the Nym repository
|
||||
This package adds the Nym repository and installs the GPG key for verifying package signatures.
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Updating package list
|
||||
apt-get update
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Path to the repository list file
|
||||
REPO_LIST_FILE="/etc/apt/sources.list.d/nymtech.list"
|
||||
|
||||
# Check if the repository list file already exists
|
||||
if [ -f "$REPO_LIST_FILE" ]; then
|
||||
# Generate a backup file name with a timestamp
|
||||
TIMESTAMP=$(date +%Y%m%d%H%M%S)
|
||||
BACKUP_FILE="/etc/apt/sources.list.d/nymtech.list.${TIMESTAMP}.bak"
|
||||
|
||||
# Rename the existing list file to the backup file
|
||||
echo "Backing up existing nymtech.list to $BACKUP_FILE"
|
||||
mv "$REPO_LIST_FILE" "$BACKUP_FILE"
|
||||
fi
|
||||
|
||||
# Continue with the installation
|
||||
exit 0
|
||||
@@ -0,0 +1,3 @@
|
||||
# This file is provided by the nym-repo-setup package
|
||||
|
||||
deb [arch=amd64 signed-by=/usr/share/keyrings/nymtech.gpg] https://apt.nymtech.net/ jammy main
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
Package: nym-vpn
|
||||
Version: 0.1.0
|
||||
Section: metapackages
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: nym-vpnd, nymvpn-x
|
||||
Maintainer: Nym Technologies SA <contact@nymtech.net>
|
||||
Description: Nym Metapackage
|
||||
This is a metapackage that depends on nym-vpnd and nymvpn-x. Installing this package will also install both nym-vpnd and nymvpn-x.
|
||||
Reference in New Issue
Block a user