Multi-Architectural Binary Rpm and The Noarch

noarch RPM with dependecies: i586 vs x86_64

I choose option 1: deinstallation of patterns-openSUSE-minimal_base-conflicts and everything worked. I tried to find what "patterns-openSUSE-minimal_base-conflicts" is, but couldn't find a good solution ...

Can docker images be cross-platform like rpm noarch?

This is not technically possible. The complication is not that the program you're trying to run isn't portable, but rather that the Docker image also contains its interpreter, and that isn't portable.

As an absolutely minimal example, consider a Docker image that just runs a shell script:

#!/bin/sh
echo 'Hello, world!'

Its Dockerfile would look portable:

FROM busybox
COPY hello.sh /bin
CMD ["/bin/hello.sh"]

But, the busybox image is architecture-specific; it contains the compiled binary for the C BusyBox code. Since the derived image is the architecture-specific busybox base image plus the portable shell script, the resulting image is architecture-specific.

Similar constraints apply around a compiled JVM or Node interpreter. At some point in the image stack you have to get down to some native compiled code that can execute the portable content.

MacOsX rpmbuild --target noarch doesn't work

I found the mistake!

The maven-rpm-plugin tool sucks. This package contains class RPMHelper, and uses bash command builder. The rpmbuild tool requires strong param ordering, and this class ignore all rules. I changed param ordering, and now I have correctly builded rpm packet.
From what I see, codehaus command is no longer support. I think that need we need a fork on github.

One SPEC file to support multiple architectures

Do you happen to be using BuildArch as well in your spec-file?

I have just tested this on a x86_64 build machine with a spec file where

BuildArch: noarch

and indeed

%ifnarch x86_64
Requires: package-x-y-z
%endif

produced a package that did require package-x-y-z...

Since my spec file produces a noarch package, I tried changing the logic; and

%ifnarch noarch
Requires: package-x-y-z
%endif

produced a package that did not depend on package-x-y-z.

Conclusion

If you use BuildArch, then the macros ifarch and ifnarch will match wrt that architecture and not your real build-machine architecture.



Related Topics



Leave a reply



Submit