nix-tools/README.md

356 lines
8.8 KiB
Markdown
Raw Normal View History

2015-01-30 02:13:01 +01:00
manjaro-tools
2014-10-04 00:31:47 +02:00
=============
2016-02-17 19:19:08 +01:00
Manjaro-tools-0.11.0
2014-12-27 19:49:53 +01:00
User manual
2015-01-17 21:28:09 +01:00
2015-02-12 22:15:56 +01:00
###1. manjaro-tools.conf
2014-12-27 19:49:53 +01:00
2015-01-30 02:39:15 +01:00
manjaro-tools.conf is the central configuration file for manjaro-tools.
By default, the config is installed in
2015-01-30 02:13:01 +01:00
~~~
2015-01-30 02:39:15 +01:00
/etc/manjaro-tools/manjaro-tools.conf
2015-01-30 02:13:01 +01:00
~~~
2015-01-30 02:39:15 +01:00
A user manjaro-tools.conf can be placed in
2015-01-30 02:13:01 +01:00
~~~
2015-12-03 23:08:57 +01:00
$HOME/.config/manjaro-tools/manjaro-tools.conf
2015-01-30 02:13:01 +01:00
~~~
2015-01-30 02:39:15 +01:00
If the userconfig is present, manjaro-tools will load the userconfig values, however, if variables have been set in the systemwide
2015-01-30 02:13:01 +01:00
~~~
2015-12-03 23:31:59 +01:00
/etc/manjaro-tools/manjaro-tools.conf
2015-01-30 02:13:01 +01:00
~~~
2015-01-30 02:39:15 +01:00
these values take precedence over the userconfig.
Best practise is to leave systemwide file untouched.
2015-01-30 02:13:01 +01:00
By default it is commented and shows just initialization values done in code.
2015-01-13 13:41:28 +01:00
2015-02-12 22:15:56 +01:00
Tools configuration is done in manjaro-tools.conf or by args.
2015-01-30 02:39:15 +01:00
Specifying args will override manjaro-tools.conf settings.
User sets can be placed in
~~~
2015-12-03 23:08:57 +01:00
$HOME/.config/manjaro-tools/{pkg,iso}.d
~~~
overriding
~~~
2015-12-03 23:08:57 +01:00
/etc/manjaro-tools/{pkg,iso}.d
~~~
2015-01-17 21:21:54 +01:00
~~~
2015-03-02 23:42:51 +01:00
######################################################
################ manjaro-tools.conf ##################
######################################################
2015-01-17 21:21:54 +01:00
2015-05-21 22:44:48 +02:00
# default branch
2015-01-17 21:21:54 +01:00
# branch=stable
2015-05-21 22:44:48 +02:00
# default arch: auto detect
2015-01-17 21:21:54 +01:00
# arch=$(uname -m)
2015-11-02 18:43:31 +01:00
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
2015-01-17 21:21:54 +01:00
# cache_dir=/var/cache/manjaro-tools
2015-05-21 22:44:48 +02:00
# build dir where buildpkg or buildiso chroots are created
# chroots_dir=/var/lib/manjaro-tools
2015-06-03 17:27:21 +02:00
# custom build mirror server
# build_mirror=http://mirror.netzspielplatz.de/manjaro/packages
2015-01-19 05:31:52 +01:00
################ buildtree ###############
# manjaro package tree
# repo_tree=('core' 'extra' 'community' 'multilib' 'openrc')
# host_tree=https://github.com/manjaro
2015-06-12 00:06:23 +02:00
# default https seems slow; try this
# host_tree_abs=git://projects.archlinux.org/svntogit
2015-01-19 05:31:52 +01:00
2015-01-17 21:21:54 +01:00
################ buildpkg ################
# default pkg buildset; name without .set extension
# buildset_pkg=default
################ buildiso ################
2015-12-27 12:28:43 +01:00
# profile_repo='manjaro-tools-iso-profiles'
2015-01-17 21:21:54 +01:00
# default iso buildset; name without .set extension
# buildset_iso=default
# unset defaults to given value
2015-03-05 10:54:28 +01:00
# dist_name="Manjaro"
2015-01-17 21:21:54 +01:00
# unset defaults to given value
2015-12-03 23:08:57 +01:00
# dist_release=15.12
2015-01-17 21:21:54 +01:00
2015-03-05 10:54:28 +01:00
# unset defaults to value sourced from /etc/lsb-release
2015-12-03 23:08:57 +01:00
# dist_codename="Capella"
2015-03-03 02:53:30 +01:00
2015-01-17 21:21:54 +01:00
# unset defaults to given value
2015-03-05 10:54:28 +01:00
# dist_branding="MJRO"
2015-01-17 21:21:54 +01:00
2016-02-17 18:55:51 +01:00
# unset defaults to given value
# iso_kernel="linux44"
2015-05-21 22:44:48 +02:00
# iso publisher
2015-05-11 23:34:20 +02:00
# iso_publisher="Manjaro Linux <http://www.manjaro.org>"
2015-05-21 22:44:48 +02:00
# iso app id
2015-05-11 23:34:20 +02:00
# iso_app_id="Manjaro Linux Live/Rescue CD"
2015-11-24 17:07:23 +01:00
# compression used, possible values xz (default, best compression), gzip, lzma, lzo, lz4
# lz4 is faster but worst compression, may be useful for locally testing isos
2015-03-05 10:54:28 +01:00
# iso_compression=xz
2015-01-17 21:21:54 +01:00
2015-01-28 21:05:28 +01:00
# valid: md5, sha1, sha256, sha384, sha512
2015-03-05 10:54:28 +01:00
# iso_checksum=md5
2015-06-25 16:59:11 +02:00
2016-02-17 18:55:51 +01:00
# possible values: openrc,systemd
# initsys="systemd"
# unset defaults to given value
# kernel="linux44"
2015-06-25 16:59:11 +02:00
# experimental; use overlayfs instead of aufs
2015-06-25 18:00:55 +02:00
# requires minimum 4.0 kernel on the build host and on iso in profile.conf
2015-06-25 16:59:11 +02:00
# use_overlayfs="false"
2015-11-24 17:07:23 +01:00
################ deployiso ################
# the server url
# remote_url=sourceforge.net
# the server project
# remote_project=manjaro-testing
# the server home
# remote_target=/home/frs/project
# the server user
# remote_user=[SetUser]
# set upload bandwidth limit in kB/s
# limit=100
2015-03-02 23:42:51 +01:00
~~~
2015-01-18 10:04:55 +01:00
###2. buildpkg
2015-01-17 21:16:08 +01:00
2015-05-12 19:57:08 +02:00
buildpkg is the chroot build script of manjaro-tools.
2015-02-12 22:15:56 +01:00
It it run in a abs/pkgbuilds directory which contains directories with PKGBUILD.
2014-12-27 19:49:53 +01:00
2015-03-02 20:05:27 +01:00
######manjaro-tools.conf supports the makepkg.conf variables
2014-12-27 19:49:53 +01:00
2015-01-17 21:28:09 +01:00
####Arguments
2014-12-27 19:49:53 +01:00
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
$ buildpkg -h
Usage: buildpkg [options]
2015-05-22 00:12:35 +02:00
-p <pkg> Buildset or pkg [default: default]
2015-06-04 16:23:49 +02:00
-a <arch> Arch [default: auto]
-b <branch> Branch [default: stable]
2015-01-15 06:48:34 +01:00
-r <dir> Chroots directory
2015-06-04 16:23:49 +02:00
[default: /var/lib/manjaro-tools/buildpkg]
2015-06-02 17:44:10 +02:00
-i <pkg> Install a package into the working copy of the chroot
2014-12-27 19:49:53 +01:00
-c Recreate chroot
2015-05-22 00:12:35 +02:00
-w Clean up cache and sources
2014-12-27 19:49:53 +01:00
-n Install and run namcap check
-s Sign packages
2015-11-01 08:50:55 +01:00
-u udev base-devel group (no systemd)
2014-12-27 19:49:53 +01:00
-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
2015-01-30 02:13:01 +01:00
######* build sysvinit package for both arches and branch testing:
2014-12-27 19:49:53 +01:00
2015-03-02 20:05:27 +01:00
* i686(buildsystem is x86_64)
2015-01-17 21:21:54 +01:00
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
~~~
2015-01-17 21:21:54 +01:00
2015-03-02 20:05:27 +01:00
* for x86_64
2015-01-17 21:21:54 +01:00
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
~~~
2015-01-17 21:21:54 +01:00
2015-05-06 23:04:08 +02:00
You can drop the branch arg if you set the branch in manjaro-tools.conf
2015-03-05 17:33:47 +01:00
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.
2014-12-27 19:49:53 +01:00
2015-01-30 02:39:15 +01:00
######* -c
2015-06-17 21:46:24 +02:00
* Removes the chroot dir
* If the -c parameter is not used, buildpkg will update the existing chroot or create a new one if none is present.
2015-01-30 02:39:15 +01:00
######* -w
2015-06-17 21:46:24 +02:00
* Cleans pkgcache, and logfiles
2015-01-30 02:39:15 +01:00
######* -s
2015-06-17 21:46:24 +02:00
* Signs the package when built
2015-01-30 02:39:15 +01:00
######* -n
2015-06-17 21:46:24 +02:00
* Installs the built package in the chroot and runs a namcap check
2014-12-27 19:49:53 +01:00
2015-10-22 12:09:59 +02:00
######* -u
* Create udev build root (for eudev builds)
2015-01-18 10:04:55 +01:00
###3. buildiso
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-30 02:13:01 +01:00
#####Packages for livecd only:
2014-12-27 19:49:53 +01:00
2015-01-30 02:39:15 +01:00
* manjaro-livecd-cli-installer
2015-01-17 21:16:08 +01:00
* manjaro-livecd-openrc
* manjaro-livecd-systemd
2014-12-27 19:49:53 +01:00
2015-01-17 21:28:09 +01:00
####Arguments
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-06-02 17:44:10 +02:00
-p <profile> Buildset or profile [default: default]
2015-06-04 16:23:49 +02:00
-a <arch> Arch [default: auto]
-b <branch> Branch [default: stable]
2015-01-15 06:48:34 +01:00
-r <dir> Chroots directory
2015-06-04 16:23:49 +02:00
[default: /var/lib/manjaro-tools/buildiso]
-t <dir> Target directory
[default: /var/cache/manjaro-tools/iso]
2016-02-17 19:19:08 +01:00
-k <name> Kernel to use
[default: linux44]
2016-02-17 19:26:24 +01:00
-i <name> Init system to use
2016-02-17 19:19:08 +01:00
[default: systemd]
2015-01-15 06:48:34 +01:00
-c Disable clean work dir
2016-02-17 19:19:08 +01:00
-x Build images only
-z Generate iso only
2015-01-30 02:13:01 +01:00
Requires pre built images (-i)
2015-05-22 14:54:16 +02:00
-v Verbose output, show profies detail (-q)
2015-01-30 02:13:01 +01:00
-q Query settings and pretend build
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
2015-01-30 02:13:01 +01:00
######* build xfce iso profile for both arches and branch testing on x86_64 build system
2015-03-02 20:05:27 +01:00
* i686 (buildsystem is x86_64)
2015-01-17 21:21:54 +01:00
2015-01-17 21:11:03 +01:00
~~~
2015-01-30 02:39:15 +01:00
buildiso -p xfce -a i686 -b testing
2015-01-17 21:11:03 +01:00
~~~
2015-01-17 21:21:54 +01:00
2015-03-02 20:05:27 +01:00
* for x86_64
2015-01-17 21:21:54 +01:00
2015-01-17 21:11:03 +01:00
~~~
2015-01-15 06:48:34 +01:00
buildiso -p xfce -b testing
2015-01-17 21:11:03 +01:00
~~~
2015-01-17 21:21:54 +01:00
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:28:09 +01:00
####Special parameters
2015-01-30 02:39:15 +01:00
######* -i
2015-06-17 21:46:24 +02:00
* Build images only
* will stop after all packages have been installed. No iso sqfs compression will be executed
2015-02-12 22:15:56 +01:00
######* -s
2015-06-17 21:46:24 +02:00
* Use this to sqfs compress the chroots if you previously used -i.
2014-12-27 19:49:53 +01:00
###4. buildtree
2015-01-19 05:31:52 +01:00
2015-05-12 19:57:08 +02:00
buildtree is a little tools to sync arch abs and manjaro PKGBUILD git repos.
2015-01-19 05:31:52 +01:00
####Arguments
~~~
$ buildtree -h
Usage: buildtree [options]
-s Sync manjaro tree
-a Sync arch abs
-c Clean package tree
-q Query settings
-h This help
~~~
2015-01-30 02:13:01 +01:00
######* sync arch and manjaro trees
2015-01-19 05:31:52 +01:00
~~~
buildtree -as
~~~
2015-07-03 18:02:57 +02:00
###5. manjaro-chroot
2015-07-03 18:02:57 +02:00
manjaro-chroot is a little tool to quickly chroot into a second system installed on the host.
If the automount option is enabled, manjaro-chroot will detect installed systems with os-prober, and pops up a list with linux systems to select from.
If there is only 1 system installed besides the host system, no list will pop up and it will automatically mount the second system.
2015-11-25 00:29:45 +01:00
####Arguments
2015-07-03 18:02:57 +02:00
~~~
$ manjaro-chroot -h
2015-12-03 23:08:57 +01:00
usage: manjaro-chroot -a [or] manjaro-chroot chroot-dir [command]
2015-07-03 18:02:57 +02:00
-a Automount detected linux system
-q Query settings and pretend
-h Print this help message
If 'command' is unspecified, manjaro-chroot will launch /bin/sh.
2015-12-03 23:08:57 +01:00
If 'automount' is true, manjaro-chroot will launch /bin/bash
and /build/manjaro-tools/manjaro-chroot.
2015-07-03 18:02:57 +02:00
~~~
######* automount
~~~
manjaro-chroot -a
~~~
######* mount manually
~~~
manjaro-chroot /mnt /bin/bash
~~~
2015-11-24 16:58:40 +01:00
###6. deployiso
2015-11-24 16:58:40 +01:00
deployiso is a script to upload a specific iso or a buiildset to SF.
It needs to be run inside the iso-profiles directory.
2015-11-24 17:07:23 +01:00
Ideally, you have a running ssh agent on the host, and your key added, and your public key provided to your SF account. You can then upload without being asked for ssh password.
2015-11-25 00:29:45 +01:00
####Arguments
2015-11-24 16:58:40 +01:00
~~~
$ deployiso -h
Usage: deployiso [options]
-p Source folder to upload [default:default]
2015-12-03 23:08:57 +01:00
-a Arch to upload [default:x86_64]
-l Limit bandwidth in kB/s [default:80]
2015-11-24 16:58:40 +01:00
-c Create new remote edition_type with subtree
2015-11-24 17:07:23 +01:00
-u Update remote iso
2015-11-24 16:58:40 +01:00
-q Query settings and pretend upload
2015-12-03 23:08:57 +01:00
-v Verbose output
2015-11-24 16:58:40 +01:00
-h This help
~~~
2015-11-25 00:29:45 +01:00
######* upload official buildset, ie all built iso defined in a buildset
2015-11-24 16:58:40 +01:00
~~~
deployiso -p official -c
~~~
######* upload xfce
~~~
deployiso -p xfce -c
~~~