summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2024-07-06 09:14:11 +0200
committerdd <dd@wx.tnyzeq.icu>2024-07-06 09:14:11 +0200
commit76159802405ba68da2e69e23e41c81c8c685c9bd (patch)
treece602f13ecc9adc08795a6a3c0653fbbd2998d08
parenta88c6df48342a32f4193480d3d69eafbe0d13cc6 (diff)
downloadvyos-jenkins-76159802405ba68da2e69e23e41c81c8c685c9bd.tar.gz
vyos-jenkins-76159802405ba68da2e69e23e41c81c8c685c9bd.zip
added example html page for apt mirror satisfying the 'corresponding source' via 'same place'
-rwxr-xr-xextras/mirror/generate-mirror-html.sh18
-rw-r--r--extras/mirror/resources/template.html108
2 files changed, 126 insertions, 0 deletions
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 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
+
+ <title>NOTvyos package repository</title>
+
+ <style>
+ body {
+ padding: 15px;
+ font-family: sans-serif;
+ }
+
+ h1 {
+ margin: 0;
+ }
+
+ code {
+ display: inline-block;
+ padding: 0 5px;
+ background: #eee;
+ }
+
+ pre code {
+ padding: 5px;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>NOTvyos package repository</h1>
+
+ <p>
+ Welcome to NOTvyos package repository provided by <b>[PROVIDED_BY]</b>.<br />
+ This APT mirror provides unofficially built .deb packages for stable branches of VyOS™.
+ </p>
+
+ <p>
+ NOTvyos packages are not affiliated with the official VyOS™ project in any means.
+ </p>
+
+ <p>
+ Test resulting ISO image <b>carefully</b>.<br />
+ There is <b>no official support</b>.<br />
+ Packages are provided on <b>"AS IS"</b> basis.<br />
+ <b>DO NOT</b> report bugs of NOTvyos to the VyOS™ project.<br />
+ </p>
+
+ <p>
+ The APT gpg singing key for this mirror can be found <a href="[REPOSITORY_URL]/apt.gpg.key">here</a>:
+ </p>
+
+ <pre><code>wget [REPOSITORY_URL]/apt.gpg.key -O /tmp/apt.gpg.key</code></pre>
+
+ <p>
+ You need to mount the APT key for later use when you are starting the vyos-build docker container:
+ </p>
+
+ <pre><code>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</code></pre>
+
+ <p>
+ You can use <code>--vyos-mirror</code> and <code>--custom-apt-key</code> options for the
+ <code>./configure</code> or <code>./build-vyos-image iso</code> commands to use this mirror:
+ </p>
+
+ <p>For <b>equuleus</b>:</p>
+
+ <pre><code>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</code></pre>
+
+ <p>For <b>sagitta</b>:</p>
+
+ <pre><code>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</code></pre>
+
+ <p>
+ For complete and more in depth ISO build instructions you can visit the
+ <a href="https://github.com/dd010101/vyos-jenkins/tree/master?tab=readme-ov-file#how-to-build-iso">dd010101/vyos-jenkins</a>
+ GitHub repository.
+ </p>
+
+ <p>
+ Source code of provided packages can be found in the
+ <a href="https://github.com/vyos">VyOS™ GitHub project</a>. Some packages are built from
+ <a href="https://github.com/dd010101/vyos-build">dd010101/vyos-build</a> fork and also
+ <a href="https://github.com/dd010101/vyos-missing">dd010101/vyos-missing</a> repository.
+ </p>
+ <p>
+ You can refer to the <a href="https://github.com/dd010101/vyos-jenkins/blob/master/extras/packages.md">dd010101/vyos-jenkins/extras/packages.md</a>
+ for the corresponding GIT repository and build script location for each package.
+ </p>
+
+ <p>
+ Build scripts and instructions how to build your own package repository can be found in the
+ <a href="https://github.com/dd010101/vyos-jenkins/tree/master?tab=readme-ov-file">dd010101/vyos-jenkins</a>
+ GitHub repository.
+ </p>
+ </body>
+</html>