aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-08-31 01:49:54 -0400
committerB. Watson <urchlay@slackware.uk>2026-08-31 01:49:54 -0400
commit97fa708ecc14ca8a2136b586b7eca113b7020fd3 (patch)
tree1edf6b390ce24cef554ba6f73a527602eaac6755
parent2b3e9b84ad566f3c45d2628b6f9114ba70751b25 (diff)
downloadsbo-maintainer-tools-97fa708ecc14ca8a2136b586b7eca113b7020fd3.tar.gz
sbopkglint: improve library path checking for .pc files.HEAD0.9.8master
-rw-r--r--NEWS10
-rwxr-xr-xsbolint4
-rw-r--r--sbopkglint.d/95-pkgconfig.t.sh24
3 files changed, 35 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index b87e09c..92c9532 100644
--- a/NEWS
+++ b/NEWS
@@ -3,12 +3,22 @@ user-visible changes between releases.
New in 0.9.8:
=============
+
+sbolint:
- Python hashed URL check now catches pypi.python.org, too.
- Python hashed URL check demoted to a note (too many of them in
the repo currently).
- Icon cache check now catches gtk-update-icon-cache in doinst.sh,
even if it's not called by its full path.
+sbopkglint:
+- .pc files containing relative paths are handled better.
+- .pc files can now have /usr/lib*/gcc/*-slackware-linux/ as
+ library paths. This is unusual but harmless thing for a .pc
+ file to do.
+- .pc files can now have /lib or /lib64 as library paths, even
+ if the package doesn't contain either dir.
+
New in 0.9.7.1:
===============
diff --git a/sbolint b/sbolint
index 07d8289..5f13c27 100755
--- a/sbolint
+++ b/sbolint
@@ -1848,14 +1848,12 @@ sub check_doinst {
if(!$pp_defined) {
log_error("$file:$lineno: 'preserve_perms' function used, but not defined.");
}
- } elsif(m,-e\s+(\/)?usr/share/icons/\S*icon-theme\.cache,) {
- #warn "got here $lineno: $_";
+ } elsif(m,-e\s+(\/usr)?\S*icon-theme\.cache,) {
if(defined $1) {
log_error("$file:$lineno: bad icon cache check (/usr/, should be usr/)");
}
$icon_theme_check = $lineno;
} elsif(m,^[^[#]*gtk-update-icon-cache,) {
- #warn "got here $lineno: $_";
if(!$icon_theme_check) {
log_error("$file:$lineno: icon cache created unconditionally!");
}
diff --git a/sbopkglint.d/95-pkgconfig.t.sh b/sbopkglint.d/95-pkgconfig.t.sh
index ac0f182..cd77889 100644
--- a/sbopkglint.d/95-pkgconfig.t.sh
+++ b/sbopkglint.d/95-pkgconfig.t.sh
@@ -27,10 +27,13 @@ check_libinc_dir() {
local flag=$2
local file=$3
local dir
+ local dir_rp
#echo "===> $flag"
dir="$( printf "%s" $flag | tail -c+3 )"
+ dir_rp="$( realpath -m "$dir" )"
+
case "$dir" in
/usr/local*)
warn "$file references $type dir $dir; /usr/local is incorrect"
@@ -38,6 +41,27 @@ check_libinc_dir() {
;;
esac
+ # 20260831 bkw: allow some common lib and include paths even if
+ # they're not in the package. scafacos was complaining:
+ # --- ERR: usr/lib64/pkgconfig/scafacos.pc references library dir /usr/lib64/gcc/x86_64-slackware-linux/11.2.0, but it's missing from the package
+ # ...even though it's a valid path on Slackware. also it was
+ # bitching about /lib/../lib64/, which isn't in the package, but
+ # shoud be allowed (as it's just /lib64).
+
+ # note that realpath gets rid of any trailing slash(es), so
+ # /usr/include/ would come out /usr/include
+ if [ "$type" = "include" ]; then
+ case "$dir_rp" in
+ /usr/include) return ;; # always OK (shouldn't be mentioned in a .pc tho)
+ esac
+ elif [ "$type" = "library" ]; then
+ case "$dir_rp" in
+ /lib|/lib64|/usr/lib|/usr/lib64) return ;;
+ /usr/lib/gcc/*-slackware-linux/*) return ;;
+ /usr/lib64/gcc/*-slackware-linux/*) return ;;
+ esac
+ fi
+
[ -d $PKG/$dir ] || warn "$file references $type dir $dir, but it's missing from the package"
}