Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update master #2696

Merged
merged 20 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
05cea0a
Add Transmissionic Web UI & New Documentation (#2589)
apsoyka Apr 19, 2023
ea70117
Added step to build a .deb file to install and reduce image size (#2590)
pkishino Apr 19, 2023
30d070d
Check for update-port script existing instead of being executable (#2…
gapple Apr 22, 2023
2bd89d7
Fixed TWC paths (#2600)
pkishino Apr 29, 2023
3efaf14
add docker build caching to workflow (#2609)
ksurl May 9, 2023
2169498
Privoxy eth0 fixes, healthcheck comparison tweak and start.sh update …
heavygee May 11, 2023
9123cf0
Strip double quotes from umask check (#2601)
pkishino May 11, 2023
82756d6
Fix problem with enabled UFW with Random Ports (#2603)
WitchRecipe May 11, 2023
32833c4
move vpn config download to /config (#2592)
ksurl May 17, 2023
1644c98
use alpine:latest for TransmissionUIs build stage (#2573)
Entepotenz May 17, 2023
42eb2ee
Update fetch-external-configs.sh
pkishino May 19, 2023
91f6973
Update to transmission 4.0.4
pkishino Aug 28, 2023
3ac3e14
Update configure-openvpn.sh
pkishino Aug 30, 2023
9dd0e41
Switched the order of events, to remove the ipv6 before sed-ing the a…
heavygee Sep 1, 2023
fffb29d
Create separate image for transmission build from source (#2691)
ksurl Sep 2, 2023
5468a99
parallel docker builds with matrix (#2694)
ksurl Sep 2, 2023
fb7d10d
Merge branch 'master' into dev
pkishino Sep 3, 2023
553edc8
Update Dockerfile
pkishino Sep 4, 2023
75147a2
`TRANSMISSION_RPC_URL` option causes a moved permanently error when u…
Aemulation Sep 4, 2023
17bc7e1
Fix for PR #2691 (#2698)
ksurl Sep 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/check-transmission-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Transmission Version Check

on:
schedule:
- cron: 0 * * * *
workflow_dispatch: {}

jobs:
get-transmission-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: dev

- name: Check for new version of Transmission
run: |
LATEST_VERSION=$(curl -L https://api.github.com/repos/transmission/transmission/releases/latest | grep tag_name | sed -e 's/:\|,\|"//g' | awk '{print $2}')
CURRENT_VERSION=$(cat upstream/transmission-version.txt)
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
echo "$LATEST_VERSION" > upstream/transmission-version.txt
git add upstream/transmission-version.txt
git commit -m "update transmission build version to ${LATEST_VERSION}"
git push origin dev
fi
78 changes: 60 additions & 18 deletions .github/workflows/docker-image-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,65 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build-main-images:
uses: ./.github/workflows/image-build-template-workflow.yml
with:
image-name: haugene/transmission-openvpn
build-context: '.'
secrets: inherit
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image-name: haugene/transmission-openvpn
context: ./
- image-name: haugene/transmission-openvpn-proxy
context: ./proxy
- image-name: haugene/transmission-rss
context: ./plugins/rss
platform:
- linux/amd64
- linux/arm
- linux/arm64
steps:
- name: Checkout code
uses: actions/checkout@v3

build-proxy-images:
uses: ./.github/workflows/image-build-template-workflow.yml
with:
image-name: haugene/transmission-openvpn-proxy
build-context: 'proxy'
secrets: inherit
# QEMU emulator to build for other platforms
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

build-rss-plugin-images:
uses: ./.github/workflows/image-build-template-workflow.yml
with:
image-name: haugene/transmission-rss
build-context: 'plugins/rss'
secrets: inherit
# Buildx automates creating the multi-arch manifest build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# Authenticate so that we can push to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Generate image tags and labels
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ matrix.image-name }}
tags: |
type=edge
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

# Finally, build and push the images
- name: Build image
uses: docker/build-push-action@v4
with:
context: ${{ matrix.context }}
platforms: ${{ matrix.platform }}
build-args: |
REVISION=${{ github.sha }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow}}
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
name: Reusable workflow for building multi-arch images
name: Transmission Builds

on:
workflow_call:
inputs:
image-name:
required: true
type: string

build-context:
required: true
type: string
push:
branches:
- dev
paths:
- upstream/transmission-version.txt

jobs:
setup-build-push:
build-transmission:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm
- linux/arm64
steps:
- name: Checkout code
uses: actions/checkout@v3

# Get latest version of Transmission
- name: Get Transmission version
run: |
LATEST_VERSION=$(cat upstream/transmission-version.txt)
echo "TBT_VERSION=$LATEST_VERSION" >> $GITHUB_ENV

# QEMU emulator to build for other platforms
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -33,29 +42,24 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Generate image tags and labels
# Generate image tag and labels
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ inputs.image-name }}
tags: |
type=edge
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

# Finally, build and push the images
images: haugene/transmission-builder
tags: type=match,pattern=(\d+.\d+.\d+),group=1,value=${{ env.TBT_VERSION }}

# Finally, build and push the image
- name: Build image
uses: docker/build-push-action@v4
with:
context: ${{ inputs.build-context }}
platforms: linux/arm,linux/arm64,linux/amd64
context: upstream
platforms: ${{ matrix.platform }}
build-args: |
REVISION=${{ github.sha }}
push: ${{ github.event_name != 'pull_request' }}
TBT_VERSION=${{ env.TBT_VERSION }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha, scope=${{ github.workflow }}
Expand Down
18 changes: 1 addition & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,7 @@ RUN set -ex; \
libpsl-dev \
libssl-dev


FROM base as TransmissionBuilder

ARG DEBIAN_FRONTEND=noninteractive
ARG TBT_VERSION=4.0.4

RUN apt-get update && apt-get install -y curl \
build-essential automake autoconf libtool pkg-config intltool libcurl4-openssl-dev \
libglib2.0-dev libevent-dev libminiupnpc-dev libgtk-3-dev libappindicator3-dev libssl-dev cmake xz-utils checkinstall


RUN mkdir -p /home/transmission4/ && cd /home/transmission4/ \
&& curl -L -o transmission4.tar.xz "https://github.com/transmission/transmission/releases/download/4.0.4/transmission-4.0.4.tar.xz" \
&& tar -xf transmission4.tar.xz && cd transmission-4.0.4* && mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make && make install \
&& checkinstall -y -D --pkgname transmission --pakdir /var/tmp --pkgversion=${TBT_VERSION}

FROM haugene/transmission-builder:4.0.4 as TransmissionBuilder

FROM base

Expand Down
14 changes: 10 additions & 4 deletions openvpn/pia/update-port.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ transmission_passwd=$(tail -1 ${TRANSMISSION_PASSWD_FILE})
pia_client_id_file=/etc/transmission/pia_client_id
transmission_settings_file=${TRANSMISSION_HOME}/settings.json

if [[ -z "${TRANSMISSION_RPC_URL}" ]]; then
# Fetch the default setting for `rpc-url`.
TRANSMISSION_RPC_URL="$(jq -r '."rpc-url"' /etc/transmission/default-settings.json)"
fi
TRANSMISSION_HOST="$(echo "http://localhost:${TRANSMISSION_RPC_PORT}${TRANSMISSION_RPC_URL}" | sed -E 's/(\/)$//g')"

sleep 5

###### PIA Variables ######
Expand Down Expand Up @@ -96,13 +102,13 @@ fi

# make sure transmission is running and accepting requests
echo "waiting for transmission to become responsive"
until torrent_list="$(transmission-remote $TRANSMISSION_RPC_PORT $myauth -l)"; do sleep 10; done
until torrent_list="$(transmission-remote "${TRANSMISSION_HOST}" $myauth -l)"; do sleep 10; done
echo "transmission became responsive"
output="$(echo "$torrent_list" | tail -n 2)"
echo "$output"

# get current listening port
transmission_peer_port=$(transmission-remote $TRANSMISSION_RPC_PORT $myauth -si | grep Listenport | grep -oE '[0-9]+')
transmission_peer_port=$(transmission-remote "${TRANSMISSION_HOST}" $myauth -si | grep Listenport | grep -oE '[0-9]+')
if [[ "$new_port" != "$transmission_peer_port" ]]; then
if [[ "true" = "$ENABLE_UFW" ]]; then
echo "Update UFW rules before changing port in Transmission"
Expand All @@ -115,11 +121,11 @@ if [[ "$new_port" != "$transmission_peer_port" ]]; then
fi

echo "setting transmission port to $new_port"
transmission-remote ${TRANSMISSION_RPC_PORT} ${myauth} -p "$new_port"
transmission-remote "${TRANSMISSION_HOST}" ${myauth} -p "$new_port"

echo "Checking port..."
sleep 10
transmission-remote ${TRANSMISSION_RPC_PORT} ${myauth} -pt
transmission-remote "${TRANSMISSION_HOST}" ${myauth} -pt
else
echo "No action needed, port hasn't changed"
fi
Expand Down
5 changes: 3 additions & 2 deletions privoxy/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ set_port()

echo "Privoxy: Setting port to $1";

# Remove the listen-address for IPv6 for now. IPv6 compatibility should come later
sed -i -E "s/^listen-address\s+\[\:\:1.*//" "$2"

# Set the port for the IPv4 interface
adr=$(ip -4 a show eth0| grep -oP "(?<=inet )([^/]+)")
adr=${adr:-"0.0.0.0"}
sed -i -E "s/^listen-address\s+.*/listen-address ${adr}:$1/" "$2"

# Remove the listen-address for IPv6 for now. IPv6 compatibility should come later
sed -i -E "s/^listen-address\s+\[\:\:1.*//" "$2"
}

if [[ "${WEBPROXY_ENABLED}" = "true" ]]; then
Expand Down
41 changes: 41 additions & 0 deletions upstream/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
ARG TBT_VERSION=4.0.4

RUN set -ex; \
apt-get update; \
apt-get dist-upgrade -y; \
apt-get install -y --no-install-recommends \
automake \
autoconf \
build-essential \
ca-certificates \
checkinstall \
cmake \
curl \
intltool \
iproute2 \
libappindicator3-dev \
libcurl4-openssl-dev \
libdeflate-dev \
libevent-dev \
libfmt-dev \
libglib2.0-dev \
libgtk-3-dev \
libminiupnpc-dev \
libnatpmp-dev \
libpsl-dev \
libssl-dev \
libtool \
nano \
net-tools \
pkg-config \
tzdata \
xz-utils

RUN mkdir -p /home/transmission4/ && cd /home/transmission4/ \
&& curl -L -o transmission4.tar.xz "https://github.com/transmission/transmission/releases/download/${TBT_VERSION}/transmission-${TBT_VERSION}.tar.xz" \
&& tar -xf transmission4.tar.xz && cd "transmission-${TBT_VERSION}" && mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make && make install \
&& checkinstall -y -D --pkgname transmission --pakdir /var/tmp --pkgversion=${TBT_VERSION}
1 change: 1 addition & 0 deletions upstream/transmission-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0.4