LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-24-2003, 04:31 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Rep: Reputation: Disabled
Installing Checkinstall -> error


I tried to install checkinstall last night. "make" went with no problems, "make install" as well. Then "checkinstall" expired on me with:
Code:
 checkinstall 1.5.3, Copyright 2001 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.

Installing with "make install"...

========================= Installation results ===========================
Copying documentation directory...
****  Installation failed. Aborting package creation.
Restoring overwritten files from backup... FAILED!
Cleaning up...OK
Bye.
I tried to understand the script generating the messages but I have not enough experience to understand, where the variables in a bash script are assigned their values, so I failed to see what went wrong. I also searched this forum, to no avail. Can somebody help me out, please?

[edited] Yes, /tmp and /var/tmp have the necessary permissions (1777 and 0700).

Last edited by JZL240I-U; 07-24-2003 at 04:32 AM.
 
Old 07-24-2003, 07:26 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
read the install part of the makefile, and if you know what you are looking for ,give that part here.
stderr said copying documentation directory,
So my guess is that make was trying to copy the documentation on the nonexistent directory,so create the directory.I wish I could read the makefile before I could go further,but right now I am blank.
 
Old 07-24-2003, 09:40 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Original Poster
Rep: Reputation: Disabled
A documentation directory "DOC-BAK" is there, with 7 or 8 files in it. Here is the script (abbreviated, errors from the very end):
Code:
#!/bin/sh
##############################################################################
#         $Id: checkinstall,v 1.5.3.7 2002/09/11 04:30:11 izto Exp $ 
...
                           # Function definitions #
...
function cleanup {
 echo
 restore_backup
 echo -n "Cleaning up..."
 cd "$DIRECTORIO_FUENTE"
 rm -rf ${TMP_DIR}
 rm -f "$BUILDROOT"
 rm -f checkinstall-debug*
 true; okfail
 echo
 echo "Bye."
 echo
 exit 1
}

                      #################################
                      # Function definition ends here #
...
# Arguments parsing

CKNAME=`basename $0`
PARAMS=`getopt -a -n $CKNAME -o +d:DA:t:RShHy -l arch:,type:,si,showinstall::,ss,showslack::,deldoc::,delspec::,deldesc::,strip::,stripso::,gzman::,bk,backup::,autodoinst::,spec:,exclude:,pkgname:,pkgversion:,pkgrelease:,pkglicense:,pkggroup:,pkgsource:,pkgaltsource:,pakdir:,docdir:,provides:,maintainer:,dpkgflags:,rpmflags:,pkgarch:,umask:,newslack,help,nodoc,version,copyright,default -- "$@"`
...
Copyright (C) 2001 Felipe Eduardo Sanchez Diaz Duran <izto@asic-linux.com.mx>
...
...
# End of argument parsing
...
                   # We initialize some useful variables #
# User-configurable variables were moved to the checkinstallrc #
# file which is probably found at /usr/local/lib/checkinstall  #          
#                  DO NOT modify them here!!                   #
INSTALLWATCH_PREFIX="/usr/local"
INSTALLWATCH=${INSTALLWATCH_PREFIX}/bin/installwatch

...
# Automatic deletion of "doc-pak" upon termination
! [ "$DEL_DOCPAK" ] && DEL_DOCPAK=1
...
...
MAKEPKG=/usr/local/sbin/makepak
INSTALLCMD="$@"
: ${INSTALLCMD:='make install'}


                      #################################
                      # Variable definition ends here #
...
if [ ! -x $INSTALLWATCH ]; then
   echo
   echo "I can't find $INSTALLWATCH."
...
# Set the umask. If not specified with "--umask" then we'll use 0022, a 
# standard, non-paranoid reasonable value.
...
# Find a safe TMP_DIR

