manjaro-tools/README.md

428 lines
11 KiB
Markdown
Raw Normal View History

2015-01-30 02:13:01 +01:00
manjaro-tools
2014-10-04 00:31:47 +02:00
=============
2017-05-06 09:56:25 +02:00
Manjaro-tools-0.15
2014-12-27 19:49:53 +01:00
User manual
2015-01-17 21:28:09 +01:00
2017-05-06 09:56:25 +02: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.
2016-06-09 18:03:51 +02:00
User build lists(eg 'my-super-build.list') can be placed in
~~~
2016-06-09 18:03:51 +02:00
$HOME/.config/manjaro-tools/pkg.list.d
$HOME/.config/manjaro-tools/iso.list.d
~~~
overriding
~~~
2016-06-09 18:03:51 +02:00
/etc/manjaro-tools/pkg.list.d
/etc/manjaro-tools/iso.list.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
# default target branch
# target_branch=stable
2015-01-17 21:21:54 +01:00
2018-09-29 23:49:53 +02:00
# default target arch: auto detect
2016-06-06 20:12:22 +02:00
# target_arch=$(uname -m)
2015-01-17 21:21:54 +01:00
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
2016-02-26 18:22:49 +01:00
# log dir where log files are created
# log_dir='/var/log/manjaro-tools'
2015-06-03 17:27:21 +02:00
# custom build mirror server
# build_mirror=https://manjaro.moson.eu
2015-06-03 17:27:21 +02:00
2015-01-19 05:31:52 +01:00
################ buildtree ###############
# manjaro package tree
2018-04-14 01:09:07 +02:00
# repo_tree=('core' 'extra' 'community' 'multilib')
2015-01-19 05:31:52 +01:00
# 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 ################
2016-06-09 18:03:38 +02:00
# default pkg build list; name without .list extension
# build_list_pkg=default
2015-01-17 21:21:54 +01:00
################ buildiso ################
#default branch for iso-profiles repo: v17.1>current release | master>development release
# branch=v17.1
2016-06-09 18:03:38 +02:00
# default iso build list; name without .list extension
# build_list_iso=default
2015-01-17 21:21:54 +01:00
2016-07-15 21:09:15 +02:00
# the dist release; default: auto
# dist_release=auto
2015-01-17 21:21:54 +01:00
2016-07-15 21:09:15 +02:00
# the branding; default: auto
# dist_branding="MANJARO"
2015-01-17 21:21:54 +01:00
2016-02-17 18:55:51 +01:00
# unset defaults to given value
# kernel="linux54"
2016-02-17 18:55:51 +01:00
2017-02-15 11:52:48 +01:00
# gpg key; leave empty or commented to skip sfs signing
# gpgkey=""
########## calamares preferences ##########
#See branding.desc.d for reference
# welcome style for calamares: true="Welcome to the %1 installer." ; false="Welcome to the Calamares installer for %1." (default)
# welcomestyle=false
# welcome image scaled (productWelcome)
# welcomelogo=true
# size and expansion policy for Calamares (possible value: normal,fullscreen,noexpand)
# windowexp=noexpand
# size of Calamares window, expressed as w,h.
# (possible units: pixel (px) or font-units (em))
# windowsize="800px,520px"
# colors for text and background components:
# background of the sidebar
# sidebarbackground=#454948
# text color
# sidebartext=#efefef
# background of the selected step
# sidebartextselect=#4d915e
# text color of the selected step
# sidebartexthighlight=#1a1c1b
2015-11-24 17:07:23 +01:00
################ deployiso ################
# the server user
2016-07-15 00:50:50 +02:00
# account=[SetUser]
2015-11-24 17:07:23 +01:00
2018-04-15 20:23:02 +02:00
# Set to 'true' to use ssh-agent to store passphrase.
# ssh_agent=false
# use alternative storage server (one or the other might be more stable)
# alt_storage=false
2018-04-14 01:09:07 +02:00
# the server project: manjaro|manjaro-community
2018-04-15 20:23:02 +02:00
# determined automatically based on profile if unset
2018-04-14 01:09:07 +02:00
# project="[SetProject]"
2015-11-24 17:07:23 +01:00
# set upload bandwidth limit in kB/s
2018-04-15 20:23:02 +02:00
# limit=
# the torrent tracker urls, comma separated
# tracker_url='udp://mirror.strits.dk:6969'
# Piece size, 2^n
# piece_size=21
2015-03-02 23:42:51 +01:00
~~~
2017-05-06 09:56:25 +02: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
2017-05-06 09:56:25 +02:00
###### manjaro-tools.conf supports the makepkg.conf variables
2014-12-27 19:49:53 +01:00
2017-05-06 09:56:25 +02: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-06-04 16:23:49 +02:00
-a <arch> Arch [default: auto]
-b <branch> Branch [default: stable]
2014-12-27 19:49:53 +01:00
-c Recreate chroot
2018-04-14 01:09:07 +02:00
-h This help
-i <pkg> Install a package into the working copy of the chroot
2014-12-27 19:49:53 +01:00
-n Install and run namcap check
2018-04-14 01:09:07 +02:00
-p <pkg> Buildset or pkg [default: default]
2014-12-27 19:49:53 +01:00
-q Query settings and pretend build
2018-04-14 01:09:07 +02:00
-r <dir> Chroots directory
[default: /var/lib/manjaro-tools/buildpkg]
-s Sign packages
-w Clean up cache and sources
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
2017-05-06 09:56:25 +02: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
2017-05-06 09:56:25 +02: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.
2018-04-15 20:23:02 +02:00
###### * -n
* Installs the built package in the chroot and runs a namcap check
2015-06-17 21:46:24 +02:00
2017-05-06 09:56:25 +02:00
###### * -s
2015-06-17 21:46:24 +02:00
* Signs the package when built
2018-04-15 20:23:02 +02:00
###### * -w
* Cleans pkgcache, and logfiles
2014-12-27 19:49:53 +01:00
2017-05-06 09:56:25 +02: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
2017-05-06 09:56:25 +02:00
##### Packages for livecd only:
2014-12-27 19:49:53 +01:00
2015-01-17 21:16:08 +01:00
* manjaro-livecd-systemd
2014-12-27 19:49:53 +01:00
2017-05-06 09:56:25 +02: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]
-i Initialize iso-profiles repo [default: v17.1]"
2015-06-04 16:23:49 +02:00
-a <arch> Arch [default: auto]
-b <branch> Branch [default: stable]
2018-04-14 01:09:07 +02:00
-c Disable clean work dir
-f Build full ISO (extra=true)
-g <key> The gpg key for sfs signing
[default: empty]
-h This help
-k <name> Kernel to use
[default: linux49]
-l Create permalink
2018-04-14 01:09:07 +02:00
-m Set SquashFS image mode to persistence
-o Enable office installer
2018-04-14 01:09:07 +02:00
-p <profile> Buildset or profile [default: default]
-q Query settings and pretend build
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]
2018-04-14 01:09:07 +02:00
-v Verbose output to log file, show profile detail (-q)
2016-02-17 19:19:08 +01:00
-x Build images only
-z Generate iso only
2016-02-20 21:40:46 +01:00
Requires pre built images (-x)
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
2017-05-06 09:56:25 +02:00
###### * build xfce iso profile for both arches and branch testing on x86_64 build system
2015-01-30 02:13:01 +01:00
* Remember: if you run buildiso for the first time you need to do:
~~~
buildiso -i
~~~
for download in /usr/share/manjaro-tools/iso-profiles our manjaro profiles. You can override in manjaro-tools.conf what branch use with buildiso: v17.1 or master ( development profiles ). The previous command can be used to refresh the profiles as needed in your local.
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
2017-05-06 09:56:25 +02:00
#### Special parameters
2015-01-17 21:28:09 +01:00
2017-05-06 09:56:25 +02:00
###### * -x
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
2017-05-06 09:56:25 +02:00
###### * -z
* Use this to sqfs compress the chroots if you previously used -x.
2017-05-06 09:56:25 +02:00
### 4. check-yaml
2016-08-21 18:58:13 +02:00
check-yaml can be used to write profile package lists to yaml.
It is also possible to generate calamares conf file as buildiso would do.
yaml files are used by calamares netinstall option from a specified url(netgroups).
2016-08-21 18:58:13 +02:00
~~~
$ check-yaml -h
Usage: check-yaml [options]
2016-09-18 18:05:38 +02:00
-a <arch> Arch [default: auto]
2016-08-21 18:58:13 +02:00
-c Check also calamares yaml files generated for the profile
2016-09-18 17:08:08 +02:00
-g Enable pacman group accepted for -p
2016-08-21 18:58:13 +02:00
-h This help
2018-04-14 01:09:07 +02:00
-k <name> Kernel to use[default: linux44]
-p <profile> Buildset or profile [default: default]
-q Query settings
-v Validate by schema
2016-08-21 18:58:13 +02:00
~~~
2017-05-06 09:56:25 +02:00
###### * build xfce iso profile for both arches and branch testing on x86_64 build system
2016-08-21 18:58:13 +02:00
* i686 (buildsystem is x86_64)
~~~
check-yaml -p xfce -a i686 -c
~~~
* for x86_64
~~~
check-yaml -p xfce -c
2016-08-21 18:58:13 +02:00
~~~
2016-09-18 17:08:08 +02:00
* for a kdebase pacman group with validation
~~~
2016-09-18 18:05:38 +02:00
check-yaml -p kdebase -gv
2016-09-18 17:08:08 +02:00
~~~
2017-05-06 09:56:25 +02:00
#### Special parameters
2016-08-21 18:58:13 +02:00
2017-05-06 09:56:25 +02:00
###### * -c
2016-08-21 18:58:13 +02:00
* generate calamares module and settings conf files per profile
2017-05-06 09:56:25 +02:00
###### * -g
2016-09-18 17:08:08 +02:00
* generate a netgroup for specified pacman group
2017-05-06 09:56:25 +02:00
### 5. 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
2017-05-06 09:56:25 +02:00
#### Arguments
2015-01-19 05:31:52 +01:00
~~~
$ buildtree -h
Usage: buildtree [options]
-a Sync arch abs
-c Clean package tree
-h This help
2018-04-14 01:09:07 +02:00
-q Query settings
-s Sync manjaro tree
2015-01-19 05:31:52 +01:00
~~~
2017-05-06 09:56:25 +02:00
###### * sync arch and manjaro trees
2015-01-19 05:31:52 +01:00
~~~
buildtree -as
~~~
2015-07-03 18:02:57 +02:00
2017-05-06 09:56:25 +02:00
### 6. 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.
2017-05-06 09:56:25 +02:00
#### Arguments
2015-11-25 00:29:45 +01:00
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
-h Print this help message
2018-04-14 01:09:07 +02:00
-q Query settings and pretend
2015-07-03 18:02:57 +02:00
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
~~~
2017-05-06 09:56:25 +02:00
###### * automount
2015-07-03 18:02:57 +02:00
~~~
manjaro-chroot -a
~~~
2017-05-06 09:56:25 +02:00
###### * mount manually
2015-07-03 18:02:57 +02:00
~~~
manjaro-chroot /mnt /bin/bash
~~~
2015-11-24 16:58:40 +01:00
2017-05-06 09:56:25 +02:00
### 7. deployiso
2015-11-24 16:58:40 +01:00
2018-04-15 20:23:02 +02:00
deployiso is a script to upload a specific iso or a buiildset to OSDN.
2015-11-24 17:07:23 +01:00
2017-05-06 09:56:25 +02:00
#### Arguments
2015-11-25 00:29:45 +01:00
2015-11-24 16:58:40 +01:00
~~~
$ deployiso -h
Usage: deployiso [options]
2018-04-15 20:23:02 +02:00
-d Use hidden remote directory
2018-04-14 01:09:07 +02:00
-h This help
2018-04-15 20:23:02 +02:00
-l Limit bandwidth in kB/s [default:]
2018-04-14 01:09:07 +02:00
-p Source folder to upload [default:default]
2015-11-24 16:58:40 +01:00
-q Query settings and pretend upload
2018-04-15 20:23:02 +02:00
-s Sign ISO and create checksums
2018-04-15 20:42:56 +02:00
-t Create ISO torrent
2018-04-14 01:09:07 +02:00
-u Update remote directory
2015-12-03 23:08:57 +01:00
-v Verbose output
-z Upload permalinks (shell.osdn.net)
2015-11-24 16:58:40 +01:00
~~~
2017-05-06 09:56:25 +02:00
###### * upload official build list, ie all built iso defined in a build list
2015-11-24 16:58:40 +01:00
~~~
2018-04-15 20:23:02 +02:00
deployiso -p official
2015-11-24 16:58:40 +01:00
~~~
2018-04-15 20:23:02 +02:00
###### * upload sign xfce ISO file, create checksums, create torrent and upload to hidden directory
2015-11-24 16:58:40 +01:00
~~~
2018-04-15 20:23:02 +02:00
deployiso -p xfce -std
2015-11-24 16:58:40 +01:00
~~~
2020-05-14 15:56:29 +02:00
##### Fast compression
Lz4 Is very fast but not a good compression ratio, good for testing