Github messages for voidlinux
 help / color / mirror / Atom feed
From: dkwo <dkwo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] build-style: go: allow pie (v2)
Date: Tue, 26 Dec 2023 18:59:07 +0100	[thread overview]
Message-ID: <20231226175907.ioIoJ1IbIgitBX7fyNwmaR3j7iIADIp_9OKoBZxy_-0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46958@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

There is an updated pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages gopie
https://github.com/void-linux/void-packages/pull/46958

build-style: go: allow pie (v2)
I rebuilt all packages.
Packages that fail to build with `pie` have `nopie` set.
Pending sbctl (fixed at #46165 )

Packages missing distfiles:

- clipman @travankor what to do? (builds fine with pie otherwise)
- lxd, lxd-lts: https://github.com/void-linux/void-packages/pull/47573

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/46958.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gopie-46958.patch --]
[-- Type: text/x-diff, Size: 8319 bytes --]

From 561a79503d109d5833ed5211eb0c41c3d5360814 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Sat, 12 Sep 2020 07:07:13 +0700
Subject: [PATCH 1/9] build-style: go: allow -buildmode=pie

---
 common/build-style/go.sh             | 8 ++++++--
 common/environment/build-style/go.sh | 1 -
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/common/build-style/go.sh b/common/build-style/go.sh
index 50524b07f768c..a54f3813183cc 100644
--- a/common/build-style/go.sh
+++ b/common/build-style/go.sh
@@ -29,7 +29,11 @@ do_build() {
 		fi
 	done
 
+	local buildmode
 	go_package=${go_package:-$go_import_path}
+	if [ -z "$nopie" ]; then
+		buildmode=-buildmode=pie
+	fi
 	# Build using Go modules if there's a go.mod file
 	if [ "${go_mod_mode}" != "off" ] && [ -f go.mod ]; then
 
@@ -50,13 +54,13 @@ do_build() {
 			# default behavior.
 			go_mod_mode=
 		fi
-		go install -p "$XBPS_MAKEJOBS" -mod="${go_mod_mode}" -modcacherw -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
+		go install -p "$XBPS_MAKEJOBS" -mod="${go_mod_mode}" $buildmode -modcacherw -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
 		if [[ -n "${_go_mod_path}" ]]; then
 			popd
 		fi
 	else
 		# Otherwise, build using GOPATH
-		go get -p "$XBPS_MAKEJOBS" -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
+		go get -p "$XBPS_MAKEJOBS" $buildmode -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
 	fi
 }
 
diff --git a/common/environment/build-style/go.sh b/common/environment/build-style/go.sh
index 223bba83ff11b..92a049411e0fb 100644
--- a/common/environment/build-style/go.sh
+++ b/common/environment/build-style/go.sh
@@ -4,7 +4,6 @@ if [ -z "$hostmakedepends" -o "${hostmakedepends##*gcc-go-tools*}" ]; then
 		archs="aarch64* armv[567]* i686* x86_64* ppc64le* riscv64*"
 	fi
 	hostmakedepends+=" go"
-	nopie=yes
 else
 	# gccgo compiler
 	if [ -z "$archs" ]; then

From e1d15cbfe714d7436dd1f6b803d0cb18963b9d5d Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Thu, 7 Dec 2023 17:07:51 -0500
Subject: [PATCH 2/9] booster: set nopie

---
 srcpkgs/booster/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
index 1e904ae1d8664..e2d095c4ad0c2 100644
--- a/srcpkgs/booster/template
+++ b/srcpkgs/booster/template
@@ -17,6 +17,7 @@ alternatives="
  initramfs:/etc/kernel.d/post-install/20-initramfs:/usr/libexec/booster/kernel-hook-postinst
  initramfs:/etc/kernel.d/post-remove/20-initramfs:/usr/libexec/booster/kernel-hook-postrm
 "
+nopie=unverified
 
 _build_component() {
 	go install -p "$XBPS_MAKEJOBS" -mod=readonly -x

From 783115bb858f87deaba3870b8b4245b2de865bd9 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 28 Nov 2023 16:01:32 -0500
Subject: [PATCH 3/9] cni-plugins: set nopie

---
 srcpkgs/cni-plugins/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/cni-plugins/template b/srcpkgs/cni-plugins/template
index c88498d19dfbf..496433b8c73d0 100644
--- a/srcpkgs/cni-plugins/template
+++ b/srcpkgs/cni-plugins/template
@@ -10,6 +10,7 @@ license="Apache-2.0"
 homepage="https://github.com/containernetworking/plugins"
 distfiles="https://github.com/containernetworking/plugins/archive/v${version}.tar.gz"
 checksum=f9871b9f6ccb51d2b264532e96521e44f926928f91434b56ce135c95becf2901
+nopie=unverified
 
 do_build() {
 	./build_linux.sh \

From 194dc85985b2a01e0f812a007bf0f44b50f33ea8 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 28 Nov 2023 16:02:54 -0500
Subject: [PATCH 4/9] coyim: set nopie

---
 srcpkgs/coyim/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/coyim/template b/srcpkgs/coyim/template
index 0d928b05cfde3..a8408d59fccdd 100644
--- a/srcpkgs/coyim/template
+++ b/srcpkgs/coyim/template
@@ -12,6 +12,7 @@ license="GPL-3.0-only"
 homepage="https://coy.im"
 distfiles="https://github.com/coyim/coyim/archive/v${version}.tar.gz"
 checksum=f2bf1e73562fbcc3a0b264a30f92dfe427dffe2046e9f44459087ecac5890098
+nopie=unverified
 
 case "$XBPS_TARGET_MACHINE" in
 	x86_64*) ;;

From 8324a6de14b5b350d6ba29fd7c173920bb124d8e Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 28 Nov 2023 16:03:42 -0500
Subject: [PATCH 5/9] kubernetes: set nopie

---
 srcpkgs/kubernetes/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/kubernetes/template b/srcpkgs/kubernetes/template
index d0b936775cbb6..5c050b7b14fe3 100644
--- a/srcpkgs/kubernetes/template
+++ b/srcpkgs/kubernetes/template
@@ -17,6 +17,7 @@ nocross=yes
 system_accounts="kube"
 make_dirs="/var/lib/kubelet 0755 kube kube"
 conf_files="/etc/kubernetes/*"
+nopie=unverified
 
 do_build() {
 	make

From b433c3b174a0c368a08954e81a2475c0575d4d2f Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 28 Nov 2023 16:04:26 -0500
Subject: [PATCH 6/9] moby: set nopie

---
 srcpkgs/moby/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/moby/template b/srcpkgs/moby/template
index 50e0e83c70918..b175280862ea6 100644
--- a/srcpkgs/moby/template
+++ b/srcpkgs/moby/template
@@ -21,6 +21,7 @@ distfiles="https://github.com/moby/moby/archive/v${version}.tar.gz>moby-$version
 checksum="16a2cb4cf4d314a070085e0df06e3a6bd9ec678d28715b64060af694fc9051d5
  5c5e3aa7599e85036438a65016796aa11df4afb44d13b5927dcfb0ec5947a86b"
 system_groups="docker"
+nopie=unverified
 
 _moby_builddir="moby-$version"
 _libnetwork_builddir="libnetwork-$_libnetwork_commit"

From 211c331eb5515a8d09ad2c85f50740d812e76888 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 28 Nov 2023 16:05:07 -0500
Subject: [PATCH 7/9] nncp: set nopie

---
 srcpkgs/nncp/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/nncp/template b/srcpkgs/nncp/template
index 6975d7a51ef1b..acc5f487aeb73 100644
--- a/srcpkgs/nncp/template
+++ b/srcpkgs/nncp/template
@@ -10,6 +10,7 @@ license="GPL-3.0-only"
 homepage="http://www.nncpgo.org/"
 distfiles="http://www.nncpgo.org/download/${pkgname}-${version}.tar.xz"
 checksum=154e13ba15c0ea93f54525793b0699e496b2db7281e1555f08d785a528f3f7fc
+nopie=unverified
 
 do_build() {
 	./bin/build

From b24f879b5b54fcca383151141b54f883d4574493 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 28 Nov 2023 16:05:49 -0500
Subject: [PATCH 8/9] yggdrasil: set nopie

---
 srcpkgs/yggdrasil/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/yggdrasil/template b/srcpkgs/yggdrasil/template
index c6f7a2395b9ba..24a81e3d799ff 100644
--- a/srcpkgs/yggdrasil/template
+++ b/srcpkgs/yggdrasil/template
@@ -11,6 +11,7 @@ homepage="https://yggdrasil-network.github.io/"
 changelog="https://raw.githubusercontent.com/yggdrasil-network/yggdrasil-go/develop/CHANGELOG.md"
 distfiles="https://github.com/yggdrasil-network/yggdrasil-go/archive/v${version}.tar.gz"
 checksum=c1cceb9a7a4a8959536b1d930ca081bcfbc76ab655e4bcb55d5d0ab6520d9241
+nopie=unverified
 
 do_build() {
 	PKGNAME=${pkgname} PKGVER=${version} ./build

From 24670ec5c299c5d866811e29adf3f0cea0a6b262 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Wed, 29 Nov 2023 10:55:47 -0500
Subject: [PATCH 9/9] browsh: fix distfiles

---
 srcpkgs/browsh/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/browsh/template b/srcpkgs/browsh/template
index 6fa397b04305f..e23f8ddf70a2f 100644
--- a/srcpkgs/browsh/template
+++ b/srcpkgs/browsh/template
@@ -12,8 +12,8 @@ short_desc="Fully-modern text-based browser, rendering to TTY and browsers"
 maintainer="zhengqunkoo <root@zhengqunkoo.com>"
 license="LGPL-2.1-only"
 homepage="https://www.brow.sh/"
-distfiles="https://$go_import_path/archive/v$version.tar.gz
- https://$go_import_path/releases/download/v${version}/browsh-${version}-an.fx.xpi>browsh.xpi"
+distfiles="https://github.com/browsh-org/browsh/archive/refs/tags/v${version}.tar.gz
+ https://github.com/browsh-org/browsh/releases/download/v${version}/browsh-1.6.4-an.fx.xpi>browsh.xpi"
 checksum="965ce2d94d1d9e4b92411d344421c0bea40994527cafd694c5a6e8e206681ede
  b410527a69dba88a30d8a6d341a20eb5cb1f84b684e9bc8bb6bc88a2930e0eea"
 skip_extraction="browsh.xpi"

  parent reply	other threads:[~2023-12-26 17:59 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29 18:04 [PR PATCH] [rfc] " dkwo
2023-10-29 18:12 ` [PR PATCH] [Updated] " dkwo
2023-10-31 21:01 ` dkwo
2023-11-21 16:41 ` dkwo
2023-11-21 16:42 ` dkwo
2023-11-22 15:04 ` leahneukirchen
2023-11-24 22:06 ` dkwo
2023-11-27 14:29 ` dkwo
2023-11-27 14:30 ` dkwo
2023-11-28 14:14 ` dkwo
2023-11-28 20:49 ` dkwo
2023-11-28 20:52 ` dkwo
2023-11-28 20:52 ` dkwo
2023-11-28 20:56 ` dkwo
2023-11-28 20:58 ` dkwo
2023-11-28 20:59 ` dkwo
2023-11-28 21:06 ` [PR PATCH] [Updated] " dkwo
2023-11-28 21:09 ` dkwo
2023-11-29 15:58 ` dkwo
2023-11-29 16:00 ` [PR PATCH] [Updated] " dkwo
2023-11-29 17:51 ` CameronNemo
2023-11-29 18:34 ` benalb
2023-11-29 20:59 ` benalb
2023-11-30  0:22 ` dkwo
2023-11-30  0:22 ` dkwo
2023-11-30  0:23 ` dkwo
2023-12-01 17:28 ` benalb
2023-12-02 15:17 ` [PR PATCH] [Updated] " dkwo
2023-12-02 15:20 ` dkwo
2023-12-02 22:00 ` dkwo
2023-12-03 19:47 ` [PR PATCH] [Updated] " dkwo
2023-12-04 15:42 ` dkwo
2023-12-06 21:25 ` dkwo
2023-12-06 21:28 ` dkwo
2023-12-07 15:04 ` [PR PATCH] [Updated] " dkwo
2023-12-07 15:07 ` dkwo
2023-12-07 15:12 ` dkwo
2023-12-08 21:35 ` leahneukirchen
2023-12-10  0:49 ` classabbyamp
2023-12-10 15:26 ` [PR PATCH] [Updated] " dkwo
2023-12-10 15:27 ` dkwo
2023-12-10 15:35 ` [PR PATCH] [Updated] " dkwo
2023-12-10 15:36 ` dkwo
2023-12-21  9:12 ` dkwo
2023-12-26 17:59 ` dkwo [this message]
2024-01-06 22:45 ` dkwo
2024-01-07 21:27 ` [PR PATCH] [Updated] [rfc] build-style: go: set pie globally dkwo
2024-01-08 14:15 ` [PR PATCH] [Updated] [rfc] build-style: go: set buildmode=pie globally dkwo
2024-02-15 15:06 ` dkwo
2024-05-16  1:46 ` github-actions
2024-05-16 14:18 ` [PR PATCH] [Updated] " dkwo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231226175907.ioIoJ1IbIgitBX7fyNwmaR3j7iIADIp_9OKoBZxy_-0@z \
    --to=dkwo@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).