summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-12-28 20:10:17 +0000
committerGuido Günther <agx@sigxcpu.org>2017-12-28 20:10:17 +0000
commit8080f0d48a23f9e450741cfd64d94694b37e2d7c (patch)
treed11cc68c836910f3e1dd49633d166aaf60d5a5e4 /tools
parent58f4ca98cad5657e7768d2fabee418a23fa7ee75 (diff)
Add scripts to split security-tracker into data and "binaries"
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@59003 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'tools')
-rwxr-xr-xtools/git-migration/add-security-tracker-bin-submodule25
-rwxr-xr-xtools/git-migration/filter-sec-tracker-data26
2 files changed, 51 insertions, 0 deletions
diff --git a/tools/git-migration/add-security-tracker-bin-submodule b/tools/git-migration/add-security-tracker-bin-submodule
new file mode 100755
index 0000000000..23a9de17a8
--- /dev/null
+++ b/tools/git-migration/add-security-tracker-bin-submodule
@@ -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
diff --git a/tools/git-migration/filter-sec-tracker-data b/tools/git-migration/filter-sec-tracker-data
new file mode 100755
index 0000000000..e834d4e3a9
--- /dev/null
+++ b/tools/git-migration/filter-sec-tracker-data
@@ -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}"

© 2014-2024 Faster IT GmbH | imprint | privacy policy