Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Apr 2016 23:33:34 -0700
From:      Russell Haley <russ.haley@gmail.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Boris Samorodov <bsam@passap.ru>, freebsd-arm <freebsd-arm@freebsd.org>,  Mark Millard <markmi@dsl-only.net>
Subject:   Re: Indication of Successful Build
Message-ID:  <CABx9NuTWSUyh7r5yqbsj%2BRorhg5RKtgHsBE1Z3sXFnPQfjrAtg@mail.gmail.com>
In-Reply-To: <CABx9NuQMwjCN_-jOsqzFqY66qYbuHrrkU-1iEEYW5rnhp9k1Mg@mail.gmail.com>
References:  <A36D4A7F-FE23-4E99-A2CA-A0F085270DE9@dsl-only.net> <CABx9NuScooxhv0VYAZr6DeWFzw5orvV4xQmcK3YSRVJTwLE1ig@mail.gmail.com> <570601E1.1080704@passap.ru> <CABx9NuTT0ume1BnMiZ1ECyQm=zbAFfCw7aor9wg9TKn9nX_PeQ@mail.gmail.com> <1460039914.1091.297.camel@freebsd.org> <CABx9NuQMwjCN_-jOsqzFqY66qYbuHrrkU-1iEEYW5rnhp9k1Mg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--001a114304d6cfadb0052ff35fc5
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Okay, I just expaneded Ian's script from the crossbuild page. This is
most of the way for what I want. Does someone know how to pull values
out of the  "svn info" command output (in the script there is a hard
coded revision number in the revision variable)?

I was able to use sudo -E by putting it in quotes, which fixes the
environment variable issues.

The one thing that is missing is archiving the old nfsroot directory.
hmmmm.... argh! ... must... sleep...

http://imgfave.com/view/3312424

Russ

On Thu, Apr 7, 2016 at 1:23 PM, Russell Haley <russ.haley@gmail.com> wrote:
> Okay, I'm getting there now. The script below is a rough start of what
> I was thinking. Check for success of each step and log it. It would be
> neat to include the script(1) command into this and only preserve the
> file if the a build step fails. As well, I'm thinking on "archiving"
> the build and deleting the last one if the current run succeeds. I'm
> new(ish) and self taught in Unix shell scripting so please point out
> anything wonky.
>
> #!/bin/bash
>
> BASEDIR=3D~/Projects
>
> if [ -z $1 ]
> then
> echo "Please include a project name"
> else
> PROJNAME=3D$1
> fi
>
> echo "`date` - Building for ${BASEDIR}/${PROJNAME}" >> ${BASEDIR}/logfile=
.log
>
> cd ${BASEDIR}/${PROJNAME} && make
>
> retval=3D$?
>
> if [ $retval -eq 0 ];
> then
> echo "`date` - Buildworld Succeeded" >> ${BASEDIR}/logfile.log
> else
> echo "`date` - Buildworld Failed with code $retval" >> ${BASEDIR}/logfile=
.log
> fi
>
>
> On Thu, Apr 7, 2016 at 7:38 AM, Ian Lepore <ian@freebsd.org> wrote:
>> On Thu, 2016-04-07 at 00:14 -0700, Russell Haley wrote:
>>> On Wed, Apr 6, 2016 at 11:44 PM, Boris Samorodov <bsam@passap.ru>
>>> wrote:
>>> > 06.04.16 23:14, Russell Haley =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
>>> > > Thanks for the input Mark.
>>> > >
>>> > > I'm currently looking into the cross build script on the
>>> > > developers
>>> >
>>> > Sees that you misunderstood Marks word "script". He uses SCRIPT(1)
>>> > to save build script output to a log-file.
>>>
>>> Thank you, I understood what he was doing. I was refering to the
>>> script here:
>>> https://wiki.freebsd.org/FreeBSD/arm/crossbuild
>>>
>>> >
>>> > > wiki, as well as considering updating crochet to use the u-boot
>>> > > ports
>>> > > and adding hummingboard to it. I'm going to take all these
>>> > > suggestions
>>> > > and see what I can come up with. In my mind it wouldn't be hard
>>> > > to use
>>> > > the return codes indicated by Boris to create a running log of
>>> > > make
>>> > > results and copy successful outputs to a different directory.
>>> > > What
>>> > > raises my concern is that I can't be the first person to ever
>>> > > come up
>>> > > with this idea, so where are all the other attempts at this? In
>>> > > my
>>> > > mind that means I'm either way ahead of the curve (not) or I am
>>> > > going
>>> > > down the wrong path and there is something else to this I haven't
>>> > > considered.
>>> >
>>> > I'd say that most developers have different purposes, plus it's not
>>> > hard
>>> > to create a shell script to automate the task. So everybody have
>>> > some of
>>> > them at their armoury. Here is mine (written once in a hurry, but
>>> > used
>>> > to be helpful and used often).
>>>
>>> Thank you for your script. This is precisely what I was looking for:
>>> some input on how other people build!
>>
>> It would be fairly trivial to add automatic log generation to that
>> script on the wiki page.  I usually don't care, but when I want logs
>> while I'm building I just add "2>&1 | tee make.log" (bash/sh syntax, it
>> would be different for csh) when I launch the script.  It would be easy
>> enough to put that inside the script, perhaps with some logic to
>> generate a log name that includes date and time.
>>
>> -- Ian

--001a114304d6cfadb0052ff35fc5
Content-Type: application/octet-stream; name=mk
Content-Disposition: attachment; filename=mk
Content-Transfer-Encoding: base64
X-Attachment-Id: f_imrbwsk70

IyEvdXNyL2xvY2FsL2Jpbi9iYXNoCgpCQVNFRElSPSQocHdkKQpQUk9KRUNUX05BTUU9aHVtbWlu
Z2JvYXJkCgpCVUlMRF9PVVRQVVQ9YnVpbGRvdXRwdXQubG9nCgojIEZpcnN0IHNldCBhbGwgdHdl
YWthYmxlIHZhcmlhYmxlcyB0byBkZWZhdWx0IHZhbHVlcyBiZWZvcmUgbG9hZGluZwojIGNvbmZp
Zy9tay5jb25mIHdoaWNoIGNhbiBvdmVycmlkZSBhbnkgb2YgdGhlc2UgZGVmYXVsdHMuCm1rX2Fy
Y2g9ImFybXY2Igpta19pbnNkaXI9IiR7QkFTRURJUn0vbmZzcm9vdCIKbWtfam9icz0iJChzeXNj
dGwgLW4gaHcubmNwdSkiCm1rX2tlcm5lbD0iSU1YNiIKbWtfbWFrZWNvbmY9IiR7QkFTRURJUn0v
Y29uZmlnL21ha2UuY29uZiIKbWtfbWthcmdzPSIiCm1rX25pY2U9Im5pY2UgLTEwIgpta19vYmpk
aXI9IiR7QkFTRURJUn0vb2JqIgpta19zcmNjb25mPSIke0JBU0VESVJ9L2NvbmZpZy9zcmMuY29u
ZiIKbWtfc3JjZGlyPSIke0JBU0VESVJ9L3NyYyIKbWtfdWJsZHJhZGRyPSIweDAiCgojIElmIG1h
a2luZyBhIHRhcmdldCB0aGF0IHJ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F9OQU1FfS0ke3JldmlzaW9ufSIKCmVjaG8gImBkYXRlYCAtIEJ1aWxk
aW5nICRAIGZvciAke1BST0pFQ1RfTkFNRX0tJHtyZXZpc2lvbn0iID4+ICR7TE9HX0ZJTEV9Cgok
e21rX25pY2V9ICR7bWtfc3Vkb30gbWFrZSAtaiAke21rX2pvYnN9IFwKICAgICItRE5PX0NMRUFO
IiBcCiAgICAiVEFSR0VUX0FSQ0g9JHtta19hcmNofSIgXAogICAgIkRFU1RESVI9JHtta19pbnNk
aXJ9IiBcCiAgICAiX19NQUtFX0NPTkY9JHtta19tYWtlY29uZn0iIFwKICAgICJzcmNjb25mPSR7
bWtfc3JjY29uZn0iIFwKICAgICJLRVJOQ09ORj0ke21rX2tlcm5lbH0iIFwKICAgICJVQkxEUl9M
T0FEQUREUj0ke21rX3VibGRyYWRkcn0iIFwKICAgICR7bWtfbWthcmdzfSBcCiAgICAiJEAiID4g
L3RtcC90ZW1wLSR7cmV2aXNpb259Lm91dHB1dAoKcmV0dmFsPSQ/CiNleGl0CmlmIFsgJHJldHZh
bCAtZXEgMCBdOwp0aGVuCmVjaG8gImBkYXRlYCAtICQqIFN1Y2NlZWRlZCIKZWNobyAiYGRhdGVg
IC0gJCogU3VjY2VlZGVkIiA+PiAke0xPR19GSUxFfQojbXYgL3RtcC90ZW1wLSR7cmV2aXNpb259
Lm91dHB1dCAke0JBU0VESVJ9L2xvZ3MvJHtyZXZpc2lvbn0ub3V0cHV0CmVsc2UKZWNobyAiYGRh
dGVgIC0gJCogRmFpbGVkIHdpdGggY29kZSAkcmV0dmFsIiAKZWNobyAiYGRhdGVgIC0gJCogRmFp
bGVkIHdpdGggY29kZSAkcmV0dmFsIiA+PiAke0xPR19GSUxFfQptdiAvdG1wL3RlbXAtJHtyZXZp
c2lvbn0ub3V0cHV0IC9sb2dzLyR7cmV2aXNpb259X2Vycm9ycy5vdXRwdXQKZmkKCg==
--001a114304d6cfadb0052ff35fc5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABx9NuTWSUyh7r5yqbsj%2BRorhg5RKtgHsBE1Z3sXFnPQfjrAtg>