From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
Date: Wed, 13 Apr 2022 20:16:48 +0200 [thread overview]
Message-ID: <20220413181648.uWpVCXtZjsCSKiHphiohjjB6UJN98TV8xlUzrKBD3Xw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36659@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages sort-deps
https://github.com/void-linux/void-packages/pull/36659
common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
fixes #36641
by "reproducibility", I mean mostly for tools that compare versions/builds of packages.
The solution I have implemented is basically:
1. transform the space-separated list to newline-separated
2. sort
3. transform back to space-separated
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/36659.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sort-deps-36659.patch --]
[-- Type: text/x-diff, Size: 1601 bytes --]
From 19aba2b4ae9a33904394ea002e62f8a8a7c64bb6 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Tue, 12 Apr 2022 15:28:23 -0400
Subject: [PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps
for reproducibility
fixes #36641
---
common/hooks/pre-pkg/04-generate-runtime-deps.sh | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index c8f8c04d4884..eb19ebfe7081 100644
--- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh
+++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
@@ -34,15 +34,14 @@ add_rundep() {
store_pkgdestdir_rundeps() {
if [ -n "$run_depends" ]; then
- : > ${PKGDESTDIR}/rdeps
for f in ${run_depends}; do
_curdep="$(echo "$f" | sed -e 's,\(.*\)?.*,\1,')"
if [ -z "$($XBPS_UHELPER_CMD getpkgdepname ${_curdep} 2>/dev/null)" -a \
-z "$($XBPS_UHELPER_CMD getpkgname ${_curdep} 2>/dev/null)" ]; then
_curdep="${_curdep}>=0"
fi
- printf -- "${_curdep} " >> ${PKGDESTDIR}/rdeps
- done
+ printf -- "${_curdep}\n"
+ done | sort | xargs > ${PKGDESTDIR}/rdeps
fi
}
@@ -166,6 +165,6 @@ hook() {
sorequires+="${f} "
done
if [ -n "${sorequires}" ]; then
- echo "${sorequires}" > ${PKGDESTDIR}/shlib-requires
+ echo "${sorequires}" | xargs -n1 | sort | xargs > ${PKGDESTDIR}/shlib-requires
fi
}
next prev parent reply other threads:[~2022-04-13 18:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 19:29 [PR PATCH] " classabbyamp
2022-04-13 18:10 ` [PR REVIEW] " Chocimier
2022-04-13 18:10 ` Chocimier
2022-04-13 18:12 ` Chocimier
2022-04-13 18:12 ` Chocimier
2022-04-13 18:16 ` classabbyamp
2022-04-13 18:16 ` classabbyamp [this message]
2022-04-13 18:17 ` classabbyamp
2022-04-13 18:18 ` classabbyamp
2022-04-13 23:31 ` Duncaen
2022-04-13 23:34 ` classabbyamp
2022-04-13 23:35 ` classabbyamp
2022-04-13 23:36 ` classabbyamp
2022-04-13 23:36 ` classabbyamp
2022-04-14 18:29 ` [PR PATCH] [Updated] " classabbyamp
2022-04-14 18:43 ` classabbyamp
2022-04-19 15:30 ` classabbyamp
2022-04-19 17:45 ` [PR REVIEW] " Chocimier
2022-04-19 17:49 ` [PR PATCH] [Updated] " classabbyamp
2022-04-19 17:49 ` [PR REVIEW] " classabbyamp
2022-04-25 14:52 ` [PR PATCH] [Updated] " classabbyamp
2022-05-07 15:15 ` classabbyamp
2022-05-13 19:21 ` [PR PATCH] [Merged]: " paper42
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=20220413181648.uWpVCXtZjsCSKiHphiohjjB6UJN98TV8xlUzrKBD3Xw@z \
--to=classabbyamp@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).