From: dkwo <dkwo@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [rfc] build-style: go: allow pie (v2)
Date: Sun, 03 Dec 2023 20:47:07 +0100 [thread overview]
Message-ID: <20231203194707.2YC1Ic9br-9bMg_UHez04t8q30uU9KfisVQNzbMgqBU@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
[rfc] build-style: go: allow pie (v2)
I rebuilt all packages.
Packages that fail to build with `pie` have `nopie` and `nostrip` set.
Pending sbctl (fixed at #46165 )
Packages missing distfiles:
- clipman @travankor what to do? (builds fine with pie otherwise)
- lxd, lxd-lts: @CameronNemo what to do with fork?
[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: 8690 bytes --]
From c1a994d08c5eb37a34c84f7b7ce482874ce4e770 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 | 2 +-
2 files changed, 7 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..a07e83521b646 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
@@ -15,6 +14,7 @@ else
# target compiler to use; otherwise it'll just call gccgo
export GCCGO="${XBPS_CROSS_TRIPLET}-gccgo"
fi
+ nostrip=yes
fi
case "$XBPS_TARGET_MACHINE" in
From 661eb56910e80618c108748d37bc44d4983f5780 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 28 Nov 2023 16:00:39 -0500
Subject: [PATCH 2/9] booster: set nopie, nostrip
---
srcpkgs/booster/template | 2 ++
1 file changed, 2 insertions(+)
diff --git a/srcpkgs/booster/template b/srcpkgs/booster/template
index 1e904ae1d8664..d0874cfe98cb8 100644
--- a/srcpkgs/booster/template
+++ b/srcpkgs/booster/template
@@ -17,6 +17,8 @@ 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
+nostrip=nopie
_build_component() {
go install -p "$XBPS_MAKEJOBS" -mod=readonly -x
From 66a579be8e25980ffdf422f0589ddc44c6e439de 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, nostrip
---
srcpkgs/cni-plugins/template | 2 ++
1 file changed, 2 insertions(+)
diff --git a/srcpkgs/cni-plugins/template b/srcpkgs/cni-plugins/template
index c88498d19dfbf..a25f5336c34f2 100644
--- a/srcpkgs/cni-plugins/template
+++ b/srcpkgs/cni-plugins/template
@@ -10,6 +10,8 @@ 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
+nostrip=nopie
do_build() {
./build_linux.sh \
From 13798064c13dc7345ea4c10b4a39714282cef6f7 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, nostrip
---
srcpkgs/coyim/template | 2 ++
1 file changed, 2 insertions(+)
diff --git a/srcpkgs/coyim/template b/srcpkgs/coyim/template
index 0d928b05cfde3..ca4e1aa222d35 100644
--- a/srcpkgs/coyim/template
+++ b/srcpkgs/coyim/template
@@ -12,6 +12,8 @@ license="GPL-3.0-only"
homepage="https://coy.im"
distfiles="https://github.com/coyim/coyim/archive/v${version}.tar.gz"
checksum=f2bf1e73562fbcc3a0b264a30f92dfe427dffe2046e9f44459087ecac5890098
+nopie=unverified
+nostrip=nopie
case "$XBPS_TARGET_MACHINE" in
x86_64*) ;;
From 24a1d9f9db777afe0676820981d3ca9a0843187b 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, nostrip
---
srcpkgs/kubernetes/template | 2 ++
1 file changed, 2 insertions(+)
diff --git a/srcpkgs/kubernetes/template b/srcpkgs/kubernetes/template
index a2b1aa203f8ae..a832eee1b152c 100644
--- a/srcpkgs/kubernetes/template
+++ b/srcpkgs/kubernetes/template
@@ -17,6 +17,8 @@ nocross=yes
system_accounts="kube"
make_dirs="/var/lib/kubelet 0755 kube kube"
conf_files="/etc/kubernetes/*"
+nopie=unverified
+nostrip=nopie
do_build() {
make
From 9fa1866e57de1110a189051a2951a95887dbbe9c 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, nostrip
---
srcpkgs/moby/template | 2 ++
1 file changed, 2 insertions(+)
diff --git a/srcpkgs/moby/template b/srcpkgs/moby/template
index 50e0e83c70918..e309e77c1efea 100644
--- a/srcpkgs/moby/template
+++ b/srcpkgs/moby/template
@@ -21,6 +21,8 @@ distfiles="https://github.com/moby/moby/archive/v${version}.tar.gz>moby-$version
checksum="16a2cb4cf4d314a070085e0df06e3a6bd9ec678d28715b64060af694fc9051d5
5c5e3aa7599e85036438a65016796aa11df4afb44d13b5927dcfb0ec5947a86b"
system_groups="docker"
+nopie=unverified
+nostrip=nopie
_moby_builddir="moby-$version"
_libnetwork_builddir="libnetwork-$_libnetwork_commit"
From 62f56ae9ab156fcc0503a52562a007769b4be01f 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, nostrip
---
srcpkgs/nncp/template | 2 ++
1 file changed, 2 insertions(+)
diff --git a/srcpkgs/nncp/template b/srcpkgs/nncp/template
index 6975d7a51ef1b..48b026350735a 100644
--- a/srcpkgs/nncp/template
+++ b/srcpkgs/nncp/template
@@ -10,6 +10,8 @@ license="GPL-3.0-only"
homepage="http://www.nncpgo.org/"
distfiles="http://www.nncpgo.org/download/${pkgname}-${version}.tar.xz"
checksum=154e13ba15c0ea93f54525793b0699e496b2db7281e1555f08d785a528f3f7fc
+nopie=unverified
+nostrip=nopie
do_build() {
./bin/build
From 71f40b599fc00cf6a2cb441b1e63a86b0e631dec 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, nostrip
---
srcpkgs/yggdrasil/template | 2 ++
1 file changed, 2 insertions(+)
diff --git a/srcpkgs/yggdrasil/template b/srcpkgs/yggdrasil/template
index ffe828d3e9cc4..90438a30bfcf1 100644
--- a/srcpkgs/yggdrasil/template
+++ b/srcpkgs/yggdrasil/template
@@ -11,6 +11,8 @@ 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=47429f75b87d9b2450108471991e84c90d748606642e8778e9f578485b05a56f
+nopie=unverified
+nostrip=nopie
do_build() {
PKGNAME=${pkgname} PKGVER=${version} ./build
From 810c87fe17fcf656a2417aa04007cb1c28c0f374 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"
next prev parent reply other threads:[~2023-12-03 19:47 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-29 18:04 [PR PATCH] " 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 ` dkwo [this message]
2023-12-04 15:42 ` [PR PATCH] [Updated] " 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
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=20231203194707.2YC1Ic9br-9bMg_UHez04t8q30uU9KfisVQNzbMgqBU@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).