Anyone building seaside images on a mac with Jenkins?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyone building seaside images on a mac with Jenkins?

Stephan Eggermont-3
The shell scripts at https://github.com/renggli/builder.git have quite some
linux-specific behaviour.

In 24 failed builds I found (with some path expansion help from Norbert):
readlink -f,
PHARO_VM
PHARO_PARAM
chmod --reference

Before I continue, did anyone already make this work on OS X (10.6.7)?

Stephan



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Stephan Eggermont-3
And I don't mean in a virtualbox image. I'll be doing that later (I have been playing with vagrant).

Stephan

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Sven Van Caekenberghe
In reply to this post by Stephan Eggermont-3

On 19 Apr 2011, at 16:52, Stephan Eggermont wrote:

> The shell scripts at https://github.com/renggli/builder.git have quite some
> linux-specific behaviour.
>
> In 24 failed builds I found (with some path expansion help from Norbert):
> readlink -f,
> PHARO_VM
> PHARO_PARAM
> chmod --reference
>
> Before I continue, did anyone already make this work on OS X (10.6.7)?
>
> Stephan

I works on my MacBook, my diffs are a bit old, but this might help:

$ diff build.sh build.svc.sh
3,4c3,4
< # build.sh -- Builds Pharo images using a series of Smalltalk
< #   scripts. Best to be used together with Jenkins.
---
> # build.svc.sh -- Builds Pharo images using a series of Smalltalk
> #   scripts. Best to be used together with Hudson.
11,12c11,14
< PHARO_VM="cog"
< PHARO_PARAM="-nodisplay -nosound"
---
> PHARO_VM="/Users/sven/apps/Smalltalk/Virtual-Machines/Squeak-4.0.3.2202-darwin10.3.0_i386/bin/squeak"
> #PHARO_VM="/Users/sven/apps/Smalltalk/Virtual-Machines/Squeak 5.8b10.app/Contents/MacOS/Squeak"
> PHARO_PARAM="-vm-display-none -vm-sound-null"
> #PHARO_PARAM="-headless"
15,20c17,23
< BUILD_PATH="${WORKSPACE:=$(readlink -f $(dirname $0))/builds}"
<
< IMAGES_PATH="$(readlink -f $(dirname $0))/images"
< SCRIPTS_PATH="$(readlink -f $(dirname $0))/scripts"
< SOURCES_PATH="$(readlink -f $(dirname $0))/sources"
< BUILD_CACHE="$(readlink -f $(dirname $0))/cache"
---
> MY_HOME=$(dirname $0)
> MY_HOME=$(cd $MY_HOME && pwd)
> BUILD_PATH="$MY_HOME/builds"
> IMAGES_PATH="$MY_HOME/images"
> SCRIPTS_PATH="$MY_HOME/scripts"
> SOURCES_PATH="$MY_HOME/sources"
> BUILD_CACHE="$MY_HOME/cache"
28c31
< echo " -i input product name, image from images-directory, or successful jenkins build"
---
> echo " -i input product name, image from images-directory, or successful hudson build"
105,106c108,109
< mkdir -p "$BUILD_CACHE/${JOB_NAME:=$OUTPUT_NAME}"
< ln -s "$BUILD_CACHE/${JOB_NAME:=$OUTPUT_NAME}" "$OUTPUT_CACHE"
---
> mkdir -p "$BUILD_CACHE/$OUTPUT_NAME"
> ln -s "$BUILD_CACHE/$OUTPUT_NAME" "$OUTPUT_CACHE"



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
Thank you Sven. Do you also have a diff for build-oneclick.sh?
chmod on 10.6.7 has no --reference.
I noticed in the history a 'now also mac works' which has the same line.

Stephan
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Sven Van Caekenberghe
Stephan,

On 19 Apr 2011, at 17:55, Stephan Eggermont wrote:

> Thank you Sven. Do you also have a diff for build-oneclick.sh?
> chmod on 10.6.7 has no --reference.
> I noticed in the history a 'now also mac works' which has the same line.

No, I am sorry, I haven't looked at that one.

From the man page on Linux:

       --reference=RFILE
              use RFILE's mode instead of MODE values

so instead of specifying a MODE, you use/copy the one from another file.
Shouldn't be too hard to get the same result in some other way.

Sven


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Lukas Renggli
If anybody knows how to make the build scripts more portable, please
lt me know. I don't have much bash scripting experience. I wrote and
tested the scripts only on Ubuntu Server.

Lukas

On 19 April 2011 18:48, Sven Van Caekenberghe <[hidden email]> wrote:

> Stephan,
>
> On 19 Apr 2011, at 17:55, Stephan Eggermont wrote:
>
>> Thank you Sven. Do you also have a diff for build-oneclick.sh?
>> chmod on 10.6.7 has no --reference.
>> I noticed in the history a 'now also mac works' which has the same line.
>
> No, I am sorry, I haven't looked at that one.
>
> From the man page on Linux:
>
>       --reference=RFILE
>              use RFILE's mode instead of MODE values
>
> so instead of specifying a MODE, you use/copy the one from another file.
> Shouldn't be too hard to get the same result in some other way.
>
> Sven
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Sven Van Caekenberghe

On 19 Apr 2011, at 22:57, Lukas Renggli wrote:

> If anybody knows how to make the build scripts more portable, please
> lt me know. I don't have much bash scripting experience. I wrote and
> tested the scripts only on Ubuntu Server.

$(readlink -f $(dirname $0))

seems to be a trick to get at the absolute directory path the current script is in and it does not seem to work on Mac OS X, we always use

MY_HOME=$(dirname $0)
MY_HOME=$(cd $MY_HOME && pwd)

which seems to work on both platforms.

But I would not dare to call myself an expert.

Sven


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Randal L. Schwartz
>>>>> "Sven" == Sven Van Caekenberghe <[hidden email]> writes:

Sven> $(readlink -f $(dirname $0))

readlink -f is a GNU-ism, apparently.  And since OSX isn't GNU (it's
mostly FreeBSD userland), not surprising it breaks.

Sven> seems to be a trick to get at the absolute directory path the
Sven> current script is in and it does not seem to work on Mac OS X, we
Sven> always use

Sven> MY_HOME=$(dirname $0)
Sven> MY_HOME=$(cd $MY_HOME && pwd)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Stephan Eggermont-3
In reply to this post by Stephan Eggermont-3
Lukas wrote:
>If anybody knows how to make the build scripts more portable, please
>lt me know. I don't have much bash scripting experience. I wrote and
>tested the scripts only on Ubuntu Server.

In the answers on

http://stackoverflow.com/questions/5753687/replacement-for-chmod-reference-on-os-x

it looks like stat -f can provide the mode more portable.

Stephan _______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Mariano Martinez Peck
Hi guys. Did someone finally make these scripts to work in Mac out of the box? is there a git repo I could get it?

On Fri, Apr 22, 2011 at 12:18 PM, Stephan Eggermont <[hidden email]> wrote:
Lukas wrote:
>If anybody knows how to make the build scripts more portable, please
>lt me know. I don't have much bash scripting experience. I wrote and
>tested the scripts only on Ubuntu Server.

In the answers on

http://stackoverflow.com/questions/5753687/replacement-for-chmod-reference-on-os-x

it looks like stat -f can provide the mode more portable.

Stephan _______________________________________________



--
Mariano
http://marianopeck.wordpress.com


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Anyone building seaside images on a mac with Jenkins?

Gastón Dall' Oglio
In reply to this post by Randal L. Schwartz
Hi.
I am not a bash expert, I just want to share how to follow symbolic links I've seen in a script:


#!/usr/bin/env bash
# Find our location
SELF_LOCATION=$(cd "$(dirname "$0")" ; pwd)

# Was this invoked as a link ?
if [ -L "$0" ]
then
     LINKTO=$(/usr/bin/readlink "$0")

     # Is the link a relative path
     if [[ "${LINKTO}" = /* ]]
     then
        # absolute path so just invoke it
        exec "${LINKTO}" "$@"
     else
        # invoke by prepending our folder
        exec "${SELF_LOCATION}/${LINKTO}" "$@"
    fi
fi

# Run IDE
"${SELF_LOCATION}/AptanaStudio3" -application com.aptana.commandline.launcher.LauncherApplication "$@" > /dev/null 2>&1 &

# Detach it
disown -h %-
disown %-



2011/4/19 Randal L. Schwartz <[hidden email]>
>>>>> "Sven" == Sven Van Caekenberghe <[hidden email]> writes:

Sven> $(readlink -f $(dirname $0))

readlink -f is a GNU-ism, apparently.  And since OSX isn't GNU (it's
mostly FreeBSD userland), not surprising it breaks.

Sven> seems to be a trick to get at the absolute directory path the
Sven> current script is in and it does not seem to work on Mac OS X, we
Sven> always use

Sven> MY_HOME=$(dirname $0)
Sven> MY_HOME=$(cd $MY_HOME && pwd)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside