I have a package in my PPA (ppa:mafoelffen/system-info) that is Multi-Arch. sudodus is one of my contributors. He asked me to come here and answer what I do for this.
The people involved with the testing of my script in this package made sure it tested well on amd64, arm64, armhf, ppc64el, powerpc, riscv64, s390x.
This is what I did (reference: https://www.debian.org/doc/debian-policy/ch-controlfields.html#architecture):
dpkg-architecture -L
For the Debian package, in the ./PackageName-VersionNumber/debian folder/control
file, I have this:
Architecture: all
That is all it needs in the control file. Building it locally, will create a ProjectName-VersionNumber_all.deb
file. I test this package locally before uploading the source package to the PPA.
In the PPA "Change Details" page, for "processors" I have all arches selected that it would let me do as self-service. (All except riskv64. Long story.)
When it first gets uploaded to the PPA, in the PPA "View Package Details" page it will initially show the status as the arch it was built on. For me this was "amd64". When published, that status changes to a green check mark. If I look at the package details, it has system-info_02.00.07_all.deb
, which I then tested, from there, on all my target arches. "riscv64" is another discussion, but since mine has no upstream code (I am "the upstream") as dependencies, it was built for that also.If it had, that would be another story with more details.
There is nothing at the PPA pages that shows anything else about arch/package details. I had to investigate elsewhere to find that...
Risc-V 64 was a question for me, since I wanted to include that arch target, and it wouldn't let me select that option on my own. I know this is not your target arch, but the details of what I found will answer that. I went to the PPA repo that is created by the build, and that the people using the PPA would get packages from: REPO. If you check there, after the build it creates the different arches, name as binary-<arch>
. If you follow the branches of the directory tree down to the release file for each arch, it will tell you the arch it was built for. That is how I confirmed that it was built for each arch.
I then tested each arch by (from a machine with that arch) adding the PPA, installing and testing on each.
Note that if you are creating a local build of your Debian Packages (.deb
), that Architecture
line in the control file is what determines the ***_arch***.deb
part of the package, indicating the target arch. For just two arches, like you noted, then do "amd64" in one control file, build the .deb
package, then do "arm64", and build it again. That will create PackageName_VersionNumber_amd64.deb
and PackageName_VersionNumber_arm64.deb
packages. One for each arch.
I use this to build the source to upload to the PPA:
debuild -us -uc -i -I -S -sa
I use this to build the packages locally to create Debian the .deb
packages to test:
debuild -us -uc