summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cornwall2021-03-02 23:06:17 -0800
committerBrett Cornwall2021-03-02 23:06:17 -0800
commitd3ba03c12466ec6947e38532cb1408cb0907ef72 (patch)
tree64cb292496d529ef939fb8da5bbfe7719973191f
parentba8f1c9289f5d81b00139ee55f44849e2b66cfb6 (diff)
downloadaur-d3ba03c12466ec6947e38532cb1408cb0907ef72.tar.gz
Revert back to pre-docker building
This reverts the following: - ba8f1c9289f5d81b00139ee55f44849e2b66cfb6 - 59aebefd23192677bfa7af116d58174e2bbabeb7 - fb7ee02303ce81c2c90f1117818775b2d987611c - 1044560efe55f965b7a8ab8fbb18f90a37013f61 - 474068bfd7df4751399597731f715ca2a9566288
-rw-r--r--.SRCINFO8
-rw-r--r--Dockerfile.patch15
-rw-r--r--PKGBUILD67
3 files changed, 35 insertions, 55 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b4c8b154e525..9da0b8e0efc5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,25 +1,21 @@
pkgbase = psiphon-tunnel-core-git
pkgdesc = Psiphon Tunnelling Proxy
- pkgver = 2.0.14.r3354.08f530bd
- pkgrel = 3
+ pkgver = 2.0.10.r3020.a9bed696
+ pkgrel = 1
url = https://github.com/Psiphon-Labs/psiphon-tunnel-core
arch = x86_64
license = GPL
makedepends = go-pie
makedepends = perl
- makedepends = docker
- makedepends = git
depends = glibc
backup = etc/psiphon.conf
backup = usr/lib/systemd/user/psiphon.service
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
deleted file mode 100644
index 11a601992c1c..000000000000
--- a/Dockerfile.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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 a7f221d1ac9a..d790e9544e7e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,23 +19,21 @@
_pkgname=psiphon-tunnel-core
pkgname="$_pkgname-git"
-pkgver=2.0.14.r3354.08f530bd
-pkgrel=3
+pkgver=2.0.10.r3020.a9bed696
+pkgrel=1
pkgdesc='Psiphon Tunnelling Proxy'
arch=('x86_64')
url="https://github.com/Psiphon-Labs/psiphon-tunnel-core"
license=('GPL')
-makedepends=('go-pie' 'perl' 'docker' 'git')
+makedepends=('go-pie' 'perl')
depends=('glibc')
source=("git+$url.git"
"psiphon.conf"
- "psiphon.service"
- "Dockerfile.patch")
+ "psiphon.service")
backup=('etc/psiphon.conf' 'usr/lib/systemd/user/psiphon.service')
md5sums=('SKIP'
'c1ec9a446e89495501b8375d2682aa49'
- 'a6d6b01633a39325abbdb3597c50a4cc'
- '2a2474d64b2c4de819976b5f6bfa5c0f')
+ 'a6d6b01633a39325abbdb3597c50a4cc')
pkgver() {
cd $_pkgname
@@ -45,39 +43,40 @@ pkgver() {
printf "%s.r%s.%s" "$TAG" "$REVISION" "$COMMIT"
}
-prepare(){
- if ! groups ${USER} | grep &>/dev/null '\bdocker\b'; then
- >&2 echo "The user ${USER} does not belong to the docker group. Please add it."
- exit 1
- fi
-
- if ! systemctl is-active docker | grep &>/dev/null '\bactive\b'; then
- >&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 \
- --build-arg USER_ID=$(id -u) \
- --build-arg GROUP_ID=$(id -g) \
- --build-arg USERNAME=$USER .
- docker images
- cd .. && \
- docker run \
- --rm \
- -v $PWD:/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core \
- psiclient \
- /bin/bash -c './make.bash linux 64' \
- ; cd -
+ # This errors but seems to fix building
+ go get || true
+
+ # Copied from the README file
+ BUILDDATE=$(date --iso-8601=seconds)
+ BUILDREPO=$(git config --get remote.origin.url)
+ BUILDREV=$(git rev-parse --short HEAD)
+ GOVERSION=$(go version | perl -ne '/go version (.*?) / && print $1')
+ DEPENDENCIES=$(echo -n "{" && go list -f '{{range $dep := .Deps}}{{printf "%s\n" $dep}}{{end}}' | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' | xargs -I pkg bash -c 'cd $GOPATH/src/pkg && echo -n "\"pkg\":\"$(git rev-parse --short HEAD)\","' | sed 's/,$/}/')
+
+ LDFLAGS="\
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.buildDate=$BUILDDATE \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.buildRepo=$BUILDREPO \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.buildRev=$BUILDREV \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.goVersion=$GOVERSION \
+-X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.dependencies=$DEPENDENCIES \
+-s -w
+"
+
+ # TODO: Figure out how to do the stripping?
+ # https://wiki.archlinux.org/index.php/Go_package_guidelines#Flags_and_build_options
+
+ go build \
+ -trimpath \
+ -ldflags "$LDFLAGS" \
+ -o $_pkgname .
}
package() {
- cd "$_pkgname/ConsoleClient/bin/linux/"
- install -Dm755 ${_pkgname}-x86_64 "$pkgdir"/usr/bin/$_pkgname
+ cd "$_pkgname/ConsoleClient"
+ install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname
install -Dm644 "$srcdir/psiphon.conf" "$pkgdir/etc/psiphon.conf"
install -Dm644 "$srcdir/psiphon.service" "$pkgdir/usr/lib/systemd/user/psiphon.service"
}