Compare commits
4 Commits
80e7787ec6
...
fc18c7035b
Author | SHA1 | Date |
---|---|---|
Mark Wielaard | fc18c7035b | |
Michal Kolar | f41c299cbe | |
Mark Wielaard | 2536f753c8 | |
Mark Wielaard | 99656c6dcd |
|
@ -14,3 +14,4 @@
|
|||
/dwz-20210121.tar.xz
|
||||
/dwz-20210122.tar.xz
|
||||
/dwz-0.14.tar.xz
|
||||
/dwz-0.15.tar.xz
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
commit a57177980a05f0f84bf290ab7b68f73c0f78053f
|
||||
Author: Martin Liška <mliska@suse.cz>
|
||||
Date: Wed Sep 7 21:55:03 2022 +0200
|
||||
|
||||
Use grep -E instead of egrep.
|
||||
|
||||
egrep is obsoleted starting with GNU Grep 3.8.
|
||||
|
||||
diff --git a/contrib/bytes-per-die.sh b/contrib/bytes-per-die.sh
|
||||
index 969f733..fda8998 100755
|
||||
--- a/contrib/bytes-per-die.sh
|
||||
+++ b/contrib/bytes-per-die.sh
|
||||
@@ -3,7 +3,7 @@
|
||||
f="$1"
|
||||
|
||||
size=$(readelf -WS "$f" \
|
||||
- | egrep "[ \t]\.debug_info" \
|
||||
+ | grep -E "[ \t]\.debug_info" \
|
||||
| sed 's/.*\.debug_info//' \
|
||||
| awk '{print $4}')
|
||||
size=$((16#$size))
|
||||
diff --git a/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh b/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
|
||||
index a3395a7..ee31359 100644
|
||||
--- a/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
|
||||
+++ b/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
|
||||
@@ -7,7 +7,7 @@
|
||||
1 2 \
|
||||
2> dwz.err
|
||||
|
||||
-if egrep -q "Compressing (1|2)$" dwz.err; then
|
||||
+if grep -Eq "Compressing (1|2)$" dwz.err; then
|
||||
exit 1
|
||||
fi
|
||||
|
23
dwz.spec
23
dwz.spec
|
@ -1,16 +1,14 @@
|
|||
Summary: DWARF optimization and duplicate removal tool
|
||||
Name: dwz
|
||||
Version: 0.14
|
||||
Release: 7%{?dist}
|
||||
Version: 0.15
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+ and GPLv3+
|
||||
Source: %{name}-0.14.tar.xz
|
||||
URL: https://sourceware.org/dwz/
|
||||
Source: https://sourceware.org/ftp/dwz/releases/%{name}-%{version}.tar.xz
|
||||
BuildRequires: gcc, gcc-c++, gdb, elfutils-libelf-devel, dejagnu
|
||||
BuildRequires: make elfutils
|
||||
BuildRequires: make elfutils xxhash-devel
|
||||
|
||||
# Patches
|
||||
Patch1: dwz-0.14-binutils-Wn.patch
|
||||
Patch2: dwz-0.14-binutils-readelf-alt.patch
|
||||
Patch3: dwz-0.14-gdb-add-index.patch
|
||||
|
||||
%description
|
||||
The dwz package contains a program that attempts to optimize DWARF
|
||||
|
@ -33,7 +31,7 @@ rm -rf %{buildroot}
|
|||
%make_install prefix=%{_prefix} mandir=%{_mandir} bindir=%{_bindir}
|
||||
|
||||
%check
|
||||
make check
|
||||
CFLAGS="" LDFLAGS="" make check
|
||||
|
||||
%files
|
||||
%license COPYING COPYING3 COPYING.RUNTIME
|
||||
|
@ -41,6 +39,15 @@ make check
|
|||
%{_mandir}/man1/dwz.1*
|
||||
|
||||
%changelog
|
||||
* Thu Nov 3 2022 Mark Wielaard <mjw@fedoraproject.org> 0.15-1
|
||||
- update to a new upstream release
|
||||
|
||||
* Tue Oct 25 2022 Mark Wielaard <mjw@fedoraproject.org> 0.14-9
|
||||
- Add dwz-0.14-grep-E.patch
|
||||
|
||||
* Tue Oct 25 2022 William Cohen <wcohen@redhat.com> 0.14-8
|
||||
- Added URL and complete path to source tarball to dwz.spec.
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (dwz-0.14.tar.xz) = 62c39f79723ca99305dbb08d1d24a17699b9a84dd98c30904103da116831b1253bf1edbfb905c76fdc4d48305bd1ea0046314c5619209c40a1e624b8ae4908b1
|
||||
SHA512 (dwz-0.15.tar.xz) = 43eb4b08c1f529859dc3466697d5ad7e172d6efbf21409530a67a2492ae4acc3734d5134bbd6e07c089ecc358d915871b13e22f6e4f1dd4c3af19ef804f8fcc5
|
||||
|
|
|
@ -29,7 +29,7 @@ export TESTVERSION=1.0
|
|||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE something.c cmd.txt
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE testcase.c cmds
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
b f
|
||||
b 19
|
||||
r
|
||||
p x
|
||||
p/x var
|
|
@ -29,32 +29,34 @@
|
|||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' `which dwz`)}"
|
||||
REQUIRES="$PACKAGE gcc glibc gdb"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm gcc
|
||||
rlAssertRpm gdb
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "cp something.c cmd.txt $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "gcc -g -O2 something.c -o something.out"
|
||||
rlRun "cp something.out something.dwz"
|
||||
rlPhaseEnd
|
||||
rlPhaseStartSetup
|
||||
rlShowRunningKernel
|
||||
rlAssertRpm --all
|
||||
rlRun "TmpDir=\$(mktemp -d)"
|
||||
rlRun "cp -r testcase.c cmds $TmpDir"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "gcc -g -O0 -o testcase testcase.c"
|
||||
rlRun "cp testcase testcase.dwz"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "no crash + saved space"
|
||||
rlRun "dwz something.dwz"
|
||||
rlRun "[[ $(wc -c <something.out) -gt $(wc -c <something.dwz) ]]"
|
||||
rlPhaseEnd
|
||||
rlPhaseStartTest
|
||||
rlRun "dwz testcase.dwz"
|
||||
rlRun "BYTES_BASE_FILE=`wc -c <testcase`"
|
||||
rlRun "BYTES_DWZED_FILE=`wc -c <testcase.dwz`"
|
||||
[ $BYTES_DWZED_FILE -gt $BYTES_BASE_FILE ] && rlFail "DWZed file should not be greater than the original file."
|
||||
rlRun "gdb --command=cmds --quiet --batch testcase.dwz |& tee $TmpDir/testcase.log; test \${PIPESTATUS[0]} -eq 0"
|
||||
rlRun "grep 'hello, world' $TmpDir/testcase.log"
|
||||
rlRun "grep '\$1 = -1' $TmpDir/testcase.log"
|
||||
rlRun "grep '\$2 = 0x2a' $TmpDir/testcase.log"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "can we debug it?"
|
||||
rlRun "gdb -x cmd.txt -batch -q ./something.dwz > log 2>&1"
|
||||
rlRun "[[ $(grep -c 'hello, world' log) -eq 2 ]]"
|
||||
rlAssertGrep '$1 = -1' log
|
||||
rlAssertGrep '$2 = 0x2a' log
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
Loading…
Reference in New Issue