Date: Saturday, August 21, 2021 @ 18:12:27
  Author: eworm
Revision: 1004166

archrelease: copy trunk to community-testing-x86_64

Added:
  keepalived/repos/community-testing-x86_64/
  keepalived/repos/community-testing-x86_64/0001-symlink-genhash.patch
    (from rev 1004165, keepalived/trunk/0001-symlink-genhash.patch)
  keepalived/repos/community-testing-x86_64/PKGBUILD
    (from rev 1004165, keepalived/trunk/PKGBUILD)

----------------------------+
 0001-symlink-genhash.patch |   61 +++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD                   |   44 +++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+)

Copied: keepalived/repos/community-testing-x86_64/0001-symlink-genhash.patch 
(from rev 1004165, keepalived/trunk/0001-symlink-genhash.patch)
===================================================================
--- community-testing-x86_64/0001-symlink-genhash.patch                         
(rev 0)
+++ community-testing-x86_64/0001-symlink-genhash.patch 2021-08-21 18:12:27 UTC 
(rev 1004166)
@@ -0,0 +1,61 @@
+diff --git a/keepalived/Makefile.am b/keepalived/Makefile.am
+index 86c3ed3a..9a47eb61 100644
+--- a/keepalived/Makefile.am
++++ b/keepalived/Makefile.am
+@@ -75,26 +75,38 @@ init_DATA          = etc/openrc/keepalived
+ endif
+ 
+ if WITH_IPVS
++# checks for realpath, and also not busybox version which does not support 
--relative-to
+ install-exec-hook:
++      $(MKDIR_P) $(DESTDIR)/$(bindir)
+       @( \
+-      d=`echo $(bindir) | sed -e "s:^/::"`; \
+-      s=`echo $(sbindir) | sed -e "s:^/::"`; \
+-      \
+-      while [ 1 ]; do \
+-              d1=`echo $$d | sed -e "s:/.*::"`; \
+-              s1=`echo $$s | sed -e "s:/.*::"`; \
+-              if [ $$d1 != $$s1 ]; then \
+-                      break; \
++      realpath --relative-to=/ / >/dev/null 2>&1; \
++      if [ $$? -eq 0 ]; then \
++              $(LN_S) `realpath --relative-to="$(DESTDIR)/$(bindir)" 
"$(DESTDIR)/$(sbindir)/keepalived"` $(DESTDIR)/$(bindir)/genhash; \
++      else \
++              if [ $(bindir) = $(sbindir) ]; then \
++                      d= ; \
++                      s= ; \
++              else \
++                      d=`echo $(bindir) | sed -e "s:^/::"`; \
++                      s=`echo $(sbindir) | sed -e "s:^/::"`; \
++                      \
++                      while [ 1 ]; do \
++                              d1=`echo $$d | sed -e "s:/.*::"`; \
++                              s1=`echo $$s | sed -e "s:/.*::"`; \
++                              if [ $$d1 != $$s1 ]; then \
++                                      break; \
++                              fi; \
++                              d=`echo $$d | sed -e "s:^[^/]*/::"`; \
++                              s=`echo $$s | sed -e "s:^[^/]*/::"`; \
++                              if [ -z $$d ]; then break; fi; \
++                              if [ -z $$s ]; then break; fi; \
++                      done; \
++                      \
++                      d=`echo /$$d/ | sed -e "s:/[^/.]*/:/../:g" -e 
"s:/[^/.]*/:/../:g" -e "s:^/::"`; \
++                      s=$$s/ ; \
+               fi; \
+-              d=`echo $$d | sed -e "s:^[^/]*/::"`; \
+-              s=`echo $$s | sed -e "s:^[^/]*/::"`; \
+-              if [ -z $$d ]; then break; fi; \
+-              if [ -z $$s ]; then break; fi; \
+-      done; \
+-      \
+-      d=`echo /$$d/ | sed -e "s:/[^/.]*/:/../:g" -e "s:/[^/.]*/:/../:g" -e 
"s:^/::"`; \
+-      \
+-      $(MKDIR_P) $(DESTDIR)/$(bindir); \
+-      $(LN_S) $$d$$s/keepalived $(DESTDIR)/$(bindir)/genhash; \
++              \
++              $(LN_S) $$d$${s}keepalived $(DESTDIR)/$(bindir)/genhash; \
++      fi; \
+       )
+ endif

Copied: keepalived/repos/community-testing-x86_64/PKGBUILD (from rev 1004165, 
keepalived/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD                           (rev 0)
+++ community-testing-x86_64/PKGBUILD   2021-08-21 18:12:27 UTC (rev 1004166)
@@ -0,0 +1,44 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Andrea Zucchelli <zukk...@gmail.com>
+
+pkgname=keepalived
+pkgver=2.2.4
+pkgrel=1
+pkgdesc='Failover and monitoring daemon for LVS clusters'
+arch=('x86_64')
+url='https://www.keepalived.org/'
+license=('GPL2')
+backup=('etc/keepalived/keepalived.conf' 'etc/sysconfig/keepalived')
+makedepends=('ipset')
+depends=('glibc' 'libnl' 'openssl' 'file' 'iptables' 'systemd-libs')
+optdepends=('ipset: ipset support')
+makedepends=('libnfnetlink' 'ipset' 'systemd')
+options=('!emptydirs')
+source=("https://www.keepalived.org/software/$pkgname-$pkgver.tar.gz";)
+sha256sums=('0138d69087d44beaaa589527f0cfa6885958b320a837147d02b6b7df73ebc1df')
+
+build() {
+  # trick broken ./configure systemctl test
+  printf "#!/bin/sh\necho -.mount\n" > systemctl
+  chmod +x systemctl
+  PATH=$PWD:$PATH
+
+  cd $pkgname-$pkgver
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc \
+    --sbindir=/usr/bin \
+    --localstatedir=/var \
+    --runstatedir=/run
+  make
+}
+
+package() {
+  cd $pkgname-$pkgver
+  make DESTDIR="$pkgdir" install
+  # move examples to /usr/share
+  install -d -m 755 "$pkgdir/usr/share/$pkgname"
+  mv "$pkgdir/etc/keepalived/samples" "$pkgdir/usr/share/$pkgname/samples"
+}
+
+# vim:set ts=2 sw=2 et:

Reply via email to