diff options
-rw-r--r-- | testing/snapper/APKBUILD | 26 | ||||
-rw-r--r-- | testing/snapper/miss-tinfo-link-to-ncurses.patch | 11 | ||||
-rw-r--r-- | testing/snapper/musl-mktime.patch | 19 | ||||
-rw-r--r-- | testing/snapper/musl-posix.patch | 21 | ||||
-rw-r--r-- | testing/snapper/musl-u_int_type.patch | 19 | ||||
-rw-r--r-- | testing/snapper/remove-systemd.patch | 35 |
6 files changed, 22 insertions, 109 deletions
diff --git a/testing/snapper/APKBUILD b/testing/snapper/APKBUILD index 5a192bd0791..1fbac7d3095 100644 --- a/testing/snapper/APKBUILD +++ b/testing/snapper/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Francesco Colista <fcolista@alpinelinux.org> # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=snapper -pkgver=0.8.14 -pkgrel=1 +pkgver=0.8.15 +pkgrel=0 pkgdesc="Manage filesystem snapshots and allow undo of system modifications" url="http://snapper.io" arch="all" @@ -12,16 +12,13 @@ depends="dbus" makedepends="acl-dev autoconf automake bash boost-dev boost-thread bsd-compat-headers btrfs-progs-dev dbus-dev docbook-xsl e2fsprogs-dev gettext-dev - libtool libxml2-dev libxslt lvm2-dev" + libtool libxml2-dev libxslt lvm2-dev ncurses-dev + json-c-dev json-c" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" source="$pkgname-$pkgver.tar.gz::https://github.com/openSUSE/snapper/archive/v$pkgver.tar.gz - musl-posix.patch - musl-mktime.patch musl-stdout_stderr.patch musl-_nl_msg_cat_cntr.patch - musl-u_int_type.patch - remove-systemd.patch - " + miss-tinfo-link-to-ncurses.patch" prepare() { default_prepare @@ -36,6 +33,7 @@ prepare() { } build() { + export CXXFLAGS="$CXXFLAGS -DMUSL_LIBC=1" export LDFLAGS="$LDFLAGS -lintl" ./configure \ --build=$CBUILD \ @@ -47,7 +45,9 @@ build() { --disable-pam \ --disable-zypp \ --disable-ext4 \ - --disable-systemd + --disable-systemd \ + JSONC_CFLAGS="-I/usr/include/json-c" \ + JSONC_LIBS="-ljson-c" make } @@ -57,14 +57,10 @@ check() { package() { make DESTDIR="$pkgdir" install - install -Dm644 data/sysconfig.snapper "$pkgdir"/etc/conf.d/$pkgname } -sha512sums="2268d68e13da42426ebfe204f1983db8a0f149015df1e75a2d322c80d2c01a4166a290d0df440cb27fa4086f2d9e21def71f933db419d817ed48ef8e3695b90b snapper-0.8.14.tar.gz -a9eec8105e94c4eb097aa293754b0de45420a297ad845933a7be66b3ff49af409dd427e9bd1de569c49982c619211d1e90183ed8bf8550acb0fa9d83176e22bf musl-posix.patch -ca59aaa4411abf51136b25ee8dd57fae6fc01ce21c36ac79811b4ed8b4352c5b396ce42b7c4c49d8679a9bef8375fe48b65c1ff84bbf1f192583f3b93dce1bd8 musl-mktime.patch +sha512sums="cdcc811c4299373e22043780a2cc06e7d5bca44fbf62f92ecb76162e791849b6002b35fe804b8b89524fd5e3ed26ed4120f09b62b202e41fedb7339ab9fe267c snapper-0.8.15.tar.gz 5baf722996706146b62fd0a0d9b321496fb122e700af2d3dfd8272de2678f29c79bc2b1a03634b04aab3f226632dfdebc5674d3128737e85bcc71461e951d95b musl-stdout_stderr.patch 6f3324700cc697b29b2fe14e42eb765b4474bf7e582d8ea53122fe66e128d17584489c8e2adbfecc8aac37c683a9d4dc2a821e3ea0143334cd8b899164ba708c musl-_nl_msg_cat_cntr.patch -36bc62b09f1795c955de603e6faa92b640b772182f00e1c192edada9b327a7433a6541d62f2d77cf1c1c0f42958409d66f987f03db75a1140b0d17b77f666bc8 musl-u_int_type.patch -36c64a5a1c1302fe1d4f07b6a64664c9f3415eaeae5e6eafba2589096a5e5f7f826d5a8816e5c29e2da5cd60890eb0f4e2c88169f8b013df2e7329b2a38eef09 remove-systemd.patch" +3d264f7f9156342d5bad2ac78db9c8a30ea1ac25648245631a47d1495bb6610c6b39c28a5013741063df3c08f459388c0467caaedde5ad7cebb433eb432b7a70 miss-tinfo-link-to-ncurses.patch" diff --git a/testing/snapper/miss-tinfo-link-to-ncurses.patch b/testing/snapper/miss-tinfo-link-to-ncurses.patch new file mode 100644 index 00000000000..821700803e6 --- /dev/null +++ b/testing/snapper/miss-tinfo-link-to-ncurses.patch @@ -0,0 +1,11 @@ +diff --git a/client/utils/Makefile.am b/client/utils/Makefile.am +index c55fc4a..21aeaae 100644 +--- a/client/utils/Makefile.am ++++ b/client/utils/Makefile.am +@@ -18,5 +18,5 @@ libutils_la_SOURCES = \ + CsvFormatter.cc CsvFormatter.h \ + JsonFormatter.cc JsonFormatter.h + +-libutils_la_LIBADD = ../../snapper/libsnapper.la -ltinfo ++libutils_la_LIBADD = ../../snapper/libsnapper.la -lncurses + diff --git a/testing/snapper/musl-mktime.patch b/testing/snapper/musl-mktime.patch deleted file mode 100644 index b4351f4fc81..00000000000 --- a/testing/snapper/musl-mktime.patch +++ /dev/null @@ -1,19 +0,0 @@ -According to https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_21.html -timelocal(2) is functionally identical to mktime(2), but more -mnemonically named. There is no timelocal(2) defined in musl libc. - ---- a/snapper/AppUtil.cc -+++ b/snapper/AppUtil.cc -@@ -279,10 +279,10 @@ - { - struct tm s; - memset(&s, 0, sizeof(s)); -- const char* p = strptime(str.c_str(), "%F %T", &s); -+ const char* p = strptime(str.c_str(), "%Y-%m-%d %T", &s); - if (!p || *p != '\0') - return (time_t)(-1); -- return utc ? timegm(&s) : timelocal(&s); -+ return utc ? timegm(&s) : mktime(&s); - } - - diff --git a/testing/snapper/musl-posix.patch b/testing/snapper/musl-posix.patch deleted file mode 100644 index 132d489c6db..00000000000 --- a/testing/snapper/musl-posix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/snapper/AppUtil.cc b/snapper/AppUtil.cc -index 052235d..ab81983 100644 ---- a/snapper/AppUtil.cc -+++ b/snapper/AppUtil.cc -@@ -223,16 +223,10 @@ - string - stringerror(int errnum) - { --#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE - char buf1[100]; - if (strerror_r(errnum, buf1, sizeof(buf1) - 1) == 0) - return string(buf1); - return string("strerror failed"); --#else -- char buf1[100]; -- const char* buf2 = strerror_r(errnum, buf1, sizeof(buf1) - 1); -- return string(buf2); --#endif - } - - diff --git a/testing/snapper/musl-u_int_type.patch b/testing/snapper/musl-u_int_type.patch deleted file mode 100644 index 1be4070f8d7..00000000000 --- a/testing/snapper/musl-u_int_type.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 7ddd58ee5e6b7c3a8df3086ff5a6d17d19362761 Mon Sep 17 00:00:00 2001 -From: Nathan Owens <ndowens04@gmail.com> -Date: Wed, 18 Dec 2019 18:35:55 -0600 -Subject: [PATCH] musl-_u_int-types - -Signed-off-by: Nathan Owens <ndowens04@gmail.com> ---- ---- a/client/utils/JsonFormatter.h -+++ b/client/utils/JsonFormatter.h -@@ -25,6 +25,9 @@ - #include <string> - #include <vector> - #include <utility> -+#ifndef __GLIBC__ -+#include <sys/types.h> -+#endif - - namespace snapper - { diff --git a/testing/snapper/remove-systemd.patch b/testing/snapper/remove-systemd.patch deleted file mode 100644 index a53e884e86e..00000000000 --- a/testing/snapper/remove-systemd.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 1191266..07428ce 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -123,6 +123,10 @@ AC_ARG_ENABLE([zypp], AC_HELP_STRING([--disable-zypp],[Disable zypp plugin suppo - [with_zypp=$enableval],[with_zypp=yes]) - AM_CONDITIONAL(HAVE_ZYPP, [test "x$with_zypp" = "xyes"]) - -+AC_ARG_ENABLE([systemd], AC_HELP_STRING([--disable-systemd],[Disable systemd support]), -+ [enable_systemd=$enableval],[enable_systemd=yes]) -+AM_CONDITIONAL(ENABLE_SYSTEMD, [test "x$enable_systemd" = "xyes"]) -+ - AC_CHECK_LIB(btrfs, btrfs_read_and_process_send_stream) - AC_CHECK_HEADERS([btrfs/version.h]) - -diff --git a/data/Makefile.am b/data/Makefile.am -index 81f8b48..b9a761c 100644 ---- a/data/Makefile.am -+++ b/data/Makefile.am -@@ -21,6 +21,7 @@ install-data-local: - install -D -m 644 org.opensuse.Snapper.conf $(DESTDIR)/etc/dbus-1/system.d/org.opensuse.Snapper.conf - install -D -m 644 org.opensuse.Snapper.service $(DESTDIR)/usr/share/dbus-1/system-services/org.opensuse.Snapper.service - -+if ENABLE_SYSTEMD - install -D -m 644 timeline.service $(DESTDIR)/usr/lib/systemd/system/snapper-timeline.service - install -D -m 644 timeline.timer $(DESTDIR)/usr/lib/systemd/system/snapper-timeline.timer - install -D -m 644 cleanup.service $(DESTDIR)/usr/lib/systemd/system/snapper-cleanup.service -@@ -28,6 +29,7 @@ install-data-local: - install -D -m 644 boot.service $(DESTDIR)/usr/lib/systemd/system/snapper-boot.service - install -D -m 644 boot.timer $(DESTDIR)/usr/lib/systemd/system/snapper-boot.timer - install -D -m 644 snapperd.service $(DESTDIR)/usr/lib/systemd/system/snapperd.service -+endif - - if HAVE_ZYPP - install -D -m 644 zypp-plugin.conf $(DESTDIR)/etc/snapper/zypp-plugin.conf |