[arch-commits] Commit in openslp/repos (10 files)

Jan de Groot jgc at archlinux.org
Sat Mar 11 22:57:51 UTC 2017


    Date: Saturday, March 11, 2017 @ 22:57:50
  Author: jgc
Revision: 290641

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  openslp/repos/staging-i686/
  openslp/repos/staging-i686/PKGBUILD
    (from rev 290640, openslp/trunk/PKGBUILD)
  openslp/repos/staging-i686/openslp-2.0.0-null-pointer-deref.patch
    (from rev 290640, openslp/trunk/openslp-2.0.0-null-pointer-deref.patch)
  openslp/repos/staging-i686/openslp-2.0.0-openssl-1.1-fix.patch
    (from rev 290640, openslp/trunk/openslp-2.0.0-openssl-1.1-fix.patch)
  openslp/repos/staging-i686/openslp.service
    (from rev 290640, openslp/trunk/openslp.service)
  openslp/repos/staging-x86_64/
  openslp/repos/staging-x86_64/PKGBUILD
    (from rev 290640, openslp/trunk/PKGBUILD)
  openslp/repos/staging-x86_64/openslp-2.0.0-null-pointer-deref.patch
    (from rev 290640, openslp/trunk/openslp-2.0.0-null-pointer-deref.patch)
  openslp/repos/staging-x86_64/openslp-2.0.0-openssl-1.1-fix.patch
    (from rev 290640, openslp/trunk/openslp-2.0.0-openssl-1.1-fix.patch)
  openslp/repos/staging-x86_64/openslp.service
    (from rev 290640, openslp/trunk/openslp.service)

-------------------------------------------------------+
 staging-i686/PKGBUILD                                 |   51 ++++++++++++++++
 staging-i686/openslp-2.0.0-null-pointer-deref.patch   |   12 +++
 staging-i686/openslp-2.0.0-openssl-1.1-fix.patch      |   25 +++++++
 staging-i686/openslp.service                          |   11 +++
 staging-x86_64/PKGBUILD                               |   51 ++++++++++++++++
 staging-x86_64/openslp-2.0.0-null-pointer-deref.patch |   12 +++
 staging-x86_64/openslp-2.0.0-openssl-1.1-fix.patch    |   25 +++++++
 staging-x86_64/openslp.service                        |   11 +++
 8 files changed, 198 insertions(+)

Copied: openslp/repos/staging-i686/PKGBUILD (from rev 290640, openslp/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2017-03-11 22:57:50 UTC (rev 290641)
@@ -0,0 +1,51 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=openslp
+pkgver=2.0.0
+pkgrel=2
+pkgdesc="Open-source implementation of Service Location Protocol"
+arch=('i686' 'x86_64')
+url="http://www.openslp.org"
+license=('BSD')
+depends=('bash' 'openssl')
+makedepends=('doxygen')
+backup=('etc/slp.conf' 'etc/slp.reg' 'etc/slp.spi')
+options=(!makeflags)
+source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz
+        openslp.service
+        openslp-2.0.0-null-pointer-deref.patch
+        openslp-2.0.0-openssl-1.1-fix.patch)
+sha256sums=('924337a2a8e5be043ebaea2a78365c7427ac6e9cee24610a0780808b2ba7579b'
+            '8bba465806891a5df4702ab25866bd43258a6b0370b6e0941d188568ef82bdb9'
+            'da639ca50ea3e7eeb747505171bc7678a444b6755a7068b0cd294cc87f1ebdbe'
+            'bf38f7a251ff41582c17451af185a964d1ed235d0f2ff294e1d2761da17ab078')
+
+prepare() {
+  cd $pkgname-$pkgver
+  sed -i 's|$(datadir)/doc|$(docdir)|' doc/Makefile.in
+  patch -Np1 -i ../openslp-2.0.0-null-pointer-deref.patch
+  patch -Np1 -i ../openslp-2.0.0-openssl-1.1-fix.patch
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr \
+    --sbindir=/usr/bin \
+    --sysconfdir=/etc \
+    --localstatedir=/var \
+    --docdir=/usr/share/doc/openslp-${pkgver} \
+    --enable-slpv1 \
+    --enable-slpv2-security # service would fail to start without this
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  make DESTDIR="${pkgdir}" INSTALL_DATA="cp -r" install-docs
+  rm "${pkgdir}/usr/share/doc/openslp-${pkgver}/openslp-doxy-${pkgver}.tar.gz"
+  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -D -m644 "${srcdir}/openslp.service" "${pkgdir}/usr/lib/systemd/system/openslp.service"
+}

