From 123011cdbdb86d10d201aedaf9ac15cd774d8f85 Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 5 Jun 2024 15:59:03 +0200 Subject: [PATCH] main/elfutils: enable debuginfod --- main/debuginfod | 1 + main/debuginfod-libs | 1 + main/elfutils/patches/install.patch | 14 ++++++++++ .../patches/unused-private-field.patch | 10 +++++++ main/elfutils/template.py | 26 ++++++++++++++++--- 5 files changed, 49 insertions(+), 3 deletions(-) create mode 120000 main/debuginfod create mode 120000 main/debuginfod-libs create mode 100644 main/elfutils/patches/install.patch create mode 100644 main/elfutils/patches/unused-private-field.patch diff --git a/main/debuginfod b/main/debuginfod new file mode 120000 index 0000000000..b76b36cfac --- /dev/null +++ b/main/debuginfod @@ -0,0 +1 @@ +elfutils \ No newline at end of file diff --git a/main/debuginfod-libs b/main/debuginfod-libs new file mode 120000 index 0000000000..b76b36cfac --- /dev/null +++ b/main/debuginfod-libs @@ -0,0 +1 @@ +elfutils \ No newline at end of file diff --git a/main/elfutils/patches/install.patch b/main/elfutils/patches/install.patch new file mode 100644 index 0000000000..56beb0ae3b --- /dev/null +++ b/main/elfutils/patches/install.patch @@ -0,0 +1,14 @@ +--- a/config/Makefile.in ++++ b/config/Makefile.in +@@ -569,8 +569,9 @@ uninstall-am: uninstall-local uninstall-pkgconfigDATA + + + @LIBDEBUGINFOD_TRUE@install-data-local: +-@LIBDEBUGINFOD_TRUE@ $(INSTALL_DATA) profile.sh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh +-@LIBDEBUGINFOD_TRUE@ $(INSTALL_DATA) profile.csh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh ++@LIBDEBUGINFOD_TRUE@ $(INSTALL) -d $(DESTDIR)$(sysconfdir)/profile.d ++@LIBDEBUGINFOD_TRUE@ $(INSTALL_DATA) profile.sh $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh ++@LIBDEBUGINFOD_TRUE@ $(INSTALL_DATA) profile.csh $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh + @LIBDEBUGINFOD_TRUE@ mkdir -p $(DESTDIR)$(sysconfdir)/debuginfod + @LIBDEBUGINFOD_TRUE@ if [ -n "@DEBUGINFOD_URLS@" ]; then \ + @LIBDEBUGINFOD_TRUE@ echo "@DEBUGINFOD_URLS@" > $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.urls; \ diff --git a/main/elfutils/patches/unused-private-field.patch b/main/elfutils/patches/unused-private-field.patch new file mode 100644 index 0000000000..5438c979e0 --- /dev/null +++ b/main/elfutils/patches/unused-private-field.patch @@ -0,0 +1,10 @@ +--- a/debuginfod/debuginfod.cxx ++++ b/debuginfod/debuginfod.cxx +@@ -1445,7 +1445,6 @@ private: + + map entries; // optimized for lookup + time_t last_cleaning; +- long max_fds; + long max_mbs; + + public: diff --git a/main/elfutils/template.py b/main/elfutils/template.py index caebdde5c7..7f8fd55135 100644 --- a/main/elfutils/template.py +++ b/main/elfutils/template.py @@ -1,10 +1,8 @@ pkgname = "elfutils" pkgver = "0.191" -pkgrel = 0 +pkgrel = 1 build_style = "gnu_configure" configure_args = [ - "--disable-debuginfod", - "--disable-libdebuginfod", "--disable-nls", "--disable-werror", "--enable-deterministic-archives", @@ -25,6 +23,7 @@ "bzip2-devel", "libarchive-devel", "libcurl-devel", + "libmicrohttpd-devel", "linux-headers", "musl-bsd-headers", "musl-fts-devel", @@ -61,6 +60,27 @@ def post_install(self): ) +@subpackage("debuginfod") +def _dinfod(self): + self.pkgdesc = f"{pkgdesc} (debuginfod)" + + return [ + "usr/bin/debuginfod*", + "usr/share/man/man[18]/debuginfod*", + ] + + +@subpackage("debuginfod-libs") +def _dinfod_libs(self): + self.pkgdesc = f"{pkgdesc} (debuginfod library)" + + return [ + "etc/profile.d", + "usr/lib/libdebuginfod.so.*", + "usr/lib/libdebuginfod-*.so", + ] + + @subpackage("elfutils-libs") def _libs(self): # since the resolved (after symlinks) filename of the .so is without