TMP_DIR=${BASE_TMP_DIR}/`awk 'BEGIN { srand(); for (i=1;i<21;i++) { a=95; while (a > 90 && a < 97) { a=65+int(50*rand())}; printf("%c", a) } }'`
[ -e "$TMP_DIR" ] && rm -rf $TMP_DIR
if [ -e "$TMP_DIR" ]; then 
   echo
   echo "My temp dir exists already."
   echo "This looks like a symlink attack!"
   echo 
   echo "*** Aborting"
   echo
   exit 1
fi

if [ "$TMP_DIR" = "$BASE_TMP_DIR" -o "$TMP_DIR" = "/" ]; then
  echo 
  echo "\"$TMP_DIR\" is an unacceptable value for the temp dir. Please"
  echo "edit the variable definition for $TMP_DIR and try again."
  echo
  echo "*** Aborting"
  echo
  exit 1
fi


mkdir $TMP_DIR
chmod 700 $TMP_DIR
RETURN=$?

if [ $RETURN -gt 0 ]; then
   echo
   echo "**** Failed to create temp dir!"
   echo "**** Do you have write permission for ${BASE_TMP_DIR}?"
   echo
   echo '**** Aborting installation.'
   echo
   exit  $RETURN
fi

...
# We run the program installation from the source directory       
...
TMP_SCRIPT=${TMP_DIR}/installscript.sh

cat << EOF > $TMP_SCRIPT
#!/bin/sh
...
# Run the install command, showing the results interactively if we were asked
# to do so in the configuration section (see the SHOW_INSTALL switch above)
INSTALL_FAILED=0
if [ $SHOW_INSTALL -eq 0 ]; then
   $INSTALLWATCH -o /${TMP_DIR}/newfiles.tmp $TMP_SCRIPT &> /${TMP_DIR}/install.log
   okfail
   INSTALL_FAILED=$?
   unset INSTALLWATCH_BACKUP_PATH
else
   echo
   echo
   echo "========================= Installation results ==========================="
   $INSTALLWATCH -o /${TMP_DIR}/newfiles.tmp $TMP_SCRIPT 2>&1 
   if [ $? -eq 0 ]; then 
      echo
      echo "======================== Installation succesful =========================="
   else        
      INSTALL_FAILED=1
   fi
fi

unset INSTALLWATCH_BACKUP_PATH

unset LD_PRELOAD


VIEWLOG="n"
if [ $INSTALL_FAILED -gt 0 ]; then 
   echo
   echo "****  Installation failed. Aborting package creation."
   VIEWLOG="y"
fi

if [ $SHOW_INSTALL -eq 0 ]; then
   echo
   echo -n "Do you want to view the installation log file? "

   if  yorn $VIEWLOG ; then

      (echo
       echo ' ***************************************************************'
       echo '         Installation results. You can find them in'
       echo "       ${TMP_DIR}/install.log"
       echo ' ***************************************************************'
       echo
       cat /${TMP_DIR}/install.log)  | less
   fi
fi

if [ $INSTALL_FAILED -gt 0 ]; then 
   cleanup
   exit $INSTALL_FAILED
fi
.
.
.
Edited: I threw out a lot of what I think is not pertinent to the problem,
shown with "..." where I deleted something.
I hope it is better readable now,
and I also hope there is everything necessary, though I'm not sure .

Last edited by JZL240I-U; 07-25-2003 at 03:04 AM.
 
Old 07-24-2003, 10:37 AM   #4
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
I went through the long script,could you tell me what are the options that you gave to the script!
try
checkinstall -h
and
checkinstall --usage
 
Old 07-24-2003, 10:42 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Original Poster
Rep: Reputation: Disabled
I'll do that as soon as I am home. The error messages were generated at the end of the script-fragment I posted where it says:
echo "========================= Installation results ==========================="
just above that is the part with BACKUP_PATH, which I didn't understand, since I don't understand where the variables get there values...
 
