目次
文書の過去の版を表示しています。
Mock - rpm パッケージ構築ツール
本家: Mock - A ‘simple’ chroot build environment manager for building RPMs.
ソースコード: rpm-software-management/mock: Mock is a tool for a reproducible build of RPM packages.
インストール
$ sudo dnf install mock
メタデータの期限切れの最終確認: 1:18:11 時間前の 2023年03月08日 10時22分09秒 に実施しました。 依存関係が解決しました。 ============================================================================================================= パッケージ アーキテクチャー バージョン リポジトリー サイズ ============================================================================================================= インストール: mock noarch 3.5-1.fc37 updates 269 k 依存関係のインストール: mock-core-configs noarch 38.2-1.fc37 updates 141 k mock-filesystem noarch 3.5-1.fc37 updates 18 k python3-jinja2 noarch 3.0.3-5.fc37 fedora 630 k python3-pyroute2 noarch 0.6.12-3.fc37 fedora 987 k python3-templated-dictionary noarch 1.1-7.fc37 fedora 21 k 弱い依存関係のインストール: dnf-utils noarch 4.3.1-1.fc37 fedora 37 k トランザクションの概要 ============================================================================================================= インストール 7 パッケージ ダウンロードサイズの合計: 2.1 M インストール後のサイズ: 8.2 M これでよろしいですか? [y/N]: y パッケージのダウンロード: (1/7): dnf-utils-4.3.1-1.fc37.noarch.rpm 99 kB/s | 37 kB 00:00 (2/7): python3-templated-dictionary-1.1-7.fc37.noarch.rpm 47 kB/s | 21 kB 00:00 (3/7): python3-jinja2-3.0.3-5.fc37.noarch.rpm 411 kB/s | 630 kB 00:01 (4/7): python3-pyroute2-0.6.12-3.fc37.noarch.rpm 471 kB/s | 987 kB 00:02 (5/7): mock-3.5-1.fc37.noarch.rpm 165 kB/s | 269 kB 00:01 (6/7): mock-core-configs-38.2-1.fc37.noarch.rpm 149 kB/s | 141 kB 00:00 (7/7): mock-filesystem-3.5-1.fc37.noarch.rpm 45 kB/s | 18 kB 00:00 ------------------------------------------------------------------------------------------------------------- 合計 448 kB/s | 2.1 MB 00:04 トランザクションの確認を実行中 トランザクションの確認に成功しました。 トランザクションのテストを実行中 トランザクションのテストに成功しました。 トランザクションを実行中 準備 : 1/1 scriptletの実行中: mock-filesystem-3.5-1.fc37.noarch 1/7 インストール中 : mock-filesystem-3.5-1.fc37.noarch 1/7 インストール中 : python3-jinja2-3.0.3-5.fc37.noarch 2/7 インストール中 : python3-templated-dictionary-1.1-7.fc37.noarch 3/7 インストール中 : python3-pyroute2-0.6.12-3.fc37.noarch 4/7 インストール中 : dnf-utils-4.3.1-1.fc37.noarch 5/7 インストール中 : mock-core-configs-38.2-1.fc37.noarch 6/7 scriptletの実行中: mock-core-configs-38.2-1.fc37.noarch 6/7 インストール中 : mock-3.5-1.fc37.noarch 7/7 scriptletの実行中: mock-3.5-1.fc37.noarch 7/7 検証 : dnf-utils-4.3.1-1.fc37.noarch 1/7 検証 : python3-jinja2-3.0.3-5.fc37.noarch 2/7 検証 : python3-pyroute2-0.6.12-3.fc37.noarch 3/7 検証 : python3-templated-dictionary-1.1-7.fc37.noarch 4/7 検証 : mock-3.5-1.fc37.noarch 5/7 検証 : mock-core-configs-38.2-1.fc37.noarch 6/7 検証 : mock-filesystem-3.5-1.fc37.noarch 7/7 インストール済み: dnf-utils-4.3.1-1.fc37.noarch mock-3.5-1.fc37.noarch mock-core-configs-38.2-1.fc37.noarch mock-filesystem-3.5-1.fc37.noarch python3-jinja2-3.0.3-5.fc37.noarch python3-pyroute2-0.6.12-3.fc37.noarch python3-templated-dictionary-1.1-7.fc37.noarch 完了しました!
セットアップ
mock を利用するユーザーを mock グループに所属させる。
$ sudo usermod -a -G mock [User name]
インストール済みコンフィギュレーションの一覧
$ ls /etc/mock
alma+epel-8-aarch64.cfg eurolinux-8-x86_64.cfg openmandriva-cooker-armv7hnl.cfg alma+epel-8-ppc64le.cfg eurolinux-9-aarch64.cfg openmandriva-cooker-i686.cfg alma+epel-8-x86_64.cfg eurolinux-9-i686.cfg openmandriva-cooker-x86_64.cfg alma+epel-9-aarch64.cfg eurolinux-9-x86_64.cfg openmandriva-rolling-aarch64.cfg alma+epel-9-ppc64le.cfg fedora-35-aarch64.cfg openmandriva-rolling-armv7hnl.cfg alma+epel-9-s390x.cfg fedora-35-armhfp.cfg openmandriva-rolling-i686.cfg alma+epel-9-x86_64.cfg fedora-35-i386.cfg openmandriva-rolling-x86_64.cfg almalinux-8-aarch64.cfg fedora-35-ppc64le.cfg opensuse-leap-15.3-aarch64.cfg almalinux-8-ppc64le.cfg fedora-35-s390x.cfg opensuse-leap-15.3-ppc64le.cfg almalinux-8-x86_64.cfg fedora-35-x86_64.cfg opensuse-leap-15.3-s390x.cfg almalinux-9-aarch64.cfg fedora-36-aarch64.cfg opensuse-leap-15.3-x86_64.cfg almalinux-9-ppc64le.cfg fedora-36-armhfp.cfg opensuse-leap-15.4-aarch64.cfg almalinux-9-s390x.cfg fedora-36-i386.cfg opensuse-leap-15.4-ppc64le.cfg almalinux-9-x86_64.cfg fedora-36-ppc64le.cfg opensuse-leap-15.4-s390x.cfg amazonlinux-2-aarch64.cfg fedora-36-s390x.cfg opensuse-leap-15.4-x86_64.cfg amazonlinux-2-x86_64.cfg fedora-36-x86_64.cfg opensuse-tumbleweed-aarch64.cfg anolis-7-aarch64.cfg fedora-37-aarch64.cfg opensuse-tumbleweed-i586.cfg anolis-7-x86_64.cfg fedora-37-i386.cfg opensuse-tumbleweed-ppc64.cfg anolis-8-aarch64.cfg fedora-37-ppc64le.cfg opensuse-tumbleweed-ppc64le.cfg anolis-8-x86_64.cfg fedora-37-s390x.cfg opensuse-tumbleweed-s390x.cfg centos+epel-7-ppc64le.cfg fedora-37-x86_64.cfg opensuse-tumbleweed-x86_64.cfg centos+epel-7-x86_64.cfg fedora-38-aarch64.cfg oraclelinux+epel-7-aarch64.cfg centos-7-aarch64.cfg fedora-38-i386.cfg oraclelinux+epel-7-x86_64.cfg centos-7-ppc64.cfg fedora-38-ppc64le.cfg oraclelinux+epel-8-aarch64.cfg centos-7-ppc64le.cfg fedora-38-s390x.cfg oraclelinux+epel-8-x86_64.cfg centos-7-x86_64.cfg fedora-38-x86_64.cfg oraclelinux+epel-9-aarch64.cfg centos-stream+epel-8-aarch64.cfg fedora-39-aarch64.cfg oraclelinux+epel-9-x86_64.cfg centos-stream+epel-8-ppc64le.cfg fedora-39-i386.cfg oraclelinux-7-aarch64.cfg centos-stream+epel-8-x86_64.cfg fedora-39-ppc64le.cfg oraclelinux-7-x86_64.cfg centos-stream+epel-9-aarch64.cfg fedora-39-s390x.cfg oraclelinux-8-aarch64.cfg centos-stream+epel-9-ppc64le.cfg fedora-39-x86_64.cfg oraclelinux-8-x86_64.cfg centos-stream+epel-9-s390x.cfg fedora-eln-aarch64.cfg oraclelinux-9-aarch64.cfg centos-stream+epel-9-x86_64.cfg fedora-eln-i386.cfg oraclelinux-9-x86_64.cfg centos-stream+epel-next-8-aarch64.cfg fedora-eln-ppc64le.cfg rhel+epel-8-aarch64.cfg centos-stream+epel-next-8-ppc64le.cfg fedora-eln-s390x.cfg rhel+epel-8-ppc64le.cfg centos-stream+epel-next-8-x86_64.cfg fedora-eln-x86_64.cfg rhel+epel-8-s390x.cfg centos-stream+epel-next-9-aarch64.cfg fedora-rawhide-aarch64.cfg rhel+epel-8-x86_64.cfg centos-stream+epel-next-9-ppc64le.cfg fedora-rawhide-i386.cfg rhel+epel-9-aarch64.cfg centos-stream+epel-next-9-s390x.cfg fedora-rawhide-ppc64le.cfg rhel+epel-9-ppc64le.cfg centos-stream+epel-next-9-x86_64.cfg fedora-rawhide-s390x.cfg rhel+epel-9-s390x.cfg centos-stream-8-aarch64.cfg fedora-rawhide-x86_64.cfg rhel+epel-9-x86_64.cfg centos-stream-8-ppc64le.cfg logging.ini rhel-7-aarch64.cfg centos-stream-8-x86_64.cfg mageia-7-aarch64.cfg rhel-7-ppc64.cfg centos-stream-9-aarch64.cfg mageia-7-armv7hl.cfg rhel-7-ppc64le.cfg centos-stream-9-ppc64le.cfg mageia-7-i586.cfg rhel-7-s390x.cfg centos-stream-9-s390x.cfg mageia-7-x86_64.cfg rhel-7-x86_64.cfg centos-stream-9-x86_64.cfg mageia-8-aarch64.cfg rhel-8-aarch64.cfg chroot-aliases.cfg mageia-8-armv7hl.cfg rhel-8-ppc64le.cfg circlelinux+epel-8-aarch64.cfg mageia-8-i586.cfg rhel-8-s390x.cfg circlelinux+epel-8-ppc64le.cfg mageia-8-x86_64.cfg rhel-8-x86_64.cfg circlelinux+epel-8-x86_64.cfg mageia-9-aarch64.cfg rhel-9-aarch64.cfg circlelinux-8-aarch64.cfg mageia-9-armv7hl.cfg rhel-9-ppc64le.cfg circlelinux-8-ppc64le.cfg mageia-9-i586.cfg rhel-9-s390x.cfg circlelinux-8-x86_64.cfg mageia-9-x86_64.cfg rhel-9-x86_64.cfg custom-1-aarch64.cfg mageia-cauldron-aarch64.cfg rocky+epel-8-aarch64.cfg custom-1-armhfp.cfg mageia-cauldron-armv7hl.cfg rocky+epel-8-x86_64.cfg custom-1-i386.cfg mageia-cauldron-i586.cfg rocky+epel-9-aarch64.cfg custom-1-ppc64.cfg mageia-cauldron-x86_64.cfg rocky+epel-9-ppc64le.cfg custom-1-ppc64le.cfg navy-8-x86_64.cfg rocky+epel-9-s390x.cfg custom-1-s390.cfg openeuler-20.03-aarch64.cfg rocky+epel-9-x86_64.cfg custom-1-s390x.cfg openeuler-20.03-x86_64.cfg rocky-8-aarch64.cfg custom-1-x86_64.cfg openeuler-22.03-aarch64.cfg rocky-8-x86_64.cfg default.cfg openeuler-22.03-x86_64.cfg rocky-9-aarch64.cfg eol openmandriva-4.1-aarch64.cfg rocky-9-ppc64le.cfg epel-7-ppc64le.cfg openmandriva-4.1-armv7hnl.cfg rocky-9-s390x.cfg epel-7-x86_64.cfg openmandriva-4.1-i686.cfg rocky-9-x86_64.cfg eurolinux-8-aarch64.cfg openmandriva-4.1-x86_64.cfg site-defaults.cfg eurolinux-8-i686.cfg openmandriva-cooker-aarch64.cfg templates
chroot サンドボックス ツールとしての Mock
Using mock as a chroot sandbox tool - Using Mock to test package builds - Fedora Project Wiki
$ mock -r <config-name> --init $ mock -r <config-name> --install <your packages> $ mock -r <config-name> --shell
Mock ビルドの実行
$ dnf download --source python3 $ mock --rebuild python3-3.7.4-1.fc30.src.rpm