[arch-commits] Commit in keepalived/repos (3 files)
Christian Hesse
eworm at gemini.archlinux.org
Tue Aug 17 09:10:39 UTC 2021
Date: Tuesday, August 17, 2021 @ 09:10:38
Author: eworm
Revision: 1001215
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 1001214, keepalived/trunk/0001-symlink-genhash.patch)
keepalived/repos/community-testing-x86_64/PKGBUILD
(from rev 1001214, keepalived/trunk/PKGBUILD)
----------------------------+
0001-symlink-genhash.patch | 61 +++++++++++++++++++++++++++++++++++++++++++
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++
2 files changed, 115 insertions(+)
Copied: keepalived/repos/community-testing-x86_64/0001-symlink-genhash.patch (from rev 1001214, 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-17 09:10:38 UTC (rev 1001215)
@@ -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 1001214, keepalived/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2021-08-17 09:10:38 UTC (rev 1001215)
@@ -0,0 +1,54 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Andrea Zucchelli <zukka77 at gmail.com>
+
+pkgname=keepalived
+pkgver=2.2.3
+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"
+ '0001-symlink-genhash.patch')
+sha256sums=('8391e511c47c256bce4c93169b924da3d37e3f4d88fadc124fae052dc62f302c'
+ '5ca0af6e4ce60eb611d9d17801057670685c6a98f0ae43c3f60f68f0efdf0606')
+
+prepare() {
+ cd $pkgname-$pkgver
+
+ patch -Np1 < ../0001-symlink-genhash.patch
+
+ autoreconf
+}
+
+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:
More information about the arch-commits
mailing list