bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"mkdir -p" in Makefile fails with installwatch of checkinstall in Mandri


From: vatbier
Subject: "mkdir -p" in Makefile fails with installwatch of checkinstall in Mandriva 2009.0
Date: Thu, 23 Oct 2008 09:07:24 -0700 (PDT)

Description of problem:
Mandriva 2009.0.
I use checkinstall to make an .rpm of x11vnc-0.9.4
(http://www.karlrunge.com/x11vnc/ ):
./configure
make
checkinstall
Checkinstall fails because  the command "mkdir -p" in a Makefile fails with 
installwatch of checkinstall.

Output of checkininstall:
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
  /usr/bin/install -c 'x11vnc' '/usr/local/bin/x11vnc'
test -z "/usr/local/man/man1" || mkdir -p -- "/usr/local/man/man1"
mkdir: cannot create directory "/usr/local/man": No such file or directory
make[3]: *** [install-man1] Error 1

Building an .rpm of x11vnc-0.9.4 in Mandriva 2008.1 with checkinstall succeeds.
Checkinstall in 2009 is the same version as the one in 2008.1 (version 1.6.1) 
although the changelog indicates a new %Buildroot but that's not the cause I 
think.

The failing Makefile is /home/vatbier/Documents/x11vnc-0.9.4/x11vnc/Makefile :
install-man1: $(man1_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
        test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
        @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \

The script /usr/bin/checkinstall calls the script /usr/bin/installwatch:
$INSTALLWATCH --logfile=${TMP_DIR}/newfiles.tmp --exclude="${IEXCLUDE}" \
   --root=${TMP_DIR} --transl=${TRANSLATE} --backup=${BACKUP} --dbglvl=$DEBUG\
   $TMP_SCRIPT 2>&1

I ran this command myself with:
installwatch --logfile=/home/vatbier/test2/newfiles.tmp
--exclude="/home/vatbier/Documents/x11vnc-0.9.4,/dev,/proc,/tmp,/var/tmp" \
   --root=/home/vatbier/test2 --transl=1 --backup=1 --dbglvl=2 \
   /home/vatbier/test2/installscript.sh 2>&1
The output is the same as the faulty output of checkinstall.

The installwatch script has this:
LD_PRELOAD=/usr/lib/checkinstall/installwatch.so
export LD_PRELOAD

I made two simplified scripts to replace the installwatch script (see
attachments):
MakeInstallWithInstallwatch :
cd /home/vatbier/Documents/x11vnc-0.9.4
...
LD_PRELOAD=/usr/lib/checkinstall/installwatch.so
export LD_PRELOAD
make install
...

MakeInstallWithInstallwatch2008_1 :
...
# use the installwatch.so of Mandriva 2008.1 instead of the one of Mandriva
2009
LD_PRELOAD=/mnt/sda5/usr/lib/checkinstall/installwatch.so
...

Both scripts give the same fail of above.

For some reason "mkdir -p" in a Makefile fails with installwatch of
checkinstall in 2009.
mkdir: coreutils package of Mandriva 2008.1: version 6.10
       coreutils package of Mandriva 2009:   version 6.12
I assume that either mkdir of 2009 is to blame or that installwatch.so of
checkinstall does something wrong when using mkdir of 2009.
Or maybe the new Linux kernel of 2009 has an effect.

Luckily I can make checkinstall succeed by creating the directories myself
before I run it:
su
mkdir -p /usr/local/man/
mkdir -p /usr/local/share/x11vnc/classes/ssl
exit
checkinstall
and I have my x11vnc-0.9.4.i586.rpm.

Another more difficult way to make it work is to replace "mkdir -p" in the
Makefiles by "mkdir /usr/local/man;mkdir /usr/local/man/man1" :
install-man1: $(man1_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
        #test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
        test -z "/usr/local/man/man1" || mkdir /usr/local/man
        mkdir /usr/local/man/man1       
        @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \

I also used strace:
Change Makefile to:
install-man1: $(man1_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
        test -z "$(man1dir)" || strace -ostrace.txt mkdir -p --
"$(DESTDIR)$(man1dir)"
        @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \

If I do as root "strace -ostraceroot.txt mkdir-p /usr/local/man/man1" I get the
output of the attachment straceroot.txt

Running checkinstall then gives me the output of the attachment strace.txt:
mkdir("/home/vatbier/test2/META/TRANSL/usr/local/man", 0700) = 0
mkdir("/home/vatbier/test2/TRANSL/usr/local/man", 0755) = 0
open("/home/vatbier/test2/newfiles.tmp", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
write(3, "0\tmkdir\t/usr/local/man\t#success\n", 32) = 32
close(3)                                = 0
open("man", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW) =
-1 ENOENT (No such file or directory)
HERE DOES installwatch.so SOMETHING WRONG (IT TRIES TO OPEN /usr/local/man)

I also used strace in Mandriva 2008.1 where checkinstall succeeds and it gave
the output of the attachment strace2008.1.txt:
getcwd("/usr/local", 4097)              = 11
HERE IN MANDRIVA 2008.1 THE COMMAND getcwd IS DONE WHEREAS IN MANDRIVA 2009 A
WRONG "open("man,...)" IS DONE.
stat64("/home/vatbier/tmp/ZqfRkSTXcYMfdJpPGQKKp/META/TRANSL/usr/local/man",
{st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("/home/vatbier/tmp/ZqfRkSTXcYMfdJpPGQKKp/TRANSL/usr/local/man",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/local/man", 0xbfd8f69c)    = -1 ENOENT (No such file or directory)
open("/home/vatbier/tmp/ZqfRkSTXcYMfdJpPGQKKp/TRANSL/usr/local/man",
O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW) = 3
HERE IS AN "open" COMMAND IN THE "TRANSL" DIRECTORY.

I've posted this message also to Mandriva bugzilla: 
https://qa.mandriva.com/show_bug.cgi?id=45236
I will post this message also to the mailing-list of checkinstall:
(http://checkinstall.izto.org/cklist/ )

Version-Release number of selected component (if applicable):
uname -r: 2.6.27-desktop-0.rc8.2mnb
checkinstall-1.6.1-6mdv2009.0
coreutils-6.12-2mdv2009.0

vatbier


      

Attachment: MakeInstallWithInstallwatch
Description: application/shellscript

Attachment: MakeInstallWithInstallwatch2008_1
Description: application/shellscript

Attachment: straceroot.txt
Description: Text document

Attachment: strace.txt
Description: Text document

Attachment: strace2008.1.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]