Copied: openslp/repos/staging-i686/openslp-2.0.0-null-pointer-deref.patch (from rev 290640, openslp/trunk/openslp-2.0.0-null-pointer-deref.patch)
===================================================================
--- staging-i686/openslp-2.0.0-null-pointer-deref.patch	                        (rev 0)
+++ staging-i686/openslp-2.0.0-null-pointer-deref.patch	2017-03-11 22:57:50 UTC (rev 290641)
@@ -0,0 +1,12 @@
+diff -up openslp-2.0.0/common/slp_xmalloc.c.orig openslp-2.0.0/common/slp_xmalloc.c
+--- openslp-2.0.0/common/slp_xmalloc.c.orig	2012-12-07 01:52:08.000000000 +0100
++++ openslp-2.0.0/common/slp_xmalloc.c	2016-05-23 12:58:57.953532979 +0200
+@@ -203,6 +203,8 @@ void * _xrealloc(const char * file, int
+       if (x->size != size)
+       {
+          newptr = _xmalloc(file, line, size);
++         if (newptr == 0)
++            return 0;
+          memcpy(newptr, ptr, x->size);
+          _xfree(file, line, x);
+       }

Copied: openslp/repos/staging-i686/openslp-2.0.0-openssl-1.1-fix.patch (from rev 290640, openslp/trunk/openslp-2.0.0-openssl-1.1-fix.patch)
===================================================================
--- staging-i686/openslp-2.0.0-openssl-1.1-fix.patch	                        (rev 0)
+++ staging-i686/openslp-2.0.0-openssl-1.1-fix.patch	2017-03-11 22:57:50 UTC (rev 290641)
@@ -0,0 +1,25 @@
+diff -up openslp-2.0.0/common/slp_crypto.c.orig openslp-2.0.0/common/slp_crypto.c
+--- openslp-2.0.0/common/slp_crypto.c.orig	2012-12-07 21:13:28.000000000 +0100
++++ openslp-2.0.0/common/slp_crypto.c	2017-02-22 11:16:11.620835724 +0100
+@@ -88,11 +88,16 @@ SLPCryptoDSAKey * SLPCryptoDSAKeyDup(SLP
+    result =  DSA_new();
+    if (result)
+    {
+-      result->p = BN_dup(dsa->p);
+-      result->q = BN_dup(dsa->q);
+-      result->g = BN_dup(dsa->g);
+-      result->priv_key = BN_dup(dsa->priv_key);
+-      result->pub_key = BN_dup(dsa->pub_key);
++      const BIGNUM *p, *q, *g;
++      const BIGNUM *priv_key, *pub_key;
++
++      DSA_get0_pqg(dsa, &p, &q, &g);
++      DSA_get0_key(dsa, &pub_key, &priv_key);
++
++      /* would be nice to check return values,
++       * but original code didn't do that either... */
++      DSA_set0_pqg(result, BN_dup(p), BN_dup(q), BN_dup(g));
++      DSA_set0_key(result, BN_dup(pub_key), BN_dup(priv_key));
+    }
+    return result;
+ }

Copied: openslp/repos/staging-i686/openslp.service (from rev 290640, openslp/trunk/openslp.service)
===================================================================
--- staging-i686/openslp.service	                        (rev 0)
+++ staging-i686/openslp.service	2017-03-11 22:57:50 UTC (rev 290641)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Service Location Protocol
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/slpd -c /etc/slp.conf -r /etc/slp.reg -s /etc/slp.spi
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=network.target

Copied: openslp/repos/staging-x86_64/PKGBUILD (from rev 290640, openslp/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2017-03-11 22:57:50 UTC (rev 290641)
@@ -0,0 +1,51 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+
+pkgname=openslp
+pkgver=2.0.0
+pkgrel=2
+pkgdesc="Open-source implementation of Service Location Protocol"
+arch=('i686' 'x86_64')
+url="http://www.openslp.org"
+license=('BSD')
+depends=('bash' 'openssl')
+makedepends=('doxygen')
+backup=('etc/slp.conf' 'etc/slp.reg' 'etc/slp.spi')
+options=(!makeflags)
+source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz
+        openslp.service
+        openslp-2.0.0-null-pointer-deref.patch
+        openslp-2.0.0-openssl-1.1-fix.patch)
+sha256sums=('924337a2a8e5be043ebaea2a78365c7427ac6e9cee24610a0780808b2ba7579b'
+            '8bba465806891a5df4702ab25866bd43258a6b0370b6e0941d188568ef82bdb9'
+            'da639ca50ea3e7eeb747505171bc7678a444b6755a7068b0cd294cc87f1ebdbe'
+            'bf38f7a251ff41582c17451af185a964d1ed235d0f2ff294e1d2761da17ab078')
+
+prepare() {
+  cd $pkgname-$pkgver
+  sed -i 's|$(datadir)/doc|$(docdir)|' doc/Makefile.in
+  patch -Np1 -i ../openslp-2.0.0-null-pointer-deref.patch
+  patch -Np1 -i ../openslp-2.0.0-openssl-1.1-fix.patch
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr \
+    --sbindir=/usr/bin \
+    --sysconfdir=/etc \
+    --localstatedir=/var \
+    --docdir=/usr/share/doc/openslp-${pkgver} \
+    --enable-slpv1 \
+    --enable-slpv2-security # service would fail to start without this
+  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+  make DESTDIR="${pkgdir}" INSTALL_DATA="cp -r" install-docs
+  rm "${pkgdir}/usr/share/doc/openslp-${pkgver}/openslp-doxy-${pkgver}.tar.gz"
+  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -D -m644 "${srcdir}/openslp.service" "${pkgdir}/usr/lib/systemd/system/openslp.service"
+}

Copied: openslp/repos/staging-x86_64/openslp-2.0.0-null-pointer-deref.patch (from rev 290640, openslp/trunk/openslp-2.0.0-null-pointer-deref.patch)
===================================================================
--- staging-x86_64/openslp-2.0.0-null-pointer-deref.patch	                        (rev 0)
+++ staging-x86_64/openslp-2.0.0-null-pointer-deref.patch	2017-03-11 22:57:50 UTC (rev 290641)
@@ -0,0 +1,12 @@
+diff -up openslp-2.0.0/common/slp_xmalloc.c.orig openslp-2.0.0/common/slp_xmalloc.c
+--- openslp-2.0.0/common/slp_xmalloc.c.orig	2012-12-07 01:52:08.000000000 +0100
++++ openslp-2.0.0/common/slp_xmalloc.c	2016-05-23 12:58:57.953532979 +0200
+@@ -203,6 +203,8 @@ void * _xrealloc(const char * file, int
+       if (x->size != size)
+       {
+          newptr = _xmalloc(file, line, size);
++         if (newptr == 0)
++            return 0;
+          memcpy(newptr, ptr, x->size);
+          _xfree(file, line, x);
+       }

Copied: openslp/repos/staging-x86_64/openslp-2.0.0-openssl-1.1-fix.patch (from rev 290640, openslp/trunk/openslp-2.0.0-openssl-1.1-fix.patch)
===================================================================
--- staging-x86_64/openslp-2.0.0-openssl-1.1-fix.patch	                        (rev 0)
+++ staging-x86_64/openslp-2.0.0-openssl-1.1-fix.patch	2017-03-11 22:57:50 UTC (rev 290641)
@@ -0,0 +1,25 @@
+diff -up openslp-2.0.0/common/slp_crypto.c.orig openslp-2.0.0/common/slp_crypto.c
+--- openslp-2.0.0/common/slp_crypto.c.orig	2012-12-07 21:13:28.000000000 +0100
++++ openslp-2.0.0/common/slp_crypto.c	2017-02-22 11:16:11.620835724 +0100
+@@ -88,11 +88,16 @@ SLPCryptoDSAKey * SLPCryptoDSAKeyDup(SLP
+    result =  DSA_new();
+    if (result)
+    {
+-      result->p = BN_dup(dsa->p);
+-      result->q = BN_dup(dsa->q);
+-      result->g = BN_dup(dsa->g);
+-      result->priv_key = BN_dup(dsa->priv_key);
+-      result->pub_key = BN_dup(dsa->pub_key);
++      const BIGNUM *p, *q, *g;
++      const BIGNUM *priv_key, *pub_key;
++
++      DSA_get0_pqg(dsa, &p, &q, &g);
++      DSA_get0_key(dsa, &pub_key, &priv_key);
++
++      /* would be nice to check return values,
++       * but original code didn't do that either... */
++      DSA_set0_pqg(result, BN_dup(p), BN_dup(q), BN_dup(g));
++      DSA_set0_key(result, BN_dup(pub_key), BN_dup(priv_key));
+    }
+    return result;
+ }

Copied: openslp/repos/staging-x86_64/openslp.service (from rev 290640, openslp/trunk/openslp.service)
===================================================================
--- staging-x86_64/openslp.service	                        (rev 0)
+++ staging-x86_64/openslp.service	2017-03-11 22:57:50 UTC (rev 290641)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Service Location Protocol
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/slpd -c /etc/slp.conf -r /etc/slp.reg -s /etc/slp.spi
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=network.target


More information about the arch-commits mailing list