[arch-commits] Commit in ifplugd/repos (7 files)

Felix Yan felixonmars at archlinux.org
Sat May 16 20:49:03 UTC 2020


    Date: Saturday, May 16, 2020 @ 20:49:02
  Author: felixonmars
Revision: 384824

archrelease: copy trunk to staging-x86_64

Added:
  ifplugd/repos/staging-x86_64/
  ifplugd/repos/staging-x86_64/PKGBUILD
    (from rev 384821, ifplugd/trunk/PKGBUILD)
  ifplugd/repos/staging-x86_64/ifplugd-0.28-interface.patch
    (from rev 384821, ifplugd/trunk/ifplugd-0.28-interface.patch)
  ifplugd/repos/staging-x86_64/ifplugd-daemon
    (from rev 384822, ifplugd/trunk/ifplugd-daemon)
  ifplugd/repos/staging-x86_64/ifplugd-fix-return-value.patch
    (from rev 384822, ifplugd/trunk/ifplugd-fix-return-value.patch)
  ifplugd/repos/staging-x86_64/ifplugd.install
    (from rev 384822, ifplugd/trunk/ifplugd.install)
  ifplugd/repos/staging-x86_64/ifplugd.systemd
    (from rev 384822, ifplugd/trunk/ifplugd.systemd)

--------------------------------+
 PKGBUILD                       |   51 +++++++++++++++++++++++++++++++++++++++
 ifplugd-0.28-interface.patch   |   13 +++++++++
 ifplugd-daemon                 |    7 +++++
 ifplugd-fix-return-value.patch |   12 +++++++++
 ifplugd.install                |   13 +++++++++
 ifplugd.systemd                |   11 ++++++++
 6 files changed, 107 insertions(+)

Copied: ifplugd/repos/staging-x86_64/PKGBUILD (from rev 384821, ifplugd/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2020-05-16 20:49:02 UTC (rev 384824)
@@ -0,0 +1,51 @@
+# Contributor: Manolis Tzanidakis
+# Contributor: kevin <kevin at archlinux.org>
+# Maintainer: 
+
+pkgname=ifplugd
+pkgver=0.28
+pkgrel=16
+pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
+arch=('x86_64')
+url="http://0pointer.de/lennart/projects/ifplugd"
+install=ifplugd.install
+license=('GPL2')
+depends=('libdaemon' 'bash')
+backup=('etc/ifplugd/ifplugd.conf')
+options=('!makeflags' '!emptydirs')
+source=($url/${pkgname}-${pkgver}.tar.gz
+        ifplugd-0.28-interface.patch
+        ifplugd-fix-return-value.patch
+        ifplugd-daemon
+        ifplugd.systemd)
+md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3'
+         '54eb22844b5aeed161c0b80aa9008570'
+         'f26dbd7597d9d637f0b2b104b11ab820'
+         'f2e8a37af52b79ee0e3c5bcc2470ce10'
+         '3dc2ce45d0e12d155ecc7a5bc9e3ee04')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -p0 -i ../ifplugd-0.28-interface.patch
+  patch -p1 -i ../ifplugd-fix-return-value.patch
+  sed 's|/var/run|/run|' -i src/ifplugd.c
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
+  ./configure --prefix=/usr --sbindir=/usr/bin --mandir=/usr/share/man --sysconfdir=/etc \
+      --with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+
+  install -D -m755 "${srcdir}"/ifplugd-daemon "${pkgdir}"/usr/bin/ifplugd-daemon
+  # remove the default init script and action script
+  rm -f "${pkgdir}"/etc/{ifplugd/ifplugd.action,rc.d/ifplugd}
+  # install systemd unit
+  install -D -m644 "${srcdir}"/ifplugd.systemd "${pkgdir}"/usr/lib/systemd/system/ifplugd at .service
+}

