Skip to content

Commit

Permalink
Merge pull request #3049 from patzim/binary-release
Browse files Browse the repository at this point in the history
Files for binary releases
  • Loading branch information
patrickbkr committed Jul 19, 2019
2 parents 7da5744 + 3427391 commit cde4055
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 9 deletions.
52 changes: 52 additions & 0 deletions docs/release-guide-binary.md
@@ -0,0 +1,52 @@
Windows
=======

- Create a fresh Windows 10 VM as described in [the Windows guide](docs/windows.md) if you don't have an up to date Windows 10 available (the download is 20GB and turns unusable after ~ 2 months).
- Install Git, Perl 5, and the C/C+ development tools as described in that guide.
- Download the [latest release](http://rakudo.org/files/rakudo) and extract it to `C:\rakudo`. The path will end up in the finished build, so if you don't want some other path to end up persisted in the build in some buildsystem variable put it in `C:\rakudo`.
- Open the 'Developer Command Prompt for VS 20XX'.
- Navigate to `C:\rakudo\`.
- `perl Configure.pl --gen-moar --gen-nqp --backends=moar --relocatable`
- `nmake install`
- `nmake test`
- In `C:\rakudo` do `git clone https://github.com/ugexe/zef.git` and `cd zef` and `C:\rakudo\install\bin\perl6.exe -I. bin\zef install .`
- Copy all files in the `Windows` folder into the `install` folder.
- Rename the `install` folder to `rakudo-20XX.XX`.
- Create a `.zip` archive. Name it `rakudo-20XX.XX-windows-64bit.zip`.
- Copy the `.zip` archive out of the Windows VM using the Virtual Box `File Manager` (*Machine -> File Manager...*)
- Sign the `.zip` archive as described in `release_guide.pod`.
- Upload the `.zip` archive and signature as described in `release_guide.pod`.


Linux
=====

On Linux the major compatibility breaker is glibc. Basic rule: stuff compiled with a specific version of glibc can run on newer versions, but not older ones. So when compatibility with multiple Linuxes is desired one has to compile on a distribution with a reasonably old glibc.
[this overview of glibc Versions](https://gist.github.com/wagenet/35adca1a032cec2999d47b6c40aa45b1) is quite helpful with that.
As of 2019-07-08 CentOS 6 (using glibc 2.12) is a good pick.

- Use a 64 bit Linux.
- Install docker.
- `docker run -it --name=rakudo-build centos:6 bash`

yum -y update && yum clean all
yum install git perl perl-core gcc make
# Don't forget to change the link below back to rakudo.org, once the website is back in shape again.
curl -o rakudo-2019.03.1.tar.gz https://perlgeek.de/static/p6/rakudo/rakudo-2019.03.1.tar.gz
tar -xzf rakudo-2019.03.1.tar.gz
cd rakudo-2019.03.1
perl Configure.pl --gen-moar --gen-nqp --backends=moar --relocatable
make install
make test
git clone https://github.com/ugexe/zef.git
cd zef
/rakudo-2019.03.1/install/bin/perl6 -I. bin/zef install .
cd /rakudo-2019.03.1
cp -r tools/releasable/release-files/Linux/* install
mv install rakudo-2019.03.1
tar -czf /rakudo-2019.03.1-linux-64bit.tar.gz rakudo-2019.03.1

- On the host linux (not inside the container) run `docker cp rakudo-build:/rakudo-2019.03.1-linux-64bit.tar.gz .` to copy the archive out of the container. If you happended to stop the container by exitting the console, type `docker start rakudo-build` to start it again and allow copying files out.
- Sign the tarball archive as described in `release_guide.pod`.
- Upload the tarball and signature as described in `release_guide.pod`.

18 changes: 12 additions & 6 deletions docs/release_guide.pod
Expand Up @@ -15,7 +15,7 @@ end of this document.
=head2 Planned future releases

Note that we are trying very hard to ensure there are no backward
compatibility issues post Christmas. As such, we may end up delaying
compatibility issues post version 6.c. As such, we may end up delaying
some releases to ensure any compatibility issues are resolved.

2019-09-21 Rakudo #132 (AlexDaniel + kawaii + Releasable)
Expand Down Expand Up @@ -114,7 +114,7 @@ To spot more regressions, it’s a good idea to test the ecosystem and see
if there are any modules that were working correctly (e.g. passing their
tests) on the previous release but no longer work on HEAD. One of the
tools to do that is
L<Toaster|https://github.com/zoffixznet/perl6-Toaster>.
L<Blin|https://github.com/perl6/Blin>.

Generally, any kind of breakage in modules is unwanted, but there are
exceptions. Submit Pull Requests to anything that is affected and file
Expand Down Expand Up @@ -280,7 +280,7 @@ was frozen.

Continue adjusting things until make stresstest passes as expected.
Often this means fixing a bug, fudging a test, or (temporarily?)
commenting out a test file in t/spectest.data . Use your best
commenting out a test file in C<t/spectest.data>. Use your best
judgment or ask others if uncertain what to do here.

=item 14.
Expand Down Expand Up @@ -318,7 +318,7 @@ L<create one first|https://fedoraproject.org/wiki/Creating_GPG_Keys>. Should
that prove impossible, you can omit the C<-s> from the command line.

Be sure to upload your public key to your GitHub account, so that GitHub
displays I<Verified> button next to the tag. You can do that by running
displays the I<Verified> button next to the tag. You can do that by running
C<< gpg --armor --export <email> >> and adding the output as the
I<New GPG Key> at the bottom of the
L<< settings -> keys page|https://github.com/settings/keys >>
Expand All @@ -345,6 +345,11 @@ masak, tadzik, moritz, [Coke], lizmat, timotimo,

=item 19.

Build binary packages by following the steps in C<docs/release_guide_binary.md>.
for Linux 64bit and Windows 64bit.

=item 20.

To avoid public confusion with Rakudo Star releases, we now publish
compiler release announcements ONLY to perl6-compiler@perl.org.
(We may restart widespread announcements of compiler releases
Expand All @@ -354,11 +359,11 @@ announcement for both.)
Don’t send out any announcements until the files are actually available
per step 14 above.

=item 20.
=item 21.

Update the Wikipedia entry at L<http://en.wikipedia.org/wiki/Rakudo>.

=item 21.
=item 22.

You’re done! Celebrate with the appropriate amount of fun.

Expand Down Expand Up @@ -497,6 +502,7 @@ Previous releases were bundled as part of monthly Parrot releases.
2018-09-02 Rakudo #125 "2018.08" (AlexDaniel + Releasable)
2018-09-23 Rakudo #126 "2018.09" (AlexDaniel + Releasable)
2018-10-28 Rakudo #127 "2018.10" (AlexDaniel + Releasable)

2018-11-29 Rakudo #128 "2018.11" (AlexDaniel + Releasable) # v6.d
2018-12-21 Rakudo #129 "2018.12" (AlexDaniel + Releasable)
2019-03-07 Rakudo #130 "2019.03" (AlexDaniel + Releasable)
Expand Down
6 changes: 3 additions & 3 deletions docs/windows.md
@@ -1,4 +1,4 @@
# Building on windows
# Building on Windows

## VM

Expand All @@ -8,7 +8,7 @@ Get virtual box for your platform here:

https://www.virtualbox.org/wiki/Downloads

Get a windows 10 evaluation copy from here:
Get a Windows 10 evaluation copy from here:

https://developer.microsoft.com/en-us/windows/downloads/virtual-machines

Expand All @@ -26,7 +26,7 @@ Install Strawberry Perl from:

Run the VS installer; modify the existing install, and select "Desktop
Development with C++"; This will make the command line tools available
in the "Developer Command Prompt for VS 2017"
in the "Developer Command Prompt for VS 20XX"

### Git

Expand Down
99 changes: 99 additions & 0 deletions tools/build/binary-release/Linux/README.md
@@ -0,0 +1,99 @@
# Rakudo Perl 6

This is a pre-built package of Rakudo Perl 6, a Perl 6 compiler.

This package includes the Rakudo Perl 6 compiler and the module installer Zef.


## Running Perl 6

To run a Perl 6 program, open a command prompt and type

/path/to/this/folder/bin/perl6 my_script.p6

or start a REPL by calling `perl6` without an argument

/path/to/this/folder/bin/perl6

To add the relevant paths to your environment so you don't have to type the full path run the following script:

source scripts/set-env.sh


## Installing modules

To install Perl 6 modules you can use the Zef module installer.

/path/to/this/folder/bin/perl6 /path/to/this/folder/share/perl6/site/bin/zef install JSON::Fast

Modules will be installed into this Perl 6 package and will thus be available even when moving this package.


### Native code modules

To install modules that require a compiler toolchain, you have to have a compiler installed.

- On Debian/Ubuntu based systems do `sudo apt-get install gcc make`
- On RedHat/Fedora based systems do `sudo dnf install gcc make`


## Changes

Recent changes and feature additions are documented in the `docs/ChangeLog`
text file.

To receive important notifications from the core developer team, please
subscribe to [the p6lert service](https://alerts.perl6.org) using the RSS feed,
twitter, or [the p6lert commandline script](https://github.com/zoffixznet/perl6-p6lert).


## Where to get help or answers to questions

There are several mailing lists, IRC channels, and wikis available with
help for Perl 6 and Rakudo. Figuring out the right one to use
is often the biggest battle. Here are some rough guidelines:

The central hub for Perl 6 information is [perl6.org](http://perl6.org/).
This is always a good starting point.

If you have a question about Perl 6 syntax or the right way to approach
a problem using Perl 6, you probably want the “perl6-users@perl.org
mailing list or the [irc.freenode.net/#perl6 IRC
channel](https://webchat.freenode.net/?channels=#perl6). The perl6-users
list is primarily for the people who want to use Perl 6 to write
programs, so newbie questions are welcomed there. Newbie questions
are also welcome on the #perl6 channel; the Rakudo and Perl 6
development teams tend to hang out there and are generally glad
to help. You can follow [@perl6org](https://twitter.com/perl6org)
and on Twitter, there's a Perl 6 news aggregator at
[Planet Perl 6](http://pl6anet.org/).

Questions about NQP can also be posted to the #perl6 IRC channel.
For questions about MoarVM, you can join #moarvm on freenode.


## Reporting bugs

See https://rakudo.org/bugs


## Submitting patches

If you have a patch that fixes a bug or adds a new feature, please
create a pull request using github's pull request infrastructure.

See [our contribution guidelines](https://github.com/rakudo/rakudo/blob/master/CONTRIBUTING.md) for more information.


## License

Rakudo Perl 6 is Copyright © 2008-2019, The Perl Foundation. Rakudo Perl 6
is distributed under the terms of the Artistic License 2.0. For more
details, see the full text of the license in the file LICENSE.


## AUTHOR

Jonathan Worthington is the current pumpking for Rakudo Perl 6.
See CREDITS for the many people that have contributed
to the development of the Rakudo compiler.
34 changes: 34 additions & 0 deletions tools/build/binary-release/Linux/scripts/set-env.sh
@@ -0,0 +1,34 @@
#!/bin/sh

# Sourced from https://stackoverflow.com/a/29835459/1975049
rreadlink() (
target=$1 fname= targetDir= CDPATH=
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on
while :; do
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" || exit 1
fname=$(command basename -- "$target")
[ "$fname" = '/' ] && fname=''
if [ -L "$fname" ]; then
target=$(command ls -l "$fname")
target=${target#* -> }
continue
fi
break
done
targetDir=$(command pwd -P)
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)

EXEC=$(rreadlink "$0")
DIR=$(dirname -- "$EXEC")

export PATH=$DIR/../bin:$DIR/../share/perl6/site/bin:$PATH

100 changes: 100 additions & 0 deletions tools/build/binary-release/Windows/README.md
@@ -0,0 +1,100 @@
# Rakudo Perl 6

This is a pre-built package of Rakudo Perl 6, a Perl 6 compiler.

This package includes the Rakudo Perl 6 compiler and the module installer Zef.


## Running Perl 6

To run a Perl 6 program, open a command prompt and type

C:\path\to\this\folder\bin\perl6.exe my_script.p6

or start a REPL by calling `perl6.exe` without an argument

C:\path\to\this\folder\bin\perl6.exe

To add the relevant paths to your environment so you don't have to type the full path execute the following script in CMD:

C:\path\to\this\folder\scripts\set-env.bat

or when using Powershell (note the dot at the beginning):

. C:\path\to\this\folder\scripts\set-env.ps1


## Installing modules

To install Perl 6 modules you can use the Zef module installer.

C:\path\to\this\folder\bin\perl6.exe C:\path\to\this\folder\share\perl6\site\bin\zef install JSON::Fast

Modules will be installed into this Perl 6 package and will thus be available even when moving this package.


### Native code modules

To install modules that require a compiler toolchain, you have to have the Microsoft Visual C compiler installed. It's included in the Microsoft BuildTools which can be freely downloaded [here](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools).


## Changes

Recent changes and feature additions are documented in the `docs/ChangeLog`
text file.

To receive important notifications from the core developer team, please
subscribe to [the p6lert service](https://alerts.perl6.org) using the RSS feed,
twitter, or [the p6lert commandline script](https://github.com/zoffixznet/perl6-p6lert).


## Where to get help or answers to questions

There are several mailing lists, IRC channels, and wikis available with
help for Perl 6 and Rakudo. Figuring out the right one to use
is often the biggest battle. Here are some rough guidelines:

The central hub for Perl 6 information is [perl6.org](http://perl6.org/).
This is always a good starting point.

If you have a question about Perl 6 syntax or the right way to approach
a problem using Perl 6, you probably want the “perl6-users@perl.org
mailing list or the [irc.freenode.net/#perl6 IRC
channel](https://webchat.freenode.net/?channels=#perl6). The perl6-users
list is primarily for the people who want to use Perl 6 to write
programs, so newbie questions are welcomed there. Newbie questions
are also welcome on the #perl6 channel; the Rakudo and Perl 6
development teams tend to hang out there and are generally glad
to help. You can follow [@perl6org](https://twitter.com/perl6org)
and on Twitter, there's a Perl 6 news aggregator at
[Planet Perl 6](http://pl6anet.org/).

Questions about NQP can also be posted to the #perl6 IRC channel.
For questions about MoarVM, you can join #moarvm on freenode.


## Reporting bugs

See https://rakudo.org/bugs


## Submitting patches

If you have a patch that fixes a bug or adds a new feature, please
create a pull request using github's pull request infrastructure.

See [our contribution guidelines](https://github.com/rakudo/rakudo/blob/master/CONTRIBUTING.md) for more information.


## License

Rakudo Perl 6 is Copyright © 2008-2019, The Perl Foundation. Rakudo Perl 6
is distributed under the terms of the Artistic License 2.0. For more
details, see the full text of the license in the file LICENSE.


## AUTHOR

Jonathan Worthington is the current pumpking for Rakudo Perl 6.
See CREDITS for the many people that have contributed
to the development of the Rakudo compiler.
2 changes: 2 additions & 0 deletions tools/build/binary-release/Windows/scripts/set-env.bat
@@ -0,0 +1,2 @@
SET PATH=%~dp0%\..\bin;%~dp0%\..\share\perl6\site\bin;%PATH%

3 changes: 3 additions & 0 deletions tools/build/binary-release/Windows/scripts/set-env.ps1
@@ -0,0 +1,3 @@
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
$Env:PATH = "$scriptPath\..\bin;$scriptPath\..\share\perl6\site\bin;$Env:PATH"

0 comments on commit cde4055

Please sign in to comment.