Hello community,
here is the log from the commit of package obs-service-tar_scm for openSUSE:Factory checked in at 2012-01-04 07:25:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-tar_scm (Old)
and /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-tar_scm", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes 2011-09-23 02:14:58.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new/obs-service-tar_scm.changes 2012-01-04 07:25:39.000000000 +0100
@@ -1,0 +2,55 @@
+Thu Dec 29 13:39:35 UTC 2011 - gollub(a)b1-systems.de
+
+- make svn checkout --trust-server-cert option conditional, since
+ this option is not supported by versions prior to subversion 1.6.
+
+-------------------------------------------------------------------
+Thu Dec 29 13:37:43 UTC 2011 - gollub(a)b1-systems.de
+
+- Trim user prefix from tarball filename.
+ This enables tar_scm service to be used with git and ssh transport
+ (in conjuction with a passphrase less ssh-pubkey). Example Git URL:
+ git@gitrepo.tld:foobar.git
+
+-------------------------------------------------------------------
+Thu Dec 29 13:35:30 UTC 2011 - gollub(a)b1-systems.de
+
+- git 1.6.x and very likely other version only support
+ "show --pretty=format:%at" as parameter with "format:" prefix.
+ git show --pretty=%at is also support by recent git versions.
+
+-------------------------------------------------------------------
+Mon Aug 29 07:01:36 UTC 2011 - adrian(a)suse.de
+
+- make it possible to create tar balls without version tag (#714542)
+
+-------------------------------------------------------------------
+Fri Aug 26 06:49:13 UTC 2011 - adrian(a)suse.de
+
+- support old tar bar lookup also for OBS 2.3 bs_service using .old/ directory
+
+-------------------------------------------------------------------
+Fri Aug 26 06:45:17 UTC 2011 - adrian(a)suse.de
+
+- drop broken code for same-commit-detection as suggested by Markus
+
+-------------------------------------------------------------------
+Thu Aug 25 16:17:02 UTC 2011 - markus.lehtonen(a)linux.intel.com
+
+- history-depth parameter: use hackish depth=999999999 if "full" is
+ given so that a shallow clone will be fully deepened if the
+ _service file is changed. Also, fix git clone cmd line (remove
+ a pair of quotes that cause problems).
+
+-------------------------------------------------------------------
+Thu Aug 25 13:52:06 UTC 2011 - adrian(a)suse.de
+
+- add support for (git) checkout depth, original patch by
+ Markus Lehtonen <markus.lehtonen(a)linux.intel.com>
+
+-------------------------------------------------------------------
+Wed Aug 17 07:54:29 UTC 2011 - adrian(a)suse.de
+
+- make packaging of meta data optional to reduce tar ball size
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tar_scm ++++++
--- /var/tmp/diff_new_pack.nVCfIw/_old 2012-01-04 07:25:40.000000000 +0100
+++ /var/tmp/diff_new_pack.nVCfIw/_new 2012-01-04 07:25:40.000000000 +0100
@@ -13,10 +13,12 @@
# defaults
MYSCM=""
MYURL=""
-MYVERSION=""
+MYVERSION="_auto_"
MYPREFIX=""
MYFILENAME=""
MYREVISION=""
+MYPACKAGEMETA=""
+MYGITARGS="--depth 1"
while test $# -gt 0; do
case $1 in
@@ -52,10 +54,22 @@
MYFILENAME="${2#/}"
shift
;;
+ *-package-meta)
+ MYPACKAGEMETA="${2#/}"
+ shift
+ ;;
*-outdir)
MYOUTDIR="$2"
shift
;;
+ *-history-depth)
+ if [ "$2" == "full" ]; then
+ MYGITARGS="--depth 999999999"
+ else
+ MYGITARGS="--depth $2"
+ fi
+ shift
+ ;;
*)
echo Unknown parameter $1.
echo 'Usage: tar_scm --scm $SCM --url $URL --outdir $OUT'
@@ -67,6 +81,9 @@
FILE="$MYFILENAME"
VERSION="$MYVERSION"
+if [ -z "$MYPACKAGEMETA" ]; then
+ EXCLUDES="$EXCLUDES --exclude-vcs"
+fi
if [ -z "$MYSCM" ]; then
echo "ERROR: no scm is given via --scm parameter (git/svn/hg)!"
@@ -88,6 +105,7 @@
FILE="${MYURL%/}"
FILE="${FILE##*/}"
FILE="${FILE%.git}"
+ FILE="${FILE#*@*:}"
fi
if [ -z "$FILE" -a "$MYSCM" == "svn" ]; then
FILE="${MYURL%/}"
@@ -98,7 +116,12 @@
FILE="${FILE##*/}"
fi
-existing_tar=$(echo $SRCDIR/_service:*tar_scm:${FILE}-*.tar*)
+# Try to find an existing tar ball, which can be upgraded instead of complete full download.
+existing_tar=$(echo $SRCDIR/.old/_service:*tar_scm:${FILE}-*.tar*)
+if [ ! -e "$existing_tar" ]; then
+ # for OBS < 2.3
+ existing_tar=$(echo $SRCDIR/_service:*tar_scm:${FILE}-*.tar*)
+fi
if [ -e "$existing_tar" ]; then
UNCOMPRESS="cat"
if [ "${existing_tar%.tar.gz}" != "$existing_tar" ]; then
@@ -110,11 +133,18 @@
fi
if $UNCOMPRESS "$existing_tar" | tar xf -; then
TAR_DIRECTORY=`find * -maxdepth 0 -a -type d`
+ else
+ existing_tar=""
fi
+else
+ existing_tar=""
fi
if [ "$MYSCM" == "svn" ]; then
- if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; then
+ if [[ $(svn --version --quiet) > "1.5.99" ]]; then
+ TRUST_SERVER_CERT="--trust-server-cert";
+ fi
+ if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY/.svn" ]; then
# update existing content for speed/bandwidth reasons
cd "$TAR_DIRECTORY"
OLDVERSION=`LC_ALL=C svn info | sed -n 's,^Last Changed Rev: \(.*\),\1,p'`
@@ -125,11 +155,6 @@
fi
NEWVERSION=`LC_ALL=C svn info | sed -n 's,^Last Changed Rev: \(.*\),\1,p'`
cd -
- if [ "$OLDVERSION" == "$NEWVERSION" ]; then
- # cleanup and skip
- rm -rf "$TAR_DIRECTORY"
- exit 0
- fi
mv "$TAR_DIRECTORY" "${FILE}" || exit 1
else
# new checkout
@@ -139,65 +164,55 @@
cd "$MYSUBDIR"
fi
if [ -n "$MYREVISION" ]; then
- svn co --non-interactive --trust-server-cert -r"$MYREVISION" "$MYURL/$MYSUBDIR" "${FILE}" || exit 1
+ svn co --non-interactive $TRUST_SERVER_CERT -r"$MYREVISION" "$MYURL/$MYSUBDIR" "${FILE}" || exit 1
else
- svn co --non-interactive --trust-server-cert "$MYURL/$MYSUBDIR" "${FILE}" || exit 1
+ svn co --non-interactive $TRUST_SERVER_CERT "$MYURL/$MYSUBDIR" "${FILE}" || exit 1
fi
if [ -n "$MYSUBDIR" ]; then
cd -
fi
fi
- if [ -z "$VERSION" ]; then
+ if [ "$VERSION" == "_auto_" ]; then
cd "$FILE"
[ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX.rev"
VERSION="$MYPREFIX"`LC_ALL=C svn info | sed -n 's,^Last Changed Rev: \(.*\),\1,p'`
cd -
fi
elif [ "$MYSCM" == "git" ]; then
- if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; then
+ if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY/.git" ]; then
# update existing content for speed/bandwidth reasons
cd "$TAR_DIRECTORY"
- OLDVERSION=`git show --pretty=%at | head -n 1`
- git pull || exit 1
+ OLDVERSION=`git show --pretty=format:%at | head -n 1`
+ git pull $MYGITARGS || exit 1
if [ -n "$MYREVISION" ]; then
git checkout "$MYREVISION" || exit 1
fi
- NEWVERSION=`git show --pretty=%at | head -n 1`
+ NEWVERSION=`git show --pretty=format:%at | head -n 1`
cd -
- if [ "$OLDVERSION" == "$NEWVERSION" ]; then
- # cleanup and skip
- rm -rf "$TAR_DIRECTORY"
- exit 0
- fi
mv "$TAR_DIRECTORY" "${FILE}" || exit 1
else
# new checkout
- git clone --depth 1 "$MYURL" "${FILE}" || exit 1
+ git clone $MYGITARGS "$MYURL" "${FILE}" || exit 1
if [ -n "$MYREVISION" ]; then
cd "$FILE"
git checkout "$MYREVISION" || exit 1
cd -
fi
fi
- if [ -z "$VERSION" ]; then
+ if [ "$VERSION" == "_auto_" ]; then
cd "$FILE"
[ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX."
- VERSION="$MYPREFIX"`git show --pretty=%at | head -n 1`
+ VERSION="$MYPREFIX"`git show --pretty=format:%at | head -n 1`
cd -
fi
elif [ "$MYSCM" == "hg" ]; then
- if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; then
+ if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY/.hg" ]; then
# update existing content for speed/bandwidth reasons
cd "$TAR_DIRECTORY"
OLDVERSION=`hg id -i -rtip`
hg pull || exit 1
NEWVERSION=`hg id -i -rtip`
cd -
- if [ "$OLDVERSION" == "$NEWVERSION" ]; then
- # cleanup and skip
- rm -rf "$TAR_DIRECTORY"
- exit 0
- fi
mv "$TAR_DIRECTORY" "${FILE}" || exit 1
else
# new checkout
@@ -208,7 +223,7 @@
hg update "$MYREVISION" || exit 1
cd -
fi
- if [ -z "$VERSION" ]; then
+ if [ "$VERSION" == "_auto_" ]; then
cd "$FILE"
[ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX."
# current working revision
@@ -216,7 +231,7 @@
cd -
fi
elif [ "$MYSCM" == "bzr" ]; then
- if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY" ]; then
+ if [ -z "$MYSUBDIR" -a -d "$TAR_DIRECTORY/.bzr" ]; then
# update existing content for speed/bandwidth reasons
cd "$TAR_DIRECTORY"
OLDVERSION=`bzr revno`
@@ -226,11 +241,6 @@
fi
NEWVERSION=`bzr revno`
cd -
- if [ "$OLDVERSION" == "$NEWVERSION" ]; then
- # cleanup and skip
- rm -rf "$TAR_DIRECTORY"
- exit 0
- fi
mv "$TAR_DIRECTORY" "${FILE}" || exit 1
else
# new checkout
@@ -240,7 +250,7 @@
bzr checkout "$MYURL" "${FILE}" || exit 1
fi
fi
- if [ -z "$VERSION" ]; then
+ if [ "$VERSION" == "_auto_" ]; then
cd "$FILE"
[ -n "$MYPREFIX" ] && MYPREFIX="$MYPREFIX."
VERSION="$MYPREFIX"`bzr revno`
@@ -256,9 +266,15 @@
exit 1
fi
-mv "$FILE/$MYSUBDIR" "${FILE}-${VERSION}" || exit 1
+if [ -z "$VERSION" ]; then
+ FILENAME="$FILE"
+else
+ FILENAME="${FILE}-${VERSION}"
+fi
+
+mv "$FILE/$MYSUBDIR" "${FILENAME}" || exit 1
-tar cf "$MYOUTDIR/${FILE}-${VERSION}.tar" $EXCLUDES "${FILE}-${VERSION}" || exit 1
-rm -rf "${FILE}-${VERSION}" "$FILE"
+tar cf "$MYOUTDIR/${FILENAME}.tar" $EXCLUDES "${FILENAME}" || exit 1
+rm -rf "${FILENAME}" "$FILE"
exit 0
++++++ tar_scm.service ++++++
--- /var/tmp/diff_new_pack.nVCfIw/_old 2012-01-04 07:25:40.000000000 +0100
+++ /var/tmp/diff_new_pack.nVCfIw/_new 2012-01-04 07:25:40.000000000 +0100
@@ -29,7 +29,14 @@
<description>for sepcifing excludes when creating the tar ball</description>
</parameter>
<parameter name="version">
- <description>version to be used in tar</description>
+ <description>version to be used in tar. Setting it to an empty string is disabling the version tag.</description>
+ </parameter>
+ <parameter name="package-meta">
+ <description>Package the meta data of SCM to allow the user or OBS to update after un-tar</description>
+ <allowedvalue>yes</allowedvalue>
+ </parameter>
+ <parameter name="history-depth">
+ <description>Stored history depth. Special value "full" clones/pulls full history. Only valid if SCM git is used.</description>
</parameter>
</service>
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org