From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match.
Date: Sat, 21 Nov 2020 02:54:39 +0100 [thread overview]
Message-ID: <20201121015439.uXEBbiG9EYzHeRkyJRFWnph_w8wCP22GpLLBoUyn8T0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26547@inbox.vuxu.org>
[-- 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
}
next prev parent reply other threads:[~2020-11-21 1:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20201121015439.uXEBbiG9EYzHeRkyJRFWnph_w8wCP22GpLLBoUyn8T0@z \
--to=ericonr@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).