diff options
author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2020-04-25 12:54:29 +0000 |
---|---|---|
committer | Andy Fiddaman <omnios@citrus-it.co.uk> | 2020-06-02 22:47:31 +0000 |
commit | 069e6b7e31ba5dcbc5441b98af272714d9a5455c (patch) | |
tree | 67ffdd605a1793f2974dfeeff85b3c25f2f44049 /usr/src/tools | |
parent | 605d010da59abaf92279a7caed83515cbb3218dc (diff) | |
download | illumos-joyent-069e6b7e31ba5dcbc5441b98af272714d9a5455c.tar.gz |
12708 Packages could be linted
12717 Stop ignoring pkgdepend errors
Reviewed by: Rich Lowe <richlowe@richlowe.net>
Reviewed by: John Levon <john.levon@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/tools')
-rwxr-xr-x | usr/src/tools/scripts/nightly | 38 | ||||
-rw-r--r-- | usr/src/tools/scripts/nightly.1onbld | 23 |
2 files changed, 43 insertions, 18 deletions
diff --git a/usr/src/tools/scripts/nightly b/usr/src/tools/scripts/nightly index f6b536c924..760b549231 100755 --- a/usr/src/tools/scripts/nightly +++ b/usr/src/tools/scripts/nightly @@ -27,9 +27,9 @@ # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> # Copyright (c) 2017 by Delphix. All rights reserved. # Copyright 2020 Joyent, Inc. -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. # Copyright 2019 Peter Trible. # Copyright 2020 Oxide Computer Company +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # # Based on the nightly script from the integration folks, # Mostly modified and owned by mike_s. @@ -509,6 +509,7 @@ NIGHTLY_OPTIONS variable in the <env_file> as follows: -F do _not_ do a non-DEBUG build -G gate keeper default group of options (-au) -I integration engineer default group of options (-ampu) + -L do not run pkglint -M do not run pmodes (safe file permission checker) -N do not run protocmp -R default group of options for building a release (-mp) @@ -539,6 +540,7 @@ D_FLAG=n F_FLAG=n f_FLAG=n i_FLAG=n; i_CMD_LINE_FLAG=n +L_FLAG=n M_FLAG=n m_FLAG=n N_FLAG=n @@ -718,7 +720,7 @@ check_closed_bins # NIGHTLY_OPTIONS=-${NIGHTLY_OPTIONS#-} OPTIND=1 -while getopts +ABCDdFfGIiMmNnpRrtUuwW FLAG $NIGHTLY_OPTIONS +while getopts +ABCDdFfGIiLMmNnpRrtUuwW FLAG $NIGHTLY_OPTIONS do case $FLAG in A ) A_FLAG=y @@ -741,6 +743,8 @@ do ;; i ) i_FLAG=y ;; + L ) L_FLAG=y + ;; M ) M_FLAG=y ;; m ) m_FLAG=y @@ -1974,17 +1978,17 @@ if [ "$CHECK_PATHS" = y -a "$N_FLAG" != y ]; then fi fi +abspkg= +for d in $abssrcdirs; do + if [ -d "$d/pkg" ]; then + abspkg="$abspkg $d" + fi +done + if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then echo "\n==== Impact on file permissions ====\n" \ >> $mail_msg_file - abspkg= - for d in $abssrcdirs; do - if [ -d "$d/pkg" ]; then - abspkg="$abspkg $d" - fi - done - if [ -n "$abspkg" ]; then for d in "$abspkg"; do ( cd $d/pkg ; $MAKE -e pmodes ) >> $mail_msg_file @@ -1992,6 +1996,22 @@ if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then fi fi +if [ "$L_FLAG" != "y" -a "$build_ok" = y ]; then + echo "\n==== Linting packages ====\n" | \ + tee -a $LOGFILE >> $mail_msg_file + + if [ -n "$abspkg" ]; then + for d in "$abspkg"; do + ( cd $d/pkg ; $MAKE -e pkglint ) | \ + tee -a $LOGFILE | \ + egrep -v 'Lint engine setup|Starting lint run' + done 2>&1 | tee $TMPDIR/pkglint_noise >> $mail_msg_file + if [[ -s $TMPDIR/pkglint_noise ]]; then + build_extras_ok=n + fi + fi +fi + if [ "$w_FLAG" = "y" -a "$build_ok" = "y" ]; then if [[ "$MULTI_PROTO" = no || "$D_FLAG" = y ]]; then do_wsdiff DEBUG $ROOT.prev $ROOT diff --git a/usr/src/tools/scripts/nightly.1onbld b/usr/src/tools/scripts/nightly.1onbld index 51ce222862..d66e8247c0 100644 --- a/usr/src/tools/scripts/nightly.1onbld +++ b/usr/src/tools/scripts/nightly.1onbld @@ -19,15 +19,15 @@ .\" "Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. .\" "Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> .\" "Copyright 2019 Peter Tribble. +.\" "Copyright 2020 OmniOS Community Edition (OmniOSce) Association. .\" " -.TH NIGHTLY 1ONBLD "Jun 9, 2019" +.TH NIGHTLY 1ONBLD "May 12, 2020" .SH NAME .I nightly \- build an OS-Net consolidation overnight .SH SYNOPSIS \fBnightly [-in] [-V VERS] <env_file>\fP .SH DESCRIPTION -.LP .I nightly, the mother of all build scripts, can bringover, build, archive, package, error check, and @@ -85,6 +85,12 @@ check for unreferenced files report on which proto area objects have changed (since the last build) .TP \(bu +compare the proto area with package manifests +.TP +\(bu +lint the generated packages +.TP +\(bu report the total build time .TP \(bu @@ -128,6 +134,9 @@ Do a build with DEBUG on (non-DEBUG is built by default) .B \-F Do _not_ do a non-DEBUG build (use with -D to get just a DEBUG build) .TP +.B \-L +Do not run pkglint +.TP .B \-M Do not run pmodes (safe file permission checker) .TP @@ -170,7 +179,7 @@ Send mail to $MAILTO at end of build .B \-t Build and use the tools in $SRC/tools (default setting). .TP -.B \+t +.B +t Use the build tools in "$ONBLD_TOOLS/bin". .LP @@ -221,7 +230,6 @@ Default group of options for building a release (-mp) set the build version string to VERS, overriding VERSION .SH ENVIRONMENT VARIABLES -.LP Here is a list of prominent environment variables that .I nightly references and the meaning of each variable. @@ -446,7 +454,6 @@ the DEBUG build will go in $ROOT and the non-DEBUG build will go in $ROOT-nd. Other values will be treated as "no". .RE .SH NIGHTLY HOOK ENVIRONMENT VARIABLES -.LP Several optional environment variables may specify commands to run at various points during the build. Commands specified in the hook variable will be run in a subshell; command output will be appended to @@ -488,7 +495,6 @@ This is reserved for per-build-machine customizations, and runs immedately after POST_NIGHTLY. .RE .SH FILES -.LP .RS 5 /etc/nightly.conf .RE @@ -497,9 +503,8 @@ If present, nightly executes this file just prior to executing the .I env file. .SH EXAMPLES -.LP -Start with the example file in usr/src/tools/env/developer.sh -(or gatekeeper.sh), copy to myenv and make your changes. +Start with the example file in usr/src/tools/env/illumos.sh, +copy to myenv and make your changes. .LP .PD 0 # grep NIGHTLY_OPTIONS myenv |