summaryrefslogtreecommitdiff
path: root/dev-util/rats
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/rats')
-rw-r--r--dev-util/rats/Manifest7
-rw-r--r--dev-util/rats/files/rats-2.1-add-getopt-trailing-null.patch11
-rw-r--r--dev-util/rats/files/rats-2.1-fix-null-pointers.patch128
-rw-r--r--dev-util/rats/files/rats-2.4-fix-build-system.patch27
-rw-r--r--dev-util/rats/rats-2.1-r2.ebuild36
-rw-r--r--dev-util/rats/rats-2.4.ebuild25
6 files changed, 43 insertions, 191 deletions
diff --git a/dev-util/rats/Manifest b/dev-util/rats/Manifest
index f5f782c4fa69..9786ccfaf5ac 100644
--- a/dev-util/rats/Manifest
+++ b/dev-util/rats/Manifest
@@ -1,7 +1,4 @@
-AUX rats-2.1-add-getopt-trailing-null.patch 367 BLAKE2B 182f887fbf021a338808fdbcb6ac7d2a1185381180f171ee1a43ec5ee18a8d4eb38b7c865c36017923c55006779071314e6c372bb725f42908c76b4137666fcc SHA512 50a246a36b7d26d228d5350bbde260792ff7cfcf168038efe284d6c138d25b112f209778fbeb0b118af7c96debadddc59719d73fc373a7e5ce8d1ce3ebec6b36
-AUX rats-2.1-fix-null-pointers.patch 3600 BLAKE2B 62d67e310e4f152da93d898dbe741610852319cf798a75c6edf008de0cdea7fe2900f135162e0bc558ac2980c97c978c681daa923c612512908b2de7882f8427 SHA512 a1b332a5a436cb4e3b27b8c97f1da582c93ca783b89fc0b0523825fa9046af1916bcfa95704cc3aca3588130139eb61b8c4fd40fba3536997370065387e2e3cf
-DIST rats-2.1.tar.gz 326930 BLAKE2B 4fa47cf69ab1b04ccf42b300fc55da386a9b5ac783517ec2efcfb545aba2cf27cc1b2a11d5d0d003cc8a0a5112a0cd1183f263c77a62f280268d214bc9ce7634 SHA512 2fdb670dc9559c453a6c69ee2d411e2626c0ee4cca4b59ceda878142008e136dfd11f8265c0719383212b38b0358a9cab1a29f1cc92a986fc800dd0c46bdf0d3
+AUX rats-2.4-fix-build-system.patch 1131 BLAKE2B a9890ebe1af624e2ede486da6ede63318a7de2775028df5d37f004b575e35890cd833cfc1211196b4cc772b3fff13b6b0f76e0dd0558b781b1e54b96a9a2af4e SHA512 d56accaedbb5b0fa5961c79ee19510ddd36428d3a96b6066ffd304a3167df5cd510041f3eeee9aabfe66b71a29090a9199125d14ae6be6443b5e490e2cdeaf07
DIST rats-2.4.tgz 393114 BLAKE2B 73dfefc42cd99420edba9ac28d56b51e058b144d9deaf9f1e322e7fe4331e16d05cff049efccd344723fe1634c3691f911dd71001671058c5912f84cfdc0bdbb SHA512 f402717fc935a2f9c2464e1623807575044258fd998cabc8f115c063141004b5978bad739021f109cbbd1abd84231155eb59671ae202aefb40e1fd6733d8ac6d
-EBUILD rats-2.1-r2.ebuild 1017 BLAKE2B 6e1547e9f646f18883117e51667097f0db7c4bd90167a83e92bad174843ab370aa792ceba9995b7f2194c9073b3f522ecd11a362798a2be7d11923e7ad5bd01e SHA512 322954d36971597725bd6c5facb436c06ccafd93df788a93ebec2b0ec92900960bf8acfeb22c180c546def22cdea0528831032079d4fa23e3e538617763b1bb6
-EBUILD rats-2.4.ebuild 1162 BLAKE2B 31665ff7671edfcd84037177801e7703e228d54c57e3048d8b8033476ce56d28afe507caedf22bf798d87682a0222f280c718fa1f45f854135374edea4dc04d4 SHA512 96ffe97c9003989173278654195aabceef2562834c215f7d8ca33f6e215fc5dfddb4a3007cf0009c85db6f27d573ea6c4c9c548534baa355a0dfaf7ad690d423
+EBUILD rats-2.4.ebuild 1127 BLAKE2B b52d2b6c3df8a763d7d89ceea46b0812940afb376819d110c79817dd89cd47100353bb7756924fb25bf0b13df3bb4cf4b914a7cc9eced7fdc41cc0f111f7788f SHA512 ceb6ced278b7c50f321cddfbb705737d97edd821e97543e515996576fbc0589248d2fc6cfe0a38f9b6c4afdf7fa673369bb436d64dedef6d3ddbb65439336217
MISC metadata.xml 604 BLAKE2B 1df7626ac554d569d4bae9ff3821a998cf2457441e81c55d57b1ed0bc319226847083de8a97f4362339b9b6f9d9de973777274270d19540dfdba95674f456478 SHA512 14edf04ecb58d9fd69c549b9cd64713338aaa8dab9230ddc00824dfaaa3b2e77090deeb0dc7f87fc875ebb3851ea3bae4765ee8e140b8695ad4088f1eb1fbdad
diff --git a/dev-util/rats/files/rats-2.1-add-getopt-trailing-null.patch b/dev-util/rats/files/rats-2.1-add-getopt-trailing-null.patch
deleted file mode 100644
index 65ea6df1f456..000000000000
--- a/dev-util/rats/files/rats-2.1-add-getopt-trailing-null.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nuar --exclude '*~' rats-2.1.orig/main.c rats-2.1/main.c
---- rats-2.1.orig/main.c 2002-09-16 21:05:43.000000000 -0700
-+++ rats-2.1/main.c 2006-05-21 21:56:29.578601459 -0700
-@@ -278,6 +278,7 @@
- {"columns", 0,0,0},
- {"context", 0,0,0},
- {"all-static", 0,0,0},
-+ {NULL,0,0,0}
- };
- progname = argv[0];
- flags|=RECURSIVE_FILE_SCAN;
diff --git a/dev-util/rats/files/rats-2.1-fix-null-pointers.patch b/dev-util/rats/files/rats-2.1-fix-null-pointers.patch
deleted file mode 100644
index 0d4c701f0bfc..000000000000
--- a/dev-util/rats/files/rats-2.1-fix-null-pointers.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-diff -Nuar rats-2.1.orig/report.c rats-2.1/report.c
---- rats-2.1.orig/report.c 2002-09-16 21:05:43.000000000 -0700
-+++ rats-2.1/report.c 2006-05-21 23:16:16.323046789 -0700
-@@ -122,9 +122,15 @@
- return result;
- }
-
--
--
--
-+/* Exclusively for debugging vulnerabilities.
-+ * - robbat2@gentoo.org 21/05/2006 */
-+static void debug_vuln_dump(vulnerability_t *ptr) {
-+ fprintf(stderr,"vuln_dump: this=%x f=%s l=%d c=%d d=%x t=%d s=%d u=%x p=(%x,%x)\n",
-+ ptr,
-+ ptr->filename,ptr->lineno,ptr->column,
-+ ptr->data,ptr->type,ptr->severity,
-+ ptr->uses,ptr->next,ptr->prev);
-+}
-
- static void
- replace_cfname(char *filename)
-@@ -317,6 +323,27 @@
- insert_vulnerability(log);
- }
-
-+/* These are special static vulnerabilities because we don't
-+ * want NULL data elements in the vulnerability_t->data
-+ * field, because the HTML and XML output formats use that
-+ * pointer without checking it for being null first.
-+ * - robbat2@gentoo.org 21/05/2006 */
-+static struct Vuln_t vuln_PerlBacktick = {
-+ .Name = "Perl Backtick"
-+};
-+static struct Vuln_t vuln_PhpBacktick = {
-+ .Name = "PHP Backtick"
-+};
-+static struct Vuln_t vuln_PythonBacktick = {
-+ .Name = "Python Backtick"
-+};
-+static struct Vuln_t vuln_StaticLocalBuffer = {
-+ .Name = "Static Local Buffer"
-+};
-+static struct Vuln_t vuln_StaticGlobalBuffer = {
-+ .Name = "Static Global Buffer"
-+};
-+
- void log_perlbacktick(int lineno, int column, Severity_t severity)
- {
- vulnerability_t * log;
-@@ -325,7 +352,7 @@
- log->filename = current_file;
- log->column = column;
- log->lineno = lineno;
-- log->data = (Vuln_t *)NULL;
-+ log->data = &vuln_PerlBacktick;
- log->type = PerlBacktick;
- log->severity = severity;
- log->uses = (toctou_use_t *)NULL;
-@@ -342,7 +369,7 @@
- log->filename = current_file;
- log->column = column;
- log->lineno = lineno;
-- log->data = (Vuln_t *)NULL;
-+ log->data = &vuln_PhpBacktick;
- log->type = PhpBacktick;
- log->severity = severity;
- log->uses = (toctou_use_t *)NULL;
-@@ -358,7 +385,7 @@
- log->filename = current_file;
- log->column = column;
- log->lineno = lineno;
-- log->data = (Vuln_t *)NULL;
-+ log->data = &vuln_PythonBacktick;
- log->type = PythonBacktick;
- log->severity = severity;
- log->uses = (toctou_use_t *)NULL;
-@@ -374,7 +401,16 @@
- log->filename = current_file;
- log->column = column;
- log->lineno = lineno;
-- log->data = (Vuln_t *)NULL;
-+ switch(type) {
-+ case StaticLocalBuffer:
-+ log->data = &vuln_StaticLocalBuffer;
-+ break;
-+ case StaticGlobalBuffer:
-+ log->data = &vuln_StaticGlobalBuffer;
-+ break;
-+ default:
-+ log->data = (Vuln_t *)NULL;
-+ }
- log->type = type;
- log->severity = severity;
- log->uses = (toctou_use_t *)NULL;
-@@ -432,6 +468,10 @@
- static void build_xml_vulnerability(vulnerability_t *ptr) {
- int i;
-
-+ /* Debugging - robbat2@gentoo.org 21/05/2006 */
-+ if(ptr->data == NULL)
-+ debug_vuln_dump(ptr);
-+
- printf("<vulnerability>\n");
-
- /* Output the severity */
-@@ -593,6 +633,8 @@
- void report_vulnerability(vulnerability_t *ptr)
- {
- int i;
-+ if(ptr->data == NULL)
-+ debug_vuln_dump(ptr);
-
- switch (ptr->type)
- {
-@@ -890,8 +932,10 @@
-
- static void build_html_vulnerability(vulnerability_t *ptr) {
- int i;
--
--
-+
-+ /* Debugging - robbat2@gentoo.org 21/05/2006 */
-+ if(ptr->data == NULL)
-+ debug_vuln_dump(ptr);
-
- /* Output the severity */
- printf(" <b>Severity: %s</b><br/>\n",
diff --git a/dev-util/rats/files/rats-2.4-fix-build-system.patch b/dev-util/rats/files/rats-2.4-fix-build-system.patch
new file mode 100644
index 000000000000..42972876a5c8
--- /dev/null
+++ b/dev-util/rats/files/rats-2.4-fix-build-system.patch
@@ -0,0 +1,27 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -50,15 +50,15 @@
+ $(LEX) $(LEXFLAGS) -Pyyruby ruby-lex.l
+
+ install: $(BIN)
+- ./mkinstalldirs $(BINDIR) $(LIBDIR) $(MANDIR) $(MANDIR)/man1 $(SHAREDIR)
+- $(INSTALL_PROGRAM) $(BIN) $(BINDIR)
+- $(INSTALL_DATA) rats-python.xml $(SHAREDIR)
+- $(INSTALL_DATA) rats-c.xml $(SHAREDIR)
+- $(INSTALL_DATA) rats-perl.xml $(SHAREDIR)
+- $(INSTALL_DATA) rats-php.xml $(SHAREDIR)
+- $(INSTALL_DATA) rats-ruby.xml $(SHAREDIR)
+- $(INSTALL_DATA) rats-openssl.xml $(SHAREDIR)
+- $(INSTALL_DATA) rats.1 $(MANDIR)/man1
++ ./mkinstalldirs $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(SHAREDIR)
++ $(INSTALL_PROGRAM) $(BIN) $(DESTDIR)$(BINDIR)
++ $(INSTALL_DATA) rats-python.xml $(DESTDIR)$(SHAREDIR)
++ $(INSTALL_DATA) rats-c.xml $(DESTDIR)$(SHAREDIR)
++ $(INSTALL_DATA) rats-perl.xml $(DESTDIR)$(SHAREDIR)
++ $(INSTALL_DATA) rats-php.xml $(DESTDIR)$(SHAREDIR)
++ $(INSTALL_DATA) rats-ruby.xml $(DESTDIR)$(SHAREDIR)
++ $(INSTALL_DATA) rats-openssl.xml $(DESTDIR)$(SHAREDIR)
++ $(INSTALL_DATA) rats.1 $(DESTDIR)$(MANDIR)/man1
+
+ clean:
+ rm -f $(OBJ) *~ $(BIN) core
diff --git a/dev-util/rats/rats-2.1-r2.ebuild b/dev-util/rats/rats-2.1-r2.ebuild
deleted file mode 100644
index 161aeea514e1..000000000000
--- a/dev-util/rats/rats-2.1-r2.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=3
-inherit eutils
-
-DESCRIPTION="RATS - Rough Auditing Tool for Security"
-HOMEPAGE="http://www.fortifysoftware.com/security-resources/rats.jsp"
-SRC_URI="http://www.fortifysoftware.com/servlet/downloads/public/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-IUSE=""
-
-DEPEND="dev-libs/expat"
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-add-getopt-trailing-null.patch
- epatch "${FILESDIR}"/${P}-fix-null-pointers.patch
-}
-
-src_configure() {
- econf --datadir="${EPREFIX}/usr/share/${PN}/"
-}
-
-src_install () {
- einstall SHAREDIR="${ED}/usr/share/${PN}" MANDIR="${ED}/usr/share/man"
- dodoc README README.win32
-}
-
-pkg_postinst() {
- ewarn "Please be careful when using this program with it's force language"
- ewarn "option, '--language <LANG>' it may take huge amounts of memory when"
- ewarn "it tries to treat binary files as some other type."
-}
diff --git a/dev-util/rats/rats-2.4.ebuild b/dev-util/rats/rats-2.4.ebuild
index 1c49b7c4df49..0a41658a9907 100644
--- a/dev-util/rats/rats-2.4.ebuild
+++ b/dev-util/rats/rats-2.4.ebuild
@@ -1,7 +1,8 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=3
+EAPI=6
+
inherit eutils
DESCRIPTION="RATS - Rough Auditing Tool for Security"
@@ -13,23 +14,25 @@ SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
IUSE=""
-DEPEND="dev-libs/expat"
+RDEPEND="dev-libs/expat:="
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.4-fix-build-system.patch )
src_prepare() {
- edos2unix $(find "${S}" -name '*.[chl]' -o -name '*.in' -o -name '*.am')
- #epatch "${FILESDIR}"/${PN}-2.1-add-getopt-trailing-null.patch
- #epatch "${FILESDIR}"/${PN}-2.1-fix-null-pointers.patch
+ default
+
+ local f
+ while IFS="" read -d $'\0' -r f; do
+ einfo "Converting ${f} from CRLF to LF"
+ edos2unix "${f}"
+ done < <(find \( -name '*.[chl]' -o -name '*.in' -o -name '*.am' \) -print0)
}
src_configure() {
econf --datadir="${EPREFIX}/usr/share/${PN}/"
}
-src_install () {
- einstall SHAREDIR="${ED}/usr/share/${PN}" MANDIR="${ED}/usr/share/man"
- dodoc README README.win32
-}
-
pkg_postinst() {
ewarn "Please be careful when using this program with it's force language"
ewarn "option, '--language <LANG>' it may take huge amounts of memory when"