From 10b4495bd2fb968a2de29bd4f5bdc8ca964907b1 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sun, 24 Jun 2018 23:01:23 +0200 Subject: community/csync2: move from testing --- community/csync2/APKBUILD | 47 +++++++++++++++++++++++++++++++ community/csync2/csync2.initd | 6 ++++ community/csync2/fix-build-ppc64le.patch | 48 ++++++++++++++++++++++++++++++++ testing/csync2/APKBUILD | 47 ------------------------------- testing/csync2/csync2.initd | 6 ---- testing/csync2/fix-build-ppc64le.patch | 48 -------------------------------- 6 files changed, 101 insertions(+), 101 deletions(-) create mode 100644 community/csync2/APKBUILD create mode 100644 community/csync2/csync2.initd create mode 100644 community/csync2/fix-build-ppc64le.patch delete mode 100644 testing/csync2/APKBUILD delete mode 100644 testing/csync2/csync2.initd delete mode 100644 testing/csync2/fix-build-ppc64le.patch diff --git a/community/csync2/APKBUILD b/community/csync2/APKBUILD new file mode 100644 index 00000000000..c012b1b5ba9 --- /dev/null +++ b/community/csync2/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +pkgname=csync2 +pkgver=2.0 +pkgrel=2 +pkgdesc="Cluster synchronization tool" +url="http://oss.linbit.com/csync2/" +arch="all" +license="GPL-2.0-or-later" +options="!check" # tests needs to modify system's network config +makedepends="autoconf automake bison flex gnutls-dev librsync-dev sqlite-dev" +depends="bash" +subpackages="$pkgname-doc $pkgname-openrc" +source="https://github.com/LINBIT/$pkgname/archive/$pkgname-$pkgver.tar.gz + $pkgname.initd + fix-build-ppc64le.patch" +builddir="$srcdir/$pkgname-$pkgname-$pkgver" + +prepare() { + default_prepare + + cd "$builddir" + sh ./autogen.sh +} + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc/csync2 \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +package() { + cd "$builddir" + + make DESTDIR="$pkgdir" install + install -m 755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname +} + +sha512sums="7555e2d958d6213e29cfa8b3b7415eea9a9868036865c519d724ae404006d913fba4aeeb61a916d3fc95669a6ca12160d4f52dc7d15bd59403e8a7de50ee8094 csync2-2.0.tar.gz +e2df7f2993781709dadd0ce24bc31e16259382c8b3c432c47c3790f78b37124d38fb5036e87a06747538d864fdf68b8984bf2d4bce09158cddd58c10f4411d9f csync2.initd +4566ba1139615e5011c881e670d8976d3b5226e27521fd6ced126a5a3687683c145931fa89a9b6b0ab967f982bf778c33148e6c9f7ee29ef5154593ae02efb2a fix-build-ppc64le.patch" diff --git a/community/csync2/csync2.initd b/community/csync2/csync2.initd new file mode 100644 index 00000000000..c16522e9260 --- /dev/null +++ b/community/csync2/csync2.initd @@ -0,0 +1,6 @@ +#!/sbin/openrc-run + +command="/usr/sbin/csync2" +command_args="-ii ${command_args:-}" +command_background="yes" +pidfile="/run/$RC_SVCNAME.pid" diff --git a/community/csync2/fix-build-ppc64le.patch b/community/csync2/fix-build-ppc64le.patch new file mode 100644 index 00000000000..36d996d15f9 --- /dev/null +++ b/community/csync2/fix-build-ppc64le.patch @@ -0,0 +1,48 @@ +From b66d2989e45605cf927fd0f2144696d320e08180 Mon Sep 17 00:00:00 2001 +From: Roland Kammerer +Date: Fri, 15 Jun 2018 16:16:45 +0200 +Subject: [PATCH] build: check for strlcpy() + +Check for stlcpy() and if found, disable the internal compat code. + +This does not fix all cases, as we would also have to check for libbsd +and link with "-lbsd". Still, this helps Alpine, as their favorite libc +(musl) implements strlcpy(). +--- + configure.ac | 2 +- + rsync.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 741010f..f3ebff7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,7 +43,7 @@ AM_CONDITIONAL([HAVE_PDFLATEX], test -n "$PDFLATEX") + + + dnl inspired by rsync's configure.ac +-AC_CHECK_FUNCS(fchmod setmode open64 mkstemp64) ++AC_CHECK_FUNCS(fchmod setmode open64 mkstemp64 strlcpy) + AC_CACHE_CHECK([for secure mkstemp],csync_cv_HAVE_SECURE_MKSTEMP,[ + AC_TRY_RUN([#include + #include +diff --git a/rsync.c b/rsync.c +index 3eb6b3e..667a227 100644 +--- a/rsync.c ++++ b/rsync.c +@@ -49,6 +49,7 @@ + * + * @return index of the terminating byte. + **/ ++#ifndef HAVE_STRLCPY + static size_t strlcpy(char *d, const char *s, size_t bufsize) + { + size_t len = strlen(s); +@@ -61,6 +62,7 @@ static size_t strlcpy(char *d, const char *s, size_t bufsize) + } + return ret; + } ++#endif + + /* splits filepath at the last '/', if any, like so: + * dirname basename filepath diff --git a/testing/csync2/APKBUILD b/testing/csync2/APKBUILD deleted file mode 100644 index c012b1b5ba9..00000000000 --- a/testing/csync2/APKBUILD +++ /dev/null @@ -1,47 +0,0 @@ -# Contributor: Jakub Jirutka -# Maintainer: Jakub Jirutka -pkgname=csync2 -pkgver=2.0 -pkgrel=2 -pkgdesc="Cluster synchronization tool" -url="http://oss.linbit.com/csync2/" -arch="all" -license="GPL-2.0-or-later" -options="!check" # tests needs to modify system's network config -makedepends="autoconf automake bison flex gnutls-dev librsync-dev sqlite-dev" -depends="bash" -subpackages="$pkgname-doc $pkgname-openrc" -source="https://github.com/LINBIT/$pkgname/archive/$pkgname-$pkgver.tar.gz - $pkgname.initd - fix-build-ppc64le.patch" -builddir="$srcdir/$pkgname-$pkgname-$pkgver" - -prepare() { - default_prepare - - cd "$builddir" - sh ./autogen.sh -} - -build() { - cd "$builddir" - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc/csync2 \ - --mandir=/usr/share/man \ - --localstatedir=/var - make -} - -package() { - cd "$builddir" - - make DESTDIR="$pkgdir" install - install -m 755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname -} - -sha512sums="7555e2d958d6213e29cfa8b3b7415eea9a9868036865c519d724ae404006d913fba4aeeb61a916d3fc95669a6ca12160d4f52dc7d15bd59403e8a7de50ee8094 csync2-2.0.tar.gz -e2df7f2993781709dadd0ce24bc31e16259382c8b3c432c47c3790f78b37124d38fb5036e87a06747538d864fdf68b8984bf2d4bce09158cddd58c10f4411d9f csync2.initd -4566ba1139615e5011c881e670d8976d3b5226e27521fd6ced126a5a3687683c145931fa89a9b6b0ab967f982bf778c33148e6c9f7ee29ef5154593ae02efb2a fix-build-ppc64le.patch" diff --git a/testing/csync2/csync2.initd b/testing/csync2/csync2.initd deleted file mode 100644 index c16522e9260..00000000000 --- a/testing/csync2/csync2.initd +++ /dev/null @@ -1,6 +0,0 @@ -#!/sbin/openrc-run - -command="/usr/sbin/csync2" -command_args="-ii ${command_args:-}" -command_background="yes" -pidfile="/run/$RC_SVCNAME.pid" diff --git a/testing/csync2/fix-build-ppc64le.patch b/testing/csync2/fix-build-ppc64le.patch deleted file mode 100644 index 36d996d15f9..00000000000 --- a/testing/csync2/fix-build-ppc64le.patch +++ /dev/null @@ -1,48 +0,0 @@ -From b66d2989e45605cf927fd0f2144696d320e08180 Mon Sep 17 00:00:00 2001 -From: Roland Kammerer -Date: Fri, 15 Jun 2018 16:16:45 +0200 -Subject: [PATCH] build: check for strlcpy() - -Check for stlcpy() and if found, disable the internal compat code. - -This does not fix all cases, as we would also have to check for libbsd -and link with "-lbsd". Still, this helps Alpine, as their favorite libc -(musl) implements strlcpy(). ---- - configure.ac | 2 +- - rsync.c | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 741010f..f3ebff7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -43,7 +43,7 @@ AM_CONDITIONAL([HAVE_PDFLATEX], test -n "$PDFLATEX") - - - dnl inspired by rsync's configure.ac --AC_CHECK_FUNCS(fchmod setmode open64 mkstemp64) -+AC_CHECK_FUNCS(fchmod setmode open64 mkstemp64 strlcpy) - AC_CACHE_CHECK([for secure mkstemp],csync_cv_HAVE_SECURE_MKSTEMP,[ - AC_TRY_RUN([#include - #include -diff --git a/rsync.c b/rsync.c -index 3eb6b3e..667a227 100644 ---- a/rsync.c -+++ b/rsync.c -@@ -49,6 +49,7 @@ - * - * @return index of the terminating byte. - **/ -+#ifndef HAVE_STRLCPY - static size_t strlcpy(char *d, const char *s, size_t bufsize) - { - size_t len = strlen(s); -@@ -61,6 +62,7 @@ static size_t strlcpy(char *d, const char *s, size_t bufsize) - } - return ret; - } -+#endif - - /* splits filepath at the last '/', if any, like so: - * dirname basename filepath -- cgit v1.2.3