Old 07-25-2003, 02:51 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Original Poster
Rep: Reputation: Disabled
First, this is the install-run, where chechinstall checks its own installatiion. The README mentioned no options and I gave none. Checkinstall -h gives just the options from the top of the script, Checkinstall --usage won't work.

Part of the variables are loaded at another file "checkinstallrc". But I found the possible location of the cause of the error:
Code:
$INSTALLWATCH -o /${TMP_DIR}/newfiles.tmp $TMP_SCRIPT 2>&1 
if [ $? -eq 0 ]; then 
echo
echo "======================== Installation succesful =========================="
else 
INSTALL_FAILED=1
The bold line is where the error occurs.
$INSTALLWATCH: /usr/local/bin/installwatch
Okay, exists.

${TMP_DIR}: /var/tmp/[randomly_generated_name_of_directory]
The part with random generation of a name is a guess.

$TMP_SCRIPT: /var/tmp/[randomly_generated_name_of_directory]/installscript.sh
Does not exist.

Now what?

What does "2>&1" do? How or where gets "$?" in the if-statement its value? Heeelp, bash-gurus...

Last edited by JZL240I-U; 07-25-2003 at 03:07 AM.
 
Old 07-25-2003, 08:30 AM   #7
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
2>&1 means both the stdout,stderr.
$? :Stores the exit value of the last command that was executed.
 
Old 07-25-2003, 08:44 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Original Poster
Rep: Reputation: Disabled
Quote:
Originally posted by rch
2>&1 means both the stdout,stderr.
Meaning, the output from $TMP_SCRIPT gets dumped to /dev/null I take it. Hm. Should I try and delete "2>&1" from the script to get possibly some information?

Then installwatch terminates with an undefined and thus unsolvable error. Sh*t.

This is checkinstall 1.5.3 (stable), thus it must be something in my installation ... I hate to give up ... What now?

Thanks for staying with me, rch.
 
Old 07-28-2003, 03:34 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Original Poster
Rep: Reputation: Disabled
Still unsolved .

But I did a "make clean" and then redid "make" and "make install" (no ./configure necessary). And yes, after running checkinstall for the first time there is a randomly (?) generated directory under /var/tmp/ so that's confirmed.

But "installscript.sh" is not there and I don't find it in the package. Might it be created during the checkinstall run? Ideas, anybody?
 
Old 08-11-2003, 06:43 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Original Poster
Rep: Reputation: Disabled
Quote:
Originally posted by JZL240I-U
... this is the install-run, where checkinstall checks its own installation ...
Yeah. Should have read that posting myself. Problem is solved, I write this only so others may avoid my own stupidity .

Resolution: su, <password> checkinstall -> installation complete without errors.

This is checkinstall's installation for goodness sake, and I simply didn't realize, that it has to be done as root ... Well, I sure hope that will teach me ... But now it works .

Thanks again, rch.
 
Old 08-11-2003, 06:50 AM   #11
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Wow you guys were transcribing coordinates to a Physicists lab in a galaxy several light years from here, and it comes down to su -.



I love it when that happens to me, I feel that if anything ever goes wrong with that app now, that I can conquer it with very little qualm



Cool
 
Old 08-11-2003, 07:36 AM   #12
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Original Poster
Rep: Reputation: Disabled
Hehe, but you see what it did to me . I even started a thread about learning bash scripting, and in time, in time I will learn.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Prob installing checkinstall in lfs donbellioni Linux - Software 3 11-04-2010 02:42 AM
checkinstall error : *** The "rpm" program is not in your PATH! logicalfuzz Linux - Software 2 09-11-2005 07:40 AM
Checkinstall Installing to Wrong Home Dir Kenji Miyamoto Slackware 3 05-25-2005 09:21 AM
Checkinstall error kater Slackware 6 01-08-2005 03:12 AM
Using 'checkinstall' gonzalo76 Slackware 20 05-20-2004 07:09 PM


All times are GMT -5. The time now is 08:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration