aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'testdata')
-rw-r--r--testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/expected.json2
-rw-r--r--testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/fix.patch15
-rw-r--r--testdata/repos/standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild14
3 files changed, 31 insertions, 0 deletions
diff --git a/testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/expected.json b/testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/expected.json
index 921d5893..d441021b 100644
--- a/testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/expected.json
+++ b/testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/expected.json
@@ -1,3 +1,5 @@
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "0", "line": "dohtml doc/*", "lineno": 9, "command": "dohtml", "eapi": "7"}
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "1", "line": "has_version --host-root stub/stub1", "lineno": 9, "command": "has_version --host-root", "eapi": "7"}
{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "1", "line": "best_version --host-root stub/stub1:2", "lineno": 12, "command": "best_version --host-root", "eapi": "7"}
+{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "2", "line": "usermod -s /bin/bash uucp", "lineno": 9, "command": "usermod", "eapi": "6"}
+{"__class__": "BannedEapiCommand", "category": "BadCommandsCheck", "package": "BannedEapiCommand", "version": "2", "line": "usermod -s /bin/false uucp", "lineno": 13, "command": "usermod", "eapi": "6"}
diff --git a/testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/fix.patch b/testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/fix.patch
index d906bd2b..5ff1a880 100644
--- a/testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/fix.patch
+++ b/testdata/data/repos/standalone/BadCommandsCheck/BannedEapiCommand/fix.patch
@@ -24,3 +24,18 @@ diff -Naur standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-1.ebu
- H=$(best_version --host-root stub/stub1:2)
+ H=$(best_version -b stub/stub1:2)
}
+diff -Naur standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild fixed/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild
+--- standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild
++++ fixed/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild
+@@ -4,11 +4,3 @@ DESCRIPTION="Ebuild using banned commands"
+ HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+ SLOT="0"
+ LICENSE="BSD"
+-
+-pkg_preinst() {
+- usermod -s /bin/bash uucp || die
+-}
+-
+-pkg_postrm() {
+- usermod -s /bin/false uucp || die
+-}
diff --git a/testdata/repos/standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild b/testdata/repos/standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild
new file mode 100644
index 00000000..1282287f
--- /dev/null
+++ b/testdata/repos/standalone/BadCommandsCheck/BannedEapiCommand/BannedEapiCommand-2.ebuild
@@ -0,0 +1,14 @@
+EAPI=6
+
+DESCRIPTION="Ebuild using banned commands"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+SLOT="0"
+LICENSE="BSD"
+
+pkg_preinst() {
+ usermod -s /bin/bash uucp || die
+}
+
+pkg_postrm() {
+ usermod -s /bin/false uucp || die
+}