diff --git a/.drone.yml b/.drone.yml index 3a1915c..abfe299 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,7 @@ trigger: steps: - name: Build openvpn xor amd64 - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:555262114ea81f6f286010474527f419b56d33a3 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:9fabf0ce6eab3a9a9da15b2791e8282afc05ee0b privileged: true environment: GITEA_TOKEN: @@ -22,15 +22,18 @@ steps: CONTAINERFILE: ./containerfiles/Containerfile-XOR CUSTOM_TAG: v2.6.9-XOR-4.0.0beta15 commands: + - source ./env/openvpn_xor.env + - export CUSTOM_TAG="v${OPENVPN_VERSION}-XOR-${TUNNELBLICK_VERSION}" - build-container - name: Build openvpn amd64 - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:555262114ea81f6f286010474527f419b56d33a3 + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:9fabf0ce6eab3a9a9da15b2791e8282afc05ee0b privileged: true environment: GITEA_TOKEN: from_secret: GITEA_TOKEN CONTAINERFILE: ./containerfiles/Containerfile - CUSTOM_TAG: v2.6.9 commands: + - source ./env/openvpn.env + - export CUSTOM_TAG="v${OPENVPN_VERSION}" - build-container diff --git a/alpine/google-authenticator/APKBUILD b/alpine/google-authenticator/APKBUILD deleted file mode 100644 index 712a57d..0000000 --- a/alpine/google-authenticator/APKBUILD +++ /dev/null @@ -1,52 +0,0 @@ -# Contributor: Fabio Napoleoni -# Maintainer: -pkgname=google-authenticator -pkgver=20160207 -pkgrel=1 -pkgdesc="Google Authenticator PAM module" -url="https://github.com/google/google-authenticator" -arch="all" -license="ASL 2.0" -depends= -depends_dev= -makedepends="$depends_dev autoconf automake libtool linux-pam-dev m4 openssl-dev" -install= -subpackages="$pkgname-doc" -source="https://github.com/google/google-authenticator/archive/c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425.zip" - -_builddir="$srcdir"/$pkgname-c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425/libpam - -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - -build() { - cd "$_builddir" - ./bootstrap.sh || return 1 - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --libdir=/lib \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - || return 1 - - make || return 1 -} - -package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 -} - -md5sums="33d3cbd0488bcb4f50b34b5670deffae c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425.zip" -sha256sums="e32abe693e54195bdb6aca52783e6e1c239e67296876ac59211a59e4608338b8 c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425.zip" -sha512sums="b44a626e6cc5d8e27685f5d39b5d33f49fc7070331db7b458d3ee40723972821bb8ed5458f27a287dc664d162acf1f8f9a36ca3b1bf767f2bbf27d4f538e9872 c0404dcdbda9ab9e4f0b8451ecdd44eee8db2425.zip" diff --git a/containerfiles/Containerfile b/containerfiles/Containerfile index 29e9632..e52d156 100644 --- a/containerfiles/Containerfile +++ b/containerfiles/Containerfile @@ -1,5 +1,5 @@ FROM ghcr.io/allanger/dumb-downloader as dudo -ENV OPENVPN_VERSION=2.6.9 +ARG OPENVPN_VERSION RUN apt update && apt install gnupg tar -y RUN mkdir /output # ------------------------------------------------------ @@ -7,20 +7,20 @@ RUN mkdir /output # ------------------------------------------------------ RUN dudo -l "https://keys.openpgp.org/vks/v1/by-fingerprint/F554A3687412CFFEBDEFE0A312F5F7B42F2B01E7" -d security-openvpn-net.asc -p DUMMY RUN gpg --import security-openvpn-net.asc -RUN dudo -l "https://swupdate.openvpn.org/community/releases/openvpn-{{ version }}.tar.gz.asc" -d /tmp/openvpn.asc -p $OPENVPN_VERSION +RUN dudo -l "https://swupdate.openvpn.org/community/releases/openvpn-{{ version }}.tar.gz.asc" -d /tmp/openvpn.asc -p ${OPENVPN_VERSION} # ------------------------------------------------------ -# -- I should fix it later +# -- todo: I should fix it later # ------------------------------------------------------ # RUN gpg --no-tty --verify /tmp/openvpn.asc -RUN dudo -l "https://swupdate.openvpn.org/community/releases/openvpn-{{ version }}.tar.gz " -d /tmp/openvpn.tar.gz -p $OPENVPN_VERSION +RUN dudo -l "https://swupdate.openvpn.org/community/releases/openvpn-{{ version }}.tar.gz " -d /tmp/openvpn.tar.gz -p ${OPENVPN_VERSION} RUN tar -xf /tmp/openvpn.tar.gz -C /tmp && rm -f /tmp/openvpn.tar.gz -RUN mv /tmp/openvpn-$OPENVPN_VERSION /output/openvpn +RUN mv /tmp/openvpn-${OPENVPN_VERSION} /output/openvpn FROM ubuntu as builder # ------------------------------------------------------ # -- TODO: Define it only once # ------------------------------------------------------ -ENV OPENVPN_VERSION=2.6.9 +ARG OPENVPN_VERSION COPY --from=dudo /output /src RUN apt-get update &&\ apt-get install -y wget tar unzip build-essential \ diff --git a/containerfiles/Containerfile-XOR b/containerfiles/Containerfile-XOR index b3ee6a1..9f7a3f8 100644 --- a/containerfiles/Containerfile-XOR +++ b/containerfiles/Containerfile-XOR @@ -1,6 +1,6 @@ FROM ghcr.io/allanger/dumb-downloader as dudo -ENV OPENVPN_VERSION=2.6.9 -ENV TUNNELBLICK_VERSION=4.0.0beta15 +ARG OPENVPN_VERSION +ARG TUNNELBLICK_VERSION RUN apt update && apt install gnupg tar -y RUN mkdir /output # ------------------------------------------------------ @@ -27,8 +27,8 @@ FROM ubuntu as builder # ------------------------------------------------------ # -- TODO: Define it only once # ------------------------------------------------------ -ENV OPENVPN_VERSION=2.6.9 -ENV TUNNELBLICK_VERSION=v4.0.0beta15 +ARG OPENVPN_VERSION +ARG TUNNELBLICK_VERSION COPY --from=dudo /output /src RUN apt-get update &&\ apt-get install -y wget tar unzip build-essential \ diff --git a/env/openvpn.env b/env/openvpn.env new file mode 100644 index 0000000..e32b9f0 --- /dev/null +++ b/env/openvpn.env @@ -0,0 +1 @@ +export OPENVPN_VERSION=2.6.9 diff --git a/env/openvpn_xor.env b/env/openvpn_xor.env new file mode 100644 index 0000000..850b01f --- /dev/null +++ b/env/openvpn_xor.env @@ -0,0 +1,2 @@ +export OPENVPN_VERSION=2.6.9 +export TUNNEBLICK_VERSION=4.0.0beta15 diff --git a/otp/openvpn b/otp/openvpn deleted file mode 100644 index 5c5c441..0000000 --- a/otp/openvpn +++ /dev/null @@ -1,7 +0,0 @@ -# Uses google authenticator library as PAM module using a single folder for all users tokens -# User root is required to stick with an hardcoded user when trying to determine user id and allow unexisting system users -# See https://github.com/google/google-authenticator-libpam#usersome-user -auth required pam_google_authenticator.so secret=/etc/openvpn/otp/${USER}.google_authenticator user=root - -# Accept any user since we're dealing with virtual users there's no need to have a system account (pam_unix.so) -account sufficient pam_permit.so