2009-12-18 Laszlo (Laca) Peter <[email protected]>
authorlaca
Thu, 17 Dec 2009 11:23:11 +0000
changeset 17199 31a50a03b888
parent 17198 4ddcad4f382e
child 17200 840c093a14b4
2009-12-18 Laszlo (Laca) Peter <[email protected]> * SUNWPython.spec: remove invalid dep * SUNWPython26.spec: add patch ext-stdio.diff, fixes 6784248 * SUNWgnome-xml.spec: convert the docbook-catalog-install postinstall script into an smf service so it works with IPS * SUNWlibffi.spec: add missing build dep * SUNWlibpopt.spec: add missing build dep * SUNWopenjade.spec: add missing build dep; disable parallel build * SUNWperl-xml-parser.spec: add missing dep * ext-sources/docbook-catalog-update.sh: (new) method script for docbook catalog update smf service * ext-sources/docbook-catalog-update.xml: (new) manifest for docbook catalog update smf service * patches/Python26-19-ext-stdio.diff: (new) patch that allows keeping more than 256 files open
ChangeLog
SUNWPython.spec
SUNWPython26.spec
SUNWgnome-xml.spec
SUNWlibffi.spec
SUNWlibpopt.spec
SUNWopenjade.spec
SUNWperl-xml-parser.spec
ext-sources/docbook-catalog-update.sh
ext-sources/docbook-catalog-update.xml
patches/Python26-19-ext-stdio.diff
--- a/ChangeLog	Thu Dec 17 10:18:38 2009 +0000
+++ b/ChangeLog	Thu Dec 17 11:23:11 2009 +0000
@@ -1,3 +1,20 @@
+2009-12-18  Laszlo (Laca) Peter  <[email protected]>
+
+	* SUNWPython.spec: remove invalid dep
+	* SUNWPython26.spec: add patch ext-stdio.diff, fixes 6784248
+	* SUNWgnome-xml.spec: convert the docbook-catalog-install postinstall
+	  script into an smf service so it works with IPS
+	* SUNWlibffi.spec: add missing build dep
+	* SUNWlibpopt.spec: add missing build dep
+	* SUNWopenjade.spec: add missing build dep; disable parallel build
+	* SUNWperl-xml-parser.spec: add missing dep
+	* ext-sources/docbook-catalog-update.sh: (new) method script for
+	  docbook catalog update smf service
+	* ext-sources/docbook-catalog-update.xml: (new) manifest for
+	  docbook catalog update smf service
+	* patches/Python26-19-ext-stdio.diff: (new) patch that allows keeping
+	  more than 256 files open
+
 2009-12-17  Ke Wang <[email protected]>
 
 	* SUNWlibproxy.spec:
--- a/SUNWPython.spec	Thu Dec 17 10:18:38 2009 +0000
+++ b/SUNWPython.spec	Thu Dec 17 11:23:11 2009 +0000
@@ -104,7 +104,6 @@
 Summary:                 %{summary} - development files
 %include default-depend.inc
 Requires: SUNWPython
-Requires: SUNWscpu
 
 %prep
 %setup -q -c -n %name-%version
--- a/SUNWPython26.spec	Thu Dec 17 10:18:38 2009 +0000
+++ b/SUNWPython26.spec	Thu Dec 17 11:23:11 2009 +0000
@@ -81,6 +81,8 @@
 # date:2009-12-02 owner:laca type:bug
 # enable readline support on Solaris
 Patch18:                 Python26-18-readline.diff
+# date:2009-12-17 owner:laca type:feature bugster:6784248
+Patch19:                 Python26-19-ext-stdio.diff
 
 %include default-depend.inc
 BuildRequires: SUNWTk
@@ -134,6 +136,7 @@
 %patch16 -p1
 %patch17 -p1
 %patch18 -p1 -b .readline
+%patch19 -p1
 cd ..
 
 echo fixing python binary name/path in python scripts:
@@ -417,6 +420,8 @@
 %{_libdir}/python?.?/py[cC][cC]
 
 %changelog
+* Thu Dec 17 2009 - [email protected]
+- add patch ext-stdio.diff, fixes 6784248
 * Thu Dec  3 2009 - [email protected]
 - bump to 2.6.4
 - add patch readline.diff for enabling the build of the readline module
--- a/SUNWgnome-xml.spec	Thu Dec 17 10:18:38 2009 +0000
+++ b/SUNWgnome-xml.spec	Thu Dec 17 11:23:11 2009 +0000
@@ -5,7 +5,7 @@
 #                     docbook-style-xsl
 #                     all of the above originally taken from Fedora Core 6
 #
-# Copyright 2007 Sun Microsystems, Inc.
+# Copyright 2009 Sun Microsystems, Inc.
 # This file and all modifications and additions to the pristine
 # package are under the same license as the package itself.
 #
@@ -28,6 +28,8 @@
 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
 Source1:                 docbook-catalog-install.sh
 Source2:                 docbook-catalog-uninstall.sh
