* [gentoo-commits] proj/portage:master commit in: man/, bin/, cnf/
@ 2011-04-03 17:30 Arfrever Frehtes Taifersar Arahesis
0 siblings, 0 replies; 3+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2011-04-03 17:30 UTC (permalink / raw
To: gentoo-commits
commit: ee4f544d839722c92e83ff96f5c3c38749b3af8e
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Sun Apr 3 17:28:58 2011 +0000
Commit: Arfrever Frehtes Taifersar Arahesis <arfrever <AT> gentoo <DOT> org>
CommitDate: Sun Apr 3 17:28:58 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ee4f544d
Support PORTAGE_GPG_SIGNING_COMMAND variable.
---
bin/repoman | 27 +++++++++++++++------------
cnf/make.globals | 3 +++
man/make.conf.5 | 4 ++++
3 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/bin/repoman b/bin/repoman
index 8f36372..9462753 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2419,23 +2419,26 @@ else:
# Setup the GPG commands
def gpgsign(filename):
- if "PORTAGE_GPG_KEY" not in repoman_settings:
+ if "PORTAGE_GPG_KEY" not in repoman_settings and "${PORTAGE_GPG_KEY}" in repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"]:
raise portage.exception.MissingParameter("PORTAGE_GPG_KEY is unset!")
- if "PORTAGE_GPG_DIR" not in repoman_settings:
+ if "PORTAGE_GPG_DIR" not in repoman_settings and "${PORTAGE_GPG_DIR}" in repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"]:
repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser("~/.gnupg")
logging.info("Automatically setting PORTAGE_GPG_DIR to '%s'" % repoman_settings["PORTAGE_GPG_DIR"])
- repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
- if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
- raise portage.exception.InvalidLocation(
- "Unable to access directory: PORTAGE_GPG_DIR='%s'" % \
- repoman_settings["PORTAGE_GPG_DIR"])
- gpgcmd = "gpg --sign --clearsign --yes"
- gpgcmd += " --default-key " + repoman_settings["PORTAGE_GPG_KEY"]
- gpgcmd += " --homedir " + repoman_settings["PORTAGE_GPG_DIR"]
+ if "${PORTAGE_GPG_DIR}" in repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"]:
+ repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
+ if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
+ raise portage.exception.InvalidLocation(
+ "Unable to access directory: PORTAGE_GPG_DIR='%s'" % \
+ repoman_settings["PORTAGE_GPG_DIR"])
+ gpgvars = {"FILE": filename}
+ for var in ("PORTAGE_GPG_DIR", "PORTAGE_GPG_KEY"):
+ if "${%s}" % var in repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"]:
+ gpgvars[var] = repoman_settings[var]
+ gpgcmd = portage.util.varexpand(repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"], mydict=gpgvars)
if options.pretend:
- print("("+gpgcmd+" "+filename+")")
+ print("("+gpgcmd+")")
else:
- rValue = os.system(gpgcmd+" "+filename)
+ rValue = os.system(gpgcmd)
if rValue == os.EX_OK:
os.rename(filename+".asc", filename)
else:
diff --git a/cnf/make.globals b/cnf/make.globals
index 542d6aa..95afb56 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -123,6 +123,9 @@ PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for \${PACKAGE} on \${HOST}"
PORTAGE_ELOG_MAILFROM="portage@localhost"
+# Signing command used by repoman
+PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --clearsign --yes --default-key \"\${PORTAGE_GPG_KEY}\" --homedir \"\${PORTAGE_GPG_DIR}\" \"\${FILE}\""
+
# *****************************
# ** DO NOT EDIT THIS FILE **
# ***************************************************
diff --git a/man/make.conf.5 b/man/make.conf.5
index eca82c9..a86f257 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -670,6 +670,10 @@ Defaults to $HOME/.gnupg.
The \fBgpg\fR(1) key used by \fBrepoman\fR(1) to sign manifests
when \fBsign\fR is in \fBFEATURES\fR.
.TP
+.B PORTAGE_GPG_SIGNING_COMMAND
+The command used by \fBrepoman\fR(1) to sign manifests when \fBsign\fR is
+in \fBFEATURES\fR.
+.TP
\fBPORTAGE_IONICE_COMMAND\fR = \fI[ionice command string]\fR
This variable should contain a command for portage to call in order
to adjust the io priority of portage and it's subprocesses. The command
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] proj/portage:master commit in: man/, bin/, cnf/
@ 2011-12-21 19:30 Zac Medico
0 siblings, 0 replies; 3+ messages in thread
From: Zac Medico @ 2011-12-21 19:30 UTC (permalink / raw
To: gentoo-commits
commit: b03273772744b263ae5c06de8034ec2200245964
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 21 16:10:17 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Dec 21 19:29:58 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b0327377
Support checking for ignored CFLAGS using -frecord-gcc-switches.
---
bin/misc-functions.sh | 40 ++++++++++++++++++++++++++++++++++++++++
cnf/make.conf | 3 +++
man/ebuild.5 | 9 +++++++++
man/make.conf.5 | 4 ++++
4 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 3582889..b536a63 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -308,6 +308,46 @@ install_qa_check() {
sleep 1
fi
+ # Check for files built without respecting CFLAGS
+ if [[ "${CFLAGS}" == *-frecord-gcc-switches* ]] && [[ "${PN}" != *-bin ]] ; then
+ qa_var="QA_DT_SWITCHES_${ARCH/-/_}"
+ eval "[[ -n \${!qa_var} ]] && QA_DT_SWITCHES=(\"\${${qa_var}[@]}\")"
+ f=$(scanelf -qyRF '%k %p' -k \!.GCC.command.line "${ED}" | sed -e "s:\!.GCC.command.line ::")
+ if [[ -n ${f} ]] ; then
+ echo "${f}" > "${T}"/scanelf-ignored-CFLAGS.log
+ if [ "${QA_STRICT_DT_SWITCHES-unset}" == unset ] ; then
+ if [[ ${#QA_DT_SWITCHES[@]} -gt 1 ]] ; then
+ for x in "${QA_DT_SWITCHES[@]}" ; do
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log
+ done
+ else
+ local shopts=$-
+ set -o noglob
+ for x in ${QA_DT_SWITCHES} ; do
+ sed -e "s#^${x#/}\$##" -i "${T}"/scanelf-ignored-CFLAGS.log
+ done
+ set +o noglob
+ set -${shopts}
+ fi
+ fi
+ # Filter anything under /usr/lib/debug/ in order to avoid
+ # duplicate warnings for splitdebug files.
+ sed -e "s#^usr/lib/debug/.*##" -e "/^\$/d" -e "s#^#/#" \
+ -i "${T}"/scanelf-ignored-CFLAGS.log
+ f=$(<"${T}"/scanelf-ignored-CFLAGS.log)
+ if [[ -n ${f} ]] ; then
+ vecho -ne '\n'
+ eqawarn "${BAD}QA Notice: Files built without respecting CFLAGS have been detected${NORMAL}"
+ eqawarn " Please include the following list of files in your report:"
+ eqawarn "${f}"
+ vecho -ne '\n'
+ sleep 1
+ else
+ rm -f "${T}"/scanelf-ignored-CFLAGS.log
+ fi
+ fi
+ fi
+
# Check for files built without respecting LDFLAGS
if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && [[ "${PN}" != *-bin ]] ; then
qa_var="QA_DT_HASH_${ARCH/-/_}"
diff --git a/cnf/make.conf b/cnf/make.conf
index ef570bc..aecb633 100644
--- a/cnf/make.conf
+++ b/cnf/make.conf
@@ -32,6 +32,9 @@
# package (and in some cases the libraries it uses) at default optimizations
# before reporting errors to developers.
#
+# If your gcc supports it, you can add -frecord-gcc-switches in order to enable
+# CFLAGS ignorance checking for ebuilds.
+#
# Please refer to the GCC manual for a list of possible values.
#
#CFLAGS="-O2 -pipe"
diff --git a/man/ebuild.5 b/man/ebuild.5
index 2d58c9e..1216ac1 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -602,6 +602,15 @@ This should contain a list of file paths, relative to the image directory, of
files that contain writable and executable segments. These are rare.
The paths may contain fnmatch patterns.
.TP
+\fBQA_DT_SWITCHES\fR
+This should contain a list of file paths, relative to the image directory, of
+files that do not contain .GCC.command.line sections. The paths may contain
+regular expressions with escape\-quoted special characters.
+.br
+This variable is intended to be used on files of binary packages which ignore
+CFLAGS variable.
+.TP
+.TP
\fBQA_DT_HASH\fR
This should contain a list of file paths, relative to the image directory, of
files that contain .hash sections. The paths may contain regular expressions
diff --git a/man/make.conf.5 b/man/make.conf.5
index 76adfe2..f9d69b7 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -814,6 +814,10 @@ settings from ebuilds. See also \fBebuild\fR(5).
Set this to cause portage to ignore any \fIQA_TEXTREL\fR override
settings from ebuilds. See also \fBebuild\fR(5).
.TP
+\fBQA_STRICT_DT_SWITCHES = \fI"set"\fR
+Set this to cause portage to ignore any \fIQA_DT_SWITCHES\fR override
+settings from ebuilds. See also \fBebuild\fR(5).
+.TP
\fBQA_STRICT_DT_HASH = \fI"set"\fR
Set this to cause portage to ignore any \fIQA_DT_HASH\fR override
settings from ebuilds. See also \fBebuild\fR(5).
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] proj/portage:master commit in: man/, bin/, cnf/
@ 2011-12-21 21:29 Zac Medico
0 siblings, 0 replies; 3+ messages in thread
From: Zac Medico @ 2011-12-21 21:29 UTC (permalink / raw
To: gentoo-commits
commit: 1de36ad91237651277b9e4b7e0db819efb5e6997
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 21 21:28:47 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Dec 21 21:28:47 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1de36ad9
Use *FLAGS for CFLAGS ignorance checks.
Current *FLAGS variables include CFLAGS, CXXFLAGS, FFLAGS, and FCFLAGS.
Not that this check is only enabled if every one of these variables
contains -frecord-gcc-switches, since otherwise the check could result
in false positive results.
---
bin/misc-functions.sh | 7 ++++++-
cnf/make.conf | 7 +++++--
man/ebuild.5 | 2 +-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 4cba51a..c74b4a4 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -308,8 +308,13 @@ install_qa_check() {
sleep 1
fi
- # Check for files built without respecting CFLAGS
+ # Check for files built without respecting *FLAGS. Note that
+ # -frecord-gcc-switches must be in all *FLAGS variables, in
+ # order to avoid false positive results here.
if [[ "${CFLAGS}" == *-frecord-gcc-switches* ]] && \
+ [[ "${CXXFLAGS}" == *-frecord-gcc-switches* ]] && \
+ [[ "${FFLAGS}" == *-frecord-gcc-switches* ]] && \
+ [[ "${FCFLAGS}" == *-frecord-gcc-switches* ]] && \
! has binchecks ${RESTRICT} ; then
qa_var="QA_CFLAGS_IGNORED_${ARCH/-/_}"
eval "[[ -n \${!qa_var} ]] && QA_CFLAGS_IGNORED=(\"\${${qa_var}[@]}\")"
diff --git a/cnf/make.conf b/cnf/make.conf
index aecb633..5ee1cd3 100644
--- a/cnf/make.conf
+++ b/cnf/make.conf
@@ -32,8 +32,11 @@
# package (and in some cases the libraries it uses) at default optimizations
# before reporting errors to developers.
#
-# If your gcc supports it, you can add -frecord-gcc-switches in order to enable
-# CFLAGS ignorance checking for ebuilds.
+# If your gcc supports it, you can add -frecord-gcc-switches to all of the
+# following *FLAGS in order to enable *FLAGS ignorance checking for ebuilds.
+# Note that this check is only enabled if every one of these variables contains
+# -frecord-gcc-switches, since otherwise the check could result in false
+# positive results.
#
# Please refer to the GCC manual for a list of possible values.
#
diff --git a/man/ebuild.5 b/man/ebuild.5
index a9a26a7..4f2f3a8 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -608,7 +608,7 @@ files that do not contain .GCC.command.line sections. The paths may contain
regular expressions with escape\-quoted special characters.
.br
This variable is intended to be used on files of binary packages which ignore
-CFLAGS variable.
+CFLAGS, CXXFLAGS, FFLAGS, and FCFLAGS variables.
.TP
.TP
\fBQA_DT_HASH\fR
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-21 21:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 19:30 [gentoo-commits] proj/portage:master commit in: man/, bin/, cnf/ Zac Medico
-- strict thread matches above, loose matches on Subject: below --
2011-12-21 21:29 Zac Medico
2011-04-03 17:30 Arfrever Frehtes Taifersar Arahesis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox