diff options
Diffstat (limited to 'packaging/HPUX')
-rw-r--r-- | packaging/HPUX/Instructions | 49 | ||||
-rw-r--r-- | packaging/HPUX/Packaging-instructions | 75 | ||||
-rw-r--r-- | packaging/HPUX/configure.bin | 44 | ||||
-rw-r--r-- | packaging/HPUX/configure.man | 12 | ||||
-rw-r--r-- | packaging/HPUX/configure.swat | 61 | ||||
-rw-r--r-- | packaging/HPUX/configure.winbind | 9 | ||||
-rwxr-xr-x | packaging/HPUX/create_package.sh | 21 | ||||
-rw-r--r-- | packaging/HPUX/create_package_with_winbind.sh | 21 | ||||
-rwxr-xr-x | packaging/HPUX/gen_psf.sh | 357 | ||||
-rw-r--r-- | packaging/HPUX/gen_psf_with_winbind.sh | 380 | ||||
-rw-r--r-- | packaging/HPUX/samba.boot | 72 | ||||
-rw-r--r-- | packaging/HPUX/samba.config | 2 | ||||
-rw-r--r-- | packaging/HPUX/unconfigure.bin | 8 | ||||
-rw-r--r-- | packaging/HPUX/unconfigure.swat | 29 | ||||
-rw-r--r-- | packaging/HPUX/unconfigure.winbind | 8 | ||||
-rw-r--r-- | packaging/HPUX/vendor_description | 2 |
16 files changed, 1150 insertions, 0 deletions
diff --git a/packaging/HPUX/Instructions b/packaging/HPUX/Instructions new file mode 100644 index 00000000000..5e5bd542d3f --- /dev/null +++ b/packaging/HPUX/Instructions @@ -0,0 +1,49 @@ +Installation Instructions for HP-UX Software Distributor package +---------------------------------------------------------------- + +1. Run swinstall + + You may have copied (swcopy) the depot to the depot server. In such cases + select the depot on server. + + In order to install from the depot file, as root enter the following + command: + + swinstall -s `pwd`/samba.depot Samba + +2. Create configuration file + + Create /usr/local/samba/lib/smb.conf. You can use one of the examples from + /usr/local/samba/newconfig/examples as template. + + Make sure that "guest account = pcguest" is included in the global + configuration variables. The swinstall will have created the pcguest + user on HPUX for you. The default value of "guest account" is "nobody" + which causes problems for Samba on HPUX because it has a negative uid. + +3. Start/stop Samba + + The installation provides the boot startup script at /sbin/init.d/samba. + Samba will automatically start at run level 3 and stop during the + transition to run level 2. + + You can use this script to manually manipulate Samba. Enter: + + # /sbin/init.d/samba start to start Samba + # /sbin/init.d/samba stop to stop Samba + +4. Customization + + The autostart is controled by editing file /etc/rc.config.d/samba. This + file has the following variables: + + SAMBA_START=[0|1] 1 start Samba at boot (default) + 0 do not start samba at boot + + SAMBA_DEBUG=[0-9] debug level for smbd and nmbd. Default debug + level is 1. + + The configuration file is not overwritten at next install while the boot + script (/sbin/init.d/samba) is. + +Author: Leon Mlakar <leon@hermes.si> diff --git a/packaging/HPUX/Packaging-instructions b/packaging/HPUX/Packaging-instructions new file mode 100644 index 00000000000..8645fba2756 --- /dev/null +++ b/packaging/HPUX/Packaging-instructions @@ -0,0 +1,75 @@ +Create Software Depot for Samba +------------------------------- + +1. Compile the source code + The packaging assumes that the final product will install under /usr/local/samba and will use /usr/local/samba for var directory. In order to support these + assumptions, run configure as follows: + + ./configure --prefix /usr/local/samba --localstatedir /usr/local/samba + + NOTE: to compile samba with optional winbind capability (HP-UX 11.x only), + use the following configure command line instead: + + ./configure --with-winbind --with-pam --prefix /usr/local/samba --localstatedir /usr/local/samba + + Afterwards compile the source code in a standard way. + +2. In packaging/HPUX directory run the following command: + + WITHOUT winbind: + + $ create_package.sh + + WITH winbind: + + $ create_package_with_winbind.sh + +3. Use resulting samba.depot file as the software depot for Samba. + +Brief Description of Depot +-------------------------- + +The software depot contains product Samba, which consists of the following +three filesets: + + Samba.core Core samba server components, everything but SWAT + and man pages + + Samba.man Man pages. Note that HP-UX uses different section + numbering, so the man pages are moved and modified + to correct the section references (i.e. nmbd(8) changed + to nmbd(1m)). + + Samba.swat SWAT tool. + +The configure scripts will take care of the following: + + Samba.core 1. create pcguest account should it not exist. The + login shell is set to /usr/bin/true + 2. create startup/shutdown links at: + /sbin/rc3.d/S911samba + /sbin/rc2.d/K130samba + 3. copy boot configuration file from newconfig to + /etc/rc.config.d, if one does not exist. + + Samba.man 1. add /usr/local/samba/man to default man search path in + /etc/MANPATH + + Samba.swat 1. add swat service to /etc/services if necessary. + Swat will run through port 901. + 2. add swat to /etc/inetd.conf, if necessary. + 3. signal (SIGHUP) inetd to reread configuration if + 1. or 2. were changed. + +The unconfigure scripts will, upon the product removal, do the following: + + Samba.core 1. remove startup/shutdown links + 2. remove user pcguest + + Samba.man N/A + + Samba.swat 1. remove swat from /etc/services + 2. remove swat from /etc/inetd.conf + 3. signal inetd (SIGHUP) to reread configuration + +Author: Leon Mlakar <leon@hermes.si> diff --git a/packaging/HPUX/configure.bin b/packaging/HPUX/configure.bin new file mode 100644 index 00000000000..60363336054 --- /dev/null +++ b/packaging/HPUX/configure.bin @@ -0,0 +1,44 @@ +# Samba.core configure script + +RC=0 + +addUser() +{ + if grep -q '^pcguest:' /etc/passwd + then + cat <<__EOF__ +NOTE: Username pcguest already exists in /etc/passwd file. +__EOF__ + return + fi + + /usr/sbin/useradd -g users -d /home/pcguest -c "Samba Guest" \ + -s /usr/bin/true -m pcguest + + + if [ $? -ne 0 ] + then + cat >&2 <<__EOF__ +ERROR: Failed to create username pcguest. +__EOF__ + RC=1 + else + cat <<__EOF__ +NOTE: The configure script has added username pcguest in /etc/passwd file. + You must set the password for user pcguest in order to activate it. +__EOF__ + fi +} + + +addUser + +ln -s /sbin/init.d/samba /sbin/rc3.d/S911samba +ln -s /sbin/init.d/samba /sbin/rc2.d/K130samba + +if [ ! -f /etc/rc.config.d/samba ] +then + cp /usr/local/samba/newconfig/samba.config /etc/rc.config.d/samba +fi + +exit 0 diff --git a/packaging/HPUX/configure.man b/packaging/HPUX/configure.man new file mode 100644 index 00000000000..5aa5545fee5 --- /dev/null +++ b/packaging/HPUX/configure.man @@ -0,0 +1,12 @@ +# Samba.man configure script + + +grep -q '/usr/local/samba/man' /etc/MANPATH +if [ $? -eq 1 ] +then + echo "`cat /etc/MANPATH`:/usr/local/samba/man" >/tmp/$$.PATH + cp /tmp/$$.PATH /etc/MANPATH + rm -f /tmp/$$.PATH +fi + +exit 0 diff --git a/packaging/HPUX/configure.swat b/packaging/HPUX/configure.swat new file mode 100644 index 00000000000..0e69fc03fe4 --- /dev/null +++ b/packaging/HPUX/configure.swat @@ -0,0 +1,61 @@ +# Configure script for Samba.swat + +UPDATE=0 + +KillProcess() +{ + proc=$1 + sig=$2 + + # Determine PID of process(es) to stop and kill it. This routine + # is designed to work with bourne shell, ksh and posix shell. + + Command=`basename $proc | cut -c1-8` # Solaris ps limited to 8 chars. + + pid=`ps -e | awk "\\$NF~/$Command/ {print \\$1}"` + + if [ "X$pid" != "X" ]; then + kill -$sig $pid + fi +} + +UpdateServices() +{ + if grep -q '^swat' /etc/services + then + return + fi + + echo "swat 901/tcp" >>/etc/services + cat <<__EOF__ +NOTE: The following entry had been added to /etc/services: + swat 901/tcp + Should you want to move SWAT to another port, modify the entry + accordingly and restart inetd daemon with -HUP signal. +__EOF__ + UPDATE=1 +} + +UpdateInetd() +{ + if grep -q '^swat' /etc/inetd.conf + then + return + fi + + echo "swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat" >>/etc/inetd.conf + + + UPDATE=1 +} + +UpdateServices +UpdateInetd + +if [ "$UPDATE" -eq 1 ] +then + KillProcess inetd HUP +fi + +exit 0 + diff --git a/packaging/HPUX/configure.winbind b/packaging/HPUX/configure.winbind new file mode 100644 index 00000000000..fc9b8ded684 --- /dev/null +++ b/packaging/HPUX/configure.winbind @@ -0,0 +1,9 @@ +# Samba.winbind configure script + + + echo "heres where wed create links to winbind libs" + ln -s /usr/local/samba/lib/winbind/libnss_winbind.so /usr/lib/libnss_winbind.1 + ln -s /usr/local/samba/lib/winbind/pam_winbind.so /usr/lib/security/libpam_winbind.1 + + +exit 0 diff --git a/packaging/HPUX/create_package.sh b/packaging/HPUX/create_package.sh new file mode 100755 index 00000000000..f8e321dbff7 --- /dev/null +++ b/packaging/HPUX/create_package.sh @@ -0,0 +1,21 @@ +#!/usr/bin/sh +PRODUCT=Samba +DEPOT=samba.depot +PSF=samba.psf +export PRODUCT +export DEPOT +export PSF + +mkdir codepage >/dev/null 2>&1 +mkdir man >/dev/null 2>&1 + +./gen_psf.sh $PRODUCT + +echo "Creating software depot ($DEPOT) for product $PRODUCT" + +/usr/sbin/swpackage -vv -s samba.psf -x target_type=tape -d `pwd`/$DEPOT $PRODUCT + +#- clean-up temporary directories +rm -r codepage +rm -r man + diff --git a/packaging/HPUX/create_package_with_winbind.sh b/packaging/HPUX/create_package_with_winbind.sh new file mode 100644 index 00000000000..b58c38f0a91 --- /dev/null +++ b/packaging/HPUX/create_package_with_winbind.sh @@ -0,0 +1,21 @@ +#!/usr/bin/sh +PRODUCT=Samba +DEPOT=samba.depot +PSF=samba.psf +export PRODUCT +export DEPOT +export PSF + +mkdir codepage >/dev/null 2>&1 +mkdir man >/dev/null 2>&1 + +./gen_psf_with_winbind.sh $PRODUCT + +echo "Creating software depot ($DEPOT) for product $PRODUCT" + +/usr/sbin/swpackage -vv -s samba.psf -x target_type=tape -d `pwd`/$DEPOT $PRODUCT + +#- clean-up temporary directories +rm -r codepage +rm -r man + diff --git a/packaging/HPUX/gen_psf.sh b/packaging/HPUX/gen_psf.sh new file mode 100755 index 00000000000..4a24bab49b4 --- /dev/null +++ b/packaging/HPUX/gen_psf.sh @@ -0,0 +1,357 @@ +#!/usr/bin/sh +#- Below variables are editable. +#- VERSION Script tries to set the version automatically if it's empty +#- string. The version number is assumed to be in +#- ../../source/include/version.h. Should this fail to find correct +#- version, set it manually to override automatic search. +#- BIN List of binaries from ../../source/bin. Note: do not include +#- swat here for it is a part of Samba.swat fileset +#- SCRIPT List of scripts +#- OS_REVISION The regular expression to determine the supported OS version. +#- The default versions are HP-UX 10.10 or later as well as 11.*. +#- You can modify this to reflect the OS you compile on. For +#- instance, to support any 10.? and 11.? releases, use the +#- following string: +#- '?.10.*|?.11.* + VERSION="" + + BIN="smbd nmbd smbclient testparm testprns smbstatus\ + rpcclient smbpasswd make_smbcodepage nmblookup " + +# SCRIPT="smbtar addtosmbpass convert_smbpasswd" + + OS_RELEASE='?.10.[2-9]?|?.11.*' + + +#- Below variables should be exported from create_package.sh + +if [ -z "$PSF" ] +then + PSF=samba.psf +fi + +if [ -z "$DEPOT" ] +then + DEPOT=samba.depot +fi + +if [ -z "$PRODUCT" ] +then + PRODUCT=Samba +fi + +#-------------------------------------------------------------------------- +CODEPAGES="" +if [ -z "$VERSION" ] +then + echo "Deducing Samba version from version.h ... \c" + VERSION=`grep VERSION ../../source/include/version.h | awk '{print $3}' |\ + tr -d '"'` + if [ $? -ne 0 -o -z "$VERSION" ] + then + echo "failed." + echo "Cannot find Samba version. Edit gen_psf.sh and set VERSION" + echo "variable manually." + exit 1 + else + echo "$VERSION" + fi +fi + +echo "Creating list of codepage definitions ..." + +#- create codepages from definition and add them to PSF file +for a in ../../source/codepages/codepage_def.[0-9][0-9][0-9] +do + b=${a##../../source/codepages/codepage_def.} + CODEPAGES="$CODEPAGES $b" +done +echo "\t$CODEPAGES" + +echo "Running make_smbcodepage on codepage definitions ... \c" + +mkdir codepage >/dev/null 2>&1 +for a in $CODEPAGES +do +../../source/bin/make_smbcodepage c $a ../../source/codepages/codepage_def.$a\ + codepage/codepage.$a +done +echo "done." + +#- HP-UX uses slightly different section numbers for man pages. The following +#- compares to "normal" sections: +#- +#- Section HP-UX section +#- 1 1 user commands +#- 5 4 files +#- 7 5 concepts +#- 8 1m administration commands +#- NOTE: +#- Sed expressions used in below loops replaces original section references +#- inside man page with HP-UX section references. Assumption is that +#- only numbers in brackets are section references and nothing else. +#- So far I did not see the man pages corrupted by replacing anything +#- else but section references. + +mkdir man >/dev/null 2>&1 +echo "Coverting man pages to HP-UX numbering ..." +echo "\t Sections 1 \c" +for a in ../../docs/manpages/*.1 +do + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/`basename $a` +done +echo "1m \c" +for a in ../../docs/manpages/*.8 +do + b=`basename $a` + c=${b%.8} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1M/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.1m +done +echo "4 \c" +for a in ../../docs/manpages/*.5 +do + b=`basename $a` + c=${b%.5} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 4/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.4 +done +echo "5" +for a in ../../docs/manpages/*.7 +do + b=`basename $a` + c=${b%.7} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 5/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.5 +done + +echo "Creating product specification file:" +echo "\tVendor and product description" +#- vendor and header of product definition +cat <<_EOF_ >$PSF +vendor + tag Samba + title Samba Team + description <vendor_description +end + +product + tag $PRODUCT + title Samba Server + description < ../../WHATSNEW.txt + copyright "Copyright (c) 1998 Samba Team. See COPYING for details." + readme < ../../README + revision $VERSION + machine_type * + os_name HP-UX + os_release $OS_RELEASE + os_version * + directory / + is_locatable false + vendor_tag Samba + +_EOF_ + +echo "\tFileset $PRODUCT.core" + +cat <<_EOF_ >>$PSF + fileset + tag core + title Samba server core components + revision $VERSION + is_kernel false + is_reboot false + is_secure false + configure configure.bin + unconfigure unconfigure.bin + + file -m 0755 -o root -g sys / /usr/local/samba/ + file -m 0755 -o root -g sys / /usr/local/samba/bin/ + file -m 0755 -o root -g sys / /usr/local/samba/lib/ + file -m 0755 -o root -g sys / /usr/local/samba/lib/codepages/ + file -m 0755 -o root -g sys / /usr/local/samba/newconfig/ + file -m 0755 -o root -g sys / /usr/local/samba/newconfig/examples/ + file -m 0700 -o root -g sys / /usr/local/samba/private/ + file -m 0755 -o root -g sys / /var/usr/local/samba/ + file -m 0755 -o root -g sys / /var/usr/local/samba/locks/ + + file -m 0444 -o root -g sys ../../COPYING /usr/local/samba/COPYING + file -m 0555 -o root -g sys ./samba.boot /sbin/init.d/samba + file -m 0444 -o root -g sys ./samba.config /usr/local/samba/newconfig/samba.config + + file -m 0444 -o root -g sys ../../examples/smb.conf.default /usr/local/samba/newconfig/examples/smb.conf.default + file -m 0444 -o root -g sys ../../examples/simple/smb.conf /usr/local/samba/newconfig/examples/smb.conf.simple + file -m 0444 -o root -g sys ../../examples/dce-dfs/smb.conf /usr/local/samba/newconfig/examples/smb.conf.dce-dfs + + directory ../../source/bin=/usr/local/samba/bin +_EOF_ + for a in $BIN + do + echo " file -m 0555 -o root -g sys $a" >>$PSF + done + + echo " directory ../../source/script=/usr/local/samba/bin" >>$PSF + + for a in $SCRIPT + do + echo " file -m 0555 -o root -g sys $a" >>$PSF + done + + echo " directory ./codepage=/usr/local/samba/lib/codepages" >> $PSF + + for a in $CODEPAGES + do + echo " file -m 0444 -o root -g sys codepage.$a" >>$PSF + done + echo " end" >>$PSF +#- end of fileset CORE + +echo "\tFileset $PRODUCT.man" +#- Man pages +cat <<_EOF_ >>$PSF + fileset + tag man + title Samba server man pages + revision $VERSION + is_kernel false + is_reboot false + is_secure false + configure configure.man + + file -m 0755 -o root -g sys / /usr/local/samba/man/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man1/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man1m/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man4/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man5/ + +_EOF_ + +#- HP-UX uses slightly different section numbers for man pages. The following +#- compares to "normal" sections: +#- +#- Section HP-UX section +#- 1 1 user commands +#- 5 4 files +#- 7 5 concepts +#- 8 1m administration commands + + for a in man/*.1 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1/$b" >>$PSF + done + + for a in man/*.1m + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1m/$b" >>$PSF + done + + for a in man/*.4 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man4/$b" >>$PSF + done + + for a in man/*.5 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man5/$b" >>$PSF + done + + echo " end" >>$PSF + +echo "\tFileset $PRODUCT.swat" + +cat <<_EOF_ >>$PSF + + fileset + tag swat + title Samba Web-based administration tool + revision $VERSION + is_kernel false + is_reboot false + is_secure false + prerequisite Samba.core + configure configure.swat + unconfigure unconfigure.swat + + file -m 0755 -o root -g sys / /usr/local/samba/swat/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/help/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/images/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/include/ + + directory ../../swat=/usr/local/samba/swat + file -m 0444 -o root -g sys README + + directory ../../source/bin=/usr/local/samba/bin + file -m 0555 -o root -g sys swat + + directory ../../swat/images=/usr/local/samba/swat/images +_EOF_ + + for a in ../../swat/images/*.gif + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../swat/help=/usr/local/samba/swat/help" >>$PSF + + for a in ../../swat/help/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../docs/htmldocs=/usr/local/samba/swat/help" >>$PSF + + for a in ../../docs/htmldocs/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../swat/include=/usr/local/samba/swat/include" >>$PSF + + for a in ../../swat/include/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + +cat <<_EOF_ >>$PSF + end + +end +_EOF_ + diff --git a/packaging/HPUX/gen_psf_with_winbind.sh b/packaging/HPUX/gen_psf_with_winbind.sh new file mode 100644 index 00000000000..ef32590ea83 --- /dev/null +++ b/packaging/HPUX/gen_psf_with_winbind.sh @@ -0,0 +1,380 @@ +#!/usr/bin/sh +#- Below variables are editable. +#- VERSION Script tries to set the version automatically if it's empty +#- string. The version number is assumed to be in +#- ../../source/include/version.h. Should this fail to find correct +#- version, set it manually to override automatic search. +#- BIN List of binaries from ../../source/bin. Note: do not include +#- swat here for it is a part of Samba.swat fileset +#- SCRIPT List of scripts +#- OS_REVISION The regular expression to determine the supported OS version. +#- The default versions are HP-UX 10.10 or later as well as 11.*. +#- You can modify this to reflect the OS you compile on. For +#- instance, to support any 10.? and 11.? releases, use the +#- following string: +#- '?.10.*|?.11.* + VERSION="" + + BIN="smbd nmbd smbclient testparm testprns smbstatus\ + rpcclient smbpasswd make_smbcodepage nmblookup " + +# SCRIPT="smbtar addtosmbpass convert_smbpasswd" + + OS_RELEASE='?.10.[2-9]?|?.11.*' +# WINBINDD_OS_RELEASE='?.11.*' + WINBINDD_OS_RELEASE='?.11.11' + +#- Below variables should be exported from create_package.sh + +if [ -z "$PSF" ] +then + PSF=samba.psf +fi + +if [ -z "$DEPOT" ] +then + DEPOT=samba.depot +fi + +if [ -z "$PRODUCT" ] +then + PRODUCT=Samba +fi + +#-------------------------------------------------------------------------- +CODEPAGES="" +if [ -z "$VERSION" ] +then + echo "Deducing Samba version from version.h ... \c" + VERSION=`grep VERSION ../../source/include/version.h | awk '{print $3}' |\ + tr -d '"'` + if [ $? -ne 0 -o -z "$VERSION" ] + then + echo "failed." + echo "Cannot find Samba version. Edit gen_psf.sh and set VERSION" + echo "variable manually." + exit 1 + else + echo "$VERSION" + fi +fi + +echo "Creating list of codepage definitions ..." + +#- create codepages from definition and add them to PSF file +for a in ../../source/codepages/codepage_def.[0-9][0-9][0-9] +do + b=${a##../../source/codepages/codepage_def.} + CODEPAGES="$CODEPAGES $b" +done +echo "\t$CODEPAGES" + +echo "Running make_smbcodepage on codepage definitions ... \c" + +mkdir codepage >/dev/null 2>&1 +for a in $CODEPAGES +do +../../source/bin/make_smbcodepage c $a ../../source/codepages/codepage_def.$a\ + codepage/codepage.$a +done +echo "done." + +#- HP-UX uses slightly different section numbers for man pages. The following +#- compares to "normal" sections: +#- +#- Section HP-UX section +#- 1 1 user commands +#- 5 4 files +#- 7 5 concepts +#- 8 1m administration commands +#- NOTE: +#- Sed expressions used in below loops replaces original section references +#- inside man page with HP-UX section references. Assumption is that +#- only numbers in brackets are section references and nothing else. +#- So far I did not see the man pages corrupted by replacing anything +#- else but section references. + +mkdir man >/dev/null 2>&1 +echo "Coverting man pages to HP-UX numbering ..." +echo "\t Sections 1 \c" +for a in ../../docs/manpages/*.1 +do + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/`basename $a` +done +echo "1m \c" +for a in ../../docs/manpages/*.8 +do + b=`basename $a` + c=${b%.8} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 1M/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.1m +done +echo "4 \c" +for a in ../../docs/manpages/*.5 +do + b=`basename $a` + c=${b%.5} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 4/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.4 +done +echo "5" +for a in ../../docs/manpages/*.7 +do + b=`basename $a` + c=${b%.7} + sed -e 's/^[.]TH \([^ ][^ ]*\) .*/.TH \1 5/'\ + -e '1a\ +.ds )H Samba Team'\ + -e "1a\\ +.ds ]W $VERSION"\ + -e 's/(8)/(1m)/g' \ + -e 's/(5)/(4)/g' \ + -e 's/(7)/(5)/g' \ + $a >man/$c.5 +done + +echo "Creating product specification file:" +echo "\tVendor and product description" +#- vendor and header of product definition +cat <<_EOF_ >$PSF +vendor + tag Samba + title Samba Team + description <vendor_description +end + +product + tag $PRODUCT + title Samba Server + description < ../../WHATSNEW.txt + copyright "Copyright (c) 1998 Samba Team. See COPYING for details." + readme < ../../README + revision $VERSION + machine_type * + os_name HP-UX + os_release $OS_RELEASE + os_version * + directory / + is_locatable false + vendor_tag Samba + +_EOF_ + +echo "\tFileset $PRODUCT.core" + +cat <<_EOF_ >>$PSF + fileset + tag core + title Samba server core components + revision $VERSION + os_release $WINBIND_OS_RELEASE + is_kernel false + is_reboot false + is_secure false + configure configure.bin + unconfigure unconfigure.bin + + file -m 0755 -o root -g sys / /usr/local/samba/ + file -m 0755 -o root -g sys / /usr/local/samba/bin/ + file -m 0755 -o root -g sys / /usr/local/samba/lib/ + file -m 0755 -o root -g sys / /usr/local/samba/lib/codepages/ + file -m 0755 -o root -g sys / /usr/local/samba/newconfig/ + file -m 0755 -o root -g sys / /usr/local/samba/newconfig/examples/ + file -m 0700 -o root -g sys / /usr/local/samba/private/ + file -m 0755 -o root -g sys / /var/usr/local/samba/ + file -m 0755 -o root -g sys / /var/usr/local/samba/locks/ + + file -m 0444 -o root -g sys ../../COPYING /usr/local/samba/COPYING + file -m 0555 -o root -g sys ./samba.boot /sbin/init.d/samba + file -m 0444 -o root -g sys ./samba.config /usr/local/samba/newconfig/samba.config + + file -m 0444 -o root -g sys ../../examples/smb.conf.default /usr/local/samba/newconfig/examples/smb.conf.default + file -m 0444 -o root -g sys ../../examples/simple/smb.conf /usr/local/samba/newconfig/examples/smb.conf.simple + file -m 0444 -o root -g sys ../../examples/dce-dfs/smb.conf /usr/local/samba/newconfig/examples/smb.conf.dce-dfs + + directory ../../source/bin=/usr/local/samba/bin +_EOF_ + for a in $BIN + do + echo " file -m 0555 -o root -g sys $a" >>$PSF + done + + echo " directory ../../source/script=/usr/local/samba/bin" >>$PSF + + for a in $SCRIPT + do + echo " file -m 0555 -o root -g sys $a" >>$PSF + done + + echo " directory ./codepage=/usr/local/samba/lib/codepages" >> $PSF + + for a in $CODEPAGES + do + echo " file -m 0444 -o root -g sys codepage.$a" >>$PSF + done + echo " end" >>$PSF +#- end of fileset CORE + +echo "\tFileset $PRODUCT.man" +#- Man pages +cat <<_EOF_ >>$PSF + fileset + tag man + title Samba server man pages + revision $VERSION + is_kernel false + is_reboot false + is_secure false + configure configure.man + + file -m 0755 -o root -g sys / /usr/local/samba/man/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man1/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man1m/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man4/ + file -m 0755 -o root -g sys / /usr/local/samba/man/man5/ + +_EOF_ + +#- HP-UX uses slightly different section numbers for man pages. The following +#- compares to "normal" sections: +#- +#- Section HP-UX section +#- 1 1 user commands +#- 5 4 files +#- 7 5 concepts +#- 8 1m administration commands + + for a in man/*.1 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1/$b" >>$PSF + done + + for a in man/*.1m + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man1m/$b" >>$PSF + done + + for a in man/*.4 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man4/$b" >>$PSF + done + + for a in man/*.5 + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $a /usr/local/samba/man/man5/$b" >>$PSF + done + + echo " end" >>$PSF + +echo "\tFileset $PRODUCT.swat" + +cat <<_EOF_ >>$PSF + + fileset + tag winbind + title Samba winbind + revision $VERSION + is_kernel false + is_reboot false + is_secure false + prerequisite Samba.core + configure configure.winbind + unconfigure unconfigure.winbind + + directory ../../source/nsswitch=/usr/local/samba/lib/winbind + file -m 0755 -o root -g sys libnss_winbind.so + file -m 0755 -o root -g sys pam_winbind.so + directory ../../source/bin=/usr/local/samba/bin + file -m 0755 -o root -g sys winbindd + file -m 0755 -o root -g sys wbinfo + + +cat <<_EOF_ >>$PSF + end + fileset + tag swat + title Samba Web-based administration tool + revision $VERSION + is_kernel false + is_reboot false + is_secure false + prerequisite Samba.core + configure configure.swat + unconfigure unconfigure.swat + + file -m 0755 -o root -g sys / /usr/local/samba/swat/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/help/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/images/ + file -m 0755 -o root -g sys / /usr/local/samba/swat/include/ + + directory ../../swat=/usr/local/samba/swat + file -m 0444 -o root -g sys README + + directory ../../source/bin=/usr/local/samba/bin + file -m 0555 -o root -g sys swat + + directory ../../swat/images=/usr/local/samba/swat/images +_EOF_ + + for a in ../../swat/images/*.gif + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../swat/help=/usr/local/samba/swat/help" >>$PSF + + for a in ../../swat/help/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../docs/htmldocs=/usr/local/samba/swat/help" >>$PSF + + for a in ../../docs/htmldocs/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + + echo " directory ../../swat/include=/usr/local/samba/swat/include" >>$PSF + + for a in ../../swat/include/*.html + do + b=`basename $a` + echo " file -m 0444 -o root -g sys $b" >>$PSF + done + +cat <<_EOF_ >>$PSF + end + +end +_EOF_ + diff --git a/packaging/HPUX/samba.boot b/packaging/HPUX/samba.boot new file mode 100644 index 00000000000..a0d55d7d766 --- /dev/null +++ b/packaging/HPUX/samba.boot @@ -0,0 +1,72 @@ + +SUCCESS=0 +FAILURE=1 +exitval=$SUCCESS + + +KillProcess() +{ + proc=$1 + sig=$2 + + # Determine PID of process(es) to stop and kill it. This routine + # is designed to work with bourne shell, ksh and posix shell. + + Command=`basename $proc | cut -c1-8` # Solaris ps limited to 8 chars. + + pid=`ps -e | awk "\\$NF~/$Command/ {print \\$1}"` + + if [ "X$pid" != "X" ]; then + kill -$sig $pid + fi +} + +if [ ! -f /etc/rc.config.d/samba ] +then + echo "ERROR: Config file /etc/rc.config.d/samba missing." + exit $FAILURE +fi + +. /etc/rc.config.d/samba + +case $1 in + 'start_msg') + echo "Start Samba Services" + ;; + + 'stop_msg') + echo "Stop Samba Services" + ;; + + 'start') + # Starting Samba is easy ... + if [ "$SAMBA_START" -eq 1 ] + then + if [ -x /usr/local/samba/bin/smbd ] + then + /usr/local/samba/bin/smbd -D -d $SAMBA_DEBUG + fi + + if [ -x /usr/local/samba/bin/nmbd ] + then + /usr/local/samba/bin/nmbd -D -d $SAMBA_DEBUG + fi + fi + ;; + + 'stop') + # + # ... stopping it, however, is another story + # + KillProcess nmbd TERM + KillProcess smbd TERM + ;; + + *) + echo "usage: $0 {start|stop|start_msg|stop_msg}" + exitval=$FAILURE + ;; +esac + +exit $exitval + diff --git a/packaging/HPUX/samba.config b/packaging/HPUX/samba.config new file mode 100644 index 00000000000..a5c6fd2cd06 --- /dev/null +++ b/packaging/HPUX/samba.config @@ -0,0 +1,2 @@ +SAMBA_START=1 +SAMBA_DEBUG=1 diff --git a/packaging/HPUX/unconfigure.bin b/packaging/HPUX/unconfigure.bin new file mode 100644 index 00000000000..3d5c7d9dc04 --- /dev/null +++ b/packaging/HPUX/unconfigure.bin @@ -0,0 +1,8 @@ +# Samba.core unconfigure script + +rm -f /sbin/rc3.d/S911samba +rm -f /sbin/rc2.d/K130samba + +/usr/sbin/userdel -r pcguest + +exit 0 diff --git a/packaging/HPUX/unconfigure.swat b/packaging/HPUX/unconfigure.swat new file mode 100644 index 00000000000..b0dd325bc91 --- /dev/null +++ b/packaging/HPUX/unconfigure.swat @@ -0,0 +1,29 @@ +# Unconfigure script for Samba.swat + +KillProcess() +{ + proc=$1 + sig=$2 + + # Determine PID of process(es) to stop and kill it. This routine + # is designed to work with bourne shell, ksh and posix shell. + + Command=`basename $proc | cut -c1-8` # Solaris ps limited to 8 chars. + + pid=`ps -e | awk "\\$NF~/$Command/ {print \\$1}"` + + if [ "X$pid" != "X" ]; then + kill -$sig $pid + fi +} + +grep -v '^swat' /etc/services >/tmp/services$$ +mv /tmp/services$$ /etc/services + +grep -v '^swat' /etc/inetd.conf >/tmp/inetd.conf$$ +mv /tmp/inetd.conf$$ /etc/inetd.conf + +KillProcess inetd HUP + +exit 0 + diff --git a/packaging/HPUX/unconfigure.winbind b/packaging/HPUX/unconfigure.winbind new file mode 100644 index 00000000000..80709eb86dd --- /dev/null +++ b/packaging/HPUX/unconfigure.winbind @@ -0,0 +1,8 @@ +# Samba.winbind configure script + + + echo "heres where wed remove links to winbind libs" + rm /usr/lib/libnss_winbind.1 + rm /usr/lib/security/libpam_winbind.1 + +exit 0 diff --git a/packaging/HPUX/vendor_description b/packaging/HPUX/vendor_description new file mode 100644 index 00000000000..2f661188048 --- /dev/null +++ b/packaging/HPUX/vendor_description @@ -0,0 +1,2 @@ +Read more about Samba and Samba Team at http://www.samba.org/ + |