diff --git a/elfutils-0.186.tar.bz2 b/elfutils-0.186.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..9efea97e41babfab44dd5c5a431cdb81685a980d Binary files /dev/null and b/elfutils-0.186.tar.bz2 differ diff --git a/elfutils.spec b/elfutils.spec new file mode 100644 index 0000000000000000000000000000000000000000..13df7bfeb757623650dbd22939552acdc745a37a --- /dev/null +++ b/elfutils.spec @@ -0,0 +1,350 @@ +Name: elfutils +Version: 0.186 +%global baserelease 1 +Release: %{baserelease}%{?dist} +URL: http://elfutils.org/ +%global source_url ftp://sourceware.org/pub/elfutils/%{version}/ +License: GPLv3+ and (GPLv2+ or LGPLv3+) and GFDL +Source: %{?source_url}%{name}-%{version}.tar.bz2 +Summary: A collection of utilities and DSOs to handle ELF files and DWARF data + +%global depsuffix %{?_isa}%{!?_isa:-%{_arch}} + +Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} +Requires: elfutils-libs%{depsuffix} = %{version}-%{release} +Recommends: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} +Requires: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: gettext +BuildRequires: bison +BuildRequires: flex +BuildRequires: zlib-devel +BuildRequires: bzip2-devel +BuildRequires: xz-devel +BuildRequires: libzstd-devel +BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.33 +BuildRequires: pkgconfig(libcurl) >= 7.29.0 +BuildRequires: pkgconfig(sqlite3) >= 3.7.17 +BuildRequires: pkgconfig(libarchive) >= 3.1.2 +BuildRequires: bzip2 +BuildRequires: zstd +BuildRequires: iproute +BuildRequires: procps +BuildRequires: bsdtar +BuildRequires: curl + +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: gettext-devel + +%global _gnu %{nil} +%global _program_prefix eu- + +%global provide_yama_scope 1 + +%description +Elfutils is a collection of utilities, including stack (to show +backtraces), nm (for listing symbols from object files), size +(for listing the section sizes of an object or archive file), +strip (for discarding symbols), readelf (to see the raw ELF file +structures), elflint (to check for well-formed ELF files) and +elfcompress (to compress or decompress ELF sections). + +%package libs +Summary: Libraries to handle compiled objects +License: GPLv2+ or LGPLv3+ +%if 0%{!?_isa:1} +Provides: elfutils-libs%{depsuffix} = %{version}-%{release} +%endif +Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} +%if %{provide_yama_scope} +Requires: default-yama-scope +%endif +Recommends: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} +Requires: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} + +%description libs +The elfutils-libs package contains libraries which implement DWARF, ELF, +and machine-specific ELF handling and process introspection. These +libraries are used by the programs in the elfutils package. The +elfutils-devel package enables building other programs using these +libraries. + +%package devel +Summary: Development libraries to handle compiled objects +License: GPLv2+ or LGPLv3+ +%if 0%{!?_isa:1} +Provides: elfutils-devel%{depsuffix} = %{version}-%{release} +%endif +Requires: elfutils-libs%{depsuffix} = %{version}-%{release} +Requires: elfutils-libelf-devel%{depsuffix} = %{version}-%{release} +Recommends: elfutils-debuginfod-client-devel%{depsuffix} = %{version}-%{release} +Requires: elfutils-debuginfod-client-devel%{depsuffix} = %{version}-%{release} +Obsoletes: elfutils-devel-static < 0.180-5 + +%description devel +The elfutils-devel package contains the libraries to create +applications for handling compiled objects. libdw provides access +to the DWARF debugging information. libasm provides a programmable +assembler interface. + +%package libelf +Summary: Library to read and write ELF files +License: GPLv2+ or LGPLv3+ +%if 0%{!?_isa:1} +Provides: elfutils-libelf%{depsuffix} = %{version}-%{release} +%endif +Obsoletes: libelf <= 0.8.2-2 + +%description libelf +The elfutils-libelf package provides a DSO which allows reading and +writing ELF files on a high level. Third party programs depend on +this package to read internals of ELF files. The programs of the +elfutils package use it also to generate new ELF files. + +%package libelf-devel +Summary: Development support for libelf +License: GPLv2+ or LGPLv3+ +%if 0%{!?_isa:1} +Provides: elfutils-libelf-devel%{depsuffix} = %{version}-%{release} +%endif +Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} +Obsoletes: libelf-devel <= 0.8.2-2 +Obsoletes: elfutils-libelf-devel-static < 0.180-5 + +%description libelf-devel +The elfutils-libelf-devel package contains the libraries to create +applications for handling compiled objects. libelf allows you to +access the internals of the ELF object file format, so you can see the +different sections of an ELF file. + +%if %{provide_yama_scope} +%package default-yama-scope +Summary: Default yama attach scope sysctl setting +License: GPLv2+ or LGPLv3+ +Provides: default-yama-scope +BuildArch: noarch +BuildRequires: systemd >= 215 +Recommends: systemd +%else +Requires(post): systemd +%endif + +%description default-yama-scope +Yama sysctl setting to enable default attach scope settings +enabling programs to use ptrace attach, access to +/proc/PID/{mem,personality,stack,syscall}, and the syscalls +process_vm_readv and process_vm_writev which are used for +interprocess services, communication and introspection +(like synchronisation, signaling, debugging, tracing and +profiling) of processes. + +%package debuginfod-client +Summary: Library and command line client for build-id HTTP ELF/DWARF server +License: GPLv3+ and (GPLv2+ or LGPLv3+) +%if 0%{!?_isa:1} +Provides: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} +%endif + +%package debuginfod-client-devel +Summary: Libraries and headers to build debuginfod client applications +License: GPLv2+ or LGPLv3+ +%if 0%{!?_isa:1} +Provides: elfutils-debuginfod-client-devel%{depsuffix} = %{version}-%{release} +%endif +Requires: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} + +%package debuginfod +Summary: HTTP ELF/DWARF file server addressed by build-id +License: GPLv3+ +Requires: elfutils-libs%{depsuffix} = %{version}-%{release} +Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} +Requires: elfutils-debuginfod-client%{depsuffix} = %{version}-%{release} +BuildRequires: systemd +BuildRequires: make +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Requires(pre): shadow-utils +Requires: bsdtar + +%description debuginfod-client +The elfutils-debuginfod-client package contains shared libraries +dynamically loaded from -ldw, which use a debuginfod service +to look up debuginfo and associated data. Also includes a +command-line frontend. + +%description debuginfod-client-devel +The elfutils-debuginfod-client-devel package contains the libraries +to create applications to use the debuginfod service. + +%description debuginfod +The elfutils-debuginfod package contains the debuginfod binary +and control files for a service that can provide ELF/DWARF +files to remote clients, based on build-id identification. +The ELF/DWARF file searching functions in libdwfl can query +such servers to download those files on demand. + +%prep +%autosetup -p1 + +autoreconf -f -v -i +find . -name \*.sh ! -perm -0100 -print | xargs chmod +x + +%build +RPM_OPT_FLAGS="${RPM_OPT_FLAGS/-Wall/}" +RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wformat" + + +trap 'cat config.log' EXIT +%configure CFLAGS="$RPM_OPT_FLAGS" --enable-debuginfod-urls=https://debuginfod.fedoraproject.org/ +trap '' EXIT +%make_build + +%install +%make_install + +chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib*.so* +rm ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib{elf,dw,asm}.a + +%find_lang %{name} + +%if %{provide_yama_scope} +install -Dm0644 config/10-default-yama-scope.conf ${RPM_BUILD_ROOT}%{_sysctldir}/10-default-yama-scope.conf +%endif + +install -Dm0644 config/debuginfod.service ${RPM_BUILD_ROOT}%{_unitdir}/debuginfod.service +install -Dm0644 config/debuginfod.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/debuginfod +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod +touch ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite + +%check +# Record some build root versions in build.log +uname -r; rpm -q binutils gcc glibc || true + +%make_build check || (cat tests/test-suite.log; false) + +%if 0%{?ldconfig_scriptlets:1} +%ldconfig_scriptlets libs +%ldconfig_scriptlets libelf +%ldconfig_scriptlets debuginfod-client +%else +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig +%post libelf -p /sbin/ldconfig +%postun libelf -p /sbin/ldconfig +%post debuginfod-client -p /sbin/ldconfig +%postun debuginfod-client -p /sbin/ldconfig +%endif + +%if %{provide_yama_scope} +%post default-yama-scope +if [ -x /usr/lib/systemd/systemd-sysctl ] ; then +%sysctl_apply 10-default-yama-scope.conf +fi +%endif + +%files +%license COPYING COPYING-GPLV2 COPYING-LGPLV3 doc/COPYING-GFDL +%doc README TODO CONTRIBUTING +%{_bindir}/eu-addr2line +%{_bindir}/eu-ar +%{_bindir}/eu-elfclassify +%{_bindir}/eu-elfcmp +%{_bindir}/eu-elfcompress +%{_bindir}/eu-elflint +%{_bindir}/eu-findtextrel +%{_bindir}/eu-make-debug-archive +%{_bindir}/eu-nm +%{_bindir}/eu-objdump +%{_bindir}/eu-ranlib +%{_bindir}/eu-readelf +%{_bindir}/eu-size +%{_bindir}/eu-stack +%{_bindir}/eu-strings +%{_bindir}/eu-strip +%{_bindir}/eu-unstrip +%{_mandir}/man1/eu-*.1* + +%files libs +%license COPYING-GPLV2 COPYING-LGPLV3 +%{_libdir}/libasm-%{version}.so +%{_libdir}/libdw-%{version}.so +%{_libdir}/libasm.so.* +%{_libdir}/libdw.so.* + +%files devel +%{_includedir}/dwarf.h +%dir %{_includedir}/elfutils +%{_includedir}/elfutils/elf-knowledge.h +%{_includedir}/elfutils/known-dwarf.h +%{_includedir}/elfutils/libasm.h +%{_includedir}/elfutils/libdw.h +%{_includedir}/elfutils/libdwfl.h +%{_includedir}/elfutils/libdwelf.h +%{_includedir}/elfutils/version.h +%{_libdir}/libasm.so +%{_libdir}/libdw.so +%{_libdir}/pkgconfig/libdw.pc + +%files -f %{name}.lang libelf +%license COPYING-GPLV2 COPYING-LGPLV3 +%{_libdir}/libelf-%{version}.so +%{_libdir}/libelf.so.* + +%files libelf-devel +%{_includedir}/libelf.h +%{_includedir}/gelf.h +%{_includedir}/nlist.h +%{_libdir}/libelf.so +%{_libdir}/pkgconfig/libelf.pc +%{_mandir}/man3/elf_*.3* + +%if %{provide_yama_scope} +%files default-yama-scope +%{_sysctldir}/10-default-yama-scope.conf +%endif + +%files debuginfod-client +%{_libdir}/libdebuginfod-%{version}.so +%{_libdir}/libdebuginfod.so.* +%{_bindir}/debuginfod-find +%{_mandir}/man1/debuginfod-find.1* +%{_mandir}/man7/debuginfod*.7* +%config(noreplace) %{_sysconfdir}/profile.d/* +%config(noreplace) %{_sysconfdir}/debuginfod/* + +%files debuginfod-client-devel +%{_libdir}/pkgconfig/libdebuginfod.pc +%{_mandir}/man3/debuginfod_*.3* +%{_includedir}/elfutils/debuginfod.h +%{_libdir}/libdebuginfod.so + +%files debuginfod +%{_bindir}/debuginfod +%config(noreplace) %{_sysconfdir}/sysconfig/debuginfod +%{_unitdir}/debuginfod.service +%{_sysconfdir}/sysconfig/debuginfod +%{_mandir}/man8/debuginfod.8* + +%dir %attr(0700,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod +%ghost %attr(0600,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod/debuginfod.sqlite + +%pre debuginfod +getent group debuginfod >/dev/null || groupadd -r debuginfod +getent passwd debuginfod >/dev/null || \ + useradd -r -g debuginfod -d /var/cache/debuginfod -s /sbin/nologin \ + -c "elfutils debuginfo server" debuginfod +exit 0 + +%post debuginfod +%systemd_post debuginfod.service + +%postun debuginfod +%systemd_postun_with_restart debuginfod.service + +%changelog +* Tue Mar 08 2022 pangqing - 0.186-1 +- Init for anolisOS 23