| Azure |
-
-
+
+
@@ -29,22 +36,22 @@ Current build status
| linux_64 |
-
-
+
+
|
| linux_aarch64 |
-
-
+
+
|
| linux_ppc64le |
-
-
+
+
|
@@ -72,18 +79,43 @@ conda config --add channels conda-forge
conda config --set channel_priority strict
```
-Once the `conda-forge` channel has been enabled, `elfutils` can be installed with:
+Once the `conda-forge` channel has been enabled, `elfutils` can be installed with `conda`:
```
conda install elfutils
```
-It is possible to list all of the versions of `elfutils` available on your platform with:
+or with `mamba`:
+
+```
+mamba install elfutils
+```
+
+It is possible to list all of the versions of `elfutils` available on your platform with `conda`:
```
conda search elfutils --channel conda-forge
```
+or with `mamba`:
+
+```
+mamba search elfutils --channel conda-forge
+```
+
+Alternatively, `mamba repoquery` may provide more information:
+
+```
+# Search all versions available on your platform:
+mamba repoquery search elfutils --channel conda-forge
+
+# List packages depending on `elfutils`:
+mamba repoquery whoneeds elfutils --channel conda-forge
+
+# List dependencies of `elfutils`:
+mamba repoquery depends elfutils --channel conda-forge
+```
+
About conda-forge
=================
@@ -99,10 +131,12 @@ for each of the installable packages. Such a repository is known as a *feedstock
A feedstock is made up of a conda recipe (the instructions on what and how to build
the package) and the necessary configurations for automatic building using freely
available continuous integration services. Thanks to the awesome service provided by
-[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/)
-and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable
-packages to the [conda-forge](https://anaconda.org/conda-forge)
-[Anaconda-Cloud](https://anaconda.org/) channel for Linux, Windows and OSX respectively.
+[Azure](https://azure.microsoft.com/en-us/services/devops/), [GitHub](https://github.com/),
+[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/),
+[Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/)
+it is possible to build and upload installable packages to the
+[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/)
+channel for Linux, Windows and OSX respectively.
To manage the continuous integration and simplify feedstock maintenance
[conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed.
diff --git a/build-locally.py b/build-locally.py
index 8b74348..eec38a0 100755
--- a/build-locally.py
+++ b/build-locally.py
@@ -22,10 +22,6 @@ def setup_environment(ns):
os.environ["MINIFORGE_HOME"] = os.path.join(
os.path.dirname(__file__), "miniforge3"
)
- if "OSX_SDK_DIR" not in os.environ:
- os.environ["OSX_SDK_DIR"] = os.path.join(
- os.path.dirname(__file__), "SDKs"
- )
def run_docker_build(ns):
@@ -65,11 +61,12 @@ def verify_config(ns):
raise ValueError(
f"only Linux/macOS configs currently supported, got {ns.config}"
)
- elif ns.config.startswith("osx") and platform.system() == "Darwin":
+ elif ns.config.startswith("osx"):
if "OSX_SDK_DIR" not in os.environ:
raise RuntimeError(
- "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=/opt'"
- "to download the SDK automatically to '/opt/MacOSX.sdk'"
+ "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' "
+ "to download the SDK automatically to 'SDKs/MacOSX.sdk'. "
+ "Setting this variable implies agreement to the licensing terms of the SDK by Apple."
)
diff --git a/recipe/build.sh b/recipe/build.sh
index 65c206c..6c03313 100644
--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -1,18 +1,15 @@
#!/bin/bash
export LIBS="$(pkg-config --libs-only-l zlib) $LIBS"
export LDFLAGS="$(pkg-config --libs-only-L zlib) -lrt $LDFLAGS"
-export CFLAGS="$(pkg-config --cflags zlib) -Wno-unused-but-set-variable -Wno-unused-variable -Wno-null-dereference $CFLAGS"
-./configure --prefix=$PREFIX --with-zlib --enable-libdebuginfod=dummy || (cat config.log && exit 1)
+# tests introspect debug information in some of the binaries built. Build with -g and strip at install
+export CFLAGS="$(pkg-config --cflags zlib) -Wno-unused-but-set-variable -Wno-unused-variable -Wno-null-dereference $CFLAGS -g"
+# tests don't work with NDEBUG
+export CPPFLAGS="${CPPFLAGS/-DNDEBUG/}"
+autoreconf --install --force
+mkdir build && cd build
+../configure --prefix=$PREFIX --mandir=$PREFIX/man --enable-test-rpath --with-zlib --enable-libdebuginfod=dummy || (cat config.log && exit 1)
make -j${CPU_COUNT}
-# Unfortunately some tests fail, so we can't run "make check" here.
-# This is probably due to this package being a very sensitive package.
-# I believe this happens because it is not ready to be packaged into
-# an environment such as conda where it will run in different OSes,
-# environments, etc.
-#
-# For example, when running the tests on my personal machine, using
-# the docker image provided by condaforge, 8 tests failed, while in
-# CircleCI, 4 tests failed.
+make check -j${CPU_COUNT} V=1 || (cat tests/test-suite.log && exit 1)
-make install
+make install-strip
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index b1849df..5791363 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -8,9 +8,12 @@ source:
fn: elfutils-{{ version }}.tar.bz2
url: https://fedorahosted.org/releases/e/l/elfutils/{{ version }}/elfutils-{{ version }}.tar.bz2
sha256: 7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177
+ patches:
+ - patches/0001-rm-test-nlist-too-fragile.patch
+ - patches/0002-check-for-cap_sys_ptrace-when-needed-or-skip.patch
build:
- number: 0
+ number: 1
skip: true # [not linux]
run_exports:
- {{ pin_subpackage('elfutils', max_pin='x.x') }}
@@ -21,6 +24,9 @@ requirements:
- {{ compiler('cxx') }}
- pkg-config
- make
+ - autoconf
+ - automake
+ - libtool
host:
- bzip2
- libarchive
diff --git a/recipe/patches/0001-rm-test-nlist-too-fragile.patch b/recipe/patches/0001-rm-test-nlist-too-fragile.patch
new file mode 100644
index 0000000..17dbe94
--- /dev/null
+++ b/recipe/patches/0001-rm-test-nlist-too-fragile.patch
@@ -0,0 +1,35 @@
+From de1e62b970669080c78d9c2e070c9082364a1d21 Mon Sep 17 00:00:00 2001
+From: Tim Snyder
+Date: Fri, 1 Apr 2022 03:05:01 +0000
+Subject: [PATCH 1/2] rm test-nlist too fragile
+
+builds with special CFLAGS -g -O0 and doesn't let rpath in at all
+---
+ tests/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index bfb8b13..ba96eb1 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -33,7 +33,7 @@ tests_rpath = no
+ endif
+
+ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
+- showptable update1 update2 update3 update4 test-nlist \
++ showptable update1 update2 update3 update4 \
+ show-die-info get-files next-files get-lines next-lines \
+ get-pubnames \
+ get-aranges allfcts line2addr addrscopes funcscopes \
+@@ -93,7 +93,7 @@ test-nlist$(EXEEXT): test-nlist.c
+ $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(test_nlist_CFLAGS) $(GCOV_FLAGS) -o $@ $< $(test_nlist_LDADD)
+
+-TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
++TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile \
+ update1 update2 update3 update4 \
+ run-show-die-info.sh run-get-files.sh run-get-lines.sh \
+ run-next-files.sh run-next-lines.sh \
+--
+2.35.1
+
diff --git a/recipe/patches/0002-check-for-cap_sys_ptrace-when-needed-or-skip.patch b/recipe/patches/0002-check-for-cap_sys_ptrace-when-needed-or-skip.patch
new file mode 100644
index 0000000..aba846b
--- /dev/null
+++ b/recipe/patches/0002-check-for-cap_sys_ptrace-when-needed-or-skip.patch
@@ -0,0 +1,87 @@
+From 60323b0a3e6b84678130bc393147efbc34977ce1 Mon Sep 17 00:00:00 2001
+From: Tim Snyder
+Date: Sat, 2 Apr 2022 01:18:33 +0000
+Subject: [PATCH] check for cap_sys_ptrace when needed or skip
+
+---
+ tests/backtrace-subr.sh | 13 +++++++++++++
+ tests/run-backtrace-data.sh | 3 +++
+ tests/run-backtrace-dwarf.sh | 3 +++
+ tests/run-deleted.sh | 2 ++
+ 4 files changed, 21 insertions(+)
+
+diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh
+index 53c719d..8b58c50 100644
+--- a/tests/backtrace-subr.sh
++++ b/tests/backtrace-subr.sh
+@@ -90,6 +90,18 @@ check_unsupported()
+ fi
+ }
+
++check_cap_sys_ptrace()
++{
++ # if we don't have cap_sys_ptrace, then skip
++ if capsh --print | grep '^Current: =\s*$'; then
++ # current is empty, look in bounding
++ capsh --print | grep '^Bounding set .*[=,]cap_sys_ptrace[,$]' || ( echo "requires cap_sys_ptrace" >&2 && exit 77 )
++ else
++ # look in current
++ capsh --print | grep '^Current: =.*[ ,]cap_sys_ptrace[,$]' || ( echo "requires cap_sys_ptrace" >&2 && exit 77 )
++ fi
++}
++
+ check_native_unsupported()
+ {
+ err=$1
+@@ -129,6 +141,7 @@ check_native()
+ {
+ child=$1
+ tempfiles $child.{bt,err}
++ check_cap_sys_ptrace # --backtrace-exec requires ptrace
+ (set +ex; testrun ${abs_builddir}/backtrace --backtrace-exec=${abs_builddir}/$child 1>$child.bt 2>$child.err; true)
+ cat $child.{bt,err}
+ check_native_unsupported $child.err $child
+diff --git a/tests/run-backtrace-data.sh b/tests/run-backtrace-data.sh
+index f67a43e..501ebf7 100755
+--- a/tests/run-backtrace-data.sh
++++ b/tests/run-backtrace-data.sh
+@@ -21,6 +21,9 @@
+ # its own maps and registers and will find valgrinds instead.
+ unset VALGRIND_CMD
+
++# this test also requires ptrace
++check_cap_sys_ptrace
++
+ tempfiles data.{bt,err}
+ (set +ex;
+ testrun ${abs_builddir}/backtrace-data 1>data.bt 2>data.err;
+diff --git a/tests/run-backtrace-dwarf.sh b/tests/run-backtrace-dwarf.sh
+index 7ed795d..fe97231 100755
+--- a/tests/run-backtrace-dwarf.sh
++++ b/tests/run-backtrace-dwarf.sh
+@@ -23,6 +23,9 @@
+ # will warn and complain about various opcodes it doesn't understand...
+ unset VALGRIND_CMD
+
++# test also requires ptrace
++check_cap_sys_ptrace
++
+ tempfiles dwarf.{bt,err}
+ (set +ex; testrun ${abs_builddir}/backtrace-dwarf 1>dwarf.bt 2>dwarf.err; true)
+ cat dwarf.{bt,err}
+diff --git a/tests/run-deleted.sh b/tests/run-deleted.sh
+index a1ec1ec..a5e30ef 100755
+--- a/tests/run-deleted.sh
++++ b/tests/run-deleted.sh
+@@ -17,6 +17,8 @@
+
+ . $srcdir/backtrace-subr.sh
+
++check_cap_sys_ptrace
++
+ tempfiles deleted deleted-lib.so
+ cp -p ${abs_builddir}/deleted ${abs_builddir}/deleted-lib.so .
+
+--
+2.35.1
+
|