libcapsule (0.20230928.0-0co1) upstream; urgency=medium

  * capture-libs: Don't treat libcrypt.so.1 as part of glibc, to account for
    libxcrypt taking over that name in newer distributions
    (steamrt/tasks#332)
  * build: Disable -Wstringop-truncation

 -- Simon McVittie <smcv@collabora.com>  Thu, 28 Sep 2023 18:09:26 +0100

libcapsule (0.20230802.0-0co1) upstream; urgency=medium

  * capture-libs: Log a warning for several unexpected situations, even if
    CAPSULE_DEBUG is not set:
    - If dependencies are not all found
    - If we can't find the SONAME of a library
    - If a library has a SONAME that is not the one we expected
  * ld-libs: Adjust an error message to make it clearer that
    /lib:/usr/lib is only a fallback
  * tests: Fix test failures on newer Debian releases with merged /usr
  * CI fixes

 -- Simon McVittie <smcv@collabora.com>  Wed, 02 Aug 2023 15:48:31 +0100

libcapsule (0.20221006.0-0co1) upstream; urgency=medium

  [ Ludovico de Nittis ]
  * capture-libs: Add exact-soname option.
    This is a stricter version of `soname:`, where a library is considered
    to be a match only if its DT_SONAME is exactly what capture-libs was
    asked to look for.
    This can be used as a protection against misconfigured systems
    where two incompatible libraries have been symlinked. For example,
    if there is an unexpected symlink `libudev.so.0 -> libudev.so.1`,
    with `soname:libudev.so.0` we would import `libudev.so.0` inside the
    container even if its DT_SONAME is `libudev.so.1`, but with
    `exact-soname:libudev.so.0` we will not.

 -- Simon McVittie <smcv@collabora.com>  Thu, 06 Oct 2022 11:17:48 +0100

libcapsule (0.20220623.0-0co1) upstream; urgency=medium

  * ld-libs: Parse and use DT_RUNPATH to find dependencies
  * .reuse/dep5: Update

 -- Simon McVittie <smcv@collabora.com>  Thu, 23 Jun 2022 16:29:22 +0100

libcapsule (0.20211026.0-0co1) upstream; urgency=medium

  [ Ludovico de Nittis ]
  * capture-libs: Ignore CAPTURE_FLAG_EVEN_IF_OLDER for dependencies.
    This fixes an issue when capturing libraries with the pattern gl:,
    while using an host system with glibc <= 2.33 and a container with
    glibc >= 2.34. In this situation we were wrongly choosing
    libpthread.so.0 from the provider and libc.so.6 from the container.

 -- Simon McVittie <smcv@collabora.com>  Tue, 26 Oct 2021 15:39:06 +0100

libcapsule (0.20210906.0-0co1) upstream; urgency=medium

  [ Ludovico de Nittis ]
  * capsule-wrappers: Avoid mallinfo() when possible, deprecated since
    glibc 2.33
  * capture-libs: Add a special case to support glibc 2.34+.
    Starting from glibc 2.34, libc.so.6 is a regular file instead of a
    symlink. Also all the symbols from its small libraries like libpthread,
    librt etc., are now moved into libc.so.6.
  * library-cmp: Handle filters for fully-qualified symbols name.
    If a filter pattern has an '@' in it, it's now matched against the
    `symbol@version` fully-qualified name; otherwise it's matched against
    the symbol as before.

 -- Simon McVittie <smcv@collabora.com>  Mon, 06 Sep 2021 16:57:50 +0100

libcapsule (0.20210728.0-0co1) upstream; urgency=medium

  * capture-libs: Match GLESv2 ICDs correctly.
    To select SONAMES that match a glob pattern, we want to use the
    soname-match mode, not the soname mode.
    Thanks to Luigi Sartor Piucco
  * capsule-malloc: Add missing copyright and licensing information
  * Add SPDX-License-Identifier to all C code
  * Add licensing information in REUSE format

 -- Simon McVittie <smcv@collabora.com>  Wed, 28 Jul 2021 16:32:46 +0100

libcapsule (0.20210114.0-0co1) upstream; urgency=medium

  * ldlibs: Try loading Clear Linux ld.so cache (/var/cache/ldconfig).
    Partially addresses ValveSoftware/steam-runtime#345
  * tests: Silence some Perl warnings
  * tests: Ignore symbol-versions in nm output.
    The Debian 11 toolchain produces them like this.

 -- Simon McVittie <smcv@collabora.com>  Thu, 14 Jan 2021 14:57:29 +0000

libcapsule (0.20210104.0-0co1) upstream; urgency=medium

  * ld-libs: Try loading Exherbo architecture-specific ld.so cache
    before generic path.
    I'm using Exherbo as an example of a host OS with an unusual layout that
    breaks libcapsule's normal assumptions. As well as fixing Exherbo
    itself, this puts the framework in place to deal with other
    distributions' architecture-specific ld.so caches.
    - Developers of other distributions with unusual ld.so cache paths
      can edit ld_cache_filenames in utils/ld-cache.c and bind_usr() in
      tests/CapsuleTest.pm to teach libcapsule about their paths.
  * tests: Use libxml2 instead of libjpeg to test versioned symbols
  * tests: Make Exherbo architecture-specific ld.so stuff available too
  * tests: Allow even more variations of what a $libdir looks like

 -- Simon McVittie <smcv@collabora.com>  Mon, 04 Jan 2021 17:08:59 +0000

libcapsule (0.20201120.0-0co1) upstream; urgency=medium

  [ Ludovico de Nittis ]
  * capture-libs: Add support for remapping link target prefix.
    If you don't want to change the link target for all the symlinks that
    will be created, instead of using `--link-target`, it is now possible to
    use the new `--remap-link-prefix` and just list the directories that
    should be located under a different target.

  [ Simon McVittie ]
  * debian: Suppress automatic debug symbols for libcapsule-tools-relocatable.
    The debug symbols for libcapsule-tools-relocatable would be the same as
    for libcapsule-tools, making them non-co-installable. Use the environment
    variable instead of --no-automatic-dbgsym for compatibility with
    Steam Runtime 1 'scout', which is too old to have that option.

 -- Simon McVittie <smcv@collabora.com>  Fri, 20 Nov 2020 14:09:54 +0000

libcapsule (0.20201022.0-0co1) upstream; urgency=medium

  [ Ludovico de Nittis ]
  * capture-libs: Skip libs with unmet dependencies when "if exists" flag
    is set.
    If we have the CAPTURE_FLAG_IF_EXISTS option flag, we should not
    propagate an error if we are not able to find some dependencies of a
    library. Instead we should just skip it.
    This fixes an error that some users reported because they had some
    leftover unused libraries from the NVIDIA proprietary driver,
    and libcapsule reported an error while trying to capture their
    (missing) dependencies.

 -- Simon McVittie <smcv@collabora.com>  Thu, 22 Oct 2020 10:05:30 +0100

libcapsule (0.20200921.0-0co1) upstream; urgency=medium

  * debian: Delete files that were generated by gtk-doc during dist.
    This fixes failure to build from the tarball with gtk-doc >= 1.30,
    when the tarball was generated with older gtk-doc.

 -- Simon McVittie <smcv@collabora.com>  Mon, 21 Sep 2020 19:17:22 +0100

libcapsule (0.20200908.0-0co1) upstream; urgency=medium

  [ Ludovico de Nittis ]
  * utils: Add public/private knowledge about symbol versions and symbols.
    We are now able to list the symbol versions and/or symbols that are
    known to be public/private.
    This is especially useful for comparing libraries that removed symbol
    versions, or symbols, from one release to another. As this already
    happened multiple times in the past, like for example with
    `libdrm_nouveau.so.2` or `libedit.so.2`.

 -- Simon McVittie <smcv@collabora.com>  Tue, 08 Sep 2020 18:48:30 +0100

libcapsule (0.20200708.0-0co1) upstream; urgency=medium

  [ Ludovico de Nittis, Simon McVittie ]
  * utils: Add functions to compare symbols and versions with libelf.
    When two libraries have the same numeric tail we were not able to
    reliably determine which one was the newer. In particular, many
    distributions install libgcc_s.so.1 as a regular file, rather than
    a symlink to a versioned name, so library_cmp_by_name() can't work.

  [ Simon McVittie ]
  * ci: Run CI with UndefinedBehaviourSanitizer and AddressSanitizer
  * tests: Work around a binutils behaviour change (see #964457)
  * capture-libs: Make library comparison configurable on the command-line.
    This is primarily useful for testing and experimenting.
  * capture-libs: Add --library-knowledge option.
    This gives capsule-capture-libs a source of library-specific knowledge,
    which we can use to choose the correct library. (T16562)

 -- Simon McVittie <smcv@collabora.com>  Wed, 08 Jul 2020 13:49:28 +0100

libcapsule (0.20200624.0-0co1) upstream; urgency=medium

  * ld-libs: Always clear ldlibs->needed entry if ld_lib_open() fails,
    fixing mishandling of libraries that are newer in the container but
    only for one architecture
  * build: Check that the compiler and --host are consistent
  * build: Silence unwanted warnings
  * Add basic Gitlab-CI on Debian (with deb-build-snapshot) and Arch Linux
  * capture-libs: Expand list of known ld.so names
  * capture-libs: Allow patterns to be read from a file
  * tests: Fix Debianisms
  * tests/capture-libs: Tolerate path to ld.so not being fully resolved
  * capsule-malloc: Remove duplicate typedef for mstate, for clang 8
  * Distinguish between enabling the library and enabling shared libraries.
    Some tests for capsule-capture-libs will need to compile shared
    libraries, even if libcapsule itself is not built.
  * tests: Make older linkers happy with one of our test libraries
  * tests: Cope with newer versions of GNU make
  * debian: Tell git-version-gen that we are behaving as an upstream

 -- Simon McVittie <smcv@collabora.com>  Wed, 24 Jun 2020 19:06:02 +0100

libcapsule (0.20190926.0-0co1) upstream; urgency=medium

  * utils: Add --help, --version and GNU argument parsing to all tools
  * capture-libs: Clarify by introducing more temporaries
  * capture-libs: Factor out library_cmp_by_name()
  * capture-libs: Treat unversioned libraries as in indeterminate order.
    This avoids always choosing the container version of libgcc_s.so.1
    when using a Debian-derived container on Fedora, even if the host
    version is newer.

 -- Simon McVittie <smcv@collabora.com>  Thu, 26 Sep 2019 16:45:42 +0100

libcapsule (0.20190724.0-0co1) upstream; urgency=medium

  * process_pt_dynamic: Add missing 'break' to DT_JMPREL case
  * safe_strncpy: Work around -Werror=stringop-truncation
  * Add some notes on building from git on older host systems
  * capture-libs: Fix a misleading debug message
  * capture-libs: Don't capture results of path-match if they are other ABIs

 -- Simon McVittie <smcv@collabora.com>  Wed, 24 Jul 2019 17:13:32 +0100

libcapsule (0.20190402.0-0co1) upstream; urgency=medium

  * debian: Install tools with canonicalized multiarch prefix
  * debian: Build relocatable versions of libcapsule binary tools
  * debian: Use dh_missing --fail-missing
  * Build *.1 man pages with xsltproc even if gtk-doc is disabled
  * shim: Add a minimal fallback version of PKG_CHECK_VAR
  * Skip GLib tests when GLib is older than 2.38

 -- Simon McVittie <smcv@collabora.com>  Tue, 02 Apr 2019 17:32:19 +0100

libcapsule (0.20190130.0-0co1) upstream; urgency=medium

  * Be more compatible with older distributions:
    - debian: Be compatible with Ubuntu 14.04's dpkg
    - Compile on older glibc that didn't have secure_getenv()
    - dump: Avoid naming collision with basename()
    - capture-libs: Avoid shadowing global abs()
    - process-pt-dynamic: Don't print name of R_386_SIZE32 if undefined
    - devhelp2man: Add minimal support for older gtk-doc versions
    - debian: Install libglib2.0-dev if building documentation,
      as required by older gtk-doc versions
    - debian: Use macros from libcapsule itself to build libGL proxy
    - tests/utils.c: Tolerate archaic GLib versions
  * autogen.sh: Install macros into m4/
  * capsule-init-project: Create m4/
  * debian: Separate documentation into libcapsule-doc
  * debian: Don't build with fatal warnings
  * debian: Explicitly disable silent makefile rules,
    which debhelper didn't always do for us
  * build: Be more specific about the tokens we don't want to see,
    to future-proof against newer autoconf-archive versions
  * ci: Check out the right git repository
  * CapsuleTest: Tolerate bwrap not being installed at all
  * tests/capture-libs.pl: Make executable

 -- Simon McVittie <smcv@collabora.com>  Wed, 30 Jan 2019 15:48:43 +0000

libcapsule (0.20180517.0-0co1) upstream; urgency=medium

  * build: Bundle updated m4 macros in source releases so that they can
    be built on older host OSs that do not have a recent autoconf-archive
  * capture-libs test: Cope with i686, cmov CPU capability flags
  * tests: Fix perl warnings for shadowing a local variable
  * Fix cross-compilation for i386 on amd64:
    - Architecture-qualify perl as :any
    - Only build GLib-based tests on amd64 since libglib2.0-dev was not
      multiarch co-installable until recently
    - tests: Work when compiling for i386 on amd64
  * ci: Run autopkgtests on Debian stretch and SteamOS brewmaster

 -- Simon McVittie <smcv@collabora.com>  Thu, 17 May 2018 21:35:21 +0100

libcapsule (0.20180430.0-0co1) upstream; urgency=medium

  [ Vivek Das Mohapatra ]
  * Fix a potential segfault in the ELF memory dumper
  * Replace the free/*alloc cluster inside the capsule
  * Improve API documentation
  * Improve debug output
  * debian: Ignore some package/build debris

  [ Simon McVittie ]
  * Add capture-libs tool and use it for tests/manual/gl.pl
  * Don't stop reading symbol tables at an unknown ELFW_ST_TYPE, ELFW_ST_BIND
  * Improve error propagation
  * Improve debug output
  * utils: Use getenv rather than secure_getenv to reduce glibc dependencies
    (libcapsule itself still uses secure_getenv)
  * libGL: Use the symbol set from GLVND libGL
  * libGL: Add shims for libXi, libgbm, libGLX, libEGL, libOpenGL, libGLESv2
  * libGL: Don't exclude misc X libraries from encapsulation
  * tests/manual/gl.pl: Bind-mount more host files into the container
  * tests/manual/gl.pl: Merge /gl and /updates into /overrides
  * tests/manual/gl.pl: Make anything from the host available via /run/host
  * build: Install capsule-elf-dump
  * build: Consolidate lists of GL shims using patsubst
  * build: Add maintainer-update-gl-shims convenience target
  * build: Make host prefix for tools modifiable
  * build: Add a build option to add a -rpath to the tools
  * build: Allow shared library to be disabled, if you only want the tools
  * build: Don't run a test program, just link it, to help cross-compiling
  * ci: Add a Jenkinsfile to build libcapsule on SteamOS
  * debian: Add more test dependencies

 -- Simon McVittie <smcv@collabora.com>  Mon, 30 Apr 2018 14:35:22 +0100

libcapsule (0.20171116.0-0co1) upstream; urgency=medium

  [ Vivek Das Mohapatra ]
  * Fix NULL dereferences after dlclose()
  * Improve dlsym() emulation

  [ Simon McVittie ]
  * tests/manual/gl.pl: Provide finer-grained control over libraries
  * tests/manual/gl.pl: Provide shortcuts for plausible approaches to
    Mesa and Nvidia graphics stacks
  * Adjust packaging so libcapsule-tools can be installed without
    libcapsule-dev, for better ability to test multiarch containers
    - capsule.pc has been replaced by libcapsule.pc (library)
      and libcapsule-tools.pc (tools)

 -- Simon McVittie <smcv@collabora.com>  Thu, 16 Nov 2017 13:42:22 +0000

libcapsule (0.20171113.0-0co1) upstream; urgency=medium

  [ Vivek Das Mohapatra ]
  * Allow multiple encapsulated libraries, sharing one namespace per prefix
  * Generate working Autotools projects for libraries with hyphen/minus in
    their names
  * Handle DT_REL entries
  * Cope with shim libraries being dlclose()d

  [ Simon McVittie ]
  * Change capsule-init-project invocation so it can generate multiple
    shim libraries per Autotools project
  * Mark libcapsule as non-deletable so its exported functions can never
    disappear from library users' relocations
  * Always use the same dlopen() implementation outside the capsule
  * Automatically exclude glibc from encapsulation
  * Install libGL shims in a new libcapsule-libgl1-shims binary package
  * Install development tools into $(bindir)

 -- Simon McVittie <smcv@collabora.com>  Mon, 13 Nov 2017 18:57:50 +0000

libcapsule (0.20171019.0-0co1) upstream; urgency=medium

  [ Vivek Das Mohapatra ]
  * Initial release

 -- Simon McVittie <smcv@collabora.com>  Thu, 19 Oct 2017 16:18:55 +0100
