From: Marcin Cieslak Date: Thu, 6 Sep 2012 11:45:11 +0000 (+0200) Subject: Allow building on FreeBSD X-Git-Tag: 2.2.0b~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=421b5061a64f3cc16f2e0882c6d501ff58cdedab;p=oweals%2Fcde.git Allow building on FreeBSD - build shared libraries with major number only (libtt.so.2) - don't build dtlogin and dtinfo FreeBSD support for the installer: - work around awk issue - create post_install FreeBSD scripts - install only cmsd on /etc/inetd.conf skip dtspc and ttdbserver for now Note to users: please check if you are affected by awk bug in udbParseLib.awk if you can. --- diff --git a/cde/.gitignore b/cde/.gitignore index 3d34ffab..6db7d002 100644 --- a/cde/.gitignore +++ b/cde/.gitignore @@ -25,6 +25,19 @@ admin/IntegTools/post_install/*.list admin/IntegTools/post_install/*.lst admin/IntegTools/post_install/linux +admin/IntegTools/post_install/freebsd/CDE-MIN.list +admin/IntegTools/post_install/freebsd/CDE-MIN.lst +admin/IntegTools/post_install/freebsd/CDE-RUN.list +admin/IntegTools/post_install/freebsd/CDE-RUN.lst +admin/IntegTools/post_install/freebsd/CDE-SHLIBS.list +admin/IntegTools/post_install/freebsd/CDE-SHLIBS.lst +admin/IntegTools/post_install/freebsd/CDE-TT.list +admin/IntegTools/post_install/freebsd/CDE-TT.lst +admin/IntegTools/post_install/freebsd/configMin +admin/IntegTools/post_install/freebsd/configRun +admin/IntegTools/post_install/freebsd/configShlibs +admin/IntegTools/post_install/freebsd/configTT + admin/IntegTools/post_install/configDemos admin/IntegTools/post_install/configFonts admin/IntegTools/post_install/configHelp diff --git a/cde/admin/IntegTools/dbTools/installCDE.src b/cde/admin/IntegTools/dbTools/installCDE.src index 8e64bef6..9531ee82 100755 --- a/cde/admin/IntegTools/dbTools/installCDE.src +++ b/cde/admin/IntegTools/dbTools/installCDE.src @@ -51,7 +51,7 @@ REVISION="$(echo "$Revision: /main/20 $" | awk '{print $2}')" Log() { - echo "$1" | tee -a $LOGFILE + /bin/echo "$1" | tee -a $LOGFILE } MakeTarball() @@ -210,6 +210,14 @@ CleanDaemons() elif [ "$PLATFORM" = openbsd ] then true + elif [ "$PLATFORM" = freebsd ] + then + ps axo pid,comm | grep $i > /tmppsout + if [ -s /tmp/tmppsout ] + then + awk '{print "kill " $1}' /tmp/tmppsout | /bin/csh -f + sleep 2 + fi else ps -ef | grep $i | grep -v grep >/tmp/tmppsout if [ -s /tmp/tmppsout ] @@ -240,6 +248,9 @@ RestartInetd() elif [ "$PLATFORM" = "openbsd" ] then true + elif [ "$PLATFORM" = "freebsd" ] + then + /etc/rc.d/inetd onestart else #ifdef hpV4 /usr/sbin/inetd @@ -543,6 +554,10 @@ XCOMM then PLATFORM="linux" PLATFORM_SCRIPT_DIR="" + elif [ $BUILDSYSTEM = "FreeBSD" ]; + then + PLATFORM="freebsd" + PLATFORM_SCRIPT_DIR="freebsd" elif [ $BUILDSYSTEM = "OpenBSD" ]; then PLATFORM="openbsd" diff --git a/cde/admin/IntegTools/dbTools/udbParseLib.awk b/cde/admin/IntegTools/dbTools/udbParseLib.awk index 86691967..d1399afb 100644 --- a/cde/admin/IntegTools/dbTools/udbParseLib.awk +++ b/cde/admin/IntegTools/dbTools/udbParseLib.awk @@ -268,6 +268,13 @@ function tokenize() { printf(" ") > DeBugFile print "Entering function tokenize:" > DeBugFile } + # Workaround for a strange awk bug, seen on FreeBSD + # and results in .db files generated with + # Syntax ERROR line: 10 of file: CDE-INC.udb + # Missing initial { + # + DUMMY = $0 + # Skip blank/comment lines while ( NF == 0 || $0 ~ /^[ ]*#/ ) { if ( (getline) <= 0 ) { diff --git a/cde/admin/IntegTools/post_install/Imakefile b/cde/admin/IntegTools/post_install/Imakefile index 3b6bc433..b0dcbf84 100644 --- a/cde/admin/IntegTools/post_install/Imakefile +++ b/cde/admin/IntegTools/post_install/Imakefile @@ -25,6 +25,7 @@ PLATFORM = openbsd #endif #ifdef FreeBSDArchitecture PLATFORM = freebsd +SUBDIRS = freebsd #endif #ifdef RsArchitecture PLATFORM = aix diff --git a/cde/admin/IntegTools/post_install/freebsd/Imakefile b/cde/admin/IntegTools/post_install/freebsd/Imakefile new file mode 100644 index 00000000..7bf6c550 --- /dev/null +++ b/cde/admin/IntegTools/post_install/freebsd/Imakefile @@ -0,0 +1,65 @@ +XCOMM $TOG: Imakefile /main/1 1998/03/11 16:08:16 mgreess $ +TOOL_DIR = ../../dbTools +DATABASE_DIR = ../../../../databases + +#ifdef HPArchitecture +PLATFORM = hp-ux +#endif +#ifdef LinuxArchitecture +PLATFORM = linux +#endif +#ifdef FreeBSDArchitecture +PLATFORM = freebsd +#endif +#ifdef RsArchitecture +PLATFORM = aix +#endif +#ifdef SunArchitecture +PLATFORM = sun +.NO_PARALLEL: +#endif +#ifdef USLArchitecture +PLATFORM = usl +#endif +#ifdef UXPArchitecture +PLATFORM = uxp +#endif + +UDBTOANY = $(KORNSHELL) $(TOOL_DIR)/udbToAny.ksh +BUILD_UDB_LIST = $(SHELL) ../build_udb_list + +all:: + +configMin:: $(DATABASE_DIR)/CDE-MIN.udb + $(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \ + $(DATABASE_DIR)/CDE-MIN.udb > CDE-MIN.lst + $(BUILD_UDB_LIST) CDE-MIN ../../../.. + +configTT:: $(DATABASE_DIR)/CDE-TT.udb + $(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \ + $(DATABASE_DIR)/CDE-TT.udb > CDE-TT.lst + $(BUILD_UDB_LIST) CDE-TT ../../../.. + +configRun:: $(DATABASE_DIR)/CDE-RUN.udb + $(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \ + $(DATABASE_DIR)/CDE-RUN.udb > CDE-RUN.lst + $(BUILD_UDB_LIST) CDE-RUN ../../../.. + +configShlibs:: $(DATABASE_DIR)/CDE-SHLIBS.udb + $(UDBTOANY) -toLst -ReleaseStream $(PLATFORM) \ + $(DATABASE_DIR)/CDE-SHLIBS.udb > CDE-SHLIBS.lst + $(BUILD_UDB_LIST) CDE-SHLIBS ../../../.. + +LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \ + -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \ + -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) + +AllTarget(configShlibs configTT configRun configMin) + +CppScriptTarget(configShlibs,configShlibs.src,$(LOCAL_CPP_DEFINES),) +CppScriptTarget(configTT,configTT.src,$(LOCAL_CPP_DEFINES),) +CppScriptTarget(configRun,configRun.src,$(LOCAL_CPP_DEFINES),) +CppScriptTarget(configMin,configMin.src,$(LOCAL_CPP_DEFINES),) + +clean:: + $(RM) *.lst *.list diff --git a/cde/admin/IntegTools/post_install/freebsd/configMin.src b/cde/admin/IntegTools/post_install/freebsd/configMin.src new file mode 100755 index 00000000..977ac861 --- /dev/null +++ b/cde/admin/IntegTools/post_install/freebsd/configMin.src @@ -0,0 +1,257 @@ +XCOMM! /bin/ksh +XCOMM ####### +XCOMM Product: CDE +XCOMM Fileset: CDE-MIN +XCOMM configure +XCOMM @(#) $TOG: configMin.src /main/1 1998/03/11 16:18:12 mgreess $ +XCOMM ####### +#define HASH # + +PRODUCT=CDE +FILESET=CDE-MIN +DO_CONFIGURATION="" +retval=0 + +FixEtcServices() +{ +FILE=/etc/services +TMPFILE=/tmp/services + +XCOMM +XCOMM check for existence of /etc/services +XCOMM + + if [ ! -f $FILE ] # highly unlikely + then + echo "" >$FILE + fi + +XCOMM +XCOMM see if it already exists +XCOMM + + awk '{if ($1 == "dtspc") + print $0 > "/tmp/dtspc-already-there" + }' $FILE >/dev/null + + if [ ! -f /tmp/dtspc-already-there ] + then + printf "dtspc\t\t6112/tcp\t#subprocess control" >>$FILE + else + rm /tmp/dtspc-already-there + fi + +XCOMM +XCOMM remove legacy entries like dtspcd +XCOMM + + awk '{if ($1 == "dtspcd" || $1 == "#dtspcd") + ; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE +} + +UnfixEtcServices() +{ +FILE=/etc/services +TMPFILE=/tmp/services + + awk '{if ($1 == "dtspc" && $2 == "6112/tcp") + ; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE +} + +FixEtcInetdDotConf() +{ +FILE=/etc/inetd.conf +TMPFILE=/tmp/inetd.conf + +XCOMM +XCOMM check for existence of /etc/inetd.conf +XCOMM + + if [ ! -f $FILE ] # highly unlikely + then + echo "" >$FILE + fi + +XCOMM +XCOMM see if it already exists +XCOMM + + awk '{if ($1 == "dtspc") + print $0 > "/tmp/dtspc-already-there" + }' $FILE >/dev/null + + DTSPCD=CDE_INSTALLATION_TOP/bin/dtspcd + + if [ ! -f /tmp/dtspc-already-there ] + then + echo "dtspc stream tcp4 nowait root $DTSPCD $DTSPCD" >>$FILE + else + rm /tmp/dtspc-already-there + fi + +XCOMM +XCOMM remove legacy entries like dtspcd +XCOMM + + awk '{if ($1 == "dtspcd" || $1 == "#dtspcd") + ; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE +} + +UnfixEtcInetdDotConf() +{ +FILE=/etc/inetd.conf +TMPFILE=/tmp/inetd.conf + + awk '{if ($1 == "dtspc") + ; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE +} + +FixEtcPamDotConf() +{ +FILE=/etc/pam.conf +ORIGFILE=/etc/pam.conf.preCDE + +XCOMM +XCOMM check for existence of /etc/pam.conf +XCOMM + + if [ -f $FILE ] + then + echo "" > $ORIGFILE + cp CDE_INSTALLATION_TOP/config/sys.pam.conf $FILE + chmod 644 $FILE + else + echo "Warning: $FILE already exists. Leaving it alone." 1>&2 + cp CDE_INSTALLATION_TOP/config/sys.pam.conf $ORIGFILE + fi + +} + +UnfixEtcPamDotConf() +{ +FILE=/etc/pam.conf +TMPFILE=/etc/pam.conf.CDE +ORIGFILE=/etc/pam.conf.preCDE + + if [ ! -f $FILE ] + then + echo "Warning: $FILE does not exist." 1>&2 + elif [ ! -f $ORIGFILE ] + then + echo "Warning: $ORIGFILE does not exist. Leaving $FILE alone." 1>&2 + else + mv $FILE $TMPFILE + cp $ORIGFILE $FILE + chmod 664 $FILE + fi +} + +RemoveMinFiles() +{ + while read SRC + do + if [ "$SRC" != "" ] + then + rm -f $SRC + dirname=${SRC%/STAR} + if [ -d $dirname ] + then + cd $dirname + while [ "$dirname" != "$CDE_TOP" ] + do + cd .. + rmdir ${dirname##STAR/} >/dev/null 2>/dev/null + dirname=${dirname%/STAR} + done + fi + fi + done <<-EOF +#include "CDE-MIN.list" + EOF +} + +VerifyInstalledFiles() +{ + echo "Status mode owner group filename" + echo "-----------------------------------------" +XCOMM exists correct correct correct /usr/dt/foo1 +XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2 +XCOMM exists the link is correct /usr/dt/link + + while read SRC + do +#include "../verify.func" + done <<-EOF +#include "CDE-MIN.lst" + EOF +} + +#include "../option.func" + +XCOMM ############################################################### +XCOMM +XCOMM Main Body +XCOMM +XCOMM ############################################################### + + HandleOption $* + + if [ "$OPERATION" = "configure" ] + then + + FixEtcServices + + : FixEtcInetdDotConf + + HASH + HASH create the /var/dt/tmp directory for the dtspcd + HASH + + if [ ! -d CDE_LOGFILES_TOP/tmp ] + then + mkdir -p CDE_LOGFILES_TOP/tmp + fi + + elif [ "$OPERATION" = "deconfigure" ] + then + + UnfixEtcServices + + : UnfixEtcInetdDotConf + + RemoveMinFiles + + VerifyInstalledFiles + + elif [ "$OPERATION" = "verify" ] + then + + VerifyInstalledFiles + + fi + + return $retval diff --git a/cde/admin/IntegTools/post_install/freebsd/configRun.src b/cde/admin/IntegTools/post_install/freebsd/configRun.src new file mode 100755 index 00000000..42d26771 --- /dev/null +++ b/cde/admin/IntegTools/post_install/freebsd/configRun.src @@ -0,0 +1,331 @@ +XCOMM! /bin/ksh +XCOMM ####### +XCOMM Product: CDE +XCOMM Fileset: CDE-RUN +XCOMM configure +XCOMM @(#) $TOG: configRun.src /main/1 1998/03/11 16:18:24 mgreess $ +XCOMM ####### + +#define HASH # +#define STAR * + +PRODUCT=CDE +FILESET=CDE-RUN +DO_CONFIGURATION="" +retval=0 + +FixInetdDotConf() +{ +FILE=/etc/inetd.conf +TMPFILE=/tmp/inetd.conf +CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd + +XCOMM +XCOMM desired inetd.conf entry: +XCOMM cmsd/2-4 dgram rpc/udp4 wait root CDE_INSTALLATION_TOP/bin/rpc.cmsd rpc.cmsd +XCOMM + +XCOMM first make an awk script and put it in a file. +XCOMM + +XCOMM comment out any non-cde rpc.cmsd lines +XCOMM + + nawk -v cmsd=$CMSD \ + '{if ($1 == "cmsd/2-4" && $6 != cmsd) + print "#cde " $0; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE + +XCOMM remove any cde 2-4 cmsd +XCOMM + + nawk -v cmsd=$CMSD \ + '{if ($1 == "cmsd/2-4" && $6 == cmsd) + ; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE + +XCOMM +XCOMM now run an awk script to see if there is an occurrence of 2-5 cmsd +XCOMM + + nawk -v cmsd=$CMSD \ + '{if ($6 == cmsd && $1 == "cmsd/2-5") + print $0 > "/tmp/cmsd-already-there" + }' $FILE >/dev/null + +XCOMM +XCOMM if it is not there, add it +XCOMM + + if [ ! -f /tmp/cmsd-already-there ] + then + echo "cmsd/2-5 dgram rpc/udp4 wait root $CMSD rpc.cmsd" >>$FILE + else + rm /tmp/cmsd-already-there + fi + +} + +UnfixInetdDotConf() +{ +FILE=/etc/inetd.conf +TMPFILE=/tmp/inetd.conf +CMSD=CDE_INSTALLATION_TOP/bin/rpc.cmsd + + HASH first remove the CDE rpc.cmsd entry + + nawk -v cmsd=$CMSD \ + '{if (($1 == "cmsd/2-4" || $1 == "cmsd/2-5") && $6 == cmsd) + ; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE + + HASH now uncomment any previously existing cmsd entry + + awk '{if ($1 == "#cde") { + if ($2 == "cmsd/2-4") { + $1 = $2; + $2 = "" + } + } + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE +} + +CreateAppConfigDirectory() +{ + HASH + HASH Create the APPCONFIG directory inside DT_CONFIG_TOP and create + HASH all of its subdirectories + HASH + + cd $DT_CONFIG_TOP + if [ ! -d $APPCONFIG ] + then + mkdir $APPCONFIG + fi + + cd $APPCONFIG + + for i in $APPCONFIG_DIRS + do + if [ ! -d $i ] + then + mkdir $i + fi + cd $i + HASH + HASH for each locale + HASH + for j in $DT_TOP/$APPCONFIG/$i/STAR + do + if [ ! -d `basename $j` ] + then + mkdir `basename $j` + fi + done + cd .. + done + +} + +doDttermTerminfo() +{ + if [ -f $DT_TOP/config/dtterm.ti ] + then + tic $DT_TOP/config/dtterm.ti + else + echo "Unable to find $DT_TOP/config/dtterm.ti" + fi +} + +RemoveRunFiles() +{ + while read SRC + do + if [ "$SRC" != "" ] + then + rm -f $SRC + dirname=${SRC%/STAR} + if [ -d $dirname ] + then + cd $dirname + while [ "$dirname" != "$CDE_TOP" ] + do + cd .. + rmdir ${dirname##STAR/} >/dev/null 2>/dev/null + dirname=${dirname%/STAR} + done + fi + fi + done <<-EOF +#include "CDE-RUN.list" + EOF +} + + +VerifyInstalledFiles() +{ + echo "Status mode owner group filename" + echo "-----------------------------------------" +XCOMM exists correct correct correct /usr/dt/foo1 +XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2 +XCOMM exists the link is correct /usr/dt/link + + while read SRC + do +#include "../verify.func" + done <<-EOF +#include "CDE-RUN.lst" + EOF +} + + +PrintUsage() +{ + echo "Usage:" $0 "[OPERATION]" + echo "" + echo "Operations:" + echo " -e configure" + echo " -d deconfigure" + echo " -v verify" + echo " -s size" + echo " -h help" +} + +#include "../option.func" + +XCOMM ########################################################################## +XCOMM +XCOMM Main Body +XCOMM +XCOMM ########################################################################## + +PRODUCT=CDE +FILESET=CDE-RUN + +DT_TOP=CDE_INSTALLATION_TOP +DT_CONFIG_TOP=CDE_CONFIGURATION_TOP +DT_TEMP_TOP=CDE_LOGFILES_TOP +ROOT=/ + +retval=0 + +APPCONFIG=appconfig +APPCONFIG_DIRS="appmanager help icons types" +PRINTERS="" +DEFAULT_PRINTER="DtPrint" + + HandleOption $* + + if [ "$OPERATION" = "usage" ] + then + PrintUsage + exit 0 + fi + + if [ "$OPERATION" = "configure" ] + then + + HASH + HASH create the CDE_LOGFILES_TOP directory + HASH + + if [ ! -d $DT_TEMP_TOP/$APPCONFIG/appmanager ] + then + mkdir -p $DT_TEMP_TOP/$APPCONFIG/appmanager + fi + + cd $DT_TEMP_TOP + mv $APPCONFIG/appmanager .hidden-appmanager + chmod -R 755 * + chmod 755 .hidden-appmanager + chown -R bin * + chgrp -R bin * + mv .hidden-appmanager $APPCONFIG/appmanager + chmod 755 . + chown bin . + chgrp bin . + + HASH + HASH create the CDE_CONFIGURATION_TOP and its config directory + HASH + if [ ! -d $DT_CONFIG_TOP ] + then + mkdir -p $DT_CONFIG_TOP + fi + if [ ! -d $DT_CONFIG_TOP/config ] + then + mkdir -p $DT_CONFIG_TOP/config + fi + + CreateAppConfigDirectory + + HASH + HASH ConfigurePrintersDir + HASH + env LANG=C /usr/dt/bin/dtprintinfo -populate + + HASH + HASH Configure Xsession.d + HASH + + cd $DT_CONFIG_TOP/config + if [ ! -d Xsession.d ] + then + mkdir Xsession.d + fi + + cd $DT_CONFIG_TOP + chmod -R 755 * + + FixInetdDotConf + + elif [ "$OPERATION" = "deconfigure" ] + then + + UnfixInetdDotConf + + RemoveRunFiles + + VerifyInstalledFiles + + elif [ "$OPERATION" = "verify" ] + then + + VerifyInstalledFiles + + fi + + if [ "$OPERATION" != "verify" ] + then + + HASH issue a SIGHUP to the inetd process + + /etc/rc.d/inetd onereload + fi + + HASH dtmail requires setgid + chmod 2555 $DT_TOP/bin/dtmail + + HASH dtmail requires setgid + chmod 2555 $DT_TOP/bin/dtmail + + return $retval diff --git a/cde/admin/IntegTools/post_install/freebsd/configShlibs.src b/cde/admin/IntegTools/post_install/freebsd/configShlibs.src new file mode 100755 index 00000000..3807af30 --- /dev/null +++ b/cde/admin/IntegTools/post_install/freebsd/configShlibs.src @@ -0,0 +1,109 @@ +XCOMM!/bin/ksh +XCOMM $TOG: configShlibs.src /main/1 1998/03/11 16:18:33 mgreess $ + +#define STAR * + +XCOMM ############################################ +RemoveShlibFiles() +{ + while read SRC + do + if [ "$SRC" != "" ] + then + rm -f $SRC + dirname=${SRC%/STAR} + if [ -d $dirname ] + then + cd $dirname + while [ "$dirname" != "$CDE_TOP" ] + do + cd .. + rmdir ${dirname##STAR/} >/dev/null 2>/dev/null + dirname=${dirname%/STAR} + done + fi + fi + done <<-EOF +#include "CDE-SHLIBS.list" + EOF +} + +VerifyInstalledFiles() +{ + echo "Status mode owner group filename" + echo "-----------------------------------------" +XCOMM exists correct correct correct /usr/dt/foo1 +XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2 +XCOMM exists the link is correct /usr/dt/link + + while read SRC + do +#include "../verify.func" + done <<-EOF +#include "CDE-SHLIBS.lst" + EOF +} + +#include "../option.func" + +MakeTheLink() +{ +XCOMM +XCOMM Usage: configTT +XCOMM +XCOMM creates links in the install tree libtt.so -> libtt.so.1 +XCOMM + + cd CDE_INSTALLATION_TOP/lib + + for lib in `/bin/ls *.so.*` + do + link=`echo $lib | cut -d. -f1,2` + + rm -f $link + ln -s $lib $link + + done + +} + +XCOMM ######################################################################### +XCOMM +XCOMM Main Body +XCOMM +XCOMM ######################################################################### + +PRODUCT=CDE +FILESET=CDE-SHLIBS +retval=0 +CDE_TOP=CDE_INSTALLATION_TOP +CDE_CONF_TOP=CDE_CONFIGURATION_TOP + + HandleOption $* + + if [ "$OPERATION" = "deconfigure" ] + then + + echo "de-Configuring for CDE-SHLIBS..." + + RemoveShlibFiles + + /sbin/ldconfig -R + + VerifyInstalledFiles + + elif [ "$OPERATION" = "configure" ] + then + + MakeTheLink + + /sbin/ldconfig -m "${DT_TOP}/lib" + + elif [ "$OPERATION" = "verify" ] + then + + VerifyInstalledFiles + + fi + + return $retval diff --git a/cde/admin/IntegTools/post_install/freebsd/configTT.src b/cde/admin/IntegTools/post_install/freebsd/configTT.src new file mode 100755 index 00000000..8c9556ae --- /dev/null +++ b/cde/admin/IntegTools/post_install/freebsd/configTT.src @@ -0,0 +1,150 @@ +XCOMM! /bin/ksh +XCOMM ####### +XCOMM Product: CDE +XCOMM Fileset: CDE-TT +XCOMM configure +XCOMM @(#) $TOG: configTT.src /main/1 1998/03/11 16:18:40 mgreess $ +XCOMM ####### +XCOMM +XCOMM (c) Copyright Hewlett-Packard Company, 1993 +XCOMM +XCOMM ####### +#define HASH # + +PRODUCT=CDE +FILESET=CDE-TT +DO_CONFIGURATION="" +retval=0 + +FixInetdDotConf() +{ +FILE=/etc/inetd.conf +TMPFILE=/tmp/inetd.conf +TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver + +XCOMM +XCOMM see if it already exists +XCOMM + + nawk -v ttdb=$TTDBSERVERD \ + '{if ($1 == "ttdbserver/1" && $6 != ttdb) + print "#cde " $0; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE + + awk '{if ($1 == "ttdbserver/1") + print $0 > "/tmp/tt-already-there" + }' $FILE >/dev/null + + if [ ! -f /tmp/tt-already-there ] + then + echo "ttdbserver/1 stream rpc/tcp4 wait root $TTDBSERVERD $TTDBSERVERD" \ + >>$FILE + else + rm /tmp/tt-already-there + fi +} + +UnfixInetdDotConf() +{ +FILE=/etc/inetd.conf +TMPFILE=/tmp/inetd.conf +TTDBSERVERD=CDE_INSTALLATION_TOP/bin/rpc.ttdbserver + + nawk -v ttdb=$TTDBSERVERD \ + '{if ($1 == "ttdbserver/1" && $6 == ttdb) + ; + else + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE + + awk '{if ($1 == "#cde" && ($2 == "ttdbserver/1" || $2 == "ttdbserver")) { + $1 = $2; + $2 = "" + } + print $0 + }' $FILE >$TMPFILE + + cp $TMPFILE $FILE + rm $TMPFILE +} + +RemoveTTFiles() +{ + while read SRC + do + if [ "$SRC" != "" ] + then + rm -f $SRC + dirname=${SRC%/STAR} + if [ -d $dirname ] + then + cd $dirname + while [ "$dirname" != "$CDE_TOP" ] + do + cd .. + rmdir ${dirname##STAR/} >/dev/null 2>/dev/null + dirname=${dirname%/STAR} + done + fi + fi + done <<-EOF +#include "CDE-TT.list" + EOF +} + +VerifyInstalledFiles() +{ + echo "Status mode owner group filename" + echo "-----------------------------------------" +XCOMM exists correct correct correct /usr/dt/foo1 +XCOMM MISSING WRONG WRONG WRONG /usr/dt/foo2 +XCOMM exists the link is correct /usr/dt/link + + while read SRC + do +#include "../verify.func" + done <<-EOF +#include "CDE-TT.lst" + EOF +} + +#include "../option.func" + +XCOMM ###################################################################### +XCOMM +XCOMM Main Body +XCOMM +XCOMM ###################################################################### + + HandleOption $* + + if [ "$OPERATION" = "configure" ] + then + + : FixInetdDotConf + + elif [ "$OPERATION" = "deconfigure" ] + then + + : UnfixInetdDotConf + + RemoveTTFiles + + VerifyInstalledFiles + + elif [ "$OPERATION" = "verify" ] + then + + VerifyInstalledFiles + + fi + + return $retval diff --git a/cde/config/cf/FreeBSD.cf b/cde/config/cf/FreeBSD.cf index 1a300642..cc6bf136 100644 --- a/cde/config/cf/FreeBSD.cf +++ b/cde/config/cf/FreeBSD.cf @@ -154,6 +154,9 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe #define StandardIncludes -I/usr/local/include #define BuildLibPathVar LD_LIBRARY_PATH +#define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR) +#define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR) + #define TroffCmd groff -Tps #define SetTtyGroup YES #define HasNdbm YES @@ -167,8 +170,6 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe #define HasPlugin YES #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */ -#include +#define CDESharedRev 2 -#ifdef i386Architecture -#include -#endif +#include diff --git a/cde/config/cf/bsdLib.rules b/cde/config/cf/bsdLib.rules index 0d18ecac..5f9d69d3 100644 --- a/cde/config/cf/bsdLib.rules +++ b/cde/config/cf/bsdLib.rules @@ -49,13 +49,13 @@ AllTarget(Concat(lib,libname.so.rev)) @@\ @@\ Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\ $(RM) $@~ @@\ - (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ + (cd down; $(LD) -o up/$@~ -soname $@ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ $(RM) $@ @@\ $(MV) $@~ $@ @@\ $(RM) Concat(lib,libname.so) @@\ $(LN) $@ Concat(lib,libname.so) @@\ LinkBuildLibrary($@) @@\ - LinkBuildLibrary(Concat(lib,libname.so)) @@\ + (cd $(BUILDLIBDIR) && $(LN) $@ Concat(lib,libname.so)) @@\ @@\ clean:: @@\ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) diff --git a/cde/databases/CDE-SHLIBS.src b/cde/databases/CDE-SHLIBS.src index a9db7f8f..c756ca6e 100644 --- a/cde/databases/CDE-SHLIBS.src +++ b/cde/databases/CDE-SHLIBS.src @@ -1295,3 +1295,130 @@ lib/DtMmdb/libDtMmdb.so.0.0 } XCOMM #endif + +XCOMM +XCOMM +XCOMM >>----------------------------- +XCOMM FreeBSD libraries +XCOMM <<----------------------------- +XCOMM +XCOMM +lib/DtHelp/libDtHelp.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtHelp.so.2 + mode = 0555 +} +XCOMM +./libDtHelp.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtHelp.so + type = sym_link +} +XCOMM +lib/DtPrint/libDtPrint.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtPrint.so.2 + mode = 0555 +} +XCOMM +./libDtPrint.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtPrint.so + type = sym_link +} +XCOMM +lib/DtMrm/libDtMrm.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtMrm.so.2 + mode = 0555 +} +XCOMM +./libDtMrm.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtMrm.so + type = sym_link +} +XCOMM +lib/DtSvc/libDtSvc.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtSvc.so.2 + mode = 0555 +} +XCOMM +./libDtSvc.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtSvc.so + type = sym_link +} +XCOMM +lib/DtWidget/libDtWidget.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtWidget.so.2 + mode = 0555 +} +XCOMM +./libDtWidget.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtWidget.so + type = sym_link +} +XCOMM +lib/DtTerm/libDtTerm.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtTerm.so.2 + mode = 0555 +} +XCOMM +./libDtTerm.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtTerm.so + type = sym_link +} +XCOMM +lib/tt/lib/libtt.so.2 +{ freebsd + install_target = /usr/dt/lib/libtt.so.2 + mode = 0555 +} +XCOMM +./libtt.so.2 +{ freebsd + install_target = /usr/dt/lib/libtt.so + type = sym_link +} +XCOMM +lib/csa/libcsa.so.2 +{ freebsd + install_target = /usr/dt/lib/libcsa.so.2 + mode = 0555 +} +XCOMM +./libcsa.so.2 +{ freebsd + install_target = /usr/dt/lib/libcsa.so + type = sym_link +} +XCOMM +lib/DtSearch/libDtSearch.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtSearch.so.2 + mode = 0555 +} +XCOMM +./libDtSearch.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtSearch.so + type = sym_link +} +XCOMM +lib/DtMmdb/libDtMmdb.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtMmdb.so.2 + mode = 0755 +} +XCOMM +./libDtMmdb.so.2 +{ freebsd + install_target = /usr/dt/lib/libDtMmdb.so + type = sym_link +} diff --git a/cde/programs/Imakefile b/cde/programs/Imakefile index 4b1e1d05..a7ba46d1 100644 --- a/cde/programs/Imakefile +++ b/cde/programs/Imakefile @@ -12,28 +12,39 @@ XCOMM dtksh dtinfo #if defined(LinuxArchitecture) DTKSHDIR = DTINFODIR = -#elif defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) +DTCMDIR = dtcm +DTLOGINDIR = dtlogin +#elif defined(OpenBSDArchitecture) DTKSHDIR = dtksh DTINFODIR = +DTCMDIR = dtcm +DTLOGINDIR = dtlogin +#elif defined(FreeBSDArchitecture) +DTKSHDIR = dtksh +DTINFODIR = +DTCMDIR = dtcm +DTLOGINDIR = dtlogin/config #else DTKSHDIR = dtksh DTINFODIR = dtinfo +DTCMDIR = dtcm +DTLOGINDIR = dtlogin #endif -SUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \ +SUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm $(DTLOGINDIR) \ dtsession dthello dtstyle dtexec dtdbcache dticon dtterm \ dtcalc dtaction dtspcd \ - dtscreen $(DTKSHDIR) dtcm dtsearchpath \ + dtscreen $(DTKSHDIR) $(DTCMDIR) dtsearchpath \ dtappbuilder dtappintegrate dtprintegrate dtconfig \ dtcreate dtprintinfo fontaliases dtdspmsg ttsnoop \ dtudcfonted dtudcexch dtimsstart dtdocbook dtpdm dtsr \ dtpdmd $(DTINFODIR) $(EXTRADIRS) -LINTSUBDIRS = dthelp dsdm dtmail dtpad dtfile dtlogin dtwm \ +LINTSUBDIRS = dthelp dsdm dtmail dtpad dtfile $(DTLOGINDIR) dtwm \ dtsession dthello dtstyle dtexec dtdbcache dticon dtterm \ dtcalc dtaction dtcreate \ - dtscreen $(DTKSHDIR) dtcm dtsearchpath \ + dtscreen $(DTKSHDIR) $(DTCMDIR) dtsearchpath \ dtappbuilder dtappintegrate dtprintegrate dtprintinfo dtdspmsg \ dtudcfonted dtudcexch dtimsstart dtdocbook dtpdm dtsr \ dtpdmd $(DTINFODIR) $(EXTRADIRS)