Bug 115940 - Missed one file in lang/python25 if NO_NIS defined
Summary: Missed one file in lang/python25 if NO_NIS defined
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-30 12:00 UTC by Alex Deiter
Modified: 2011-09-18 10:10 UTC (History)
0 users

See Also:


Attachments
file.diff (457 bytes, patch)
2007-08-30 12:00 UTC, Alex Deiter
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Deiter 2007-08-30 12:00:01 UTC
Hi,

Port lang/python25 have a missed file:

/usr/local/lib/python2.5/lib-dynload/nis_failed.so

when system build with NO_NIS=YES in /etc/make.conf

Thanks!

Fix: Patch attached with submission follows:
How-To-Repeat: # cd /usr/ports/lang/python25
# make install deinstall
# find /usr/local/ -type f
/usr/local/lib/python2.5/lib-dynload/nis_failed.so
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-08-30 12:00:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->python

Over to maintainer
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2007-09-04 22:46:41 UTC
Responsible Changed
From-To: python->freebsd-python

Canonicalize assignment.
Comment 3 Alex Kozlov 2007-09-20 07:30:58 UTC
Hi

I think this will be more elegant:

Index: lang/python25/Makefile
@@ -101,9 +101,9 @@
 .endif
 
 .if !exists(/usr/bin/ypcat) # the world with NO_NIS
+PLIST_SUB+=    NIS="@comment " NO_NIS=""
-PLIST_SUB+=    NO_NIS="@comment "
 .else
+PLIST_SUB+=    NIS="" NO_NIS="@comment "
-PLIST_SUB+=    NO_NIS=""
 .endif
Index: lang/python25/pkg-plist
@@ -677,8 +677,7 @@
 %%PYTHON_LIBDIR%%/lib-dynload/itertools.so
 %%PYTHON_LIBDIR%%/lib-dynload/math.so
 %%PYTHON_LIBDIR%%/lib-dynload/mmap.so
+%%NIS%%%%PYTHON_LIBDIR%%/lib-dynload/nis.so
+%%NO_NIS%%%%PYTHON_LIBDIR%%/lib-dynload/nis_failed.so
-%%NO_NIS%%%%PYTHON_LIBDIR%%/lib-dynload/nis.so
 %%PYTHON_LIBDIR%%/lib-dynload/operator.so
 %%PYTHON_LIBDIR%%/lib-dynload/ossaudiodev.so
 %%PYTHON_LIBDIR%%/lib-dynload/parser.so
Comment 4 Tobias Rehbein 2009-09-20 17:30:11 UTC
Hi. 

I got bitten by this too. Would somebody please review and commit the fix?

Thanks, Tobias
-- 
Tobias Rehbein

PGP key:         4F2AE314
    server:      keys.gnupg.net
    fingerprint: ECDA F300 1B6E 9B87 8524  8663 E8B6 3138 4F2A E314
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-09-11 12:12:56 UTC
Responsible Changed
From-To: freebsd-python->crees

I'll take it.
Comment 6 Chris Rees 2011-09-11 12:42:53 UTC
Hi,

This problem has been going on for a number of years, and as far as I
can see there isn't a proper and elegant solution.

A fix is at [1], which should solve the problem, and I'm going to
tinderbox test and commit it if no-one complains.

Chris

[1] http://www.bayofrum.net/~crees/patches/python-nis_failed-fix.diff

http://www.freebsd.org/cgi/query-pr.cgi?pr=3D115940

--=20
Chris Rees =A0 =A0 =A0 =A0 =A0| FreeBSD Developer
crees@FreeBSD.org =A0 | http://people.freebsd.org/~crees
Comment 7 b. f. 2011-09-13 09:05:35 UTC
> This problem has been going on for a number of years, and as far as I
> can see there isn't a proper and elegant solution.
>
> A fix is at [1], which should solve the problem, and I'm going to
> tinderbox test and commit it if no-one complains.

As Kozlov said earlier, that's a bit ugly.  I think it would be better
to avoid attempting to build the module in the first place, by simply
adding something like:

.if !exists(/usr/bin/ypcat) # the world with NO_NIS
	${REINPLACE_CMD} -e 's|rpcsvc/yp_prot.h|${NONEXISTENT}|' \
		${PATCH_WRKSRC}/setup.py
.endif

to the pre-patch target, or something like:

.if !exists(/usr/bin/ypcat) # the world with NO_NIS
	${REINPLACE_CMD} -e '\|disabled_module_list =|s|]|, "nis"&|' \
		${PATCH_WRKSRC}/setup.py
.endif

to the post-patch target.

b.
Comment 8 Chris Rees 2011-09-17 20:25:00 UTC
On 13 September 2011 09:05, b. f. <bf1783@googlemail.com> wrote:
>> This problem has been going on for a number of years, and as far as I
>> can see there isn't a proper and elegant solution.
>>
>> A fix is at [1], which should solve the problem, and I'm going to
>> tinderbox test and commit it if no-one complains.
>
> As Kozlov said earlier, that's a bit ugly. =A0I think it would be better
> to avoid attempting to build the module in the first place, by simply
> adding something like:
>
> .if !exists(/usr/bin/ypcat) # the world with NO_NIS
> =A0 =A0 =A0 =A0${REINPLACE_CMD} -e 's|rpcsvc/yp_prot.h|${NONEXISTENT}|' \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0${PATCH_WRKSRC}/setup.py
> .endif
>
> to the pre-patch target, or something like:
>
> .if !exists(/usr/bin/ypcat) # the world with NO_NIS
> =A0 =A0 =A0 =A0${REINPLACE_CMD} -e '\|disabled_module_list =3D|s|]|, "nis=
"&|' \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0${PATCH_WRKSRC}/setup.py
> .endif

Good point, and thanks for the idea, even if it did take me ten
minutes to work out how the hell your REINPLACE line worked ;) I've
simplified it a little.

Is it better now? It works in tinderbox so far....

http://www.bayofrum.net/~crees/patches/python-nis_failed-fix-bffix.diff

Chris
Comment 9 dfilter service freebsd_committer freebsd_triage 2011-09-18 09:33:24 UTC
crees       2011-09-18 08:33:15 UTC

  FreeBSD ports repository

  Modified files:
    lang/python24        Makefile 
    lang/python25        Makefile 
    lang/python26        Makefile 
    lang/python27        Makefile 
    lang/python31        Makefile 
    lang/python32        Makefile 
  Log:
  Handle built world without NIS more gracefully; detect missing ypcat and
   disable NIS module.
  
  PR:             ports/115940
  Submitted by:   Alex Deiter <tiamat@komi.mts.ru>
  Reviewed by:    bf
  
  Revision  Changes    Path
  1.172     +10 -1     ports/lang/python24/Makefile
  1.163     +10 -1     ports/lang/python25/Makefile
  1.174     +8 -1      ports/lang/python26/Makefile
  1.177     +8 -1      ports/lang/python27/Makefile
  1.172     +10 -1     ports/lang/python31/Makefile
  1.177     +10 -1     ports/lang/python32/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 10 Chris Rees freebsd_committer freebsd_triage 2011-09-18 10:08:19 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 11 Chris Rees 2011-09-18 10:09:34 UTC
Committed. Thanks!

Thanks also goes to bf@, who has taught me how to use a delimiter other 
than / at the beginning of a sed command.

Chris

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.