<div dir="ltr"><br><div class="GmSign">-- <br></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Jun 18, 2016 at 5:28 AM Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir="ltr">Hi Ben,<div class="gmail_extra"><br><div class="gmail_quote"></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 17, 2016 at 8:27 AM, Ben Coman <span dir="ltr">&lt;<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><br>
On Fri, Jun 17, 2016 at 3:40 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; On Jun 17, 2016, at 12:22 AM, Tim Felgentreff &lt;<a href="mailto:timfelgentreff@gmail.com" target="_blank">timfelgentreff@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
</span><div><div>&gt;&gt;&gt; On 16 June 2016 at 22:07, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; Hi All,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     so after fixing &quot;git remote get-url origin&quot; to fail over to &quot;git remote<br>
&gt;&gt;&gt; show origin | filter and munge&quot; the culture shock of &quot;git commit -a&quot; (git<br>
&gt;&gt;&gt; commit does nothing ?!?!?) I have a VM that outputs a reasonable version<br>
&gt;&gt;&gt; info:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; /Users/eliot/oscogvm/build.macos32x86/squeak.cog.spur/CocoaFast.app/Contents/MacOS/Squeak<br>
&gt;&gt;&gt; 5.0 5.0.201606161953 Mac OS X built on Jun 16 2016 12:56:52 PDT Compiler:<br>
&gt;&gt;&gt; 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57) [Production Spur VM]<br>
&gt;&gt;&gt; CoInterpreter VMMaker.oscog-eem.1886 uuid:<br>
&gt;&gt;&gt; d413db9f-37cc-4c5d-bfc6-87b11203ee96 Jun 16 2016<br>
&gt;&gt;&gt; StackToRegisterMappingCogit VMMaker.oscog-eem.1886 uuid:<br>
&gt;&gt;&gt; d413db9f-37cc-4c5d-bfc6-87b11203ee96 Jun 16 2016<br>
&gt;&gt;&gt; VM: r201606161953 <a href="http://github.com/OpenSmalltalk/vm" rel="noreferrer" target="_blank">http://github.com/OpenSmalltalk/vm</a> $ Date: Thu Jun 16<br>
&gt;&gt;&gt; 12:53:33 2016 -0700 $<br>
&gt;&gt;&gt; Plugins: r201606161953 <a href="http://github.com/OpenSmalltalk/vm" rel="noreferrer" target="_blank">http://github.com/OpenSmalltalk/vm</a> $<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Which begs the question how do I differentiate this from something built<br>
&gt;&gt;&gt; officially via Travis?  Arguably the URL is wrong, and should only say<br>
&gt;&gt;&gt; &quot;<a href="http://github.com/OpenSmalltalk/vm" rel="noreferrer" target="_blank">http://github.com/OpenSmalltalk/vm</a>&quot; for travis builds, and perhaps should<br>
&gt;&gt;&gt; just include my local hostname and current directory when I make any kind of<br>
&gt;&gt;&gt; local modification.  So the above would read<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ...<br>
&gt;&gt;&gt; VM: r201606161953 McStalker:?users/eliot/oscogvm $ Date: Thu Jun 16 12:53:33<br>
&gt;&gt;&gt; 2016 -0700 $<br>
&gt;&gt;&gt; Plugins: r201606161953 McStalker:?users/eliot/oscogvm $<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Alternatively we could add another field, or modify one of the existing<br>
&gt;&gt;&gt; fields to say &quot;I&#39;m official&quot; however one would do that.  I don&#39;t know how, I<br>
&gt;&gt;&gt; just know we need this.  I shouldn&#39;t be able to pollute the VM pool by<br>
&gt;&gt;&gt; putting some VM on some site somewhere that i just happened to build after<br>
&gt;&gt;&gt; several sherries and some cannabis brownies that looks to all intents and<br>
&gt;&gt;&gt; purposes just like a VM built by our official Travis slaves.  Hic.  Chillin&#39;<br>
<br>
</div></div>I just discovered git-describe, which seems like it could be useful...<br>
<a href="http://alblue.bandlem.com/2010/11/automatically-tagging-builds-with-git.html" rel="noreferrer" target="_blank">http://alblue.bandlem.com/2010/11/automatically-tagging-builds-with-git.html</a><br>
<br>
So if Travis created  &quot;r201606161953&quot; as an *official* tag for<br>
successful builds like this...<br>
<a href="https://github.com/travis-ci/travis-ci/issues/1476" rel="noreferrer" target="_blank">https://github.com/travis-ci/travis-ci/issues/1476</a><br>
<br>
then `git describe` would produce &quot;r201606161953&quot; for that build, and<br>
after a couple of commits in my personal repo would produce<br>
&quot;r201606161953-2-g169d02a&quot;.    The &quot;-2-g169d02a&quot; would distinguish<br>
non-official builds.<br>
<br>
In addition, I can now copy-paste a VM&#39;s output revision string<br>
to directly do &quot;git checkout r201606161953&quot;<br>
instead of &quot;git checkout master@{2016-06-16 19:53} which I read is<br>
only viable for 90 days anyway, and has some complexity between<br>
whether the given date is author commit date or merge date.<br>
<br>
But after doing &quot;git checkout r201606161953&quot; in my personal repo<br>
   git describe<br>
        ==&gt;    r201606161953  is indistinguishable from the Travis build<br>
