Massimiliano Pala wrote:
...
> Anyway if you plan of testing the software on Solaris, we'll be happy if
> you could send us signalations of problems you encounter while
> installing and testing the system.
to me this is a *very* amusing statement because on 12/28/01 i submitted
a patch with some things i did while trying to get openca 0.8.1 to work
on solaris. after no one on the list responded or discussed operations
on solaris i gave up on openca.
anyhow, below is my original posting and attached is the patch.
--
Ian McNish
[EMAIL PROTECTED]
http://www.ians.net
Ian McNish wrote:
>
> while trying to setup OpenCA 0.8.1 under solaris i hit a few snags.
> attached is a patch to address some of them. some of them i have not yet
> dealt with. most of these changes should improve the portability of
> OpenCA.
>
>
> files modified by the attached patch:
>
> OpenCA-0.8.1/configure.in
> OpenCA-0.8.1/Makefile.in
> OpenCA-0.8.1/src/modules/Makefile.in
> OpenCA-0.8.1/src/contrib/Makefile.in
>
>
> the attached patch addresses the following:
>
> (+) bash is not available by default on most, if not all, non-linux
> commercial OSs. as such bourne or korn shell should be used by default.
> configure.in was changed to look for sh rather than bash.
>
>
> (+) you call echo with '-n' to prevent the implicit trailing new line
> character. while this works under bash and csh it doesn't work under sh
> or ksh. for echo calls, the '-n' argument was removed and '\c' was added
> to the end of the string.
>
>
> (+) gnu tar is not available by default on most, if not all, non-linux
> commercial OSs. as such calls to tar should not depend on gtar specific
> functionality. while i do realize that gzip is also not included by
> default on non-linux commercial OSs, it is far more commonplace...
> besides one prerequisite program is easier to expect users to
> have/obtain than two. the '-z' argument was dropped from tar calls and
> separate code was added to the root, contrib and modules makefiles to
> call gzip/gunzip. a check for the location of gzip and gunzip was added
> to configure.in.
>
>
> (+) XML-Parser installer is not smart enough to find expat components
> (library and header) if they're not in their default locations. the
> patch adds two arguments to configure.in for specifying the location of
> libexpat and expat.h, and the contrib Makefile.in was modified to use
> these values when building the XML-Parser module.
>
>
> (+) the absolute path for pod2man is not set and the path is not
> intuitive (at least not for solaris 8's default perl install). this
> should be configurable by configure. for now i added two paths to the
> check for pod2man to configure.in.
>
> NOTE: for solaris 8: /usr/perl5/5.00503/bin/pod2man.
>
>
> problems not addressed by the attached patch:
>
> () from src/contrib/Makefile: perl modules are reinstalled every time
> make is invoked. before installing modules we should look to see if
> they are already installed. no point in risking mucking something up by
> overwriting something that already works.
>
>
> () the OpenCA-SV package should pull configure options from those passed
> to the top level (OpenCA) configure program. e.g., in the modules
> Makefile, rather than just running './configure', use:
>
> % exec `head -10 ../../../../config.log | grep '^ $.*configure.*' |
> sed 's/ $ //'`
>
> i'm sure there's a more appropriate way of doing this, the above line is
> just an example.
*** OpenCA-0.8.1/configure.in Fri Dec 28 14:27:28 2001
--- OpenCA-0.8.1/configure.in- Fri Dec 28 14:24:30 2001
***************
*** 105,110 ****
--- 105,120 ----
ldaprootpwd=$withval, ldaprootpwd=passwd )
AC_SUBST(ldaprootpwd)
+ AC_ARG_WITH( expat-lib-dir,
+ [ --with-expat-lib-dir=ARG sets the directory in which to find
+libexpat],
+ expatlibdir=$withval, expatlibdir=NULL )
+ AC_SUBST(expatlibdir)
+
+ AC_ARG_WITH( expat-inc-dir,
+ [ --with-expat-inc-dir=ARG sets the directory in which to find
+expat.h],
+ expatincdir=$withval, expatincdir=NULL )
+ AC_SUBST(expatincdir)
+
AC_ARG_ENABLE( db,
[ --enable-db enable db module [yes]],
db=$enableval, db=yes)
***************
*** 151,166 ****
AC_SUBST(CD)
dnl Check for program paths
! AC_PATH_PROG( SHELL, bash, bash,
/bin:/usr/bin:/usr/local/bin:$PATH )
AC_PATH_PROG( POD2MAN, pod2man,pod2man,
! $PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( MAKE, make, pmake,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( MKDIR, mkdir, mkdir,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( SED, sed, sed,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( MV, mv, mv,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( CAT, cat, cat,
--- 161,180 ----
AC_SUBST(CD)
dnl Check for program paths
! AC_PATH_PROG( SHELL, sh, sh,
/bin:/usr/bin:/usr/local/bin:$PATH )
AC_PATH_PROG( POD2MAN, pod2man,pod2man,
!
$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/perl*/*/bin:/usr/local/perl*/*/bin)
AC_PATH_PROG( MAKE, make, pmake,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( MKDIR, mkdir, mkdir,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
+ AC_PATH_PROG( LS, ls, ls,
+ $PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( SED, sed, sed,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
+ AC_PATH_PROG( AWK, awk, awk,
+ $PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( MV, mv, mv,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( CAT, cat, cat,
***************
*** 167,172 ****
--- 181,190 ----
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( TAR, tar, tar,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
+ AC_PATH_PROG( GZIP, gzip, gzip,
+ $PATH:/sbin:/usr/sbin:/usr/local/sbin)
+ AC_PATH_PROG( GUNZIP, gunzip, gunzip,
+ $PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( PWD, pwd, pwd,
$PATH:/sbin:/usr/sbin:/usr/local/sbin)
AC_PATH_PROG( CHMOD, chmod, chmod,
*** OpenCA-0.8.1/Makefile.in Fri Dec 28 14:27:28 2001
--- OpenCA-0.8.1/Makefile.in- Fri Dec 28 14:24:30 2001
***************
*** 28,33 ****
--- 28,34 ----
CP=@CP@
RM=@RM@
CD=@CD@
+ GZIP=@GZIP@
PERL=@PERL@
OPENSSL=@OPENSSL@
***************
*** 92,103 ****
dist:
@$(ECHO)
! @$(ECHO) -n "Creating Distribution TAR archive ... "
@$(CHOWN) -R madwolf.openca *;
@$(RM) -f Makefile
@( $(CD) ..; $(MV) $(C_DIR) OpenCA-$(VER) ; \
! $(TAR) cpzf OpenCA-$(VER).tar.gz --exclude "CVS" OpenCA-$(VER);\
! $(MV) OpenCA-$(VER) $(C_DIR) );
@$(MV) ../OpenCA-$(VER).tar.gz .;
@$(ECHO) "Done.";
@$(ECHO)
--- 93,105 ----
dist:
@$(ECHO)
! @$(ECHO) "Creating Distribution TAR archive ... \c"
@$(CHOWN) -R madwolf.openca *;
@$(RM) -f Makefile
@( $(CD) ..; $(MV) $(C_DIR) OpenCA-$(VER) ; \
! $(TAR) cpf OpenCA-$(VER).tar --exclude "CVS" OpenCA-$(VER);\
! $(GZIP) OpenCA-$(VER).tar;\
! $(MV) OpenCA-$(VER).gz $(C_DIR) );
@$(MV) ../OpenCA-$(VER).tar.gz .;
@$(ECHO) "Done.";
@$(ECHO)
*** OpenCA-0.8.1/src/modules/Makefile.in Fri Dec 28 14:27:28 2001
--- OpenCA-0.8.1/src/modules/Makefile.in- Fri Dec 28 14:28:02 2001
***************
*** 29,34 ****
--- 29,37 ----
CP=@CP@
RM=@RM@
CD=@CD@
+ GZIP=@GZIP@
+ GUNZIP=@GUNZIP@
+ TAR=@TAR@
PERL=@PERL@
OPENSSL=@OPENSSL@
***************
*** 82,117 ****
modules: install
install:
@$(MKDIR) -p tmp
@for i in "$(MODS)" ; do \
! m=`$(ECHO) "$$i" | $(SED) -e "s|\.tar\.gz||"` ; \
! v=`$(ECHO) "$$m" | $(SED) -e "s|[a-zA-Z0-9]*\-[a-zA-Z0-9]*\-||g"`; \
! n=`$(ECHO) "$$m" | $(SED) -e "s|-$$v||g"`; \
! $(ECHO) -n "Installing $$n ($$v) module ... " ; \
! r=`$(TAR) xvfpz "$$i" -C tmp/ 2>&1`; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! $(CD) tmp/$$m ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! if [ "$$n" = "OpenCA-SV" ] ; then \
! $(ECHO) -n "(c/c++) ... " ; \
! ret=`./configure`; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! ret=`$(MAKE) 2>&1`; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! ret=`$(MAKE) install 2>&1`; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! $(CD) .. ; $(RM) -rf $$m ; $(CD) .. ; \
$(ECHO) "Done." ; \
! else \
! r=`$(PERL) Makefile.PL 2>&1;` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
r=`$(MAKE) 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
r=`$(MAKE) install 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! $(CD) .. ; $(RM) -rf $$m ; $(CD) .. ; \
$(ECHO) "Done." ; \
! fi ; \
done
# end
--- 85,141 ----
modules: install
install:
+ @#
+ @# in the following for loop the following variables are set:
+ @#
+ @# m - should be the module name only (e.g. Convert-ASN1)
+ @# v - should be the version of the module (e.g. 0.14)
+ @# n - should be m-v (e.g. Convert-ASN1-0.14)
+ @# t - should be the name of the module tar ball
+ @# (e.g. Convert-ASN1-0.14.tar)
+ @# z - should be the name of the gzipped module tar ball
+ @# (e.g. Convert-ASN1-0.14.tar.gz)
+ @#
@$(MKDIR) -p tmp
@for i in "$(MODS)" ; do \
! z="$$i" ; \
! t=`$(ECHO) $$i | \
! $(SED) -e "s|\.gz||"` ; \
! n=`$(ECHO) $$i | \
! $(SED) -e "s|\.tar\.gz||"` ; \
! v=`$(ECHO) $$n | \
! $(SED) -e "s|[a-zA-Z0-9]*.[a-zA-Z0-9]*\-||g"` ; \
! m=`$(ECHO) $$n | \
! $(SED) -e "s|-$$v||g"` ; \
! $(ECHO) "Installing $$m ($$v) module ... \c" ; \
! [ -f $$z ] && $(GUNZIP) $$z ; \
! $(CD) tmp ; \
! r=`$(TAR) xvf ../$$t 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1 ; \
! $(CD) .. ; \
! [ ! -f $$z ] && $(GZIP) $$t ; \
! $(CD) tmp/$$n ; \
! if [ "$$n" = "OpenCA-SV" ] ; then \
! r=`./configure 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1 ; \
! r=`$(MAKE) 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1 ; \
! r=`$(MAKE) install 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1 ; \
! $(CD) .. ; $(RM) -rf $$n ; $(CD) .. ; \
! [ ! -f $$z ] && $(GZIP) $$t ; \
$(ECHO) "Done." ; \
! else \
! r=`$(PERL) Makefile.PL 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1 ; \
r=`$(MAKE) 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1 ; \
r=`$(MAKE) install 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1 ; \
! $(CD) .. ; $(RM) -rf $$n ; $(CD) .. ; \
! [ ! -f $$z ] && $(GZIP) $$t ; \
$(ECHO) "Done." ; \
! fi ; \
done
# end
*** OpenCA-0.8.1/src/contrib/Makefile.in Fri Dec 28 14:27:28 2001
--- OpenCA-0.8.1/src/contrib/Makefile.in- Fri Dec 28 14:24:30 2001
***************
*** 23,38 ****
--- 23,45 ----
CHMOD=@CHMOD@
CHOWN=@CHOWN@
ECHO=@ECHO@
+ LS=@LS@
SED=@SED@
+ AWK=@AWK@
CAT=@CAT@
MV=@MV@
CP=@CP@
RM=@RM@
CD=@CD@
+ GZIP=@GZIP@
+ GUNZIP=@GUNZIP@
PERL=@PERL@
OPENSSL=@OPENSSL@
+ EXPAT_LIB_DIR=@expatlibdir@
+ EXPAT_INC_DIR=@expatincdir@
+
VER=@VER@
C_DIR=openca
SCP_DIR=scripts
***************
*** 59,68 ****
## be installed as the last one. Just let it be the last module
## listed
! MODS=" Convert-*.tar.gz URI-*.tar.gz \
! XML-Parser*.tar.gz Digest-MD5*.tar.gz \
! MIME-Base64*.tar.gz IO-Socket-SSL*.tar.gz \
! perl-ldap*.tar.gz"
info:
@$(ECHO)
--- 66,75 ----
## be installed as the last one. Just let it be the last module
## listed
! MODS=" Convert-ASN1 URI \
! XML-Parser Digest-MD5 \
! MIME-Base64 IO-Socket-SSL \
! perl-ldap"
info:
@$(ECHO)
***************
*** 91,115 ****
install: contrib
contrib:
@$(MKDIR) -p tmp
@p=$(MODS) ; \
! for i in $$p ; do \
! m=`$(ECHO) "$$i" | $(SED) -e "s|\.tar\.gz||"` ; \
! v=`$(ECHO) "$$m" | $(SED) -e "s|[a-zA-Z0-9]*.[a-zA-Z0-9]*\-||g"`;\
! n=`$(ECHO) "$$m" | $(SED) -e "s|-$$v||g"`; \
! $(ECHO) -n "Installing $$n ($$v) module ... " ; \
! r=`$(TAR) xvfpz "$$i" -C tmp/ 2>&1`; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! $(CD) tmp/$$m ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! r=`$(PERL) Makefile.PL 2>&1;` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
r=`$(MAKE) 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
r=`$(MAKE) install 2>&1` ; \
! [ $$? -gt 0 ] && echo "ERROR: $$r" && exit 1; \
! $(CD) .. ; $(RM) -rf $$m ; $(CD) .. ; \
$(ECHO) "Done." ; \
! done
# end
--- 98,164 ----
install: contrib
contrib:
+ @#
+ @# in the following for loop the following variables are set:
+ @#
+ @# m - should be the module name only (e.g. Convert-ASN1)
+ @# v - should be the version of the module (e.g. 0.14)
+ @# n - should be m-v (e.g. Convert-ASN1-0.14)
+ @# t - should be the name of the module tar ball
+ @# (e.g. Convert-ASN1-0.14.tar)
+ @# z - should be the name of the gzipped module tar ball
+ @# (e.g. Convert-ASN1-0.14.tar.gz)
+ @#
@$(MKDIR) -p tmp
@p=$(MODS) ; \
! for i in $$p ; do \
! v=`$(LS) $$i-* | \
! $(SED) -e "s|\.tar\.gz||" | \
! $(SED) -e "s|[a-zA-Z0-9]*.[a-zA-Z0-9]*\-||g"` ; \
! m=`$(LS) $$i-* | \
! $(SED) -e "s|\.tar\.gz||" | \
! $(SED) -e "s|-$$v||g"` ; \
! n=`$(LS) $$i-* | \
! $(SED) -e "s|\.tar\.gz||"` ; \
! t=`$(ECHO) "$$n" | \
! $(SED) -e "s|\.gz||" | \
! $(SED) -e "s|\.tar||" | \
! $(AWK) '{print $$1".tar"}'` ; \
! z="$$t.gz" ; \
! $(ECHO) "Installing $$m ($$v) module ... \c" ; \
! [ -d tmp/$$n ] && $(RM) -rf tmp/$$n ; \
! [ -f $$z ] && $(GUNZIP) $$z ; \
! $(CD) tmp ; \
! r=`$(TAR) xvf ../$$t 2>&1` ; \
! [ $$? -gt 0 ] && $(ECHO) "ERROR: $$r" && exit 1 ; \
! $(CD) .. ; \
! if [ ! -f $$z ] ; then \
! if [ -f $$t ] ; then \
! $(GZIP) $$t ; \
! fi ; \
! fi ; \
! $(CD) tmp/$$n ; \
! if [ "$$m" = "XML-Parser" ] ; then \
! if [ "$(EXPAT_LIB_DIR)" != "NULL" ] ; then \
! expatargs=" EXPATLIBPATH=$(EXPAT_LIB_DIR)" ; \
! else \
! expatargs="" ; \
! fi ; \
! if [ "$(EXPAT_INC_DIR)" != "NULL" ] ; then \
! expatargs="$${expatargs} EXPATINCPATH=$(EXPAT_INC_DIR)" ; \
! fi ; \
! r=`$(PERL) Makefile.PL $${expatargs} 2>&1` ; \
! [ $$? -gt 0 ] && $(ECHO) "ERROR: $$r" && exit 1 ; \
! else \
! r=`$(PERL) Makefile.PL 2>&1` ; \
! [ $$? -gt 0 ] && $(ECHO) "ERROR: $$r" && exit 1 ; \
! fi ; \
r=`$(MAKE) 2>&1` ; \
! [ $$? -gt 0 ] && $(ECHO) "ERROR: $$r" && exit 1 ; \
r=`$(MAKE) install 2>&1` ; \
! [ $$? -gt 0 ] && $(ECHO) "ERROR: $$r" && exit 1 ; \
! $(CD) .. ; $(RM) -rf $$n ; $(CD) .. ; \
$(ECHO) "Done." ; \
! done
# end