+Source3:                 docbook-catalog-update.sh
+Source4:                 docbook-catalog-update.xml
 %include default-depend.inc
 Requires: SUNWlxml
 Requires: SUNWbash
@@ -44,7 +46,6 @@
 SUNW_BaseDir:            /
 %include default-depend.inc
 Requires: SUNWgnome-xml-share
-Requires: SUNWpostrun-root
 
 %prep
 rm -rf %name-%version
@@ -69,6 +70,10 @@
 
 install -m 744 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/sgml/docbook
 install -m 744 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/sgml/docbook
+install -m 755 -d $RPM_BUILD_ROOT/lib/svc/method
+install -m 755 -d $RPM_BUILD_ROOT/var/svc/manifest/application/desktop-cache
+install -m 555 %{SOURCE3} $RPM_BUILD_ROOT/lib/svc/method/docbook-catalog-update.sh
+install -m 444 %{SOURCE4} $RPM_BUILD_ROOT/var/svc/manifest/application/desktop-cache/docbook-catalog-update.xml
 touch $RPM_BUILD_ROOT%{_sysconfdir}/xml/catalog
 
 # move collateindex.pl out of /usr/bin
@@ -106,22 +111,19 @@
 %{_datadir}/man
 
 %files -n SUNWgnome-xml-root
+%attr (-, root, sys) %class (manifest) /var/svc/manifest
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) /lib
+/lib/svc
 %defattr (-, root, sys)
 %dir %attr (0755, root, sys) %{_sysconfdir}
 %ghost %{_sysconfdir}/*
 %defattr (-, root, sys)
 
-%post -n SUNWgnome-xml-root
-( echo %{_datadir}/sgml/docbook/docbook-catalog-install.sh
-) | $BASEDIR/var/lib/postrun/postrun -c JDS
-
-
-%preun -n SUNWgnome-xml-root
-test -x $BASEDIR/var/lib/postrun/postrun || exit 0
-( echo %{_datadir}/sgml/docbook/docbook-catalog-uninstall.sh
-) | $BASEDIR/var/lib/postrun/postrun -c JDS
-
 %changelog
+* Thu Dec 10 2009 - [email protected]
+- convert the docbook-catalog-install postinstall script into an smf service
+  so it works with IPS
 * Wed Mar 21 2007 - [email protected]
 - update %files after fixing sgml-common
 * Wed Feb 28 2007 - [email protected]
--- a/SUNWlibffi.spec	Thu Dec 17 10:18:38 2009 +0000
+++ b/SUNWlibffi.spec	Thu Dec 17 11:23:11 2009 +0000
@@ -27,6 +27,7 @@
 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
 %include default-depend.inc
 Requires: SUNWgccruntime
+BuildRequires: SUNWgcc
 
 %package devel
 Summary:                 %{summary} - development files
--- a/SUNWlibpopt.spec	Thu Dec 17 10:18:38 2009 +0000
+++ b/SUNWlibpopt.spec	Thu Dec 17 11:23:11 2009 +0000
@@ -29,6 +29,7 @@
 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
 
 %include default-depend.inc
+BuildRequires: SUNWlibm
 
 %package devel
 Summary:                 %{summary} - development files
--- a/SUNWopenjade.spec	Thu Dec 17 10:18:38 2009 +0000
+++ b/SUNWopenjade.spec	Thu Dec 17 11:23:11 2009 +0000
@@ -19,7 +19,7 @@
 SUNW_BaseDir:            %{_basedir}
 SUNW_Copyright:          %{name}.copyright
 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
-Source:                  http://umn.dl.sourceforge.net/openjade/openjade-1.3.2.tar.gz
+Source:                  %{sf_download}/openjade/openjade-1.3.2.tar.gz
 Source1:		 jade_style-sheet.dtd
 # date:2004-01-09 owner:laca type:bug state:upstream
 # autoconf macros takes from upstream sources
@@ -35,6 +35,7 @@
 Requires: SUNWopensp
 Requires: SUNWlibC
 Requires: SUNWlibms
+BuildRequires: SUNWperl584usr
 
 %package devel
 Summary:                 %{summary}  - development files
@@ -62,10 +63,6 @@
 %define sgml_var_dir %{_localstatedir}/lib/sgml
 
 %build
-CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
-if test "x$CPUS" = "x" -o $CPUS = 0; then
-    CPUS=1
-fi
 export CXXFLAGS="%cxx_optflags"
 export LD=/usr/ccs/bin/ld
 rm -f aclocal.m4 missing
@@ -82,7 +79,7 @@
   --disable-http \
   --enable-mif \
   --enable-default-catalog="CATALOG:/etc/sgml/catalog:%{sgml_dir}/CATALOG"
-make -j$CPUS
+make
 
 %install
 [ "$RPM_BUILD_ROOT" != "" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
--- a/SUNWperl-xml-parser.spec	Thu Dec 17 10:18:38 2009 +0000
+++ b/SUNWperl-xml-parser.spec	Thu Dec 17 11:23:11 2009 +0000
@@ -33,6 +33,7 @@
 %endif
 %include default-depend.inc
 Requires: SUNWlexpt
+Requires: SUNWperl584usr
 %define expat_libdir /usr/sfw/lib
 %define expat_includedir /usr/sfw/include
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ext-sources/docbook-catalog-update.sh	Thu Dec 17 11:23:11 2009 +0000
@@ -0,0 +1,84 @@
+#!/bin/ksh -p
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+###########################################################################
+#
+
+PATH=/usr/bin:/usr/sbin
+
+. /lib/svc/share/smf_include.sh
+
+USAGE="Usage: $0 { start | refresh }"
+
+if [ $# -ne 1 ] ; then
+    echo $USAGE
+    exit 2
+fi
+
+CATALOG_INSTALL=/usr/share/sgml/docbook/docbook-catalog-install.sh
+CATALOG_UNINSTALL=/usr/share/sgml/docbook/docbook-catalog-uninstall.sh
+
+start_docbook_catalog_update ()
+{
+  if [ ! -f /etc/xml/catalog -o $CATALOG_INSTALL -nt /etc/xml/catalog ]; then
+      $CATALOG_INSTALL
+  fi
+}
+
+refresh_docbook_catalog_update ()
+{
+  if [ ! -f /etc/xml/catalog -o $CATALOG_INSTALL -nt /etc/xml/catalog ]; then
+      $CATALOG_UNINSTALL > /dev/null 2>&1
+      $CATALOG_INSTALL
+  fi
+}
+
+METHOD=$1
+
+case "$METHOD" in
+    'start')
+	# Continue with rest of script
+	;;
+    'refresh')
+	# Continue with rest of script
+	;;
+    -*)
+	echo $USAGE
+	exit 2
+	;;
+    *)
+	echo "Invalid method $METHOD"
+	exit 2
+	;;
+esac
+
+${METHOD}_docbook_catalog_update
+
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ext-sources/docbook-catalog-update.xml	Thu Dec 17 11:23:11 2009 +0000
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+    Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+    Use is subject to license terms.
+
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the
+    "Software"), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, and/or sell copies of the Software, and to permit persons
+    to whom the Software is furnished to do so, provided that the above
+    copyright notice(s) and this permission notice appear in all copies of
+    the Software and that both the above copyright notice(s) and this
+    permission notice appear in supporting documentation.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+    OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+    HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+    INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+    Except as contained in this notice, the name of a copyright holder
+    shall not be used in advertising or otherwise to promote the sale, use
+    or other dealings in this Software without prior written authorization
+    of the copyright holder.
+
+    Service manifest to update the xml catalog after installing the docbook
+    stylesheets
+-->
+
+<service_bundle type='manifest' name='SUNWgnome-xml:docbook-catalog-update'>
+
+<service
+	name='application/desktop-cache/docbook-catalog-update'
+	type='service'
+	version='1'>
+
+	<create_default_instance enabled='true' />
+
+	<single_instance />
+
+	<!-- Need / & /usr filesystems mounted, /var mounted read/write -->
+	<dependency
+		name='fs-local'
+		type='service'
+		grouping='require_all'
+		restart_on='none'>
+		<service_fmri value='svc:/system/filesystem/local' />
+	</dependency>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/docbook-catalog-update.sh %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/docbook-catalog-update.sh %m'
+		timeout_seconds='600'>
+		<method_context>
+                        <method_credential user='root' group='root' />
+                </method_context>
+        </exec_method>
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<stability value='Evolving' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>docbook catalog registration
+				</loctext>
+		</common_name>
+
+		<documentation>
+			<manpage
+				title='xmlcatalog'
+				section='1'
+				manpath='/usr/share/man' />
+		</documentation>
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/Python26-19-ext-stdio.diff	Thu Dec 17 11:23:11 2009 +0000
@@ -0,0 +1,33 @@
+--- Python-2.6.4/Modules/python.c.ext-stdio	2002-12-29 10:56:08.000000000 +1300
++++ Python-2.6.4/Modules/python.c	2009-12-14 22:17:02.064985117 +1300
+@@ -6,6 +6,13 @@
+ #include <floatingpoint.h>
+ #endif
+ 
++#if defined(sun) && defined(__SVR4) && !defined(_LP64)
++#define USE_EXTENDED_FILE_STDIO 1
++#include <stdio.h>
++#include <stdio_ext.h>
++#include <signal.h>
++#endif
++
+ int
+ main(int argc, char **argv)
+ {
+@@ -20,5 +27,16 @@
+ 	m = fpgetmask();
+ 	fpsetmask(m & ~FP_X_OFL);
+ #endif
++#ifdef USE_EXTENDED_FILE_STDIO
++	/* enable extended FILE facility on Solaris so that Python
++           apps can keep more than 256 file descriptors open */
++	struct rlimit rlp;
++	(void) getrlimit(RLIMIT_NOFILE, &rlp);
++	rlp.rlim_cur = rlp.rlim_max;
++	if (setrlimit(RLIMIT_NOFILE, &rlp) != -1) {
++		enable_extended_FILE_stdio(-1, SIGABRT);
++	}
++#endif
++
+ 	return Py_Main(argc, argv);
+ }