Difference between revisions of "Manjaro-tools"

Marked this version for translation
m (added languages and translate tags)
(Marked this version for translation)
Line 3: Line 3:


<translate>
<translate>
= Introduction =
= Introduction = <!--T:1-->


<!--T:2-->
''manjaro-tools'' consists of a lot of different tools aimed at Manjaro developers. It is split into 3 different packages:
''manjaro-tools'' consists of a lot of different tools aimed at Manjaro developers. It is split into 3 different packages:
* ''manjaro-tools-base'' contains basic tools, different chroot tools, and ''buildset''
* ''manjaro-tools-base'' contains basic tools, different chroot tools, and ''buildset''
Line 11: Line 12:




<!--T:3-->
All of these ''manjaro-tools'' packages are replacements for '''devtools''' and '''manjaroiso'''.  
All of these ''manjaro-tools'' packages are replacements for '''devtools''' and '''manjaroiso'''.  


<!--T:4-->
A detailed user manual is available at [https://gitlab.manjaro.org/tools/development-tools/manjaro-tools gitlab].
A detailed user manual is available at [https://gitlab.manjaro.org/tools/development-tools/manjaro-tools gitlab].




= Configuration =
= Configuration = <!--T:5-->


<!--T:6-->
manjaro-tools can be configured by copying the folder ''/etc/manjaro-tools'' to your home in ''~/.config'' folder and then edit the file {{ic|''./config/manjaro-tools/manjaro-tools.conf''}}
manjaro-tools can be configured by copying the folder ''/etc/manjaro-tools'' to your home in ''~/.config'' folder and then edit the file {{ic|''./config/manjaro-tools/manjaro-tools.conf''}}




= Files =
= Files = <!--T:7-->


<!--T:8-->
These are the new names for renamed scripts.
These are the new names for renamed scripts.


<!--T:9-->
*    mkmanjaroroot --> mkchroot
*    mkmanjaroroot --> mkchroot
*    manjarobuild --> buildpkg
*    manjarobuild --> buildpkg
Line 33: Line 39:




= buildset =
= buildset = <!--T:10-->


<!--T:11-->
buildset is used to create build lists. Build lists can be defined in {{ic|/etc/manjaro-tools/sets/<buildlistname>.set}}
buildset is used to create build lists. Build lists can be defined in {{ic|/etc/manjaro-tools/sets/<buildlistname>.set}}


<!--T:12-->
The help looks like the following:
The help looks like the following:


  $ buildset -h
  <!--T:13-->
$ buildset -h
  Usage: buildset [options]
  Usage: buildset [options]
     -c <name>  Create set
     -c <name>  Create set
Line 48: Line 57:
     -h          This help
     -h          This help


<!--T:14-->
{{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.}}
{{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 = <!--T:15-->


<!--T:16-->
buildpkg is used to build a particular package or a set. In the following chapter all functions of buildpkg get explained.  
buildpkg is used to build a particular package or a set. In the following chapter all functions of buildpkg get explained.  


<!--T:17-->
If you want a detailed example how to use buildpkg to build packages for a local repository, please look [https://wiki.manjaro.org/index.php?title=Buildiso_with_AUR_packages:_Using_buildpkg here].
If you want a detailed example how to use buildpkg to build packages for a local repository, please look [https://wiki.manjaro.org/index.php?title=Buildiso_with_AUR_packages:_Using_buildpkg here].




<!--T:18-->
The help looks like the following:
The help looks like the following:


  Usage: buildpkg [options]
  <!--T:19-->
Usage: buildpkg [options]
     -a <arch>          Arch [default: x86_64]
     -a <arch>          Arch [default: x86_64]
     -b <branch>        Branch [default: stable]
     -b <branch>        Branch [default: stable]
Line 74: Line 88:
     -w                Clean up cache and sources
     -w                Clean up cache and sources


<!--T:20-->
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:
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>
  <!--T:21-->
buildpkg -p <package-name>


<!--T:22-->
To build a set the name of the set can be used. The current sets can be queried with the {{ic|-q}} option.
To build a set the name of the set can be used. The current sets can be queried with the {{ic|-q}} option.




= buildtree =
= buildtree = <!--T:23-->


<!--T:24-->
buildtree is a little tools to sync arch abs and manjaro packages git repos.
buildtree is a little tools to sync arch abs and manjaro packages git repos.


<!--T:25-->
The arguments are:
The arguments are:


  $ buildtree -h
  <!--T:26-->
$ buildtree -h
  Usage: buildtree [options]
  Usage: buildtree [options]
     -s            Sync manjaro tree
     -s            Sync manjaro tree
Line 95: Line 115:
     -h            This help[/code]
     -h            This help[/code]


<!--T:27-->
To sync Arch and Manjaro trees:
To sync Arch and Manjaro trees:


  buildtree -as
  <!--T:28-->
buildtree -as




= buildiso =
= buildiso = <!--T:29-->


<!--T:30-->
buildiso is used to build a particular ISO or a set of ISOs. All functions of buildiso will be explained in the following chapters.
buildiso is used to build a particular ISO or a set of ISOs. All functions of buildiso will be explained in the following chapters.


<!--T:31-->
If you want a detailed guide how to use buildiso to build your own Manjaro ISOs from scratch, please look [https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso here].
If you want a detailed guide how to use buildiso to build your own Manjaro ISOs from scratch, please look [https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso here].




== Overview ==
== Overview == <!--T:32-->


<!--T:33-->
The help looks like the following for x86_64:
The help looks like the following for x86_64:


  $ buildiso -h
  <!--T:34-->
$ buildiso -h
  Usage: buildiso [options]
  Usage: buildiso [options]
     -p <profile>      Buildset or profile [default: default]
     -p <profile>      Buildset or profile [default: default]
Line 129: Line 155:




== Query Building ==
== Query Building == <!--T:35-->


<!--T:36-->
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:


<!--T:37-->
<pre>
<pre>
~ >>> buildiso -p xfce -qv                                                           
~ >>> buildiso -p xfce -qv                                                           
Line 181: Line 209:




== Building ==
== Building == <!--T:38-->


<!--T:39-->
To actually build the ISO:
To actually build the ISO:


  $ buildiso -p xfce -b stable
  <!--T:40-->
$ buildiso -p xfce -b stable




== Building with predownloaded Xorg packages ==
== Building with predownloaded Xorg packages == <!--T:41-->


<!--T:42-->
To build an ISO while retaining the previously downloaded cache of Xorg packages, the '''-x''' option can be used:
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
  <!--T:43-->
$ buildiso -p xfce-openbox-openrc/ -b stable -x




== Building with a small config change ==
== Building with a small config change == <!--T:44-->


<!--T:45-->
{{Note| It is to be verified if the procedure given below works or not.}}
{{Note| It is to be verified if the procedure given below works or not.}}


<!--T:46-->
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.
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.


<!--T:47-->
The work directory can be found using the '''-''' option:
The work directory can be found using the '''-''' option:


  ~ >>> buildiso -h                                                                                   
  <!--T:48-->
~ >>> buildiso -h                                                                                   
  Usage: buildiso [options]
  Usage: buildiso [options]
     -p <profile>      Buildset or profile [default: default]
     -p <profile>      Buildset or profile [default: default]
Line 229: Line 265:
   
   


<!--T:49-->
(work directory highlighted in bold)
(work directory highlighted in bold)


<!--T:50-->
The required file can be edited as root, for example:
The required file can be edited as root, for example:
  $ sudo nano /var/lib/manjaro-tools/buildiso/xfce/x86_64/desktopfs/etc/skel/.conkyrc
  $ sudo nano /var/lib/manjaro-tools/buildiso/xfce/x86_64/desktopfs/etc/skel/.conkyrc


<!--T:51-->
There is a catch involved here though; the file one wants to edit may be present in multiple images, like rootfs, livefs, desktopfs), and would need to be edited in the respective image directories.
There is a catch involved here though; the file one wants to edit may be present in multiple images, like rootfs, livefs, desktopfs), and would need to be edited in the respective image directories.




<!--T:52-->
Then the ISO then can be rebuilt as:
Then the ISO then can be rebuilt as:
  $ buildiso -p xfce -cs
  $ buildiso -p xfce -cs




=== Alternative ===
=== Alternative === <!--T:53-->


<!--T:54-->
First only the chroot for the ISO could be created, using the {{ic|-i}} option, then the changes can be made, and finally an ISO can be built with the {{ic|-sc}} option.
First only the chroot for the ISO could be created, using the {{ic|-i}} option, then the changes can be made, and finally an ISO can be built with the {{ic|-sc}} option.


<!--T:55-->
For example:
For example:


  $ buildiso -p xfce -b stable -x
  <!--T:56-->
$ buildiso -p xfce -b stable -x
==> Start building [xfce]
==> Start building [xfce]
==> Cleaning up ...
==> Cleaning up ...
Line 255: Line 298:
  ...
  ...


<!--T:57-->
After this the changes in the work directory can be made, and the ISO can be generated with:
After this the changes in the work directory can be made, and the ISO can be generated with:


  $ buildiso -p xfce/ -cz
  <!--T:58-->
$ buildiso -p xfce/ -cz


= See Also =
= See Also = <!--T:59-->


<!--T:60-->
* [https://gitlab.manjaro.org/tools/development-tools/manjaro-tools Manjaro Gitlab]
* [https://gitlab.manjaro.org/tools/development-tools/manjaro-tools Manjaro Gitlab]
* [[Build Manjaro ISOs with buildiso]]
* [[Build Manjaro ISOs with buildiso]]