Package: pbuilder
Version: 0.196
Severity: normal
File: /usr/bin/pdebuild

I just took a pdebuil/pbuilder example configuration from Ubuntu that caters to
most of the distributions. I am attaching the config also.


The config, when used with cowbuilder, resolves the variable names correctly 
but when
used with pdebuild fails. I am not very sure if it is a bug or not.
I have done all the check I could think of but can not find a reason why this 
error is
happening.

In pdebuild:

dpkg-buildpackage: source only, diff-only upload (original source NOT included)
 -> Copying COW directory
  forking: rm -rf "/tmp/cowbuilder/build/"/cow.20641
  forking: cp -al "/var/cache/pbuilder/$NAME-base.cow/" 
"/tmp/cowbuilder/build/"/cow.20641
cp: cannot stat `"/var/cache/pbuilder/$NAME-base.cow/"': No such file or 
directory
Failed cowcopy.


Where as in cowbuilder:

 -> Copying COW directory                                                       
                       
  forking: rm -rf /tmp/cowbuilder/build//cow.16346                              
                       
  forking: cp -al /var/cache/pbuilder/lenny-amd64-base.cow/ 
/tmp/cowbuilder/build//cow.16346           
I: removed stale ilistfile /tmp/cowbuilder/build//cow.16346/.ilist              
                       
 -> Invoking pbuilder                                                           
                       
  forking: pbuilder login --buildplace /tmp/cowbuilder/build//cow.16346 
--no-targz --internal-chrootexec chroot /tmp/cowbuilder/build//cow.16346 
cow-shell                                                      


All I can make out is that when dpkg-buildpackage calls it, it is not able to 
resolve $NAME where as when cowbuilder calls it, it is able to resolve $NAME 
properly. Thus I think that it might be a pbuilder/dpkg-buildpackage bug. maybe.


I am attaching the full logs and the pbuilderrc file

Regards,
Ritesh


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pbuilder depends on:
ii  coreutils                     7.4-2      The GNU core utilities
ii  debconf [debconf-2.0]         1.5.28     Debian configuration management sy
ii  debianutils                   3.2.2      Miscellaneous utilities specific t
ii  debootstrap                   1.0.20     Bootstrap a basic Debian system
ii  wget                          1.12-1.1   retrieves files from the web

Versions of packages pbuilder recommends:
ii  devscripts                    2.10.61    scripts to make the life of a Debi
ii  fakeroot                      1.14.4-1   Gives a fake root environment
ii  sudo                          1.7.2p1-1  Provide limited super user privile

Versions of packages pbuilder suggests:
ii  cowdancer                     0.61       Copy-on-write directory tree utili
pn  gdebi-core                    <none>     (no description available)
pn  pbuilder-uml                  <none>     (no description available)

-- debconf information:
* pbuilder/mirrorsite: http://ftp.debian.org/debian/
  pbuilder/nomirror:
* pbuilder/rewrite: false
17:59:51 r...@champaran:/tmp/DebSources/open-iscsi-2.0.870~rc3 $ sudo 
DIST=lenny cowbuilder --login     
 -> Copying COW directory                                                       
                       
  forking: rm -rf /tmp/cowbuilder/build//cow.16346                              
                       
  forking: cp -al /var/cache/pbuilder/lenny-amd64-base.cow/ 
/tmp/cowbuilder/build//cow.16346           
I: removed stale ilistfile /tmp/cowbuilder/build//cow.16346/.ilist              
                       
 -> Invoking pbuilder                                                           
                       
  forking: pbuilder login --buildplace /tmp/cowbuilder/build//cow.16346 
--no-targz --internal-chrootexec chroot /tmp/cowbuilder/build//cow.16346 
cow-shell                                                      
#BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"                                   
                        
# Optionally, set BASEPATH (and not BASETGZ) if using cowbuilder                
                        
BASEPATH="/var/cache/pbuilder/$NAME-base.cow/"                                  
                        
++++ BASEPATH=/var/cache/pbuilder/lenny-amd64-base.cow/                         
                        
DISTRIBUTION="$DIST"                                                            
                        
++++ DISTRIBUTION=lenny                                                         
                        
BUILDRESULT="/var/cache/pbuilder/$NAME/result/"                                 
                        
++++ BUILDRESULT=/var/cache/pbuilder/lenny-amd64/result/                        
                        
#APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"                                 
                        
BUILDPLACE="/tmp/cowbuilder/build/"                                             
                        
++++ BUILDPLACE=/tmp/cowbuilder/build/                                          
                        

if $(echo ${debian_suit...@]} | grep -q $DIST); then
    # Debian configuration                          
    MIRRORSITE="http://$DEBIAN_MIRROR/debian/";      
    COMPONENTS="main contrib non-free"              
    # This is for enabling backports for the Debian stable suite.
    if $(echo "$STABLE_CODENAME stable" | grep -q $DIST); then   
        EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring"  
        OTHERMIRROR="$OTHERMIRROR | deb http://www.backports.org/debian 
$STABLE_BACKPORTS_SUITE $COMPONENTS"                                            
                                                        
fi                                                                              
                        
set +vx                                                                         
                        

elif $(echo ${ubuntu_suit...@]} | grep -q $DIST); then
    # Ubuntu configuration                            
    MIRRORSITE="http://$UBUNTU_MIRROR/ubuntu/";        
    COMPONENTS="main restricted universe multiverse"  
else                                                  
    echo "Unknown distribution: $DIST"                
    exit 1                                            
fi                                                    
echo ${debian_suit...@]} | grep -q $DIST)             
echo ${debian_suit...@]} | grep -q $DIST)             
echo ${debian_suit...@]} | grep -q $DIST              
+++++ grep -q lenny                                   
+++++ echo sid squeeze lenny unstable testing stable  
++++ MIRRORSITE=http://ftp.debian.org/debian/         
++++ COMPONENTS='main contrib non-free'               
echo "$STABLE_CODENAME stable" | grep -q $DIST)       
echo "$STABLE_CODENAME stable" | grep -q $DIST        
+++++ echo 'lenny stable'                             
+++++ grep -q lenny
++++ EXTRAPACKAGES='aptitude debian-backports-keyring'
++++ OTHERMIRROR=' | deb http://www.backports.org/debian lenny-backports main 
contrib non-free'
++++ set +vx
I: Running in no-targz mode
I: copying local configuration
I: mounting /proc filesystem
I: mounting /dev/pts filesystem
I: mounting selinux filesystem
I: policy-rc.d already exists
I: Obtaining the cached apt archive contents
I: entering the shell
r...@champaran:/# cat /etc/debian_version
5.0.4
r...@champaran:/# exit
logout
I: Copying back the cached apt archive contents
I: unmounting selinux filesystem
I: unmounting dev/pts filesystem
I: unmounting proc filesystem
 -> Cleaning COW directory
  forking: rm -rf /tmp/cowbuilder/build//cow.16346







18:01:17 r...@champaran:/tmp/DebSources/open-iscsi-2.0.870~rc3 $ DIST=lenny 
pdebuild            
#BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"                                   
               
# Optionally, set BASEPATH (and not BASETGZ) if using cowbuilder                
               
BASEPATH="/var/cache/pbuilder/$NAME-base.cow/"                                  
               
++++ BASEPATH=/var/cache/pbuilder/lenny-amd64-base.cow/                         
               
DISTRIBUTION="$DIST"                                                            
               
++++ DISTRIBUTION=lenny                                                         
               
BUILDRESULT="/var/cache/pbuilder/$NAME/result/"                                 
               
++++ BUILDRESULT=/var/cache/pbuilder/lenny-amd64/result/                        
               
#APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"                                 
               
BUILDPLACE="/tmp/cowbuilder/build/"                                             
               
++++ BUILDPLACE=/tmp/cowbuilder/build/                                          
               

if $(echo ${debian_suit...@]} | grep -q $DIST); then
    # Debian configuration                          
    MIRRORSITE="http://$DEBIAN_MIRROR/debian/";      
    COMPONENTS="main contrib non-free"              
    # This is for enabling backports for the Debian stable suite.
    if $(echo "$STABLE_CODENAME stable" | grep -q $DIST); then   
        EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring"  
        OTHERMIRROR="$OTHERMIRROR | deb http://www.backports.org/debian 
$STABLE_BACKPORTS_SUITE $COMPONENTS"                                            
                                                        
fi                                                                              
                        
set +vx                                                                         
                        

elif $(echo ${ubuntu_suit...@]} | grep -q $DIST); then
    # Ubuntu configuration                            
    MIRRORSITE="http://$UBUNTU_MIRROR/ubuntu/";        
    COMPONENTS="main restricted universe multiverse"  
else                                                  
    echo "Unknown distribution: $DIST"                
    exit 1                                            
fi                                                    
echo ${debian_suit...@]} | grep -q $DIST)             
echo ${debian_suit...@]} | grep -q $DIST)             
echo ${debian_suit...@]} | grep -q $DIST              
+++++ grep -q lenny                                   
+++++ echo sid squeeze lenny unstable testing stable  
++++ MIRRORSITE=http://ftp.debian.org/debian/         
++++ COMPONENTS='main contrib non-free'               
echo "$STABLE_CODENAME stable" | grep -q $DIST)       
echo "$STABLE_CODENAME stable" | grep -q $DIST        
+++++ grep -q lenny                                   
+++++ echo 'lenny stable'                             
++++ EXTRAPACKAGES='aptitude debian-backports-keyring'
++++ OTHERMIRROR=' | deb http://www.backports.org/debian lenny-backports main 
contrib non-free'
++++ set +vx                                                                    
               
dpkg-checkbuilddeps: Unmet build dependencies: bison flex                       
               
W: Unmet build-dependency in source                                             
               
dpkg-buildpackage: set CFLAGS to default value: -g -O2                          
               
dpkg-buildpackage: set CPPFLAGS to default value:                               
               
dpkg-buildpackage: set LDFLAGS to default value:                                
               
dpkg-buildpackage: set FFLAGS to default value: -g -O2                          
               
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2                        
               
dpkg-buildpackage: source package open-iscsi                                    
               
dpkg-buildpackage: source version 2.0.870~rc3-0.4.1                             
               
dpkg-buildpackage: source changed by Ritesh Raj Sarraf <r...@researchut.com>    
                
dpkg-checkbuilddeps: Unmet build dependencies: bison flex                       
               
dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting. 
               
dpkg-buildpackage: warning: (Use -d flag to override.)                          
               
dpkg-buildpackage: warning: This is currently a non-fatal warning with -S, but  
               
dpkg-buildpackage: warning: will probably become fatal in the future.           
               
 fakeroot debian/rules clean                                                    
               
dh_testdir                                                                      
               
dh_testroot                                                                     
               
rm -f build-arch-stamp build-indep-stamp configure-stamp                        
               
# Add here commands to clean up after the build process.                        
               
/usr/bin/make -C utils/fwparam_ibft clean                                       
               
make[1]: Entering directory 
`/tmp/DebSources/open-iscsi-2.0.870~rc3/utils/fwparam_ibft'        
rm -f *.o fwparam_ibft.o fw_entry.o prom_lex.o prom_parse.tab.o fwparam_ppc.o 
*.output *~ .depend
make[1]: Leaving directory 
`/tmp/DebSources/open-iscsi-2.0.870~rc3/utils/fwparam_ibft'           
/usr/bin/make -C usr clean                                                      
                 
make[1]: Entering directory `/tmp/DebSources/open-iscsi-2.0.870~rc3/usr'        
                 
