public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-05-29 19:39 Michael Palimaka
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Palimaka @ 2014-05-29 19:39 UTC (permalink / raw
  To: gentoo-commits

commit:     e7eb724d2b4a5c9ecb5b74928901cfe3abea28f9
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu May 29 19:33:21 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu May 29 19:37:05 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=e7eb724d

tinderbox: Initial commit adding portage bashrc.

---
 tinderbox/bashrc | 258 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
new file mode 100644
index 0000000..763979c
--- /dev/null
+++ b/tinderbox/bashrc
@@ -0,0 +1,258 @@
+# Copyright (c) 2014 Michael Palimaka <kensington@gentoo.org>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# bashrc for portage to provide QA data for the Gentoo tinderbox frontend.
+# Original concept and Tinderbox-provided QA checks by Diego Elio Pettenò
+# <flameeyes@gentoo.org>.
+#
+# Setup instructions:
+#	- Copy this file to /etc/portage/bashrc
+#	- Configure portage:
+#		- {CFLAGS,CXXFLAGS.FFLAGS,FCFLAGS}+="-frecord-gcc-switches"
+#		- LDFLAGS+="-Wl,--hash-style=gnu"
+#		- FEATURES+="test-fail-continue"
+#		- PORTAGE_ELOG_CLASSES+="qa"
+#	- Ensure TINDERBOX_DIR is writeable by the portage user
+#	- Install desktop-file-utils (strongly recommended)
+#	- Install pax-utils (strongly recommended)
+#	- Install depcheck (optional)
+#	- Install pkgcore-checks (optional)
+#
+# CURRENT QA CHECKS
+# Portage provided:
+#	- Ignored CFLAGS/LDFLAGS
+#	- Missing NEEDED/SONAE
+#	- EXECSTACK
+#	- TEXTRELS
+#	- Certain logged eqawarns
+#
+# Tinderbox provided:
+#	- Binaries in /usr/share
+#	- Bundled libraries
+#	- .desktop file validation
+#	- Illegal directories
+#	- Insecure functions
+#	- Misplaced documentation
+#	- OS X fork files
+#	- Pointless .la files
+#	- setXid
+#	- site_dir perl files
+#
+# External provided:
+#	- depcheck
+#	- pcheck
+#	- repoman
+#
+# Todo:
+#	- am_maintainer_mode
+#	- bash_command_not_found
+#	- configure_opts_warn
+#	- has_lafile_headers
+#	- helper_missing_file
+#	- make_jobserver
+#	- unicode_errors
+
+: ${TINDERBOX_DIR:="/var/cache/tinderbox"}
+
+PACKAGE_DATA_DIR="${TINDERBOX_DIR}/${CATEGORY}/${PN}"
+BUILD_DATA_DIR="${PACKAGE_DATA_DIR}/${PF}/$(uuidgen)"
+
+tinderbox_setup_common() {
+	SANDBOX_ON=0 mkdir -p "${BUILD_DATA_DIR}" > /dev/null
+	write_data arch ${ARCH}
+	write_data description ${DESCRIPTION}
+	write_data profile $(eselect profile show | tail -1)
+	write_data timestamp $(date --utc "+%F %T %Z")
+}
+
+tinderbox_teardown_common() {
+	SANDBOX_ON=0 cp "${T}"/build.log "${BUILD_DATA_DIR}"
+}
+
+tinderbox_success() {
+	tinderbox_setup_common
+	tinderbox_postinst_checks
+	write_data success true
+	tinderbox_teardown_common
+}
+
+tinderbox_failure() {
+	if [[ ${EBUILD_PHASE} == test ]] ; then
+		touch "${T}"/testsfailed
+		return 0
+	fi
+	tinderbox_setup_common
+	tinderbox_teardown_common
+}
+
+tinderbox_postinst_checks() {
+	# QA logs created by portage:
+	#	- scanelf-execstack.log
+	# 	- scanelf-ignored-CFLAGS.log
+	#	- scanelf-ignored-LDFLAGS.log
+	#	- scanelf-missing-NEEDED.log
+	#	- scanelf-missing-SONAME.log
+	#	- scanelf-textrel.log
+	SANDBOX_ON=0 cp "${T}"/scanelf-*.log "${BUILD_DATA_DIR}" 2> /dev/null
+
+	SANDBOX_ON=0 cp "${T}"/testsfailed "${BUILD_DATA_DIR}" 2> /dev/null
+	SANDBOX_ON=0 find "${T}" -name "tinderbox-*.log" -not -empty -execdir mv '{}' "${BUILD_DATA_DIR}" \;
+	SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* > "${BUILD_DATA_DIR}"/portageqa
+
+	if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] ; then
+		SANDBOX_ON=0 rm "${BUILD_DATA_DIR}"/portageqa
+	fi
+
+	if type -P depcheck > /dev/null ; then
+		SANDBOX_ON=0 depcheck ${PF} > "${BUILD_DATA_DIR}"/depcheck
+	fi
+
+	#pushd "$(dirname ${FILESDIR})" > /dev/null
+	#SANDBOX_ON=0 repoman > "${PACKAGE_DATA_DIR}"/repoman
+	#SANDBOX_ON=0 pcheck --license-dir "${PORTDIR}"/licenses > "${PACKAGE_DATA_DIR}"/pchecks
+	#popd > /dev/null
+}
+
+write_data() {
+	local file=$1
+	shift
+
+	SANDBOX_ON=0 echo $@ >> "${BUILD_DATA_DIR}/${file}"
+}
+
+tinderbox_log() {
+	cat - > "${T}"/${1}
+}
+
+#
+# Function overrides to catch QA issues
+#
+
+make() {
+	if [[ "${FUNCNAME[1]}" == "einstall" ]] ; then
+		emake -j1 "$@"
+	else
+		emake "$@"
+
+		if [[ "${FUNCNAME[1]}" == "__eapi0_src_test" ]] ; then
+			return
+		fi
+
+		eqawarn QA Notice: direct 'make' call by ${FUNCNAME[1]}
+	fi
+}
+
+#
+# QA functions
+#
+
+# Checks for symbols commonly exported by well-known libraries such eg. libpng
+bundled_symbols() {
+	for symbol in adler32 BZ2_decompress jpeg_mem_init XML_Parse avcodec_init png_get_libpng_ver lt_dlopen GC_stdout; do
+		scanelf -qRs +$symbol "${D}" | tinderbox_log tinderbox-scanelf-bundled.log
+	done
+}
+
+# Checks for usage of functions that may pose a potential security issue.
+insecure_functions() {
+#	for symbol in tmpnam tmpnam_r tempnam gets sigstack getpw getwd mktemp exit; do
+	for symbol in tmpnam tmpnam_r tempnam gets sigstack getpw getwd mktemp; do
+		scanelf -qRs -$symbol "${D}" | tinderbox_log tinderbox-scanelf-insecure.log
+	done
+}
+
+# Finds ELF files in /usr/share. These should be installed to some other location.
+share_elfs() {
+	scanelf -R "${D}"/usr/share | tinderbox_log tinderbox-share-elfs.log
+}
+
+# Locate OS X fork files. These should not be installed at all.
+osx_forkfile() {
+	find "${D}" -name '._*' -printf "/%P\n" | tinderbox_log tinderbox-osx-forkfile.log
+}
+
+# Locate setXid files which may pose a security issue.
+setXid() {
+	find "${D}" -perm /6000 -printf "%#m %u:%g /%P\n" | tinderbox_log tinderbox-setXid-binaries.log
+}
+
+# Locate la files that serve no purpose.
+pointless_la() {
+	find "${D}" \
+		\( -path "${D}"usr/lib\*/python\*/site-packages/\* -or \
+		-path "${D}"usr/lib\*/ruby\*/site_ruby/\* -or \
+		-path "${D}"usr/lib\*/perl5/\* -or \
+		-path "${D}"lib\*/security/\* \) -name '*.la' \
+		-printf "/%P\n" | tinderbox_log tinderbox-pointless-la.log
+}
+
+# Find directories that are not permitted to be used by ebuilds.
+invalid_directory() {
+	find "${D}" \
+		\( -path "${D}"usr/man\* -or \
+		-path "${D}"usr/man/\* -or \
+		-path "${D}"usr/info/\* -or \
+		-path "${D}"usr/X11R6/\* -or \
+		-path "${D}"usr/locale/\* -or \
+		-path "${D}"usr/local/\* -or \
+		-path "${D}"var/lock\* -or \
+		-path "${D}"var/run/\* -or \
+		-path "${D}"dev/\* \
+		\) -printf "/%P\n" | tinderbox_log tinderbox-invalid-directory.log
+}
+
+# Perl files should be installed into vendor_perl, not site_perl.
+site_perl() {
+	find "${D}" \
+		-path "${D}"usr/lib*/perl5/site_perl/\* \
+		-printf "/%P\n" | tinderbox_log tinderbox-site-perl.log
+}
+
+# Most documentation should be installed to /usr/share/doc/${PF}
+misplaced_doc() {
+	find "${D}" \
+		-path "${D}"usr/doc/\* -or \
+		\( -path "${D}"usr/share/doc/\* -type d \
+			-prune -not \( -name "${PF}" -or -name 'KDE4' -or -name 'HTML' \) \
+		\) -printf "/%P\n" | tinderbox_log tinderbox-misplaced-doc.log
+}
+
+# Locate .desktop files that do not pass validation
+invalid_desktop_files() {
+	find "${D}" -maxdepth 4 -path "${D}"usr/share/applications/\* \
+		-name '*.desktop' -exec desktop-file-validate '{}' + | \
+		tinderbox_log tinderbox-invalid-desktop-file.log
+}
+
+#
+# Portage hooks
+#
+
+pre_pkg_setup() {
+	register_success_hook tinderbox_success
+	register_die_hook tinderbox_failure
+}
+
+post_src_install() {
+	bundled_symbols
+	insecure_functions
+	share_elfs
+	osx_forkfile
+	setXid
+	pointless_la
+	invalid_directory
+	site_perl
+	misplaced_doc
+	invalid_desktop_files
+}


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-06-04 14:55 Michael Palimaka
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Palimaka @ 2014-06-04 14:55 UTC (permalink / raw
  To: gentoo-commits

commit:     0e6e3a57a8de9287892f2a67cd37632b43754aee
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  4 14:06:06 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Jun  4 14:48:23 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=0e6e3a57

tinderbox: return the exit status of the make function override.

This ensure that tests are correctly detected as passed/failed by
portage.
Also, calling /usr/bin/make instead of emake should more
accurately replicate the behaviour intended by the original
function call.

---
 tinderbox/bashrc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 763979c..47bb19e 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -140,17 +140,16 @@ tinderbox_log() {
 #
 
 make() {
-	if [[ "${FUNCNAME[1]}" == "einstall" ]] ; then
-		emake -j1 "$@"
+	if [[ "${FUNCNAME[1]}" == "einstall" || "${FUNCNAME[1]}" == "__eapi0_src_test" ]] ; then
+		/usr/bin/make -j1 "$@"
+		ret=$?
 	else
 		emake "$@"
-
-		if [[ "${FUNCNAME[1]}" == "__eapi0_src_test" ]] ; then
-			return
-		fi
-
+		ret=$?
 		eqawarn QA Notice: direct 'make' call by ${FUNCNAME[1]}
 	fi
+
+	return ${ret}
 }
 
 #


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-06-04 14:55 Michael Palimaka
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Palimaka @ 2014-06-04 14:55 UTC (permalink / raw
  To: gentoo-commits

commit:     80afff4de68935f6a93bdcf9b49cfde601bca2ee
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  4 14:43:53 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Jun  4 14:48:25 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=80afff4d

tinderbox: remove references to pkgcore-checks, repoman, and DESCRIPTION.

These will now be collected at a different stage of the process.

---
 tinderbox/bashrc | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 47bb19e..85bd691 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -27,7 +27,6 @@
 #	- Install desktop-file-utils (strongly recommended)
 #	- Install pax-utils (strongly recommended)
 #	- Install depcheck (optional)
-#	- Install pkgcore-checks (optional)
 #
 # CURRENT QA CHECKS
 # Portage provided:
@@ -51,8 +50,6 @@
 #
 # External provided:
 #	- depcheck
-#	- pcheck
-#	- repoman
 #
 # Todo:
 #	- am_maintainer_mode
@@ -71,7 +68,6 @@ BUILD_DATA_DIR="${PACKAGE_DATA_DIR}/${PF}/$(uuidgen)"
 tinderbox_setup_common() {
 	SANDBOX_ON=0 mkdir -p "${BUILD_DATA_DIR}" > /dev/null
 	write_data arch ${ARCH}
-	write_data description ${DESCRIPTION}
 	write_data profile $(eselect profile show | tail -1)
 	write_data timestamp $(date --utc "+%F %T %Z")
 }
@@ -117,11 +113,6 @@ tinderbox_postinst_checks() {
 	if type -P depcheck > /dev/null ; then
 		SANDBOX_ON=0 depcheck ${PF} > "${BUILD_DATA_DIR}"/depcheck
 	fi
-
-	#pushd "$(dirname ${FILESDIR})" > /dev/null
-	#SANDBOX_ON=0 repoman > "${PACKAGE_DATA_DIR}"/repoman
-	#SANDBOX_ON=0 pcheck --license-dir "${PORTDIR}"/licenses > "${PACKAGE_DATA_DIR}"/pchecks
-	#popd > /dev/null
 }
 
 write_data() {


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-06-04 14:55 Michael Palimaka
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Palimaka @ 2014-06-04 14:55 UTC (permalink / raw
  To: gentoo-commits

commit:     8677538d9bfbc3ecf450bdecaba67d056faa33b3
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  4 14:48:49 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Jun  4 14:48:49 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=8677538d

tinderbox: change default storage directory.

Collected data is intended to persist unless manually removed, so
/var/lib is a better fit as per FHS.

---
 tinderbox/bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 85bd691..6f25266 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -60,7 +60,7 @@
 #	- make_jobserver
 #	- unicode_errors
 
-: ${TINDERBOX_DIR:="/var/cache/tinderbox"}
+: ${TINDERBOX_DIR:="/var/lib/tinderbox"}
 
 PACKAGE_DATA_DIR="${TINDERBOX_DIR}/${CATEGORY}/${PN}"
 BUILD_DATA_DIR="${PACKAGE_DATA_DIR}/${PF}/$(uuidgen)"


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-06-04 14:55 Michael Palimaka
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Palimaka @ 2014-06-04 14:55 UTC (permalink / raw
  To: gentoo-commits

commit:     704c40b879e056c3939db3f74a3b1798b77363d2
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  4 14:53:02 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Jun  4 14:53:02 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=704c40b8

tinderbox: improve comments.

---
 tinderbox/bashrc | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 6f25266..584a9a1 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -19,13 +19,13 @@
 # Setup instructions:
 #	- Copy this file to /etc/portage/bashrc
 #	- Configure portage:
-#		- {CFLAGS,CXXFLAGS.FFLAGS,FCFLAGS}+="-frecord-gcc-switches"
-#		- LDFLAGS+="-Wl,--hash-style=gnu"
-#		- FEATURES+="test-fail-continue"
-#		- PORTAGE_ELOG_CLASSES+="qa"
+#		- {CFLAGS,CXXFLAGS.FFLAGS,FCFLAGS}="-frecord-gcc-switches"
+#		- LDFLAGS="-Wl,--hash-style=gnu ${LDFLAGS}"
+#		- FEATURES="test-fail-continue"
+#		- PORTAGE_ELOG_CLASSES="qa"
 #	- Ensure TINDERBOX_DIR is writeable by the portage user
-#	- Install desktop-file-utils (strongly recommended)
-#	- Install pax-utils (strongly recommended)
+#	- Install desktop-file-utils (recommended)
+#	- Install pax-utils (recommended)
 #	- Install depcheck (optional)
 #
 # CURRENT QA CHECKS
@@ -92,6 +92,8 @@ tinderbox_failure() {
 	tinderbox_teardown_common
 }
 
+# These checks cannot be performed until after post_src_install because
+# the required data is not yet available.
 tinderbox_postinst_checks() {
 	# QA logs created by portage:
 	#	- scanelf-execstack.log


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-06-08 16:30 Michael Palimaka
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Palimaka @ 2014-06-08 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     5f59042ba48b944f9d97e10fd83b24222cb5b48d
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  8 16:29:28 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sun Jun  8 16:29:30 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=5f59042b

tinderbox: add DEPCHECK_BIN configuration variable.

It's not packaged anywhere, so people might want to store it in a
custom location.

---
 tinderbox/bashrc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 584a9a1..121f20e 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -60,6 +60,7 @@
 #	- make_jobserver
 #	- unicode_errors
 
+: ${DEPCHECK_BIN:="/usr/bin/depcheck"}
 : ${TINDERBOX_DIR:="/var/lib/tinderbox"}
 
 PACKAGE_DATA_DIR="${TINDERBOX_DIR}/${CATEGORY}/${PN}"
@@ -112,8 +113,8 @@ tinderbox_postinst_checks() {
 		SANDBOX_ON=0 rm "${BUILD_DATA_DIR}"/portageqa
 	fi
 
-	if type -P depcheck > /dev/null ; then
-		SANDBOX_ON=0 depcheck ${PF} > "${BUILD_DATA_DIR}"/depcheck
+	if type -P "${DEPCHECK_BIN}" > /dev/null ; then
+		SANDBOX_ON=0 "${DEPCHECK_BIN}" ${PF} > "${BUILD_DATA_DIR}"/depcheck
 	fi
 }
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-06-08 17:59 Michael Palimaka
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Palimaka @ 2014-06-08 17:59 UTC (permalink / raw
  To: gentoo-commits

commit:     5d47213d87c7797b5bb66142089d15fa583af8bb
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  8 17:59:07 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sun Jun  8 17:59:07 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=5d47213d

tinderbox: remove blank lines from eselect profile output.

There was an issue where using a profile from an overlay causes
eselect to print an extra blank line.

---
 tinderbox/bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 121f20e..c7cc6f2 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -69,7 +69,7 @@ BUILD_DATA_DIR="${PACKAGE_DATA_DIR}/${PF}/$(uuidgen)"
 tinderbox_setup_common() {
 	SANDBOX_ON=0 mkdir -p "${BUILD_DATA_DIR}" > /dev/null
 	write_data arch ${ARCH}
-	write_data profile $(eselect profile show | tail -1)
+	write_data profile $(eselect profile show | grep -v "^[[:space:]]*$" | tail -1)
 	write_data timestamp $(date --utc "+%F %T %Z")
 }
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-08-28  4:19 Richard Farina
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Farina @ 2014-08-28  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     466bce37388bf9d5bf26c9cf813761df17ecb187
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 04:19:10 2014 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 04:19:10 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=466bce37

use $(cat /proc/sys/kernel/random/uuid) for uuid

---
 tinderbox/bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index f6d6351..71da78e 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -64,7 +64,7 @@
 : ${TINDERBOX_DIR:="/var/log/tinderbox"}
 
 PACKAGE_DATA_DIR="${TINDERBOX_DIR}/${CATEGORY}/${PN}"
-BUILD_DATA_DIR="${PACKAGE_DATA_DIR}/${PF}/$(uuidgen)"
+BUILD_DATA_DIR="${PACKAGE_DATA_DIR}/${PF}/$(cat /proc/sys/kernel/random/uuid)"
 
 tinderbox_setup_common() {
 	SANDBOX_ON=0 mkdir -p "${BUILD_DATA_DIR}" > /dev/null


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-08-28  4:19 Richard Farina
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Farina @ 2014-08-28  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     517a9b0dc142c8264ec593dfda3bcb12e208df5d
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 04:18:06 2014 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 04:18:06 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=517a9b0d

change default log directory to be in /var/log

---
 tinderbox/bashrc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index c7cc6f2..f6d6351 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -61,7 +61,7 @@
 #	- unicode_errors
 
 : ${DEPCHECK_BIN:="/usr/bin/depcheck"}
-: ${TINDERBOX_DIR:="/var/lib/tinderbox"}
+: ${TINDERBOX_DIR:="/var/log/tinderbox"}
 
 PACKAGE_DATA_DIR="${TINDERBOX_DIR}/${CATEGORY}/${PN}"
 BUILD_DATA_DIR="${PACKAGE_DATA_DIR}/${PF}/$(uuidgen)"


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-08-28  4:51 Michael Palimaka
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Palimaka @ 2014-08-28  4:51 UTC (permalink / raw
  To: gentoo-commits

commit:     26cae8488b7a38fb8577952572868a03fd415709
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 04:50:52 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 04:50:52 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=26cae848

tinderbox: add an option to be more verbose

---
 tinderbox/bashrc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 71da78e..560c3fd 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -62,6 +62,7 @@
 
 : ${DEPCHECK_BIN:="/usr/bin/depcheck"}
 : ${TINDERBOX_DIR:="/var/log/tinderbox"}
+: ${TINDERBOX_VERBOSE:=true}
 
 PACKAGE_DATA_DIR="${TINDERBOX_DIR}/${CATEGORY}/${PN}"
 BUILD_DATA_DIR="${PACKAGE_DATA_DIR}/${PF}/$(cat /proc/sys/kernel/random/uuid)"
@@ -115,6 +116,9 @@ tinderbox_postinst_checks() {
 
 	if type -P "${DEPCHECK_BIN}" > /dev/null ; then
 		SANDBOX_ON=0 "${DEPCHECK_BIN}" ${PF} > "${BUILD_DATA_DIR}"/depcheck
+		if [[ "${TINDERBOX_VERBOSE}" == true ]] ; then
+			cat "${BUILD_DATA_DIR}"/depcheck
+		fi
 	fi
 }
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-08-28 18:12 Richard Farina
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Farina @ 2014-08-28 18:12 UTC (permalink / raw
  To: gentoo-commits

commit:     6f206114aa3b978fc7206cd2d329114db461ea55
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 17:39:22 2014 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 17:39:22 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=6f206114

check ${T}"/logging/* existence before grepping

sometimes there are no files in ${T}"/logging/ and grep makes an ugly
error.  check for files there before grepping.  Fix check to remove
portageqa, it seem the opposite of test -s ( file exists and has size
greater than zero ) matched when the file doesn't exist... well, that is
the opposite after all.

---
 tinderbox/bashrc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 8533e2b..6d21868 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -108,9 +108,11 @@ tinderbox_postinst_checks() {
 
 	SANDBOX_ON=0 cp "${T}"/testsfailed "${BUILD_DATA_DIR}" 2> /dev/null
 	SANDBOX_ON=0 find "${T}" -name "tinderbox-*.log" -not -empty -execdir mv '{}' "${BUILD_DATA_DIR}" \;
-	SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* > "${BUILD_DATA_DIR}"/portageqa
+	if [ ls "${T}"/logging/* > /dev/null 2>&1 ] ; then
+		SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* > "${BUILD_DATA_DIR}"/portageqa
+	fi
 
-	if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] ; then
+	if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] && [ -f "${BUILD_DATA_DIR}"/portageqa ] ; then
 		SANDBOX_ON=0 rm "${BUILD_DATA_DIR}"/portageqa
 	fi
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
@ 2014-08-28 18:30 Richard Farina
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Farina @ 2014-08-28 18:30 UTC (permalink / raw
  To: gentoo-commits

commit:     08cf4285e90a4521340ba1714ee0c0f80176de71
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 18:30:36 2014 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 18:30:36 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=08cf4285

proper fix for empty logging dir

revert 6f206114aa3b978fc7206cd2d329114db461ea55, proper fix is to just
use recursive grep.

---
 tinderbox/bashrc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 6d21868..b378dac 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -108,11 +108,9 @@ tinderbox_postinst_checks() {
 
 	SANDBOX_ON=0 cp "${T}"/testsfailed "${BUILD_DATA_DIR}" 2> /dev/null
 	SANDBOX_ON=0 find "${T}" -name "tinderbox-*.log" -not -empty -execdir mv '{}' "${BUILD_DATA_DIR}" \;
-	if [ ls "${T}"/logging/* > /dev/null 2>&1 ] ; then
-		SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* > "${BUILD_DATA_DIR}"/portageqa
-	fi
+	SANDBOX_ON=0 grep --no-filename -r QA "${T}"/logging/ > "${BUILD_DATA_DIR}"/portageqa
 
-	if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] && [ -f "${BUILD_DATA_DIR}"/portageqa ] ; then
+	if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] ; then
 		SANDBOX_ON=0 rm "${BUILD_DATA_DIR}"/portageqa
 	fi
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-08-28 18:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 18:12 [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/ Richard Farina
  -- strict thread matches above, loose matches on Subject: below --
2014-08-28 18:30 Richard Farina
2014-08-28  4:51 Michael Palimaka
2014-08-28  4:19 Richard Farina
2014-08-28  4:19 Richard Farina
2014-06-08 17:59 Michael Palimaka
2014-06-08 16:30 Michael Palimaka
2014-06-04 14:55 Michael Palimaka
2014-06-04 14:55 Michael Palimaka
2014-06-04 14:55 Michael Palimaka
2014-06-04 14:55 Michael Palimaka
2014-05-29 19:39 Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox