Easy weblocks installer

3 views
Skip to first unread message

Aaron Feng

unread,
Sep 20, 2009, 7:42:43 PM9/20/09
to webl...@googlegroups.com
I created an idempotent installation script to generate a weblocks
project with all the dependencies packaged into the project, including
weblocks itself. The whole generation process takes less than 15
seconds on my laptop.

The project can be found here:

http://github.com/aaronfeng/weblocks-install/

After the generation, the project is completely self-contained, and
does not alter or depend on external environment (except for sbcl).
The script does various checks to make sure your environment is setup
correctly before the installation, so the script should be friendly to
new weblocks users. The only dependencies required by the script is
sbcl (thread enabled), curl & tar.

The script is capable of generating projects using weblocks stable
(0.8.3) or the latest development version (tip). Commands are listed
below:

# installs weblocks stable
./install-weblocks ~/path/to/your/project/foobar

# or

# installs weblocks tip
./install-weblocks ~/path/to/your/project/foobar tip

After a successful generation, the project can be executed by the command below:

cd ~/path/to/your/project/foobar && script/server

If the compilation is successful, one should see a banner showing the
port weblocks is running on.

Swank is also enabled by default. If people do not like this, I can
include an option to disable this.

Please give it a try. Any feedback is appreciated. I'm willing to
take the time to improve the script if people find it useful.

Thanks,

Aaron

Daniel Brooks

unread,
Sep 21, 2009, 1:15:54 AM9/21/09
to webl...@googlegroups.com
Aaron Feng <aaron...@gmail.com> writes:

> I created an idempotent installation script to generate a weblocks
> project with all the dependencies packaged into the project, including
> weblocks itself. The whole generation process takes less than 15
> seconds on my laptop.
>
> The project can be found here:
>
> http://github.com/aaronfeng/weblocks-install/

Nice. I was just about to start on something similar. Two points: it'd
be nice if you could include Elephant, and it would be much better if
the script downloaded all of the packages from the proper upstream
sources, rather than from your repository on github.

db48x

petter

unread,
Sep 21, 2009, 10:37:22 AM9/21/09
to weblocks


On Sep 21, 1:42 am, Aaron Feng <aaron.f...@gmail.com> wrote:

> ./install-weblocks ~/path/to/your/project/foobar

./install-weblocks.sh is the name of the script I got with my git
checkout.

> cd ~/path/to/your/project/foobar && script/server
>
> If the compilation is successful, one should see a banner showing the
> port weblocks is running on.

This did not work on the first compile on my setup: gentoo Linux
x86_64, SBCL 1.0.31.gentoo-r0

WARNING:
COMPILE-FILE warned while performing #<COMPILE-OP NIL {10044163F1}>
on
#<CL-SOURCE-FILE "application" {10043C7DF1}>.

debugger invoked on a ASDF:COMPILE-FAILED in thread #<THREAD "initial
thread" RUNNING {10036367C1}>:
erred while invoking #<COMPILE-OP NIL {10044163F1}> on
#<CL-SOURCE-FILE "application" {10043C7DF1}>

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [TRY-RECOMPILING] Try recompiling application
1: [RETRY ] Retry performing #<ASDF:COMPILE-OP NIL
{10044163F1}> on
#<ASDF:CL-SOURCE-FILE "application" {10043C7DF1}
>.
2: [ACCEPT ] Continue, treating #<ASDF:COMPILE-OP NIL
{10044163F1}>
on #<ASDF:CL-SOURCE-FILE
"application" {10043C7DF1}> as
having been successful.
3: [CONTINUE ] Ignore error and continue processing userinit
file "/home/petter/lisp/clbuild-test/weblocks-install/weblocks4/./
script/..//weblocks4.sbclrc".
4: [ABORT ] Skip rest of userinit file "/home/petter/lisp/
clbuild-test/weblocks-install/weblocks4/./script/..//
weblocks4.sbclrc".
5: Skip to toplevel READ/EVAL/PRINT loop.
6: [QUIT ] Quit SBCL (calling #'QUIT, killing the
process).

((SB-PCL::FAST-METHOD ASDF:PERFORM (ASDF:COMPILE-OP ASDF:CL-SOURCE-
FILE))
#<unavailable argument>
#<unavailable argument>
#<ASDF:COMPILE-OP NIL {10044163F1}>
#<ASDF:CL-SOURCE-FILE "application" {10043C7DF1}>)
0] 6
;
; compilation unit aborted
; caught 1 fatal ERROR condition
; caught 2 WARNING conditions
; caught 13 STYLE-WARNING conditions
; printed 2557 notes


But then compiling a second time worked!

Welcome to weblocks
Weblocks is running on port 5555, and can be access by browsing
http://localhost:5555
Swank is running on port 4005
Use (quit) to exit REPL
Linedit version 0.16.1 [smart mode]

Now I can least evaluate weblocks in my app. Thanks!

Aaron Feng

