On Sat, Dec 15, 2007 at 10:23:50AM -0200, Felipe Augusto van de Wiel wrote: > I finished working on the scripts that will generate the > files, we add some tests during the "package" build to reduce the > checks on the "archive side". The package, .dsc and byhand-ddtp > are here: http://people.debian.org/~faw/ddtp/
That should be a .changes file, not a .dsc file. You could use the
tag-overrides changes on merkel as an example; look in:
/srv/ftp.debian.org/queue/done/tag-overrides_200712071325_all.changes
The byhand script only allows translations for main, not contrib/non-free.
That seems odd?
If the filename looks like Translations-xx_YY-blah it will pass through
without complaint. "FNL=$(echo ${FN} | cut -d'-' f2-)" would fix that.
Using ${FN%%-*} and ${FN#*-} rather than the echo/cut subshells would
work too.
Only extracting files that you've guaranteed are okay might be safer, ie:
(untested)
is_name_okay () {
local f
f="$1"
f="${f#./}" # trime leading ./ if present
c="${f%%/*}" # component should appear first
if [ "x$c" != "xmain" -a "x$c" != "xcontrib" -a "x$c" != "xnon-free" ]
then
return 1
fi
f="${f#*/}"
if [ "x$f" = "x" ]; then return 2; fi # directory name, ignore it
# i18n/ should appear next
if [ "${f#i18n/}" = "$f" ]; then
return 1
fi
f="${f#*/}"
if [ "x$f" = "x" ]; then return 2; fi # directory name, ignore it
case "$f" in
Translation-[a-z][a-z][a-z]_[A-Z][A-Z]) return 0 ;;
Translation-[a-z][a-z]_[A-Z][A-Z]) return 0 ;;
Translation-[a-z][a-z][a-z]) return 0 ;;
Translation-[a-z][a-z]) return 0 ;;
esac
return 1
}
tar tzf "${TBALL}" | while read f; do
if ! is_name_okay "$f" && [ "$?" -ne 2 ]; then
true
else
echo "Bad name in tarball: $f"
exit 1
fi
done
tar tzf "${TBALL}" | while read f; do
if is_name_okay "$f";
tar -C "${TEMPDIR} -xzf "${TBALL}" "$f"
fi
done
There's no code to move from the TEMPDIR into the dists/ directory? Or
are you meaning for TEMPDIR to be replaced by the real dest?
Cheers,
aj
signature.asc
Description: Digital signature

