What is the best way to handle repository URLs that change based on the architecture?

14 views
Skip to first unread message

Raphael Traviss

unread,
Nov 4, 2024, 3:19:30 PM11/4/24
to kiwi
For example, Ubuntu x_86 repos look like this:

But Ubuntu aarch64 repos look like this:
http://ports.ubuntu.com/ubuntu-ports


Ideally, I'd like to write something like this, but the <source> element doesn't support the arch attribute:

<repository type="apt-deb" alias="jammy" distribution="jammy" components="main multiverse restricted universe" repository_gpgcheck="false">
    <source arch="x86_64" path="http://ports.ubuntu.com/ubuntu-ports"/>
    <source arch="aarch64" path="http://ports.ubuntu.com/ubuntu-ports"/>
  </repository>



Is there a good way to handle this, or should I just continue on my current practice of commenting out the repos when I build on ARM versus x86?


Regards,
Raphael

Marcus Schäfer

unread,
Nov 5, 2024, 10:36:14 AM11/5/24
to kiwi-...@googlegroups.com
Hi,

> Ideally, I'd like to write something like this, but the <source>
> element doesn't support the arch attribute:

right, but the repository element does. I use it like this:

<repository type="apt-deb" repository_gpgcheck="false" package_gpgcheck="false" imageinclude="true" arch="x86_64">
<source path="...some-x86-repo..."/>
</repository>

<repository type="apt-deb" repository_gpgcheck="false" package_gpgcheck="false" imageinclude="true" arch="aarch64">
<source path="...some-aarch64-repo..."/>
</repository>

Hope this helps

Cheers,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
signature.asc

Raphael Traviss

unread,
Nov 5, 2024, 11:03:20 AM11/5/24
to kiwi-...@googlegroups.com
Is that only for KIWI 10.x?  I'm on 9.x for Ubuntu 22.04 debootstrap


When I add the "aarch=" attribute, it says the XML schema is no longer valid:

PastedGraphic-2.png



Error is caused by this entry--when I remove the arch=aarch64 attribute, it builds normally:


<repository type="apt-deb" alias="jammy" distribution="jammy" components="main multiverse restricted universe" repository_gpgcheck="false"  use_for_bootstrap="true" arch="aarch64">
</repository>


I looked here, but the docs don't say anything about the arch attribute for the <repository> element--is there some other place to look for details on that, or is it assumed that arch is a valid attribute on any element, maybe in KIWI 10.x?




Regards,
Raphael




--
You received this message because you are subscribed to a topic in the Google Groups "kiwi" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kiwi-images/CsaRzW80zHI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kiwi-images...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/kiwi-images/Zyo7Z0bOxTR1EhNm%40asterix.

Marcus Schäfer

unread,
Nov 5, 2024, 11:48:28 AM11/5/24
to kiwi-...@googlegroups.com
Hi,

> Is that only for KIWI 10.x? I'm on 9.x for Ubuntu 22.04 debootstrap

Yes we added the arch attribute for the repository element in code 10.
If you are still on v9 it's not going to work.

Sorry I wasn't aware you are still on v9 and debootstrap

Regards,
signature.asc
Reply all
Reply to author
Forward
0 new messages