unread,
Sep 21, 2009, 12:24:23 PM9/21/09
to webl...@googlegroups.com
Petter,

> But then compiling a second time worked!

I'm glad it worked the second time, but I wonder why it failed the first time.

Aaron

petter

unread,
Sep 21, 2009, 12:45:10 PM9/21/09
to weblocks
On Sep 21, 6:24 pm, Aaron Feng <aaron.f...@gmail.com> wrote:

> I'm glad it worked the second time, but I wonder why it failed the first time.

It might be related to the SBCL version. I did not observe this
problem on a system with SBCL 1.0.19-gentoo

Leslie P. Polzer

unread,
Sep 21, 2009, 1:12:34 PM9/21/09
to weblocks
There's a problem with a recent SBCL version (I think .31) where it
emits a warning "cannot optimize accessor in safe code". This has
been fixed; in the mean time one can just invoke the ACCEPT restart.

Leslie

Aaron Feng

unread,
Sep 21, 2009, 10:25:00 PM9/21/09
to webl...@googlegroups.com
Daniel,

Thanks for the feedback.

> Two points: it'd
> be nice if you could include Elephant,

This can definitely be included.

> and it would be much better if
> the script downloaded all of the packages from the proper upstream
> sources, rather than from your repository on github.

I agree, however, I ran into problems with packaging when I tried to
pull everything from CLiki. In fact it was super painful for me to
upload all the files to github and figure out the dependencies. I did
it because of the following:

* No version number to identify the release from the package (ie,
some-lib-stable.tar.gz)
* No version number at all (asd file has no version info)
* Inconsistency on the package mechanism and the naming of the package

At the end of the day, there was no way to tell the compatibility
between libraries if the packages are not versioned.

Thanks,

Aaron

Daniel Brooks

unread,
Sep 22, 2009, 2:11:37 AM9/22/09
to webl...@googlegroups.com
Aaron Feng <aaron...@gmail.com> writes:

Nice. Well, the system you have does have the virtue of working.

db48x

nunb

unread,
Nov 5, 2009, 4:04:03 AM11/5/09
to weblocks
Just wanted to pop in and say that the system works very well, and
should probably be recommended somewhere in the weblocks docs. After
maintaining my development system using clbuild this made moving to a
fresh machine easy, basically an out-of-the-box working weblocks with
minimal hassle.

As far as libraries go, which version of cl-prevalence is in use? I
think Leslie had made a fork of it which works better.

cheers,
Nandan

Leslie P. Polzer

unread,
Nov 12, 2009, 4:46:38 AM11/12/09
to webl...@googlegroups.com

nunb wrote:
>
> Just wanted to pop in and say that the system works very well, and
> should probably be recommended somewhere in the weblocks docs.

I have added it to the homepage some time ago but forgot to pull
it.


> As far as libraries go, which version of cl-prevalence is in use? I
> think Leslie had made a fork of it which works better.

Yes (it's at Bitbucket), but it's still missing a patch critical to the
validity of object xrefs.

Sebastian Tennant

unread,
Nov 12, 2009, 11:17:03 AM11/12/09
to webl...@googlegroups.com
Quoth "Leslie P. Polzer" <s...@viridian-project.de>:

>> Just wanted to pop in and say that the system works very well, and
>> should probably be recommended somewhere in the weblocks docs.
>
> I [...] added it to the homepage some time ago but forgot to pull it.

Is this the addition to which you refer?

"Installer script

Aaron Feng wrote a shell script that lets you start a new Weblocks project from
scratch; all you need is an installed SBCL.

Get it here: http://github.com/aaronfeng/weblocks-install/"

Seb
--
Emacs' AlsaPlayer - Music Without Jolts
Lightweight, full-featured and mindful of your idyllic happiness.
http://home.gna.org/eap

Leslie P. Polzer

unread,
Nov 12, 2009, 5:28:06 PM11/12/09
to weblocks
> Is this the addition to which you refer?
>
>  "Installer script
>
>   Aaron Feng wrote a shell script that lets you start a new Weblocks project from
>   scratch; all you need is an installed SBCL.
>
>   Get it here:http://github.com/aaronfeng/weblocks-install/"

Yes, that's it. I activated it today.

nunb

unread,
Nov 13, 2009, 10:53:24 AM11/13/09
to weblocks

> Yes (it's at Bitbucket), but it's still missing a patch critical to the
> validity of object xrefs.

untested patch? ;-)

Leslie P. Polzer

unread,
Nov 13, 2009, 1:22:10 PM11/13/09
to weblocks
This one should be working fine actually:

http://bitbucket.org/skypher/cl-prevalence/downloads/prevalence-object-xrefs.diff

And here's an alternative patch to the problem that I haven't had a
chance to test yet:

http://bitbucket.org/swizard/cl-prevalence/changeset/cfa55d666cda/

I still think it doesn't cope correctly with circular references but I
might be wrong.

Leslie
Reply all
Reply to author
Forward
0 new messages