From owner-svn-src-head@freebsd.org Sun Jul 22 22:53:13 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 87F101031B9B; Sun, 22 Jul 2018 22:53:13 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16B4089270; Sun, 22 Jul 2018 22:53:13 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by mail-io0-x229.google.com with SMTP id w11-v6so8555726iob.2; Sun, 22 Jul 2018 15:53:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7z2MiCHiGmWNf63dTcESPbXLQ5yctBotFCdAZ8ZELo4=; b=F3X+Iq5l7eS8HqsL/2G8c313CBzZ4muYAn/qC8HJ9YxAjHmZSJydBy37J1dCPngi4O jRSFSnV3RhnfSyhXj7rS9jWVg58NP7ZONGgEB4x3sGiS7xieXNvxMYABJUK/CG3SpLEA waH2rIOtaF4sl6avvIJpQv0D2czpK3teaQW9ygvFzwv8Wq9a9Q4dqiistMHbTQdHaVQk J2vRYN9Gs9EnjkuZysF93PSgPsvgH8etCbPIZce3QQMftJqFrwvgLjXvcYUYLvPKRrKC fsq3nfB8CgxaG9r8+KGiBNvX+lkazWiB0Nx6ojAmDXr/hSQA7Z/XjJkzaQbeLN1ZxuHX lkfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7z2MiCHiGmWNf63dTcESPbXLQ5yctBotFCdAZ8ZELo4=; b=oMygWRsxIlWO1ablpuwx+CYFahdi79hDRDP7/f4LfpqckqSsXe9OonaNCZbgVchyLg mXJgyLbSMWbjamabfb8ocj3x3X0jRpOBs9EJrcVNX85FKEv8V/FHuSebbmabXnE9OgsU gSLSEs+GFSyFhn+CPKeInzNe+piwzkUcbp+R5G4W/3IfuUbBQlCrC9Dc6fnkhG4HT/Jg 2vnoH1gvDrYDtnrBPTSKoEUlyQAEmMdoix8dYImWHywj85eMOJ+NNZLYgxiu9Gd7REPU 21DI4YRazCOiLTW4BrWEevLjRjwdVh82yaO9ZhwWmNjh19CcaDwvrDY8LGYR5/5Ruhqx rrIA== X-Gm-Message-State: AOUpUlGv1lE62I+pRiJiGcXAY1qIcIfWx7luS9S1CWrRzX+sb5VSl9TH +o/1pENOTDmCZKqDig9JNJSO8i7INgICN7z/BEpEo9eG X-Google-Smtp-Source: AAOMgpcuJRabVoQJ9dzshSsXAhbM+VpuWnWCJ8/mR6NoUhyaOS017A/oEySsPvhLu7Yg3V7ByNXoEIMBXgE0KjnjLd8= X-Received: by 2002:a6b:5a08:: with SMTP id o8-v6mr8257467iob.5.1532299991938; Sun, 22 Jul 2018 15:53:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:8d2:0:0:0:0:0 with HTTP; Sun, 22 Jul 2018 15:53:11 -0700 (PDT) In-Reply-To: References: <201807221504.w6MF4bWW027109@pdx.rh.CN85.dnsmgr.net> From: Matthew Macy Date: Sun, 22 Jul 2018 15:53:11 -0700 Message-ID: Subject: Re: svn commit: r336593 - head/release To: Colin Percival Cc: rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" 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 22:53:13 -0000 That would only fix it if svn weren't installed. On Sun, Jul 22, 2018 at 9:31 AM, Colin Percival wrote: > 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