* [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and
@ 2020-11-21 1:38 ericonr
2020-11-21 1:42 ` [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match ericonr
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: ericonr @ 2020-11-21 1:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
There is a new pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages shlib
https://github.com/void-linux/void-packages/pull/26547
[WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and
common/shlibs match.
A patch file from https://github.com/void-linux/void-packages/pull/26547.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-shlib-26547.patch --]
[-- Type: text/x-diff, Size: 1589 bytes --]
From 643cebe773aa12da42434499e113763fe0557b4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 20 Nov 2020 22:37:34 -0300
Subject: [PATCH] hooks/shlib-provides: verify that shlibs in shlib-provides
and common/shlibs match.
---
common/hooks/pre-pkg/06-shlib-provides.sh | 30 +++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/common/hooks/pre-pkg/06-shlib-provides.sh b/common/hooks/pre-pkg/06-shlib-provides.sh
index cdc94de3bc9..c59a50369b3 100644
--- a/common/hooks/pre-pkg/06-shlib-provides.sh
+++ b/common/hooks/pre-pkg/06-shlib-provides.sh
@@ -42,6 +42,34 @@ collect_sonames() {
rm -f ${_tmpfile}
}
+# verify that shlibs listed in common/shlibs are actually provided by the package
+verify_sonames() {
+ local _destdir="$1" broken= mapshlibs pkgshlibs mappedshlibs
+ mapshlibs="${XBPS_COMMONDIR}/shlibs"
+
+ if [ ! -f ${_destdir}/shlib-provides ]; then
+ return 0
+ fi
+
+ pkgshlibs="$(cat ${_destdir}/shlib-provides)"
+
+ mappedshlibs="$(grep -E "[[:blank:]]${pkgname}" $mapshlibs)" || return 0
+
+ set -- $mappedshlibs
+ while [ $# -gt 0 ]
+ do
+ if [ "$($XBPS_UHELPER_CMD getpkgname "$2")" = ${pkgname} ]; then
+ if [[ "${pkgshlibs}" != *"$1"* ]]; then
+ msg_red "$1 couldn't be found in ${pkgname}\n"
+ broken=1
+ fi
+ fi
+ shift 2
+ done
+
+ return $broken
+}
+
hook() {
local _destdir32=${XBPS_DESTDIR}/${pkgname}-32bit-${version}
@@ -53,4 +81,6 @@ hook() {
collect_sonames ${PKGDESTDIR}
# 32bit pkg
collect_sonames ${_destdir32}
+
+ verify_sonames ${PKGDESTDIR} || return 1
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
@ 2020-11-21 1:42 ` ericonr
2020-11-21 1:42 ` ericonr
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-11-21 1:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#issuecomment-731486799
Comment:
I think what this also needs to check is that the file also exists in the package.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
2020-11-21 1:42 ` [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match ericonr
@ 2020-11-21 1:42 ` ericonr
2020-11-21 1:54 ` [PR PATCH] [Updated] " ericonr
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-11-21 1:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#issuecomment-731486799
Comment:
I think what this also needs to check is that the file exists in the package.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
2020-11-21 1:42 ` [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match ericonr
2020-11-21 1:42 ` ericonr
@ 2020-11-21 1:54 ` ericonr
2020-11-21 1:55 ` ericonr
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-11-21 1:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
There is an updated pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages shlib
https://github.com/void-linux/void-packages/pull/26547
[WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
common/shlibs match.
A patch file from https://github.com/void-linux/void-packages/pull/26547.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-shlib-26547.patch --]
[-- Type: text/x-diff, Size: 1864 bytes --]
From 7bce9410b1ff920d20749fda2057db2f50e6ca77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 20 Nov 2020 22:37:34 -0300
Subject: [PATCH] hooks/shlib-provides: verify that shlibs in shlib-provides
and common/shlibs have sane values.
- Check if shlib-provides and common/shlibs agree
- Check if file for shlib is actually present in final package
---
common/hooks/pre-pkg/06-shlib-provides.sh | 35 +++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/common/hooks/pre-pkg/06-shlib-provides.sh b/common/hooks/pre-pkg/06-shlib-provides.sh
index cdc94de3bc9..f7c714a3e5c 100644
--- a/common/hooks/pre-pkg/06-shlib-provides.sh
+++ b/common/hooks/pre-pkg/06-shlib-provides.sh
@@ -42,6 +42,39 @@ collect_sonames() {
rm -f ${_tmpfile}
}
+# verify that shlibs listed in common/shlibs are actually provided by the package
+verify_sonames() {
+ local _destdir="$1" broken= mapshlibs pkgshlibs mappedshlibs
+ mapshlibs="${XBPS_COMMONDIR}/shlibs"
+
+ if [ ! -f ${_destdir}/shlib-provides ]; then
+ return 0
+ fi
+
+ pkgshlibs="$(cat ${_destdir}/shlib-provides)"
+
+ mappedshlibs="$(grep -E "[[:blank:]]${pkgname}" $mapshlibs)" || return 0
+
+ set -- $mappedshlibs
+ while [ $# -gt 0 ]
+ do
+ if [ "$($XBPS_UHELPER_CMD getpkgname "$2")" = ${pkgname} ]; then
+ if [[ "${pkgshlibs}" != *"$1"* ]]; then
+ msg_red "shlib '$1' isn't in shlib-provides for ${pkgname}\n"
+ broken=1
+ fi
+
+ file="$(find ${_destdir} -name "$1")"
+ if [ -z "$file" ]; then
+ msg_red "file for shlib '$1' isn't in ${pkgname}\n"
+ fi
+ fi
+ shift 2
+ done
+
+ return $broken
+}
+
hook() {
local _destdir32=${XBPS_DESTDIR}/${pkgname}-32bit-${version}
@@ -53,4 +86,6 @@ hook() {
collect_sonames ${PKGDESTDIR}
# 32bit pkg
collect_sonames ${_destdir32}
+
+ verify_sonames ${PKGDESTDIR} || return 1
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (2 preceding siblings ...)
2020-11-21 1:54 ` [PR PATCH] [Updated] " ericonr
@ 2020-11-21 1:55 ` ericonr
2020-11-21 1:55 ` ericonr
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-11-21 1:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 204 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#issuecomment-731488809
Comment:
How do I get the current package's name from inside a template?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (3 preceding siblings ...)
2020-11-21 1:55 ` ericonr
@ 2020-11-21 1:55 ` ericonr
2020-11-21 2:41 ` ahesford
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-11-21 1:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 200 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#issuecomment-731488809
Comment:
How do I get the current package's name from inside a hook?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (4 preceding siblings ...)
2020-11-21 1:55 ` ericonr
@ 2020-11-21 2:41 ` ahesford
2020-11-21 22:17 ` [PR REVIEW] " Chocimier
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ahesford @ 2020-11-21 2:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#issuecomment-731495022
Comment:
I haven't looked at the implementation details, but this is a great idea. Failing when `common/shlibs` declares something not provided by the package will help catch shlib changes that would otherwise fly under the radar and break dependencies.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR REVIEW] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (5 preceding siblings ...)
2020-11-21 2:41 ` ahesford
@ 2020-11-21 22:17 ` Chocimier
2020-11-21 22:17 ` Chocimier
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Chocimier @ 2020-11-21 22:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#discussion_r528247914
Comment:
There is third optional column in shlibs. 99-pkglint.sh use `grep shlibs -e ... | while read conflictFile conflictPkg ignore; do ...` to handle that. And then interpretation of third column is needed for glibc.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR REVIEW] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (7 preceding siblings ...)
2020-11-21 22:17 ` Chocimier
@ 2020-11-21 22:17 ` Chocimier
2022-04-30 2:14 ` github-actions
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Chocimier @ 2020-11-21 22:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#discussion_r528248774
Comment:
This need be a loop over shlib-provides lines to avoid matching substrings.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR REVIEW] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (6 preceding siblings ...)
2020-11-21 22:17 ` [PR REVIEW] " Chocimier
@ 2020-11-21 22:17 ` Chocimier
2020-11-21 22:17 ` Chocimier
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Chocimier @ 2020-11-21 22:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 200 bytes --]
New review comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#discussion_r528249158
Comment:
Do we want it to run when `noshlibprovides` is set?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (8 preceding siblings ...)
2020-11-21 22:17 ` Chocimier
@ 2022-04-30 2:14 ` github-actions
2022-05-14 2:16 ` [PR PATCH] [Closed]: " github-actions
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-04-30 2:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#issuecomment-1113893086
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Closed]: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (9 preceding siblings ...)
2022-04-30 2:14 ` github-actions
@ 2022-05-14 2:16 ` github-actions
2022-08-15 2:13 ` github-actions
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-05-14 2:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
There's a closed pull request on the void-packages repository
[WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
https://github.com/void-linux/void-packages/pull/26547
Description:
common/shlibs match.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (10 preceding siblings ...)
2022-05-14 2:16 ` [PR PATCH] [Closed]: " github-actions
@ 2022-08-15 2:13 ` github-actions
2022-11-13 8:49 ` github-actions
2022-11-28 2:04 ` [PR PATCH] [Closed]: " github-actions
13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-08-15 2:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#issuecomment-1214538312
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (11 preceding siblings ...)
2022-08-15 2:13 ` github-actions
@ 2022-11-13 8:49 ` github-actions
2022-11-28 2:04 ` [PR PATCH] [Closed]: " github-actions
13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-11-13 8:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/26547#issuecomment-1312675212
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Closed]: [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
` (12 preceding siblings ...)
2022-11-13 8:49 ` github-actions
@ 2022-11-28 2:04 ` github-actions
13 siblings, 0 replies; 15+ messages in thread
From: github-actions @ 2022-11-28 2:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
There's a closed pull request on the void-packages repository
[WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
https://github.com/void-linux/void-packages/pull/26547
Description:
common/shlibs match.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2022-11-28 2:04 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21 1:38 [PR PATCH] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and ericonr
2020-11-21 1:42 ` [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match ericonr
2020-11-21 1:42 ` ericonr
2020-11-21 1:54 ` [PR PATCH] [Updated] " ericonr
2020-11-21 1:55 ` ericonr
2020-11-21 1:55 ` ericonr
2020-11-21 2:41 ` ahesford
2020-11-21 22:17 ` [PR REVIEW] " Chocimier
2020-11-21 22:17 ` Chocimier
2020-11-21 22:17 ` Chocimier
2022-04-30 2:14 ` github-actions
2022-05-14 2:16 ` [PR PATCH] [Closed]: " github-actions
2022-08-15 2:13 ` github-actions
2022-11-13 8:49 ` github-actions
2022-11-28 2:04 ` [PR PATCH] [Closed]: " github-actions
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).