Copied: ifplugd/repos/staging-x86_64/ifplugd-0.28-interface.patch (from rev 384821, ifplugd/trunk/ifplugd-0.28-interface.patch)
===================================================================
--- staging-x86_64/ifplugd-0.28-interface.patch	                        (rev 0)
+++ staging-x86_64/ifplugd-0.28-interface.patch	2020-05-16 20:49:02 UTC (rev 384824)
@@ -0,0 +1,13 @@
+--- src/interface.c	2004/12/19 00:08:01	114
++++ src/interface.c	2006/03/07 13:15:11	133
+@@ -22,9 +22,9 @@
+ #include <config.h>
+ #endif
+ 
++#include <sys/types.h>
+ #include <linux/sockios.h>
+ #include <linux/if_ether.h>
+-#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <linux/if.h>

Copied: ifplugd/repos/staging-x86_64/ifplugd-daemon (from rev 384822, ifplugd/trunk/ifplugd-daemon)
===================================================================
--- staging-x86_64/ifplugd-daemon	                        (rev 0)
+++ staging-x86_64/ifplugd-daemon	2020-05-16 20:49:02 UTC (rev 384824)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+. /etc/ifplugd/ifplugd.conf
+
+args=ARGS_$1
+[[ -z ${!args} ]] && args=$ARGS || args=${!args}
+/usr/bin/ifplugd -i "$1" $args

Copied: ifplugd/repos/staging-x86_64/ifplugd-fix-return-value.patch (from rev 384822, ifplugd/trunk/ifplugd-fix-return-value.patch)
===================================================================
--- staging-x86_64/ifplugd-fix-return-value.patch	                        (rev 0)
+++ staging-x86_64/ifplugd-fix-return-value.patch	2020-05-16 20:49:02 UTC (rev 384824)
@@ -0,0 +1,12 @@
+diff -Nur ifplugd-0.28.orig/src/ifplugd.c ifplugd-0.28/src/ifplugd.c
+--- ifplugd-0.28.orig/src/ifplugd.c	2005-06-04 21:21:51.000000000 +0200
++++ ifplugd-0.28/src/ifplugd.c	2012-08-29 21:51:53.137644163 +0200
+@@ -447,7 +447,7 @@
+             goto finish;
+ 
+     if (send_retval && daemonize && wait_on_fork) {
+-        char c = status == IFSTATUS_UP ? 2 : (status == IFSTATUS_DOWN ? 3 : 1);
++        char c = status == IFSTATUS_UP ? 1 : (status == IFSTATUS_DOWN ? 2 : 3);
+         daemon_retval_send(c);
+         send_retval = 0;
+     }

Copied: ifplugd/repos/staging-x86_64/ifplugd.install (from rev 384822, ifplugd/trunk/ifplugd.install)
===================================================================
--- staging-x86_64/ifplugd.install	                        (rev 0)
+++ staging-x86_64/ifplugd.install	2020-05-16 20:49:02 UTC (rev 384824)
@@ -0,0 +1,13 @@
+post_upgrade() {
+  if [ $(vercmp $2 0.28-12) -lt 0 ]; then
+    cat << "EOF"
+* When used with initscripts, /etc/ifplugd/ifplugd.conf now uses
+  INTERFACES= again instead of NET_IFS=.
+* This package no longer provides a default ifplugd.action script.
+* To use ifplugd with systemd, run
+   systemctl enable ifplugd at eth0.service
+EOF
+  fi
+}
+
+# vim:set ts=2 sw=2 et:

Copied: ifplugd/repos/staging-x86_64/ifplugd.systemd (from rev 384822, ifplugd/trunk/ifplugd.systemd)
===================================================================
--- staging-x86_64/ifplugd.systemd	                        (rev 0)
+++ staging-x86_64/ifplugd.systemd	2020-05-16 20:49:02 UTC (rev 384824)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Daemon which acts upon network cable insertion/removal
+
+[Service]
+Type=forking
+PIDFile=/run/ifplugd.%i.pid
+ExecStart=/usr/bin/ifplugd-daemon %i
+SuccessExitStatus=0 1 2
+
+[Install]
+WantedBy=multi-user.target


More information about the arch-commits mailing list