You are not logged in.

#1 2022-11-30 11:59:49

Gill Bates
Member
Registered: 2022-10-19
Posts: 28

custom repo for offline archiso

Thanks for reading this post.

I understand how to build a custom .iso with archiso. Now the next milestone is to include packages from AUR or github with a custom repo. Let's first confirm that it's possible, instead of connecting to the offical arch mirrorservers, we can configure pacman.conf to use only a customrepo instead. Given that all necessary packages are locally stored, archiso can build the .iso just fine, correct?
I understand that Arch is a rolling distro, with the main purpose of staying up-to-date with latest packages. This is to prove the concept, once I understand that, I would like to build up my knowledge and contribute and host a arch mirrorserver myself.


To create the custom repo, first a blank database is needed to trick pacman into downloading packages with all dependencies. Starting with creating a work directory.

 mkdir /customrepo 
 cd /customrepo 

Now the minimum required packages from baseline archiso are different from the ones recommended in https://wiki.archlinux.org/title/Offlin … repository

 pacman -Syw --cachedir . --dbpath /tmp/blankdb base base-devel linux linux-firmware systemd mkinitcpio mkinitcpio-archiso ... 

Then create the customrepo with

 repo-add ./custom.db.tar.gz ./* 

As I understand I have to edit the /archiso-profile/pacman.conf to point to the custom repo, like so.

[customrepo]
SigLevel = Optional TrustAll
Server = file:///customrepo/custom.db.tar.gz 

The archwiki arctile writes " Server = file:///path/to/customrepo "
Now that means " Server = file:///customrepo/custom.db.tar.gz " ?

I followed the archwiki but things seem very odd.
The custom.db.tar.gz is only 39.3K and it's not really clear to me how to add AUR packages or software that was build from source with make, go, makepkg can be added to a custom repo.

You have the right to shake your head,
because I do not understand the concept, yet.
Besides searching the arch forum, those are the articles I read so far:
Outdated ?https://wiki.archlinux.org/title/Offline_installation
https://wiki.archlinux.org/title/Archis … repository
https://wiki.archlinux.org/title/Pacman … repository
Other sources
https://www.reddit.com/r/archlinux/comm … tallation/

Last edited by Gill Bates (2022-11-30 12:17:49)

Offline

#2 2022-11-30 14:40:02

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: custom repo for offline archiso

Gill Bates wrote:

The archwiki arctile writes " Server = file:///path/to/customrepo "
Now that means " Server = file:///customrepo/custom.db.tar.gz " ?

It means

Server = file:///path/to/customrepo

pacman.conf includes an example

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

So you'd want something like

# customrepo
[customrepo]
SigLevel = Optional TrustAll
Server = file:///customrepo

Edit: Note that if you are using packages with signatures, you should include these and adjust the SigLevel if appropriate (if they all have signatures, for example).

Last edited by cfr (2022-11-30 14:44:00)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-11-30 15:25:27

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: custom repo for offline archiso

cfr wrote:
Gill Bates wrote:

The archwiki arctile writes " Server = file:///path/to/customrepo "
Now that means " Server = file:///customrepo/custom.db.tar.gz " ?

It means

Server = file:///path/to/customrepo

pacman.conf includes an example

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

So you'd want something like

# customrepo
[customrepo]
SigLevel = Optional TrustAll
Server = file:///customrepo

Edit: Note that if you are using packages with signatures, you should include these and adjust the SigLevel if appropriate (if they all have signatures, for example).

Edit 2: Adding software compiled with makepkg should work just the same, as I understand it. You'd  add the packages (and signatures if applicable) using repo-add. To include software compiled with make, go or whatever, you need to create a PKGBUILD and compile with makepkg. Then you add it with repo-add. You can't compile it directly with make or go and include it.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB