[omniORB] 4.0.3 RPMs (was omniORB 4.0.3 and omniORBpy 2.3 available)

Thomas Lockhart lockhart at fourpalms.org
Tue Dec 2 08:30:31 GMT 2003


(Starting a new thread to get the topic in the subject line...)

I've posted sample RPMs incorporating fixes and changes suggested by 
Johan. These include a SuSE-specific startup script (Duncan may want to 
put this script into CVS for the next release), and some SuSE-specific 
options for building and installing the packages. The omniORBpy package 
has been updated with a patch to fix the omniORB version number per a 
previous thread. I've bumped the RPM version numbers on omniORB and 
omniORBpy to 3 and 2, respectively.

I've enclosed my most recent merged spec and source/patch files here.

Trial RPMs are at

http://www.fourpalms.org/pub/omniORB/devel

Open issues:

1) I'm not sure what to do about Bastiaan's issue with package 
dependencies for building the RPMs since those package names are not the 
same across distros. Can folks report on the package names for 
python-devel and  openssl-devel on their RPM-based systems? I've got 
info for Mandrake and recent RH, so need to hear about SuSE and other 
systems.

2) man pages are still in /usr/man for non-SuSE systems. istm that we 
shouldn't move them during the 4.0.3 cycle for the sake of consistency, 
though don't have a strong opinion. Also, we would need to detect RH-6.2 
systems since they don't have /usr/share/man. Comments?

                      - Tom
-------------- next part --------------
Summary: Object Request Broker (ORB)
Name:    omniORB
Version: 4.0.3
Release: 3
License: GPL / LGPL
Group:   System/Libraries
Source0: %{name}-%{version}.tar.gz
Source1: omniNames.SuSE
Prefix: /usr
Prereq: /sbin/chkconfig /sbin/ldconfig
URL:            http://omniorb.sourceforge.net/
#Provides:       corba
BuildRequires:  python glibc-devel openssl
Buildroot:      %{_tmppath}/%{name}-%{version}-root
#BuildArch:      i586

%description
%{name} is an Object Request Broker (ORB) which implements
specification 2.6 of the Common Object Request Broker Architecture
(CORBA). Contains the libraries needed to run programs dynamically
linked with %{name}.

# servers

%package -n %{name}-servers
Summary: Utility programs
Group:          Development/C++
Requires:       %{name} = %{version}-%{release}
Provides:       libomniorb-servers = %{version}-%{release} %{name}-servers = %{version}-%{release}

%description -n %{name}-servers
%{name} CORBA services including a Naming Service.

%package -n %{name}-bootscripts
Summary: Utility programs
Group: Development/C++
Requires: %{name}-servers = %{version}-%{release} %{name}-utils = %{version}-%{release}
Provides: %{name}-bootscripts = %{version}-%{release}

%description -n %{name}-bootscripts
Automatic starting of the %{name} CORBA Naming Service.

# utilities

%package -n %{name}-utils
Summary: Utility programs
Group:          Development/C++
Requires:       %{name} = %{version}-%{release}
Provides:       libomniorb-utils = %{version}-%{release} %{name}-utils = %{version}-%{release}

%description -n %{name}-utils
%{name} utility programs which may be useful at runtime.

# devel part of the bundle

%package -n %{name}-devel
Summary: Header files and libraries needed for %{name} development
Group:          Development/C++
Requires:       %{name} = %{version}-%{release}
Provides:       libomniorb-devel = %{version}-%{release} %{name}-devel = %{version}-%{release}

%description -n %{name}-devel
The header files and libraries needed for developing programs using
%{name}.

# docs and examples are in a separate package

%package -n %{name}-doc
Summary: Documentation and examples for %{name}
Group:          Development/C++
#Requires:       %{name} = %{version}

%description -n %{name}-doc
Developer documentation and examples.


%define py_ver    %(python -c 'import sys;print(sys.version[0:3])')
%if "%{_vendor}" == "suse"
%define rc_path   %{_sysconfdir}/init.d
%define man_path  %{prefix}/share/man
%else
%define rc_path   %{_sysconfdir}/rc.d/init.d
%define man_path  %{prefix}/man
%endif


%prep 
%setup -n %{name}-%{version}
#%patch0 -p1

%if "%{_vendor}" == "suse"
# Replace the init script with something appropriate for SuSE
cp -f %{SOURCE1} etc/init.d/omniNames
%endif

./configure --prefix=%{prefix} --with-openssl=/usr


%build
# We abuse the CPPFLAGS to pass optimisation options through.
make IMPORT_CPPFLAGS+="$RPM_OPT_FLAGS" all


%install
make DESTDIR=$RPM_BUILD_ROOT install

mkdir -p $RPM_BUILD_ROOT%{rc_path}
cp sample.cfg $RPM_BUILD_ROOT%{_sysconfdir}/omniORB.cfg
cp etc/init.d/omniNames $RPM_BUILD_ROOT%{rc_path}

mkdir -p $RPM_BUILD_ROOT/%{man_path}/man{1,5}
cp -r man/* $RPM_BUILD_ROOT/%{man_path}

mkdir -p $RPM_BUILD_ROOT/var/log/omniNames
mkdir -p $RPM_BUILD_ROOT/var/lib/omniMapper

# Rename catior to avoid naming conflict with TAO
mv $RPM_BUILD_ROOT/%{prefix}/bin/catior $RPM_BUILD_ROOT/%{prefix}/bin/catior.omni
mv $RPM_BUILD_ROOT/%{man_path}/man1/catior.1 $RPM_BUILD_ROOT/%{man_path}/man1/catior.omni.1


%clean
[ -z $RPM_BUILD_ROOT ] || rm -rf $RPM_BUILD_ROOT

%pre
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig

%post bootscripts
%if "%{_vendor}" == "suse"
# Most SuSE service scripts have a corresponding link into /usr/sbin
mkdir -p %{prefix}/sbin
ln -sf %{rc_path}/omniNames %{prefix}/sbin/rcomniNames
/sbin/insserv omniNames
%else
/sbin/chkconfig --add omniNames
%endif

%preun bootscripts
%if "%{_vendor}" == "suse"
/sbin/insserv -r omniNames
rm -rf %{prefix}/sbin/rcomniNames
%else
/sbin/chkconfig --del omniNames
%endif
rm -rf /var/log/omniNames/*
rm -rf /var/lib/omniMapper/*


# main package includes libraries and copyright info
%files
%defattr (-,root,root)
%doc CREDITS COPYING COPYING.LIB
%config(noreplace) %_sysconfdir/*.cfg
%prefix/lib/*.so.*
%prefix/share/idl


%files -n %{name}-servers
%defattr (-,root,root)
%attr(644,root,man) %{man_path}/man1/omniNames*
#%attr(644,root,man) %{man_path}/man1/omniMapper*
%prefix/bin/omniMapper
%attr(755,root,root) %prefix/bin/omniNames
# Thin substitute for standard Linux init script

%files -n %{name}-bootscripts
%defattr (-,root,root)
%config(noreplace) %attr(775,-,-) %{rc_path}/*
%dir %attr(754,-,-) /var/log/omniNames
%dir %attr(754,-,-) /var/lib/omniMapper


%files -n %{name}-utils
%defattr (-,root,root)
%attr(644,root,man) %{man_path}/man1/catior*
%attr(644,root,man) %{man_path}/man1/genior*
%attr(644,root,man) %{man_path}/man1/nameclt*
%prefix/bin/catior.omni
%prefix/bin/convertior
%prefix/bin/genior
%prefix/bin/nameclt


%files -n %{name}-devel
%defattr(-,root,root)
%doc ReleaseNotes* readmes/*
%attr(644,root,man) %{man_path}/man1/omniidl*
%prefix/bin/omnicpp
%prefix/bin/omniidl
%prefix/bin/omniidlrun.py
%prefix/bin/omkdepend
%prefix/lib/*.a
%prefix/lib/*.so
%prefix/include/*
%prefix/lib/python%{py_ver}/site-packages/omniidl/*
%prefix/lib/python%{py_ver}/site-packages/omniidl_be/*.py*
%prefix/lib/python%{py_ver}/site-packages/omniidl_be/cxx/*.py*
%prefix/lib/python%{py_ver}/site-packages/omniidl_be/cxx/header/*
%prefix/lib/python%{py_ver}/site-packages/omniidl_be/cxx/skel/*
%prefix/lib/python%{py_ver}/site-packages/omniidl_be/cxx/dynskel/*
%prefix/lib/python%{py_ver}/site-packages/omniidl_be/cxx/impl/*
%prefix/lib/python%{py_ver}/site-packages/_omniidlmodule.so*
%prefix/lib/pkgconfig/*.pc

%files -n %{name}-doc
%defattr(-,root,root)
%doc doc/* 


%changelog
* Mon Dec 01 2003 Thomas Lockhart <lockhart at fourpalms.org 4.0.3
- Merge SuSE spec contributions from Johan Cronje

* Wed Nov 19 2003 Duncan Grisby <duncan at grisby.org> 4.0.3
- Merge contributed updates, bump version number.

* Fri Aug 08 2003 Thomas Lockhart <lockhart at fourpalms.org> 4.0.2
- Rename catior man page to match catior.omni binary name

* Wed Aug  6 2003 Duncan Grisby <dgrisby at apasphere.com> 4.0.2
- Bump version number.

* Tue Jun 10 2003 Duncan Grisby <dgrisby at apasphere.com> 4.0.2pre1
- Fix some text, bump version number, add init script, minor tweaks.

* Wed Feb 12 2003 Thomas Lockhart <lockhart at fourpalms.org> 4.0.0
- Rename catior to catior.omni to avoid name conflict with TAO

* Tue Oct 01 2002 Thomas Lockhart <lockhart at fourpalms.org> 4.0.0
- Track down changes in documentation for 4.0.0
- Omit patches required to build the previous beta

* Mon Jul 29 2002 Thomas Lockhart <lockhart at fourpalms.org> 4.0.0beta
- Separate out utility programs to manage name conflict for catior with TAO

* Wed Jul 03 2002 Thomas Lockhart <lockhart at fourpalms.org> 4.0.0beta
- Start from 3.04 spec files
- Strip workarounds from the spec file since 4.0 builds more cleanly
-------------- next part --------------
Summary:  Python Language Mapping for omniORB
Name:     omniORBpy
Version:  2.3
Release:  2
License:  GPL / LGPL
Group:    System/Libraries
Source0:  %{name}-%{version}.tar.gz
Patch0:   omniORBpy-version.patch
Prefix:   /usr
URL:      http://omniorb.sourceforge.net/
Requires: omniORB = 4.0.3
BuildRequires: omniORB-devel python
Buildroot: %{_tmppath}/%{name}-%{version}-root

%description
omniORBpy is a Python language mapping for the omniORB CORBA
Object Request Broker (ORB).

# "standard" part of the bundle

%package -n %{name}-standard
Summary:  Files to provide standard top-level CORBA module for %{name}
Group:    Development/Python
Provides: libomniorbpy-standard = %{version}-%{release} %{name}-standard = %{version}-%{release}

%description -n %{name}-standard
The CORBA to Python mapping standard requires top-level CORBA and
PortableServer modules. This provides those standard modules for
%{name}. It will clash with similar packages for other Python ORBs
so we isolate them here to allow optional installation.

# devel part of the bundle

%package -n %{name}-devel
Summary:  Header files and libraries needed for %{name} development
Group:    Development/Python
Requires: %{name} = %{version}-%{release} omniORB-devel
Provides: libomniorbpy-devel = %{version}-%{release} %{name}-devel = %{version}-%{release}

%description -n %{name}-devel
The header files and libraries needed for developing programs using %{name}.

# docs and examples are in a separate package

%package -n %{name}-doc
Summary:  Documentation needed for %{name} development
Group:    Development/Python

%description -n %{name}-doc
Developer documentation and examples.


%define py_ver %(python -c 'import sys;print(sys.version[0:3])')

%prep 

%setup -n %{name}-%{version}
%patch0 -p1

# Needs to know where omniORB was installed if it is not in /usr.
# If necessary, use the configure option --with-omniorb=%{prefix}
./configure --prefix=%{prefix} --with-openssl=/usr

%build
# We abuse the CPPFLAGS to pass optimisation options through.
make IMPORT_CPPFLAGS+="$RPM_OPT_FLAGS" all

%install
make DESTDIR=$RPM_BUILD_ROOT install

# omit omniidl_be/__init__.py because it is a duplicate of the file
# already provided by omniORB.
rm -rf $RPM_BUILD_ROOT%{prefix}/lib/python%{py_ver}/site-packages/omniidl_be/__init__.py*


%clean
rm -rf $RPM_BUILD_ROOT

%post -n %{name} -p /sbin/ldconfig

%postun -n %{name} -p /sbin/ldconfig


# main package includes libraries and servers
%files
%defattr (-,root,root)
%doc COPYING.LIB
%doc bugfixes*
%prefix/lib/python%{py_ver}/site-packages/_omni*.so*
%prefix/lib/python%{py_ver}/site-packages/omniORB

%files -n %{name}-standard
%defattr(-,root,root)
%prefix/lib/python%{py_ver}/site-packages/*.py*
%prefix/lib/python%{py_ver}/site-packages/omniORB.pth
%prefix/lib/python%{py_ver}/site-packages/CosNaming
%prefix/lib/python%{py_ver}/site-packages/CosNaming__POA

%files -n %{name}-devel
%defattr(-,root,root)
%doc README* ReleaseNotes* update.log
%prefix/include/omniORBpy.h
%prefix/include/omniORB4/pydistdate.hh
%prefix/lib/python%{py_ver}/site-packages/omniidl_be/python.py*

%files -n %{name}-doc
%defattr(-,root,root)
%doc doc/* 

%changelog
* Wed Nov 19 2003 Duncan Grisby <duncan at grisby.org> 2.3
- Merge contributed updates, bump version number.

* Fri Aug 08 2003 Thomas Lockhart <lockhart at fourpalms.org>
- Drop circular definition of RPM macros

* Wed Aug  6 2003 Duncan Grisby <dgrisby at apasphere.com> 2.2
- Remove clashing omniidl __init__.py. Bump version number.

* Tue Jun 10 2003 Duncan Grisby <dgrisby at apasphere.com> 2.2pre1
- Fix some text, bump version number, minor tweaks.

* Wed Apr 23 2003 Sander Steffann <sander at steffann.nl>
- Included SSL support
- Included pydistdate.hh to stop RPM from complaining

* Mon Mar 17 2003 Thomas Lockhart <lockhart at fourpalms.org> 4.0.1
- Update for current release
- Include new omniORB.pth

* Mon Jul 29 2002 Thomas Lockhart <lockhart at fourpalms.org> 4.0.0beta
- Include backend to omniidl to allow generation of Python stubs

* Fri May 24 2002 Thomas Lockhart <lockhart at fourpalms.org> 4.0.0beta
- Use autoconf as available in this new version of omniORBpy
- Assume a separate omniORB RPM has been built and installed
- Based on the single RPM for omniORB and omniORBpy from the 3.x series
-------------- next part --------------
#!/bin/sh
#
# Startup script to start/stop the omniORB services
#
# chkconfig: 345 90 10
# description: CORBA Naming Service from omniORB
# processname: omniNames
# config: /etc/omniORB.cfg
#
# Author: Sander Steffann <sander at steffann.nl>
# Modified: Thomas Lockhart <lockhart at fourpalms.org>
# - Put omniNames log files under /var/log/omniNames
# - Adjust start/stop levels
# Modified: Duncan Grisby <duncan at grisby.org>
# - Put omniNames files under /var/omniNames, since they are not log files
# Modified: Johan Cronje <jcronje at dsp.sun.ac.za>
# - Edited the file to work in SuSE Linux

# The next block is used by insserv to insert service

### BEGIN INIT INFO
# Provides:          omniNames
# Required-Start:    $syslog
# Required-Stop:     $syslog
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: omniNames daemon that provides a CORBA naming service
# Description:       The CORBA naming service provides a way for CORBA clients
#	to obtain object references by using object names rather
#	than IOR string references.
#	Enable this service if the machine will act as a Naming
#	Service Server.
### END INIT INFO

# Program options
# Edit the paths if they do not correspond with your installation
GENIOR=/usr/bin/genior
OMNINAMES=/usr/bin/omniNames
OMNINAMES_DIR=/var/omniNames
OMNIMAPPER_DIR=/var/lib/omniMapper
test -x $OMNINAMES || exit 5

. /etc/rc.status
rc_reset

# Registered port number for CORBA naming service is 2809.
# Should be preferred but may conflict with other ORBs running concurrently.
TCPPORT=2809

if [ -f /etc/sysconfig/omniNames ];then
	. /etc/sysconfig/omniNames
fi

case "$1" in
  start)
	# Make sure directories exist
	[ -d $OMNINAMES_DIR ] || mkdir -p $OMNINAMES_DIR
	[ -d $OMNIMAPPER_DIR ] || mkdir -p $OMNIMAPPER_DIR
  
        echo -n "Starting omniNames"
        OMNINAMES_OPTIONS="-errlog $OMNINAMES_DIR/error.log -logdir $OMNINAMES_DIR"

        if [ ! -f $OMNINAMES_DIR/omninames-*.log ]; 
        then
           OMNINAMES_OPTIONS="$OMNINAMES_OPTIONS -start $TCPPORT"
           echo -n " for the first time"
        fi
        # Run it
        startproc $OMNINAMES $OMNINAMES_OPTIONS
        if [ rc_status ];
        then
           touch /var/lock/subsys/omniNames
        fi
        rc_status -v
        echo -n "Configuring NameService with genior"
        $GENIOR IDL:omg.org/CosNaming/NamingContextExt:1.0 `hostname` $TCPPORT NameService > $OMNIMAPPER_DIR/NameService
        rc_status -v
	;;

  stop)
	echo -n "Stopping omniNames"
	killproc -TERM $OMNINAMES
	rm -f $OMNIMAPPER_DIR/NameService
	rm -f /var/lock/subsys/omniNames
        rc_status -v
	;;

  restart)
	$0 stop
	$0 start
	;;

  status)
        echo -n "Checking for omniNames"
	checkproc $OMNINAMES
        rc_status -v
	;;

  *)
	echo "Usage: $0 {start|stop|restart|status}"
	exit 1
esac

exit 0

-------------- next part --------------
diff -cr omniORBpy-2.3.orig/mk/beforeauto.mk.in omniORBpy-2.3/mk/beforeauto.mk.in
*** omniORBpy-2.3.orig/mk/beforeauto.mk.in	2003-08-06 15:33:17.000000000 -0700
--- omniORBpy-2.3/mk/beforeauto.mk.in	2003-11-26 07:33:23.000000000 -0800
***************
*** 456,462 ****
  
  CorbaImplementation = OMNIORB
  
! OMNIORB_VERSION = 4.0.2
  OMNIORB_MAJOR_VERSION = $(word 1,$(subst ., ,$(OMNIORB_VERSION)))
  OMNIORB_MINOR_VERSION = $(word 2,$(subst ., ,$(OMNIORB_VERSION)))
  OMNIORB_MICRO_VERSION = $(word 3,$(subst ., ,$(OMNIORB_VERSION)))
--- 456,462 ----
  
  CorbaImplementation = OMNIORB
  
! OMNIORB_VERSION = 4.0.3
  OMNIORB_MAJOR_VERSION = $(word 1,$(subst ., ,$(OMNIORB_VERSION)))
  OMNIORB_MINOR_VERSION = $(word 2,$(subst ., ,$(OMNIORB_VERSION)))
  OMNIORB_MICRO_VERSION = $(word 3,$(subst ., ,$(OMNIORB_VERSION)))


More information about the omniORB-list mailing list