* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
@ 2022-04-13 18:10 ` Chocimier
2022-04-13 18:10 ` Chocimier
` (20 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Chocimier @ 2022-04-13 18:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849762087
Comment:
Reading and writing same file in one pipeline looks like race which can truncate file, did you test?
It can be simplified to
printf -- "${_curdep} "
done | sort > ${PKGDESTDIR}/rdeps
fi
without truncating file inside `if`.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
2022-04-13 18:10 ` [PR REVIEW] " Chocimier
@ 2022-04-13 18:10 ` Chocimier
2022-04-13 18:12 ` Chocimier
` (19 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Chocimier @ 2022-04-13 18:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849762085
Comment:
Reading and writing same file in one pipeline looks like race which can truncate file, did you test?
It can be simplified to
printf -- "${_curdep} "
done | sort > ${PKGDESTDIR}/rdeps
fi
without truncating file inside `if`.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility 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
` (18 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Chocimier @ 2022-04-13 18:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849762085
Comment:
Reading and writing same file in one pipeline looks like race which can truncate file, did you test?
It can be simplified to
printf -- "${_curdep}\n"
done | sort | xargs > ${PKGDESTDIR}/rdeps
fi
without truncating file inside `if`.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (2 preceding siblings ...)
2022-04-13 18:12 ` Chocimier
@ 2022-04-13 18:12 ` Chocimier
2022-04-13 18:16 ` classabbyamp
` (17 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Chocimier @ 2022-04-13 18:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849762087
Comment:
Reading and writing same file in one pipeline looks like race which can truncate file, did you test?
It can be simplified to
printf -- "${_curdep} "
done | sort > ${PKGDESTDIR}/rdeps
fi
without truncating file inside `if`.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (3 preceding siblings ...)
2022-04-13 18:12 ` Chocimier
@ 2022-04-13 18:16 ` classabbyamp
2022-04-13 18:16 ` [PR PATCH] [Updated] " classabbyamp
` (16 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-13 18:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 277 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849768148
Comment:
good catch, it worked fine in my testing, but I think it may cause issues on huge packages. I've updated it. How's that look?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR PATCH] [Updated] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (4 preceding siblings ...)
2022-04-13 18:16 ` classabbyamp
@ 2022-04-13 18:16 ` classabbyamp
2022-04-13 18:17 ` [PR REVIEW] " classabbyamp
` (15 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-13 18:16 UTC (permalink / raw)
To: ml
[-- 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
}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (5 preceding siblings ...)
2022-04-13 18:16 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-04-13 18:17 ` classabbyamp
2022-04-13 18:18 ` classabbyamp
` (14 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-13 18:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 277 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849768148
Comment:
good catch. It worked fine in my testing, but I think it may cause issues on huge packages. I've updated it. How's that look?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (6 preceding siblings ...)
2022-04-13 18:17 ` [PR REVIEW] " classabbyamp
@ 2022-04-13 18:18 ` classabbyamp
2022-04-13 23:31 ` Duncaen
` (13 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-13 18:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849768148
Comment:
good catch. It worked fine in my testing, but I think it would cause issues on huge packages. I've updated it. How's that look?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (7 preceding siblings ...)
2022-04-13 18:18 ` classabbyamp
@ 2022-04-13 23:31 ` Duncaen
2022-04-13 23:34 ` classabbyamp
` (12 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Duncaen @ 2022-04-13 23:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
New review comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849972662
Comment:
Can we just skip the `xargs`?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (8 preceding siblings ...)
2022-04-13 23:31 ` Duncaen
@ 2022-04-13 23:34 ` classabbyamp
2022-04-13 23:35 ` classabbyamp
` (11 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-13 23:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849973859
Comment:
the xargs brings it into one line, like it was before this. would it work if the rdeps/shlibs files are newline separated?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (9 preceding siblings ...)
2022-04-13 23:34 ` classabbyamp
@ 2022-04-13 23:35 ` classabbyamp
2022-04-13 23:36 ` classabbyamp
` (10 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-13 23:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849973859
Comment:
the xargs brings it into one line, like it was before this. would it work if the rdeps/shlibs files are newline separated?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (10 preceding siblings ...)
2022-04-13 23:35 ` classabbyamp
@ 2022-04-13 23:36 ` classabbyamp
2022-04-13 23:36 ` classabbyamp
` (9 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-13 23:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849974788
Comment:
the xargs brings it into a single line, like it was before. will it work if the files is newline-separated instead of space-separated?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (11 preceding siblings ...)
2022-04-13 23:36 ` classabbyamp
@ 2022-04-13 23:36 ` classabbyamp
2022-04-14 18:29 ` [PR PATCH] [Updated] " classabbyamp
` (8 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-13 23:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r849974788
Comment:
the xargs brings it into a single line, like it was before. will it work if the file is newline-separated instead of space-separated?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR PATCH] [Updated] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (12 preceding siblings ...)
2022-04-13 23:36 ` classabbyamp
@ 2022-04-14 18:29 ` classabbyamp
2022-04-14 18:43 ` classabbyamp
` (7 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-14 18:29 UTC (permalink / raw)
To: ml
[-- 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: 1585 bytes --]
From 9e8d05e18ecaf9ce1149d4767867ee83eb741fbe 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
---
| 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh
index c8f8c04d4884..0597f98cb286 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 > ${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 > ${PKGDESTDIR}/shlib-requires
fi
}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR PATCH] [Updated] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (13 preceding siblings ...)
2022-04-14 18:29 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-04-14 18:43 ` classabbyamp
2022-04-19 15:30 ` classabbyamp
` (6 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-14 18:43 UTC (permalink / raw)
To: ml
[-- 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: 1585 bytes --]
From 1f8eddb37be2aec4d05f8d09c24854a15ea0cae2 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..0597f98cb286 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 > ${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 > ${PKGDESTDIR}/shlib-requires
fi
}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR PATCH] [Updated] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (14 preceding siblings ...)
2022-04-14 18:43 ` classabbyamp
@ 2022-04-19 15:30 ` classabbyamp
2022-04-19 17:45 ` [PR REVIEW] " Chocimier
` (5 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-19 15:30 UTC (permalink / raw)
To: ml
[-- 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: 1585 bytes --]
From de6e0022853504e04a2972467e99a59661309262 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..0597f98cb286 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 > ${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 > ${PKGDESTDIR}/shlib-requires
fi
}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (15 preceding siblings ...)
2022-04-19 15:30 ` classabbyamp
@ 2022-04-19 17:45 ` Chocimier
2022-04-19 17:49 ` [PR PATCH] [Updated] " classabbyamp
` (4 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: Chocimier @ 2022-04-19 17:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r853335010
Comment:
xbps-create expects argument delimited with spaces, not newlines
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR PATCH] [Updated] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (16 preceding siblings ...)
2022-04-19 17:45 ` [PR REVIEW] " Chocimier
@ 2022-04-19 17:49 ` classabbyamp
2022-04-19 17:49 ` [PR REVIEW] " classabbyamp
` (3 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-19 17:49 UTC (permalink / raw)
To: ml
[-- 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 4293a3cda73de9f5b72ef05e955c77fc04150b10 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
}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR REVIEW] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (17 preceding siblings ...)
2022-04-19 17:49 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-04-19 17:49 ` classabbyamp
2022-04-25 14:52 ` [PR PATCH] [Updated] " classabbyamp
` (2 subsequent siblings)
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-19 17:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 157 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/36659#discussion_r853338492
Comment:
fixed
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR PATCH] [Updated] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (18 preceding siblings ...)
2022-04-19 17:49 ` [PR REVIEW] " classabbyamp
@ 2022-04-25 14:52 ` classabbyamp
2022-05-07 15:15 ` classabbyamp
2022-05-13 19:21 ` [PR PATCH] [Merged]: " paper42
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-04-25 14:52 UTC (permalink / raw)
To: ml
[-- 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 ff7bead4b0c1a204391726b2f1aab79248ecd83f 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
}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR PATCH] [Updated] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (19 preceding siblings ...)
2022-04-25 14:52 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-05-07 15:15 ` classabbyamp
2022-05-13 19:21 ` [PR PATCH] [Merged]: " paper42
21 siblings, 0 replies; 23+ messages in thread
From: classabbyamp @ 2022-05-07 15:15 UTC (permalink / raw)
To: ml
[-- 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: 2002 bytes --]
From 45aeb193f913615e20139b115257f412a7449ebf 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 | 11 +++++------
1 file changed, 5 insertions(+), 6 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..987b0cece9c5 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
}
@@ -145,7 +144,7 @@ hook() {
if [ "${_pkgname}" != "${pkgname}" ]; then
echo " SONAME: $f <-> ${_sdep}"
- sorequires+="${f} "
+ sorequires+="${f}\n"
else
# Ignore libs by current pkg
echo " SONAME: $f <-> ${_rdep} (ignored)"
@@ -163,9 +162,9 @@ hook() {
store_pkgdestdir_rundeps
for f in ${shlib_requires}; do
- sorequires+="${f} "
+ sorequires+="${f}\n"
done
if [ -n "${sorequires}" ]; then
- echo "${sorequires}" > ${PKGDESTDIR}/shlib-requires
+ echo "${sorequires}" | sort | xargs > ${PKGDESTDIR}/shlib-requires
fi
}
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PR PATCH] [Merged]: common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
2022-04-12 19:29 [PR PATCH] common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility classabbyamp
` (20 preceding siblings ...)
2022-05-07 15:15 ` classabbyamp
@ 2022-05-13 19:21 ` paper42
21 siblings, 0 replies; 23+ messages in thread
From: paper42 @ 2022-05-13 19:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]
There's a merged pull request on the void-packages repository
common/hooks/pre-pkg/04-generate-runtime-deps.sh: sort deps for reproducibility
https://github.com/void-linux/void-packages/pull/36659
Description:
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
-->
^ permalink raw reply [flat|nested] 23+ messages in thread