Author Topic: [README] How to use Manjaro-Tools  (Read 9196 times)

0 Members and 1 Guest are viewing this topic.

Offline philm

  • Core Team
  • *****
  • Posts: 10671
    • Manjaro Linux
  • Branch: Unstable
  • Desktop: XFCE
  • GPU Card: Geforce GTX 650
  • GPU driver: non-free
  • Kernel: Maintainer - so all ;)
  • Skill: Guru
[README] How to use Manjaro-Tools
« on: 03. February 2015, 21:15:30 »
Manjaro-tools-0.9.6 - User manual

1. manjaro.tools.conf

manjaro-tools.conf is the central configuration file for manjaro-tools. By default, the config is installed in

Code: [Select]
/etc/manjaro-tools/manjaro-tools.conf
A user manjaro-tools.conf can be placed in

Code: [Select]
$HOME/.config/manjaro-tools.conf
If the userconfig is present, manjaro-tools will load the userconfig values, however, if variables have been set in the systemwide

Code: [Select]
/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.

Tools configuration is done in manjaro-tools.conf or by args.
Specifying args will override manjaro-tools.conf settings.

Code: [Select]
##########################################
################ common ##################
##########################################

# unset defaults to given value
# branch=stable

# unset defaults to given value
# arch=$(uname -m)

# cache dir where buildpkg or buildiso cache packages
# cache_dir=/var/cache/manjaro-tools

##########################################
################ buildtree ###############
##########################################

# manjaro package tree
# repo_tree=('core' 'extra' 'community' 'multilib' 'openrc')

# host_tree=https://github.com/manjaro

# host_tree_abs=https://projects.archlinux.org/git/svntogit/packages

##########################################
################ buildpkg ################
##########################################

# default chroot path
# chroots_pkg=/opt/buildpkg

# custom path to pkg sets
# sets_dir_pkg=/etc/manjaro-tools/sets/pkg

# default pkg buildset; name without .set extension
# buildset_pkg=default

# custom build mirror server
# build_mirror=http://mirror.netzspielplatz.de/manjaro/packages

############# eudev specific #############

# This is only useful if you compile packages against eudev

# default packages to trigger blacklist
# blacklist_trigger=('eudev' 'upower-pm-utils' 'eudev-systemdcompat')

# default blacklisted packages to remove from chroot
# blacklist=('libsystemd')

##########################################
################ buildiso ################
##########################################

# default work dir where the image chroots are located
# chroots_iso=/opt/buildiso

# custom path to iso sets
# sets_dir_iso=/etc/manjaro-tools/sets/iso

# default iso buildset; name without .set extension
# buildset_iso=default

############## iso settings ##############

# unset defaults to given value
# iso_label="MJRO090"

# unset defaults to given value
# iso_version=0.9.0

# 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
# compression=xz

# valid: md5, sha1, sha256, sha384, sha512
# checksum_mode=md5

################ install ################

# These settings are inherited in live session
# Settings will be installed

# unset defaults to given value
# manjaro_kernel="linux317"

# unset defaults to given value
# plymouth_theme=manjaro-elegant

# unset defaults to given values
# names must match systemd service names
# start_systemd=('cronie' 'org.cups.cupsd' 'tlp' 'tlp-sleep')

# unset defaults to given values,
# names must match openrc service names
# start_openrc=('cronie' 'cupsd' 'metalog' 'dbus' 'consolekit' 'acpid')

################# livecd #################

# These settings are specific to live session
# Settings will not be installed

# 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
# addgroups="video,audio,power,disk,storage,optical,network,lp,scanner"

# unset defaults to given values
# names must match systemd service names
# services in start_systemd array don't need to be listed here
# start_systemd_live=('bluetooth' 'NetworkManager' 'ModemManager')

# unset defaults to given values,
# names must match openrc service names
# services in start_openrc array don't need to be listed here
# start_openrc_live=('bluetooth'  'networkmanager')

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 - Contains root image packages ideally no xorg
  • Packages-Custom/desktop - Contains the custom image packages desktop environment packages go here
  • Packages-Xorg - Contains the Xorg package repo
  • Packages-Lng - Contains the language packages repo
  • Packages-Livecd - Contains packages you only want on livecd but not installed on the target system with installer default files are in shared folder and can be symlinked or defined in a real file
  • optional custom pacman.conf in profile
  • for i686 - pacman-default.conf
  • for x86_64 - pacman-multilib.conf
If you need a custom livecd-overlay, create overlay-livecd folder in profile, and symlink from shared/overlay-livecd/your_selection to the overlay-livecd folder.

2. buildpkg

buildpkg is the chroot build script oi manjaro-tools.
It it run in a abs/pkgbuilds directory which contains directories with PKGBUILD.

manjaro-tools.conf supports the makepkg.conf variables

Arguments

Code: [Select]
$ buildpkg -h
Usage: buildpkg [options] [--] [makepkg args]
    -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]
    -c                 Recreate chroot
    -w                 Clean up
    -n                 Install and run namcap check
    -s                 Sign packages
    -q                 Query settings and pretend build
    -h                 This help

build sysvinit package for both arches and branch testing:

i686 (buildsystem is x86_64)

Code: [Select]
buildpkg -p sysvinit -a i686 -b testing -cwsn
for x86_64

Code: [Select]
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 If the -c parameter is not used, buildpkg will update the existing chroot or create a new one if none is present.
  • -w - cleans pkgcache, and logfiles
  • -s - signs the package when built
  • -n - installs the built package in the chroot and runs a namcap check
3. buildiso

buildiso is used to build manjaro-iso-profiles. It is run insde the profiles folder.
Packages for livecd only:

    manjaro-livecd-cli-installer
    manjaro-livecd-openrc
    manjaro-livecd-systemd

Arguments

Code: [Select]
$ buildiso -h
Usage: buildiso [options]
    -p <profile>       Buildset or profile [default: default]
    -a <arch>          Arch [default: x86_64]
    -b <branch>        Branch [default: unstable]
    -r <dir>           Chroots directory
                       [default: /build/buildiso]
    -w                 Disable clean iso cache
    -c                 Disable clean work dir
    -x                 Disable clean xorg cache
    -l                 Disable clean lng cache
    -i                 Build images only
    -s                 Generate iso only
                       Requires pre built images (-i)
    -q                 Query settings and pretend build
    -h                 This help

* build xfce iso profile for both arches and branch testing on x86_64 build system

i686 (buildsystem is x86_64)

Code: [Select]
buildiso -p xfce -a i686 -b testing
for x86_64

Code: [Select]
buildiso -p xfce -b testing
The branch can be defined also in manjaro-tools.conf, but a manual parameter will always override conf settings.
Special parameters
  • -i - Build images only will stop after all packages have been installed. No iso sqfs compression will be executed
  • -s - Use this to sqfs compress the chroots if you previously used -i.
  • -x - 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.
  • -l - 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.
4. mkset

buildpkg and buildiso support building from buildsets

Default location of sets is:

Code: [Select]
/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.

mkset is a little helper tool to easily create buildsets. It is run inside the abs/pkgbuilds or iso profiles directory.
Arguments

Code: [Select]
$ 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

create a pkg buildset for lxqt

Code: [Select]
mkset -c lxqt-0.8
create a iso buildset

Code: [Select]
mkset -ic manjaro-0.9.0
The buildset name should not be a name of a package or profile! Else buildpkg/buildiso won't recognize the build list and will only build the package/profile specified. The -p arg handles set and package/profile name.

If you create a buildset manually, the buildset must have a .set extension.

Examples:

Code: [Select]
/etc/manjaro-tools/sets/pkg/lxqt-0.8.set
/etc/manjaro-tools/sets/iso/manjaro-0.9.0.set

5. buildtree

buildtree is a little tools to sync arch abs and manjaro packages git repos.
Arguments

Code: [Select]
$ buildtree -h
Usage: buildtree [options]
    -s            Sync manjaro tree
    -a            Sync arch abs
    -c            Clean package tree
    -q            Query settings
    -h            This help

sync arch and manjaro trees

Code: [Select]
buildtree -as

Offline Ste74

  • Support Team
  • ****
  • Posts: 1256
  • sudo pacman -Rs windows && sudo pacman -S manjaro
  • Branch: unstable
  • Desktop: Budgie / Gnome / Pantheon (testing)
  • GPU Card: ATI/Intel mobility radeon hd 5400
  • GPU driver: free
  • Kernel: linux4.x -x86_64 series
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #1 on: 04. February 2015, 22:19:24 »
Thank you Philip  ;D
Pantheon Community Edition & Budgie Desktop Edition
www.forum.manjaro-it.org
Canale IRC italiano
#manjaro-it

