From: Bruno Haible Date: Sun, 16 May 2010 16:01:50 +0000 (+0200) Subject: Avoid keyword substitution in cvs archives created by convert-archive. X-Git-Tag: v0.18.1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b333a7bf4dbc7ab2c840d1816d265f729ff2d4b;p=thirdparty%2Fgettext.git Avoid keyword substitution in cvs archives created by convert-archive. --- diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index 656eb3da7..1208d21dc 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,9 @@ +2010-05-16 Bruno Haible + + Avoid keyword substitution in cvs archives created by convert-archive. + * convert-archive.in: When creating a cvs archive, use "cvs admin -ko" + on all files. + 2010-05-16 Bruno Haible Make convert-archive more robust. diff --git a/gettext-tools/misc/convert-archive.in b/gettext-tools/misc/convert-archive.in index 0e7d90900..533ad1cd8 100644 --- a/gettext-tools/misc/convert-archive.in +++ b/gettext-tools/misc/convert-archive.in @@ -262,8 +262,16 @@ case "$to" in cvsver=`echo "$version" | sed -e 's/\./_/g'` (cd $version CVSUSER=$cvsuser LD_PRELOAD=$cvsuser_hack \ - cvs -d "$CVSROOT" import -m "Import $version" archive release "$cvsver" + cvs -d "$CVSROOT" import -m "Import $version" archive release "$cvsver" > /dev/null ) || func_fatal_error "cvs import failed" + # In order to avoid keyword substitution, we have to use "cvs admin" + # in a temporary checkout. + mkdir tmpcheckout || func_fatal_error "mkdir failed" + (cd tmpcheckout \ + && cvs -d "$CVSROOT" checkout -r"$cvsver" archive > /dev/null \ + && cvs -d "$CVSROOT" admin -ko `find . -type f -print | sed -e 's,^\./,,' | grep -v '^CVS/' | grep -v '/CVS/'` > /dev/null + ) 2> cvs.err || { cat cvs.err 1>&2; func_fatal_error "cvs checkout or admin failed"; } + rm -rf tmpcheckout done ) (cd "$cvs_dir" && tar cf - --owner=root --group=root archive) \