I am building a custom package for Debian which I then intend to deploy to other machines. To keep things simple, I'm just installing the .deb file directly with dpkg -i.

According to the Debian Policy Manual you can use the special words all for an architecture-independent package, and any for an architecture-dependent package that can be built for any number of different architectures.

So I have gone ahead and written Architecture: any in my control file, however when I go to install the package, I get this error:

 package architecture (any) does not match system (amd64)

Why is the package being created for the any architecture? This is not an architecture-independent package (which is why I didn't write all), so it looks like dpkg is not replacing any with the architecture the package was compiled for.

What is the correct way to specify that a package is platform-specific but it can be built for all available platforms? I don't want to have to list all of them, there are hundreds!

UPDATE: The build process is a simple configure && make && make install PREFIX=/xyz and then I'm making the package with fakeroot dpkg -b /xyz /output

Is there a standard way to replace 'any' with the current architecture automatically, or should I e.g. be using sed to modify the control file?

  • It's not dpkg that has to replace any with the name of the actual architecture, but the build process. Please show us (editi it in to the question), the actual commands you use, and preferably their output (there can be a lot of output from building, so please filter it. – Henrik Aug 15 '16 at 6:28
  • Thanks for the info. I've updated the question. dpkg produces little output (just the name of the .deb file with the architecture as any) and the configure process is much the same as any other. – Malvineous Aug 15 '16 at 6:38
  • 1
    That is not a good way of building debian packages. As far as I could gather from a quick look at the manpage for dpkg-deb (the man page for dpkg refers to that for the -b option) all it does is wrap things up in a .deb file. Please read (debian.org/doc/manuals/maint-guide/)[Debian New Maintainers' Guide]. – Henrik Aug 15 '16 at 7:49
  • Yes this isn't a good way of building Debian packages, but I suppose that's not really what I'm doing. I'm using dpkg as a convenient way to deploy custom software to a Debian machine, with dpkg taking care of removing old files after an upgrade and installing dependencies. I guess the answer in this case is to use sed then? – Malvineous Aug 15 '16 at 8:56
  • 1
    If you want to use dpkg you have to build debian packages! Trying to use it for anything else is a way of f*cking your system. – Henrik Aug 15 '16 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.