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

Ronald van Haren ronald at nymeria.archlinux.org
Tue Jun 3 19:42:18 UTC 2014


    Date: Tuesday, June 3, 2014 @ 21:42:18
  Author: ronald
Revision: 214108

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

Added:
  dhcpcd/repos/testing-i686/
  dhcpcd/repos/testing-i686/39512.patch
    (from rev 214107, dhcpcd/trunk/39512.patch)
  dhcpcd/repos/testing-i686/PKGBUILD
    (from rev 214107, dhcpcd/trunk/PKGBUILD)
  dhcpcd/repos/testing-i686/dhcpcd.service
    (from rev 214107, dhcpcd/trunk/dhcpcd.service)
  dhcpcd/repos/testing-i686/dhcpcd_.service
    (from rev 214107, dhcpcd/trunk/dhcpcd_.service)
  dhcpcd/repos/testing-x86_64/
  dhcpcd/repos/testing-x86_64/39512.patch
    (from rev 214107, dhcpcd/trunk/39512.patch)
  dhcpcd/repos/testing-x86_64/PKGBUILD
    (from rev 214107, dhcpcd/trunk/PKGBUILD)
  dhcpcd/repos/testing-x86_64/dhcpcd.service
    (from rev 214107, dhcpcd/trunk/dhcpcd.service)
  dhcpcd/repos/testing-x86_64/dhcpcd_.service
    (from rev 214107, dhcpcd/trunk/dhcpcd_.service)

--------------------------------+
 testing-i686/39512.patch       |   53 ++++++++++++++++++++++++++++++
 testing-i686/PKGBUILD          |   68 +++++++++++++++++++++++++++++++++++++++
 testing-i686/dhcpcd.service    |   13 +++++++
 testing-i686/dhcpcd_.service   |   15 ++++++++
 testing-x86_64/39512.patch     |   53 ++++++++++++++++++++++++++++++
 testing-x86_64/PKGBUILD        |   68 +++++++++++++++++++++++++++++++++++++++
 testing-x86_64/dhcpcd.service  |   13 +++++++
 testing-x86_64/dhcpcd_.service |   15 ++++++++
 8 files changed, 298 insertions(+)

Copied: dhcpcd/repos/testing-i686/39512.patch (from rev 214107, dhcpcd/trunk/39512.patch)
===================================================================
--- testing-i686/39512.patch	                        (rev 0)
+++ testing-i686/39512.patch	2014-06-03 19:42:18 UTC (rev 214108)
@@ -0,0 +1,53 @@
+@@ -2629,33 +2629,40 @@
+ 	free(dhcp);
+ }
+ 
+ static void
+-dhcp_handleudp(void *arg)
++dhcp_handleudp1(struct dhcpcd_ctx *ctx, int *fd, const char *ifname)
+ {
+-	struct dhcpcd_ctx *ctx;
+ 	uint8_t buffer[sizeof(struct dhcp_message)];
+ 
+-	ctx = arg;
+-
+ 	/* Just read what's in the UDP fd and discard it as we always read
+ 	 * from the raw fd */
+-	(void)read(ctx->udp_fd, buffer, sizeof(buffer));
++	if (read(*fd, buffer, sizeof(buffer)) == -1) {
++		syslog(LOG_ERR, "%s: %s: %m", ifname, __func__);
++		eloop_event_delete(ctx->eloop, *fd);
++		close(*fd);
++		*fd = -1;
++	}
++}
++
++static void
++dhcp_handleudp(void *arg)
++{
++	struct dhcpcd_ctx *ctx;
++
++	ctx = arg;
++	dhcp_handleudp1(arg, &ctx->udp_fd, NULL);
+ }
+ 
+ static void
+ dhcp_handleifudp(void *arg)
+ {
+ 	const struct interface *ifp;
+-	const struct dhcp_state *state;
+-	uint8_t buffer[sizeof(struct dhcp_message)];
++	struct dhcp_state *state;
+ 
+ 	ifp = arg;
+-	state = D_CSTATE(ifp);
+-
+-	/* Just read what's in the UDP fd and discard it as we always read
+-	 * from the raw fd */
+-	(void)read(state->udp_fd, buffer, sizeof(buffer));
++	state = D_STATE(ifp);
++	dhcp_handleudp1(ifp->ctx, &state->udp_fd, ifp->name);
+ }
+ 
+ static int
+ dhcp_open(struct interface *ifp)

