Package Details: wem 0.9.5-1

Git Clone URL: https://aur.archlinux.org/wem.git (read-only, click to copy)
Package Base: wem
Description: Wine Environment Manager: A CLI tool for managing wine "envs" or prefixes.
Upstream URL: https://git.sr.ht/~hristoast/wem
Keywords: cli environment go manager wine
Licenses: GPL3
Submitter: hristoast
Maintainer: hristoast
Last Packager: hristoast
Votes: 0
Popularity: 0.000000
First Submitted: 2021-08-11 03:58 (UTC)
Last Updated: 2023-12-25 02:10 (UTC)

Required by (0)

Sources (1)

Latest Comments

hristoast commented on 2021-11-06 15:00 (UTC)

Hey Luis -- thanks a bunch for the patch! I really appreciate it.

lmartinez-mirror commented on 2021-11-06 03:57 (UTC)

I wrote up a patch for your PKGBUILD. This should allow it to build without any RELRO warnings.

diff --git a/PKGBUILD b/PKGBUILD
index d709770..c383aa8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,32 @@
 # Maintainer: Hristos N. Triantafillou <me@hristos.co>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
+
 pkgname=wem
 pkgver=0.8.5
-pkgrel=2
+pkgrel=3
 pkgdesc='Wine Environment Manager: A CLI tool for managing wine "envs" or prefixes.'
 arch=('x86_64')
 url='https://git.sr.ht/~hristoast/wem'
 license=('GPL3')
 depends=('glibc')
 makedepends=('go')
-provides=('wem')
-conflicts=('wem')
-source=("$pkgname-$pkgver.tar.gz::https://git.sr.ht/~hristoast/wem/archive/${pkgver}.tar.gz")
+source=("$pkgname-$pkgver.tar.gz::$url/archive/${pkgver}.tar.gz")
 sha512sums=('af45a2cca6a5a83909a6ef5f64ef5ae7a6d3df873bf7ca5036b6c4226b36072d2d98b975a25c051030133cb6904f83c85ca510a7857267bbd1c669503239c2d9')

 build() {
-    cd "$srcdir/$pkgname-$pkgver"
-    export GOFLAGS='-buildmode=pie'
-    # export CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2"
-    # export CGO_LDFLAGS="-Wl,-z,relro,-z,now"
-    # Still get this despite using those exports:
-    # wem W: ELF file ('usr/bin/wem') lacks FULL RELRO, check LDFLAGS.
+    ## From Go package guidelines
+    ## https://wiki.archlinux.org/title/Go_package_guidelines
+    export CGO_CPPFLAGS="${CPPFLAGS}"
+    export CGO_CFLAGS="${CFLAGS}"
+    export CGO_CXXFLAGS="${CXXFLAGS}"
+    export CGO_LDFLAGS="${LDFLAGS}"
+    export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+    cd "$pkgname-$pkgver"
     go build -o wem wem.go
 }

 package() {
-    cd "$srcdir/$pkgname-$pkgver"
-    install -D wem --target-directory $pkgdir/usr/bin/
+    cd "$pkgname-$pkgver"
+    install -D wem -t "$pkgdir/usr/bin/"
 }