Operating System - HP-UX
1825694 Members
3349 Online
109686 Solutions
New Discussion

Re: Getting error while building a depot file on HP-UX IA64 11.31

 
Praving5
Advisor

Getting error while building a depot file on HP-UX IA64 11.31

Hi All,
I wanted to make depot file for one of my software releases. I am getting the below error:

# make hpux-ia64
(cd lib; make -f Makefile.ia64)
Archiving libpwplus.a ...
ar cru libpwplus.a cfckpw.o cfgrules.o getrpw.o hashpw.o load.o log.o test.o testfnc.o util.o
ar: libpwplus.a not in archive format
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


Any idea on what this can be?

Thanks in advance and with regards,
Pravin
21 REPLIES 21
Dennis Handly
Acclaimed Contributor

Re: Getting error while building an archive lib on HP-UX IA64 11.31

(I see no depots here, just an archive lib.)

>ar: libpwplus.a not in archive format

You need to remove this file and start fresh.

Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

Hi Denis,

Thanks for the reply.
You mean i delete libpwplus.a file and put it back?

Dennis Handly
Acclaimed Contributor

Re: Getting error while building an archive lib on HP-UX IA64 11.31

>You mean I delete libpwplus.a file

Yes, remove it and then make.

Dennis Handly
Acclaimed Contributor

Re: Getting error while building an archive lib on HP-UX IA64 11.31

In fact your archive lib make rule should have that rm there:
libpwplus.a: cfckpw.o ...
         rm -f $@
         ar cru $@ cfckpw.o ...

Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

Thanks Dennis.

make hpux-ia64 works now :)

But after that when i get to do

> make package.HPUXB1122

it throws below error:

* Software selections:
*


* Beginning Selection Phase.
* Reading the Product Specification File (PSF)
"swpackage_ia64.psf".
", at line 21.lue defined for the keyword "
", at line 22.lue defined for the keyword "vendor
ERROR: Incomplete definition for the Product Specification File (PSF)
"swpackage_ia64.psf", beginning at line 21. The following
attributes are not defined:
products the products contained in the PSF
The attribute(s) must be defined before the parsing can
continue.

======= 11/12/08 17:59:07 EST END swpackage SESSION

*** Error exit code 1

Stop.


Any idea what can this be....
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

Oh.. I just saw.. that had ^M characters.. Removed it.. working i suppose.. yet to test...
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

Something new now...

The depot file is made successfully. But when I try to install it, it gives below:

# swinstall -s /var/pwplus-4.0.hpux-ia64.depot PWplus

======= 11/12/08 18:19:07 EST BEGIN swinstall SESSION
(non-interactive) (jobid=rx26-154-0079)

* Session started for user "root@rx26-154".

* Beginning Selection
* Target connection succeeded for "rx26-154:/".
ERROR: Could not apply the software selection "PWplus" because there
are no product variations that are compatible with the
destination host(s).
* Software selection failed for
"rx26-154:/var/pwplus-4.0.hpux-ia64.depot".
ERROR: No software has been selected.
ERROR: Cannot continue the "swinstall" task.
* Selection had errors.
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

Can this be because I made this depot file for 11.23 I suppose and trying to install it on 11.31.

But, as long as it is IA 64 this should work?
Dennis Handly
Acclaimed Contributor

Re: Getting error while building a depot file on HP-UX IA64 11.31

>Can this be because I made this depot file for 11.23 I suppose and trying to install it on 11.31?

Very possibly.

>as long as it is IPF this should work?

If you are doing swpackage, you should package it so it works on 11.23 and 11.31.

What does this show for your depot?
swlist -l fileset -a software_spec -a architecture -a machine_type \
-a os_release -s /var/pwplus-4.0.hpux-ia64.depot
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

# swlist -l fileset -a software_spec -a architecture -a machine_type \
> -a os_release -s /var/pwplus-4.0.hpux-ia64.depot
# Initializing...
# Contacting target "rx26-154"...
#
# Target: rx26-154:/var/pwplus-4.0.hpux-ia64.depot
#

# PWplus PWplus,r=4.0.r.0,a=HP-UX_B.11.22_ia64 HP-UX_B.11.22_ia64 * ?.11.2*
PWplus.PWPLUS PWplus.PWPLUS,r=4.0.r.0,a=HP-UX_B.11.22_ia64,fr=4.0.r.0,fa=HP-UX_B.11.22_ia64 HP-UX_B.11.22_ia64 *


How can I make depots for both 11.23 and 11.31?
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

I did upload the package on 11.23 machine to check..

