diff --git a/community/snapper/PKGBUILD b/community/snapper/PKGBUILD index fd4cfcbce..d5d047ef3 100644 --- a/community/snapper/PKGBUILD +++ b/community/snapper/PKGBUILD @@ -7,7 +7,7 @@ pkgname=snapper pkgver=0.5.4 -pkgrel=1 +pkgrel=2 pkgdesc="A tool for managing BTRFS and LVM snapshots. It can create, diff and restore snapshots and provides timelined auto-snapping." arch=('x86_64') url="http://snapper.io" @@ -16,12 +16,17 @@ depends=('btrfs-progs' 'libxml2' 'dbus' 'boost-libs' 'acl') makedepends=('boost' 'lvm2' 'libxslt' 'docbook-xsl' 'pam' 'git' 'systemd') optdepends=('pam: pam_snapper') backup=('etc/conf.d/snapper') -source=("ftp://ftp.suse.com/pub/projects/$pkgname/$pkgname-$pkgver.tar.bz2") -sha256sums=('5af181423fb2b272ad45c6a38501aad13f87f3efb0b3d37595b795ec1afab7f2') +source=("ftp://ftp.suse.com/pub/projects/$pkgname/$pkgname-$pkgver.tar.bz2" + 'add-missing-pthread-library-for-server.patch') +sha256sums=('5af181423fb2b272ad45c6a38501aad13f87f3efb0b3d37595b795ec1afab7f2' + '933c3f6c4974885a015951906aba7771c5785e520b3d8f3619a92c2186bc6019') prepare() { cd "$srcdir/$pkgname-$pkgver" + # https://github.com/openSUSE/snapper/pull/409 + patch -Np1 -i ../add-missing-pthread-library-for-server.patch + # cron names sed -e 's@suse.de-snapper@snapper@g' -i scripts/Makefile.am @@ -34,7 +39,7 @@ prepare() { # all in /usr/bin sed -i -e 's@/usr/sbin@/usr/bin@g' data/org.opensuse.Snapper.service - # NTP drift file location + # NTP drift file location sed -i -e 's@/var/lib/ntp/drift/ntp.drift@/var/lib/ntp/ntp.drift@' data/base.txt # man pages sysconfig location diff --git a/community/snapper/add-missing-pthread-library-for-server.patch b/community/snapper/add-missing-pthread-library-for-server.patch new file mode 100644 index 000000000..6839cfcfe --- /dev/null +++ b/community/snapper/add-missing-pthread-library-for-server.patch @@ -0,0 +1,27 @@ +From 4f3f9d516c68c99b412b6e4b2eaa6e25f389b337 Mon Sep 17 00:00:00 2001 +From: Adam Majer <amajer@suse.de> +Date: Tue, 22 May 2018 09:43:21 +0200 +Subject: [PATCH] Add missing pthread library for server + +While building snapper with Boost 1.67, the following error +occurred, + +/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: Client.o: undefined reference to symbol 'pthread_condattr_setclock@@GLIBC_2.3.3' +/lib64/libpthread.so.0: error adding symbols: DSO missing from command line +collect2: error: ld returned 1 exit status +make[2]: *** [Makefile:440: snapperd] Error 1 +make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/snapper-0.5.4/server' +--- + server/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/server/Makefile.am b/server/Makefile.am +index 2a6a4c2d..009fe414 100644 +--- a/server/Makefile.am ++++ b/server/Makefile.am +@@ -14,4 +14,4 @@ snapperd_SOURCES = \ + Types.cc Types.h + + snapperd_LDADD = ../snapper/libsnapper.la ../dbus/libdbus.la -lrt +-snapperd_LDFLAGS = -lboost_system -lboost_thread ++snapperd_LDFLAGS = -lboost_system -lboost_thread -lpthread