summaryrefslogtreecommitdiff
path: root/python/python2-vulndb/do-not-commit-vulndb-to-upstream.diff
diff options
context:
space:
mode:
authorDave Woodfall <dave@slackbuilds.org>2021-05-14 21:34:47 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-05-19 18:40:04 +0700
commitbfc0b9d82af0579833b431ee8d40f5aee41ee8b3 (patch)
tree301ba02816b71f2761e883712b13f2afe9fd3f1d /python/python2-vulndb/do-not-commit-vulndb-to-upstream.diff
parentf994f105c6a511d82e6bdfb0c127444e7f9f74c4 (diff)
downloadslackbuilds-bfc0b9d82af0579833b431ee8d40f5aee41ee8b3.tar.gz
python/python-vulndb: Renamed python2-vulndb.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python2-vulndb/do-not-commit-vulndb-to-upstream.diff')
-rw-r--r--python/python2-vulndb/do-not-commit-vulndb-to-upstream.diff48
1 files changed, 48 insertions, 0 deletions
diff --git a/python/python2-vulndb/do-not-commit-vulndb-to-upstream.diff b/python/python2-vulndb/do-not-commit-vulndb-to-upstream.diff
new file mode 100644
index 0000000000..b9f47e67a3
--- /dev/null
+++ b/python/python2-vulndb/do-not-commit-vulndb-to-upstream.diff
@@ -0,0 +1,48 @@
+--- vulndb-0.1.0.orig/tools/update-db.sh 2018-08-12 07:51:58.105606135 -0600
++++ vulndb-0.1.0/tools/update-db.sh 2018-08-12 08:10:39.242604312 -0600
+@@ -1,30 +1,26 @@
+ #!/usr/bin/env bash
+
+-set -x
++set -e
+
+ #
+ # Update the database
+ #
+-if [ ! -d "data" ]; then
+- git clone https://github.com/vulndb/data.git
++if [ ! -d "/tmp/vulndb_data" ]; then
++ git clone https://github.com/vulndb/data.git /tmp/vulndb_data
+ fi
+
+-cd data
++cd /tmp/vulndb_data
+ git pull
+ cd ..
+
+-rm -rf vulndb/db/
+-mkdir -p vulndb/db/
+-cp -rf data/db/* vulndb/db/
+-git add vulndb/db/*
+-
+-# Bump the version numbers
+-tools/semver.sh bump patch
+-
+-cd data
+-git rev-parse HEAD > ../vulndb/db-version.txt
+-cd ..
++echo "Copying new vulnerability data..."
++sleep 3
++if [ -d "/usr/lib64" ]; then
++ cp -Ruv /tmp/vulndb_data/db/en/ /usr/lib64/python2.7/site-packages/vulndb/db/
++else
++ cp -Ruv /tmp/vulndb_data/db/en/ /usr/lib/python2.7/site-packages/vulndb/db/
++fi
+
+-# Push to repo
+-git commit vulndb/db/ vulndb/version.txt vulndb/db-version.txt -m 'Updated vulnerability database'
+-git push
+\ No newline at end of file
++echo "Removing temporary files..."
++sleep 3
++rm -Rv /tmp/vulndb_data