Difference between revisions of "Buildiso with AUR packages: Using buildpkg"
Views
Actions
Namespaces
Variants
Tools
Buildiso with AUR packages: Using buildpkg (view source)
Revision as of 19:14, 2 June 2016
, 8 years agoUpdating Tutorial
imported>Excalibur1234 |
imported>ABOhiccups (Updating Tutorial) |
||
Line 2: | Line 2: | ||
This tutorial is about creating your own | This tutorial is about creating your own online repository. This repository can be used to download (with the help of ''yaourt'') and build (with the help of ''buildpkg'') packages. Later, you can install those packages to your customized Manjaro ISO using ''buildiso''. | ||
Line 8: | Line 8: | ||
The same XFCE ISO profile will be used as example on this Wiki page. | The same XFCE ISO profile will be used as example on this Wiki page. | ||
==Create directories== | ==Create directories== | ||
The first thing you should probably do is create a directory for your | The first thing you should probably do is create a directory for your online repository. The online repository is called <code>online-repo</code> throughout this entire tutorial. This'll help keep things organized. Your repository will include two subdirectories for the different architectures: | ||
mkdir -p ~/ | mkdir -p ~/online-repo/i686 ~/online-repo/x86_64 | ||
This | This online repository is created in your home folder, but you can create it anywhere you want. | ||
Next, you need to create a build directory. During the course of this tutorial you will need it as a temporary directory for files from the AUR: | Next, you need to create a build directory. During the course of this tutorial you will need it as a temporary directory for files from the AUR: | ||
mkdir -p ~/ | mkdir -p ~/online-build/ | ||
This temporary build directory is created in your home folder, but you can create it anywhere you want. | This temporary build directory is created in your home folder, but you can create it anywhere you want. | ||
Line 30: | Line 28: | ||
==Download package files from AUR using yaourt== | ==Download package files from AUR using yaourt== | ||
Now, go to your | Now, go to your online build directory: | ||
cd ~/ | cd ~/online-build | ||
Next do | Next do | ||
Line 41: | Line 39: | ||
===Example:=== | ===Example:=== | ||
You want to add the package <code>pcmanfm-qt-git</code> to your ISO. Therefore, you need to download it to your | You want to add the package <code>pcmanfm-qt-git</code> to your ISO. Therefore, you need to download it to your online repository first. You download and unpack it using | ||
yaourt -G pcmanfm-qt-git | yaourt -G pcmanfm-qt-git | ||
You see a new <code>PKGBUILD</code> file in your | You see a new <code>PKGBUILD</code> file in your online build directory: | ||
~/ | ~/online-build/pcmanfm-qt-git/PKGBUILD | ||
Line 54: | Line 52: | ||
Up to this point, you have only downloaded and unpacked files from the AUR. Next, you need to build those files into proper packages: | Up to this point, you have only downloaded and unpacked files from the AUR. Next, you need to build those files into proper packages: | ||
cd ~/ | cd ~/online-build | ||
buildpkg -p <package name> | buildpkg -p <package name> | ||
If you want to build | If you want to build 32-Bit packages on a 64-Bit system, you can do this by specifying the architecture: | ||
buildpkg -a i686 -p <package name> | buildpkg -a i686 -p <package name> | ||
Line 105: | Line 103: | ||
==Copy package files to | ==Copy package files to online repository== | ||
In the last chapter you have built packages. These packages were created in this directory on your system: | In the last chapter you have built packages. These packages were created in this directory on your system: | ||
Line 111: | Line 109: | ||
/var/cache/manjaro-tools/ | /var/cache/manjaro-tools/ | ||
On a | On a 64-Bit system using the unstable branch the exact path is | ||
/var/cache/manjaro-tools/pkg/unstable/x86_64 | /var/cache/manjaro-tools/pkg/unstable/x86_64 | ||
Line 118: | Line 116: | ||
Move all package files to your | Move all package files to your online repository: | ||
~/ | ~/online-repo/x86_64 | ||
===Example:=== | ===Example:=== | ||
Your | Your online repository should now look like this: | ||
liblxqt-git-0.8.0.23.g079768e-1-x86_64.pkg.tar.xz | liblxqt-git-0.8.0.23.g079768e-1-x86_64.pkg.tar.xz | ||
Line 134: | Line 132: | ||
Use the command <code>repo-add</code> to build a database file. Run the following commands in a terminal: | Use the command <code>repo-add</code> to build a database file. Run the following commands in a terminal: | ||
cd ~/ | cd ~/online-repo/x86_64 | ||
repo-add | repo-add online-repo.db.tar.gz *.pkg.tar.* | ||
Every time you add packages to your | Every time you add packages to your online repositories, these commands need to be executed again! Otherwise, ''buildiso'' will complain later about missing packages in your online repository. | ||
===Example:=== | ===Example:=== | ||
After running those commands, your | After running those commands, your online repository looks like this: | ||
online-repo.db.tar | |||
online-repo.db | |||
liblxqt-git-0.8.0.23.g079768e-1-x86_64.pkg.tar.xz | liblxqt-git-0.8.0.23.g079768e-1-x86_64.pkg.tar.xz | ||
libqtxdg-git-1.0.0.7.g0503cf7-1-x86_64.pkg.tar.xz | libqtxdg-git-1.0.0.7.g0503cf7-1-x86_64.pkg.tar.xz | ||
Line 149: | Line 147: | ||
== | ==Upload online-repo to Host Server== | ||
Now you need to upload online-repo to your Host Server. Upload everything from online-repo to your Host Server. Your web address as to match the name of the directory folder you created. | |||
===Example:=== | |||
This is what your web address should look like after upload online-repo to your Host Server. | |||
64-Bit Repository | |||
http://www.myserver.com/repository/online-repo/x86/ | |||
32-Bit Repository | |||
http://www.myserver.com/repository/online-repo/i686 | |||
==Add online-repo to pacman-XXXXX.conf file== | |||
Attention: The pacman configuration file is different for 32-Bit and 64-Bit systems: On 64-Bit systems the <code>[multilib]</code> repository is included. On 32-Bit systems the <code>[default]</code> repository is included. | |||
Open <code>/usr/share/manjaro-tools/pacman-XXXXX.conf</code> with a Text Editor. | |||
At the bottom of <code>pacman-XXXXX.conf</code> files, add: | |||
[online-repo] | |||
SigLevel = Never | |||
Server = http://www.myserver.com/repository/online-repo/$repo/$arch | |||
===Example:=== | |||
Your new <code>pacman-multilib.conf</code> file looks like this: | Your new <code>pacman-multilib.conf</code> file looks like this: | ||
Line 221: | Line 216: | ||
#VerbosePkgLists | #VerbosePkgLists | ||
# By default, pacman accepts packages signed by keys that its | # By default, pacman accepts packages signed by keys that its online keyring | ||
# trusts (see pacman-key and its man page), as well as unsigned packages. | # trusts (see pacman-key and its man page), as well as unsigned packages. | ||
SigLevel = Required DatabaseOptional | SigLevel = Required DatabaseOptional | ||
Line 227: | Line 222: | ||
#RemoteFileSigLevel = Required | #RemoteFileSigLevel = Required | ||
# NOTE: You must run `pacman-key --init` before first using pacman; the | # NOTE: You must run `pacman-key --init` before first using pacman; the online | ||
# keyring can then be populated with the keys of all official Manjaro Linux | # keyring can then be populated with the keys of all official Manjaro Linux | ||
# packagers with `pacman-key --populate archlinux manjaro`. | # packagers with `pacman-key --populate archlinux manjaro`. | ||
Line 235: | Line 230: | ||
# - can be defined here or included from another file | # - can be defined here or included from another file | ||
# - pacman will search repositories in the order defined here | # - pacman will search repositories in the order defined here | ||
# - | # - online/custom mirrors can be added here or in separate files | ||
# - repositories listed first will take precedence when packages | # - repositories listed first will take precedence when packages | ||
# have identical names, regardless of version number | # have identical names, regardless of version number | ||
Line 279: | Line 274: | ||
#Server = file:///home/custompkgs | #Server = file:///home/custompkgs | ||
[ | [online-repo] | ||
SigLevel = Never | SigLevel = Never | ||
Server = | Server = http://www.myserver.com/repository/online-repo/$repo/$arch | ||
As you can see, there is also another custom repository in this <code>pacman-multilib.conf</code> file: <code>[infinality-bundle]</code>. But it is commented out. This illustrates nicely the way to add a custom non- | As you can see, there is also another custom repository in this <code>pacman-multilib.conf</code> file: <code>[infinality-bundle]</code>. But it is commented out. This illustrates nicely the way to add a custom non-online repository. | ||
Custom | Custom online repositories will get removed automatically from this file before it gets copied over to the installed system, whereas custom non-online repositories will be kept. This means AUR packages are best installed from a custom online repository (as demonstrated by <code>[online-repo]</code> in this tutorial). Packages neither available in the Manjaro repositories nor in the AUR are best installed from a custom non-online repository (see <code>[infinality-bundle]</code> as example). | ||
Line 295: | Line 290: | ||
===Example:=== | ===Example:=== | ||
You can now add <code>pcmanfm-qt-git</code> to your package list for your ISO profile. This means your <code>manjaro-tools | You can now add <code>pcmanfm-qt-git</code> to your package list for your ISO profile. This means your <code>/usr/share/manjaro-tools/iso-profiles/official/xfce/Packages-Xfce</code> file should look exactly like this: | ||
## XFCE Main Packages | ## XFCE Main Packages |