NetBSD Problem Report #29704

From lukem@mewburn.net  Wed Mar 16 05:27:09 2005
Return-Path: <lukem@mewburn.net>
Received: from home.mewburn.net (cerberus.mewburn.net [203.217.30.146])
	by narn.netbsd.org (Postfix) with ESMTP id A659F63B117
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 16 Mar 2005 05:27:08 +0000 (UTC)
Message-Id: <20050316052657.779D22BD09@home.mewburn.net>
Date: Wed, 16 Mar 2005 16:26:57 +1100 (EST)
From: lukem@NetBSD.org
Reply-To: lukem@NetBSD.org
To: gnats-bugs@netbsd.org
Subject: fsh doesn't like python 2.4
X-Send-Pr-Version: 3.95

>Number:         29704
>Category:       pkg
>Synopsis:       fsh doesn't like python 2.4
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    fredb
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 16 05:28:00 +0000 2005
>Closed-Date:    Mon Mar 21 13:50:03 +0000 2005
>Last-Modified:  Mon Mar 21 13:50:03 +0000 2005
>Originator:     Luke Mewburn
>Release:        NetBSD 2.99.10
>Organization:
TNF
>Environment:
>Description:
	The fsh package (security/fsh) doesn't operate correctly
	with python 2.4, because the FCNTL module was deprecated
	in the latter.

>How-To-Repeat:
	Try to run fsh.

	% fsh
	Traceback (most recent call last):
	  File "/usr/pkg/bin/fsh", line 6, in ?
	    import fsh
	  File "/usr/pkg/share/fsh/fsh.py", line 28, in ?
	    import fshlib
	  File "/usr/pkg/share/fsh/fshlib.py", line 24, in ?
	    import fshcompat
	  File "/usr/pkg/share/fsh/fshcompat.py", line 67, in ?
	    import FCNTL
	ImportError: No module named FCNTL

>Fix:
	Apply this patch.  It seems to work, but I'm not python clued
	enough to know if it's strictly correct.
	Once fixed correctly, feed the fix upstream.


--- fshcompat.py.orig	2001-12-23 22:08:26.000000000 +1100
+++ fshcompat.py
@@ -52,20 +52,23 @@ except:
 # in Python 2.2 as a bug.  See <URL:http://sourceforge.net/tracker/
 # ?func=detail&aid=496171&group_id=5470&atid=105470>.
 try:
-    # Stop Python 2.2 from warning that we import a deprecated module.
-    # But Python 1.5.2 doesn't have the warnings module, so be prepared
-    # for the import statement to fail.
     try:
-        import warnings
-        warnings.filterwarnings(
-            "ignore",
-            "the FCNTL module is deprecated; please use fcntl",
-            DeprecationWarning)
-    except ImportError:
-        pass
+	FD_CLOEXEC = fcntl.FD_CLOEXEC
+    except:
+	# Stop Python 2.2 from warning that we import a deprecated module.
+	# But Python 1.5.2 doesn't have the warnings module, so be prepared
+	# for the import statement to fail.
+	try:
+	    import warnings
+	    warnings.filterwarnings(
+		"ignore",
+		"the FCNTL module is deprecated; please use fcntl",
+		DeprecationWarning)
+	except ImportError:
+	    pass

-    import FCNTL
-    FD_CLOEXEC = FCNTL.FD_CLOEXEC
+	import FCNTL
+	FD_CLOEXEC = FCNTL.FD_CLOEXEC

 except AttributeError:


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->fredb
Responsible-Changed-By: recht@netbsd.org
Responsible-Changed-When: Wed, 16 Mar 2005 21:21:50 +0000
Responsible-Changed-Why:
over to maintainer


From: Frederick Bruckman <fredb@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/29704 CVS commit: pkgsrc/security/fsh
Date: Sun, 20 Mar 2005 12:51:54 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	fredb
 Date:		Sun Mar 20 12:51:54 UTC 2005

 Modified Files:
 	pkgsrc/security/fsh: Makefile distinfo
 Added Files:
 	pkgsrc/security/fsh/patches: patch-aa

 Log Message:
 Extend "fshcompat.py" to work with python24, using patch submitted by
 lukem in PR pkg/29704. Reviewed by recht.


 To generate a diff of this commit:
 cvs rdiff -r1.13 -r1.14 pkgsrc/security/fsh/Makefile
 cvs rdiff -r1.4 -r1.5 pkgsrc/security/fsh/distinfo
 cvs rdiff -r0 -r1.1 pkgsrc/security/fsh/patches/patch-aa

 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: fredb@netbsd.org
State-Changed-When: Sun, 20 Mar 2005 13:03:42 +0000
State-Changed-Why:

I found a volunteer to review it, and I tested with python23
vs. 21 server, and 24 client vs 24 server, and it works OK,
so I committed.

Luke, you mentioned submitting the patch to the upstream. There's
an open PR here:

  http://bugzilla.lysator.liu.se/show_bug.cgi?id=1448

Would you mind appending your patch to that? (I'm not much of a
maintainer -- I originally imported this package, but I haven't
even used it for years.) Thanks!


From: Luke Mewburn <lukem@NetBSD.org>
To: fredb@netbsd.org
Cc: pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org, lukem@NetBSD.org
Subject: Re: pkg/29704
Date: Mon, 21 Mar 2005 09:05:32 +1100

 --fblc08uBQ7kpPybH
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable

 On Sun, Mar 20, 2005 at 01:03:43PM +0000, fredb@netbsd.org wrote:
   | Luke, you mentioned submitting the patch to the upstream. There's
   | an open PR here:
   |=20
   |   http://bugzilla.lysator.liu.se/show_bug.cgi?id=3D1448
   |=20
   | Would you mind appending your patch to that? (I'm not much of a
   | maintainer -- I originally imported this package, but I haven't
   | even used it for years.) Thanks!

 Done.

 --fblc08uBQ7kpPybH
 Content-Type: application/pgp-signature
 Content-Disposition: inline

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.6 (NetBSD)

 iD8DBQFCPfOspBhtmn8zJHIRAuwkAKCR5ZF8C5BgZERIsAIFGvWcge940wCfTlYh
 4jCqzWkdr2tOUkf5uPqbCxg=
 =s3Lh
 -----END PGP SIGNATURE-----

 --fblc08uBQ7kpPybH--

State-Changed-From-To: feedback->closed
State-Changed-By: fredb@netbsd.org
State-Changed-When: Mon, 21 Mar 2005 13:50:03 +0000
State-Changed-Why:

All done.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.