From 7d772c879b3591a3a6c3e5bee14c8d055b37027e Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Wed, 18 Dec 2019 19:13:58 -0600 Subject: [PATCH] snapper: update to 0.8.7 Signed-off-by: Nathan Owens --- common/shlibs | 2 +- .../snapper/patches/0001-musl-sterror_r.patch | 26 ++++++++ .../snapper/patches/0002-musl-mktime.patch | 26 ++++++++ .../patches/0003-musl-_nl_msg_cat_cntr.patch | 60 +++++++++++++++++++ .../patches/0004-musl-stdout_stderr.patch | 26 ++++++++ srcpkgs/snapper/patches/fix-poll_h.patch | 13 ---- srcpkgs/snapper/patches/musl-__isleap.patch | 19 ------ .../patches/musl-_nl_msg_cat_cntr.patch | 51 ---------------- srcpkgs/snapper/patches/musl-mktime.patch | 15 ----- srcpkgs/snapper/patches/musl-mode_t.patch | 12 ---- .../snapper/patches/musl-stdout_stderr.patch | 15 ----- srcpkgs/snapper/patches/musl-strerror_r.patch | 14 ----- srcpkgs/snapper/patches/musl-unistd.h.diff | 12 ---- srcpkgs/snapper/patches/musl_u_int-type.patch | 27 +++++++++ srcpkgs/snapper/template | 7 +-- 15 files changed, 168 insertions(+), 157 deletions(-) create mode 100644 srcpkgs/snapper/patches/0001-musl-sterror_r.patch create mode 100644 srcpkgs/snapper/patches/0002-musl-mktime.patch create mode 100644 srcpkgs/snapper/patches/0003-musl-_nl_msg_cat_cntr.patch create mode 100644 srcpkgs/snapper/patches/0004-musl-stdout_stderr.patch delete mode 100644 srcpkgs/snapper/patches/fix-poll_h.patch delete mode 100644 srcpkgs/snapper/patches/musl-__isleap.patch delete mode 100644 srcpkgs/snapper/patches/musl-_nl_msg_cat_cntr.patch delete mode 100644 srcpkgs/snapper/patches/musl-mktime.patch delete mode 100644 srcpkgs/snapper/patches/musl-mode_t.patch delete mode 100644 srcpkgs/snapper/patches/musl-stdout_stderr.patch delete mode 100644 srcpkgs/snapper/patches/musl-strerror_r.patch delete mode 100644 srcpkgs/snapper/patches/musl-unistd.h.diff create mode 100644 srcpkgs/snapper/patches/musl_u_int-type.patch diff --git a/common/shlibs b/common/shlibs index d2dab1cd675ae5..431b81cc4e7cec 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1418,7 +1418,7 @@ libgfchangelog.so.0 libglusterfs-3.8.0_1 libgfrpc.so.0 libglusterfs-3.8.0_1 libgfxdr.so.0 libglusterfs-3.8.0_1 libgfapi.so.0 libglusterfs-3.8.0_1 -libsnapper.so.4 libsnapper-0.4.1_1 +libsnapper.so.5 libsnapper-0.4.1_1 libtsm.so.3 libtsm-3_1 libxine.so.2 libxine-1.2.4_1 libjbig2dec.so.0 libjbig2dec-0.11_1 diff --git a/srcpkgs/snapper/patches/0001-musl-sterror_r.patch b/srcpkgs/snapper/patches/0001-musl-sterror_r.patch new file mode 100644 index 00000000000000..3bd9be5872e0cb --- /dev/null +++ b/srcpkgs/snapper/patches/0001-musl-sterror_r.patch @@ -0,0 +1,26 @@ +From a4068f03b471777151c4eb43fc70c3b6ebf8df3a Mon Sep 17 00:00:00 2001 +From: Nathan Owens +Date: Wed, 18 Dec 2019 18:23:38 -0600 +Subject: [PATCH 1/4] musl-sterror_r + +Signed-off-by: Nathan Owens +--- + snapper/AppUtil.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/snapper/AppUtil.cc b/snapper/AppUtil.cc +index 553065c..2897276 100644 +--- snapper/AppUtil.cc ++++ snapper/AppUtil.cc +@@ -223,7 +223,7 @@ namespace snapper + string + stringerror(int errnum) + { +-#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE ++#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE || MUSL_LIBC + char buf1[100]; + if (strerror_r(errnum, buf1, sizeof(buf1) - 1) == 0) + return string(buf1); +-- +2.24.1 + diff --git a/srcpkgs/snapper/patches/0002-musl-mktime.patch b/srcpkgs/snapper/patches/0002-musl-mktime.patch new file mode 100644 index 00000000000000..25850a519a37bf --- /dev/null +++ b/srcpkgs/snapper/patches/0002-musl-mktime.patch @@ -0,0 +1,26 @@ +From 6385e34fb13dbfabd0b4b93f7670eac0c490637f Mon Sep 17 00:00:00 2001 +From: Nathan Owens +Date: Wed, 18 Dec 2019 18:24:08 -0600 +Subject: [PATCH 2/4] musl-mktime + +Signed-off-by: Nathan Owens +--- + snapper/AppUtil.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/snapper/AppUtil.cc b/snapper/AppUtil.cc +index 2897276..64812d7 100644 +--- snapper/AppUtil.cc ++++ snapper/AppUtil.cc +@@ -288,7 +288,7 @@ namespace snapper + const char* p = strptime(str.c_str(), "%F %T", &s); + if (!p || *p != '\0') + return (time_t)(-1); +- return utc ? timegm(&s) : timelocal(&s); ++ return utc ? timegm(&s) : mktime(&s); + } + + +-- +2.24.1 + diff --git a/srcpkgs/snapper/patches/0003-musl-_nl_msg_cat_cntr.patch b/srcpkgs/snapper/patches/0003-musl-_nl_msg_cat_cntr.patch new file mode 100644 index 00000000000000..303e79d709c79d --- /dev/null +++ b/srcpkgs/snapper/patches/0003-musl-_nl_msg_cat_cntr.patch @@ -0,0 +1,60 @@ +From 554bf69b4cfb5e91a20f0df0ac0fef918648fb48 Mon Sep 17 00:00:00 2001 +From: Nathan Owens +Date: Wed, 18 Dec 2019 18:26:02 -0600 +Subject: [PATCH 3/4] musl-_nl_msg_cat_cntr + +Signed-off-by: Nathan Owens +--- + snapper/Regex.cc | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/snapper/Regex.cc b/snapper/Regex.cc +index da8f862..6b2cd2d 100644 +--- snapper/Regex.cc ++++ snapper/Regex.cc +@@ -21,9 +21,9 @@ + + #include + #include "snapper/Regex.h" +- ++#ifdef __GLIBC__ + extern int _nl_msg_cat_cntr; +- ++#endif + + namespace snapper + { +@@ -40,8 +40,10 @@ Regex::Regex (const string& pattern, int cflags, unsigned int nm) + regerror(errcode, &rx, error, esize); + throw std::runtime_error(string("Regex compilation error: ") + error); + } ++#ifdef __GLIBC__ + my_nl_msg_cat_cntr = _nl_msg_cat_cntr; +- rm = new regmatch_t[nm]; ++#endif ++ rm = new regmatch_t[nm]; + } + + +@@ -55,11 +57,16 @@ Regex::~Regex () + bool + Regex::match (const string& str, int eflags) const + { +- if (my_nl_msg_cat_cntr != _nl_msg_cat_cntr) { ++#ifdef __GLIBC__ ++ if (my_nl_msg_cat_cntr != _nl_msg_cat_cntr) ++#endif ++ { + regfree (&rx); + regcomp (&rx, pattern.c_str (), cflags); ++#ifdef __GLIBC__ + my_nl_msg_cat_cntr = _nl_msg_cat_cntr; +- } ++#endif ++ } + + last_str = str; + +-- +2.24.1 + diff --git a/srcpkgs/snapper/patches/0004-musl-stdout_stderr.patch b/srcpkgs/snapper/patches/0004-musl-stdout_stderr.patch new file mode 100644 index 00000000000000..0524aa1c0fb348 --- /dev/null +++ b/srcpkgs/snapper/patches/0004-musl-stdout_stderr.patch @@ -0,0 +1,26 @@ +From d519c3c94a029d6891b0703ce5adb6ea0ac8b9fa Mon Sep 17 00:00:00 2001 +From: Nathan Owens +Date: Wed, 18 Dec 2019 18:27:17 -0600 +Subject: [PATCH 4/4] musl-stdout_stderr + +Signed-off-by: Nathan Owens +--- + snapper/SystemCmd.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/snapper/SystemCmd.h b/snapper/SystemCmd.h +index 3d38604..72bbb2b 100644 +--- snapper/SystemCmd.h ++++ snapper/SystemCmd.h +@@ -32,6 +32,8 @@ + #include + #include + ++#undef stdout ++#undef stderr + + namespace snapper + { +-- +2.24.1 + diff --git a/srcpkgs/snapper/patches/fix-poll_h.patch b/srcpkgs/snapper/patches/fix-poll_h.patch deleted file mode 100644 index 656d974d671dc9..00000000000000 --- a/srcpkgs/snapper/patches/fix-poll_h.patch +++ /dev/null @@ -1,13 +0,0 @@ -The correct location is , not - ---- snapper/SystemCmd.h 2014-02-05 14:22:06.000000000 +0100 -+++ snapper/SystemCmd.h 2015-08-30 10:56:03.685179465 +0200 -@@ -23,7 +23,7 @@ - #ifndef SNAPPER_SYSTEM_CMD_H - #define SNAPPER_SYSTEM_CMD_H - --#include -+#include - #include - - #include diff --git a/srcpkgs/snapper/patches/musl-__isleap.patch b/srcpkgs/snapper/patches/musl-__isleap.patch deleted file mode 100644 index 0e8358edc3f5ab..00000000000000 --- a/srcpkgs/snapper/patches/musl-__isleap.patch +++ /dev/null @@ -1,19 +0,0 @@ -The macro __isleap() is defined in glibc's time.h -If it is not defined, define it the same (for musl libc). - ---- client/utils/equal-date.h 2014-12-11 18:21:17.000000000 +0100 -+++ client/utils/equal-date.h 2015-08-30 11:18:08.181207315 +0200 -@@ -19,6 +19,13 @@ - * find current contact information at www.novell.com. - */ - -+#if !defined(__isleap) -+/* Nonzero if YEAR is a leap year (every 4 years, -+ except every 100th isn't, and every 400th is). */ -+# define __isleap(year) \ -+ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) -+#endif -+ - - bool - equal_year(const struct tm& tmp1, const struct tm& tmp2); diff --git a/srcpkgs/snapper/patches/musl-_nl_msg_cat_cntr.patch b/srcpkgs/snapper/patches/musl-_nl_msg_cat_cntr.patch deleted file mode 100644 index e28bef5c0c7230..00000000000000 --- a/srcpkgs/snapper/patches/musl-_nl_msg_cat_cntr.patch +++ /dev/null @@ -1,51 +0,0 @@ -There is no _nl_msg_cat_cntr in musl libc and optimizations -based upon its unchanged value are not possible. - ---- snapper/Regex.cc 2014-01-29 16:48:30.000000000 +0100 -+++ snapper/Regex.cc 2015-08-30 11:07:34.613193993 +0200 -@@ -22,7 +22,9 @@ - - #include "snapper/Regex.h" - -+#if defined(__GLIBC__) - extern int _nl_msg_cat_cntr; -+#endif - - - namespace snapper -@@ -34,7 +36,9 @@ - nm (cflags & REG_NOSUB ? 0 : nm) - { - regcomp (&rx, pattern, cflags); -+#if defined(__GLIBC__) - my_nl_msg_cat_cntr = _nl_msg_cat_cntr; -+#endif - rm = new regmatch_t[nm]; - } - -@@ -45,7 +49,9 @@ - nm (cflags & REG_NOSUB ? 0 : nm) - { - regcomp (&rx, pattern.c_str (), cflags); -+#if defined(__GLIBC__) - my_nl_msg_cat_cntr = _nl_msg_cat_cntr; -+#endif - rm = new regmatch_t[nm]; - } - -@@ -60,11 +66,15 @@ - bool - Regex::match (const string& str, int eflags) const - { -+#if defined(__GLIBC__) - if (my_nl_msg_cat_cntr != _nl_msg_cat_cntr) { -+#endif - regfree (&rx); - regcomp (&rx, pattern.c_str (), cflags); -+#if defined(__GLIBC__) - my_nl_msg_cat_cntr = _nl_msg_cat_cntr; - } -+#endif - - last_str = str; - diff --git a/srcpkgs/snapper/patches/musl-mktime.patch b/srcpkgs/snapper/patches/musl-mktime.patch deleted file mode 100644 index b680b435b55bb0..00000000000000 --- a/srcpkgs/snapper/patches/musl-mktime.patch +++ /dev/null @@ -1,15 +0,0 @@ -According to http://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. - ---- snapper/AppUtil.cc 2015-02-18 18:54:03.000000000 +0100 -+++ snapper/AppUtil.cc 2015-08-30 10:39:31.318158599 +0200 -@@ -274,7 +274,7 @@ - const char* p = strptime(str.c_str(), "%F %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/srcpkgs/snapper/patches/musl-mode_t.patch b/srcpkgs/snapper/patches/musl-mode_t.patch deleted file mode 100644 index 85a321a3c22e42..00000000000000 --- a/srcpkgs/snapper/patches/musl-mode_t.patch +++ /dev/null @@ -1,12 +0,0 @@ -The mode_t type is defined in fcntl.h - ---- snapper/FileUtils.h 2015-02-18 18:54:03.000000000 +0100 -+++ snapper/FileUtils.h 2015-08-30 10:45:43.285166420 +0200 -@@ -24,6 +24,7 @@ - #define SNAPPER_FILE_UTILS_H - - -+#include - #include - #include - #include diff --git a/srcpkgs/snapper/patches/musl-stdout_stderr.patch b/srcpkgs/snapper/patches/musl-stdout_stderr.patch deleted file mode 100644 index 2a3eb2bb87bee3..00000000000000 --- a/srcpkgs/snapper/patches/musl-stdout_stderr.patch +++ /dev/null @@ -1,15 +0,0 @@ -In musl libc stdout and stderr are macros, thus we need to -undefine them to be able to use SystemCmd::stdout() and ::stderr() -members without renaming them - which may be a better choice. - ---- snapper/SystemCmd.h 2015-08-30 10:59:53.740184303 +0200 -+++ snapper/SystemCmd.h 2015-08-30 11:02:34.229187677 +0200 -@@ -31,6 +31,8 @@ - #include - #include - -+#undef stdout -+#undef stderr - - namespace snapper - { diff --git a/srcpkgs/snapper/patches/musl-strerror_r.patch b/srcpkgs/snapper/patches/musl-strerror_r.patch deleted file mode 100644 index 8d155aa4481d8c..00000000000000 --- a/srcpkgs/snapper/patches/musl-strerror_r.patch +++ /dev/null @@ -1,14 +0,0 @@ -In musl libc the return type of strerror_r(2) is int (XSI-compliant). -We define MUSL_LIBC in CXXFLAGS to skip the wrong #else implementation. - ---- snapper/AppUtil.cc 2019-01-26 13:29:29.110490961 +0200 -+++ snapper/AppUtil.cc 2019-01-26 13:29:51.324648467 +0200 -@@ -223,7 +223,7 @@ namespace snapper - string - stringerror(int errnum) - { --#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE -+#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE || MUSL_LIBC - char buf1[100]; - if (strerror_r(errnum, buf1, sizeof(buf1) - 1) == 0) - return string(buf1); diff --git a/srcpkgs/snapper/patches/musl-unistd.h.diff b/srcpkgs/snapper/patches/musl-unistd.h.diff deleted file mode 100644 index f8db190b9e3774..00000000000000 --- a/srcpkgs/snapper/patches/musl-unistd.h.diff +++ /dev/null @@ -1,12 +0,0 @@ -Need to include unistd.h to define uid_t for musl libc. - ---- snapper/Snapshot.h 2015-02-18 18:54:03.000000000 +0100 -+++ snapper/Snapshot.h 2015-08-30 10:33:14.197150669 +0200 -@@ -25,6 +25,7 @@ - - - #include -+#include - #include - #include - #include diff --git a/srcpkgs/snapper/patches/musl_u_int-type.patch b/srcpkgs/snapper/patches/musl_u_int-type.patch new file mode 100644 index 00000000000000..66cb63b2f12224 --- /dev/null +++ b/srcpkgs/snapper/patches/musl_u_int-type.patch @@ -0,0 +1,27 @@ +From 7ddd58ee5e6b7c3a8df3086ff5a6d17d19362761 Mon Sep 17 00:00:00 2001 +From: Nathan Owens +Date: Wed, 18 Dec 2019 18:35:55 -0600 +Subject: [PATCH] musl-_u_int-types + +Signed-off-by: Nathan Owens +--- + client/utils/JsonFormatter.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git client/utils/JsonFormatter.h client/utils/JsonFormatter.h +index 79f7672..501b77d 100644 +--- client/utils/JsonFormatter.h ++++ client/utils/JsonFormatter.h +@@ -25,6 +25,9 @@ + #include + #include + #include ++#ifndef __GLIBC__ ++#include ++#endif + + namespace snapper + { +-- +2.24.1 + diff --git a/srcpkgs/snapper/template b/srcpkgs/snapper/template index fdbde3c84ad52a..8b754efda8bccf 100644 --- a/srcpkgs/snapper/template +++ b/srcpkgs/snapper/template @@ -1,6 +1,6 @@ # Template file for 'snapper' pkgname=snapper -version=0.8.5 +version=0.8.7 revision=1 build_style=gnu-configure configure_args="--disable-zypp --with-conf=/etc/conf.d" @@ -14,7 +14,7 @@ maintainer="Orphaned " license="GPL-2.0-only" homepage="http://snapper.io" distfiles="https://github.com/openSUSE/snapper/archive/v${version}.tar.gz" -checksum=f7269eeca6e400609d5fbf6b2bef1594e2483a6a0b09b10174fd582b8b13ead2 +checksum=13c56586b01ece9ca3d1ac19a9e7384385662b7600788f56c9940919ae6f1467 lib32disabled=yes case "$XBPS_TARGET_MACHINE" in @@ -29,9 +29,6 @@ pre_configure() { # fix config location in cron scripts sed -i -e 's@/etc/sysconfig/@/etc/conf.d/@g' scripts/snapper-{daily,hourly} - sed -i -e 's@lboost_thread-mt@lboost_thread@g' snapper/Makefile.am - sed -i -e 's@lboost_system-mt@lboost_system@g' snapper/Makefile.am - # fix pam plugin install location sed -i -e 's@shell echo /@shell echo /usr/@g' pam/Makefile.am