Difference between revisions of "Manjaro-tools"
Views
Actions
Namespaces
Variants
Tools
imported>Fhdk |
imported>Fhdk |
||
Line 131: | Line 131: | ||
To query build an ISO ('''-q''' option), for example the xfce-openbox-openrc profile, the following command can be used: | To query build an ISO ('''-q''' option), for example the xfce-openbox-openrc profile, the following command can be used: | ||
<code> | |||
~ >>> buildiso -p xfce -qv | ~ >>> buildiso -p xfce -qv | ||
[sudo] password for fh: | [sudo] password for fh: | ||
Line 175: | Line 176: | ||
-> enable_systemd_live: manjaro-live mhwd-live pacman-init mirrors-live | -> enable_systemd_live: manjaro-live mhwd-live pacman-init mirrors-live | ||
-> disable_systemd: pacman-init | -> disable_systemd: pacman-init | ||
</code> | |||
== Building == | == Building == |
Revision as of 09:00, 31 October 2018
Introduction
manjaro-tools consists of a lot of different tools aimed at Manjaro developers. It is splitted into 3 different packages:
- manjaro-tools-base contains basic tools, different chroot tools, and buildset
- manjaro-tools-pkg contains small helper tools, buildpkg, and buildtree
- manjaro-tools-iso contains small helper tools and buildiso
All of these manjaro-tools packages are replacements for devtools and manjaroiso.
A detailed user manual is available at github.
Configuration
manjaro-tools can be configured by copying the folder /etc/manjaro-tools to your home in ~/.config folder and then edit the file ./config/manjaro-tools/manjaro-tools.conf
Files
These are the new names for renamed scripts.
- mkmanjaroroot --> mkchroot
- manjarobuild --> buildpkg
- mkset --> buildset
- pacstrap --> basestrap
- genfstab --> fstabgen
- arch-chroot --> manjaro-chroot
buildset
buildset is used to create build lists. Build lists can be defined in /etc/manjaro-tools/sets/<buildlistname>.set
The help looks like the following:
$ buildset -h Usage: buildset [options] -c <name> Create set -r <name> Remove set -s <name> Show set -i Iso mode -q Query sets -h This help
buildpkg
buildpkg is used to build a particular package or a set. In the following chapter all functions of buildpkg get explained.
If you want a detailed example how to use buildpkg to build packages for a local repository, please look here.
In some cases, the documentation of buildpkg's predecessor might be helpful: Devtools.
The help looks like the following:
Usage: buildpkg [options] -a <arch> Arch [default: x86_64] -b <branch> Branch [default: stable] -c Recreate chroot -h This help -i <pkg> Install a package into the working copy of the chroot -n Install and run namcap check -p <pkg> Build list or pkg [default: default] -q Query settings and pretend build -r <dir> Chroots directory [default: /var/lib/manjaro-tools/buildpkg] -s Sign packages -w Clean up cache and sources
To build a single package, go into the directory which is one above the package build directory (which contains the PKGBUILD), and run it as:
buildpkg -p <package-name>
To build a set the name of the set can be used. The current sets can be queried with the -q
option.
buildtree
buildtree is a little tools to sync arch abs and manjaro packages git repos.
The arguments are:
$ buildtree -h Usage: buildtree [options] -s Sync manjaro tree -a Sync arch abs -c Clean package tree -q Query settings -h This help[/code]
To sync Arch and Manjaro trees:
buildtree -as
buildiso
buildiso is used to build a particular ISO or a set of ISOs. All functions of buildiso will be explained in the following chapters.
If you want a detailed guide how to use buildiso to build your own Manjaro ISOs from scatch, please look here.
Overview
The help looks like the following for x86_64:
$ buildiso -h Usage: buildiso [options] -p <profile> Buildset or profile [default: default] -a <arch> Arch [default: x86_64] -b <branch> Branch [default: stable] -r <dir> Chroots directory [default: /var/lib/manjaro-tools/buildiso] -c Disable clean work dir -x Clean xorg cache -l Clean lng cache -i Build images only -s Generate iso only Requires pre built images (-i) -v Verbose output, show profies detail (-q) -q Query settings and pretend build -h This help
Query Building
To query build an ISO (-q option), for example the xfce-openbox-openrc profile, the following command can be used:
~ >>> buildiso -p xfce -qv
[sudo] password for fh:
==> manjaro-tools
-> version: 0.15.9
-> config: ~/.config/manjaro-tools/manjaro-tools.conf
==> PROFILE:
-> build_lists: community|default|manjaro|sonar|v17-release
-> build_list_iso: xfce
-> is_build_list: false
==> OPTIONS:
-> arch: x86_64
-> branch: unstable
-> kernel: linux419
==> ARGS:
-> clean_first: true
-> images_only: false
-> iso_only: false
-> persist: false
==> DIST SETTINGS:
-> dist_name: Manjaro
-> dist_release: 18.0
-> dist_codename: Illyria
==> ISO INFO:
-> iso_label: MJRO180
-> iso_compression: xz
==> BUILD QUEUE:
--> Profile: [xfce]
-> iso_file: manjaro-xfce-18.0-unstable-minimal-x86_64.iso
-> autologin: true
-> nonfree_mhwd: true
-> multilib: true
-> extra: false
-> netinstall: false
-> chrootcfg: false
-> geoip: true
-> efi_boot_loader: grub
-> hostname: manjaro
-> username: manjaro
-> password: manjaro
-> login_shell: /bin/bash
-> addgroups: lp,network,power,sys,wheel
-> enable_systemd: avahi-daemon bluetooth cronie ModemManager NetworkManager org.cups.cupsd tlp tlp-sleep ufw lightdm
-> enable_systemd_live: manjaro-live mhwd-live pacman-init mirrors-live
-> disable_systemd: pacman-init
Building
To actually build the ISO:
$ buildiso -p xfce-openbox-openrc/ -b stable ==> Start building [xfce-openbox-openrc/] --> Profile: [xfce-openbox-openrc/] ... -> Packages-Custom: Packages-Xfce ==> Cleaning up ... -> Deleting chroot 'root-image'... -> Deleting chroot 'xfce-image'... -> Cleaning [/mnt/datalinux2/manjaro-tools/cache/xorg/x86_64] ... -> Cleaning [/mnt/datalinux2/manjaro-tools/cache/lng/x86_64] ... --> Loading Packages: [Packages] ... ==> Prepare [Base installation] (root-image) ==> mkiso : Configuration Settings -> working directory: /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc//x86_64 -> image name: none -> pacman_mirrors: /usr/share/manjaro-tools/pacman-mirrors-stable.conf ==> Creating install root at /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc/x86_64/root-image ==> Installing packages to /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc/x86_64/root-image :: Synchronizing package databases... core 132.7 KiB 202K/s 00:01 [##############################################] 100% extra 1916.0 KiB 939K/s 00:02 [##############################################] 100% community 2.8 MiB 524K/s 00:05 [##############################################] 100% multilib 140.9 KiB 217K/s 00:01 [##############################################] 100% ... ... ... -> Cleaning up what we can warning: database file for 'core' does not exist warning: database file for 'extra' does not exist warning: database file for 'community' does not exist warning: database file for 'multilib' does not exist warning: database file for 'openrc-eudev' does not exist -> Copying overlay ... ==> Done [Base installation] (root-image) --> Loading Packages: [Packages-Xfce] ... ==> Prepare [xfce installation] (xfce-image) -> mount [root-image] on [xfce-image] ==> mkiso : Configuration Settings -> working directory: /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc//x86_64 -> image name: none -> pacman_mirrors: /usr/share/manjaro-tools/pacman-mirrors-stable.conf ==> Creating install root at /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc/x86_64/xfce-image ==> Installing packages to /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc/x86_64/xfce-image :: Synchronizing package databases... ... ... ... Generation complete. -> Cleaning up what we can warning: database file for 'core' does not exist warning: database file for 'extra' does not exist warning: database file for 'community' does not exist warning: database file for 'multilib' does not exist warning: database file for 'openrc-eudev' does not exist -> Copying xfce-overlay ... ==> Configuring [xfce-image] -> Configuring Displaymanager ... -> Configured: lxdm --> Congiguring OpenRC .... -> Setting syslog-ng ... -> Setting cronie ... -> Setting acpid ... -> Setting alsasound ... -> Setting dbus ... -> Setting consolekit ... -> Setting wicd ... -> Setting bluetooth ... --> Done configuring OpenRC ==> Done configuring [xfce-image] -> unmount xfce-image ==> Done [xfce installation] (xfce-image) --> Loading Packages: [Packages-Livecd] ... ==> Prepare [livecd-image] -> mount [livecd-image] on [xfce-image] -> append [root-image] on [livecd-image] ==> mkiso : Configuration Settings -> working directory: /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc//x86_64 -> image name: none -> pacman_mirrors: /usr/share/manjaro-tools/pacman-mirrors-testing.conf ==> Creating install root at /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc/x86_64/livecd-image ==> Installing packages to /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc/x86_64/livecd-image :: Synchronizing package databases... ... ... ... ==> Making bootable image -> Removing existing bootable image... ==> Creating ISO image... xorriso 1.3.8 : RockRidge filesystem manipulator, libburnia project. Drive current: -outdev 'stdio:/mnt/datalinux2/manjaro-tools/cache/iso/manjaro-xfce-openrc-2015-03-01-x86_64.iso' Media current: stdio file, overwriteable Media status : is blank Media summary: 0 sessions, 0 data blocks, 0 data, 62.7g free Added to ISO image: directory '/'='/mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc/x86_64/iso' xorriso : UPDATE : 115 files added in 1 seconds xorriso : UPDATE : 115 files added in 1 seconds xorriso : NOTE : Copying to System Area: 432 bytes from file '/mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc/x86_64/iso/isolinux/isohdpfx.bin' libisofs: NOTE : Aligned image size to cylinder size by 42 blocks xorriso : UPDATE : 2.75% done xorriso : UPDATE : 16.40% done xorriso : UPDATE : 27.90% done, estimate finish Sun Mar 01 23:10:20 2015 xorriso : UPDATE : 93.66% done xorriso : UPDATE : 99.20% done xorriso : UPDATE : 99.46% done xorriso : UPDATE : 99.47% done xorriso : UPDATE : 99.67% done xorriso : UPDATE : 99.68% done ISO image produced: 343552 sectors Written to medium : 343552 sectors at LBA 0 Writing to 'stdio:/mnt/datalinux2/manjaro-tools/cache/iso/manjaro-xfce-openrc-2015-03-01-x86_64.iso' completed successfully. ==> Done [Build ISO] ==> Creating [md5sum] ... -> md5sum: 78f4b335fc593b7df7edff46a4d91b5d manjaro-xfce-openrc-2015-03-01-x86_64.iso ==> Done [md5sum] --> Time compress_images: 9.43 minutes ==> Finished building [xfce-openbox-openrc/] --> Time make_profile: 13.77 minutes
Building with predownloaded Xorg packages
To build an ISO while retaining the previously downloaded cache of Xorg packages, the -x option can be used:
$ buildiso -p xfce-openbox-openrc/ -b stable -x
Building with a small config change
Supposing something only changed in config, like a setting, instead of building the whole ISO from scratch, the ISO build directory can be modified and the ISO can be rebuilt. For example, supposing one changed xfce-overlay/etc/skel/.conkyrc in the config, one can go into the work directory, modify the said file, and rebuild the ISO using the -cs option.
The work directory can be found using the -q option:
$ buildiso -p xfce-openbox-openrc/ -q ==> manjaro-tools -> version: 0.9.6.4 -> user_config: /home/aaditya/.config/manjaro-tools.conf ==> PROFILE: -> buildsets: community|default|official|openrc -> buildset_iso: xfce-openbox-openrc/ -> is_buildset: false ==> OPTIONS: -> arch: x86_64 -> branch: unstable -> chroots_iso: /mnt/datalinux2/manjaro-tools/buildiso ... ... ==> BUILD QUEUE: --> Profile: [xfce-openbox-openrc/] ... -> Packages-Custom: Packages-Xfce -> initsys: openrc -> displaymanager: lxdm -> is_plymouth: false -> pacman_conf: pacman-multilib.conf -> work_dir: /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc//x86_64 -> iso_file: manjaro-xfce-openrc-2015-03-01-x86_64.iso
(work directory highlighted in bold)
The required file can be edited as root, for example:
$ sudo nano /mnt/datalinux2/manjaro-tools/buildiso/xfce-openbox-openrc//x86_64/xfce-image/etc/skel/.conkyrc
There is a catch involved here though; the file one wants to edit may be present in multiple images, like root-image, livecd-image, and DE-image (eg, xfce-image), and would need to be edited in the respective image directories.
Then the ISO then can be rebuilt as:
$ buildiso -p xfce-openbox-openrc/ -cs
Alternative
First only the chroot for the ISO could be created, using the -i
option, then the changes can be made, and finally an ISO can be built with the -sc
option.
For example:
$ buildiso -p xfce-openrc/ -b stable -i ==> Start building [xfce-openrc/] --> Profile: [xfce-openrc/] -> Packages-Custom: Packages-Xfce ==> Cleaning up ... ... ... ==> Done [manjaro/iso/isolinux] ==> Creating [isomounts] -> Writing livecd entry ... -> Writing pkgs entry ... -> Writing xfce entry ... -> Writing root entry ... ==> Done creating [isomounts] --> Time build_images: 4.28 minutes ==> WARNING: Continue compress: buildiso -p xfce-openrc/ -sc ...
After this the changes in the work directory can be made, and the ISO can be generated with:
$ buildiso -p xfce-openrc/ -sc