diff --git a/obs-service-tar_scm.changes b/obs-service-tar_scm.changes index 8b72665..1bb3216 100644 --- a/obs-service-tar_scm.changes +++ b/obs-service-tar_scm.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Fri Jul 27 11:16:47 UTC 2012 - aspiers@suse.com + +- Prevent local users from appearing as user/group owner in + generated tar files (thanks bmwiedemann for this) + +------------------------------------------------------------------- +Tue Jul 3 11:23:12 UTC 2012 - adrian@suse.de + +- fix option for submodule update + +------------------------------------------------------------------- +Sat Jun 30 13:56:51 UTC 2012 - magist3r@gmail.com + +- Fixed error with cache + +------------------------------------------------------------------- +Sat Jun 30 10:59:34 UTC 2012 - magist3r@gmail.com + +- Added an option to disable git submodules +- Replaced --exclude=.$MYSCM with --exclude-vcs tar option + +------------------------------------------------------------------- +Thu Jun 28 22:53:29 UTC 2012 - magist3r@gmail.com + +- Added support for git submodules + ------------------------------------------------------------------- Tue Jun 5 11:12:07 UTC 2012 - saschpe@suse.de diff --git a/tar_scm b/tar_scm index 25e95ee..b4714e9 100644 --- a/tar_scm +++ b/tar_scm @@ -21,6 +21,7 @@ set_default_params () { MYFILENAME="" MYREVISION="" MYPACKAGEMETA="" + USE_SUBMODULES=enable # MYHISTORYDEPTH="" INCLUDES="" } @@ -91,9 +92,13 @@ parse_params () { echo "history-depth parameter is obsolete and will be ignored" shift ;; + *-submodules) + USE_SUBMODULES="$2" + shift + ;; *) echo "Unknown parameter: $1" - echo 'Usage: $SERVICE --scm $SCM --url $URL [--subdir $SUBDIR] [--revision $REVISION] [--version $VERSION] [--include $INCLUDE]* [--exclude $EXCLUDE]* [--versionformat $FORMAT] [--versionprefix $PREFIX] [--filename $FILENAME] [--package-meta $META] --outdir $OUT' + echo 'Usage: $SERVICE --scm $SCM --url $URL [--subdir $SUBDIR] [--revision $REVISION] [--version $VERSION] [--include $INCLUDE]* [--exclude $EXCLUDE]* [--versionformat $FORMAT] [--versionprefix $PREFIX] [--filename $FILENAME] [--package-meta $META] [--disable-git-submodule] --outdir $OUT' exit 1 ;; esac @@ -132,7 +137,7 @@ sanitise_params () { FILE="$MYFILENAME" WD_VERSION="$MYVERSION" if [ -z "$MYPACKAGEMETA" ]; then - EXCLUDES="$EXCLUDES --exclude=.$MYSCM" + EXCLUDES="$EXCLUDES --exclude-vcs" fi # if [ "$MYHISTORYDEPTH" == "full" ]; then # MYHISTORYDEPTH="999999999" @@ -241,6 +246,11 @@ initial_clone () { git) # Clone with full depth; so that the revision can be found if specified safe_run git clone "$MYURL" "$CLONE_TO" + if [ "$USE_SUBMODULES" == "enable" ]; then + safe_run cd "$CLONE_TO" + safe_run git submodule update --init --recursive + safe_run cd .. + fi ;; svn) args= @@ -447,8 +457,8 @@ prep_tree_for_tar () { create_tar () { TARFILE="${TAR_BASENAME}.tar" TARPATH="$MYOUTDIR/$TARFILE" - debug tar cf "$TARPATH" $EXCLUDES $MYINCLUDES - safe_run tar cf "$TARPATH" $EXCLUDES $MYINCLUDES + debug tar --owner=root --group=root -cf "$TARPATH" $EXCLUDES $MYINCLUDES + safe_run tar --owner=root --group=root -cf "$TARPATH" $EXCLUDES $MYINCLUDES echo "Created $TARFILE" } diff --git a/tar_scm.service b/tar_scm.service index 4bcf0c2..35b7914 100644 --- a/tar_scm.service +++ b/tar_scm.service @@ -44,5 +44,10 @@ Stored history depth. Special value "full" clones/pulls full history. Only valid if SCM git is used. + + Do not include git submodules. + enable + disable +