* [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/, /
@ 2022-11-08 23:49 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-11-08 23:49 UTC (permalink / raw
To: gentoo-commits
commit: 9d454e1ad76d4a6fcb0184854e9a65ad6929e972
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 8 23:47:51 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 8 23:49:16 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9d454e1a
install-qa-check.d/90gcc-warnings: add further FORTIFY_SOURCE-related warnings
These are the compile-time parts of FORTIFY_SOURCE [0]:
* -Wstringop-overflow (GCC only)
* -Wfortify-source (Clang only)
[0] https://maskray.me/blog/2022-11-06-fortify-source
Signed-off-by: Sam James <sam <AT> gentoo.org>
NEWS | 2 ++
bin/install-qa-check.d/90gcc-warnings | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/NEWS b/NEWS
index ac21358b2..5395d0cb2 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ Features:
* -Wmismatched-dealloc
* -Wodr (LTO esp.)
* -Wreturn-type
+ * -Wstringop-overflow (GCC, FORTIFY_SOURCE)
+ * -Wfortify-source (Clang, FORTIFY_SOURCE)
* ecompress, etc: Support additional compression suffixes for texinfo:
.Z, .bz2, .lzma, .lz, .xz, .zst (bug #757525).
diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index 3a57c0a3b..579cb4135 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -37,6 +37,10 @@ gcc_warn_check() {
'warning: .*\[-Wfree-nonheap-object\]'
# those three do not have matching -W flags, it seems
'warning: .*will always overflow destination buffer'
+ # compile-time part of FORTIFY_SOURCE
+ 'warning: .*\[-Wstringop-overflow\]'
+ # clang-only, equivalent of -Wstringop-overflow
+ 'warning: .*\[-Wfortify-source\]'
'warning: .*assuming pointer wraparound does not occur'
'warning: .*escape sequence out of range'
# left-hand operand of comma expression has no effect
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/, /
@ 2022-11-09 3:31 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-11-09 3:31 UTC (permalink / raw
To: gentoo-commits
commit: ee5ab4ca94fb308068d24291268abf52b9644c82
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 9 03:30:42 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 9 03:31:48 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ee5ab4ca
install-qa-check.d/90gcc-warnings: add -Wint-to-void-pointer-cast
We already have the other -Wint-conversions and this complements
-Wpointer-to-int-cast and -Wint-to-pointer-cast. The motivation
for all of these is finding things which are likely to break
across bitness.
Signed-off-by: Sam James <sam <AT> gentoo.org>
NEWS | 1 +
bin/install-qa-check.d/90gcc-warnings | 2 ++
2 files changed, 3 insertions(+)
diff --git a/NEWS b/NEWS
index f8441b6ec..cf3487e4b 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ Features:
* -Wint-conversion
* -Wint-to-pointer-cast
* -Wpointer-to-int-cast
+ * -Wint-to-void-pointer-cast
* install-qa-check.d: 90gcc-warnings: Always die on -Wimplicit-function-declaration
and remove bin/check-implicit-pointer-usage.py of dubious licencing (it was
diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index 2edabcde7..cdffcd029 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -64,6 +64,8 @@ gcc_warn_check() {
'warning: .*\[-Wint-conversion\]'
# warning: cast to ... from integer of different size (or smaller size)
'warning: .*\[-Wint-to-pointer-cast\]'
+ # warning: cast to ... from (smaller) integer type
+ 'warning: .*\[-Wint-to-void-pointer-cast\]'
# warning: cast from ... to integer of different size
'warning: .*\[-Wpointer-to-int-cast\]'
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/, /
@ 2022-11-09 7:30 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-11-09 7:30 UTC (permalink / raw
To: gentoo-commits
commit: 2a352b6ff5ddd3a2d25ff6d0e6a50bc9daab67d6
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 9 07:17:45 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 9 07:30:36 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2a352b6f
install-qa-check.d/90gcc-warnings: add -Wcast-function-type-strict
New Clang flag which will warn on casts that'll break with CFI.
Signed-off-by: Sam James <sam <AT> gentoo.org>
NEWS | 1 +
bin/install-qa-check.d/90gcc-warnings | 2 ++
2 files changed, 3 insertions(+)
diff --git a/NEWS b/NEWS
index 6fe36cbe0..16552ea7d 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ Features:
* -Wint-to-pointer-cast
* -Wpointer-to-int-cast
* -Wint-to-void-pointer-cast
+ * -Wcast-function-type-strict (Clang, CFI)
* Further -Wformat matches for missing specifiers.
In future, we may warn on all -Wformat (in particular because of e.g.
time_t & LFS).
diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings
index d8322871b..7fd8502ef 100644
--- a/bin/install-qa-check.d/90gcc-warnings
+++ b/bin/install-qa-check.d/90gcc-warnings
@@ -92,6 +92,8 @@ gcc_warn_check() {
'warning: .*\[-Wincompatible-pointer-types\]'
# more specific form of -Wincompatible-pointer-types (Clang)
'warning: .*\[-Wincompatible-function-pointer-types\]'
+ # these will fail with CFI (https://reviews.llvm.org/D134831)
+ 'warning: .*\[-Wcast-function-type-strict\]'
# using wrong deallocator, e.g. using free() on object allocated using my_malloc()
# when my_malloc() is annotated as needing my_free().
'warning: .*\[-Wmismatched-dealloc\]'
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/, /
@ 2022-12-10 1:46 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-12-10 1:46 UTC (permalink / raw
To: gentoo-commits
commit: ddaf25365f74227dc581b9e2c38b0c0cc9c6d6b5
Author: Oskari Pirhonen <xxc3ncoredxx <AT> gmail <DOT> com>
AuthorDate: Mon Dec 5 01:22:07 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 01:46:43 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ddaf2536
install-qa-check.d/60pkgconfig: remove PCRE
The pattern in question works with both `grep -P` and `grep -E`, prefer
the latter to avoid having to check if grep is built with PCRE support.
'=(/usr)?/lib\b'
Bug: https://bugs.gentoo.org/884285
Signed-off-by: Oskari Pirhonen <xxc3ncoredxx <AT> gmail.com>
Closes: https://github.com/gentoo/portage/pull/957
Signed-off-by: Sam James <sam <AT> gentoo.org>
NEWS | 2 ++
bin/install-qa-check.d/60pkgconfig | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index ea9967d0f..8f4983e06 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ Features:
Bug fixes:
* glsa: Abort if a GLSA's arch list doesn't match the expected format (bug #882797).
+* install-qa-check.d: 60pkgconfig: avoid using grep -P (PCRE) unnecessarily (bug #884285).
+
* etc-update: Apply defences for patsub_replacement being default on in Bash 5.2
(bug #881383).
diff --git a/bin/install-qa-check.d/60pkgconfig b/bin/install-qa-check.d/60pkgconfig
index f44ec232a..c982dbdf4 100644
--- a/bin/install-qa-check.d/60pkgconfig
+++ b/bin/install-qa-check.d/60pkgconfig
@@ -77,7 +77,7 @@ pkgconfig_check() {
fi
elif [[ ${f} == *lib64/pkgconfig* ]] ; then
# We want to match /lib/, /lib/foo/, but not e.g. /lib64 or /lib64/, or libfoo
- if grep -qP '=(/usr)?/lib\b' ${f} ; then
+ if grep -E -q '=(/usr)?/lib\b' ${f} ; then
bad_libdir+=( "${f//${D}}" )
fi
fi
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/, /
@ 2023-04-23 20:49 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-04-23 20:49 UTC (permalink / raw
To: gentoo-commits
commit: 6a21e8643a56f91c724f23d652fb43ead5c1e2af
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 19 14:27:42 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 23 20:49:26 2023 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6a21e864
install-qa-check.d: Add a install log check for missing dev-python/cython dep
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1024
Signed-off-by: Sam James <sam <AT> gentoo.org>
NEWS | 2 ++
bin/install-qa-check.d/90cython-dep | 45 +++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/NEWS b/NEWS
index e60262509..50d96402c 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ Features:
- -Wmain
- -Wimplicit-int
- -Wstring-compare
+* install-qa-check.d: cython-dep: Report packages that are using Cython
+ but are missing BDEPEND on it.
Bug fixes:
* econf now checks for proper end of string in "configure --help" output for
diff --git a/bin/install-qa-check.d/90cython-dep b/bin/install-qa-check.d/90cython-dep
new file mode 100644
index 000000000..4932c0242
--- /dev/null
+++ b/bin/install-qa-check.d/90cython-dep
@@ -0,0 +1,45 @@
+# Check for missing dev-python/cython dep based on output
+# from setuptools cythonize() support
+
+cython_dep_check() {
+ [[ ${CATEGORY}/${PN} == dev-python/cython ]] && return
+ # grepping log files is expensive, so do it only for ebuilds using
+ # distutils-r1
+ has distutils-r1 ${INHERITED} || return
+ [[ ${BDEPEND} == *dev-python/cython* ]] && return
+
+ # Evaluate misc gcc warnings
+ if [[ -n ${PORTAGE_LOG_FILE} && -r ${PORTAGE_LOG_FILE} ]] ; then
+ # In debug mode, the grep calls will produce false positives
+ # if they're shown in the trace.
+ local reset_debug=0
+ if [[ ${-/x/} != $- ]] ; then
+ set +x
+ reset_debug=1
+ fi
+
+ local grep_cmd=grep
+ [[ ${PORTAGE_LOG_FILE} = *.gz ]] && grep_cmd=zgrep
+
+ # Force C locale to work around slow multibyte locales, bug #160234
+ # Force text mode as newer grep will treat non-ASCII (e.g. UTF-8) as
+ # binary when we run in the C locale.
+ local f=$(
+ LC_CTYPE=C LC_COLLATE=C "${grep_cmd}" -a "Cythonizing" \
+ "${PORTAGE_LOG_FILE}" | uniq
+ )
+ if [[ -n ${f} ]] ; then
+ __vecho -ne '\n'
+ eqawarn "QA Notice: Package seems to be missing a BDEPEND on dev-python/cython."
+ eqawarn "${f}"
+ __vecho -ne '\n'
+ fi
+
+ [[ ${reset_debug} = 1 ]] && set -x
+ fi
+}
+
+cython_dep_check
+: # guarantee successful exit
+
+# vim:ft=sh
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-23 20:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-08 23:49 [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/, / Sam James
-- strict thread matches above, loose matches on Subject: below --
2022-11-09 3:31 Sam James
2022-11-09 7:30 Sam James
2022-12-10 1:46 Sam James
2023-04-23 20:49 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox