summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/no-suricata-python-package.patch13
-rw-r--r--debian/patches/python3-tests.patch11
-rw-r--r--debian/patches/remove-revision-update.patch37
-rw-r--r--debian/patches/series3
4 files changed, 64 insertions, 0 deletions
diff --git a/debian/patches/no-suricata-python-package.patch b/debian/patches/no-suricata-python-package.patch
new file mode 100644
index 0000000..1b487ae
--- /dev/null
+++ b/debian/patches/no-suricata-python-package.patch
@@ -0,0 +1,13 @@
+Description: Do not formally ship suricata package
+Author: Sascha Steinbiss <satta@debian.org>
+Last-Update: 2019-09-07
+--- a/setup.py
++++ b/setup.py
+@@ -35,7 +35,6 @@
+ "author": "Jason Ish",
+ "author_email": "ish@unx.ca",
+ "packages": [
+- "suricata",
+ "suricata.update",
+ "suricata.update.commands",
+ "suricata.update.configs",
diff --git a/debian/patches/python3-tests.patch b/debian/patches/python3-tests.patch
new file mode 100644
index 0000000..8d7c8b1
--- /dev/null
+++ b/debian/patches/python3-tests.patch
@@ -0,0 +1,11 @@
+Description: force Python 3 for script
+Author: Sascha Steinbiss <satta@debian.org>
+Last-Update: 2019-01-03
+--- a/bin/suricata-update
++++ b/bin/suricata-update
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python3
+ #
+ # Copyright (C) 2017 Open Information Security Foundation
+ #
diff --git a/debian/patches/remove-revision-update.patch b/debian/patches/remove-revision-update.patch
new file mode 100644
index 0000000..9e8f1af
--- /dev/null
+++ b/debian/patches/remove-revision-update.patch
@@ -0,0 +1,37 @@
+Description: remove git revision
+ The upstream version assumes that it is installed from a Git repository
+ and tries to insert the Git commit ID into the code.
+Author: Sascha Steinbiss <satta@debian.org>
+Last-Update: 2019-01-03
+--- a/setup.py
++++ b/setup.py
+@@ -15,18 +15,18 @@
+ print("Suricata-Update requires Python 2.7 or newer.")
+ sys.exit(0)
+
+-def write_git_revision():
+- if not os.path.exists(".git"):
+- return
+- try:
+- revision = subprocess.check_output(
+- ["git", "rev-parse", "--short", "HEAD"])
+- with open("./suricata/update/revision.py", "w") as fileobj:
+- fileobj.write("revision = '%s'" % (revision.decode().strip()))
+- except Exception as err:
+- print("Failed to get current git revision: %s" % (err))
++#def write_git_revision():
++# if not os.path.exists(".git"):
++# return
++# try:
++# revision = subprocess.check_output(
++# ["git", "rev-parse", "--short", "HEAD"])
++# with open("./suricata/update/revision.py", "w") as fileobj:
++# fileobj.write("revision = '%s'" % (revision.decode().strip()))
++# except Exception as err:
++# print("Failed to get current git revision: %s" % (err))
+
+-write_git_revision()
++#write_git_revision()
+
+ args = {
+ "name": "suricata-update",
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8a2bf8e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+remove-revision-update.patch
+python3-tests.patch
+no-suricata-python-package.patch