[Secure-testing-commits] r59003 - tools/git-migration

Guido Guenther agx at moszumanska.debian.org
Thu Dec 28 20:10:17 UTC 2017


Author: agx
Date: 2017-12-28 20:10:17 +0000 (Thu, 28 Dec 2017)
New Revision: 59003

Added:
   tools/git-migration/add-security-tracker-bin-submodule
   tools/git-migration/filter-sec-tracker-data
Log:
Add scripts to split security-tracker into data and "binaries"

Added: tools/git-migration/add-security-tracker-bin-submodule
===================================================================
--- tools/git-migration/add-security-tracker-bin-submodule	                        (rev 0)
+++ tools/git-migration/add-security-tracker-bin-submodule	2017-12-28 20:10:17 UTC (rev 59003)
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Wire up the security-tracker-bin submodule in security-tracker (the data)
+#
+# For the moment we create compat symlinks so everything stays in place.
+# In the long run we should be able to get rid of most of them.
+#
+# This will be run only once when migrating from svn to git
+
+set -e
+
+SUBMODULE=security-tracker-bin
+
+# From salsa
+#git submodule add ../${SUBMODULE}
+# Local copy for testing
+git submodule add file://$PWD/../$SUBMODULE
+
+git submodule update
+for d in bin check-external lib static templates tools website; do
+    rm -f $d
+    ln -s $SUBMODULE/$d $d
+done
+
+make check-syntax


Property changes on: tools/git-migration/add-security-tracker-bin-submodule
___________________________________________________________________
Added: svn:executable
   + *

Added: tools/git-migration/filter-sec-tracker-data
===================================================================
--- tools/git-migration/filter-sec-tracker-data	                        (rev 0)
+++ tools/git-migration/filter-sec-tracker-data	2017-12-28 20:10:17 UTC (rev 59003)
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# Separate security tracker data form the "binaries"
+#
+# With no option the data repo will be built, with
+# "--binary" the binary repo will be built
+#
+# This will be run only once when migrating from svn to git
+
+FILTER='^(conf|data|doc|org|packages|stamps)/|^TODO.gitmigration|^Makefile|^.gitignore'
+BRANCH=master
+
+OUT=v
+if [ "$1" == "--binary" ]; then
+    OUT=
+fi
+
+git filter-branch \
+    --prune-empty \
+    --index-filter "
+        git ls-tree -z -r --name-only --full-tree \$GIT_COMMIT \
+        | grep -zZE'${OUT}' '"${FILTER}"' \
+        | xargs -0 -r git rm --cached -r
+    " \
+    -- \
+"${BRANCH}"


Property changes on: tools/git-migration/filter-sec-tracker-data
___________________________________________________________________
Added: svn:executable
   + *




More information about the Secure-testing-commits mailing list