Cannot perform make install

Stephen Hilton nospam at hiltonbsd.com
Sat Nov 29 10:12:19 PST 2003


On Fri, 28 Nov 2003 13:07:03 +0200
Ion-Mihai Tetcu <itetcu at apropo.ro> wrote:

> On Fri, 28 Nov 2003 09:33:17 +0000
> Matthew Seaman <m.seaman at infracaninophile.co.uk> wrote:
> 
> > On Fri, Nov 28, 2003 at 01:29:17AM +0200, Ion-Mihai Tetcu wrote:
> > 
> > > I think that if you do :
> > > cd / && find /usr/ports/ -type f -name 'readme.html' -exec rm {} \;
> > > and cvsup again you'll get rid of the old directories.
> > 
> > Careful... Make that find command:
> > 
> >     # find /usr/ports -type f -name README.html -exec rm {} \;
> 
> Yeh, I didn'y remenber the upercases and I do not have the readme files in on my system.
>  
> > Pedants may also prefer:
> > 
> >     # find /usr/ports -type f -name README.html -print | xargs rm
> 
> About 1/3 of the orginal time, I think
> 


I use a Python tool included in the cvsup tarball contrib folder called 
cvsupchk to check the "basic sanity" of my src tree.

Here is the shell script I made to automate this process:

----------------------------------------
#!/bin/sh

# mycvsupchk.sh
# Created by Stephen Hilton  nospam at hiltonbsd.com
# Tuned for FreeBSD 4.x, should be adaptable to other *NIX systems.
# Last update: 11-29-2003
# Version: 01.01.00

################################################################################
# All of the documentation and software included in mycvsupchk.sh releases
# is copyrighted by Stephen Hilton.
# Copyright 2003 Stephen Hilton. All rights reserved. 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution. 

# THIS SOFTWARE IS PROVIDED BY STEPHEN HILTON AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL STEPHEN HILTON OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
################################################################################

# mycvsupchk.sh
# requires Python, cvsupchk, and portupgrade if "portsclean -C" is desired.
# execute with "-C" argument to do make cleandir for src and doc
# and to run a "portsclean -C". Yes the "make cleandir" runs twice.

# user defined variables
myprog="/root/bin/cvsupchk.sh"
myprogname=`/usr/bin/basename $0`
mylogf="/tmp/cvsupchk.txt"
srcroot="/usr"
suproot="/usr/sup"

# Function "mylogit" directs a quoted text line to the target file.
# mylogit by itself will add a blank line.
mylogit ()
{
      echo -e "$1" >> $mylogf
}

# clean out the logfile
if [ -f $mylogf ]
  then
      cat </dev/null> $mylogf
fi

# check if cleandir and portsclean is desired.
if [ "x$1" = "x-C" ]
  then
      cd $srcroot/src && make cleandir && make cleandir && \
        mylogit "make cleandir for src ran ok"
      cd $srcroot/doc && make cleandir && make cleandir && \
        mylogit "make cleandir for doc ran ok"
      portsclean -C && \
        mylogit "portsclean -C ran ok"
      mylogit
fi

mylogit "$myprogname results for src-all:"
$myprog -d $srcroot -c $suproot/src-all/checkouts >> $mylogf
mylogit
mylogit

mylogit "$myprogname results for ports-all:"
$myprog -d $srcroot -c $suproot/ports-all/checkouts >> $mylogf
mylogit
mylogit

mylogit "$myprogname results for doc-all:"
$myprog -d $srcroot -c $suproot/doc-all/checkouts >> $mylogf
mylogit

less $mylogf
----------------------------------------


I moved the Python cvsupchk script from the cvsup tarball /contrib 
directory to my /root/bin directory and renamed it cvsupchk.sh

To get the cvsupchk python script:
# cd /usr/ports/net/cvsup
# make extract
# find . -name cvsupchk

Here is a sample of the results from a run:
----------------------------------------
daggar># mycvsupchk.sh
cvsupchk results for src-all:
EXTRA: /usr/src/sys/i386/conf/DAGGAR
EXTRA: /usr/src/sys/i386/conf/DAGGAR.old
 
 
cvsupchk results for ports-all:
EXTRA: /usr/ports/dns/bind9-dlz/Makefile.inc
EXTRA: /usr/ports/dns/powerdns/Makefile.inc
EXTRA: /usr/ports/net/samba/Makefile.inc
EXTRA: /usr/ports/INDEX
EXTRA: /usr/ports/distfiles
EXTRA: /usr/ports/INDEX.txt
EXTRA: /usr/ports/INDEX.db

 
cvsupchk results for doc-all:
 
daggar>#
----------------------------------------

I use a refuse file for the INDEX's during the ports tree cvsup then 
create the index's including INDEX.txt and INDEX.db for portupgrade. 
The ports "Makefile.inc" files seem to appear after a `make index` 
from a clean ports tree.

This process provides _NO_ file version or integrity checking, but 
helps to identify missing or extra files in the src trees. I only 
have a dial-up connection at my home-office, so just wiping a src 
tree and re-downloading is painfull ;-) so this tool has helped clean 
up cruft etc... in the past for me.

HTH,


Regards,


Stephen Hilton
nospam at hiltonbsd.com


More information about the freebsd-questions mailing list