[-- Attachment #1: Type: text/plain, Size: 1289 bytes --] There is a new 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 <!-- 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: 1141 bytes --] From 4445006f119410ec9d28d25d89109ff9fa7d5ffd 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/hooks/pre-pkg/04-generate-runtime-deps.sh b/common/hooks/pre-pkg/04-generate-runtime-deps.sh index c8f8c04d4884..87efe9c49ece 100644 --- a/common/hooks/pre-pkg/04-generate-runtime-deps.sh +++ b/common/hooks/pre-pkg/04-generate-runtime-deps.sh @@ -44,6 +44,7 @@ store_pkgdestdir_rundeps() { printf -- "${_curdep} " >> ${PKGDESTDIR}/rdeps done fi + cat ${PKGDESTDIR}/rdeps | xargs -n1 | sort | xargs > ${PKGDESTDIR}/rdeps } hook() { @@ -166,6 +167,6 @@ hook() { sorequires+="${f} " done if [ -n "${sorequires}" ]; then - echo "${sorequires}" > ${PKGDESTDIR}/shlib-requires + echo "${sorequires}" | xargs -n1 | sort | xargs > ${PKGDESTDIR}/shlib-requires fi }
[-- 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`.
[-- 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`.
[-- 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`.
[-- 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`.
[-- 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?
[-- 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 }
[-- 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?
[-- 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?
[-- 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`?
[-- 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?
[-- 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?
[-- 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?
[-- 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?
[-- 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 --- 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 }
[-- 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 }
[-- 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 }
[-- 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
[-- 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 }
[-- 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
[-- 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 }
[-- 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 }
[-- 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 -->