summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpyros Stathopoulos2015-06-13 14:57:51 +0300
committerSpyros Stathopoulos2015-06-13 14:57:51 +0300
commit90984b9ab7d70b835b507e70a4d96aa76c07c6e7 (patch)
tree272758681f9a26e70f8c53fbd0a92735022ebd5f
downloadaur-90984b9ab7d70b835b507e70a4d96aa76c07c6e7.tar.gz
Initial commit
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore8
-rw-r--r--0000-noyywrap-option.patch9
-rw-r--r--0001-Fix-manpages.patch168
-rw-r--r--0001-renew.patch11
-rw-r--r--0002-Fix-makefile.patch25
-rw-r--r--PKGBUILD79
-rw-r--r--dhcp6c.conf48
-rw-r--r--dhcp6c.install10
-rw-r--r--dhcp6c.service16
-rw-r--r--dhcp6c@.service16
-rw-r--r--startpd.conf2
12 files changed, 425 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ccfd0335e89a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = wide-dhcpv6
+ pkgdesc = An open source implementation of DHCPv6 developed by KAME project (with Debian patches)
+ pkgver = 20080615
+ pkgrel = 13
+ url = http://wide-dhcpv6.sourceforge.net/
+ install = dhcp6c.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ options = emptydirs
+ backup = etc/wide-dhcpv6/dhcp6c.conf
+ backup = etc/conf.d/startpd.conf
+ source = http://downloads.sourceforge.net/project/wide-dhcpv6/wide-dhcpv6/wide-dhcpv6-20080615/wide-dhcpv6-20080615.tar.gz
+ source = http://ftp.de.debian.org/debian/pool/main/w/wide-dhcpv6/wide-dhcpv6_20080615-11.1.debian.tar.gz
+ source = 0000-noyywrap-option.patch
+ source = 0001-renew.patch
+ source = 0002-Fix-makefile.patch
+ source = dhcp6c.service
+ source = dhcp6c@.service
+ source = startpd.conf
+ source = dhcp6c.conf
+ md5sums = 1011e165850fe40d3e332dad2bfd30b3
+ md5sums = e6bb556a2791b8a825ea2209ce10f27e
+ md5sums = 6bc5f3779f04cd1c74469b4942c1061d
+ md5sums = 678789721081e90e9a0822de1bb1d347
+ md5sums = dfba035ab0fd99ae56ab2e37a000cba0
+ md5sums = 7606280036a1a2c7c0a38af84803f41c
+ md5sums = 897c6ccb3608e6ac33c3022631a49ee6
+ md5sums = 8ec3740147eb2ff9ee7bec7070d2f008
+ md5sums = 54866e3bdd4093efe89a2fc245e7f5ab
+
+pkgname = wide-dhcpv6
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..aa1165d3149a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+pkg/*
+src/*
+*.tar.gz
+*.tar.xz
+*.tar.bz2
+*.zip
+*.swp
+*.log
diff --git a/0000-noyywrap-option.patch b/0000-noyywrap-option.patch
new file mode 100644
index 000000000000..2d01ab1c196a
--- /dev/null
+++ b/0000-noyywrap-option.patch
@@ -0,0 +1,9 @@
+--- a/cftoken.l 2007-03-21 11:52:55.000000000 +0200
++++ b/cftoken.l 2014-03-20 21:05:15.598230461 +0200
+@@ -1,5 +1,6 @@
+ /* $KAME: cftoken.l,v 1.35 2005/01/12 06:06:11 suz Exp $ */
+
++%option noyywrap
+ %{
+ /*
+ * Copyright (C) 2002 WIDE Project.
diff --git a/0001-Fix-manpages.patch b/0001-Fix-manpages.patch
new file mode 100644
index 000000000000..76622f78a177
--- /dev/null
+++ b/0001-Fix-manpages.patch
@@ -0,0 +1,168 @@
+From e9fd60840eb125dcd55aab859dd838a47c02931f Mon Sep 17 00:00:00 2001
+From: Jeremie Corbier <jeremie+debian@famille-corbier.net>
+Date: Tue, 6 Apr 2010 15:51:03 +0200
+Subject: [PATCH] Fix manpages
+
+This patch fixes wide-dhcpv6 manpages (paths, typos, ...).
+
+Signed-off-by: Jeremie Corbier <jeremie@famille-corbier.net>
+---
+ dhcp6c.8 | 8 ++++----
+ dhcp6c.conf.5 | 4 ++--
+ dhcp6ctl.8 | 13 ++++++-------
+ dhcp6relay.8 | 1 -
+ dhcp6s.8 | 10 +++++-----
+ dhcp6s.conf.5 | 2 +-
+ 6 files changed, 18 insertions(+), 20 deletions(-)
+
+diff --git a/dhcp6c.8 b/dhcp6c.8
+index 6824ae0..1d69c9d 100644
+--- a/dhcp6c.8
++++ b/dhcp6c.8
+@@ -114,13 +114,13 @@ In either case,
+ will send DHCPv6 Release messages to release resources assigned from servers.
+ .\"
+ .Sh FILES
+-.Bl -tag -width /usr/local/etc/dhcp6c.conf -compact
++.Bl -tag -width /etc/wide-dhcpv6/dhcp6c.conf -compact
+ .It Pa /var/run/dhcp6c.pid
+ is the default file that contains pid of the currently running
+ .Nm dhcp6c .
+-.It Pa /usr/local/etc/dhcp6c.conf
++.It Pa /etc/wide-dhcpv6/dhcp6c.conf
+ is the default configuration file.
+-.It Pa /var/db/dhcp6c_duid
++.It Pa /var/lib/dhcpv6/dhcp6c_duid
+ is the file to store the client's DUID.
+ .El
+ .Sh Configuration Script
+@@ -203,6 +203,6 @@ command first appeared in WIDE/KAME IPv6 protocol stack kit.
+ is incomplete and violates DHCPv6 protocol spec, in several aspects.
+ In particular, temporary address assignment is intentionally omitted.
+ .Pp
+-Information Refresh Time Option is not recognied in Info-req mode, since
++Information Refresh Time Option is not recognized in Info-req mode, since
+ .Nm
+ terminates after it receives a REPLY message.
+diff --git a/dhcp6c.conf.5 b/dhcp6c.conf.5
+index 611ab4f..5fc03d3 100644
+--- a/dhcp6c.conf.5
++++ b/dhcp6c.conf.5
+@@ -36,7 +36,7 @@
+ .Nd DHCPv6 client configuration file
+ .\"
+ .Sh SYNOPSIS
+-.Pa /usr/local/etc/dhcp6c.conf
++.Pa /etc/wide-dhcpv6/dhcp6c.conf
+ .\"
+ .Sh DESCRIPTION
+ The
+@@ -630,7 +630,7 @@ execute the
+ .Xr openssl 1
+ command (when available) as follows,
+ .Bd -literal -offset
+-% openssl rand -base64 16
++% openssl rand \-base64 16
+ .Ed
+ .Pp
+ and copy the output to the
+diff --git a/dhcp6ctl.8 b/dhcp6ctl.8
+index 86ea0e1..e11889b 100644
+--- a/dhcp6ctl.8
++++ b/dhcp6ctl.8
+@@ -85,12 +85,11 @@ Use
+ .Ar keyfile
+ to provide the shared secret to communicate with the process.
+ The default file name used when unspecified is
+-.Pa /usr/local/etc/dhcp6cctlkey
++.Pa /etc/wide-dhcpv6/dhcp6cctlkey
+ with a client,
+ and
+-.Pa /usr/local/etc/dhcp6sctlkey
++.Pa /etc/wide-dhcpv6/dhcp6sctlkey
+ with a server.
+-
+ .It Fl p Ar port
+ Specify
+ .Ar port
+@@ -99,7 +98,7 @@ The default port number used when unspecified is 5546 for a client,
+ and 5547 for a server.
+ .It Fl s Ar address
+ Specify
+-.A address
++.Ar address
+ as the listening address of the process.
+ The default address used when unspecified is ::1.
+ .El
+@@ -183,10 +182,10 @@ information (if any) and exits.
+ .El
+ .\"
+ .Sh FILES
+-.Bl -tag -width /usr/local/etc/dhcp6cctlkey -compact
+-.It Pa /usr/local/etc/dhcp6cctlkey
++.Bl -tag -width /etc/wide-dhcpv6/dhcp6cctlkey -compact
++.It Pa /etc/wide-dhcpv6/dhcp6cctlkey
+ is the default key file to communicate with a client.
+-.It Pa /usr/local/etc/dhcp6sctlkey
++.It Pa /etc/wide-dhcpv6/dhcp6sctlkey
+ is the default key file to communicate with a server.
+ .El
+ .\"
+diff --git a/dhcp6relay.8 b/dhcp6relay.8
+index 4f761b0..7ad8ada 100644
+--- a/dhcp6relay.8
++++ b/dhcp6relay.8
+@@ -107,7 +107,6 @@ to dump the process ID of
+ is the default file that contains pid of the currently running
+ .Nm .
+ .El
+-
+ .Sh SEE ALSO
+ .Xr dhcp6c 8 ,
+ .Xr dhcp6s 8
+diff --git a/dhcp6s.8 b/dhcp6s.8
+index 888117a..29dcc7b 100644
+--- a/dhcp6s.8
++++ b/dhcp6s.8
+@@ -102,7 +102,7 @@ Use
+ to store the shared secret to authenticate the communication with
+ .Nm dhcp6ctl .
+ The default file name used when unspecified is
+-.Pa /usr/local/etc/dhcp6sctlkey .
++.Pa /etc/wide-dhcpv6/dhcp6sctlkey .
+ The default name is intentionally same as that for
+ .Nm dhcp6ctl
+ so that the server and the control command can share the file when
+@@ -122,12 +122,12 @@ to dump the process ID of
+ .El
+ .\"
+ .Sh FILES
+-.Bl -tag -width /usr/local/etc/dhcp6s.conf -compact
+-.It Pa /usr/local/etc/dhcp6s.conf
++.Bl -tag -width /etc/wide-dhcpv6/dhcp6s.conf -compact
++.It Pa /etc/wide-dhcpv6/dhcp6s.conf
+ is the default configuration file.
+-.It Pa /var/db/dhcp6s_duid
++.It Pa /var/lib/dhcpv6/dhcp6s_duid
+ is the default file to store the server's DUID.
+-.It Pa /usr/local/etc/dhcp6sctlkey
++.It Pa /etc/wide-dhcpv6/dhcp6sctlkey
+ is the default key file to communicate with the control command.
+ See
+ .Xr dhcp6ctl 8
+diff --git a/dhcp6s.conf.5 b/dhcp6s.conf.5
+index 1206764..2cb08ce 100644
+--- a/dhcp6s.conf.5
++++ b/dhcp6s.conf.5
+@@ -36,7 +36,7 @@
+ .Nd DHCPv6 server configuration file
+ .\"
+ .Sh SYNOPSIS
+-.Pa /usr/local/etc/dhcp6s.conf
++.Pa /etc/wide-dhcpv6/dhcp6s.conf
+ .\"
+ .Sh DESCRIPTION
+ The
+--
+1.5.6.5
+
diff --git a/0001-renew.patch b/0001-renew.patch
new file mode 100644
index 000000000000..3319a28d98b9
--- /dev/null
+++ b/0001-renew.patch
@@ -0,0 +1,11 @@
+--- dir_orig/addrconf.c 2008-06-15 09:48:40.000000000 +0200
++++ dir_release/addrconf.c 2013-02-13 10:35:59.000000000 +0100
+@@ -173,7 +173,7 @@
+ sacreate ? "create" : "update",
+ in6addr2str(&addr->addr, 0), addr->pltime, addr->vltime);
+
+- if (sa->addr.vltime != 0)
++ if ((sa->addr.vltime != 0) && sacreate)
+ if (na_ifaddrconf(IFADDRCONF_ADD, sa) < 0)
+ return (-1);
+
diff --git a/0002-Fix-makefile.patch b/0002-Fix-makefile.patch
new file mode 100644
index 000000000000..a2b6a0432c89
--- /dev/null
+++ b/0002-Fix-makefile.patch
@@ -0,0 +1,25 @@
+--- a/Makefile.in.orig 2007-03-21 11:52:58.000000000 +0200
++++ b/Makefile.in 2013-07-20 19:07:08.123014142 +0300
+@@ -102,14 +102,14 @@
+ expand bootp-dhcp-parameters | perl gentab.pl > ianaopts.h
+
+ install::
+- -mkdir -p $(sbindir) $(mandir)/man5 $(mandir)/man8
+- $(INSTALL_PROGRAM) -s -o $(user) -g $(group) $(TARGET) $(sbindir)
+- $(INSTALL_DATA) -o $(user) -g $(group) dhcp6c.8 $(mandir)/man8
+- $(INSTALL_DATA) -o $(user) -g $(group) dhcp6s.8 $(mandir)/man8
+- $(INSTALL_DATA) -o $(user) -g $(group) dhcp6relay.8 $(mandir)/man8
+- $(INSTALL_DATA) -o $(user) -g $(group) dhcp6ctl.8 $(mandir)/man8
+- $(INSTALL_DATA) -o $(user) -g $(group) dhcp6c.conf.5 $(mandir)/man5
+- $(INSTALL_DATA) -o $(user) -g $(group) dhcp6s.conf.5 $(mandir)/man5
++ mkdir -p $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8
++ $(INSTALL_PROGRAM) -s -o $(user) -g $(group) $(TARGET) $(DESTDIR)$(sbindir)
++ $(INSTALL_DATA) -o $(user) -g $(group) dhcp6c.8 $(DESTDIR)$(mandir)/man8
++ $(INSTALL_DATA) -o $(user) -g $(group) dhcp6s.8 $(DESTDIR)$(mandir)/man8
++ $(INSTALL_DATA) -o $(user) -g $(group) dhcp6relay.8 $(DESTDIR)$(mandir)/man8
++ $(INSTALL_DATA) -o $(user) -g $(group) dhcp6ctl.8 $(DESTDIR)$(mandir)/man8
++ $(INSTALL_DATA) -o $(user) -g $(group) dhcp6c.conf.5 $(DESTDIR)$(mandir)/man5
++ $(INSTALL_DATA) -o $(user) -g $(group) dhcp6s.conf.5 $(DESTDIR)$(mandir)/man5
+
+ includes::
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..665856e48e39
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,79 @@
+# Maintainer: Spyros Stathopoulos <foucault.online@gmail.com>
+pkgname=wide-dhcpv6
+pkgver=20080615
+pkgrel=13
+pkgdesc="An open source implementation of DHCPv6 developed by KAME project (with Debian patches)"
+arch=('i686' 'x86_64')
+url="http://wide-dhcpv6.sourceforge.net/"
+license=('custom')
+backup=('etc/wide-dhcpv6/dhcp6c.conf' 'etc/conf.d/startpd.conf')
+options=('emptydirs')
+
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ "http://ftp.de.debian.org/debian/pool/main/w/${pkgname}/${pkgname}_${pkgver}-11.1.debian.tar.gz"
+ "0000-noyywrap-option.patch"
+ "0001-renew.patch"
+ "0002-Fix-makefile.patch"
+ "dhcp6c.service"
+ "dhcp6c@.service"
+ "startpd.conf"
+ "dhcp6c.conf")
+
+install="dhcp6c.install"
+
+md5sums=('1011e165850fe40d3e332dad2bfd30b3'
+ 'e6bb556a2791b8a825ea2209ce10f27e'
+ '6bc5f3779f04cd1c74469b4942c1061d'
+ '678789721081e90e9a0822de1bb1d347'
+ 'dfba035ab0fd99ae56ab2e37a000cba0'
+ '7606280036a1a2c7c0a38af84803f41c'
+ '897c6ccb3608e6ac33c3022631a49ee6'
+ '8ec3740147eb2ff9ee7bec7070d2f008'
+ '54866e3bdd4093efe89a2fc245e7f5ab')
+
+prepare() {
+ cd ${srcdir}
+ cp debian/patches/*patch ${srcdir}
+ # this is included in the new 0002 patch, so rm it
+ rm "0002-Don-t-strip-binaries.patch"
+ cd ${srcdir}/$pkgname-$pkgver
+ for i in ../*patch ; do
+ patch -p1 < ${i};
+ done
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ pwd
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-localdbdir=/var/lib/dhcpv6 \
+ --sysconfdir=/etc/wide-dhcpv6 \
+ --sbindir=/usr/bin
+ # -j > 1 breaks build dependencies
+ make -j1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ mkdir -p "${pkgdir}/var/lib/dhcpv6"
+ mkdir -p "${pkgdir}/usr/share/man"
+ mkdir -p "${pkgdir}/usr/share/man/man5"
+ mkdir -p "${pkgdir}/usr/share/man/man8"
+ #install -D -m644 ${srcdir}/${pkgname}-${pkgver}/dhcp6c.conf.sample \
+ # ${pkgdir}/etc/wide-dhcpv6/dhcp6c.conf
+ install -D -m644 ${srcdir}/dhcp6c.conf \
+ ${pkgdir}/etc/wide-dhcpv6/dhcp6c.conf
+ install -D -m644 ${srcdir}/${pkgname}-${pkgver}/dhcp6s.conf.sample \
+ ${pkgdir}/etc/wide-dhcpv6/dhcp6s.conf
+ install -D -m644 ${srcdir}/dhcp6c.service \
+ ${pkgdir}/usr/lib/systemd/system/dhcp6c.service
+ install -D -m644 ${srcdir}/dhcp6c@.service \
+ ${pkgdir}/usr/lib/systemd/system/dhcp6c@.service
+ install -D -m644 ${srcdir}/${pkgname}-${pkgver}/COPYRIGHT \
+ ${pkgdir}/usr/share/licenses/wide-dhcpv6/LICENSE
+ install -D -m644 ${srcdir}/startpd.conf \
+ ${pkgdir}/etc/conf.d/startpd.conf
+ make DESTDIR="$pkgdir/" install
+}
+
diff --git a/dhcp6c.conf b/dhcp6c.conf
new file mode 100644
index 000000000000..439e76abde20
--- /dev/null
+++ b/dhcp6c.conf
@@ -0,0 +1,48 @@
+interface ext0 { # external facing interface - WAN
+ #send ia-na 0;
+ send ia-pd 0;
+ send rapid-commit;
+
+ request domain-name-servers;
+ request domain-name;
+ # send authentication <authname>;
+};
+
+id-assoc pd 0 { # prefix delegation request
+
+ ## Request a specific prefix
+ ## pltime and vltime are the "preferred" and "valid" lifetimes of the requested prefix.
+ # prefix <ipv6-prefix> <pltime> [<vltime>];
+ prefix-interface int0 { #internal facing interface - LAN
+ ## site-level aggregator - SLA - subnet address
+ sla-id 0;
+ ## IP address "postfix". Default is the EUI-64 address of the interface. Can be
+ ## any desired subnet address, in decimal. Combined with SLA-ID prefix to
+ ## create full IP address of interface.
+ ifid 1;
+ ## (WAN prefix) + (sla-len) must equal 64. If your ISP provides you
+ ## with a /56 prefix add 8 to make it /64
+ sla-len 8;
+ };
+
+};
+
+# id-assoc na 0 { # non-temporary address allocation request
+# ## Request a specific address.
+# ## pltime and vltime are the "preferred" and "valid" lifetimes
+# ## of the requested address.
+# address <ipv6-address> <pltime> [<vltime>];
+# };
+
+# authentication <authname> {
+# protocol delayed;
+# algorithm hmac-md5;
+# rdm monocounter; # replay-detection-method
+# };
+
+# keyinfo kame-key {
+# realm "kame.net";
+# keyid 1;
+# secret "5xnrt8irOKD16otstK1y=A=Z";
+# };
+
diff --git a/dhcp6c.install b/dhcp6c.install
new file mode 100644
index 000000000000..6b3d094d39a2
--- /dev/null
+++ b/dhcp6c.install
@@ -0,0 +1,10 @@
+post_install() {
+ echo "Edit the DHCPv6 client configuration in /etc/wide-dhcpv6/dhcp6c.conf"
+ echo "Also add your internal and external interface to /etc/conf.d/startpd.conf"
+ echo "and enable dhcp6c.service."
+}
+
+post_upgrade() {
+ post_install
+}
+
diff --git a/dhcp6c.service b/dhcp6c.service
new file mode 100644
index 000000000000..5f6caceeca05
--- /dev/null
+++ b/dhcp6c.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=WIDE-DHCPv6 Client on interface %I
+After=network.target
+Requires=network.target
+Before=dnsmasq.service
+Before=NetworkManager.service
+Documentation=man:dhcp6c(8) man:dhcp6c.conf(5)
+
+[Service]
+EnvironmentFile=/etc/conf.d/startpd.conf
+ExecStart=/usr/bin/dhcp6c -c /etc/wide-dhcpv6/dhcp6c.conf -fp /var/run/dhcp6c.pid $DHCP6C_WAN
+ExecReload=/usr/bin/kill -s SIGHUP $MAINPID
+ExecStop=/usr/bin/kill -s SIGTERM $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dhcp6c@.service b/dhcp6c@.service
new file mode 100644
index 000000000000..597f53ed83ad
--- /dev/null
+++ b/dhcp6c@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=WIDE-DHCPv6 Client on interface %I
+After=network.target
+Requires=network.target
+Before=dnsmasq.service
+Before=NetworkManager.service
+Documentation=man:dhcp6c(8) man:dhcp6c.conf(5)
+
+[Service]
+EnvironmentFile=/etc/conf.d/startpd.conf
+ExecStart=/usr/bin/dhcp6c -c /etc/wide-dhcpv6/dhcp6c.conf -fp /var/run/dhcp6c.pid %I
+ExecReload=/usr/bin/kill -s SIGHUP $MAINPID
+ExecStop=/usr/bin/kill -s SIGTERM $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/startpd.conf b/startpd.conf
new file mode 100644
index 000000000000..d6805fda45e4
--- /dev/null
+++ b/startpd.conf
@@ -0,0 +1,2 @@
+DHCP6C_WAN=ext0
+DHCP6C_LAN=int0