NetBSD Problem Report #40155
From www@NetBSD.org Thu Dec 11 09:09:26 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 8B4B063B8C6
for <gnats-bugs@gnats.netbsd.org>; Thu, 11 Dec 2008 09:09:26 +0000 (UTC)
Message-Id: <20081211090926.25D7463B89C@narn.NetBSD.org>
Date: Thu, 11 Dec 2008 09:09:26 +0000 (UTC)
From: mtbakerguy@yahoo.com
Reply-To: mtbakerguy@yahoo.com
To: gnats-bugs@NetBSD.org
Subject: make net/pppd package work on dragonfly
X-Send-Pr-Version: www-1.0
>Number: 40155
>Category: pkg
>Synopsis: make net/pppd package work on dragonfly
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Dec 11 09:10:00 +0000 2008
>Closed-Date: Thu Jan 01 19:29:02 +0000 2009
>Last-Modified: Thu Jan 01 19:29:02 +0000 2009
>Originator: B K
>Release: dragonfly bsd
>Organization:
home
>Environment:
DragonFly bk.bk.net 2.0.1-RELEASE DragonFly 2.0.1-RELEASE #7: Wed Sep 24 20:39:13 PDT 2008 root@test28.backplane.com:/usr/obj/usr/src/sys/GENERIC i386
>Description:
This package should compile and run on dragonfly. The attached patch does the build and I've done some rudimentary testing. Specifically, I needed the pty capability to run ppp over an SSL connection.
Note about the attached diff. It's got some weirdness in pppdump.c even though I did the diff against the anonymous cvs server.
BTW: on a usability note, it took me a *long* time to figure out about the makepatchsum target as I'd expected the output of sha1 patchfile to suffice. It's not clear to me how to make that more immediately visible though.
>How-To-Repeat:
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/pppd/Makefile,v
retrieving revision 1.7
diff -d -u -r1.7 Makefile
--- Makefile 11 Jun 2007 12:36:23 -0000 1.7
+++ Makefile 11 Dec 2008 08:59:28 -0000
@@ -14,7 +14,7 @@
HAS_CONFIGURE= yes
USE_TOOLS+= gmake
-ONLY_FOR_PLATFORM+= NetBSD-*-* Linux-*-*
+ONLY_FOR_PLATFORM+= NetBSD-*-* Linux-*-* DragonFly*
PKG_SYSCONFSUBDIR= ppp
CONFIGURE_ENV+= PREFIX=${PREFIX:Q} PKGSYSCONFDIR=${PKG_SYSCONFDIR:Q}
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/pppd/distinfo,v
retrieving revision 1.6
diff -d -u -r1.6 distinfo
--- distinfo 29 Jul 2008 21:02:23 -0000 1.6
+++ distinfo 11 Dec 2008 08:59:28 -0000
@@ -7,12 +7,12 @@
SHA1 (patch-ab) = 1cd0d99dac316b1c5a48c9a41104c2c25e9bb920
SHA1 (patch-ac) = 9bc88cfcd7b1a09e92aaa919f35e39afb3b45803
SHA1 (patch-ad) = a3140bc6cfa9fe8d4548b118e9918308f7673e24
-SHA1 (patch-ae) = 3cb3f64ad7c209a8283a92c50bdb4071c6f8ad38
+SHA1 (patch-ae) = 93bca359f117244ec0c7669bca1db2a978b20fb6
SHA1 (patch-af) = 178a2a2a716d6ff8e9bd0cc36ff72d8a138f6989
SHA1 (patch-ag) = f989f71dbb164e53157ba2677f29737862e137f2
SHA1 (patch-ah) = 6bca5470590c5a9c9aa9de64abf21e44c770d1b5
SHA1 (patch-ai) = a0e5fcd766980e20ee3737273833e743dee58bf5
-SHA1 (patch-aj) = 01f7b864769f98d65d24294307932c3fb02162f4
+SHA1 (patch-aj) = 66e069bd5357c74337abc206d1a916a54059ab4b
SHA1 (patch-ak) = d38d646fad05418d1271918af53569bb40f12812
SHA1 (patch-al) = 1c76f6c2fa6a9a3ea4d79e23d4ecf449c5260d8d
SHA1 (patch-am) = 4d017c416611ca3bc91f1292d7fad2bffffa638d
@@ -28,7 +28,7 @@
SHA1 (patch-aw) = 7fb53f72216ffe34720b76fc122e87f4762a6696
SHA1 (patch-ax) = 0b9583346009b94f29084bd69963ad2d2e80ed5d
SHA1 (patch-ay) = 93ccd90f6efa58bfe31105526499308ed35b9522
-SHA1 (patch-az) = 76f29697ad08bfb6aee2bfafca4a49aa706c08fb
+SHA1 (patch-az) = 881a74112d4eb8aae69ef4cdd72cec9e399c6591
SHA1 (patch-ba) = 4293edb8b490fe31e07268a6d7001e1c9db8f323
SHA1 (patch-bb) = 9b17b12b45d9857eea42c2a6dc3704392c4df7c0
SHA1 (patch-bc) = d53a2226166e84fa9ea049cdbfb52c1dcd0f1ed9
@@ -37,7 +37,7 @@
SHA1 (patch-bf) = 16788a1508cd981ff8967915a86a1fb02e55330c
SHA1 (patch-bg) = 66b7d5a1ac2816f36a656c7c16a4862f313633f0
SHA1 (patch-bh) = 8136e968fadbc2cc08006651772b943313cb6641
-SHA1 (patch-bi) = 56d8389724807a8317b16219fbfb81b6da623d10
+SHA1 (patch-bi) = f59a6e7e4d3a217cdf58f816180dce8eb6a9c82b
SHA1 (patch-bj) = ad5618b6243414ce2649b200096a53194f48c735
SHA1 (patch-bk) = 2ebb4e4133c22775e374990a6e05390f826d3e91
SHA1 (patch-bl) = 31525cf95919a534804c95121f7e69289c4220cb
Index: patches/patch-ae
===================================================================
RCS file: /cvsroot/pkgsrc/net/pppd/patches/patch-ae,v
retrieving revision 1.1.1.1
diff -d -u -r1.1.1.1 patch-ae
--- patches/patch-ae 2 Jan 2005 02:51:42 -0000 1.1.1.1
+++ patches/patch-ae 11 Dec 2008 08:59:28 -0000
@@ -1,8 +1,7 @@
-$NetBSD: patch-ae,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $
-
---- configure.orig 2004-11-06 12:36:54.000000000 +0100
-+++ configure
-@@ -3,6 +3,6 @@
+--- configure.orig 2004-11-06 03:36:54 -0800
++++ configure 2008-12-10 03:05:00 -0800
+@@ -2,8 +2,8 @@
+ # $Id: configure,v 1.35 2004/11/06 11:36:54 paulus Exp $
# Where to install stuff by default
-DESTDIR=/usr/local
@@ -11,7 +10,9 @@
+SYSCONF=${PKGSYSCONFDIR}
# if [ -d /NextApps ]; then
-@@ -51,5 +51,10 @@ case $system in
+ # system="NeXTStep"
+@@ -50,7 +50,14 @@
+ else
echo "C compiler not found; hoping for the best."
fi;;
- NetBSD|FreeBSD|ULTRIX|OSF1|NeXTStep|SINIX-?|UNIX_SV|UNIX_System_V)
@@ -20,6 +21,9 @@
+ [01].*) state="notincluded";;
+ *) state="known"; ksrc="netbsd"; makext="netbsd";;
+ esac;;
++ DragonFly)
++ state="known"; ksrc="netbsd"; makext="netbsd";;
+ FreeBSD|ULTRIX|OSF1|NeXTStep|SINIX-?|UNIX_SV|UNIX_System_V)
state="notincluded";;
# NetBSD)
+ # makext="bsd";
Index: patches/patch-aj
===================================================================
RCS file: /cvsroot/pkgsrc/net/pppd/patches/patch-aj,v
retrieving revision 1.1.1.1
diff -d -u -r1.1.1.1 patch-aj
--- patches/patch-aj 2 Jan 2005 02:51:42 -0000 1.1.1.1
+++ patches/patch-aj 11 Dec 2008 08:59:28 -0000
@@ -37,7 +37,7 @@
+# CC = gcc
+#
+COPTS = -O2 -pipe -Wall -g
-+LIBS = -lutil
++LIBS = -lutil -lmd -lcipher
+
+# Uncomment the next 2 lines to include support for Microsoft's
+# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
Index: patches/patch-az
===================================================================
RCS file: /cvsroot/pkgsrc/net/pppd/patches/patch-az,v
retrieving revision 1.3
diff -d -u -r1.3 patch-az
--- patches/patch-az 2 Jan 2005 22:28:31 -0000 1.3
+++ patches/patch-az 11 Dec 2008 08:59:28 -0000
@@ -1,8 +1,6 @@
-$NetBSD: patch-az,v 1.3 2005/01/02 22:28:31 cube Exp $
-
---- pppd/sys-bsd.c.orig 2005-01-02 23:24:27.000000000 +0100
-+++ pppd/sys-bsd.c
-@@ -0,0 +1,2184 @@
+--- pppd/sys-bsd.c.orig 2008-12-07 23:07:28 -0800
++++ pppd/sys-bsd.c 2008-12-10 03:14:36 -0800
+@@ -0,0 +1,2188 @@
+/* NetBSD: sys-bsd.c,v 1.50 2004/12/05 04:16:22 christos Exp */
+
+/*
@@ -131,13 +129,17 @@
+#if defined(NetBSD) && (NetBSD >= 199703)
+#include <netinet/if_inarp.h>
+#else /* NetBSD 1.2D or later */
-+#ifdef __FreeBSD__
++#ifdef __FreeBSD__
++#include <netinet/if_ether.h>
++#else
++#ifdef __DragonFly__
+#include <netinet/if_ether.h>
+#else
+#include <net/if_ether.h>
+#endif
+#endif
+#endif
++#endif
+
+#include "pppd.h"
+#include "fsm.h"
Index: patches/patch-bi
===================================================================
RCS file: /cvsroot/pkgsrc/net/pppd/patches/patch-bi,v
retrieving revision 1.1.1.1
diff -d -u -r1.1.1.1 patch-bi
--- patches/patch-bi 2 Jan 2005 02:51:44 -0000 1.1.1.1
+++ patches/patch-bi 11 Dec 2008 08:59:28 -0000
@@ -1,14 +1,16 @@
-$NetBSD: patch-bi,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
-
---- pppdump/pppdump.c.orig 2004-02-02 04:36:46.000000000 +0100
-+++ pppdump/pppdump.c
-@@ -38,8 +38,13 @@
+--- pppdump/pppdump.c.orig 2004-02-01 19:36:46 -0800
++++ pppdump/pppdump.c 2008-12-10 03:22:59 -0800
+@@ -38,8 +38,17 @@
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
-#include "ppp_defs.h"
+#include "pppdump.h"
++#ifdef __DragonFly__
++#include <net/ppp_layer/ppp_defs.h>
++#else
+#include <net/ppp_defs.h>
++#endif
+#ifdef __NetBSD__
+#include <net/ppp-comp.h>
+#else
@@ -17,7 +19,7 @@
int hexmode;
int pppmode;
-@@ -51,6 +56,15 @@ time_t start_time;
+@@ -51,6 +60,15 @@
int start_time_tenths;
int tot_sent, tot_rcvd;
@@ -33,7 +35,7 @@
extern int optind;
extern char *optarg;
-@@ -191,7 +205,7 @@ dumplog(f)
+@@ -191,7 +209,7 @@
show_time(f, c);
break;
default:
@@ -42,7 +44,7 @@
}
}
}
-@@ -234,15 +248,6 @@ static u_short fcstab[256] = {
+@@ -234,15 +252,6 @@
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
@@ -58,7 +60,7 @@
/* Values for flags */
#define CCP_ISUP 1
#define CCP_ERROR 2
-@@ -321,7 +326,7 @@ dumpppp(f)
+@@ -321,7 +330,7 @@
++r;
if (endp - r > mru)
printf(" ERROR: length (%d) > MRU (%d)\n",
@@ -67,7 +69,7 @@
if (decompress && fcs == PPP_GOODFCS) {
/* See if this is a CCP or compressed packet */
d = dbuf;
-@@ -340,8 +345,15 @@ dumpppp(f)
+@@ -340,8 +349,15 @@
&& (pkt->flags & CCP_DECOMP_RUN)
&& pkt->state
&& (pkt->flags & CCP_ERR) == 0) {
@@ -85,7 +87,7 @@
switch (rv) {
case DECOMP_OK:
p = dbuf;
-@@ -364,7 +376,10 @@ dumpppp(f)
+@@ -364,7 +380,10 @@
}
} else if (pkt->state
&& (pkt->flags & CCP_DECOMP_RUN)) {
>Release-Note:
>Audit-Trail:
From: Hasso Tepper <hasso@estpak.ee>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/40155: make net/pppd package work on dragonfly
Date: Tue, 16 Dec 2008 17:11:24 +0200
mtbakerguy@yahoo.com wrote:
> This package should compile and run on dragonfly. The attached patch
> does the build and I've done some rudimentary testing. Specifically, I
> needed the pty capability to run ppp over an SSL connection.
Nice, except that this change breaks it for NetBSD, which isn't acceptable
of course:
> -+LIBS = -lutil
> ++LIBS = -lutil -lmd -lcipher
Can you rework this fix so that it doesn't break currently working
platform(s)?
--
Hasso Tepper
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/40155: make net/pppd package work on dragonfly
Date: Tue, 16 Dec 2008 17:43:37 +0100
On Tue, Dec 16, 2008 at 03:15:04PM +0000, Hasso Tepper wrote:
> > -+LIBS = -lutil
> > ++LIBS = -lutil -lmd -lcipher
LIBS.DragonFly in the main Makefile might help.
Joerg
From: B K <mtbakerguy@yahoo.com>
To: gnats-bugs@NetBSD.org
Cc: hasso@estpak.ee
Subject: Re: pkg/40155: make net/pppd package work on dragonfly
Date: Wed, 17 Dec 2008 23:17:16 -0800 (PST)
Sometimes you ought to build things before trying. I fought with bmake to figure out the :!cmd! syntax to do the following:
.if ${:!/usr/bin/uname -s!} == "DragonFly"
LIBS += -lcipher -lmd
.endif
and then realized with I tried to do the build that it uses gmake with the saner $(shell /usr/bin/uname -s) syntax so you really just need to insert something like the following into patches/patch-aj:
LIBS=-lutil
ifeq ($(shell /usr/bin/uname -s),DragonFly)
LIBS += -lcipher -lmd
endif
I considered sending a brand new patch in its entirety but figured that'd clutter up the change request and obscure the change. Likewise, I debated about either additional pathname lookups for uname or perhaps just using $(shell uname -s) and letting the contents of PATH drive the lookup. Eventually I decided to use the explicity /usr/bin path.
B K
--- On Tue, 12/16/08, Hasso Tepper <hasso@estpak.ee> wrote:
> From: Hasso Tepper <hasso@estpak.ee>
> Subject: Re: pkg/40155: make net/pppd package work on dragonfly
> To: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, mtbakerguy@yahoo.com
> Date: Tuesday, December 16, 2008, 7:15 AM
> The following reply was made to PR pkg/40155; it has been
> noted by GNATS.
>
> From: Hasso Tepper <hasso@estpak.ee>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: pkg/40155: make net/pppd package work on
> dragonfly
> Date: Tue, 16 Dec 2008 17:11:24 +0200
>
> mtbakerguy@yahoo.com wrote:
> > This package should compile and run on dragonfly.
> The attached patch
> > does the build and I've done some rudimentary
> testing. Specifically, I
> > needed the pty capability to run ppp over an SSL
> connection.
>
> Nice, except that this change breaks it for NetBSD, which
> isn't acceptable
> of course:
>
> > -+LIBS = -lutil
> > ++LIBS = -lutil -lmd -lcipher
>
> Can you rework this fix so that it doesn't break
> currently working
> platform(s)?
>
>
> --
> Hasso Tepper
From: Hasso Tepper <hasso@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40155 CVS commit: pkgsrc/net/pppd
Date: Fri, 26 Dec 2008 21:41:40 +0000 (UTC)
Module Name: pkgsrc
Committed By: hasso
Date: Fri Dec 26 21:41:40 UTC 2008
Modified Files:
pkgsrc/net/pppd: Makefile distinfo
pkgsrc/net/pppd/patches: patch-ae patch-aj patch-az patch-bi
Log Message:
Make it work on DragonFly. Slightly modified patch from PR 40155.
To generate a diff of this commit:
cvs rdiff -r1.7 -r1.8 pkgsrc/net/pppd/Makefile
cvs rdiff -r1.6 -r1.7 pkgsrc/net/pppd/distinfo
cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/net/pppd/patches/patch-ae \
pkgsrc/net/pppd/patches/patch-aj pkgsrc/net/pppd/patches/patch-bi
cvs rdiff -r1.3 -r1.4 pkgsrc/net/pppd/patches/patch-az
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 29 Dec 2008 09:25:10 +0000
State-Changed-Why:
Is it fixed now?
From: B K <mtbakerguy@yahoo.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/40155 (make net/pppd package work on dragonfly)
Date: Thu, 1 Jan 2009 10:57:36 -0800 (PST)
I just tested it and the package built correctly.
Thanks!
--- On Mon, 12/29/08, dholland@NetBSD.org <dholland@NetBSD.org> wrote:
> From: dholland@NetBSD.org <dholland@NetBSD.org>
> Subject: Re: pkg/40155 (make net/pppd package work on dragonfly)
> To: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org, dholland@NetBSD.org, mtbakerguy@yahoo.com
> Date: Monday, December 29, 2008, 1:25 AM
> Synopsis: make net/pppd package work on dragonfly
>
> State-Changed-From-To: open->feedback
> State-Changed-By: dholland@NetBSD.org
> State-Changed-When: Mon, 29 Dec 2008 09:25:10 +0000
> State-Changed-Why:
> Is it fixed now?
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 01 Jan 2009 19:29:02 +0000
State-Changed-Why:
Confirmed fixed; thanks for checking.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.