Copied: dhcpcd/repos/testing-i686/PKGBUILD (from rev 214107, dhcpcd/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2014-06-03 19:42:18 UTC (rev 214108)
@@ -0,0 +1,68 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Tom Killian <tom.archlinux.org>
+# Contributor: Judd Vinet <jvinet.zeroflux.org>
+
+pkgname=dhcpcd
+pkgver=6.3.2
+pkgrel=2
+pkgdesc="RFC2131 compliant DHCP client daemon"
+url="http://roy.marples.name/projects/dhcpcd/"
+arch=('i686' 'x86_64')
+license=('BSD')
+groups=('base')
+depends=('glibc' 'sh')
+provides=('dhcp-client')
+backup=('etc/dhcpcd.conf')
+options=('emptydirs')  # We Need the Empty /var/lib/dhcpcd Directory
+source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2"
+        'dhcpcd_.service'
+        'dhcpcd.service'
+	'39512.patch')
+sha1sums=('ff8ef22b7305795eff52b8b41b81e2999a5923ff'
+          '6f1633edde14d29b5cdc09c4f029a450ef2ebc96'
+          '52c1bad9ab43e9a253c1eb175e7eefb13497b8f9'
+          '22f29ac0948c0e0d177a48d939828132b73fcfc7')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  # upstream patch for FS#39512
+  patch -Np0 dhcp.c ${srcdir}/39512.patch 
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # configure variables
+  ./configure \
+      --sbindir=/usr/bin \
+      --libexecdir=/usr/lib/dhcpcd \
+      --dbdir=/var/lib/dhcpcd \
+      --rundir=/run
+
+  # Build
+  make
+}
+
+check() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make test
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+
+  # Install License
+  install -d "$pkgdir/usr/share/licenses/$pkgname"
+  sed 26q "$srcdir/$pkgname-$pkgver/control.h" \
+      >>"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  # Set Options in /etc/dhcpcd.conf
+  echo noipv4ll >> "${pkgdir}/etc/dhcpcd.conf" # Disable ip4vall
+
+  # install systemd files
+  install -Dm644 "${srcdir}/dhcpcd_.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd at .service"
+  install -Dm644 "${srcdir}/dhcpcd.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd.service" # FS#31543
+}

Copied: dhcpcd/repos/testing-i686/dhcpcd.service (from rev 214107, dhcpcd/trunk/dhcpcd.service)
===================================================================
--- testing-i686/dhcpcd.service	                        (rev 0)
+++ testing-i686/dhcpcd.service	2014-06-03 19:42:18 UTC (rev 214108)
@@ -0,0 +1,13 @@
+[Unit]
+Description=dhcpcd on all interfaces
+Wants=network.target
+Before=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd.pid
+ExecStart=/usr/bin/dhcpcd -q -b
+ExecStop=/usr/bin/dhcpcd -x
+
+[Install]
+WantedBy=multi-user.target

Copied: dhcpcd/repos/testing-i686/dhcpcd_.service (from rev 214107, dhcpcd/trunk/dhcpcd_.service)
===================================================================
--- testing-i686/dhcpcd_.service	                        (rev 0)
+++ testing-i686/dhcpcd_.service	2014-06-03 19:42:18 UTC (rev 214108)
@@ -0,0 +1,15 @@
+[Unit]
+Description=dhcpcd on %I
+Wants=network.target
+Before=network.target
+BindsTo=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd-%I.pid
+ExecStart=/usr/bin/dhcpcd -q -w %I
+ExecStop=/usr/bin/dhcpcd -x %I
+
+[Install]
+WantedBy=multi-user.target

Copied: dhcpcd/repos/testing-x86_64/39512.patch (from rev 214107, dhcpcd/trunk/39512.patch)
===================================================================
--- testing-x86_64/39512.patch	                        (rev 0)
+++ testing-x86_64/39512.patch	2014-06-03 19:42:18 UTC (rev 214108)
@@ -0,0 +1,53 @@
+@@ -2629,33 +2629,40 @@
+ 	free(dhcp);
+ }
+ 
+ static void
+-dhcp_handleudp(void *arg)
++dhcp_handleudp1(struct dhcpcd_ctx *ctx, int *fd, const char *ifname)
+ {
+-	struct dhcpcd_ctx *ctx;
+ 	uint8_t buffer[sizeof(struct dhcp_message)];
+ 
+-	ctx = arg;
+-
+ 	/* Just read what's in the UDP fd and discard it as we always read
+ 	 * from the raw fd */
+-	(void)read(ctx->udp_fd, buffer, sizeof(buffer));
++	if (read(*fd, buffer, sizeof(buffer)) == -1) {
++		syslog(LOG_ERR, "%s: %s: %m", ifname, __func__);
++		eloop_event_delete(ctx->eloop, *fd);
++		close(*fd);
++		*fd = -1;
++	}
++}
++
++static void
++dhcp_handleudp(void *arg)
++{
++	struct dhcpcd_ctx *ctx;
++
++	ctx = arg;
++	dhcp_handleudp1(arg, &ctx->udp_fd, NULL);
+ }
+ 
+ static void
+ dhcp_handleifudp(void *arg)
+ {
+ 	const struct interface *ifp;
+-	const struct dhcp_state *state;
+-	uint8_t buffer[sizeof(struct dhcp_message)];
++	struct dhcp_state *state;
+ 
+ 	ifp = arg;
+-	state = D_CSTATE(ifp);
+-
+-	/* Just read what's in the UDP fd and discard it as we always read
+-	 * from the raw fd */
+-	(void)read(state->udp_fd, buffer, sizeof(buffer));
++	state = D_STATE(ifp);
++	dhcp_handleudp1(ifp->ctx, &state->udp_fd, ifp->name);
+ }
+ 
+ static int
+ dhcp_open(struct interface *ifp)

