Hello community,
here is the log from the commit of package bpftrace for openSUSE:Factory checked in at 2020-01-31 23:57:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bpftrace (Old)
and /work/SRC/openSUSE:Factory/.bpftrace.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bpftrace"
Fri Jan 31 23:57:29 2020 rev:2 rq:769016 version:0.9.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/bpftrace/bpftrace.changes 2019-12-27 13:49:20.116486803 +0100
+++ /work/SRC/openSUSE:Factory/.bpftrace.new.26092/bpftrace.changes 2020-01-31 23:58:54.355701818 +0100
@@ -1,0 +2,8 @@
+Fri Jan 31 09:19:26 UTC 2020 - Aleksa Sarai <asarai(a)suse.com>
+
+- Fix builds on Leap 15.1. This requires quite a bit of trickery related to
+ binutils (see boo#1162312), but it's nothing too hard.
+- Added patch to workaround boo#1162312.
+ + boo1162312-cmake-use-_LIBRARIES-when-testing-for-libbfd-version.patch
+
+-------------------------------------------------------------------
New:
----
boo1162312-cmake-use-_LIBRARIES-when-testing-for-libbfd-version.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bpftrace.spec ++++++
--- /var/tmp/diff_new_pack.IX7hxg/_old 2020-01-31 23:58:55.211702261 +0100
+++ /var/tmp/diff_new_pack.IX7hxg/_new 2020-01-31 23:58:55.215702263 +0100
@@ -1,7 +1,7 @@
#
# spec file for package bpftrace
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,10 @@
URL: https://github.com/iovisor/bpftrace
Source: https://github.com/iovisor/bpftrace/archive/v%{version}.tar.gz#/%{name}-%{v…
Patch0: install-man-dir.patch
+# FIX-UPSTREAM: Backport of https://github.com/iovisor/bpftrace/pull/1121. boo#1162312
+Patch1: boo1162312-cmake-use-_LIBRARIES-when-testing-for-libbfd-version.patch
+BuildRequires: binutils
+BuildRequires: binutils-devel
BuildRequires: bison
BuildRequires: clang
BuildRequires: clang-devel
@@ -59,16 +63,25 @@
%prep
%setup -q
%patch0 -p1
+# boo#1162312
+%patch1 -p1
# Correct the #!-line to avoid rpmlint warnings.
find tools -name '*.bt' -type f \
-exec sed -i '1s|^#!%{_bindir}/env bpftrace|#!%{_bindir}/bpftrace|' '{}' ';'
%build
+# Find libbfd.so and libopcodes.so. This is necessary because binutils gives
+# these libraries very strange names which CMake cannot find. See boo#1162312.
+LIBBFD="$(find "%{_libdir}" -type f -name 'libbfd*.so*')"
+LIBOPCODES="$(find "%{_libdir}" -type f -name 'libopcodes*.so*')"
+
%define _lto_cflags %{nil}
export CC="clang"
export CXX="clang++"
%cmake \
+ -DLIBBFD_LIBRARIES="${LIBBFD}" \
+ -DLIBOPCODES_LIBRARIES="${LIBOPCODES}" \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DBUILD_STATIC_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF
++++++ boo1162312-cmake-use-_LIBRARIES-when-testing-for-libbfd-version.patch ++++++
>From 87f1a5ce8a098d89ccfc0c2b3124c8fc45041725 Mon Sep 17 00:00:00 2001
From: Aleksa Sarai <cyphar(a)cyphar.com>
Date: Fri, 31 Jan 2020 20:09:08 +1100
Subject: [PATCH] cmake: use *_LIBRARIES when testing for libbfd version
On openSUSE, binutils has really strangely named libbfd and libopcodes
libraries[1]. This is fine (we can define *_LIBRARIES variables), but the
result is that the LIBBFD_DISASM_FOUR_ARGS_SIGNATURE test will always
fail because CHECK_CXX_SOURCE_COMPILES cannot find the right libraries.
The fix is simple -- just use *_LIBRARIES for CMAKE_REQUIRED_LIBRARIES.
We need to find_library(LibOpcodes) for that test, but that isn't too
bad because CMake caches the result.
[1]: https://bugzilla.suse.com/show_bug.cgi?id=1162312
Signed-off-by: Aleksa Sarai <cyphar(a)cyphar.com>
---
cmake/FindLibBfd.cmake | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmake/FindLibBfd.cmake b/cmake/FindLibBfd.cmake
index d8b7bf1e2c6b..c659d46e313e 100644
--- a/cmake/FindLibBfd.cmake
+++ b/cmake/FindLibBfd.cmake
@@ -61,7 +61,8 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibBfd "Please install the libbfd development
mark_as_advanced(LIBBFD_INCLUDE_DIRS LIBBFD_LIBRARIES)
if(${LIBBFD_FOUND})
-SET(CMAKE_REQUIRED_LIBRARIES bfd opcodes)
+find_package(LibOpcodes)
+SET(CMAKE_REQUIRED_LIBRARIES ${LIBBFD_LIBRARIES} ${LIBOPCODES_LIBRARIES})
INCLUDE(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("
#include <string.h>
--
2.25.0
Hello community,
here is the log from the commit of package lxd for openSUSE:Factory checked in at 2020-01-31 23:57:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lxd (Old)
and /work/SRC/openSUSE:Factory/.lxd.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lxd"
Fri Jan 31 23:57:13 2020 rev:9 rq:769025 version:3.20
Changes:
--------
--- /work/SRC/openSUSE:Factory/lxd/lxd.changes 2020-01-23 15:54:34.871084130 +0100
+++ /work/SRC/openSUSE:Factory/.lxd.new.26092/lxd.changes 2020-01-31 23:58:36.315692467 +0100
@@ -1,0 +2,19 @@
+Fri Jan 31 10:16:27 UTC 2020 - Aleksa Sarai <asarai(a)suse.com>
+
+- Backport https://github.com/canonical/dqlite/pull/207 to fix boo#1156336.
+ + boo1156336-0001-vfs-vfs__delete-fix-double-unlock-of-root-mutex.patch
+
+-------------------------------------------------------------------
+Fri Jan 31 00:33:47 UTC 2020 - Aleksa Sarai <asarai(a)suse.com>
+
+- Update to LXD 3.20. The full upstream changelog is available from:
+ https://discuss.linuxcontainers.org/t/lxd-3-20-has-been-released/6673
+ boo#1162299
+ + Server side support of API collections
+ + New unix-hotplug device type
+ + Support for standby cluster members
+- Update packaging to use GOPATH="_dist" rather than trying to move everything
+ to vendor/. This is the recommended approach by upstream (and makes our
+ specfile marginally less horrific).
+
+-------------------------------------------------------------------
Old:
----
lxd-3.19.tar.gz
lxd-3.19.tar.gz.asc
New:
----
boo1156336-0001-vfs-vfs__delete-fix-double-unlock-of-root-mutex.patch
lxd-3.20.tar.gz
lxd-3.20.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lxd.spec ++++++
--- /var/tmp/diff_new_pack.hyr3B4/_old 2020-01-31 23:58:37.599693132 +0100
+++ /var/tmp/diff_new_pack.hyr3B4/_new 2020-01-31 23:58:37.599693132 +0100
@@ -23,7 +23,7 @@
%define import_path github.com/lxc/lxd
Name: lxd
-Version: 3.19
+Version: 3.20
Release: 0
Summary: Container hypervisor based on LXC
License: Apache-2.0
@@ -38,10 +38,13 @@
# Additional runtime configuration.
Source200: %{name}.sysctl
Source201: %{name}.dnsmasq
+# FIX-UPSTREAM: Backport of https://github.com/canonical/dqlite/pull/207. boo#1156336
+Patch100: boo1156336-0001-vfs-vfs__delete-fix-double-unlock-of-root-mutex.patch
BuildRequires: fdupes
BuildRequires: golang-packaging
BuildRequires: libacl-devel
BuildRequires: libcap-devel
+BuildRequires: libudev-devel
BuildRequires: patchelf
BuildRequires: pkg-config
BuildRequires: rsync
@@ -87,29 +90,13 @@
%prep
%setup -q
-
-# If there is a vendor/ move it to _dist/src/.
-if [ -d vendor ]
-then
- cp -at _dist/src vendor/*
- rm -rf vendor/
-fi
-# Move _dist/src (which is LXD's variant of vendoring) to vendor/.
-mv -v _dist/src vendor
-
-# For some reason, some vendored packages have stored their vendored sources
-# within their source tree inside the vendor tree (?!). So we need to
-# workaround this, even though it's probably a bug in LXD packaging.
-for vendor in $(find vendor/* -type d -name vendor)
-do
- rsync -a "$vendor/" vendor/
- rm -rf "$vendor/"
-done
+# boo#1156336
+%patch100 -d _dist/deps/dqlite -p1
# Create fake "go mod"-like import paths. This is going to be really fun to
# maintain but it's unfortunately necessary because openSUSE doesn't have nice
# "go mod" support in OBS...
-ln -s . vendor/github.com/cpuguy83/go-md2man/v2
+ln -s . _dist/src/github.com/cpuguy83/go-md2man/v2
%build
# Make sure any leftover go build caches are gone.
@@ -188,6 +175,9 @@
awk -F: '$1 == "main" { print $2 }' | \
grep -Ev '^github.com/lxc/lxd/(test|shared)')"
+# _dist/src is effectively an old-school "vendor/" tree, so add it to GOPATH.
+export GOPATH="$GOPATH:$PKGDIR/_dist"
+
# And now we can finally build LXD and all of the related binaries.
mkdir bin
for mainpkg in "${mainpkgs[@]}"
++++++ boo1156336-0001-vfs-vfs__delete-fix-double-unlock-of-root-mutex.patch ++++++
>From 13548f8bdb309d18801de9febb8f5829b6b9ae55 Mon Sep 17 00:00:00 2001
From: Aleksa Sarai <cyphar(a)cyphar.com>
Date: Fri, 31 Jan 2020 20:57:47 +1100
Subject: [PATCH] vfs: vfs__delete: fix double-unlock of &root->mutex
vfs__delete_contents would unlock the passed &root->mutex, but all of
its callers would then also unlock the passed &root->mutex. It turns out
that this works on most architectures without issue, but apparently on
some Intel CPUs with TSX enabled this will trigger a general protection
fault[1,2].
This was the cause of a very frustrating bug where LXD would segfault on
start-up[3].
[1]: https://lwn.net/Articles/534758/
[2]: https://software.intel.com/en-us/forums/intel-isa-extensions/topic/675036
[3]: https://bugzilla.opensuse.org/show_bug.cgi?id=1156336
Signed-off-by: Aleksa Sarai <cyphar(a)cyphar.com>
---
src/vfs.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/vfs.c b/src/vfs.c
index 3a4c205a1d4a..443a6ad3b980 100644
--- a/src/vfs.c
+++ b/src/vfs.c
@@ -619,7 +619,6 @@ static int vfs__delete_content(struct root *root, const char *filename)
/* Check that there are no consumers of this file. */
if (content->refcount > 0) {
root->error = EBUSY;
- pthread_mutex_unlock(&root->mutex);
rc = SQLITE_IOERR_DELETE;
goto err;
}
@@ -630,8 +629,6 @@ static int vfs__delete_content(struct root *root, const char *filename)
/* Reset the file content slot. */
*(root->contents + content_index) = NULL;
- pthread_mutex_unlock(&root->mutex);
-
return SQLITE_OK;
err:
--
2.25.0
++++++ lxd-3.19.tar.gz -> lxd-3.20.tar.gz ++++++
/work/SRC/openSUSE:Factory/lxd/lxd-3.19.tar.gz /work/SRC/openSUSE:Factory/.lxd.new.26092/lxd-3.20.tar.gz differ: char 18, line 1