Difference between revisions of "Buildiso with AUR packages: Using buildpkg"

adapted to new manjaro-tools
imported>Excalibur1234
imported>Oberon
(adapted to new manjaro-tools)
Line 12: Line 12:
==1. Create directories==
==1. Create directories==


The first thing you should probably do is create a directory for your local repository. The local repository is called <code>local-repo</code> throughout this entire tutorial. This'll help keep things organized.  
The first thing you should probably do is create a directory for your local repository. The local repository is called <code>local-repo</code> throughout this entire tutorial. This'll help keep things organized. Your repository will include two subdirectories for the different architectures:


   mkdir -p ~/local-repo/
   mkdir -p ~/local-repo/i686 ~/local-repo/x86_64


This local repository is created in your home folder, but you can create it anywhere you want.
This local repository is created in your home folder, but you can create it anywhere you want.
Line 69: Line 69:
  buildpkg -p pcmanfm-qt-git
  buildpkg -p pcmanfm-qt-git


The build get aborted with the following error message:
The build gets aborted with the following error message:


  ==> Installing missing dependencies...
  ==> Installing missing dependencies...
Line 95: Line 95:
  buildpkg -n -p libqtxdg-git
  buildpkg -n -p libqtxdg-git


Finally, a package gets build (and installed in your build environment) successfully!
Finally, a package gets built (and installed in your build environment) successfully!


Now, build the other packages (in reverse order):
Now, build the other packages (in reverse order):
Line 105: Line 105:
==4. Copy package files to local repository==
==4. Copy package files to local repository==


In the last chapter you build 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:


  /var/cache/manjaro-tools/
  /var/cache/manjaro-tools/
Line 111: Line 111:
On a 64bit system using the unstable branch the exact path is
On a 64bit system using the unstable branch the exact path is


  /var/cache/manjaro-tools/unstable/x86_64
  /var/cache/manjaro-tools/pkg/unstable/x86_64


You should see compressed package files. The file name should end with <code>.pkg.tar.xz</code>.
You should see compressed package files. The file name should end with <code>.pkg.tar.xz</code>.
Line 118: Line 118:
Move all package files to your local repository:
Move all package files to your local repository:


  ~/local-repo/
  ~/local-repo/x86_64


===Example:===
===Example:===
Line 132: 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 ~/local-repo/
  cd ~/local-repo/x86_64
  repo-add local-repo.db.tar.gz *.pkg.tar.*
  repo-add local-repo.db.tar.gz *.pkg.tar.*
sudo pacman -Syy


Every time you add packages to your local repositories, these commands need to be executed again! Otherwise, ''buildiso'' will complain later about missing packages in your local repository.
Every time you add packages to your local repositories, these commands need to be executed again! Otherwise, ''buildiso'' will complain later about missing packages in your local repository.
Line 150: Line 149:
==6. Add local-repo to pacman-XXXXX.conf file==
==6. Add local-repo to pacman-XXXXX.conf file==


Open your <code>/etc/pacman.conf</code> file. Attention: This file is different for 32bit and 64bit systems: On 64bit systems the <code>[multilib]</code> repository is included.
Attention: The pacman configuration file is different for 32bit and 64bit systems: On 64bit systems the <code>[multilib]</code> repository is included.
Copy and save the entire content of <code>/etc/pacman.conf</code> to  
Copy and paste the template <code>pacman-default.conf</code> (for 32bit) and / or <code>pacman-multilib.conf</code> from <code>/usr/share/manjaro-tools/</code> to <code>manjaro-tools-iso-profiles/xfce/</code>


manjaro-tools-iso-profiles/xfce/'''pacman-XXXXX.conf'''
At the bottom of your new <code>pacman-XXXXX.conf</code> files, add:
 
Replace <code>pacman-XXXXX.conf</code> with
* <code>pacman-default.conf</code> if you have only 32bit packages in your local repository: Remove the <code>[multilib]</code> repository
from this file.
* <code>pacman-multilib.conf</code> if you have only 64bit packages in your local repository: This file needs a <code>[multilib]</code> repository
 
At the bottom of the just created <code>pacman-XXXXX.conf</code> file, add:


  [local-repo]
  [local-repo]
  SigLevel = Never
  SigLevel = Never
  Server = file:///home/'''<username>'''/local-repo/
  Server = file:///home/'''<username>'''/$repo/$arch


Replace <code><username></code> with your username.
Replace <code><username></code> with your username.
Delete or add the <code>[multilib]</code> repository:
[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist


===Example:===
===Example:===
Line 208: Line 195:
  #LogFile    = /var/log/pacman.log
  #LogFile    = /var/log/pacman.log
  #GPGDir      = /etc/pacman.d/gnupg/
  #GPGDir      = /etc/pacman.d/gnupg/
  HoldPkg     = pacman glibc manjaro-system
  HoldPkg     = pacman glibc
  # If upgrades are available for these packages they will be asked for first
  # If upgrades are available for these packages they will be asked for first
  SyncFirst    = manjaro-system
  SyncFirst    = manjaro-system
Line 226: Line 213:
  # Misc options
  # Misc options
  #UseSyslog
  #UseSyslog
  Color
  #Color
  #TotalDownload
  #TotalDownload
  CheckSpace
  # We cannot check disk space from within a chroot environment
#CheckSpace
  #VerbosePkgLists
  #VerbosePkgLists
   
   
Line 250: Line 238:
  #  - URLs will have $repo replaced by the name of the current repo
  #  - URLs will have $repo replaced by the name of the current repo
  #  - URLs will have $arch replaced by the name of the architecture
  #  - URLs will have $arch replaced by the name of the architecture
  #
  #  
  # Repository entries are of the format:
  # Repository entries are of the format:
  #      [repo-name]
  #      [repo-name]
Line 259: Line 247:
  # uncommented to enable the repo.
  # uncommented to enable the repo.
  #
  #
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
   
   
  [core]
  [core]
SigLevel = PackageRequired
  Include = /etc/pacman.d/mirrorlist
  Include = /etc/pacman.d/mirrorlist
   
   
  [extra]
  [extra]
SigLevel = PackageRequired
  Include = /etc/pacman.d/mirrorlist
  Include = /etc/pacman.d/mirrorlist
   
   
  [community]
  [community]
SigLevel = PackageRequired
  Include = /etc/pacman.d/mirrorlist
  Include = /etc/pacman.d/mirrorlist
   
   
Line 276: Line 265:
   
   
  [multilib]
  [multilib]
SigLevel = PackageRequired
  Include = /etc/pacman.d/mirrorlist
  Include = /etc/pacman.d/mirrorlist
   
   
Line 291: Line 279:
  [local-repo]
  [local-repo]
  SigLevel = Never
  SigLevel = Never
  Server = file:///home/excalibur/local-repo/
  Server = file:///home/'''<username>'''/$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-local repository.
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-local repository.
Line 307: Line 295:
You can now add <code>pcmanfm-qt-git</code> to your package list for your ISO profile. This means your <code>manjaro-tools-iso-profiles/xfce/Packages-Xfce</code> file should look exactly like this:
You can now add <code>pcmanfm-qt-git</code> to your package list for your ISO profile. This means your <code>manjaro-tools-iso-profiles/xfce/Packages-Xfce</code> file should look exactly like this:


### Manjaro Packages
## XFCE Main Packages
ffmpegthumbnailer
## XFCE Main Packages
gconf # fix qt-theme
ffmpegthumbnailer
gnome-keyring # fix wlan segfault
gconf                   # fix qt-theme
gufw # firewall
gnome-keyring           # fix wlan segfault
accountsservice
gufw                     # firewall
lightdm-gtk-greeter
# mdm-themes
lightdm-gtk-greeter-settings
accountsservice
light-locker
lightdm-gtk-greeter
manjaro-settings-manager
lightdm-gtk-greeter-settings
menulibre
light-locker
manjaro-settings-manager
>i686 gcc
>x86_64 gcc-multilib
   
   
  ...
  ...
   
   
  ## AUR packages
  ## AUR packages
  '''local-repo/libqtxdg-git'''
  '''libqtxdg-git'''
  '''local-repo/liblxqt-git'''  
  '''liblxqt-git'''  
  '''local-repo/pcmanfm-qt-git'''
  '''pcmanfm-qt-git'''


The order of package installations to your ISO is from top to bottom. Please note the '''exact''' order of the last 3 packages. <code>pcmanfm-qt-git</code> depends on <code>liblxqt-git</code>, which depends on <code>libqtxdg-git</code> (see chapter 4.1). Therefore, <code>liblxqt-git</code> needs to be the first package, which gets installed!
The order of package installations to your ISO is from top to bottom. Please note the '''exact''' order of the last 3 packages. <code>pcmanfm-qt-git</code> depends on <code>liblxqt-git</code>, which depends on <code>libqtxdg-git</code> (see chapter 4.1). Therefore, <code>liblxqt-git</code> needs to be the first package, which gets installed!
Line 337: Line 321:
For removing your build environment from your hard drive, execute:
For removing your build environment from your hard drive, execute:


  sudo rm -r /opt/buildpkg
  sudo rm -r /var/lib/manjaro-tools/buildpkg




Anonymous user