From 76159802405ba68da2e69e23e41c81c8c685c9bd Mon Sep 17 00:00:00 2001 From: dd Date: Sat, 6 Jul 2024 09:14:11 +0200 Subject: added example html page for apt mirror satisfying the 'corresponding source' via 'same place' --- extras/mirror/generate-mirror-html.sh | 18 ++++++ extras/mirror/resources/template.html | 108 ++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100755 extras/mirror/generate-mirror-html.sh create mode 100644 extras/mirror/resources/template.html diff --git a/extras/mirror/generate-mirror-html.sh b/extras/mirror/generate-mirror-html.sh new file mode 100755 index 0000000..db5e265 --- /dev/null +++ b/extras/mirror/generate-mirror-html.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -e + +providedBy="$1" +repositoryUrl="$2" +outputPath="$3" + +if [ "$providedBy" == "" ] || [ "$repositoryUrl" == "" ] || [ "$outputPath" == "" ]; then + echo "Usage: ./generate-mirror-html.sh [PROVIDED_BY] [REPOSITORY_URL] [OUTPUT_PATH]" + echo -e "\t[PROVIDED_BY] shall be your or mirror name" + echo -e "\t[REPOSITORY_URL] shall be URL prefix, like http://1.2.3.4 if your repository is in / or http://1.2.3.4/apt if your repository is in /apt" + echo -e "\t[OUTPUT_PATH] shall be output path, like /tmp/index.html" + exit 0 +fi + +cp ./resources/template.html "$outputPath" +sed -i "s/\[PROVIDED_BY\]/${providedBy//\//\\/}/" "$outputPath" +sed -i "s/\[REPOSITORY_URL\]/${repositoryUrl//\//\\/}/" "$outputPath" diff --git a/extras/mirror/resources/template.html b/extras/mirror/resources/template.html new file mode 100644 index 0000000..7072a72 --- /dev/null +++ b/extras/mirror/resources/template.html @@ -0,0 +1,108 @@ + + + + + + + + NOTvyos package repository + + + + +

NOTvyos package repository

+ +

+ Welcome to NOTvyos package repository provided by [PROVIDED_BY].
+ This APT mirror provides unofficially built .deb packages for stable branches of VyOS™. +

+ +

+ NOTvyos packages are not affiliated with the official VyOS™ project in any means. +

+ +

+ Test resulting ISO image carefully.
+ There is no official support.
+ Packages are provided on "AS IS" basis.
+ DO NOT report bugs of NOTvyos to the VyOS™ project.
+

+ +

+ The APT gpg singing key for this mirror can be found here: +

+ +
wget [REPOSITORY_URL]/apt.gpg.key -O /tmp/apt.gpg.key
+ +

+ You need to mount the APT key for later use when you are starting the vyos-build docker container: +

+ +
docker run --rm -it \
+    -v "$(pwd)":/vyos \
+    -v "/tmp/apt.gpg.key:/opt/apt.gpg.key" \
+    -w /vyos --privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 \
+    -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) \
+    "vyos/vyos-build:$BRANCH" bash
+ +

+ You can use --vyos-mirror and --custom-apt-key options for the + ./configure or ./build-vyos-image iso commands to use this mirror: +

+ +

For equuleus:

+ +
sudo ./configure --architecture amd64 --build-by "myself@localhost" \
+   --build-type release --version "1.3.x" \
+   --vyos-mirror [REPOSITORY_URL]/equuleus --custom-apt-key /opt/apt.gpg.key
+   && sudo make iso
+ +

For sagitta:

+ +
sudo ./build-vyos-image iso --architecture amd64 --build-by "myself@localhost" \
+   --build-type release --version "1.4.x" \
+   --vyos-mirror [REPOSITORY_URL]/sagitta --custom-apt-key /opt/apt.gpg.key
+ +

+ For complete and more in depth ISO build instructions you can visit the + dd010101/vyos-jenkins + GitHub repository. +

+ +

+ Source code of provided packages can be found in the + VyOS™ GitHub project. Some packages are built from + dd010101/vyos-build fork and also + dd010101/vyos-missing repository. +

+

+ You can refer to the dd010101/vyos-jenkins/extras/packages.md + for the corresponding GIT repository and build script location for each package. +

+ +

+ Build scripts and instructions how to build your own package repository can be found in the + dd010101/vyos-jenkins + GitHub repository. +

+ + -- cgit v1.2.3