Accepting request 993386 from home:rhabacker:branches:windows:mingw:win64:debuginfofix

- Update to 20220805
- Fix for generating the source file list for the debug package (boo#1201107).
  * Added the script 'mingw-objdump-srcfiles' to determine the
    source files used by the package in question.
  * The gawk script is based on a perl script from jengelh, which was
    not adopted due to an additional runtime dependency. 
  * With this change, *.sym files are no longer included in generated
    debug packages. 
  * The now obsolete runtime dependency to mingw64-cross-breakpad-tools
    has been removed
- Exclude 'mlang.dll' from automatic runtime library detection required
  for win_iconv package
- Fix spelling in *.changes  
- 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
- Update to 20220801
- Fetch real used shared library name from import libraries to avoid
  file name generation errors, for example with mingw64-glib2
- Scan all archives for shared library names as packages may not use
  the default import library extension
- Fix finding qm files for KDE Frameworks >= 5.76 (taken from rpm-4.14.1)
- Update to 20220620
- Add more provides required by libqt5 related packages
- Add optional support for excluding runtime DLL dependencies to avoid
  rebuilding the whole project, see macro %_mingw64_find_requires_exclude
  in macros.mingw64 for details
  
- Update to 20220524
- On finding provides and requirements do not generate temporary 
  files in the global temporary directory (boo#1182356)
- Add optional support to add runtime dependencies for import
  libraries, see macros.mingw64 for details (boo#1194430)
- Fix warning 'file format not recognized' in mingw64-find-requires.sh
  when parsing xxx-config files
- Change all version comparisons for Tumbleweed to >= 1550 (instead
  of == 1550). Anything in Tumbleweed counts for current Tumbleweed
  plus future CODE branches. Additionally, the Tumbleweed
  suse_version code is not chiseled in stone.
- Fix install path and file format for global rpmlint config file on
  openSUSE_Tumbleweed (bug boo#1190304, boo#1190438)
- Use rpmlint-mini also on Leap 15.x to fix the conflict breakage
- Be more verbose when version in generated xxxConfigVersion.cmake
  files is empty (see https://build.opensuse.org/request/show/915515)
- Sync with mingw32 variant
- Force rpmlint use and avoid using of rpmlint-mini
-  Add provides for bcrypt.dll required by mingw64-gdb 10.2
- Add provides for ncrypt.dll required by mingw64-gnutls clients
- Move RPM macros to %_rpmmacrodir (boo#1185671)
- Move profile.d entries to %_distconfdir
- Use %_fileattrsdir macro
- Update to 20201105
- Add macro _mingw64_create_macro_links
- Add macro _mingw64_gdb and command line wrapper /usr/bin/mingw64-gdb
- In mingw64-scripts support rpm macro processing to
  https://rpm.org/user_doc/macros.htm
- Add macro _mingw64_gdb and command line wrapper /usr/bin/mingw64-gdb
- Update to 20201017
- Fix bug not keeping quotes in bash arguments provided to mingw64-scripts.sh
  which is for example required to specify a different cmake generator 
- Fix architecture in generating cmake provides
- Update to 20200825
- Fix
  * W: non-etc-or-var-file-marked-as-conffile /usr/libexec/rpm/fileattrs/mingw64-cmake.attr
  * W: non-etc-or-var-file-marked-as-conffile /usr/libexec/rpm/mingw64-cmake.prov
  * W: script-without-shebang /usr/libexec/rpm/fileattrs/mingw64-cmake.attr
  * W: non-standard-group Development/Libraries
  * installing mingw64-scripts on Tumbleweed
  * not using present rpmlint config for building this package
- Add missing Fortran case into macros.mingw64* (boo#1173990)
- Fix warning about non standard group (boo#1173189)
- Make cmake package support to be more in sync with native package
  * Add mingw64-cmake.prov and mingw64-cmake.attr ported from native
    cmake package to support generating mingw64(cmake:xxx) dependencies
    required by newer KDE Frameworks 5 and other packages.
  * Move out cmake related macros from macros.mingw64 into macros.mingw64-cmake
  * Define macro _mingw64_cmake_build
  * Fix deprecated call to %make_jobs
  CMake support may be better located in a package named mingw64-cross-cmake
  but need to be used here until the deprecated dependency generator provided
  by this package is converted to sets of *.attr/*.prov files.
- Add additional man languages 'id' and 'uk' used by KDE Frameworks5 packages
- Process debuginfo in a reproducible way (boo#1041090)
- Revert -lssp 
- Add -lssp to the link flags, otherwise building of some packages
  (like mingw64-cairo) will be aborted with the error 'undefined
  reference to `__memcpy_chk`'. This library seems not be added by
  gcc 9.2 automatically.
- add macro _mingw64_ldflags_bootstrap for bootstrap packages
- Add -fstack-protector to LDFLAGS 
- disable default debug package only if the mingw debug macro is used
- inital package for Factory submission

OBS-URL: https://build.opensuse.org/request/show/993386
OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win64/mingw64-filesystem?expand=0&rev=143
This commit is contained in:
Ralf Habacker 2022-08-06 11:04:47 +00:00 committed by Git OBS Bridge
parent 6168209a85
commit 218b23738b
5 changed files with 72 additions and 19 deletions

29
mingw-objdump-srcfiles Normal file
View File

@ -0,0 +1,29 @@
#!/bin/sh
# SPDX-FileCopyrightText: 2022 Jan Engelhardt <jengelh@inai.de>
# SPDX-FileCopyrightText: 2022 Ralf Habacker <ralf.habacker@freenet.de>
# SPDX-License-Identifier: GPL-2.0-or-later
# get source filenames from dwarf debug sections
gawk '
BEGIN { state = 0 }
state == 1 && $2 ~ /DW_AT_name/ {
atname = $NF
}
state == 1 && $2 ~ /DW_AT_comp_dir/ {
atdir = $NF
if (atdir != "" && atname != "") {
print atdir "/" atname
state = 0
}
}
state == 0 && $0 ~ /DW_TAG_compile_unit/ {
state = 1
atdir = ""
atname = ""
}
'

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu Jul 28 15:22:52 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- Update to 20220805
- Fix for generating the source file list for the debug package (boo#1201107).
* Added the script 'mingw-objdump-srcfiles' to determine the
source files used by the package in question.
* The gawk script is based on a perl script from jengelh, which was
not adopted due to an additional runtime dependency.
* With this change, *.sym files are no longer included in generated
debug packages.
* The now obsolete runtime dependency to mingw64-cross-breakpad-tools
has been removed
- Exclude 'mlang.dll' from automatic runtime library detection required
for win_iconv package
- Fix spelling in *.changes
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 28 09:03:20 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de> Thu Jul 28 09:03:20 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
@ -17,7 +34,7 @@ Wed Jul 20 07:11:15 UTC 2022 - Ralf Habacker <ralf.habacker@freenet.de>
- Update to 20220801 - Update to 20220801
- Fetch real used shared library name from import libraries to avoid - Fetch real used shared library name from import libraries to avoid
file name generation errors, for example with mingw32-glib2 file name generation errors, for example with mingw64-glib2
- Scan all archives for shared library names as packages may not use - Scan all archives for shared library names as packages may not use
the default import library extension the default import library extension

View File

@ -31,7 +31,7 @@
%define _rpmmacrodir %{_sysconfdir}/rpm %define _rpmmacrodir %{_sysconfdir}/rpm
%endif %endif
Name: mingw64-filesystem Name: mingw64-filesystem
Version: 20220801 Version: 20220805
Release: 0 Release: 0
Summary: MinGW base filesystem and environment Summary: MinGW base filesystem and environment
License: GPL-2.0-or-later License: GPL-2.0-or-later
@ -53,6 +53,9 @@ Source12: mingw64-cmake.prov
Source13: mingw64-cmake.attr Source13: mingw64-cmake.attr
Source14: macros.mingw64-cmake Source14: macros.mingw64-cmake
Source15: mingw64-filesystem-rpmlintrc Source15: mingw64-filesystem-rpmlintrc
Source16: mingw-objdump-srcfiles
# add excluded system libraries to mingw64-find-requires.sh
# TODO: The following provides could be removed after all packages has been rebuild
Provides: mingw64(bcrypt.dll) Provides: mingw64(bcrypt.dll)
Provides: mingw64(dbghelp.dll) Provides: mingw64(dbghelp.dll)
Provides: mingw64(mpr.dll) Provides: mingw64(mpr.dll)
@ -200,6 +203,8 @@ while read LANG ; do
done done
done < %{SOURCE11} done < %{SOURCE11}
install -m 0755 %{SOURCE16} %{buildroot}%{_bindir}/x86_64-w64-mingw32-objdump-srcfiles
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING %doc COPYING
@ -218,6 +223,7 @@ done < %{SOURCE11}
%{_rpmconfigdir}/mingw64-cmake.prov %{_rpmconfigdir}/mingw64-cmake.prov
%{_fileattrsdir}/mingw64-cmake.attr %{_fileattrsdir}/mingw64-cmake.attr
%{_bindir}/mingw64-* %{_bindir}/mingw64-*
%{_bindir}/x86_64-w64-mingw32-*
%{_libexecdir}/mingw64-scripts %{_libexecdir}/mingw64-scripts
%{_prefix}/x86_64-w64-mingw32/ %{_prefix}/x86_64-w64-mingw32/
%{_rpmconfigdir}/mingw64-* %{_rpmconfigdir}/mingw64-*

View File

@ -23,7 +23,6 @@ SOURCEFILE="$BUILDDIR/$target-debugsources.list"
srcdir=`realpath $PWD` srcdir=`realpath $PWD`
ROOT_DIR="/usr/$host/sys-root/mingw" ROOT_DIR="/usr/$host/sys-root/mingw"
SYMBOL_DIR="${ROOT_DIR}/symbols"
SOURCE_DIR="${ROOT_DIR}/src" SOURCE_DIR="${ROOT_DIR}/src"
DEBUGSOURCE_DIR="${SOURCE_DIR}/debug" DEBUGSOURCE_DIR="${SOURCE_DIR}/debug"
@ -41,14 +40,8 @@ do
echo extracting debug info from $f echo extracting debug info from $f
# breakpad symbols # grep all listed source files belonging to this package into temporary source file list.
symfile=`"$host-gen_sym_files" "$f" "$RPM_BUILD_ROOT$SYMBOL_DIR"` "$host-objdump" -Wi "$f" | "$host-objdump-srcfiles" | grep $srcdir >>"$SOURCEFILE.tmp"
echo $symfile
# grep all listed source files belonging to this package into temporary source file list
cat $symfile | grep "FILE" | cut -d' ' -f3 | grep $srcdir >> $SOURCEFILE.tmp
# remap file path in symbol file to src debug location
# we remap all files to make finding src files from other packages possible
sed -i "s,$BUILDDIR,$DEBUGSOURCE_DIR,g" $symfile
"$host-objcopy" --only-keep-debug "$f" "$f.debug" || : "$host-objcopy" --only-keep-debug "$f" "$f.debug" || :
pushd `dirname $f` pushd `dirname $f`
@ -67,10 +60,6 @@ find $RPM_BUILD_ROOT -type f \
| sort \ | sort \
| sed -n -e "s#^$RPM_BUILD_ROOT##p" >"$BUILDDIR/$target-debugfiles.list" | sed -n -e "s#^$RPM_BUILD_ROOT##p" >"$BUILDDIR/$target-debugfiles.list"
if [ -e "$RPM_BUILD_ROOT/$SYMBOL_DIR" ]; then
echo "$SYMBOL_DIR" >>"$BUILDDIR/$target-debugfiles.list"
fi
echo creating debugsource file structure echo creating debugsource file structure
destdir=${RPM_BUILD_ROOT}${DEBUGSOURCE_DIR} destdir=${RPM_BUILD_ROOT}${DEBUGSOURCE_DIR}
@ -91,9 +80,6 @@ do
fi fi
echo copying $f to $o echo copying $f to $o
install -m 644 $f $o install -m 644 $f $o
# create debugsource.list
# we do not add each single file, see below
# echo $o | sed "s,${RPM_BUILD_ROOT},,g" >> $SOURCEFILE
done done
rm $SOURCEFILE.tmp rm $SOURCEFILE.tmp

View File

@ -31,16 +31,24 @@ filelist=`sed "s/['\"]/\\\&/g"`
libs_to_exclude+=" libs_to_exclude+="
advapi32 advapi32
bcrypt
cfgmgr32 cfgmgr32
comctl32 comctl32
comdlg32 comdlg32
crypt32 crypt32
d2d1
d3d11
d3d12
d3d8 d3d8
d3d9 d3d9
dbghelp
dcomp
ddraw ddraw
dnsapi dnsapi
dsound dsound
dwmapi dwmapi
dwrite
dxgi
dxva2 dxva2
evr evr
gdi32 gdi32
@ -53,6 +61,8 @@ libs_to_exclude+="
ksuser ksuser
mf mf
mfplat mfplat
mlang
mpr
mpr mpr
mscms mscms
mscoree mscoree
@ -62,8 +72,10 @@ libs_to_exclude+="
msvcr90 msvcr90
msvcrt msvcrt
mswsock mswsock
ncrypt
netapi32 netapi32
odbc32 odbc32
odbccp32
ole32 ole32
oleacc oleacc
oleaut32 oleaut32
@ -75,14 +87,17 @@ libs_to_exclude+="
shell32 shell32
shlwapi shlwapi
user32 user32
userenv
usp10 usp10
uxtheme
version version
winhttp
wininet wininet
winmm winmm
wldap32 wldap32
ws2_32 ws2_32
wsock32 wsock32
winhttp wtsapi32
" "
exclude_pattern="" exclude_pattern=""