rm -f *.o iscsid iscsiadm iscsistart .depend                                    
                 
make[1]: Leaving directory `/tmp/DebSources/open-iscsi-2.0.870~rc3/usr'         
                 
/usr/bin/make -C utils clean                                                    
                 
make[1]: Entering directory `/tmp/DebSources/open-iscsi-2.0.870~rc3/utils'      
                 
rm -f *.o iscsi-iname .depend
make[1]: Leaving directory `/tmp/DebSources/open-iscsi-2.0.870~rc3/utils'
rm -rf modules
dh_clean
dh_clean: Compatibility levels before 5 are deprecated.
 dpkg-source -b open-iscsi-2.0.870~rc3
dpkg-source: info: using source format `1.0'
dpkg-source: info: building open-iscsi using existing 
open-iscsi_2.0.870~rc3.orig.tar.gz
dpkg-source: info: building open-iscsi in open-iscsi_2.0.870~rc3-0.4.1.diff.gz
dpkg-source: warning: the diff modifies the following upstream files:
 utils/iscsi_discovery
dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented 
changes to upstream files, see dpkg-source(1)
dpkg-source: info: building open-iscsi in open-iscsi_2.0.870~rc3-0.4.1.dsc
 dpkg-genchanges -S >../open-iscsi_2.0.870~rc3-0.4.1_source.changes
dpkg-genchanges: not including original source code in upload
dpkg-buildpackage: source only, diff-only upload (original source NOT included)
 -> Copying COW directory
  forking: rm -rf "/tmp/cowbuilder/build/"/cow.20641
  forking: cp -al "/var/cache/pbuilder/$NAME-base.cow/" 
"/tmp/cowbuilder/build/"/cow.20641
cp: cannot stat `"/var/cache/pbuilder/$NAME-base.cow/"': No such file or 
directory
Failed cowcopy.
#
DEBEMAIL="Ritesh Raj Sarraf <r...@researchut.com>"
PBUILDERROOTCMD=sudo
DEBOOTSTRAPOPTS[0]='--variant=buildd'
PKGNAME_LOGFILE=yes
BUILDSOURCEROOTCMD=fakeroot
BUILDUSERID=1234
PDEBUILD_PBUILDER=cowbuilder
APTCACHE=/var/cache/apt/archives
COMPONENTS="main contrib non-free"
#REMOVEPACKAGES="debian-archive-keyring, gpgv, gnupg"


# Codenames for Debian suites according to their alias. Update these when
# needed.
UNSTABLE_CODENAME="sid"
TESTING_CODENAME="squeeze"
STABLE_CODENAME="lenny"
STABLE_BACKPORTS_SUITE="$STABLE_CODENAME-backports"

# List of Debian suites.
DEBIAN_SUITES=($UNSTABLE_CODENAME $TESTING_CODENAME $STABLE_CODENAME
    "unstable" "testing" "stable")

# List of Ubuntu suites. Update these when needed.
UBUNTU_SUITES=("lucid" "karmic" "jaunty" "intrepid" "hardy")

# Mirrors to use. Update these to your preferred mirror.
DEBIAN_MIRROR="ftp.debian.org"
UBUNTU_MIRROR="mirrors.kernel.org"

# Optionally use the changelog of a package to determine the suite to use if
# none set.
if [ -z "${DIST}" ] && [ -r "debian/changelog" ]; then
    DIST=$(dpkg-parsechangelog | awk '/^Distribution: / {print $2}')
    # Use the unstable suite for certain suite values.
    if $(echo "experimental UNRELEASED" | grep -q $DIST); then
        DIST="$UNSTABLE_CODENAME"
    fi
fi

# Optionally set a default distribution if none is used. Note that you can set
# your own default (i.e. ${DIST:="unstable"}).
: ${DIST:="$(lsb_release --short --codename)"}

# Optionally change Debian release states in $DIST to their names.
case "$DIST" in
    unstable)
        DIST="$UNSTABLE_CODENAME"
        ;;
    testing)
        DIST="$TESTING_CODENAME"
        ;;
    stable)
        DIST="$STABLE_CODENAME"
        ;;
esac

# Optionally set the architecture to the host architecture if none set. Note
# that you can set your own default (i.e. ${ARCH:="i386"}).
: ${ARCH:="$(dpkg --print-architecture)"}
NAME="$DIST"
if [ -n "${ARCH}" ]; then
    NAME="$NAME-$ARCH"
    DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${debootstrapop...@]}")
fi

set -vx
#BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"
# Optionally, set BASEPATH (and not BASETGZ) if using cowbuilder
BASEPATH="/var/cache/pbuilder/$NAME-base.cow/"
DISTRIBUTION="$DIST"
BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
#APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"
BUILDPLACE="/tmp/cowbuilder/build/"

if $(echo ${debian_suit...@]} | grep -q $DIST); then
    # Debian configuration
    MIRRORSITE="http://$DEBIAN_MIRROR/debian/";
    COMPONENTS="main contrib non-free"
    # This is for enabling backports for the Debian stable suite.
    if $(echo "$STABLE_CODENAME stable" | grep -q $DIST); then
        EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring"
        OTHERMIRROR="$OTHERMIRROR | deb http://www.backports.org/debian 
$STABLE_BACKPORTS_SUITE $COMPONENTS"
fi
set +vx

elif $(echo ${ubuntu_suit...@]} | grep -q $DIST); then
    # Ubuntu configuration
    MIRRORSITE="http://$UBUNTU_MIRROR/ubuntu/";
    COMPONENTS="main restricted universe multiverse"
else
    echo "Unknown distribution: $DIST"
    exit 1
fi

Reply via email to