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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-24-2003, 03:31 AM
|
#1
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
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 03:32 AM.
|
|
|
07-24-2003, 06:26 AM
|
#2
|
Member
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909
Rep:
|
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.
|
|
|
07-24-2003, 08:40 AM
|
#3
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Original Poster
Rep: 
|
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 02:04 AM.
|
|
|
07-24-2003, 09:37 AM
|
#4
|
Member
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909
Rep:
|
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
|
|
|
07-24-2003, 09:42 AM
|
#5
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Original Poster
Rep: 
|
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...
|
|
|
07-25-2003, 01:51 AM
|
#6
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Original Poster
Rep: 
|
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 02:07 AM.
|
|
|
07-25-2003, 07:30 AM
|
#7
|
Member
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909
Rep:
|
2>&1 means both the stdout,stderr.
$? :Stores the exit value of the last command that was executed.
|
|
|
07-25-2003, 07:44 AM
|
#8
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Original Poster
Rep: 
|
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.
|
|
|
07-28-2003, 02:34 AM
|
#9
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Original Poster
Rep: 
|
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?
|
|
|
08-11-2003, 05:43 AM
|
#10
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Original Poster
Rep: 
|
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.
|
|
|
08-11-2003, 05:50 AM
|
#11
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
08-11-2003, 06:36 AM
|
#12
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Original Poster
Rep: 
|
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. 
|
|
|
All times are GMT -5. The time now is 08:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|