To build dilos-illumos on DilOS you should follow the steps below.
You need to upgrade DilOS. This step is required only once and should be made only in the global zone before preparing the build environment. You need to have 'sudo' permissions for your build user for DEB packages generation process. Please update the /etc/sudoers file with the correct info. Instructions are based on updates and sources tree tag with update from 'dilos-unstable'. Add the repository below to the top of the /etc/apt/sources.list file:
deb http://apt.dilos.org/dilos dilos2-unstable main
and issue the following commands:
sudo apt-get update && sudo os-upgrade
You will be upgraded to new BE. Please reboot after successful upgrade.
It is not recommended to build DilOS in the global zone. It is suggested creating new zone for the building process. As an example refer to the following links for more details about zone and network configuration:
The build process should be run in the newly created zone from the user with the sudo permissions (not root). So, now while you are in the global zone check the id of yournonrootuser (like you did it for admin user when creating DPKG zone before).
Obtain non-root user id
$ id yournonrootuser
uid=1000(admin) gid=10(staff) groups=10(staff)
All the commands below should be executed in the newly created zone (not global) - login to the zone with root account.
Note : The NOPASSWD option should be added to your build user in the /etc/sudoers file.
Create a build user:
After this you can re-login to the zone under this build user account and continue to do the following steps.
Prepare dilos-userland-gate clone:
For clone dilos-illumos you have to create account on BitBucket and send it by BitBucket mail form to account 'dilos' - I'll add you to repo
Install build dependencies:
Download and unpack closed binaries
Copy original illumos.sh:
The settings we are going to focus on for now are the following:
CODEMGR_WS - This should be the root of the directory with the code. If you followed the previous example, it will be /<your directory>/my-dilos-illumos.
STAFFER - Change this to the name of the non-privileged user you use on the system.
VERSION - Set this to illumos-gate or whatever version string you want for the build.
CLONE_WS - is the workspace nightly should do a bringover from. You can update it to: export CLONE_WS='https://bitbucket.org/dilos/dilos-illumos-gate'. This variable need for 'webrev' tool.
ON_CLOSED_BINS - tools folder. You should set it to the folder name, where your tar files have been unpacked to on the previous step. Here it would be export ON_CLOSED_BINS="/<your directory>/my-dilos-illumos/closed".
For GCC build only you have to add to your illumos.sh:
These variables are needed for the version identification and the DEB packages tools:
Prepare build tools:
To run the full build procedure, please issue the commands below:
Note that the command does not give any progress output. You can instead follow the log file at log/nightly.log, which is updated (slowly) during the build process. In another terminal, run:
For the incremental build, the following command can be used (don't forget to increase the DEB_VERSION number):
Update to New Build
Update Using apt-get
New build should be installed from the global zone. Add the build path to the apt repo list, for instance it could be something like:
Issue an apt-get update command to check get new deb packets information. Check that there are no issues with new repo. Note that it is OK to get the warning message below: