Commits

Henk Langeveld committed 3725aaa

building-userland-with-gcc created

Get rid of all the conditionals

  • Participants
  • Parent commits 669fe53

Comments (0)

Files changed (2)

File building-userland

 # http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.html
 
 # The following steps are needed to get it running:
-export DOWNLOAD_LOCATION=$HOME
-cd /opt
-tar xjf $DOWNLOAD_LOCATION/SolarisStudio12.3-solaris-x86-bin.tar.bz2 -C ./
-ln -s /opt/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/ ./SUNWspro
+################################
+# export DOWNLOAD_LOCATION=$HOME
+# cd /opt
+# tar xjf $DOWNLOAD_LOCATION/SolarisStudio12.3-solaris-x86-bin.tar.bz2 -C ./
+# ln -s /opt/SolarisStudio12.3-solaris-x86-bin/solarisstudio12.3/ ./SUNWspro
+################################
+
 # Downloading illumos-userland and preparing for first use
 
-# See the illumos wiki instructions How to build illumos for optional suggestions about build environment (dedicated ZFS dataset layouts, etc.)
+# See the illumos wiki instructions How to build illumos for optional 
+# suggestions about build environment (dedicated ZFS dataset layouts, etc.)
 # 
 # Check out the repository (subdirectory illumos-userland must not pre-exist):
-cd ~
-hg clone https://bitbucket.org/illumos/illumos-userland
-cd illumos-userland
+################################
+# cd ~
+# hg clone https://bitbucket.org/illumos/illumos-userland
+# cd illumos-userland
 
-# Now we will run the setup stage, which will prepare some tools, and create an IPS pkg5 repository for first use under the i386/build directory:
-cd $HOME/illumos-userland
- 
-# If you have the Sun Studio compilers installed
-gmake setup
- 
-# If you don't have (access to) the Studio compilers or want to use GCC
-gmake setup COMPILER=gcc
+# Now we will run the setup stage, which will prepare some tools, 
+# and create an IPS pkg5 repository for first use under the i386/build directory:
+
+################################
+# cd $HOME/illumos-userland
+# gmake setup # If you have the Sun Studio compilers installed
+################################
+# If you don't have (access to) the Studio compilers or want to use GCC:
+# gmake setup COMPILER=gcc
 
 # Important: Checking your environment
 
 # Make the check-environment target to check your environment is set up correctly:
+################################
 gmake check-environment
 
 # This will report back any issues.
 # Adding the local repository to your publisher list
-sudo /usr/bin/pkg set-publisher -p file://$HOME/illumos-userland/i386/repo
-sudo /usr/bin/pkg set-publisher -P illumos-userland
-sudo /usr/bin/pkg set-publisher --non-sticky oi-experimental
+################################
+# sudo /usr/bin/pkg set-publisher -p file://$HOME/illumos-userland/i386/repo
+# sudo /usr/bin/pkg set-publisher -P illumos-userland
+# sudo /usr/bin/pkg set-publisher --non-sticky oi-experimental
 
 # You will now be able to pkg install the software you have built and published via oi-build.
 # Optional: Running a local pkg server for installation on other zones/hosts
 
 # If you would like to use your illumos-userland repository on other zones or hosts, you can run a pkg server:
+################################
 # /usr/lib/pkg.depotd -d $HOME/illumos-userland/i386/repo -p 10000
 
 # On other hosts, you can then specify http://hostname:10000 instead of the file:// address above.
 # Ready to build and install your first package
 
 # Simply descend into the illumos-userland/components/SOFTWARE directory (where SOFTWARE is the name of the bit of software you wish to build):
-cd $HOME/illumos-userland/components/SOFTWARE
-gmake publish
-sudo pkg install SOFTWARE
+################################
+# cd $HOME/illumos-userland/components/SOFTWARE
+# gmake publish
+# sudo pkg install SOFTWARE
+################################
 # Contributing changes back to illumos-userland
 # Preparing you changes for review
 
 # When you think your changes are ready for review you will need to generate a diff. The most common way to do this is "hg diff". It's recommended that you explain the implications of your changeset if it's not immediately obvious, and how you've tested it.
-# Committing changes
+
+# Committing changes #
 
 # If you changeset has had either "2 thumbs up and 3 days open for review" or "4 thumbs up" then you are now ready to push you changes to the repo. Add and commit all files for your new component using:
