Alan Burlison wrote: 
> Roland Mainz wrote:
> > Roland Mainz wrote:
> >> Requesting sponsor for CR #6540124 ("RFE: OS/Net build could be slightly
> >> more portable"). The patch is attached in a bug...
> >>
> >> ... Alan: Would you be interested to sponor the fix ? Most of the patch
> >> affects your territory...
> >
> > Ok... Garrett D'Amore <garrett at damore.org>  volunters as "code reviewer"
> > ...
> > ... which means I only need a "sponsor" and Alan Burlison's "blessing"
> > for the patch...
> 
> I never actually received the patch..

Uhm... please check your InBox whether you received "Message-ID:
<4608C1D8.E0DB907F at nrubsig.org>" ...

... I've attached the patch as
"cr_6540124_more_portable_os_net_001.diff.txt".

The patch covers two items:
1. usr/src/lib/libmapid/Makefile.com assumes "ln" can override an
exixting link. This will not work for a POSIX-conformant version of
"ln". The patch...
-- snip --
Index: src/lib/libmapid/Makefile.com
===================================================================
--- src/lib/libmapid/Makefile.com       (revision 647)
+++ src/lib/libmapid/Makefile.com       (working copy)
@@ -41,6 +41,7 @@
 ROOTSLINK32  = $(ROOTLIBDIR)/32
 
 $(ROOTSLINK32):        $(ROOTLIBDIR)
+       $(RM) $@ ; \
        $(SYMLINK) . $@
 
 #
-- snip --
... fixes the problem by adjusting usr/src/lib/libmapid/Makefile.com to
follow the XPG rules for "ln" (e.g. it can't overwrite an existing
link).


2. The 2nd major part (which affects your territory) is the patch for
usr/src/cmd/perl/ which fixes a problem with "unset".
http://www.opengroup.org/onlinepubs/000095399/utilities/unset.html says:
-- snip --
EXIT STATUS
     0
        All name operands were successfully unset.
    >0
        At least one name could not be unset.
-- snip --
Since the maching variables may not be set "unset" returns an exit code
greater than zero and will therefore trigger the matching "make" rules
to fail if the shell used by the Makefile implements the "unset" builtin
correctly.
The diffs for usr/src/cmd/perl/ in the attached patch fix that (and a
missing ';' after "pwd").

> A webrev would be handy.

That's a little bit tricky... "webrev" currently has no working
Subversion support and my home-grown script is only able to compare two
checked-in versions (which means I have to create a branch etc. etc.).

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
-------------- next part --------------
Index: src/cmd/perl/5.6.1/extract_makeext.sh
===================================================================
--- src/cmd/perl/5.6.1/extract_makeext.sh       (revision 647)
+++ src/cmd/perl/5.6.1/extract_makeext.sh       (working copy)
@@ -123,7 +123,7 @@
 for ext in $nonxs_ext
 do
        printf '%s: %s/Makefile FRC\n' $ext $ext
-       printf '\t@ cd $@; pwd '
+       printf '\t@ cd $@; pwd; '
        printf '$(PERL_MM_ENV); $(MAKE) all\n\n'
 done
 
Index: src/cmd/perl/5.6.1/extract_config.sh
===================================================================
--- src/cmd/perl/5.6.1/extract_config.sh        (revision 647)
+++ src/cmd/perl/5.6.1/extract_config.sh        (working copy)
@@ -76,7 +76,7 @@
 printf 'PERL_POD_DIR = $(ROOT)%s/pod\n' $privlibexp
 
 # Compilation environment flags
-printf 'KEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES\n'
+printf 'KEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES || true\n'
 printf 'PERL_COREFLAGS = -DPERL_CORE\n'
 printf 'PERL_LFFLAGS = %s\n' "$ccflags_uselargefiles"
 printf 'PERL_LDLIBS = %s\n' "$perllibs"
Index: src/cmd/perl/5.8.4/extract_makeext.sh
===================================================================
--- src/cmd/perl/5.8.4/extract_makeext.sh       (revision 647)
+++ src/cmd/perl/5.8.4/extract_makeext.sh       (working copy)
@@ -122,7 +122,7 @@
 for ext in $nonxs_ext
 do
        printf '%s: %s/Makefile FRC\n' $ext $ext
-       printf '\t@ cd $@; pwd '
+       printf '\t@ cd $@; pwd; '
        printf '$(PERL_MM_ENV); $(MAKE) all\n\n'
 done
 
Index: src/cmd/perl/5.8.4/extract_config.sh
===================================================================
--- src/cmd/perl/5.8.4/extract_config.sh        (revision 647)
+++ src/cmd/perl/5.8.4/extract_config.sh        (working copy)
@@ -76,7 +76,7 @@
 printf 'PERL_POD_DIR = $(ROOT)%s/pod\n' $privlibexp
 
 # Compilation environment flags.
-printf 'KEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES\n'
+printf 'KEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES || true\n'
 printf 'PERL_COREFLAGS = -DPERL_CORE\n'
 printf 'PERL_LFFLAGS = %s\n' "$ccflags_uselargefiles"
 printf 'PERL_LDLIBS = %s\n' "$perllibs"
Index: src/lib/libmapid/Makefile.com
===================================================================
--- src/lib/libmapid/Makefile.com       (revision 647)
+++ src/lib/libmapid/Makefile.com       (working copy)
@@ -41,6 +41,7 @@
 ROOTSLINK32  = $(ROOTLIBDIR)/32
 
 $(ROOTSLINK32):        $(ROOTLIBDIR)
+       $(RM) $@ ; \
        $(SYMLINK) . $@
 
 #

Reply via email to