Offline fassil

  • Support Team
  • ****
  • Posts: 709
  • Branch: stable/unstable
  • Desktop: E19/E20
  • GPU driver: free
  • Kernel: Linux314 & 318
  • Skill: Intermediate
Re: [README] How to use Manjaro-Tools
« Reply #2 on: 05. February 2015, 08:35:45 »
HeLLo,

I have a look to this new tool (on an other manja than manjaroiso's nest  ;)), & it sounds good, but a bit complicated more...
Is it because of sysvinit integration, among other things ?
"Are you enlightened ?"

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #3 on: 05. February 2015, 15:34:47 »
HeLLo,

I have a look to this new tool (on an other manja than manjaroiso's nest  ;)), & it sounds good, but a bit complicated more...
Is it because of sysvinit integration, among other things ?

Yes, the tools are basically independent of any init system, they don't care if you run systemd or openrc whatever on your build system.
Yes, the tools support in the iso part multiple inits, and iso profile are not tied to a specific init in structure, you could theoretically swap the initsys variable and build the same profile for a different init.
The package building is also not dependent of any init on your build system, whereas the devtools depend on a running systemd to build a package.

In summary, the tools a slightly bit more complicated to use, but more flexible and powerful than the old ones.
You could basically build two iso profile in one build run for example.

Offline fassil

  • Support Team
  • ****
  • Posts: 709
  • Branch: stable/unstable
  • Desktop: E19/E20
  • GPU driver: free
  • Kernel: Linux314 & 318
  • Skill: Intermediate
Re: [README] How to use Manjaro-Tools
« Reply #4 on: 05. February 2015, 16:51:50 »
Thanks for explanation artoo  ;)

But pragmaticly, I search a bit for the place where the overlay/packages are & from where I have  to run <buildiso> in example  :o
"Are you enlightened ?"

Offline xcfaudio

  • Jr. Mitglied
  • **
  • Posts: 69
  • Branch: stable
  • Desktop: xfce
  • GPU Card: nVidia GeForce GTS 450
  • Kernel: linux318-x64
  • Skill: Intermediate
Re: [README] How to use Manjaro-Tools
« Reply #5 on: 05. February 2015, 17:17:17 »
Hi,
Can you give us one or more examples for our tests ?
Thank you in advance
;)

Offline Ste74

  • Support Team
  • ****
  • Posts: 1256
  • sudo pacman -Rs windows && sudo pacman -S manjaro
  • Branch: unstable
  • Desktop: Budgie / Gnome / Pantheon (testing)
  • GPU Card: ATI/Intel mobility radeon hd 5400
  • GPU driver: free
  • Kernel: linux4.x -x86_64 series
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #6 on: 05. February 2015, 17:43:20 »
Hi,
Can you give us one or more examples for our tests ?
Thank you in advance
;)
It would be useful to use some concrete examples.  ;)
Pantheon Community Edition & Budgie Desktop Edition
www.forum.manjaro-it.org
Canale IRC italiano
#manjaro-it

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #7 on: 05. February 2015, 18:17:03 »
Thanks for explanation artoo  ;)

But pragmaticly, I search a bit for the place where the overlay/packages are & from where I have  to run <buildiso> in example  :o

You would run buildiso in the directory containing the profiles.
Say you clone from git the manjaro-tools-iso-profiles, a package would likely have the same dir name.
You would run buildiso in this directory with the -p arg to specify which profile(subdir) you want to build.
So you run buildiso in the parent dir,not in the specific profile dir as you would do with manjaroiso.
One level up the tree is the new way.

Hope this helps. :)

Example:

Code: [Select]
[artoo@manjaro manjaro-iso-profiles] $ buildiso -p lxqt-openrc -q
where

manjaro-iso-profiles directory contain all the iso profiles in sub directories.
« Last Edit: 05. February 2015, 18:27:18 by artoo »

Offline fassil

  • Support Team
  • ****
  • Posts: 709
  • Branch: stable/unstable
  • Desktop: E19/E20
  • GPU driver: free
  • Kernel: Linux314 & 318
  • Skill: Intermediate
