From owner-svn-src-head@freebsd.org Sun Jul 22 16:36:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15DFA104FC90 for ; Sun, 22 Jul 2018 16:36:21 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from mail.tarsnap.com (mail.tarsnap.com [54.86.246.204]) by mx1.freebsd.org (Postfix) with ESMTP id AD6857ABE3 for ; Sun, 22 Jul 2018 16:36:20 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: (qmail 63302 invoked from network); 22 Jul 2018 16:32:10 -0000 Received: from unknown (HELO exbuntu.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 22 Jul 2018 16:32:10 -0000 Received: (qmail 47031 invoked from network); 22 Jul 2018 16:31:25 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by clamshell.daemonology.net with SMTP; 22 Jul 2018 16:31:25 -0000 Subject: Re: svn commit: r336593 - head/release To: rgrimes@freebsd.org, Matthew Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807221504.w6MF4bWW027109@pdx.rh.CN85.dnsmgr.net> From: Colin Percival Openpgp: preference=signencrypt Autocrypt: addr=cperciva@freebsd.org; prefer-encrypt=mutual; keydata= xsDhBElrAAcRBACDfDys4ZtK+ErCJ1HAzYeteKpm3OEsvT/49AjUTLihkF79HhIKrCQU+1KC zv7BwHCMLb6hq30As9L7iFKG7n5QFLFC4Te/VcITUnWHMG/c3ViLOfJGvi+9/nOEHaM1dVJY D6tEp5yM1nHmVQpo9932j4KGuGFR0LhOK5IHXOSfGwCgxSFDPdgxe2OEjWxjGgY+oV3EafcD +JROXCTjlcQiG/OguQH4Vks3mhHfFnEppLxTkDuYgHZQiUtpcT9ssH5khgqoTyMar05OUdAj ZIhNbWDh4LgTj+7ZmvLhXT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0upUMI3Gt1Oq2w03DiXrZU0Fu/R8Rm8rlnkQKA+95mRTUq1xL5P5NZIi4gJ Z569OPMFwkkEGBECAAkFAklrAAcCGwwACgkQOM7KaQxqam41igCfbaldnFTu5uAdrnrghESv EI3CAo8AoLkNMks1pThl2BJNRm4CtTK9xZeH Message-ID: Date: Sun, 22 Jul 2018 09:31:25 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: <201807221504.w6MF4bWW027109@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2018 16:36:21 -0000 On 07/22/18 08:04, Rodney W. Grimes wrote: >> Build still works, but you're assuming that developers only use svn. > > No, he correctly assumed that RELEASE engineering only uses svn/svnlite > for building release images. This Makefile is for production of > official AMIs, official stuff always uses svn. I'm about to head mostly-AFK for the week, but one option here would be to change EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} to .if defined(SVN_CMD) EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} .else EC2_SVNBRANCH= unknown EC2_SVNREV= unknown .endif I don't know if this will make any difference to anyone using this code, but it should at least silence the warnings for people who aren't checking code out from svn. Colin Percival >> make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 343: >> SYSTEM_COMPILER: libclang will be built for bootstrapping a >> cross-compiler. >> make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 348: >> SYSTEM_LINKER: libclang will be built for bootstrapping a >> cross-linker. >> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >> make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: >> warning: "/usr/local/bin/svn info --show-item last-changed-revision >> /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status >> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >> make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: >> warning: "/usr/local/bin/svn info --show-item last-changed-revision >> /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status >> >> On Sat, Jul 21, 2018 at 3:54 PM, Colin Percival wrote: >>> Author: cperciva >>> Date: Sat Jul 21 22:54:43 2018 >>> New Revision: 336593 >>> URL: https://svnweb.freebsd.org/changeset/base/336593 >>> >>> Log: >>> Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch >>> and revision number announced in SNS notifications about new EC2 AMIs. >>> >>> While I'm here, incorporate that information into the AMI "description" >>> fields, since it's more useful than simply echoing the information >>> already provided via the AMI "name". >>> >>> Approved by: gjb >>> >>> Modified: >>> head/release/Makefile.ec2 > ^^^^^^^^^^ > >>> >>> Modified: head/release/Makefile.ec2 >>> ============================================================================== >>> --- head/release/Makefile.ec2 Sat Jul 21 22:15:48 2018 (r336592) >>> +++ head/release/Makefile.ec2 Sat Jul 21 22:54:43 2018 (r336593) >>> @@ -5,6 +5,19 @@ >>> # Makefile for creating an EC2 AMI from a disk image. >>> # >>> >>> +# Figure out where SVN is >>> +.if !defined(SVN_CMD) || empty(SVN_CMD) >>> +. for _P in /usr/bin /usr/local/bin >>> +. for _S in svn svnlite >>> +. if exists(${_P}/${_S}) >>> +SVN_CMD= ${_P}/${_S} >>> +. endif >>> +. endfor >>> +. endfor >>> +.endif >>> +EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' >>> +EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} >>> + >>> .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" >>> AMINAMESUFFIX!= date +-%Y-%m-%d >>> .endif >>> @@ -13,8 +26,6 @@ PUBLISH= --public >>> .endif >>> .if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) >>> EC2SNSREL= ${REVISION}-${BRANCH} >>> -EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' >>> -EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} >>> EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} >>> .endif >>> >>> @@ -60,7 +71,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} >>> /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ >>> ${.OBJDIR}/ec2.raw \ >>> "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ >>> - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ >>> + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ >>> ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ >>> ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} >>> @touch ${.TARGET} >>> >> >> > -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid