Skip to content

Commit

Permalink
snapper: update to 0.8.7
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
  • Loading branch information
ndowens authored and Juan RP committed Dec 25, 2019
1 parent 1d88a84 commit 7d772c8
Show file tree
Hide file tree
Showing 15 changed files with 168 additions and 157 deletions.
2 changes: 1 addition & 1 deletion common/shlibs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions srcpkgs/snapper/patches/0001-musl-sterror_r.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From a4068f03b471777151c4eb43fc70c3b6ebf8df3a Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens04@gmail.com>
Date: Wed, 18 Dec 2019 18:23:38 -0600
Subject: [PATCH 1/4] musl-sterror_r

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
---
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

26 changes: 26 additions & 0 deletions srcpkgs/snapper/patches/0002-musl-mktime.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 6385e34fb13dbfabd0b4b93f7670eac0c490637f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens04@gmail.com>
Date: Wed, 18 Dec 2019 18:24:08 -0600
Subject: [PATCH 2/4] musl-mktime

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
---
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

60 changes: 60 additions & 0 deletions srcpkgs/snapper/patches/0003-musl-_nl_msg_cat_cntr.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
From 554bf69b4cfb5e91a20f0df0ac0fef918648fb48 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens04@gmail.com>
Date: Wed, 18 Dec 2019 18:26:02 -0600
Subject: [PATCH 3/4] musl-_nl_msg_cat_cntr

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
---
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 <stdexcept>
#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

26 changes: 26 additions & 0 deletions srcpkgs/snapper/patches/0004-musl-stdout_stderr.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From d519c3c94a029d6891b0703ce5adb6ea0ac8b9fa Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens04@gmail.com>
Date: Wed, 18 Dec 2019 18:27:17 -0600
Subject: [PATCH 4/4] musl-stdout_stderr

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
---
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 <list>
#include <boost/noncopyable.hpp>

+#undef stdout
+#undef stderr

namespace snapper
{
--
2.24.1

13 changes: 0 additions & 13 deletions srcpkgs/snapper/patches/fix-poll_h.patch

This file was deleted.

19 changes: 0 additions & 19 deletions srcpkgs/snapper/patches/musl-__isleap.patch

This file was deleted.

51 changes: 0 additions & 51 deletions srcpkgs/snapper/patches/musl-_nl_msg_cat_cntr.patch

This file was deleted.

15 changes: 0 additions & 15 deletions srcpkgs/snapper/patches/musl-mktime.patch

This file was deleted.

12 changes: 0 additions & 12 deletions srcpkgs/snapper/patches/musl-mode_t.patch

This file was deleted.

15 changes: 0 additions & 15 deletions srcpkgs/snapper/patches/musl-stdout_stderr.patch

This file was deleted.

14 changes: 0 additions & 14 deletions srcpkgs/snapper/patches/musl-strerror_r.patch

This file was deleted.

12 changes: 0 additions & 12 deletions srcpkgs/snapper/patches/musl-unistd.h.diff

This file was deleted.

27 changes: 27 additions & 0 deletions srcpkgs/snapper/patches/musl_u_int-type.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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>
---
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 <string>
#include <vector>
#include <utility>
+#ifndef __GLIBC__
+#include <sys/types.h>
+#endif

namespace snapper
{
--
2.24.1

7 changes: 2 additions & 5 deletions srcpkgs/snapper/template
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -14,7 +14,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
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
Expand All @@ -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

Expand Down

0 comments on commit 7d772c8

Please sign in to comment.