manjaro-tools/README.md

312 lines
9.3 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
1. manjaro.tools.conf
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.
If the userconfig is present, manjaro-tools will load userconfig values, however, if variables have been set in the systemwise /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.
2014-12-27 21:16:03 +01:00
~~~
2015-01-13 13:41:28 +01:00
##########################################
################ common ##################
##########################################
2014-12-27 19:49:53 +01:00
# unset defaults to given value
# branch=stable
# unset defaults to given value
# arch=$(uname -m)
2015-01-12 01:32:28 +01:00
# cache dir where buildpkg or buildiso cache packages
# cache_dir=/var/cache/manjaro-tools
2015-01-14 22:54:00 +01:00
# custom path to sets
# sets_dir=/etc/manjaro-tools/sets
2015-01-13 13:41:28 +01:00
##########################################
################ buildpkg ################
##########################################
2014-12-27 19:49:53 +01:00
# default chroot path
2015-01-13 13:41:28 +01:00
# chroots_pkg=/opt/buildpkg
2015-01-14 22:54:00 +01:00
# default pkg buildset; name without .set extension
# buildset_pkg=default
2014-12-27 19:49:53 +01:00
2015-01-15 06:48:34 +01:00
# custom build mirror server
# build_mirror=http://mirror.netzspielplatz.de/manjaro/packages
2015-01-13 13:41:28 +01:00
############# eudev specific #############
# This is only useful if you compile packages against eudev
2014-12-27 19:49:53 +01:00
# default packages to trigger blacklist
2015-01-13 13:41:28 +01:00
# blacklist_trigger=('eudev' 'upower-pm-utils' 'eudev-systemdcompat')
2014-12-27 19:49:53 +01:00
# default blacklisted packages to remove from chroot
# blacklist=('libsystemd')
2015-01-13 13:41:28 +01:00
##########################################
################ buildiso ################
##########################################
2014-12-27 19:49:53 +01:00
2015-01-13 13:41:28 +01:00
# default work dir where the image chroots are located
# chroots_iso=/opt/buildiso
2014-12-27 19:49:53 +01:00
2015-01-14 22:54:00 +01:00
# default iso buildset; name without .set extension
# buildset_iso=default
2014-12-27 19:49:53 +01:00
2015-01-13 13:41:28 +01:00
############## iso settings ##############
2014-12-27 19:49:53 +01:00
# unset defaults to given value
2015-01-12 01:32:28 +01:00
# iso_label="MJRO090"
2014-12-27 19:49:53 +01:00
# unset defaults to given value
2015-01-12 01:32:28 +01:00
# iso_version=0.9.0
2014-12-27 19:49:53 +01:00
# unset defaults to given value, specify a date here of have it automatically set
# manjaro_version="$(date +%Y.%m)"
# unset defaults to given value
# manjaroiso="manjaroiso"
# unset defaults to value sourced from /etc/lsb-release
# code_name="Bellatrix"
# unset defaults to given value
# img_name=manjaro
# unset defaults to given value
# install_dir=manjaro
# unset defaults to given value
2015-01-13 13:41:28 +01:00
# compression=xz
################ install ################
# These settings are inherited in live session
# Settings will be installed
2014-12-27 19:49:53 +01:00
# unset defaults to given value
2015-01-13 13:41:28 +01:00
# manjaro_kernel="linux317"
# unset defaults to given value
# plymouth_theme=manjaro-elegant
2014-12-27 19:49:53 +01:00
# unset defaults to given values
# names must match systemd service names
2015-01-15 07:50:39 +01:00
# start_systemd=('cronie' 'org.cups.cupsd' 'tlp' 'tlp-sleep')
2014-12-27 19:49:53 +01:00
# unset defaults to given values,
# names must match openrc service names
2015-01-07 21:41:33 +01:00
# start_openrc=('cronie' 'cupsd' 'metalog' 'dbus' 'consolekit' 'acpid')
2014-12-27 19:49:53 +01:00
2015-01-13 13:41:28 +01:00
################# livecd #################
# These settings are specific to live session
# Settings will not be installed
2014-12-27 19:49:53 +01:00
# unset defaults to given value
# hostname="manjaro"
# unset defaults to given value
# username="manjaro"
# unset defaults to given value
# password="manjaro"
# unset defaults to given values
2015-01-12 01:32:28 +01:00
# addgroups="video,audio,power,disk,storage,optical,network,lp,scanner"
2014-12-27 19:49:53 +01:00
# unset defaults to given values
# names must match systemd service names
# services in start_systemd array don't need to be listed here
2015-01-12 01:32:28 +01:00
# start_systemd_live=('bluetooth' 'NetworkManager' 'ModemManager')
2014-12-27 19:49:53 +01:00
# unset defaults to given values,
# names must match openrc service names
# services in start_openrc array don't need to be listed here
2015-01-13 13:41:28 +01:00
# start_openrc_live=('bluetooth' 'networkmanager')
~~~
2014-12-27 19:49:53 +01:00
1.1. new config files in iso profiles
Each iso profile must have these files or symlinks to shared:
initsys
contains the init type string, systemd or openrc, could be eg a future runit implemetation too
displaymanager
contains the DM string
if no DM is used, set it to 'none'
Packages-Livecd
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
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.
2. buildpkg
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.
2.1. Arguments
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):
build sysvinit package for both arches and branch testing:
first i686(buildsystem is x86_64)
buildpkg -p sysvinit -a i686 -b testing -cwsn
for x86_64 and testing
buildpkg -p sysvinit -b testing -cswn
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.
-c
removes the chroot dir
-w
cleans pkgcache, and logfiles
-s
signs the package when built
-n
installs the built package in the chroot and runs a namcap check
If the -c parameter is not used, buildpkg will update the existing chroot or create a new one if none is present.
2.2 Sets
2015-01-15 06:48:34 +01:00
buildpkg supports building from a list of pkgbuilds
Default location of sets is /etc/manjaro-tools/manjaro-tools/sets/pkg
2014-12-27 19:49:53 +01:00
but it can be configure in the conf file.
2.2.1 mkset
mkset is a little helper tools to easily create sets.
You run it just like buildpkg in the abs/pkgbuilds dir.
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
$ mkset -h
Usage: mkset [options]
-c <name> Create set
-r <name> Remove set
-d <name> Display set
-q Show sets
-h This help
2014-12-27 21:17:22 +01:00
~~~
2014-12-27 19:49:53 +01:00
Example: create a set for lxqt assuming a pure lxqt abs directory
mkset -c lxqt-0.8
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.
2015-01-15 06:48:34 +01:00
Same applies for buildiso.
2014-12-27 19:49:53 +01:00
If you create a set manually, the set must have a .set extension.
2015-01-15 06:48:34 +01:00
Examples:
/etc/manjaro-tools/sets/pkg/lxqt-0.8.set
/etc/manjaro-tools/sets/iso/manjaro-0.9.0.set
2014-12-27 19:49:53 +01:00
3. buildiso
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
manjaro-livecd-cli-installer
manjaro-livecd-openrc (openrc-run scripts for livecd)
manjaro-livecd-systemd (systemd units for livecd)
3.1 Arguments
The help:
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-15 06:48:34 +01:00
buildiso -p xfce -a i686 -b testing
2014-12-27 19:49:53 +01:00
2015-01-15 06:48:34 +01:00
buildiso -p xfce -b testing
2014-12-27 19:49:53 +01:00
the branch can be defined also in manjaro-tools.conf, but a manual parameter will always override conf settings.
2015-01-15 06:48:34 +01:00
3.1.1 Special parameters
2014-12-27 19:49:53 +01:00
2015-01-15 06:48:34 +01:00
-i
2014-12-27 19:49:53 +01:00
Build images only will stop after all packages have been installed. No iso sqfs compression will be executed
2015-01-15 06:48:34 +01:00
-s
2014-12-27 19:49:53 +01:00
Use this if you previously used -B to sqfs compress the chroots.
2015-01-15 06:48:34 +01:00
-x
2014-12-27 19:49:53 +01:00
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.
2015-01-15 06:48:34 +01:00
-l
2014-12-27 19:49:53 +01:00
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.
2015-01-07 21:41:33 +01:00
2015-01-15 06:48:34 +01:00
3.2 Sets
buildiso supports building from a list of iso profiles
Default location of sets is /etc/manjaro-tools/manjaro-tools/sets/iso
2015-01-15 06:53:21 +01:00
but it can be configured in the conf file.