manjaro-tools/README.md

193 lines
6.4 KiB
Markdown
Raw Normal View History

2015-01-15 06:53:21 +01:00
manjaro-tools
2014-10-04 00:31:47 +02:00
=============
2015-01-15 06:48:34 +01:00
Manjaro-tools-0.9.6
2014-12-27 19:49:53 +01:00
User manual
2015-01-17 21:11:03 +01:00
<ol><li>manjaro.tools.conf</li>
2014-12-27 19:49:53 +01:00
manjaro-tools.conf is the central configuration file for manjaro-tools.
By default, the config is installed in /etc/manjaro-tools/manjaro-tools.conf
A user config manjaro-tools.conf can be placed in $HOME/.config.
2015-01-17 21:11:03 +01:00
If the userconfig is present, manjaro-tools will load userconfig values, however, if variables have been set in the systemwide /etc/manjaro-tools/manjaro-tools.conf, these values take precedence over the userconfig.
Best practise is to leave systemwide file untouched, by default it is commented and shows just initialization values done in code.
2015-01-13 13:41:28 +01:00
2015-01-17 21:11:03 +01:00
<ol><li>config files in iso profiles</li></ol>
2014-12-27 19:49:53 +01:00
Each iso profile must have these files or symlinks to shared:
2015-01-17 21:11:03 +01:00
* initsys<br>
2014-12-27 19:49:53 +01:00
contains the init type string, systemd or openrc, could be eg a future runit implemetation too
2015-01-17 21:11:03 +01:00
* displaymanager<br>
2014-12-27 19:49:53 +01:00
contains the DM string
if no DM is used, set it to 'none'
2015-01-17 21:11:03 +01:00
* Packages-Livecd<br>
2014-12-27 19:49:53 +01:00
contains packages you only want on livecd but not installed on the target system with installer
2015-01-15 06:53:21 +01:00
default files are in shared folder and can be symlinked or defined in a real file
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
If you need a custom livecd-overlay, create a overlay-livecd folder in your profile, and symlink from shared/overlay-livecd/your_selection and add your modification
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
<li>buildpkg</li>
<br>
2014-12-27 19:49:53 +01:00
buildpkg is the chroot build script oi manjaro-tools.
2015-01-15 06:53:21 +01:00
It it run in a abs/pkgbuilds directory which contains directories with PKGBUILD.
It can be configured with manjaro-tools.conf or by args.
buildpkg creates by default a pkg cache dir in /var/cache/manjaro-tools/
Subdirectories will be created when building for the branch and architecture.
2014-12-27 19:49:53 +01:00
A word on makepkg.conf PKGDEST
manjarotools.conf supports the makepkg.conf variables
If you set PKGDEST all works fine, but be careful, that your PKGDEST is clean, or else buildpkg will move all files from PKGDEST to cache dir , not only the built package.
2015-01-17 21:11:03 +01:00
<ol><li>Arguments</li></ol>
<br>
2014-12-27 19:49:53 +01:00
The help(for x86_64 and manjaro-tools.conf set):
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
$ buildpkg -h
Usage: buildpkg [options] [--] [makepkg args]
2015-01-15 06:48:34 +01:00
-p <pkg> Set or pkg [default: default]
-a <arch> Arch [default: x86_64]
-b <branch> Branch [default: unstable]
-r <dir> Chroots directory
[default: /build/buildpkg]
2014-12-27 19:49:53 +01:00
-c Recreate chroot
-w Clean up
-n Install and run namcap check
-s Sign packages
-q Query settings and pretend build
-h This help
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
Example(assuming default manjaro-tools.conf):
2015-01-17 21:11:03 +01:00
* build sysvinit package for both arches and branch testing:
2014-12-27 19:49:53 +01:00
first i686(buildsystem is x86_64)
2015-01-17 21:11:03 +01:00
~~~
2014-12-27 19:49:53 +01:00
buildpkg -p sysvinit -a i686 -b testing -cwsn
2015-01-17 21:11:03 +01:00
~~~
2014-12-27 19:49:53 +01:00
for x86_64 and testing
2015-01-17 21:11:03 +01:00
~~~
2014-12-27 19:49:53 +01:00
buildpkg -p sysvinit -b testing -cswn
2015-01-17 21:11:03 +01:00
~~~
2014-12-27 19:49:53 +01:00
You can drop the branch arg if you set the branch in manjaro-tools.conf
the arch can also be set in manjaro-tools.conf, but under normal conditions, it is better to specify the non native arch by -a parameter.
2015-01-17 21:11:03 +01:00
* -c<br>
removes the chroot dir<br>
If the -c parameter is not used, buildpkg will update the existing chroot or create a new one if none is present.
* -w<br>
2014-12-27 19:49:53 +01:00
cleans pkgcache, and logfiles
2015-01-17 21:11:03 +01:00
* -s<br>
2014-12-27 19:49:53 +01:00
signs the package when built
2015-01-17 21:11:03 +01:00
* -n<br>
2014-12-27 19:49:53 +01:00
installs the built package in the chroot and runs a namcap check
2015-01-17 21:11:03 +01:00
<li>buildiso</li>
2014-12-27 19:49:53 +01:00
2015-01-15 06:48:34 +01:00
buildiso is used to build manjaro-iso-profiles. It is run insde the profiles folder.
2014-12-27 19:49:53 +01:00
2015-01-15 06:48:34 +01:00
Packages for livecd only:
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
* manjaro-livecd-cli-installer
* manjaro-livecd-openrc<br>
openrc-run scripts for livecd
* manjaro-livecd-systemd<br>
systemd units for livecd
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
<br>
<ol><li>Arguments</li>
2014-12-27 19:49:53 +01:00
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
$ buildiso -h
Usage: buildiso [options]
2015-01-15 06:48:34 +01:00
-p <profile> Set or profile [default: default]
-a <arch> Arch [default: x86_64]
-b <branch> Branch [default: unstable]
-r <dir> Chroots directory
[default: /build/buildiso]
-c Disable clean work dir
2014-12-27 19:49:53 +01:00
-q Query settings and pretend build
2015-01-15 06:48:34 +01:00
-i Build images only
-s Generate iso only
2014-12-27 19:49:53 +01:00
Requires pre built images
2015-01-15 06:48:34 +01:00
-x Disable clean xorg cache
-l Disable clean lng cache
2014-12-27 19:49:53 +01:00
-h This help
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
Example: build xfce iso profile for both arches and branch testing on x86_64 build system:
2015-01-17 21:11:03 +01:00
~~~
2015-01-15 06:48:34 +01:00
buildiso -p xfce -a i686 -b testing
2015-01-17 21:11:03 +01:00
~~~
for x86_64 and testing
~~~
2015-01-15 06:48:34 +01:00
buildiso -p xfce -b testing
2015-01-17 21:11:03 +01:00
~~~
The branch can be defined also in manjaro-tools.conf, but a manual parameter will always override conf settings.
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
<li>Special parameters</li>
* -i<br>
Build images only will stop after all packages have been installed. No iso sqfs compression will be executed
* -s<br>
Use this to sqfs compress the chroots if you previously used -i.
* -x<br>
By default, xorg package cache is cleaned on every build. Disabling the xorg cache cleaning will result in no dowload again for xorg drivers and the cache is used. Be careful with this option if you switch arches, it currently does not detect the pkg arch in the cache. So don't use it if you build for a different arch first time.
* -l<br>
Disable lng cache, by default lng cache is cleaned on every build. Uning this option will enable lng packages from cache rather than downloading them again.
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
</ol>
<li>mkset</li>
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
buildpkg and buildiso support building from buildsets
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
Default location of sets is:<br>
~~~
/etc/manjaro-tools/manjaro-tools/sets/pkg
/etc/manjaro-tools/manjaro-tools/sets/iso
~~~
but it can be configured in the manjaro-tools.conf file.
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
mkset is a little helper tools to easily create sets.
It is run inside the abs/pkgbuilds or iso profiles directory.
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
<ol><li>Arguments</li></ol><br>
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
~~~
$ mkset -h
Usage: mkset [options]
-c <name> Create set
-r <name> Remove set
-s <name> Show set
-i Iso mode
-q Query sets
-h This help
~~~
2015-01-15 06:48:34 +01:00
2015-01-17 21:11:03 +01:00
* create a pkg buildset for lxqt
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
~~~
mkset -c lxqt-0.8
~~~
2015-01-15 06:48:34 +01:00
2015-01-17 21:11:03 +01:00
* create a iso buildset
2014-12-27 19:49:53 +01:00
2015-01-17 21:11:03 +01:00
~~~
mkset -ic manjaro-0.9.0
~~~
2015-01-15 06:48:34 +01:00
2015-01-17 21:11:03 +01:00
The set name should not be a name of a package, or else buildpkg won't recognize the build list and only bulds the package you specified, since the buildpkg -p arg handles set and package name.
Same applies for buildiso.
2015-01-07 21:41:33 +01:00
2015-01-17 21:11:03 +01:00
If you create a set manually, the set must have a .set extension.
2015-01-15 06:48:34 +01:00
2015-01-17 21:11:03 +01:00
Examples
~~~
/etc/manjaro-tools/sets/pkg/lxqt-0.8.set
/etc/manjaro-tools/sets/iso/manjaro-0.9.0.set
~~~
</ol>