I've gotten my ``build-simple-cdd'' script working again
Hi Vagrant,
It turns out that the first time around I was running in my locally mounted
private directory and all was fine. When I tried to set up the build for
my co-workers, I used shared directories because that's how we all share
our work. Unfortunately, the build-simple-cdd script must run as real
root and not fakeroot. That means that my NFS directories were trying
to manipulate files as "nobody" and that was not working. The symptom
was that packages were reported missing, a la:
ERROR: missing required packages from profile default: less
and the truth was that deeply buried in nested layers of shell/python/perl/make
script files was a failure saying "permission denied". To find that message
I had to run scripts with ``set -x'' and run make with verbose output.
Attached is a patch to 0.3.5 source that makes no change other than:
* is a little more readable
* is a little more debuggable when ``set -x'' is active
(the ``:'' command shows up in stderr output)
Please discard or adopt, at your choice.
Thank you for the project, by the way. Did save me a fair amount of trouble.
Cheers - Bruce
=== modified file 'FAQ'
--- FAQ 2005-10-20 21:57:39 +0000
+++ FAQ 2007-10-19 14:54:22 +0000
@@ -46,3 +46,11 @@
avoid installing exim4. simply installing another MTA should remove exim4, so
if you include it in one of the profile's .packages, you should end up with the
MTA you want.
+
+
+Q: I get messages saying that certain packages are not found, but
+ I know that they are in my mirror directory. What is going on?
+
+A: Both the build and the package mirroring directory hierarchies
+ must be writable by root. If one of these is an NFS mount with
+ root access converted to "nobody" access, you may have difficulties.
=== modified file 'tools/mirror/reprepro'
--- tools/mirror/reprepro 2007-09-29 23:28:23 +0000
+++ tools/mirror/reprepro 2007-10-19 14:47:08 +0000
@@ -17,87 +17,87 @@
if [ -n "$extra_udeb_dist" ]; then
updates="$updates default-extra-udebs"
fi
- cat << EOF > $conf/distributions
-Codename: $CODENAME
-Architectures: $ARCHES
-UDebComponents: main
-Components: $mirror_components
-Description: mirror for $CODENAME
-Update: $updates
-Suite: ${SUITE:-"stable"}
-EOF
+ cat <<- EOF > $conf/distributions
+ Codename: $CODENAME
+ Architectures: $ARCHES
+ UDebComponents: main
+ Components: $mirror_components
+ Description: mirror for $CODENAME
+ Update: $updates
+ Suite: ${SUITE:-"stable"}
+ EOF
}
generate_updates(){
- cat << EOF > $conf/updates
-Name: default
-Suite: *
-UDebComponents: none
-Method: $debian_mirror
-FilterList: deinstall package-list
-
-Name: default-base
-Suite: *
-UDebComponents: none
-Method: $debian_mirror
-FilterFormula: priority (== required) | priority (== important) | priority (== standard)
-
-Name: default-udebs
-Suite: *
-Components: none
-Method: $debian_mirror
-
-EOF
+ cat <<- EOF > $conf/updates
+ Name: default
+ Suite: *
+ UDebComponents: none
+ Method: $debian_mirror
+ FilterList: deinstall package-list
+
+ Name: default-base
+ Suite: *
+ UDebComponents: none
+ Method: $debian_mirror
+ FilterFormula: priority (== required) | priority (== important) | priority (== standard)
+
+ Name: default-udebs
+ Suite: *
+ Components: none
+ Method: $debian_mirror
+
+ EOF
if [ -n "$security_mirror" ]; then
- cat << EOF >> $conf/updates
-Name: default-security
-Suite: */updates
-UDebComponents: none
-Method: $security_mirror
-FilterList: deinstall package-list
+ cat <<- EOF >> $conf/updates
+ Name: default-security
+ Suite: */updates
+ UDebComponents: none
+ Method: $security_mirror
+ FilterList: deinstall package-list
-EOF
+ EOF
fi
if [ -n "$debian_mirror_extra" ]; then
- cat << EOF >> $conf/updates
-Name: default-extra
-Suite: *
-UDebComponents: none
-Components: $mirror_components_extra
-Method: $debian_mirror_extra
-FilterList: deinstall package-list
+ cat <<- EOF >> $conf/updates
+ Name: default-extra
+ Suite: *
+ UDebComponents: none
+ Components: $mirror_components_extra
+ Method: $debian_mirror_extra
+ FilterList: deinstall package-list
-EOF
+ EOF
fi
if [ "true" = "$proposed_updates" ]; then
- cat << EOF >> $conf/updates
-Name: default-proposed-updates
-Suite: $CODENAME-proposed-updates
-UDebComponents: main
-Method: $debian_mirror
-FilterList: deinstall package-list
+ cat <<- EOF >> $conf/updates
+ Name: default-proposed-updates
+ Suite: $CODENAME-proposed-updates
+ UDebComponents: main
+ Method: $debian_mirror
+ FilterList: deinstall package-list
-EOF
+ EOF
fi
if [ -n "$profiles_udeb_dist" ]; then
- cat << EOF >> $conf/updates
-Name: default-profiles-udeb
-Suite: $profiles_udeb_dist
-Components: none
-FilterFormula: package (== simple-cdd-profiles)
-Method: $debian_mirror
+ cat <<- EOF >> $conf/updates
+ Name: default-profiles-udeb
+ Suite: $profiles_udeb_dist
+ Components: none
+ FilterFormula: package (== simple-cdd-profiles)
+ Method: $debian_mirror
-EOF
+ EOF
fi
if [ -n "$extra_udeb_dist" ]; then
- cat << EOF >> $conf/updates
-Name: default-extra-udebs
-Suite: $extra_udeb_dist
-Components: none
-Method: $debian_mirror
+ cat <<- EOF >> $conf/updates
+ Name: default-extra-udebs
+ Suite: $extra_udeb_dist
+ Components: none
+ Method: $debian_mirror
-EOF
+ EOF
fi
}
@@ -141,24 +141,38 @@
done
done
-# get a list of provides
-provides="$(zgrep ^Provides $upstream_package_lists | cut -d : -f 2 | tr ',' '\n' | sort -u)"
+: get a list of provides
+provides=$(
+ zgrep ^Provides $upstream_package_lists | \
+ cut -d : -f 2 | \
+ tr ',' '\n' | \
+ sort -u)
for i in $(seq $reprepro_retries); do
+ : reprepro_retries number $reprepro_retries
cp $conf/package-list $conf/package-list.old
- dependencies="$(awk -F Depends: '/Depends:/{print $2}' $package_lists | tr '|,' '\n' | awk '{print $1}' | sort -u)"
-
- provide_dependencies="$(providecheck "$provides" "$all_packages $dependencies" | sort -u)"
- if [ -n "$provide_dependencies" ]; then
- for p in $provide_dependencies ; do
- # see if a package already satisfies the provides
- satisfies="$(grep-dctrl -X -n --show-field Package --field Provides --field Package $p $package_lists)"
- if [ -z "$satisfies" ]; then
+ dependencies=$(
+ awk -F Depends: '/Depends:/{print $2}' $package_lists | \
+ tr '|,' '\n' | \
+ awk '{print $1}' | \
+ sort -u)
+
+ provide_dependencies=$(
+ providecheck "$provides" "$all_packages $dependencies" | sort -u)
+
+ for p in $provide_dependencies ; do
+ : see if package $p already satisfies the provides
+ satisfies=$(
+ grep-dctrl -X -n --show-field Package --field Provides \
+ --field Package $p $package_lists)
+ if [ -z "$satisfies" ]; then
# search for other packages that provide the desired features
- dependencies="$dependencies $(zcat $upstream_package_lists | grep-dctrl -X -n --show-field Package --field Provides $p)"
- fi
- done
- fi
+ dependencies="$dependencies "$(
+ zcat $upstream_package_lists | \
+ grep-dctrl -X -n --show-field Package \
+ --field Provides $p)
+ fi
+ done
for p in $dependencies $all_packages ; do
echo $p install
@@ -167,8 +181,9 @@
if diff -q $conf/package-list $conf/package-list.old ; then
echo "no new dependencies, finished in $i attempts."
break
- else
- echo "getting missing dependencies... attempt $i"
- reprepro $reprepro_opts --nolistsdownload --noskipold update
fi
+
+ echo "getting missing dependencies... attempt $i"
+ reprepro $reprepro_opts --nolistsdownload --noskipold update
done
+: reprepro is done
=== modified file 'tools/mirror/wget'
--- tools/mirror/wget 2007-09-07 07:15:05 +0000
+++ tools/mirror/wget 2007-10-17 20:35:53 +0000
@@ -1,10 +1,17 @@
-mkdir -p $MIRROR
+#! /bin/echo this_file_should_be_sourced -*- Mode: shell-script -*-
+
+test -d ${MIRROR} || \
+ mkdir -p $MIRROR || \
+ die "Cannot mkdir ${MIRROR}"
+svdir=${PWD}
+cd ${MIRROR} || die "Cannot cd to ${MIRROR}"
+MIRROR=$(pwd -P)
wget_file_list=""
for file in $mirror_files ; do
wget_file_list="$wget_file_list $wget_debian_mirror/$file"
- sleep 1
done
# download files
-wget -c -N -nv --no-parent -nH --cut-dirs=1 -r $wget_file_list -P $MIRROR
+wget -c -N -nv --no-parent -nH --cut-dirs=1 -r $wget_file_list
+cd ${svdir}
Reply to: