Update source code locations and QubesBuilder documentation

This commit is contained in:
Marek Marczykowski-Górecki 2015-04-21 14:41:23 +02:00
parent 81c8b8b6d6
commit 90a55e5b2e
3 changed files with 31 additions and 74 deletions

View File

@ -8,7 +8,9 @@ redirect_from: /wiki/QubesBuilder/
Building Qubes from scratch Building Qubes from scratch
=========================== ===========================
We have recently created a fully automated build system for Qubes, that downloads, builds and packages all the Qubes components, and finally should spit out a ready-to-use installation ISO. We have a fully automated build system for Qubes, that downloads, builds and
packages all the Qubes components, and finally should spit out a ready-to-use
installation ISO.
In order to use it one should use an rpm-based distro, like Fedora :) and should ensure the following packages are installed: In order to use it one should use an rpm-based distro, like Fedora :) and should ensure the following packages are installed:
@ -18,12 +20,12 @@ In order to use it one should use an rpm-based distro, like Fedora :) and should
- make - make
- wget - wget
- rpmdevtools - rpmdevtools
- pandoc - python-sh
Unusually one can install those packages by just issuing: Unusually one can install those packages by just issuing:
{% highlight trac-wiki %} {% highlight trac-wiki %}
sudo yum install git createrepo rpm-build make wget rpmdevtools pandoc sudo yum install git createrepo rpm-build make wget rpmdevtools python-sh
{% endhighlight %} {% endhighlight %}
The build system creates build environments in chroots and so no other packages are needed on the host. All files created by the build system are contained within the qubes-builder directory. The full build requires some 25GB of free space, so keep that in mind when deciding where to place this directory. The build system creates build environments in chroots and so no other packages are needed on the host. All files created by the build system are contained within the qubes-builder directory. The full build requires some 25GB of free space, so keep that in mind when deciding where to place this directory.
@ -36,10 +38,10 @@ cp builder.conf.default builder.conf
# (make sure to leave no spaces around '=' sign!) # (make sure to leave no spaces around '=' sign!)
NO_SIGN=1 NO_SIGN=1
# As time of writing this, the default for Qubes 2 Dom0 is fc18 # As time of writing this, the default for Qubes 2 Dom0 is fc20
# and VMs is fc18 so if you want to build Qubes 2 # and VMs is fc20 so if you want to build Qubes 2
DIST_DOM0=fc18 DIST_DOM0=fc20
DISTS_VM=fc18 DISTS_VM=fc20
{% endhighlight %} {% endhighlight %}
One additional useful requirement is that 'sudo root' work without any prompt, which is default on most distros (e.g. 'sudo bash' brings you the root shell without asking for any password). This is important as the builder needs to switch to root and then back to user several times during the build process. One additional useful requirement is that 'sudo root' work without any prompt, which is default on most distros (e.g. 'sudo bash' brings you the root shell without asking for any password). This is important as the builder needs to switch to root and then back to user several times during the build process.
@ -67,10 +69,10 @@ gpg --recv-keys 0x36879494
wget http://keys.qubes-os.org/keys/qubes-developers-keys.asc wget http://keys.qubes-os.org/keys/qubes-developers-keys.asc
gpg --import qubes-developers-keys.asc gpg --import qubes-developers-keys.asc
git clone git://git.qubes-os.org/joanna/qubes-builder.git qubes-builder git clone git://github.com/QubesOS/qubes-builder.git qubes-builder
cd qubes-builder cd qubes-builder
cp builder.conf.default builder.conf cp example-configs/qubes-os-master.conf builder.conf
# edit the builder.conf file and set the following variables: # edit the builder.conf file and set the following variables:
# (make sure to leave no spaces around '=' sign!) # (make sure to leave no spaces around '=' sign!)
# NO_SIGN="1" # NO_SIGN="1"
@ -92,11 +94,12 @@ And this should produce a shiny new ISO.
You can also build selected component separately. Eg. to compile only gui virtualization agent/daemon: You can also build selected component separately. Eg. to compile only gui virtualization agent/daemon:
{% highlight trac-wiki %} make gui-daemon
make gui-daemon
{% endhighlight %}
Full list you can get from make help. For advanced use and preparing sources for use with [QubesBuilder](/wiki/QubesBuilder) take a look at [QubesBuilderDetails](/wiki/QubesBuilderDetails) page. Full list you can get from make help. For advanced use and preparing sources
for use with [QubesBuilder](/wiki/QubesBuilder) take a look at [doc directory
in QubesBuilder](https://github.com/marmarek/qubes-builder/tree/master/doc) or
[QubesBuilderDetails](/wiki/QubesBuilderDetails) page.
Making customized build Making customized build
----------------------- -----------------------
@ -105,31 +108,21 @@ Making customized build
If you want to somehow modify sources, you can also do it, here are some basic steps: If you want to somehow modify sources, you can also do it, here are some basic steps:
1. Download qubes-builder as described above (if you want to use marmarek's branches, you should also download qubes-builder from his repo - replace 'joanna' with 'marmarek' in above git clone command) 1. Download qubes-builder as described above (if you want to use marmarek's branches, you should also download qubes-builder from his repo - replace 'QubesOS' with 'marmarek' in above git clone command)
2. Edit builder.conf (still the same as above), some useful additions: 2. Edit builder.conf (still the same as above), some useful additions:
- As time of writing this, the default is fc15, but latest supported is fc17, so switch to newer one - You can also set GIT\_PREFIX="marmarek/qubes-" to use my repo instead of "mainstream" - it contains newer (but less tested) versions
{% highlight trac-wiki %}
DISTS_VM="fc17"
{% endhighlight %}
- You can also set GIT\_SUBDIR="marmarek" to use my repo instead of "mainstream" - it contains newer (but less tested) versions
1. Download unmodified sources 1. Download unmodified sources
{% highlight trac-wiki %}
make get-sources make get-sources
{% endhighlight %}
1. **Make your modifications here** 1. **Make your modifications here**
1. Build the Qubes 1. Build the Qubes
`make qubes` actually is just meta target which build all required components in correct order `make qubes` actually is just meta target which build all required
components in correct order. List of components is configured in
{% highlight trac-wiki %} builder.conf. You can also check the current value at the end of `make
grep ^qubes: Makefile help`, or using `make build-info`.
qubes: get-sources xen core kernel gui addons docs template kde-dom0 installer qubes-manager dom0-updates sign-all
{% endhighlight %}
> `get-sources` is already done, so continue with the next one. You can skip `sign-all` if you've disabled signing > `get-sources` is already done, so continue with the next one. You can skip `sign-all` if you've disabled signing
> >
@ -139,47 +132,7 @@ If you want to somehow modify sources, you can also do it, here are some basic s
1. build iso installation image 1. build iso installation image
{% highlight trac-wiki %}
make iso make iso
{% endhighlight %}
### Non-default git branches
**Below example values (especially branch names) are outdated, but config options and steps are still valid**
You can use above tool to build Qubes with some components modified. Besides manual source modification, it is possible to use non-default git repositories, or just another branches. For example to try (**unofficial, not supported**) configuration with newer kernel and xorg server, you can add to builder.conf:
{% highlight trac-wiki %}
GIT_SUBDIR="marmarek"
BRANCH_kernel=devel-3.4
BRANCH_dom0_updates=devel/xserver-1.12
# NO_SIGN=1 can also be useful
{% endhighlight %}
before doing "make qubes". If you built anything before this modification, you should remove qubes-src directory first to fetch the sources again (this will also remove packages compiled before). Above devel/xserver-1.12 branch require some modification of Makefile in qubes-builder. Find dom0-updates target and replace it with:
{% highlight trac-wiki %}
dom0-updates:
MAKE_TARGET="stage0" ./build.sh $(DIST_DOM0) dom0-updates
MAKE_TARGET="stage1" ./build.sh $(DIST_DOM0) dom0-updates
MAKE_TARGET="stage2" ./build.sh $(DIST_DOM0) dom0-updates
MAKE_TARGET="stage3" ./build.sh $(DIST_DOM0) dom0-updates
MAKE_TARGET="stage4" ./build.sh $(DIST_DOM0) dom0-updates
{% endhighlight %}
Then you can build qubes as usual.
There is one issue with above experimental version: new Xorg server have different cmdline options, so after installation one config file must be edited to reflect this change. At first system startup hit ESC while progress bar is displayed - to switch to detailed boot view. After you set up user account etc, you must fix KDM config file.
1. Switch to tty2 (Alt-F2)
2. Login as just created user
3. Switch to root (sudo -s)
4. Edit /etc/kde/kdm/kdmrc
- locate "[ServerArgsLocal?](/wiki/ServerArgsLocal)=-nr -nolisten tcp" line
- remove "-nr" from it
5. Restart login manager (now it will start and allow you to login graphically): initctl restart prefdm
Code verification keys management Code verification keys management
================================= =================================

View File

@ -30,7 +30,7 @@ Note we do *not* relay above on the security of our server (keys.qubes-os.org) n
Now lets bootstrap the builder. Unfortunately the builder cannot verify itself (the classic Chicken and Egg problem), so we need to verify the signature manually: Now lets bootstrap the builder. Unfortunately the builder cannot verify itself (the classic Chicken and Egg problem), so we need to verify the signature manually:
{% highlight trac-wiki %} {% highlight trac-wiki %}
$ git clone git://git.qubes-os.org/qubes-r3/qubes-builder.git $ git clone git://github.com/QubesOS/qubes-builder.git
$ cd qubes-builder $ cd qubes-builder
$ git describe --exact-match HEAD $ git describe --exact-match HEAD
<some tag> <some tag>

View File

@ -15,18 +15,22 @@ All the Qubes code is kept in GIT repositories. We divided the project into seve
- `gui-agent-linux.git` -- GUI virtualization, Linux VM side. - `gui-agent-linux.git` -- GUI virtualization, Linux VM side.
- `linux-template-builder.git` - scripts and other files used to create Qubes templates images. - `linux-template-builder.git` - scripts and other files used to create Qubes templates images.
You can browse the repositories [on line via GitWeb](http://git.qubes-os.org/gitweb/). The Qubes official repositories are in the `qubes-rX` directory, where X is release number (1, 2, etc). You can browse the repositories [online on
GitHub](https://github.com/QubesOS/). The Qubes official repositories are on
this `QubesOS` github account.
To clone a repository: To clone a repository:
{% highlight trac-wiki %} {% highlight trac-wiki %}
git clone git://git.qubes-os.org/qubes-r2/<repo_name>.git <repo_name> git clone git://github.com/QubesOS/<repo_name>.git <repo_name>
{% endhighlight %} {% endhighlight %}
e.g.: e.g.:
{% highlight trac-wiki %} {% highlight trac-wiki %}
git clone git://git.qubes-os.org/qubes-r2/core-admin.git core-admin git clone git://github.com/QubesOS/core-admin.git core-admin
{% endhighlight %} {% endhighlight %}
Currently the preferred way of contributing to the project is by [sending a patch](/wiki/DevelFaq#Q:HowdoIsubmitapatch) via the project's mailing list (`git format-patch`). If you want to contribute to the project, there are two preferred ways:
1. Use github [fork & pull requests](https://guides.github.com/activities/forking/)
2. [sending a patch](/wiki/DevelFaq#Q:HowdoIsubmitapatch) via the project's mailing list (`git format-patch`).