Copied: dhcpcd/repos/testing-x86_64/PKGBUILD (from rev 214107, dhcpcd/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2014-06-03 19:42:18 UTC (rev 214108)
@@ -0,0 +1,68 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Tom Killian <tom.archlinux.org>
+# Contributor: Judd Vinet <jvinet.zeroflux.org>
+
+pkgname=dhcpcd
+pkgver=6.3.2
+pkgrel=2
+pkgdesc="RFC2131 compliant DHCP client daemon"
+url="http://roy.marples.name/projects/dhcpcd/"
+arch=('i686' 'x86_64')
+license=('BSD')
+groups=('base')
+depends=('glibc' 'sh')
+provides=('dhcp-client')
+backup=('etc/dhcpcd.conf')
+options=('emptydirs')  # We Need the Empty /var/lib/dhcpcd Directory
+source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2"
+        'dhcpcd_.service'
+        'dhcpcd.service'
+	'39512.patch')
+sha1sums=('ff8ef22b7305795eff52b8b41b81e2999a5923ff'
+          '6f1633edde14d29b5cdc09c4f029a450ef2ebc96'
+          '52c1bad9ab43e9a253c1eb175e7eefb13497b8f9'
+          '22f29ac0948c0e0d177a48d939828132b73fcfc7')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  # upstream patch for FS#39512
+  patch -Np0 dhcp.c ${srcdir}/39512.patch 
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # configure variables
+  ./configure \
+      --sbindir=/usr/bin \
+      --libexecdir=/usr/lib/dhcpcd \
+      --dbdir=/var/lib/dhcpcd \
+      --rundir=/run
+
+  # Build
+  make
+}
+
+check() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make test
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+
+  # Install License
+  install -d "$pkgdir/usr/share/licenses/$pkgname"
+  sed 26q "$srcdir/$pkgname-$pkgver/control.h" \
+      >>"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+  # Set Options in /etc/dhcpcd.conf
+  echo noipv4ll >> "${pkgdir}/etc/dhcpcd.conf" # Disable ip4vall
+
+  # install systemd files
+  install -Dm644 "${srcdir}/dhcpcd_.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd at .service"
+  install -Dm644 "${srcdir}/dhcpcd.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd.service" # FS#31543
+}

Copied: dhcpcd/repos/testing-x86_64/dhcpcd.service (from rev 214107, dhcpcd/trunk/dhcpcd.service)
===================================================================
--- testing-x86_64/dhcpcd.service	                        (rev 0)
+++ testing-x86_64/dhcpcd.service	2014-06-03 19:42:18 UTC (rev 214108)
@@ -0,0 +1,13 @@
+[Unit]
+Description=dhcpcd on all interfaces
+Wants=network.target
+Before=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd.pid
+ExecStart=/usr/bin/dhcpcd -q -b
+ExecStop=/usr/bin/dhcpcd -x
+
+[Install]
+WantedBy=multi-user.target

Copied: dhcpcd/repos/testing-x86_64/dhcpcd_.service (from rev 214107, dhcpcd/trunk/dhcpcd_.service)
===================================================================
--- testing-x86_64/dhcpcd_.service	                        (rev 0)
+++ testing-x86_64/dhcpcd_.service	2014-06-03 19:42:18 UTC (rev 214108)
@@ -0,0 +1,15 @@
+[Unit]
+Description=dhcpcd on %I
+Wants=network.target
+Before=network.target
+BindsTo=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd-%I.pid
+ExecStart=/usr/bin/dhcpcd -q -w %I
+ExecStop=/usr/bin/dhcpcd -x %I
+
+[Install]
+WantedBy=multi-user.target




More information about the arch-commits mailing list