Group :: Sistema/Base
RPM: gettext
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: gettext-alt-autopoint-archive.patch
Download
Download
--- gettext/gettext-tools/misc/autopoint.in
+++ gettext/gettext-tools/misc/autopoint.in
@@ -475,162 +475,15 @@ mkdir "$work_dir" || {
fi
}
-# We support three archive formats.
-#
-# Format | Size (KiB) for gettext-0.17 | Extra tools needed |
-# -------+-----------------------------+--------------------+
-# dir | 3000 | -- |
-# cvs | 356 | cvs |
-# git | 484 | git |
-# -------+-----------------------------+--------------------+
-
-case "@ARCHIVE_FORMAT@" in
- dir*)
- # The archive of different versions is very large (unless xz compression is
- # used), but using it does not require special tools.
- case "@ARCHIVE_FORMAT@" in
- dirgz) gzip -d -c < "$gettext_datadir/archive.dir.tar.gz" ;;
- dirbz2) bzip2 -d -c < "$gettext_datadir/archive.dir.tar.bz2" ;;
- dirxz) xz -d -c < "$gettext_datadir/archive.dir.tar.xz" ;;
- esac \
+# We support dirxz archive format only.
+
+xz -d -c < "$gettext_datadir/archive.dir.tar.xz" \
| (cd "$work_dir" && tar xf - "gettext-$ver")
if test `find "$work_dir" -type f -print | wc -l` = 0; then
rm -rf "$work_dir"
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
fi
mv "$work_dir/gettext-$ver" "$work_dir/archive"
- ;;
-
- cvs)
- # We distributed the many different versions of the files in a CVS
- # repository. This guaranteed a good compression rate:
- #
- # Including version size in KB of
- # "du autopoint-files/archive"
- # 0.10.35 240
- # 0.10.36 428
- # 0.10.37 436
- # 0.10.38 488
- # 0.10.39 500
- # 0.10.40 528
- # 0.11 720
- # 0.11.1 740
- # 0.11.2 748
- # 0.11.3 804
- # 0.11.4 864
- # 0.11.5 880
- # 0.12 1032
- # 0.12.1 1032
- # 0.13 1220
- # 0.13.1 1236
- # 0.14 1296
- # 0.14.1 1300
- # 0.14.2 1420
- # 0.14.3 1428
- # 0.14.4 1464
- # 0.14.5 1508
- # 0.14.6 1580
- # 0.15 1760
- # 0.16 1808
- # 0.16.1 1812
- # 0.17 2128
- # 0.18 2656
- #
- # The requirement that the user must have the CVS program available is not
- # a severe restrictions, because most of the people who use autopoint are
- # users of CVS.
- #
- # But the CVS format is now deprecated, because "cvs init" does not work in
- # all circumstances
- # (see <https://lists.gnu.org/archive/html/bug-cvs/2010-05/msg00003.html>)
- # and we are not allowed to distribute the cvs infrastructure files
- # ourselves
- # (see <https://lists.gnu.org/archive/html/bug-cvs/2010-06/msg00011.html>).
- #
- # Check availability of the CVS program.
- (cvs -v) >/dev/null 2>/dev/null || func_fatal_error "cvs program not found"
-
- # Set up a temporary CVS repository.
- # We need the temporary CVS repository because any checkout needs write
- # access to the CVSROOT/history file, so it cannot be under $gettext_datadir.
- # We need the temporary checkout directory because when --force was not
- # given, we need to compare the existing files with the checked out ones.
- # Set variables
- # - cvs_dir directory containing the temporary repository
- cvs_dir=tmpcvs$$
- # Use an umask of 077, to avoid attacks that work by overwriting files in
- # the "$CVSROOT"/CVSROOT directory.
- (umask 077 && mkdir "$cvs_dir") || {
- if test -d "$cvs_dir"; then
- func_fatal_error "directory $cvs_dir already exists"
- else
- func_fatal_error "cannot create directory $cvs_dir"
- fi
- }
- CVSROOT="$srcdir/$cvs_dir"
- unset CVS_CLIENT_LOG
- unset CVS_CLIENT_PORT
- unset CVS_IGNORE_REMOTE_ROOT
- unset CVS_LOCAL_BRANCH_NUM
- unset CVS_NOBASES
- unset CVS_PASSFILE
- unset CVS_PASSWORD
- unset CVS_PROXY_PORT
- unset CVS_RCMD_PORT
- unset CVS_RSH
- unset CVS_SERVER
- unset CVS_SERVER_SLEEP
- CVS_SIGN_COMMITS=
- export CVS_SIGN_COMMITS
- unset CVS_SSH
- unset CVS_VERIFY_CHECKOUTS
- unset CVS_VERIFY_TEMPLATE
- unset CVSIGNORE
- unset CVSREAD
- unset CVSREADONLYFS
- unset CVSUMASK
- unset CVSWRAPPERS
-
- # Need to pass -d "$CVSROOT", because there may be a CVS directory in the
- # current directory.
- cvs -d "$CVSROOT" init
- gzip -d -c < "$gettext_datadir/archive.cvs.tar.gz" | (cd "$cvs_dir" && tar xf -)
-
- cd "$work_dir"
- cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'`
- (cvs -d "$CVSROOT" checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating'
- find archive -name CVS -type d -print | xargs rm -rf
- cd ..
- rm -rf "$cvs_dir"
- # Check that really all CVS directories are gone, otherwise we would overwrite
- # the contents of the user's CVS directories.
- if test `find $work_dir/archive -name CVS -type d -print | wc -l` != 0; then
- rm -rf "$work_dir"
- func_fatal_error "failed to remove all CVS subdirectories"
- fi
- if test `find $work_dir/archive -type f -print | wc -l` = 0; then
- rm -rf "$work_dir"
- func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
- fi
- ;;
-
- git)
- # Check availability of the git program.
- (git --version) >/dev/null 2>/dev/null || func_fatal_error "git program not found"
- mkdir "$work_dir/archive"
- gzip -d -c < "$gettext_datadir/archive.git.tar.gz" | (cd "$work_dir/archive" && tar xf -)
- (unset GIT_CONFIG
- unset XDG_CONFIG_HOME
- unset HOME
- GIT_CONFIG_NOSYSTEM=1; export GIT_CONFIG_NOSYSTEM
- cd "$work_dir/archive" && git checkout -q "gettext-$ver"
- ) || {
- rm -rf "$work_dir"
- func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
- }
- (cd "$work_dir/archive" && rm -rf .git .gitignore)
- ;;
-esac
# func_destfile file
# determines the destination file, relative to the package's top level