forked from rpms/elfutils
		
	import UBI elfutils-0.192-5.el9
This commit is contained in:
		
							parent
							
								
									27c802a03f
								
							
						
					
					
						commit
						56e496cd48
					
				| @ -1 +1 @@ | |||||||
| 651aa2b7390aeba178be2ceefd4c2eb42e783e97 SOURCES/elfutils-0.191.tar.bz2 | 2dbae5652dcf5927213df0058969a62070dfa56e SOURCES/elfutils-0.192.tar.bz2 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1 +1 @@ | |||||||
| SOURCES/elfutils-0.191.tar.bz2 | SOURCES/elfutils-0.192.tar.bz2 | ||||||
|  | |||||||
							
								
								
									
										26
									
								
								SOURCES/elfutils-0.192-fix-configure-conditional.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								SOURCES/elfutils-0.192-fix-configure-conditional.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | |||||||
|  | From fb4753feb0ed7e3387f52b54bb02c6c74aac6a3e Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Aaron Merey <amerey@redhat.com> | ||||||
|  | Date: Tue, 29 Oct 2024 14:54:10 -0400 | ||||||
|  | Subject: [PATCH] Fix ENABLE_DEBUGINFOD_IMA_VERIFICATION always | ||||||
|  | evaluating to false | ||||||
|  | 
 | ||||||
|  | ---
 | ||||||
