Date: Wednesday, February 1, 2023 @ 23:13:48
  Author: freswa
Revision: 467785

archrelease: copy trunk to staging-x86_64

Added:
  elfutils/repos/staging-x86_64/
  elfutils/repos/staging-x86_64/PKGBUILD
    (from rev 467784, elfutils/trunk/PKGBUILD)
  elfutils/repos/staging-x86_64/curl_7.85_compat.patch
    (from rev 467784, elfutils/trunk/curl_7.85_compat.patch)
  elfutils/repos/staging-x86_64/keys/

------------------------+
 PKGBUILD               |  142 +++++++++++++++++++++++++++++++++++++++++++++++
 curl_7.85_compat.patch |   60 +++++++++++++++++++
 2 files changed, 202 insertions(+)

Copied: elfutils/repos/staging-x86_64/PKGBUILD (from rev 467784, 
elfutils/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD                             (rev 0)
+++ staging-x86_64/PKGBUILD     2023-02-01 23:13:48 UTC (rev 467785)
@@ -0,0 +1,142 @@
+# Maintainer: David Runge <[email protected]>
+# Contributor: Laurent Carlier <[email protected]>
+# Contributor: Stéphane Gaudreault <[email protected]>
+# Contributor: Andrej Gelenberg <[email protected]>
+
+pkgbase=elfutils
+pkgname=(debuginfod elfutils libelf)
+pkgver=0.188
+pkgrel=3
+pkgdesc="Handle ELF object files and DWARF debugging information"
+arch=(x86_64)
+url="https://sourceware.org/elfutils/";
+license=(LGPL3 GPL3)
+makedepends=(bzip2 curl gcc-libs libarchive libmicrohttpd sqlite xz zlib zstd)
+options=(staticlibs)
+source=(https://sourceware.org/$pkgbase/ftp/$pkgver/$pkgbase-$pkgver.tar.bz2{,.sig}
+        curl_7.85_compat.patch)
+sha512sums=('585551b2d937d19d1becfc2f28935db1dd1a3d25571a62f322b70ac8da98c1a741a55d070327705df6c3e2ee026652e0b9a3c733b050a0b0ec5f2fc75d5b74b5'
+            'SKIP'
+            
'8f731bf2451ffd195a7da939d469486272873fa9fd19c2dc03a5311814840d7a7242b82de42162efc36404bee9a4fb3a6b85e0eb9fbb81e3c15f989cdd288c37')
+b2sums=('6b0474f1436eaf6af73b735b9b2ddd5448ab9c03fbaa0be745a31c89ae8f15b0e21a651409c38643ca125794ce82c19d7b46db4a079f3e72cb919d643560e7a4'
+        'SKIP'
+        
'92b92aefc011b4be7ed00baca28c3447003baa864be58482bf0c220dcd6ad75133c6e34731eaf7e3cc97dbb3e1f85d1fce88cb532c3da37b36802d2c6e7a9e36')
+validpgpkeys=(
+  '47CC0331081B8BC6D0FD4DA08370665B57816A6A'  # Mark J. Wielaard 
<[email protected]>
+  'EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A'  # Mark Wielaard <[email protected]>
+)
+
+_pick() {
+  local p="$1" f d; shift
+  for f; do
+    d="$srcdir/$p/${f#$pkgdir/}"
+    mkdir -p "$(dirname "$d")"
+    mv "$f" "$d"
+    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+  done
+}
+
+prepare() {
+  cd $pkgbase-$pkgver
+  # Use CURLOPT_PROTOCOLS_STR for libcurl >= 7.85.0
+  # 
https://sourceware.org/git/?p=elfutils.git;a=commit;h=6560fb26a62ef135a804357ef4f15a47de3e49b3
+  patch -Np1 < ../curl_7.85_compat.patch
+  cd ..
+
+  # remove failing test due to missing glibc debug package during test: 
https://bugs.archlinux.org/task/74875
+  sed -e 's/run-backtrace-native.sh//g' -i $pkgbase-$pkgver/tests/Makefile.am
+  (
+    cd $pkgbase-$pkgver
+    autoreconf -fiv
+  )
+
+  cp -av $pkgbase-$pkgver $pkgbase-test-$pkgver
+}
+
+
+build() {
+  local configure_options=(
+    --prefix=/usr
+    --sysconfdir=/etc
+    --program-prefix="eu-"
+    --enable-deterministic-archives
+  )
+
+  (
+    # fat-lto-objects is required for non-mangled .a files in libelf
+    CFLAGS+=" -ffat-lto-objects"
+    cd $pkgbase-$pkgver
+    ./configure "${configure_options[@]}"
+    make
+  )
+  (
+    cd $pkgbase-test-$pkgver
+    # debugging information is required for test-suite
+    CFLAGS+=" -g"
+    # fat-lto-objects is required for non-mangled .a files in libelf
+    CFLAGS+=" -ffat-lto-objects"
+    ./configure "${configure_options[@]}"
+    make
+  )
+}
+
+check() {
+  make check -C $pkgbase-test-$pkgver
+}
+
+package_debuginfod() {
+  pkgdesc+=" (debuginfod)"
+  depends=(
+    gcc-libs
+    glibc
+    libarchive libarchive.so
+    libelf=$pkgver
+    libmicrohttpd libmicrohttpd.so
+    sqlite libsqlite3.so
+  )
+  optdepends=("elfutils=$pkgver: for translations")
+
+  make DESTDIR="$pkgdir" install -C $pkgbase-$pkgver
+  install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t 
"$pkgdir/usr/share/doc/$pkgname/"
+
+  # set the default DEBUGINFOD_URLS environment variable to the distribution's 
debuginfod URL
+  printf "https://debuginfod.archlinux.org\n"; > 
"$pkgdir/etc/debuginfod/archlinux.urls"
+
+  (
+    cd "$pkgdir"
+
+    _pick libelf etc/debuginfod/*
+    _pick libelf etc/profile.d/*
+    _pick libelf usr/{include,lib}
+    _pick elfutils usr/bin/eu-*
+    _pick elfutils usr/share/locale
+    _pick elfutils usr/share/man/man1/eu-*
+    _pick elfutils usr/share/man/man3/elf_*
+  )
+
+}
+
+package_elfutils() {
+  pkgdesc+=" (utilities)"
+  depends=(gcc-libs glibc libelf=$pkgver)
+
+  mv -v elfutils/* "$pkgdir"
+  install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t 
"$pkgdir/usr/share/doc/$pkgname/"
+}
+
+package_libelf() {
+  pkgdesc+=" (libraries)"
+  depends=(
+    bzip2 libbz2.so
+    curl libcurl.so
+    gcc-libs
+    glibc
+    xz liblzma.so
+    zlib
+    zstd libzstd.so
+  )
+  # NOTE: the shared objects can not be added to provides as they are not 
versioned
+
+  mv -v libelf/* "$pkgdir"
+  install -vDm 644 $pkgbase-$pkgver/{AUTHORS,ChangeLog,NEWS,NOTES,README} -t 
"$pkgdir/usr/share/doc/$pkgname/"
+}

Copied: elfutils/repos/staging-x86_64/curl_7.85_compat.patch (from rev 467784, 
elfutils/trunk/curl_7.85_compat.patch)
===================================================================
--- staging-x86_64/curl_7.85_compat.patch                               (rev 0)
+++ staging-x86_64/curl_7.85_compat.patch       2023-02-01 23:13:48 UTC (rev 
467785)
@@ -0,0 +1,60 @@
+diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
+index a16165bd1..1ce456327 100644
+--- a/debuginfod/debuginfod-client.c
++++ b/debuginfod/debuginfod-client.c
+@@ -1336,8 +1336,13 @@ debuginfod_query_server (debuginfod_client *c,
+
+       /* Only allow http:// + https:// + file:// so we aren't being
+        redirected to some unsupported protocol.  */
++#if CURL_AT_LEAST_VERSION(7, 85, 0)
++      curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS_STR,
++                        "http,https,file");
++#else
+       curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS,
+                         (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE));
++#endif
+       curl_easy_setopt_ck(data[i].handle, CURLOPT_URL, data[i].url);
+       if (vfd >= 0)
+       curl_easy_setopt_ck(data[i].handle, CURLOPT_ERRORBUFFER,
+diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
+index 8873fcc8c..692aeccec 100644
+--- a/debuginfod/debuginfod-client.c
++++ b/debuginfod/debuginfod-client.c
+@@ -1456,7 +1456,7 @@ debuginfod_query_server (debuginfod_client *c,
+              deflate-compressing proxies, this number is likely to be
+              unavailable, so -1 may show. */
+           CURLcode curl_res;
+-#ifdef CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
++#if CURL_AT_LEAST_VERSION(7, 55, 0)
+           curl_off_t cl;
+           curl_res = curl_easy_getinfo(target_handle,
+                                        CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
+@@ -1491,7 +1491,7 @@ debuginfod_query_server (debuginfod_client *c,
+           if (target_handle) /* we've committed to a server; report its 
download progress */
+             {
+               CURLcode curl_res;
+-#ifdef CURLINFO_SIZE_DOWNLOAD_T
++#if CURL_AT_LEAST_VERSION(7, 55, 0)
+               curl_off_t dl;
+               curl_res = curl_easy_getinfo(target_handle,
+                                            CURLINFO_SIZE_DOWNLOAD_T,
+diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
+index 692aeccec..a16165bd1 100644
+--- a/debuginfod/debuginfod-client.c
++++ b/debuginfod/debuginfod-client.c
+@@ -105,6 +105,13 @@ void debuginfod_end (debuginfod_client *c) { }
+   #include <fts.h>
+ #endif
+
++/* Older curl.h don't define CURL_AT_LEAST_VERSION.  */
++#ifndef CURL_AT_LEAST_VERSION
++  #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
++  #define CURL_AT_LEAST_VERSION(x,y,z) \
++    (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
++#endif
++
+ #include <pthread.h>
+
+ static pthread_once_t init_control = PTHREAD_ONCE_INIT;
+--
+2.31.1

Reply via email to