On 2014/03/19 10:28, Roy Marples wrote:
> dhcpcd is a DHCPv4/IPv4LL/IPv6RA/DHCPv6 quad stack client.
> It satisfies all the goals of the OpenBSD GSOC 2014 DHCP and related
> projects.
> However it has no privilege separation at this time.
> 
> Tested on i386/OpenBSD-5.4 and OpenBSD-current.
> 
> Two notes on this port specific to OpenBSD:
> 
> 1) I added a check to disable the use of posix_spawn(3) because it fails
> with and exit status of 127 on OpenBSD. The same code works fine on Linux,
> NetBSD and FreeBSD so I assume it's a bug with OpenBSD.
> I don't know enough of OpenBSD internals to investigate or fix. dhcpcd ships
> with a posix_spawn wrapper around fork(2) and vfork(2) that good enough to
> use instead though.
> 
> 2) OpenBSD-current (about 2 weeks old) failed to use the O_NONBLOCK flag
> when opening a bpf(4) device.
> This works fine on OpenBSD-5.4, I don't know if it's fixed in -current but I
> added an #ifdef to force it on which works fine.
> 
> I'm not subbed to this list, so please include me on any replies.
> 
> Thanks
> 
> Roy

I have a couple of ports tweaks:

- as it's not actually autoconf, it should use CONFIGURE_STYLE=simple
and set flags

- list http MASTER_SITES first, less chance of firewall issues

- don't install dhcpcd-hooks/50-ypbind which says "This script is
only suitable for the Linux version"

- there are various security issues relating to time setting, IMHO the
default config when installed as a package should not automatically
rewrite ntpd.conf

With these changes (diff below, updated tgz attached) it's ok sthen@
to import to ports.


diff --git Makefile Makefile
index a2af1c3..79331ba 100644
--- Makefile
+++ Makefile
@@ -12,11 +12,16 @@ PERMIT_PACKAGE_CDROM=       Yes
 
 WANTLIB=               c
 
-MASTER_SITES=          ftp://roy.marples.name/pub/dhcpcd/ \
-                       http://roy.marples.name/downloads/dhcpcd/
+MASTER_SITES=          http://roy.marples.name/downloads/dhcpcd/ \
+                       ftp://roy.marples.name/pub/dhcpcd/
+
+CONFIGURE_STYLE=       simple
+CONFIGURE_ARGS=                --prefix='${PREFIX}' \
+                       --sysconfdir='${SYSCONFDIR}' \
+                       --mandir='${PREFIX}/man' \
+                       --infodir='${PREFIX}/info' \
+                       --localstatedir='${LOCALSTATEDIR}'
 
-# It acts like a GNU configure script for ease of use but it's not
-CONFIGURE_STYLE=       gnu
 FAKE_FLAGS=            SYSCONFDIR=${PREFIX}/share/examples/dhcpcd
 
 .include <bsd.port.mk>
diff --git patches/patch-dhcpcd_conf patches/patch-dhcpcd_conf
new file mode 100644
index 0000000..2226928
--- /dev/null
+++ patches/patch-dhcpcd_conf
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- dhcpcd.conf.orig   Wed Mar 19 10:57:41 2014
++++ dhcpcd.conf        Wed Mar 19 11:02:45 2014
+@@ -21,8 +21,8 @@ option rapid_commit
+ # A list of options to request from the DHCP server.
+ option domain_name_servers, domain_name, domain_search, host_name
+ option classless_static_routes
+-# Most distributions have NTP support.
+-option ntp_servers
++# Automatically update ntp.conf / ntpd.conf after obtaining lease.
++#option ntp_servers
+ # Respect the network MTU.
+ # Some interface drivers reset when changing the MTU so disabled by default.
+ #option interface_mtu
diff --git pkg/PLIST pkg/PLIST
index 4f7e987..ff59837 100644
--- pkg/PLIST
+++ pkg/PLIST
@@ -9,7 +9,7 @@ libexec/dhcpcd-hooks/20-resolv.conf
 libexec/dhcpcd-hooks/29-lookup-hostname
 libexec/dhcpcd-hooks/30-hostname
 libexec/dhcpcd-hooks/50-ntp.conf
-libexec/dhcpcd-hooks/50-ypbind
+@comment libexec/dhcpcd-hooks/50-ypbind
 libexec/dhcpcd-run-hooks
 @man man/man5/dhcpcd.conf.5
 @man man/man8/dhcpcd-run-hooks.8

Attachment: dhcpcd.tgz
Description: application/tar-gz

Reply via email to