makedeb / makedeb-docs

Documentation for makedeb, the MPR, and other related projects
https://docs.makedeb.org
Other
3 stars 8 forks source link

Force amd64 arch on prebuild-mpr debian packages source list #58

Closed luzfcb closed 1 year ago

luzfcb commented 1 year ago

Problem:

Currently the prebuilt-mpr repository seems to only support the amd64 architecture, however the source list indicated in the documentation does not force the amd64 architecture, which can lead to an error if your operating system has dpkg configured with other architectures (for example, I have Steam installed and it added the i386 architecture)

I get an error when performing the sudo apt update, like

N: Skipping acquire of configured file 'jammy/binary-i386/Packages' as repository 'https://proget.makedeb.org prebuilt-mpr InRelease' doesn't support architecture 'i386'

Solution: A simple way to resolve this is by adding arch=amd64 as part of the repository's source list, that is, use:

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.{{< makedeb_url >}} prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list

instead of

echo "deb [signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.{{< makedeb_url >}} prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list

if in the future prebuild-mpr supports other architectures, add them to the arch argument separating them with a comma, like

echo "deb [arch=amd64,arm,arm64 signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.{{< makedeb_url >}} prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list

To check the active extra architectures in dpkg, run

dpkg --print-foreign-architectures

To list all architectures currently supported by dpkg (but not necessarily active) run

dpkg-architecture --list-known
netlify[bot] commented 1 year ago

Deploy Preview for makedeb-docs ready!

Name Link
Latest commit 428b0d4f0e34ba3335f43d92cb8b6ab92f9fa61a
Latest deploy log https://app.netlify.com/sites/makedeb-docs/deploys/63da775d00902a0008011b5a
Deploy Preview https://deploy-preview-58--makedeb-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

hwittenborn commented 1 year ago

That's fine enough logic for me. I was thinking that users would have to manually reconfigure the Prebuilt-MPR APT config on non-amd64 systems in the future if other architectures were to ever be added, but since it doesn't work on those architectures right now anyway, they'd probably end up setting it up from scratch when that time comes anyway.

I'll go ahead and get this merged, thanks a ton! :)