Re: [README] How to use Manjaro-Tools
« Reply #8 on: 05. February 2015, 18:29:15 »
Yep, more clear now, cool & thanks again  ;)
"Are you enlightened ?"

Offline Ste74

  • Support Team
  • ****
  • Posts: 1256
  • sudo pacman -Rs windows && sudo pacman -S manjaro
  • Branch: unstable
  • Desktop: Budgie / Gnome / Pantheon (testing)
  • GPU Card: ATI/Intel mobility radeon hd 5400
  • GPU driver: free
  • Kernel: linux4.x -x86_64 series
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #9 on: 05. February 2015, 18:29:38 »
So for what concerns the customizations will be always included in the de-overlay skel folder?
from that point of view, nothing has changed?
Pantheon Community Edition & Budgie Desktop Edition
www.forum.manjaro-it.org
Canale IRC italiano
#manjaro-it

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #10 on: 05. February 2015, 18:34:27 »
So for what concerns the customizations will be always included in the de-overlay skel folder?
from that point of view, nothing has changed?

Yes. :)

The mechanics with overlay folders has not changed, but it now supports also multiple symlinks while the overlay dir is a real folder and not a symlink.
For reference, look at the xfce-openbox-openrc profile and how it does a customized livecd-overlay.

You can regard the shared folder to be your tool box you symlink stuff from.

Offline Ste74

  • Support Team
  • ****
  • Posts: 1256
  • sudo pacman -Rs windows && sudo pacman -S manjaro
  • Branch: unstable
  • Desktop: Budgie / Gnome / Pantheon (testing)
  • GPU Card: ATI/Intel mobility radeon hd 5400
  • GPU driver: free
  • Kernel: linux4.x -x86_64 series
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #11 on: 05. February 2015, 18:44:12 »
Thank you artoo for any explanation .
For any problem you come back to look for ...   ;) ;)
Pantheon Community Edition & Budgie Desktop Edition
www.forum.manjaro-it.org
Canale IRC italiano
#manjaro-it

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #12 on: 05. February 2015, 18:45:55 »
Thank you artoo for any explanation .
For any problem you come back to look for ...   ;) ;)

Yes, feel free to report issues/bugs you encounter at manjaro-tools github tracker.

Keep in mind, these tools are mainly for manjaro devs, they are usable, but not geared towards end user (yet).
« Last Edit: 05. February 2015, 18:51:29 by artoo »

Offline Ste74

  • Support Team
  • ****
  • Posts: 1256
  • sudo pacman -Rs windows && sudo pacman -S manjaro
  • Branch: unstable
  • Desktop: Budgie / Gnome / Pantheon (testing)
  • GPU Card: ATI/Intel mobility radeon hd 5400
  • GPU driver: free
  • Kernel: linux4.x -x86_64 series
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #13 on: 05. February 2015, 18:52:56 »
Quiet, I'm happy to learn what I can and in my small way if I can cook a customized iso for my fun and hunger for knowledge
Pantheon Community Edition & Budgie Desktop Edition
www.forum.manjaro-it.org
Canale IRC italiano
#manjaro-it

Offline artoo

  • OpenRC Team
  • ****
  • Posts: 2373
  • Branch: Unstable
  • Desktop: LXQT/Plasma5, openrc & eudev
  • Kernel: x86_64
  • Skill: Advanced
Re: [README] How to use Manjaro-Tools
« Reply #14 on: 05. February 2015, 19:01:37 »
Just a little explanation on what also changed.

Example: you want a custom iso, with installer.

you create your profile, Packages list is for the root-image.
then you have your custom Packages-<DE> list for the custom DE-image
and new is, you have a Packages-Livecd list, which is for livecd-image, and only contains packages you want installed in the live session, but not installed on the target install system, so typically the installer plus the a livecd init package.

The hierarchy looks as follows:

root-image (Packages + overlay directory)
    |
    DE-image (Packages-<DE> + overlay-<DE>)
       |
       livecd-image (Packages-Livecd + overlay-lievcd)

while say Livecd-image will inherit all packages in the root and DE images.
The same goes for DE-image, which inherits root-image.

Ideally, your root-image does not have any xorg packages installed.

« Last Edit: 05. February 2015, 19:05:06 by artoo »