From 6168209a85513616e64764bb0fa335742b451f0b6369bc9995ff277a41283c24 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 28 Jul 2022 13:39:51 +0000 Subject: [PATCH] Accepting request 991564 from home:rhabacker:branches:windows:mingw:win64 - Add 'arch-independent-package-contains-binary-or-object' filter also for static libraries (boo#1201173) - When scanning libraries exclude non real dll file names e.g. '%s.dll' - Add missing runtime dependencies (boo#1188144) - Use newer $host-pkgconf - Fix using undefined STRINGS env variable OBS-URL: https://build.opensuse.org/request/show/991564 OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=141 --- mingw64-filesystem.changes | 14 ++++++++++++++ mingw64-filesystem.spec | 7 +++++++ mingw64-find-provides.sh | 4 ++-- mingw64-find-requires.sh | 11 ++++++----- mingw64-rpmlintrc | 4 ++-- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/mingw64-filesystem.changes b/mingw64-filesystem.changes index 1e7ab06..964cf13 100644 --- a/mingw64-filesystem.changes +++ b/mingw64-filesystem.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Jul 28 09:03:20 UTC 2022 - Ralf Habacker + +- Add 'arch-independent-package-contains-binary-or-object' filter also + for static libraries (boo#1201173) +- When scanning libraries exclude non real dll file names e.g. '%s.dll' + +------------------------------------------------------------------- +Mon Jul 25 07:21:16 UTC 2022 - Ralf Habacker + +- Add missing runtime dependencies (boo#1188144) +- Use newer $host-pkgconf +- Fix using undefined STRINGS env variable + ------------------------------------------------------------------- Wed Jul 20 07:11:15 UTC 2022 - Ralf Habacker diff --git a/mingw64-filesystem.spec b/mingw64-filesystem.spec index 540e177..b62ac9c 100644 --- a/mingw64-filesystem.spec +++ b/mingw64-filesystem.spec @@ -70,10 +70,17 @@ Provides: mingw64(dwrite.dll) Provides: mingw64(dxgi.dll) Provides: mingw64(ncrypt.dll) Provides: mingw64(wtsapi32.dll) +Requires: coreutils +Requires: findutils +Requires: gawk +Requires: grep +Requires: mingw64-cross-binutils Requires: mingw64-cross-breakpad-tools +Requires: mingw64-cross-pkgconf Requires: python3 Requires: rpm Requires: rpmlint-mini +Requires: sed BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch #!BuildIgnore: post-build-checks diff --git a/mingw64-find-provides.sh b/mingw64-find-provides.sh index 8e6462c..f0fb353 100644 --- a/mingw64-find-provides.sh +++ b/mingw64-find-provides.sh @@ -26,7 +26,7 @@ done for g in $pcs; do [ ! -f "$g" ] && continue - PKG_CONFIG_PATH="${g%/*}" "$host-pkg-config" --print-errors --print-provides "$g" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }' + PKG_CONFIG_PATH="${g%/*}" "$host-pkgconf" --print-errors --print-provides "$g" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }' done | sort -u for h in $libs; do @@ -38,4 +38,4 @@ done for h in $cmakes; do [ ! -f "$h" ] && continue echo $h | /usr/lib/rpm/mingw64-cmake.prov -done \ No newline at end of file +done diff --git a/mingw64-find-requires.sh b/mingw64-find-requires.sh index d5006f0..bf2eb8e 100644 --- a/mingw64-find-requires.sh +++ b/mingw64-find-requires.sh @@ -23,6 +23,7 @@ if [ -n "$1" ]; then fi [ -z "$OBJDUMP" ] && OBJDUMP="$host-objdump" +[ -z "$STRINGS" ] && STRINGS="$host-strings" # Get the list of files. @@ -113,7 +114,7 @@ if [ -n "$scan_implibs" ]; then implibs=$(echo "$filelist" | grep '\.a$') for f in $implibs; do [ ! -f "$f" ] && continue - "$STRINGS" "$f" | grep '\.dll$' | + "$STRINGS" "$f" | grep '\.dll$' | grep -v '[%$&#]' | tr "[:upper:]" "[:lower:]" | grep -Ev "$exclude_pattern" | sed 's/\(.*\)/'"$target"'(\1)/' @@ -123,14 +124,14 @@ fi ( for g in $pcs; do dirname="${g%/*}" - PKG_CONFIG_PATH="$dirname" "$host-pkg-config" --print-errors --print-requires "$g" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }' - PKG_CONFIG_PATH="$dirname" "$host-pkg-config" --print-errors --print-requires-private "$g" | grep -Ev "$exclude_pattern" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }' - for h in $(PKG_CONFIG_PATH="$dirname" "$host-pkg-config" --libs-only-l "$g" | sed 's#^\-l##g;s# \-l# #g'); do + PKG_CONFIG_PATH="$dirname" "$host-pkgconf" --print-errors --print-requires "$g" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }' + PKG_CONFIG_PATH="$dirname" "$host-pkgconf" --print-errors --print-requires-private "$g" | grep -Ev "$exclude_pattern" | awk '{ print "'"$target"'(pkg:"$1")", $2, $3 }' + for h in $(PKG_CONFIG_PATH="$dirname" "$host-pkgconf" --libs-only-l "$g" | sed 's#^\-l##g;s# \-l# #g'); do echo "$target(lib:$h)" done done for k in $configs; do - for j in $(PKG_CONFIG="$host-pkg-config" "$k" --libs); do + for j in $(PKG_CONFIG="$host-pkgconf" "$k" --libs); do case "$j" in -l*) echo "$j" | sed 's#\-l##g' | grep -Ev "$exclude_pattern" | awk '{ print "'"$target"'(lib:"$1")" }' diff --git a/mingw64-rpmlintrc b/mingw64-rpmlintrc index 2f881f5..4a4f953 100644 --- a/mingw64-rpmlintrc +++ b/mingw64-rpmlintrc @@ -9,8 +9,8 @@ addFilter ("^mingw64-.*filelist-forbidden-fhs23 /usr/x86_64-w64-mingw32") # why, but we permit this for now. addFilter ("^mingw64-.*spurious-executable-perm.*\.dll\.a$") -# *.dll.a files are permitted arch-independent objects. -addFilter ("^mingw64-.*arch-independent-package-contains-binary-or-object.*\.dll\.a$") +# *.dll.a and *.a files are permitted arch-independent objects. +addFilter ("^mingw64-.*arch-independent-package-contains-binary-or-object.*\.a$") addFilter ("^mingw64-.*mono-versioned-deps-missing")