diff options
author | Daniel Bermond | 2021-03-17 17:18:42 +0000 |
---|---|---|
committer | Daniel Bermond | 2021-03-17 17:23:16 +0000 |
commit | ba9eba25c6fd5a4e4bc06a096f1b0930b2e4ac5a (patch) | |
tree | 832c4a492a555e7ba7328f71d4ce4d7a88556201 | |
parent | cbdf9205726b29b63f28e8b8d89342789859e555 (diff) | |
download | aur-ba9eba25c6fd5a4e4bc06a096f1b0930b2e4ac5a.tar.gz |
Fix build
Upstream has made a lot of internal changes that also reflected
on the way how the stable version is built.
Note: this version changes the default WebUI port from 1488
to 1776.
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | 010-xd-torrent-fix-webui-target.patch | 55 | ||||
-rw-r--r-- | 020-xd-torrent-use-arch-ldflags.patch | 31 | ||||
-rw-r--r-- | 060-xd-torrent-use-arch-ldflags.patch | 31 | ||||
-rw-r--r-- | 070-xd-torrent-rename-service-paths.patch (renamed from 030-xd-torrent-rename-service-paths.patch) | 0 | ||||
-rw-r--r-- | 080-xd-torrent-service-hardening.patch (renamed from 040-xd-torrent-service-hardening.patch) | 0 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | xd.conf | 2 |
8 files changed, 84 insertions, 118 deletions
@@ -1,29 +1,38 @@ pkgbase = xd-torrent pkgdesc = An I2P BitTorrent client pkgver = 0.3.4 - pkgrel = 3 + pkgrel = 4 url = https://xd-torrent.github.io/ arch = x86_64 license = MIT + makedepends = git makedepends = go depends = glibc backup = etc/xd.conf - source = https://github.com/majestrate/XD/archive/v0.3.4/xd-torrent-0.3.4.tar.gz - source = 010-xd-torrent-fix-webui-target.patch - source = 020-xd-torrent-use-arch-ldflags.patch - source = 030-xd-torrent-rename-service-paths.patch - source = 040-xd-torrent-service-hardening.patch + source = git+https://github.com/majestrate/XD.git#tag=v0.3.4 + source = 010-xd-torrent-fix-build-part1.patch::https://github.com/majestrate/XD/commit/5c864223210f2848150485a6b40d837e8778575f.patch + source = 020-xd-torrent-fix-build-part2.patch::https://github.com/majestrate/XD/commit/e1f4ce28363f4dd3f3902d79aacfbd273d7c8bfd.patch + source = 030-xd-torrent-fix-build-part3.patch::https://github.com/majestrate/XD/commit/9152c3fef309558eb041a90a860be45e9186c9b4.patch + source = 040-xd-torrent-fix-webui-target.patch::https://github.com/majestrate/XD/commit/6b4204e162cef15afcf3e53634c132c78a50f3e5.patch + source = 050-xd-torrent-fix-tests.patch::https://github.com/majestrate/XD/commit/151d5b6a13f948b4b3f8728dbb15eecc9e7fc53f.patch + source = 060-xd-torrent-use-arch-ldflags.patch + source = 070-xd-torrent-rename-service-paths.patch + source = 080-xd-torrent-service-hardening.patch source = xd-torrent.sysusers source = xd-torrent.tmpfiles source = xd.conf - sha256sums = 90a3df7a52ec30effe4a287728c1fd2d93a3a08b59cd2c6a971513d487d9d48a - sha256sums = 53c9b91bceabfbb33c42d5dee73b50c79c81e5d2ef219b8c4e7d8f40f1bd9b3f - sha256sums = 3698cf45ae01e8e1dacea1b47cf255bc807138928cad5c3789e53268dac6fa2d + sha256sums = SKIP + sha256sums = b273a994d08db9a471bd778b216fc8f921bf8fdfdae451c2a5d86b4c004f7cb1 + sha256sums = d20098827a6a774c79a4c9259585b8b5fa01cae5730d2afa0ce995ebcb1b5cba + sha256sums = 6933d6f619d0c4411dad3ee00297d751675607e3f9cc7f74b6a2388bfbfaad9f + sha256sums = b404e26612c41809d88adb7654d4ebb142dbf7997a4e1e4a4900245e44da2c91 + sha256sums = 1cbd2b4bba8df173a68a45dddbf8db8166b2c5a68b10562a947d59f624fa7a66 + sha256sums = 501872a2ceca5de0999448e5373920fb9d0c016274107f9279df67a9c7ec16b5 sha256sums = 6b3d959b55623c3f907be0e1c53c7092e9328cb0b10c336102d012d716438a14 sha256sums = 77f50344dc028eac9ee229faf2fcda4807b5fbe4872a23513c271dd0e4964e53 sha256sums = 5f2fb392c2fec68bb3861ece85b5bbdd4929c4ccccf3caeb835060213c309761 sha256sums = f05777857bab4d18ad23582a746959cd13e07345fa74bbb3f1263a38398ac491 - sha256sums = 2817f5eb6e204dd8e37fb4963a9b60d958ae063c6f082c41f92760802ea99530 + sha256sums = 27b6900da96e5280ff8a172b094531e08cb06a653cc97ec15eb6061d3779924b pkgname = xd-torrent diff --git a/010-xd-torrent-fix-webui-target.patch b/010-xd-torrent-fix-webui-target.patch deleted file mode 100644 index 9286966db7fc..000000000000 --- a/010-xd-torrent-fix-webui-target.patch +++ /dev/null @@ -1,55 +0,0 @@ -commit cd32d6553e27c4b23e2dfba98e14d88fbd1c9ca1 -Author: Daniel Bermond <danielbermond@gmail.com> -Date: Fri Sep 27 17:19:54 2019 +0000 - - Makefile: fix webui target - - The webui target is not a file. This causes the webui - target and all targets that depends on it to be always - rebuilded, which is not desirable. - - Most notably, this causes a second compilation at - 'make install' when using the traditional approach - to build software with 'make && make install', which - should not occur. - - This commit fixes this situation and now 'make install' - only install files if they were already built. - - Signed-off-by: Daniel Bermond <danielbermond@gmail.com> - -diff --git a/Makefile b/Makefile -index 1329108..fdb90f9 100644 ---- a/Makefile -+++ b/Makefile -@@ -9,6 +9,8 @@ WEB_FILES = $(DOCROOT)/index.html - WEB_FILES += $(DOCROOT)/xd.min.js - WEB_FILES += $(DOCROOT)/xd.css - WEB_FILES += $(WEBUI_LOGO) -+WEBUI_CORE = $(DOCROOT)/xd.min.js -+WEBUI_CORE += $(DOCROOT)/xd.css - WEBUI_PREFIX = /contrib/webui/docroot - ASSETS = $(REPO)/src/xd/lib/rpc/assets/assets.go - -@@ -51,7 +53,7 @@ assets: $(ASSETS) - $(GO_ASSETS): - GOPATH=$(REPO) $(GO) build -o $(GO_ASSETS) -v github.com/jessevdk/go-assets-builder - --$(ASSETS): $(GO_ASSETS) webui -+$(ASSETS): $(GO_ASSETS) $(WEBUI_CORE) - $(GO_ASSETS) -p assets -s $(WEBUI_PREFIX) -o $(ASSETS) $(WEB_FILES) - - $(XD): $(ASSETS) -@@ -86,8 +88,10 @@ go-clean: - $(WEBUI_LOGO): - $(CP) $(LOGOS)/xd_logo.png $(WEBUI_LOGO) - --webui: $(WEBUI_LOGO) -- $(MAKE) -C $(WEBUI) -+$(WEBUI_CORE): $(WEBUI_LOGO) -+ $(MAKE) -C $(WEBUI) -+ -+webui: $(WEBUI_CORE) - - no-webui: - GOPATH=$(REPO) $(GO) build -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -o $(XD) diff --git a/020-xd-torrent-use-arch-ldflags.patch b/020-xd-torrent-use-arch-ldflags.patch deleted file mode 100644 index dc76c83a5b25..000000000000 --- a/020-xd-torrent-use-arch-ldflags.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -51,16 +51,16 @@ build: $(CLI) - assets: $(ASSETS) - - $(GO_ASSETS): -- GOPATH=$(REPO) $(GO) build -o $(GO_ASSETS) -v github.com/jessevdk/go-assets-builder -+ GOPATH=$(REPO) $(GO) build -ldflags "-linkmode external -extldflags '${LDFLAGS}'" -o $(GO_ASSETS) -v github.com/jessevdk/go-assets-builder - - $(ASSETS): $(GO_ASSETS) $(WEBUI_CORE) - $(GO_ASSETS) -p assets -s $(WEBUI_PREFIX) -o $(ASSETS) $(WEB_FILES) - - $(XD): $(ASSETS) -- GOPATH=$(REPO) $(GO) build -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -tags='$(TAGS)' -o $(XD) -+ GOPATH=$(REPO) $(GO) build -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -tags='$(TAGS)' -o $(XD) - - dev: $(ASSETS) -- GOPATH=$(REPO) $(GO) build -race -v -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -tags='$(TAGS)' -o $(XD) -+ GOPATH=$(REPO) $(GO) build -race -v -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -tags='$(TAGS)' -o $(XD) - - $(CLI): $(XD) - $(RM) $(CLI) -@@ -94,7 +94,7 @@ $(WEBUI_CORE): $(WEBUI_LOGO) - webui: $(WEBUI_CORE) - - no-webui: -- GOPATH=$(REPO) $(GO) build -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -o $(XD) -+ GOPATH=$(REPO) $(GO) build -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -o $(XD) - - install: $(XD) $(CLI) - $(MKDIR) $(PREFIX)/bin diff --git a/060-xd-torrent-use-arch-ldflags.patch b/060-xd-torrent-use-arch-ldflags.patch new file mode 100644 index 000000000000..d2fe3f5eb9c1 --- /dev/null +++ b/060-xd-torrent-use-arch-ldflags.patch @@ -0,0 +1,31 @@ +--- a/Makefile ++++ b/Makefile +@@ -51,16 +51,16 @@ build: $(CLI) + assets: $(ASSETS) + + $(GO_ASSETS): +- $(GO) build -o $(GO_ASSETS) -v github.com/jessevdk/go-assets-builder ++ $(GO) build -ldflags "-linkmode external -extldflags '${LDFLAGS}'" -o $(GO_ASSETS) -v github.com/jessevdk/go-assets-builder + + $(ASSETS): $(GO_ASSETS) $(WEBUI_CORE) + $(GO_ASSETS) -p assets -s $(WEBUI_PREFIX) -o $(ASSETS) $(WEB_FILES) + + $(XD): $(ASSETS) +- $(GO) build -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -tags='$(TAGS)' -o $(XD) ++ $(GO) build -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -tags='$(TAGS)' -o $(XD) + + dev: $(ASSETS) +- $(GO) build -race -v -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -tags='$(TAGS)' -o $(XD) ++ $(GO) build -race -v -a -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -tags='$(TAGS)' -o $(XD) + + $(CLI): $(XD) + $(RM) $(CLI) +@@ -94,7 +94,7 @@ $(WEBUI_CORE): $(WEBUI_LOGO) + webui: $(WEBUI_CORE) + + no-webui: +- $(GO) build -ldflags "-X xd/lib/version.Git=$(GIT_VERSION)" -o $(XD) ++ $(GO) build -ldflags "-X xd/lib/version.Git=$(GIT_VERSION) -linkmode external -extldflags '${LDFLAGS}'" -o $(XD) + + install: $(XD) $(CLI) + $(MKDIR) $(PREFIX)/bin diff --git a/030-xd-torrent-rename-service-paths.patch b/070-xd-torrent-rename-service-paths.patch index 8c77e8de9e5d..8c77e8de9e5d 100644 --- a/030-xd-torrent-rename-service-paths.patch +++ b/070-xd-torrent-rename-service-paths.patch diff --git a/040-xd-torrent-service-hardening.patch b/080-xd-torrent-service-hardening.patch index bcdf9dbcfc79..bcdf9dbcfc79 100644 --- a/040-xd-torrent-service-hardening.patch +++ b/080-xd-torrent-service-hardening.patch @@ -2,36 +2,48 @@ pkgname=xd-torrent pkgver=0.3.4 -pkgrel=3 +pkgrel=4 pkgdesc='An I2P BitTorrent client' arch=('x86_64') url='https://xd-torrent.github.io/' license=('MIT') depends=('glibc') -makedepends=('go') +makedepends=('git' 'go') backup=('etc/xd.conf') -source=("https://github.com/majestrate/XD/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz" - '010-xd-torrent-fix-webui-target.patch' - '020-xd-torrent-use-arch-ldflags.patch' - '030-xd-torrent-rename-service-paths.patch' - '040-xd-torrent-service-hardening.patch' +source=("git+https://github.com/majestrate/XD.git#tag=v${pkgver}" + '010-xd-torrent-fix-build-part1.patch'::'https://github.com/majestrate/XD/commit/5c864223210f2848150485a6b40d837e8778575f.patch' + '020-xd-torrent-fix-build-part2.patch'::'https://github.com/majestrate/XD/commit/e1f4ce28363f4dd3f3902d79aacfbd273d7c8bfd.patch' + '030-xd-torrent-fix-build-part3.patch'::'https://github.com/majestrate/XD/commit/9152c3fef309558eb041a90a860be45e9186c9b4.patch' + '040-xd-torrent-fix-webui-target.patch'::'https://github.com/majestrate/XD/commit/6b4204e162cef15afcf3e53634c132c78a50f3e5.patch' + '050-xd-torrent-fix-tests.patch'::'https://github.com/majestrate/XD/commit/151d5b6a13f948b4b3f8728dbb15eecc9e7fc53f.patch' + '060-xd-torrent-use-arch-ldflags.patch' + '070-xd-torrent-rename-service-paths.patch' + '080-xd-torrent-service-hardening.patch' 'xd-torrent.sysusers' 'xd-torrent.tmpfiles' 'xd.conf') -sha256sums=('90a3df7a52ec30effe4a287728c1fd2d93a3a08b59cd2c6a971513d487d9d48a' - '53c9b91bceabfbb33c42d5dee73b50c79c81e5d2ef219b8c4e7d8f40f1bd9b3f' - '3698cf45ae01e8e1dacea1b47cf255bc807138928cad5c3789e53268dac6fa2d' +sha256sums=('SKIP' + 'b273a994d08db9a471bd778b216fc8f921bf8fdfdae451c2a5d86b4c004f7cb1' + 'd20098827a6a774c79a4c9259585b8b5fa01cae5730d2afa0ce995ebcb1b5cba' + '6933d6f619d0c4411dad3ee00297d751675607e3f9cc7f74b6a2388bfbfaad9f' + 'b404e26612c41809d88adb7654d4ebb142dbf7997a4e1e4a4900245e44da2c91' + '1cbd2b4bba8df173a68a45dddbf8db8166b2c5a68b10562a947d59f624fa7a66' + '501872a2ceca5de0999448e5373920fb9d0c016274107f9279df67a9c7ec16b5' '6b3d959b55623c3f907be0e1c53c7092e9328cb0b10c336102d012d716438a14' '77f50344dc028eac9ee229faf2fcda4807b5fbe4872a23513c271dd0e4964e53' '5f2fb392c2fec68bb3861ece85b5bbdd4929c4ccccf3caeb835060213c309761' 'f05777857bab4d18ad23582a746959cd13e07345fa74bbb3f1263a38398ac491' - '2817f5eb6e204dd8e37fb4963a9b60d958ae063c6f082c41f92760802ea99530') + '27b6900da96e5280ff8a172b094531e08cb06a653cc97ec15eb6061d3779924b') prepare() { - patch -d "XD-${pkgver}" -Np1 -i "${srcdir}/010-xd-torrent-fix-webui-target.patch" - patch -d "XD-${pkgver}" -Np1 -i "${srcdir}/020-xd-torrent-use-arch-ldflags.patch" - patch -d "XD-${pkgver}" -Np1 -i "${srcdir}/030-xd-torrent-rename-service-paths.patch" - patch -d "XD-${pkgver}" -Np1 -i "${srcdir}/040-xd-torrent-service-hardening.patch" + patch -d XD -Np1 -i "${srcdir}/010-xd-torrent-fix-build-part1.patch" + git -C XD apply "${srcdir}/020-xd-torrent-fix-build-part2.patch" + patch -d XD -Np1 -i "${srcdir}/030-xd-torrent-fix-build-part3.patch" + patch -d XD -Np1 -i "${srcdir}/040-xd-torrent-fix-webui-target.patch" + patch -d XD -Np1 -i "${srcdir}/050-xd-torrent-fix-tests.patch" + patch -d XD -Np1 -i "${srcdir}/060-xd-torrent-use-arch-ldflags.patch" + patch -d XD -Np1 -i "${srcdir}/070-xd-torrent-rename-service-paths.patch" + patch -d XD -Np1 -i "${srcdir}/080-xd-torrent-service-hardening.patch" } build() { @@ -40,15 +52,15 @@ build() { export CGO_CXXFLAGS="$CXXFLAGS" export CGO_LDFLAGS="$LDFLAGS" export GOFLAGS='-buildmode=pie -trimpath -mod=readonly -modcacherw' - make -C "XD-${pkgver}" + make -C XD } check() { - make -C "XD-${pkgver}" test + make -C XD test } package() { - make -C "XD-${pkgver}" PREFIX="${pkgdir}/usr" install + make -C XD PREFIX="${pkgdir}/usr" install # config install -D -m644 xd.conf -t "${pkgdir}/etc" @@ -56,11 +68,11 @@ package() { # sistemd install -D -m644 xd-torrent.sysusers "${pkgdir}/usr/lib/sysusers.d/xd-torrent.conf" install -D -m644 xd-torrent.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/xd-torrent.conf" - install -D -m644 "XD-${pkgver}/contrib/systemd/xd.service" "${pkgdir}/usr/lib/systemd/system/xd-torrent.service" + install -D -m644 XD/contrib/systemd/xd.service "${pkgdir}/usr/lib/systemd/system/xd-torrent.service" # docs - install -D -m644 "XD-${pkgver}/docs/en/readme.md" -t "${pkgdir}/usr/share/doc/${pkgname}" + install -D -m644 XD/docs/en/readme.md -t "${pkgdir}/usr/share/doc/${pkgname}" # license - install -D -m644 "XD-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -D -m644 XD/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" } @@ -4,7 +4,7 @@ address=127.0.0.1:7656 [rpc] enabled=1 -bind=127.0.0.1:1488 +bind=127.0.0.1:1776 host=127.0.0.1 [lokinet] |