but...<br>
   git describe --long<br>
       ==&gt;  r201606161953-0-a264e03b  is distinguishable.<br>
<br>
In addition,  if I edit some files and rebuild before committing I<br>
want to distinguish this from when I build a fresh check out , which<br>
can be done with...<br>
   git describe --long --dirty    ==&gt;   r201606161953-0-a264e03b-dirty<br>
<br>
So that last would be used to version personal builds,<br>
while Travis would use &quot;git describe&quot; without any flags.<br>
   ==&gt;   r201606161953<br></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Sounds really good, but</div><div><br></div><div>McStalker.oscogvm$ uname -a</div><div>Darwin McStalker 13.4.0 Darwin Kernel Version 13.4.0: Mon Jan 11 18:17:34 PST 2016; root:xnu-2422.115.15~1/RELEASE_X86_64 x86_64</div><div>McStalker.oscogvm$ git --version</div><div>git version 1.9.5 (Apple Git-50.3)</div><div>McStalker.oscogvm$ git describe</div><div>fatal: No names found, cannot describe anything.</div><div>McStalker.oscogvm$ git describe --long</div><div>fatal: No names found, cannot describe anything.</div><div>McStalker.oscogvm$ </div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>&gt;&gt; how secure does this need to be? One way to differentiate the official<br>
&gt;&gt; VMs is to sign them directly on Travis (which we&#39;ll want to do anyway,<br>
&gt;&gt; just didn&#39;t get to it, yet).<br>
&gt;&gt;<br>
&gt;&gt; Another option is to just change the URL replacement code to do<br>
&gt;&gt; something else when not running on Travis --- like adding your<br>
&gt;&gt; hostname and path instead --- but this could be fairly easily messed<br>
&gt;&gt; with.<br>
&gt;&gt;<br>
&gt;&gt; Not sure how much malicious intent we want to prevent.<br>
<br>
</span>Later on we should have Travis signing its build artefacts, but for<br>
now keep it simple.<br></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>The Mac builds already sign provided a certificate is installed and an environment variable set to point to it.  See SIGNING_IDENTITY in build.macos*/common/Makefile.app</div></div></div></div></blockquote><div><br></div><div>Cool! Now we only need to decide whose certificate to use. We can encrypt the cert securely, add it to the repository and install it during a build. BTW: we are already doing this for the RSqueak VM [1] as well.</div><div><br></div><div>[1] <a href="https://github.com/HPI-SWA-Lab/RSqueak-App/blob/c8e28879a8a9da97fe06cd5cb82e9b9c3058924e/prepare.sh#L42-L46">https://github.com/HPI-SWA-Lab/RSqueak-App/blob/c8e28879a8a9da97fe06cd5cb82e9b9c3058924e/prepare.sh#L42-L46</a></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span><br>
&gt;<br>
&gt; None.  I don&#39;t think there&#39;s malicious intent at all.  I do think we should differentiate between &quot;personal&quot; and Travis builds.  It&#39;s more for my own information, so u don&#39;t get confused, than to prevent maliciousness.  So do the simplest thing that could possibly work TSTTCPW.  I like username,host name,path as in an scp, eg eliot@McStalker:oscogvm (path relative to ~eliot).<br>
<br>
</span>I think `git branch` is as important as `path`.<br>
Username could come from `git config <a href="http://user.name" rel="noreferrer" target="_blank">user.name</a> | sed &#39;s/ //g&#39;<br>
<br>
cheers -ben<br>
</blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"></div><br><br><div data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
</blockquote></div></div>