
私がビルドしようとしたときソース速度はpodman
4.5です。Alma Linux 8では、次のような結果が得られます。
rpmbuild --rebuild ./podman-4.5.0-1.fc39.src.rpm
Installing ./podman-4.5.0-1.fc39.src.rpm
warning: user mockbuild does not exist - using root
warning: group mock does not exist - using root
...
error: Architecture is not included: x86_64
この問題をどのように解決できますか?
エラー:アーキテクチャが含まれていません:x86_64
走れば
rpm -ivh ./podman-4.5.0-1.fc39.src.rpm
ジャンプしても~/rpmbuild/SPECS
同じエラーが発生する可能性があります。
rpmbuild -bp podman.spec
error: Architecture is not included: x86_64
答え1
仕様ファイルの後ろにあるマクロを展開してください。
rpmspec -P ./podman.spec
次のようなものを見ると
Name: podman
Epoch: 5
Version: 4.5.0
License: Apache-2.0 and BSD-2-Clause and BSD-3-Clause and ISC and MIT and MPL-2.0
Release: 1.el8
ExclusiveArch: %{golang_arches_future}
...
あるいは、%
このように始まるマクロは%{golang_arches_future}
問題の兆候です。つまり、マクロは拡張されません。
この場合の基本的な問題は次のとおりです。RPMマクロは9ヶ月前に%go_arches
名前が変更されました。%golang_arches_future
。その後、新しいpodmanパッケージはFedora Rawhideリポジトリの新しい変数を使用しています。仕様の変更を元に戻して再利用するか、実行時にサポートする必要がある%go_arches
アーキテクチャのパラメータとして新しいマクロを設定できます。rpmbuild
rpmbuild -D "%golang_arches_future x86_64" -bb ./podman.spec