summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgilcu32021-02-28 20:09:46 +0100
committergilcu32021-02-28 20:09:46 +0100
commitba8f1c9289f5d81b00139ee55f44849e2b66cfb6 (patch)
tree0c867b60351d2a8302c6dc8fa23499eb5a21dd7a
parent59aebefd23192677bfa7af116d58174e2bbabeb7 (diff)
downloadaur-ba8f1c9289f5d81b00139ee55f44849e2b66cfb6.tar.gz
last permission fix; using docker properly now
-rw-r--r--.SRCINFO4
-rw-r--r--Dockerfile.patch15
-rw-r--r--PKGBUILD18
3 files changed, 30 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bbdfd015ab6a..b4c8b154e525 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = psiphon-tunnel-core-git
pkgdesc = Psiphon Tunnelling Proxy
pkgver = 2.0.14.r3354.08f530bd
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/Psiphon-Labs/psiphon-tunnel-core
arch = x86_64
license = GPL
@@ -15,9 +15,11 @@ pkgbase = psiphon-tunnel-core-git
source = git+https://github.com/Psiphon-Labs/psiphon-tunnel-core.git
source = psiphon.conf
source = psiphon.service
+ source = Dockerfile.patch
md5sums = SKIP
md5sums = c1ec9a446e89495501b8375d2682aa49
md5sums = a6d6b01633a39325abbdb3597c50a4cc
+ md5sums = 2a2474d64b2c4de819976b5f6bfa5c0f
pkgname = psiphon-tunnel-core-git
diff --git a/Dockerfile.patch b/Dockerfile.patch
new file mode 100644
index 000000000000..11a601992c1c
--- /dev/null
+++ b/Dockerfile.patch
@@ -0,0 +1,15 @@
+--- src/psiphon-tunnel-core/ConsoleClient/Dockerfile 2021-02-28 19:40:10.668878099 +0100
++++ Dockerfile 2021-02-28 19:41:34.661148599 +0100
+@@ -33,3 +33,12 @@
+ RUN go get github.com/pwaller/goupx
+
+ WORKDIR $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/ConsoleClient
++
++
++ARG USER_ID
++ARG GROUP_ID
++ARG USERNAME
++
++RUN addgroup --gid $GROUP_ID $USERNAME
++RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID $USERNAME
++USER $USERNAME
diff --git a/PKGBUILD b/PKGBUILD
index 5dc34131d426..a7f221d1ac9a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,20 +20,22 @@
_pkgname=psiphon-tunnel-core
pkgname="$_pkgname-git"
pkgver=2.0.14.r3354.08f530bd
-pkgrel=2
+pkgrel=3
pkgdesc='Psiphon Tunnelling Proxy'
arch=('x86_64')
url="https://github.com/Psiphon-Labs/psiphon-tunnel-core"
license=('GPL')
-makedepends=('go-pie' 'perl' 'docker' 'git' 'fakeroot')
+makedepends=('go-pie' 'perl' 'docker' 'git')
depends=('glibc')
source=("git+$url.git"
"psiphon.conf"
- "psiphon.service")
+ "psiphon.service"
+ "Dockerfile.patch")
backup=('etc/psiphon.conf' 'usr/lib/systemd/user/psiphon.service')
md5sums=('SKIP'
'c1ec9a446e89495501b8375d2682aa49'
- 'a6d6b01633a39325abbdb3597c50a4cc')
+ 'a6d6b01633a39325abbdb3597c50a4cc'
+ '2a2474d64b2c4de819976b5f6bfa5c0f')
pkgver() {
cd $_pkgname
@@ -53,15 +55,19 @@ prepare(){
>&2 echo "Docker service is not started. Please start it."
exit 1
fi
+ patch --forward --strip=1 --input="Dockerfile.patch"
}
build() {
cd "$_pkgname/ConsoleClient"
- docker build --no-cache=true -t psiclient .
+ docker build --no-cache=true -t psiclient \
+ --build-arg USER_ID=$(id -u) \
+ --build-arg GROUP_ID=$(id -g) \
+ --build-arg USERNAME=$USER .
docker images
cd .. && \
- fakeroot docker run \
+ docker run \
--rm \
-v $PWD:/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core \
psiclient \