Manjaro Difference between revisions of "Manjaro-tools"

Difference between revisions of "Manjaro-tools"

From Manjaro
imported>Excalibur1234
imported>Aaditya
Line 100: Line 100:
  buildpkg -p <package-name>
  buildpkg -p <package-name>


For example,
For example, we want to build the upower-pm-utils package from the following PKGBUILD folders


  $ ls
  $ ls
Line 113: Line 113:
  manjaro-openrc              openrc-net
  manjaro-openrc              openrc-net


  $ buildpkg -pv upower-pm-utils
To test if the options are correct, the {{ic|-q}} option can be used.
 
  $ buildpkg -q upower-pm-utils
  ==> manjaro-tools
  ==> manjaro-tools
   -> version: 0.9.5.6
   -> version: 0.9.5.6
Line 145: Line 147:
   -> upower-pm-utils
   -> upower-pm-utils


To build a set the name of the set can be used.
After that to build the package {{ic|-p}} can be used.
 
$ buildpkg -p upower-pm-utils
==> Updating chroot for [testing] (x86_64)...
:: Synchronizing package databases...
  core is up to date
  extra is up to date
  community is up to date
:: Starting full system upgrade...
  there is nothing to do
==> Making package: upower-pm-utils 0.9.23-4 (Mon Jan 12 12:38:16 IST 2015)
==> Retrieving sources...
...
...
==> Leaving fakeroot environment.
==> Finished making: upower-pm-utils 0.9.23-4 (Mon Jan 12 07:08:28 UTC 2015)
 
To clean the chroot before building {{ic|-c -p}} can be used.
$ buildpkg -p upower-pm-utils -c
==> Creating chroot for [testing] (x86_64)...
  -> Deleting chroot copy 'aaditya'...
  -> Deleting chroot copy 'root'...
==> Creating install root at /mnt/datalinux2/manjaro-tools/testing/x86_64/root
==> Installing packages to /mnt/datalinux2/manjaro-tools/testing/x86_64/root
:: Synchronizing package databases...
  core                    133.7 KiB  30.8K/s 00:04 [######################] 100%
  extra                  1920.2 KiB  392K/s 00:05 [######################] 100%
  community                  2.7 MiB  512K/s 00:05 [######################] 100%
:: There are 25 members in group base-devel:
:: Repository core
  1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file
  7) findutils  8) flex  9) gawk  10) gcc  11) gettext  12) grep  13) groff
  14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch
  20) pkg-config  21) sed  22) sudo  23) texinfo  24) util-linux  25) which
...
...
==> Creating clean working copy [aaditya]...
==> Making package: upower-pm-utils 0.9.23-4 (Mon Jan 12 12:37:00 IST 2015)
==> Retrieving sources...
...
...
==> Leaving fakeroot environment.
==> Finished making: upower-pm-utils 0.9.23-4 (Mon Jan 12 07:07:20 UTC 2015)
 
To build a set the name of the set can be used. The current sets can be queried with the {{ic|-q}} option.

Revision as of 07:11, 12 January 2015

Introduction

manjaro-tools is a replacement for devtools and manjaroiso. A user manual is available at github.

Configuration

manjaro-tools can be configured via editing /etc/manjaro-tools/manjaro-tools.conf

Files

These are the new names for renamed scripts.

  • mkmanjaroroot --> mkchroot
  • manjarobuild --> buildpkg
  • pacstrap --> basestrap
  • genfstab --> fstabgen
  • arch-chroot --> manjaro-chroot

Tools

mkset

mkset is used to create build lists. Build lists can be defined in /etc/manjaro-tools/sets/<buildlistname>.set

To create a build list, one can run in the pkgbuilds dir:

mkset -c <name>

This will create a build list containing all directories with PKGBUILDs in them. This generated list can be then edited, like packages can be removed.

For example, in a git clone of https://github.com/manjaro/packages-openrc

$ ls 
consolekit/                  manjaro-tools-git/           openrc-net/
eudev/                       manjaro-tools-git-devel/     openrc-systemdcompat/
eudev-systemdcompat/         manjaro-tools-iso-profiles/  openrc-video/
kde-servicemenus-pkg-tools/  manjaro-tools-livecd/        packages/
keyboardctl-openrc/          networkmanager-openrc/       pkgbuilds-review/
kf5-servicemenus-pkg-tools/  openrc-aur/                  polkit-consolekit/
lib32-eudev/                 openrc-base/                 sddm-consolekit/
lib32-eudev-systemdcompat/   openrc-core/                 sysvinit/
lxqt-lightdm-greeter/        openrc-desktop/              upower-pm-utils/
manjaro-openrc/              openrc-devel/                README.md
manjaro-tools/               openrc-misc/

Running mkset -c openrc does