Initial phase passed but analysis phase didnt.. output as below:

# swinstall -s /cvsroot/pwplus-4.0.hpux-ia64.depot PWplus

======= 11/11/08 21:45:07 MST BEGIN swinstall SESSION
(non-interactive) (jobid=cs-rx261-0329)

* Session started for user "root@cs-rx261".

* Beginning Selection
* Target connection succeeded for "cs-rx261:/".
* Source: /cvsroot/pwplus-4.0.hpux-ia64.depot
* Targets: cs-rx261:/
* Software selections:
PWplus.PWPLUS,r=4.0.r.0,a=HP-UX_B.11.22_ia64,fr=4.0.r.0,fa=HP-UX_B.
11.22_ia64
* Selection succeeded.


* Beginning Analysis and Execution
* Session selections have been saved in the file
"/.sw/sessions/swinstall.last".
ERROR: "cs-rx261:/": 1 check scripts failed.
* The analysis phase failed for "cs-rx261:/".
* Analysis and Execution had errors.


NOTE: More information may be found in the agent logfile using the
command "swjob -a log cs-rx261-0329 @ cs-rx261:/".

======= 11/11/08 21:45:13 MST END swinstall SESSION (non-interactive)
(jobid=cs-rx261-0329)

# swjob -a log cs-rx261-0329 @ cs-rx261:/
======= 11/11/08 21:45:07 MST BEGIN install AGENT SESSION (pid=10319)
(jobid=cs-rx261-0329)

* Agent session started for user
"root@cs-rx261.digitalindiasw.net". (pid=10319)

* Beginning Analysis Phase.
* Source:
cs-rx261.digitalindiasw.net:/cvsroot/pwplus-4.0.hpux-ia64.depot

* Target: cs-rx261:/
* Target logfile: cs-rx261:/var/adm/sw/swagent.log
* Reading source for product information.
* Reading source for file information.
ERROR: Cannot execute
"/var/tmp/BAAa10319/catalog/PWplus/PWPLUS/checkinstall".
Command or script output (if any):
No such file or directory (2).
ERROR: The "checkinstall" script for "PWplus.PWPLUS" failed (exit
code "1"). The script location was
"/var/tmp/BAAa10319/catalog/PWplus/PWPLUS/checkinstall".
* This script had errors and the execution of this fileset
cannot proceed until the problem is fixed. Check the above
output from the script for further details.
* Executing preDSA command.

* Summary of Analysis Phase:
ERROR: Exclude PWplus.PWPLUS,r=4.0.r.0
ERROR: 1 of 1 filesets had Errors.
ERROR: The Analysis Phase had errors. See the above output for
details.


======= 11/11/08 21:45:13 MST END install AGENT SESSION (Cancelled)
(pid=10319) (jobid=cs-rx261-0329)
Dennis Handly
Acclaimed Contributor

Re: Getting error while building a depot file on HP-UX IA64 11.31

>How can I make depots for both 11.23 and 11.31?

Well, if you don't care about 11.22 or 11.41, you can just change ?.11.2* to:
B.11.23|B.11.31
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

You mean I execute the below command?

make package.HPUXB11.23|B11.31
Dennis Handly
Acclaimed Contributor

Re: Getting error while building a depot file on HP-UX IA64 11.31

>You mean I execute the below command?

I have no clue of the connection of that command and the os_release entry in the PSF file.

>ERROR: Cannot execute
"/var/tmp/BAAa10319/catalog/PWplus/PWPLUS/checkinstall".

Have you supplied checkinstall with your depot?
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

Yes I have...


# pwd
/opt/pwplus/packaging/PWPLUS
[rx26-154]/opt/pwplus/packaging/PWPLUS
# cat checkinstall
#!/sbin/sh
##############################################################################
# $Id: //pwplus/main/src/packaging/ia64/PWPLUS/checkinstall#1 $
#
# Description: Checkinstall script for PWPLUS fileset.
#
# OS-Release: HP-UX 11.2x
#
# (C) Copyright 1999-2003, Hewlett-Packard, all rights reserved.
##############################################################################

PRODUCT_DIR=${SW_LOCATION%/} # Product location
UTILITIES=/usr/lbin/sw/control_utils # SD utilities

UX_CORE_FILESET="OS-Core.UX-CORE" # UX CORE fileset
PASSWD_CMD=/usr/bin/passwd # passwd command location
PASSWD_CMD_FACT=${PASSWD_CMD}.prepwplus # Factory passwd command

##############################################################################
# Function area
##############################################################################
#
# CheckFileIntegrity():
#
# Check passwd command integrity (size, checksum)
#
CheckFileIntegrity ()
{
typeset PasswdCmd=${1:-missing}
typeset ReturnValue=0 # Anticipate success

# Get original filename of hard-linked file
PasswdCmdsrc=$(swlist -lfile -atype -alink_source $UX_CORE_FILESET |
awk '$1 == "'$PasswdCmd'" {if ($2 == "h" && $3 != "") print $3
else print $1 }')

if [[ -n $PasswdCmdSrc ]]; then
# Get original file size and checksum
SizeOrig=$(swlist -lfile -asize $UX_CORE_FILESET |
awk '$1 == "'$PasswdCmdSrc'" {print $2}')

CheckSumOrig=$(swlist -lfile -acksum $UX_CORE_FILESET |
awk '$1 == "'$PasswdCmdSrc'" {print $2}')

# Get current file size and checksum
Size=$(cksum $PasswdCmd 2>/dev/null | awk '{print $2}')
CheckSum=$(cksum $PasswdCmd 2>/dev/null | awk '{print $1}')

# Check for passwd command
if [[ ! -f $PasswdCmd ]]; then
echo "ERROR: $PasswdCmd does not exist."
ReturnValue=1
fi
# Check file size
if [[ $Size != $SizeOrig ]]; then
echo "ERROR: $PasswdCmd should have size \"$SizeOrig\""
echo " but the actual size is \"$Size\"."
ReturnValue=1
fi
# Check file checksum
if [[ $CheckSum != $CheckSumOrig ]]; then
echo "ERROR: $PasswdCmd should have checksum \"$CheckSumOrig\""
echo " but the actual checksum is \"$CheckSum\"."
ReturnValue=1
fi
else
echo "NOTE: $PasswdCmd integrity cannot be checked because not"
echo " registered in IPD database."
ReturnValue=255
fi

return $ReturnValue
}
# end CheckFileIntegrity

#
# CheckPasswdCmd():
#
# Check passwd command for integrity (size, checksum, permissions)
#
CheckPasswdCmd ()
{
typeset ReturnValue=0 # Anticipate success

# Get current root suid passwd command
Suid0Cmd=$(find $PASSWD_CMD -perm -4000 -user root 2>/dev/null)

# Check for root suid passwd command
if [[ $Suid0Cmd != $PASSWD_CMD ]]; then
echo "ERROR: $PASSWD_CMD should be owned by root and have the suid bit on."
ReturnValue=1
fi

# Check integrity of the passwd and
# eventually passwd.prepwplus commands
CheckFileIntegrity $PASSWD_CMD
RC=$?
if [[ $RC = 255 ]]; then
CheckFileIntegrity $PASSWD_CMD_FACT
RC=$?
fi
[[ $RC = 1 ]] && ReturnValue=1

# Final error message
if [[ $ReturnValue != 0 ]]; then
echo "ERROR: $PASSWD_CMD has been altered. You should consider"
echo " re-installing the \"$UX_CORE_FILESET\" fileset first."
fi

return $ReturnValue
}
# end CheckPasswdCmd


##############################################################################
# MAIN
##############################################################################

ExitValue=0 # Anticipate success
umask 022 # Set reasonable umask

# Source SD utilities
if [[ -f $UTILITIES ]]; then
. $UTILITIES
else
echo "ERROR: Unable to find $UTILITIES"
exit 1
fi

# Check HP-UX revision
if [[ $(uname -r) != ?.11.* ]]; then
echo "ERROR: PWplus is not supported on $(uname -sr)."
exit 1
fi

# Check passwd command for integrity
CheckPasswdCmd
ExitValue=$?

exit $ExitValue
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

shall i do make clean and then make the depots again?
Dennis Handly
Acclaimed Contributor

Re: Getting error while building a depot file on HP-UX IA64 11.31

It isn't obvious where the error is in checkinstall. You'll need to add "-x" to the #!/sbin/sh line.

>shall i do make clean and then make the depots again?

To fix the os_release, yes.
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

why do we need to add "-x"
Ivan Krastev
Honored Contributor

Re: Getting error while building a depot file on HP-UX IA64 11.31

This will give you more information about error during script execution.

regards,
ivan
Dennis Handly
Acclaimed Contributor

Re: Getting error while building a depot file on HP-UX IA64 11.31

>why do we need to add "-x"?

This will help trace checkinstall to find where you are getting that error.
Praving5
Advisor

Re: Getting error while building a depot file on HP-UX IA64 11.31

i am fed up today.. will start tomorrow.. see all guys there... thanks much for all your help today