From b6af1e02efe594039707cd882517663d5370f375 Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Thu, 25 Aug 2016 15:26:24 +0200 Subject: testing/[multiple]: move unmaintained packages This moves all packages from testing to unmaintained which have not been updated for atleast 6 months. If you are affected by this commit please follow this proceddure: * make sure your packages build on all architectures * move your pacakge(s) back to testing * if you want to keep this package and can maintain it (or find somebody to maintain it for you) for a minimum of 6 months ask it to be moved to community --- unmaintained/csync2/APKBUILD | 84 +++++++++++++++++++++++++++++++ unmaintained/csync2/csync2-openssl.cnf | 31 ++++++++++++ unmaintained/csync2/csync2.initd | 11 ++++ unmaintained/csync2/csync2.post-install | 25 +++++++++ unmaintained/csync2/csync2.post-upgrade | 6 +++ unmaintained/csync2/have-strlcpy.patch | 30 +++++++++++ unmaintained/csync2/longlong-format.patch | 31 ++++++++++++ unmaintained/csync2/nossl-config.patch | 19 +++++++ 8 files changed, 237 insertions(+) create mode 100644 unmaintained/csync2/APKBUILD create mode 100644 unmaintained/csync2/csync2-openssl.cnf create mode 100644 unmaintained/csync2/csync2.initd create mode 100644 unmaintained/csync2/csync2.post-install create mode 100644 unmaintained/csync2/csync2.post-upgrade create mode 100644 unmaintained/csync2/have-strlcpy.patch create mode 100644 unmaintained/csync2/longlong-format.patch create mode 100644 unmaintained/csync2/nossl-config.patch (limited to 'unmaintained/csync2') diff --git a/unmaintained/csync2/APKBUILD b/unmaintained/csync2/APKBUILD new file mode 100644 index 0000000000..3dc51815eb --- /dev/null +++ b/unmaintained/csync2/APKBUILD @@ -0,0 +1,84 @@ +# Contributor: Sören Tempel +# Contributor: Valery Kartel +# Contributor: Natanael Copa +# Maintainer: Natanael Copa +pkgname=csync2 +pkgver=2.0 +pkgrel=3 +pkgdesc="Cluster synchronization tool" +url="http://oss.linbit.com/csync2/" +arch="all" +license="GPL2+" +depends="openssl" +depends_dev="" +makedepends="autoconf automake librsync-dev gnutls-dev sqlite-dev mysql-dev postgresql-dev" +install="$pkgname.post-install $pkgname.post-upgrade" +subpackages="$pkgname-compare $pkgname-doc" +source="http://oss.linbit.com/$pkgname/$pkgname-$pkgver.tar.gz + csync2-openssl.cnf + longlong-format.patch + nossl-config.patch + have-strlcpy.patch + $pkgname.initd" + +_builddir="$srcdir"/$pkgname-$pkgver +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + autoreconf --install --force +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc/$pkgname \ + --localstatedir=/var \ + --docdir=/usr/share/doc/$pkgname \ + --mandir=/usr/share/man \ + --enable-postgres \ + --enable-mysql \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 + cp doc/* "$pkgdir"/usr/share/doc/$pkgname/ || return 1 + + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 +} + +compare() { + subpkgdesc="csync2 compare script" + arch="noarch" + depends="bash perl-digest-md5" + + mkdir -p "$subpkgdir"/usr/sbin + mv "$pkgdir"/usr/sbin/$pkgname-compare \ + "$subpkgdir"/usr/sbin/ || return 1 +} + +md5sums="4069fc9e86e8508c392fe2862059eb91 csync2-2.0.tar.gz +f2f42a8ba543d5a22d2740e794c7f872 csync2-openssl.cnf +8fc73254db29316f9125761d18f1ed46 longlong-format.patch +b5adcbe1a3b0bc409336e539087319ea nossl-config.patch +3ed476916ba9afa7c4aa587ae86a6e34 have-strlcpy.patch +8197fe5a195d1e7a6843f0be7f9230f5 csync2.initd" +sha256sums="11cb37380fb185bce0c22b804fec9b01c385d9d83cc528cfd48d748453834fa2 csync2-2.0.tar.gz +53e2ae5141f9b1517072798f2d78b63b7a4653e59ebeb626940a7b8d173bc4df csync2-openssl.cnf +afb1317987cc4b81908bc437269162c7af23b34e6842306483da5b53efce2db3 longlong-format.patch +bc7abcb34224b6ea77cd4f90ee69d916b4bc7ef0f321bd649b1060ff54cdc084 nossl-config.patch +f9aad05465919657894ee24fd102451790911445d0d8291ce565242a96f6024e have-strlcpy.patch +c45f4177182cb567b9581e9882cf3004bbdde174b44b02b212df0e16a60bd6f8 csync2.initd" +sha512sums="f91fd222f67affe9634471d341b43ff67854a6ed25b620301a454e98a79a9fb80b2a66eb8713546758fd08300d52751e5ca7472c696daa20ee11779b87a830f8 csync2-2.0.tar.gz +614da46cdaea46da5de8d3f4e4dc634f34ec5fa402af8557e17324c43dd6b06cc4797bfb42bd5d0d4e34edcf9eb30241bd9054732d75e9646edd32e650fde7d4 csync2-openssl.cnf +38a17cbf23cbccd4996ad1af049851e33179586e619e3f3edbfacbaa36662e44d916839acd59b1cfc67b3af9042c3258068ec9e5b57f7e26c00a41a0e6f0e148 longlong-format.patch +9fe50c761ba463ebeecda147c7172526bb9a2378e11101bcab60433b2aec389439eefe8139539babe0d680e2f30cc69df34788454a1d3dce64decd66cc153b32 nossl-config.patch +66a4762c2a6f99dd0f48aaf36d977150b93f3710de8ae34f090636285115a5801878089ca509d26737bbc30fadb6f9f6acebad8cea1c60e40aaff95ce43ee3a6 have-strlcpy.patch +617235cb9383e72f48e7dd1aa82ecca394b87ceb1e5853b6eb04fb620e6146828fdf64a117d899be4174d3ddde81c9b092937fedada6d0c213825124d70546ee csync2.initd" diff --git a/unmaintained/csync2/csync2-openssl.cnf b/unmaintained/csync2/csync2-openssl.cnf new file mode 100644 index 0000000000..7f64b1c2ed --- /dev/null +++ b/unmaintained/csync2/csync2-openssl.cnf @@ -0,0 +1,31 @@ +[ req ] +default_bits = 1024 +encrypt_key = yes +distinguished_name = req_dn +x509_extensions = cert_type +prompt = no + +[ req_dn ] +# country (2 letter code) +#C=UA + +# State or Province Name (full name) +#ST= + +# Locality Name (eg. city) +#L=Kyiv + +# Organization (eg. company) +#O=CSync2 + +# Organizational Unit Name (eg. section) +OU=CSYNC2 Server + +# Common Name (*.example.com is also possible) +CN=csync2.example.com + +# E-mail contact +emailAddress=root@example.com + +[ cert_type ] +nsCertType = server diff --git a/unmaintained/csync2/csync2.initd b/unmaintained/csync2/csync2.initd new file mode 100644 index 0000000000..43c545e357 --- /dev/null +++ b/unmaintained/csync2/csync2.initd @@ -0,0 +1,11 @@ +#!/sbin/openrc-run + +pidfile="/run/csync2.pid" +command="/usr/sbin/csync2" +command_args="-ii${CSYNC2_OPTS:+ $CSYNC2_OPTS}" +command_background="yes" + +depend() { + need net localmount + after firewall +} diff --git a/unmaintained/csync2/csync2.post-install b/unmaintained/csync2/csync2.post-install new file mode 100644 index 0000000000..ab02fa0c82 --- /dev/null +++ b/unmaintained/csync2/csync2.post-install @@ -0,0 +1,25 @@ +#!/bin/sh + +OPENSSL=${OPENSSL:-openssl} +OPENSSL_CONF=${OPENSSL_CONF:-/etc/csync2/csync2-openssl.cnf} + +CRTFILE=/etc/csync2/csync2_ssl_cert.pem +CSRFILE=/etc/csync2/csync2_ssl_cert.csr +KEYFILE=/etc/csync2/csync2_ssl_key.pem + +if [ -f $CRTFILE ]; then + echo "$CRTFILE already exists, won't overwrite" + exit 0 +fi + +if [ -f $KEYFILE ]; then + echo "$KEYFILE already exists, won't overwrite" + exit 0 +fi + +$OPENSSL genrsa -out $KEYFILE 1024 || exit 2 +$OPENSSL req -config $OPENSSL_CONF -new -key $KEYFILE -out $CSRFILE || exit 2 +$OPENSSL x509 -req -days 365 -in $CSRFILE -signkey $KEYFILE -out $CRTFILE || exit 2 + +chmod 0600 $KEYFILE +rm $CSRFILE diff --git a/unmaintained/csync2/csync2.post-upgrade b/unmaintained/csync2/csync2.post-upgrade new file mode 100644 index 0000000000..48ac7a01d2 --- /dev/null +++ b/unmaintained/csync2/csync2.post-upgrade @@ -0,0 +1,6 @@ +#!/bin/sh + +mv /etc/csync2.cfg /etc/csync2/ >/dev/null 2>&1 +mv /etc/csync2_ssl_*.pem /etc/csync2/ >/dev/null 2>&1 + +exit 0 diff --git a/unmaintained/csync2/have-strlcpy.patch b/unmaintained/csync2/have-strlcpy.patch new file mode 100644 index 0000000000..394e1ec4b8 --- /dev/null +++ b/unmaintained/csync2/have-strlcpy.patch @@ -0,0 +1,30 @@ +--- old/configure.ac ++++ new/configure.ac +@@ -43,7 +43,7 @@ + + + dnl inspired by rsync's configure.ac +-AC_CHECK_FUNCS(fchmod setmode open64 mkstemp64) ++AC_CHECK_FUNCS(strlcpy fchmod setmode open64 mkstemp64) + AC_CACHE_CHECK([for secure mkstemp],csync_cv_HAVE_SECURE_MKSTEMP,[ + AC_TRY_RUN([#include + #include +--- old/rsync.c ++++ new/rsync.c +@@ -38,7 +38,7 @@ + #include + #endif + +- ++#ifndef HAVE_STRLCPY + /* This has been taken from rsync:lib/compat.c */ + + /** +@@ -61,6 +61,7 @@ + } + return ret; + } ++#endif + + /* splits filepath at the last '/', if any, like so: + * dirname basename filepath diff --git a/unmaintained/csync2/longlong-format.patch b/unmaintained/csync2/longlong-format.patch new file mode 100644 index 0000000000..a37488d7de --- /dev/null +++ b/unmaintained/csync2/longlong-format.patch @@ -0,0 +1,31 @@ +--- old/checktxt.c ++++ new/checktxt.c +@@ -49,7 +49,7 @@ + xxprintf("v1"); + + if ( !S_ISLNK(st->st_mode) && !S_ISDIR(st->st_mode) ) +- xxprintf(":mtime=%Ld", ign_mtime ? (long long)0 : (long long)st->st_mtime); ++ xxprintf(":mtime=%lld", ign_mtime ? (long long)0 : (long long)st->st_mtime); + + if ( !csync_ignore_mod ) + xxprintf(":mode=%d", (int)st->st_mode); +@@ -61,7 +61,7 @@ + xxprintf(":gid=%d", (int)st->st_gid); + + if ( S_ISREG(st->st_mode) ) +- xxprintf(":type=reg:size=%Ld", (long long)st->st_size); ++ xxprintf(":type=reg:size=%lld", (long long)st->st_size); + + if ( S_ISDIR(st->st_mode) ) + xxprintf(":type=dir"); +--- old/update.c ++++ new/update.c +@@ -469,7 +469,7 @@ + + skip_action: + if ( !S_ISLNK(st.st_mode) ) { +- conn_printf("SETIME %s %s %Ld\n", ++ conn_printf("SETIME %s %s %lld\n", + url_encode(key), url_encode(filename), + (long long)st.st_mtime); + last_conn_status = read_conn_status(filename, peername); diff --git a/unmaintained/csync2/nossl-config.patch b/unmaintained/csync2/nossl-config.patch new file mode 100644 index 0000000000..66e76f88ab --- /dev/null +++ b/unmaintained/csync2/nossl-config.patch @@ -0,0 +1,19 @@ +--- old/csync2.cfg ++++ new/csync2.cfg +@@ -4,12 +4,15 @@ + # Please read the documentation: + # http://oss.linbit.com/csync2/paper.pdf + ++# Do not use ssl by default ++nossl * *; ++ + # group mygroup + # { + # host host1 host2 (host3); + # host host4@host4-eth2; + # +-# key /etc/csync2.key_mygroup; ++# key /etc/csync2/csync2.key_mygroup; + # + # # + # # WARNING: -- cgit v1.2.3