-cd ~/illumos-userland/components/SOFTWARE
-hg add Makefile *.p5m <etc.>
-hg commit .
+################################
+# cd ~/illumos-userland/components/SOFTWARE
+# hg add Makefile *.p5m <etc.>
+# hg commit .
 
 # Commit messages must follow this format:
 # <bug id> <bug summary>
 # Approved by: My Name <my.name@mydomain.net>
 
 # When committing changes on behalf of someone else the commit message remains the same but you must pass the committer's name to hg commit.
-hg commit -u 'Contributor Name <contributor.name@fake.net>'
+################################
+# hg commit -u 'Contributor Name <contributor.name@fake.net>'

File building-userland-with-gcc

+#!/bin/ksh
+
+# This version ignores the sunstudio instructions and assumes a build with gcc
+
+# Create a buildzone first, and set its repo to oi experimental
+/bin/ksh setup-pkg-experimental
+/bin/ksh get-required-packages-for-userland
+
+# Downloading illumos-userland and preparing for first use #
+
+TOP=${HOME:-REPLACE_WITH_YOUR_ALTERNATIVE}
+# See the illumos wiki instructions How to build illumos for optional 
+# suggestions about build environment (dedicated ZFS dataset layouts, etc.)
+# 
+# Check out the repository (subdirectory illumos-userland must not pre-exist):
+################################
+cd ${TOP:?} || exit
+hg clone https://bitbucket.org/illumos/illumos-userland
+cd illumos-userland || exit
+
+# Now we will run the setup stage, which will prepare some tools, 
+# and create an IPS pkg5 repository for first use under the i386/build directory:
+
+gmake setup COMPILER=gcc
+gmake check-environment || exit # check your environment is set up correctly
+
+# This will report back any issues.
+# Adding the local repository to your publisher list
+
+sudo /usr/bin/pkg set-publisher -p file://$HOME/illumos-userland/i386/repo
+sudo /usr/bin/pkg set-publisher -P illumos-userland
+sudo /usr/bin/pkg set-publisher --non-sticky oi-experimental
+
+# You will now be able to pkg install the software you have built and published via oi-build.
+# Optional: Running a local pkg server for installation on other zones/hosts
+
+# If you would like to use your illumos-userland repository on other zones or hosts, you can run a pkg server:
+################################
+function run_local_pkg_server { typeset TOP
+	TOP=${1:?parent directory for illumos-userland directory} || return
+	/usr/lib/pkg.depotd -d ${TOP}/illumos-userland/i386/repo -p 10000
+}
+
+# On other hosts, you can then specify http://hostname:10000 instead of the file:// address above.
+
+# See the illumos wiki instructions How to build illumos for optional suggestions
+# about running a pkg server instance as an SMF service.
+# Ready to build and install your first package
+
+# Simply descend into the illumos-userland/components/SOFTWARE directory
+# (where SOFTWARE is the name of the bit of software you wish to build):
+################################
+# cd $HOME/illumos-userland/components/SOFTWARE
+# gmake publish
+# sudo pkg install SOFTWARE
+################################
+# Contributing changes back to illumos-userland
+# Preparing you changes for review
+
+# When you think your changes are ready for review you will need to
+# generate a diff. The most common way to do this is "hg diff". It's
+# recommended that you explain the implications of your changeset if it's
+# not immediately obvious, and how you've tested it.
+
+# Committing changes #
+
+# If you changeset has had either "2 thumbs up and 3 days open for review"
+# or "4 thumbs up" then you are now ready to push you changes to the repo.
+# Add and commit all files for your new component using:
+################################
+# cd ~/illumos-userland/components/SOFTWARE
+# hg add Makefile *.p5m <etc.>
+# hg commit .
+
+# Commit messages must follow this format:
+# <bug id> <bug summary>
+# Reviewed by: Reviewer Name <reviewer.name@fake.net>
+# Reviewed by: Reviewer Name <reviewer.name@fake.net>
+# Reviewed by: Reviewer Name <reviewer.name@fake.net>
+# Approved by: My Name <my.name@mydomain.net>
+
+# When committing changes on behalf of someone else the commit message remains the same but you must pass the committer's name to hg commit.
+################################
+# hg commit -u 'Contributor Name <contributor.name@fake.net>'