|  |  configure.ac | 2 +- | ||||||
|  |  1 file changed, 1 insertion(+), 1 deletion(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/configure.ac b/configure.ac
 | ||||||
|  | index f191488..3d2d3ee 100644
 | ||||||
|  | --- a/configure.ac
 | ||||||
|  | +++ b/configure.ac
 | ||||||
|  | @@ -892,7 +892,7 @@ AS_IF([test "x$enable_debuginfod" != "xno"],AC_DEFINE([ENABLE_DEBUGINFOD],[1],[B
 | ||||||
|  |  AM_CONDITIONAL([DEBUGINFOD],[test "x$enable_debuginfod" = "xyes"]) | ||||||
|  |  AS_IF([test "x$enable_debuginfod_ima_verification" = "xyes"],AC_DEFINE([ENABLE_IMA_VERIFICATION],[1],[Build IMA verification])) | ||||||
|  |  AS_IF([test "x$have_libarchive" = "xyes"],AC_DEFINE([HAVE_LIBARCHIVE],[1],[Define to 1 if libarchive is available])) | ||||||
|  | -AM_CONDITIONAL([ENABLE_IMA_VERIFICATION],[test "$enable_debuginfod_ima_verification" = "xyes"])
 | ||||||
|  | +AM_CONDITIONAL([ENABLE_IMA_VERIFICATION],[test "x$enable_debuginfod_ima_verification" = "xyes"])
 | ||||||
|  |  AM_CONDITIONAL([OLD_LIBMICROHTTPD],[test "x$old_libmicrohttpd" = "xyes"]) | ||||||
|  |   | ||||||
|  |  dnl for /etc/profile.d/elfutils.{csh,sh} | ||||||
|  | -- 
 | ||||||
|  | 2.47.0 | ||||||
|  | 
 | ||||||
							
								
								
									
										36
									
								
								SOURCES/elfutils-0.192-libelf-static.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								SOURCES/elfutils-0.192-libelf-static.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | |||||||
|  | From 0a65a54593ae489d40cb993caa74095d45bc47fd Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Mark Wielaard <mark@klomp.org> | ||||||
|  | Date: Tue, 22 Oct 2024 15:03:42 +0200 | ||||||
|  | Subject: [PATCH] libelf: Add libeu objects to libelf.a static archive | ||||||
|  | 
 | ||||||
|  | libelf might use some symbols from libeu.a, specifically the eu-search | ||||||
|  | wrappers. But we don't ship libeu.a separately. So include the libeu | ||||||
|  | objects in the libelf.a archive to facilitate static linking. | ||||||
|  | 
 | ||||||
|  | 	* libelf/Makefile.am (libeu_objects): New variable. | ||||||
|  | 	(libelf_a_LIBADD): New, add libeu_objects. | ||||||
|  | 
 | ||||||
|  | https://sourceware.org/bugzilla/show_bug.cgi?id=32293 | ||||||
|  | 
 | ||||||
|  | Signed-off-by: Mark Wielaard <mark@klomp.org> | ||||||
|  | ---
 | ||||||
|  |  libelf/Makefile.am | 3 +++ | ||||||
|  |  1 file changed, 3 insertions(+) | ||||||
|  | 
 | ||||||
|  | diff --git a/libelf/Makefile.am b/libelf/Makefile.am
 | ||||||
|  | index 3402863e..2d3dbdf2 100644
 | ||||||
|  | --- a/libelf/Makefile.am
 | ||||||
|  | +++ b/libelf/Makefile.am
 | ||||||
|  | @@ -122,6 +122,9 @@ libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
 | ||||||
|  |  	@$(textrel_check) | ||||||
|  |  	$(AM_V_at)ln -fs $@ $@.$(VERSION) | ||||||
|  |   | ||||||
|  | +libeu_objects = $(shell $(AR) t ../lib/libeu.a)
 | ||||||
|  | +libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects))
 | ||||||
|  | +
 | ||||||
|  |  install: install-am libelf.so | ||||||
|  |  	$(mkinstalldirs) $(DESTDIR)$(libdir) | ||||||
|  |  	$(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so | ||||||
|  | -- 
 | ||||||
|  | 2.47.0 | ||||||
|  | 
 | ||||||
							
								
								
									
										48
									
								
								SOURCES/elfutils-0.192-skip-ima-test.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								SOURCES/elfutils-0.192-skip-ima-test.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,48 @@ | |||||||
|  | From 36bd0ffe72f63a187902679823dfd50510bf7300 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Aaron Merey <amerey@redhat.com> | ||||||
|  | Date: Fri, 13 Dec 2024 11:14:39 -0500 | ||||||
|  | Subject: [PATCH] run-debuginfod-ima-verification.sh: Skip test 4 | ||||||
|  | 
 | ||||||
|  | Test 4 requires `rpmsign --delfilesign` to remove IMA signatures. | ||||||
|  | RHEL 9 rpmsign does not currently support delfilesign, so skip this | ||||||
|  | test for now. | ||||||
|  | ---
 | ||||||
|  |  tests/run-debuginfod-ima-verification.sh | 22 +++++++++++----------- | ||||||
|  |  1 file changed, 11 insertions(+), 11 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/tests/run-debuginfod-ima-verification.sh b/tests/run-debuginfod-ima-verification.sh
 | ||||||
|  | index d582af5f..a5e6eeb2 100755
 | ||||||
|  | --- a/tests/run-debuginfod-ima-verification.sh
 | ||||||
|  | +++ b/tests/run-debuginfod-ima-verification.sh
 | ||||||
|  | @@ -127,17 +127,17 @@ RC=0
 | ||||||
|  |  testrun ${abs_top_builddir}/debuginfod/debuginfod-find executable $RPM_BUILDID || RC=1 | ||||||
|  |  test $RC -ne 0 | ||||||
|  |   | ||||||
|  | -echo Test 4: A rpm without a signature will fail
 | ||||||
|  | -cp signed.rpm R/signed.rpm
 | ||||||
|  | -rpmsign --delfilesign R/signed.rpm
 | ||||||
|  | -rm -rf $DEBUGINFOD_CACHE_PATH # clean it from previous tests
 | ||||||
|  | -kill -USR1 $PID1
 | ||||||
|  | -wait_ready $PORT1 'thread_work_total{role="traverse"}' 4
 | ||||||
|  | -wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
 | ||||||
|  | -wait_ready $PORT1 'thread_busy{role="scan"}' 0
 | ||||||
|  | -RC=0
 | ||||||
|  | -testrun ${abs_top_builddir}/debuginfod/debuginfod-find executable $RPM_BUILDID || RC=1
 | ||||||
|  | -test $RC -ne 0
 | ||||||
|  | +#echo Test 4: A rpm without a signature will fail
 | ||||||
|  | +#cp signed.rpm R/signed.rpm
 | ||||||
|  | +#rpmsign --delfilesign R/signed.rpm
 | ||||||
|  | +#rm -rf $DEBUGINFOD_CACHE_PATH # clean it from previous tests
 | ||||||
|  | +#kill -USR1 $PID1
 | ||||||
|  | +#wait_ready $PORT1 'thread_work_total{role="traverse"}' 4
 | ||||||
|  | +#wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
 | ||||||
|  | +#wait_ready $PORT1 'thread_busy{role="scan"}' 0
 | ||||||
|  | +#RC=0
 | ||||||
|  | +#testrun ${abs_top_builddir}/debuginfod/debuginfod-find executable $RPM_BUILDID || RC=1
 | ||||||
|  | +#test $RC -ne 0
 | ||||||
|  |   | ||||||
|  |  echo Test 5: Only tests 1,2 will result in extracted signature | ||||||
|  |  [[ $(curl -s http://127.0.0.1:$PORT1/metrics | grep 'http_responses_total{extra="ima-sigs-extracted"}' | awk '{print $NF}') -eq 2 ]] | ||||||
|  | -- 
 | ||||||
|  | 2.47.1 | ||||||
|  | 
 | ||||||
							
								
								
									
										35
									
								
								SOURCES/elfutils-0.192-stacktrace-lto.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								SOURCES/elfutils-0.192-stacktrace-lto.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,35 @@ | |||||||
|  | commit 43829fb8780ecbe9d17aaed22d3dfcb806cb5f45 | ||||||
|  | Author: Mark Wielaard <mark@klomp.org> | ||||||
|  | Date:   Thu Oct 24 10:44:25 2024 +0200 | ||||||
|  | 
 | ||||||
|  |     stacktrace: Init elf_fd in sysprof_init_dwfl | ||||||
|  |      | ||||||
|  |     When building with LTO gcc believes elf_fd can be used uninitialized: | ||||||
|  |      | ||||||
|  |     In function ‘sysprof_init_dwfl’, | ||||||
|  |         inlined from ‘sysprof_unwind_cb’ at stacktrace.c:1235:16: | ||||||
|  |     stacktrace.c:1087:7: error: ‘elf_fd’ may be used uninitialized [-Werror=maybe-uninitialized] | ||||||
|  |      1087 |       close (elf_fd); | ||||||
|  |           |       ^ | ||||||
|  |      | ||||||
|  |     This code won't be reached because if find_procfile doesn't initialize | ||||||
|  |     elf_fd, it will return an error. But help the compiler by initializing | ||||||
|  |     elf_fd to -1. | ||||||
|  |      | ||||||
|  |             * src/stacktrace.c (sysprof_init_dwfl): Init elf_fd to -1. | ||||||
|  |      | ||||||
|  |     Signed-off-by: Mark Wielaard <mark@klomp.org> | ||||||
|  | 
 | ||||||
|  | diff --git a/src/stacktrace.c b/src/stacktrace.c
 | ||||||
|  | index 438cb1dd0d38..b912ca5de502 100644
 | ||||||
|  | --- a/src/stacktrace.c
 | ||||||
|  | +++ b/src/stacktrace.c
 | ||||||
|  | @@ -1033,7 +1033,7 @@ sysprof_init_dwfl (struct sysprof_unwind_info *sui,
 | ||||||
|  |      } | ||||||
|  |   | ||||||
|  |    Elf *elf = NULL; | ||||||
|  | -  int elf_fd;
 | ||||||
|  | +  int elf_fd = -1;
 | ||||||
|  |    err = find_procfile (dwfl, &pid, &elf, &elf_fd); | ||||||
|  |    if (err < 0) | ||||||
|  |      { | ||||||
| @ -3,8 +3,8 @@ | |||||||
| %bcond_with static | %bcond_with static | ||||||
| 
 | 
 | ||||||
| Name: elfutils | Name: elfutils | ||||||
| Version: 0.191 | Version: 0.192 | ||||||
| %global baserelease 4 | %global baserelease 5 | ||||||
| Release: %{baserelease}%{?dist} | Release: %{baserelease}%{?dist} | ||||||
| URL: http://elfutils.org/ | URL: http://elfutils.org/ | ||||||
| %global source_url ftp://sourceware.org/pub/elfutils/%{version}/ | %global source_url ftp://sourceware.org/pub/elfutils/%{version}/ | ||||||
| @ -16,6 +16,13 @@ Summary: A collection of utilities and DSOs to handle ELF files and DWARF data | |||||||
| # Needed for isa specific Provides and Requires. | # Needed for isa specific Provides and Requires. | ||||||
| %global depsuffix %{?_isa}%{!?_isa:-%{_arch}} | %global depsuffix %{?_isa}%{!?_isa:-%{_arch}} | ||||||
| 
 | 
 | ||||||
|  | # eu-stacktrace currently only supports x86_64 | ||||||
|  | %ifarch x86_64 | ||||||
|  | %global enable_stacktrace 1 | ||||||
|  | %else | ||||||
|  | %global enable_stacktrace 0 | ||||||
|  | %endif | ||||||
|  | 
 | ||||||
| Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} | Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} | ||||||
| Requires: elfutils-libs%{depsuffix} = %{version}-%{release} | Requires: elfutils-libs%{depsuffix} = %{version}-%{release} | ||||||
| Requires: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} | Requires: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} | ||||||
| @ -39,6 +46,8 @@ BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.33 | |||||||
| BuildRequires: pkgconfig(libcurl) >= 7.29.0 | BuildRequires: pkgconfig(libcurl) >= 7.29.0 | ||||||
| BuildRequires: pkgconfig(sqlite3) >= 3.7.17 | BuildRequires: pkgconfig(sqlite3) >= 3.7.17 | ||||||
| BuildRequires: pkgconfig(libarchive) >= 3.1.2 | BuildRequires: pkgconfig(libarchive) >= 3.1.2 | ||||||
|  | # For debugindod metadata query | ||||||
|  | BuildRequires: pkgconfig(json-c) >= 0.11 | ||||||
| 
 | 
 | ||||||
| # For tests need to bunzip2 test files. | # For tests need to bunzip2 test files. | ||||||
| BuildRequires: bzip2 | BuildRequires: bzip2 | ||||||
| @ -51,6 +60,17 @@ BuildRequires: curl | |||||||
| # For run-debuginfod-response-headers.sh test case | # For run-debuginfod-response-headers.sh test case | ||||||
| BuildRequires: socat | BuildRequires: socat | ||||||
| 
 | 
 | ||||||
|  | # For debuginfod rpm IMA verification | ||||||
|  | BuildRequires: rpm-devel | ||||||
|  | BuildRequires: ima-evm-utils-devel | ||||||
|  | BuildRequires: openssl-devel | ||||||
|  | BuildRequires: rpm-sign | ||||||
|  | 
 | ||||||
|  | # For eu-stacktrace | ||||||
|  | %if %{enable_stacktrace} | ||||||
|  | BuildRequires: sysprof-capture-devel | ||||||
|  | %endif | ||||||
|  | 
 | ||||||
| BuildRequires: automake | BuildRequires: automake | ||||||
| BuildRequires: autoconf | BuildRequires: autoconf | ||||||
| BuildRequires: gettext-devel | BuildRequires: gettext-devel | ||||||
| @ -72,6 +92,18 @@ BuildRequires: gettext-devel | |||||||
| 
 | 
 | ||||||
| # Patches | # Patches | ||||||
| 
 | 
 | ||||||
|  | # Include libeu.a objects in libelf.a for static linking. | ||||||
|  | Patch1: elfutils-0.192-libelf-static.patch | ||||||
|  | 
 | ||||||
|  | # Fix eu-stacktrace LTO build error. | ||||||
|  | Patch2: elfutils-0.192-stacktrace-lto.patch | ||||||
|  | 
 | ||||||
|  | # Fix configure.ac setting ENABLE_DEBUGINFOD_IMA_VERIFICATION. | ||||||
|  | Patch3: elfutils-0.192-fix-configure-conditional.patch | ||||||
|  | 
 | ||||||
|  | # Skip IMA test not currently supported in RHEL 9. | ||||||
|  | Patch4: elfutils-0.192-skip-ima-test.patch | ||||||
|  | 
 | ||||||
| %description | %description | ||||||
| Elfutils is a collection of utilities, including stack (to show | Elfutils is a collection of utilities, including stack (to show | ||||||
| backtraces), nm (for listing symbols from object files), size | backtraces), nm (for listing symbols from object files), size | ||||||
| @ -298,11 +330,16 @@ RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wformat" | |||||||
| 
 | 
 | ||||||
| trap 'cat config.log' EXIT | trap 'cat config.log' EXIT | ||||||
| 
 | 
 | ||||||
|  | %configure CFLAGS="$RPM_OPT_FLAGS" \ | ||||||
| %if 0%{?centos} >= 8 | %if 0%{?centos} >= 8 | ||||||
| %configure CFLAGS="$RPM_OPT_FLAGS" --enable-debuginfod-urls=https://debuginfod.centos.org/ | 	--enable-debuginfod-urls=%{dist_debuginfod_url} \ | ||||||
| %else |  | ||||||
| %configure CFLAGS="$RPM_OPT_FLAGS" |  | ||||||
| %endif | %endif | ||||||
|  | %if %{enable_stacktrace} | ||||||
|  | 	--enable-stacktrace \ | ||||||
|  | %endif | ||||||
|  | 	--enable-debuginfod \ | ||||||
|  | 	--enable-debuginfod-ima-verification \ | ||||||
|  | 	--enable-debuginfod-ima-cert-path=%{_sysconfdir}/keys/ima | ||||||
| trap '' EXIT | trap '' EXIT | ||||||
| %make_build | %make_build | ||||||
| 
 | 
 | ||||||
| @ -385,6 +422,9 @@ fi | |||||||
| %{_bindir}/eu-size | %{_bindir}/eu-size | ||||||
| %{_bindir}/eu-srcfiles | %{_bindir}/eu-srcfiles | ||||||
| %{_bindir}/eu-stack | %{_bindir}/eu-stack | ||||||
|  | %if %{enable_stacktrace} | ||||||
|  | %{_bindir}/eu-stacktrace | ||||||
|  | %endif | ||||||
| %{_bindir}/eu-strings | %{_bindir}/eu-strings | ||||||
| %{_bindir}/eu-strip | %{_bindir}/eu-strip | ||||||
| %{_bindir}/eu-unstrip | %{_bindir}/eu-unstrip | ||||||
| @ -429,6 +469,9 @@ fi | |||||||
| %{_libdir}/libelf.so | %{_libdir}/libelf.so | ||||||
| %{_libdir}/pkgconfig/libelf.pc | %{_libdir}/pkgconfig/libelf.pc | ||||||
| %{_mandir}/man3/elf_*.3* | %{_mandir}/man3/elf_*.3* | ||||||
|  | %{_mandir}/man3/elf32_*.3* | ||||||
|  | %{_mandir}/man3/elf64_*.3* | ||||||
|  | %{_mandir}/man3/libelf.3* | ||||||
| 
 | 
 | ||||||
| %if %{with static} | %if %{with static} | ||||||
| %files libelf-devel-static | %files libelf-devel-static | ||||||
| @ -447,6 +490,8 @@ fi | |||||||
| %{_mandir}/man1/debuginfod-find.1* | %{_mandir}/man1/debuginfod-find.1* | ||||||
| %{_mandir}/man7/debuginfod*.7* | %{_mandir}/man7/debuginfod*.7* | ||||||
| %{_sysconfdir}/profile.d/debuginfod.* | %{_sysconfdir}/profile.d/debuginfod.* | ||||||
|  | %{_sysconfdir}/debuginfod/*.certpath | ||||||
|  | %config(noreplace) %{_datadir}/fish/vendor_conf.d/* | ||||||
| %if 0%{?centos} >= 8 | %if 0%{?centos} >= 8 | ||||||
| %{_sysconfdir}/debuginfod/*.urls | %{_sysconfdir}/debuginfod/*.urls | ||||||
| %endif | %endif | ||||||
| @ -488,6 +533,29 @@ exit 0 | |||||||
| %systemd_postun_with_restart debuginfod.service | %systemd_postun_with_restart debuginfod.service | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Jan 15 2025 Aaron Merey <amerey@redhat.com> - 0.192-5 | ||||||
|  | - Add debuginfod certpath to %files unconditionally | ||||||
|  | 
 | ||||||
|  | * Jan 15 2025 Aaron Merey <amerey@redhat.com> - 0.192-4 | ||||||
|  | - NVR Bump. | ||||||
|  | 
 | ||||||
|  | * Fri Dec 13 2024 Aaron Merey <amerey@redhat.com> - 0.192-3 | ||||||
|  | - Enable debuginfod IMA verification | ||||||
|  | - Add elfutils-0.192-fix-configure-conditional.patch | ||||||
|  | - Add elfutils-0.192-skip-ima-test.patch | ||||||
|  | 
 | ||||||
|  | * Thu Oct 24 2024 Aaron Merey <amerey@redhat.com> - 0.192-2 | ||||||
|  | - Enable eu-stacktrace on x86_64 | ||||||
|  | - Add elfutils-0.192-stacktrace-lto.patch | ||||||
|  | 
 | ||||||
|  | * Wed Oct 23 2024 Aaron Merey <amerey@redhat.com> - 0.192-1 | ||||||
|  | - Upgrade to upstream elfutils 0.192 | ||||||
|  | - Drop upstreamed patches | ||||||
|  |   elfutils-0.190-riscv-flatten.patch | ||||||
|  |   elfutils-0.191-riscv-flatten.patch | ||||||
|  |   elfutils-0.191-profile-empty-urls.patch | ||||||
|  | - Add elfutils-0.192-libelf-static.patch | ||||||
|  | 
 | ||||||
| * Fri Apr 19 2024 Aaron Merey <amerey@redhat.com> - 0.191-3 | * Fri Apr 19 2024 Aaron Merey <amerey@redhat.com> - 0.191-3 | ||||||
| - eu-srcfiles directly links to libdebuginfod.so so explicitly | - eu-srcfiles directly links to libdebuginfod.so so explicitly | ||||||
|   Require elfutils-debuginfod-client not just Recommends. |   Require elfutils-debuginfod-client not just Recommends. | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user