$ mkset -c openrc
==> Creating [/openrc.set] ...
 -> Adding consolekit
 -> Adding eudev
 -> Adding eudev-systemdcompat
 -> Adding kde-servicemenus-pkg-tools
 -> Adding kf5-servicemenus-pkg-tools
 -> Adding lib32-eudev
 -> Adding lib32-eudev-systemdcompat
 -> Adding lxqt-lightdm-greeter
 -> Adding manjaro-openrc
 -> Adding manjaro-tools
 -> Adding manjaro-tools-git
 -> Adding manjaro-tools-git-devel
 -> Adding manjaro-tools-iso-profiles
 -> Adding manjaro-tools-livecd
 -> Adding networkmanager-openrc
 -> Adding openrc-aur
 -> Adding openrc-base
 -> Adding openrc-core
 -> Adding openrc-desktop
 -> Adding openrc-devel
 -> Adding openrc-misc
 -> Adding openrc-net
 -> Adding openrc-systemdcompat
 -> Adding openrc-video
 -> Adding polkit-consolekit
 -> Adding sddm-consolekit
 -> Adding sysvinit
 -> Adding upower-pm-utils


Note
The set name should be different from a directory name in pkgbuilds dir. Anything else should work, eg adding a date to the name.

buildpkg

buildpkg is used to build a particular package or a set. The help looks like the following for i686

$ buildpkg -h
Usage: buildpkg [options] [--] [makepkg args]
   -p <profile>       Set profile or pkg [default: default]
   -a <arch>          Set arch  [default: i686]
   -b <branch>        Set branch [default: stable]
   -r <dir>           Chroots directory [default: /srv/manjarobuild]
   -c                 Recreate chroot
   -w                 Clean up
   -n                 Install and run namcap check
   -s                 Sign packages
   -q                 Query settings and pretend build
   -h                 This help

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>

For example, we want to build the upower-pm-utils package from the following PKGBUILD folders

$ ls
consolekit                  manjaro-tools          openrc-video
eudev                       networkmanager-openrc  packages
eudev-systemdcompat         openrc-aur             polkit-consolekit
kde-servicemenus-pkg-tools  openrc-base            README.md
keyboardctl-openrc          openrc-core            sddm-consolekit
kf5-servicemenus-pkg-tools  openrc-desktop         sysvinit
lib32-eudev                 openrc-devel           upower-pm-utils
lib32-eudev-systemdcompat   openrc-misc
manjaro-openrc              openrc-net

To test if the options are correct, the -q option can be used.

$ buildpkg -q upower-pm-utils
==> manjaro-tools
 -> version: 0.9.5.6
 -> manjaro_tools_conf: /etc/manjaro-tools/manjaro-tools.conf
==> OPTIONS:
 -> arch: i686
 -> branch: stable
 -> chroots: /srv/manjarobuild
==> ARGS:
 -> mkchrootpkg_args: -r /srv/manjarobuild/stable/i686
 -> makepkg_args: 
 -> clean_first: false
 -> wipe_clean: false
 -> namcap: false
 -> sign: false
==> PATHS:
 -> chrootdir: /srv/manjarobuild/stable/i686
 -> profiledir: /etc/manjaro-tools/sets
 -> pkg_dir: /var/cache/manjaro-tools/stable/i686
 -> pacman_conf: /usr/share/manjaro-tools/pacman-default.conf
 -> makepkg_conf: /usr/share/manjaro-tools/makepkg-i686.conf
 -> mirrors_conf: /usr/share/manjaro-tools/pacman-mirrors-stable.conf
==> BLACKLIST:
 -> blacklist_trigger: eudev lib32-eudev upower-pm-utils eudev-systemdcompat lib32-eudev-systemdcompat
 -> blacklist: libsystemd
==> SETS:
 -> profiles: default
 -> profile: upower-pm-utils
 -> is_profile: false
==> Build queue:
 -> upower-pm-utils

After that to build the package -p can be used.

$ buildpkg -p upower-pm-utils
==> Updating chroot for [testing] (x86_64)...
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
==> Making package: upower-pm-utils 0.9.23-4 (Mon Jan 12 12:38:16 IST 2015)
==> Retrieving sources...
...
...
==> Leaving fakeroot environment.
==> Finished making: upower-pm-utils 0.9.23-4 (Mon Jan 12 07:08:28 UTC 2015)

To clean the chroot before building -c -p can be used.

$ buildpkg -p upower-pm-utils -c
==> Creating chroot for [testing] (x86_64)...
 -> Deleting chroot copy 'aaditya'...
 -> Deleting chroot copy 'root'...
==> Creating install root at /mnt/datalinux2/manjaro-tools/testing/x86_64/root
==> Installing packages to /mnt/datalinux2/manjaro-tools/testing/x86_64/root
:: Synchronizing package databases...
 core                     133.7 KiB  30.8K/s 00:04 [######################] 100%
 extra                   1920.2 KiB   392K/s 00:05 [######################] 100%
 community                  2.7 MiB   512K/s 00:05 [######################] 100%
:: There are 25 members in group base-devel:
:: Repository core
  1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file
  7) findutils  8) flex  9) gawk  10) gcc  11) gettext  12) grep  13) groff
  14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch
  20) pkg-config  21) sed  22) sudo  23) texinfo  24) util-linux  25) which
...
...
==> Creating clean working copy [aaditya]...
==> Making package: upower-pm-utils 0.9.23-4 (Mon Jan 12 12:37:00 IST 2015)
==> Retrieving sources...
...
...
==> Leaving fakeroot environment.
==> Finished making: upower-pm-utils 0.9.23-4 (Mon Jan 12 07:07:20 UTC 2015)

To build a set the name of the set can be used. The current sets can be queried with the -q option.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.