[arch-commits] Commit in ipvsadm/repos (5 files)

Felix Yan felixonmars at archlinux.org
Fri Nov 9 21:47:11 UTC 2018


    Date: Friday, November 9, 2018 @ 21:47:09
  Author: felixonmars
Revision: 404752

archrelease: copy trunk to community-staging-x86_64

Added:
  ipvsadm/repos/community-staging-x86_64/
  ipvsadm/repos/community-staging-x86_64/PKGBUILD
    (from rev 404751, ipvsadm/trunk/PKGBUILD)
  ipvsadm/repos/community-staging-x86_64/ipvsadm.install
    (from rev 404751, ipvsadm/trunk/ipvsadm.install)
  ipvsadm/repos/community-staging-x86_64/ipvsadm.service
    (from rev 404751, ipvsadm/trunk/ipvsadm.service)
  ipvsadm/repos/community-staging-x86_64/ipvsadm.systemd
    (from rev 404751, ipvsadm/trunk/ipvsadm.systemd)

-----------------+
 PKGBUILD        |   63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ipvsadm.install |   10 ++++++++
 ipvsadm.service |   11 +++++++++
 ipvsadm.systemd |   21 ++++++++++++++++++
 4 files changed, 105 insertions(+)

Copied: ipvsadm/repos/community-staging-x86_64/PKGBUILD (from rev 404751, ipvsadm/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2018-11-09 21:47:09 UTC (rev 404752)
@@ -0,0 +1,63 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Judd Vinet <jvinet at zeroflux.org>
+
+pkgname=ipvsadm
+pkgver=1.29
+pkgrel=2
+pkgdesc='The IP Virtual Server administration utility'
+arch=('x86_64')
+url='http://www.linuxvirtualserver.org/software/ipvs.html'
+license=('GPL2')
+depends=('libnl1' 'popt' 'bash')
+backup=("etc/$pkgname.conf")
+options=('!makeflags')
+install=$pkgname.install
+source=("https://kernel.org/pub/linux/utils/kernel/ipvsadm/$pkgname-$pkgver.tar."{xz,sign}
+        "$pkgname.systemd"
+        "$pkgname.service")
+validpgpkeys=('D893F72888349DB4F170F9A23A554D033B37BCED') # Jesper Dangaard Brouer (RedHat)
+# upstream provides sha256sums of release
+sha256sums=('c3de4a21d90a02c621f0c72ee36a7aa27374b6f29fd4178f33fbf71b4c66c149'
+            'SKIP'
+            '4960ea254128347b03665d51817f29cb643cf2ebca13f5f46649257552ad3ceb'
+            '25506d07f412cccab6f2f3a2a1900d5eeda27bc58602d14f44910c4e036b5341')
+
+prepare() {
+  cd $pkgname-$pkgver
+  # apply patch from the source array (should be a pacman feature)
+  local filename
+  for filename in "${source[@]}"; do
+    if [[ "$filename" =~ \.patch$ ]]; then
+      msg2 "Applying patch ${filename##*/}"
+      patch -p1 -N -i "$srcdir/${filename##*/}"
+    fi
+  done
+  :
+}
+
+build() {
+  cd $pkgname-$pkgver
+  make
+}
+
+package() {
+  pushd $pkgname-$pkgver
+  make \
+    BUILD_ROOT="$pkgdir" \
+    MANDIR=usr/share/man \
+    SBIN="$pkgdir/usr/bin" \
+    INIT="$pkgdir/etc/rc.d" \
+    install
+  popd
+  # systemd
+  install -Dm 755 $pkgname.systemd \
+    "$pkgdir/usr/lib/systemd/scripts/$pkgname"
+  install -Dm 644 $pkgname.service \
+    "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+  # remove legacy init system
+  rm -rf "$pkgdir/etc/rc.d"
+  # default config file
+  install -Dm 644 /dev/null "$pkgdir/etc/$pkgname.conf"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: ipvsadm/repos/community-staging-x86_64/ipvsadm.install (from rev 404751, ipvsadm/trunk/ipvsadm.install)
===================================================================
--- community-staging-x86_64/ipvsadm.install	                        (rev 0)
+++ community-staging-x86_64/ipvsadm.install	2018-11-09 21:47:09 UTC (rev 404752)
@@ -0,0 +1,10 @@
+## arg 1:  the new package version
+## arg 2:  the old package version
+post_upgrade() {
+  [ $(vercmp "$2" '1.26-4') -gt 0 ] || cat <<EOF
+Config file have been moved from /etc/ipvsadm.rules to /etc/ipvsadm.conf.
+You can revert to the previous location by editing /etc/conf.d/ipvsadm.
+EOF
+}
+
+# vim:set ts=2 sw=2 ft=sh et:

Copied: ipvsadm/repos/community-staging-x86_64/ipvsadm.service (from rev 404751, ipvsadm/trunk/ipvsadm.service)
===================================================================
--- community-staging-x86_64/ipvsadm.service	                        (rev 0)
+++ community-staging-x86_64/ipvsadm.service	2018-11-09 21:47:09 UTC (rev 404752)
@@ -0,0 +1,11 @@
+[Unit]
+Description=IP Virtual Server
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/scripts/ipvsadm start
+ExecStop=/usr/lib/systemd/scripts/ipvsadm stop
+
+[Install]
+WantedBy=multi-user.target

Copied: ipvsadm/repos/community-staging-x86_64/ipvsadm.systemd (from rev 404751, ipvsadm/trunk/ipvsadm.systemd)
===================================================================
--- community-staging-x86_64/ipvsadm.systemd	                        (rev 0)
+++ community-staging-x86_64/ipvsadm.systemd	2018-11-09 21:47:09 UTC (rev 404752)
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+CONFIG_FILE='/etc/ipvsadm.conf'
+
+case $1 in
+  start)
+    ipvsadm-restore < "$CONFIG_FILE"
+  ;;
+  stop)
+    ipvsadm -C
+  ;;
+  save)
+    ipvsadm-save -n > "$CONFIG_FILE"
+  ;;
+  *)
+    echo "usage: ${0##*/} {start|stop|save}" >&2
+    exit 1
+  ;;
+esac
+
+# vim:set ts=2 sw=2 ft=sh et:


More information about the arch-commits mailing list