RHEL9のAMIで起動したEC2インスタンスにAmazon Elastic File System (EFS) をマウントしようと考えています。
EFSはAWSが提供するスケーラブルで高可用性を持つストレージサービスで、ファイル共有やデータの持続的保存が可能です。そのため、AWSはEFSをマウントする際に、Amazon EFSクライアント (amazon-efs-utils) の使用を推奨しています。このツールを使用することで、暗号化通信や接続の再試行といった便利な機能が利用できるからです。
しかしながら、RHEL9ではデフォルトのリポジトリに amazon-efs-utils が含まれておらず、通常のインストール手順が通用しません。
このため、ソースコードを手動でビルドし、必要な依存関係を解決しながらインストールする必要があります。今回の記事では、RHEL9環境で amazon-efs-utils をビルドしてインストールする手順を紹介します。
EFSクライアントをインストールしてみた。
■前提
今回の手順の前提は以下の通りです。
- EC2インスタンスが起動していること
Red Hat Enterprise Linux version 9 (HVM), EBS General Purpose (SSD) Volume Type
■利用コマンド
今回の手順では、以下のコマンドを使用します。
cat /etc/os-release
sudo dnf -y install git rpm-build make rust cargo openssl-devel
git clone https://github.com/aws/efs-utils
cd efs-utils
make rpm
ls build/amazon-efs-utils*rpm
sudo dnf install -y build/amazon-efs-utils*rpm
■1. バージョン確認
まずはRHELのバージョン確認をしましょう。
cat /etc/os-release
【実行結果】
[ec2-user@ip-10-0-1-177 ~]$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="9.4 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.4 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
RHEL9.4ですね。
■2. 必要なパッケージのインストール
amazon-efs-utils パッケージをインストールするには、Amazon Linux 1、Amazon Linux 2、Amazon Linux 2023以外のディストリビューションの場合、RPM をビルドしてからインストールする必要があります。
ビルドするために必要なパッケージをインストールしていきましょう。
sudo dnf -y install git rpm-build make rust cargo openssl-devel
インストールするパッケージは以下の通りです。
git
(ソース取得)rpm-build
(RPMパッケージ作成)make
(ビルド)rust
とcargo
(依存ライブラリ)openssl-devel
(暗号化サポート)
【実行結果】
[ec2-user@ip-10-0-1-177 ~]$ sudo dnf -y install git rpm-build make rust cargo openssl-devel
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.
Last metadata expiration check: 0:06:15 ago on Wed 25 Dec 2024 05:28:52 AM UTC.
Package git-2.43.5-2.el9_5.x86_64 is already installed.
Dependencies resolved.
=====================================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================================
Installing:
cargo x86_64 1.79.0-2.el9 rhel-9-appstream-rhui-rpms 7.3 M
make x86_64 1:4.3-8.el9 rhel-9-baseos-rhui-rpms 541 k
openssl-devel x86_64 1:3.2.2-6.el9_5 rhel-9-appstream-rhui-rpms 4.4 M
rpm-build x86_64 4.16.1.3-34.el9 rhel-9-appstream-rhui-rpms 71 k
rust x86_64 1.79.0-2.el9 rhel-9-appstream-rhui-rpms 25 M
Upgrading:
ima-evm-utils x86_64 1.5-2.el9 rhel-9-baseos-rhui-rpms 73 k
openssl x86_64 1:3.2.2-6.el9_5 rhel-9-baseos-rhui-rpms 1.4 M
openssl-libs x86_64 1:3.2.2-6.el9_5 rhel-9-baseos-rhui-rpms 2.1 M
python3-rpm x86_64 4.16.1.3-34.el9 rhel-9-baseos-rhui-rpms 68 k
rpm x86_64 4.16.1.3-34.el9 rhel-9-baseos-rhui-rpms 541 k
rpm-build-libs x86_64 4.16.1.3-34.el9 rhel-9-baseos-rhui-rpms 90 k
rpm-libs x86_64 4.16.1.3-34.el9 rhel-9-baseos-rhui-rpms 311 k
rpm-plugin-audit x86_64 4.16.1.3-34.el9 rhel-9-baseos-rhui-rpms 17 k
rpm-plugin-selinux x86_64 4.16.1.3-34.el9 rhel-9-baseos-rhui-rpms 18 k
rpm-plugin-systemd-inhibit x86_64 4.16.1.3-34.el9 rhel-9-appstream-rhui-rpms 18 k
rpm-sign-libs x86_64 4.16.1.3-34.el9 rhel-9-baseos-rhui-rpms 22 k
Installing dependencies:
annobin x86_64 12.65-1.el9 rhel-9-appstream-rhui-rpms 1.0 M
attr x86_64 2.5.1-3.el9 rhel-9-baseos-rhui-rpms 65 k
bzip2 x86_64 1.0.8-8.el9 rhel-9-baseos-rhui-rpms 60 k
cpp x86_64 11.4.1-3.el9 rhel-9-appstream-rhui-rpms 11 M
debugedit x86_64 5.0-5.el9 rhel-9-appstream-rhui-rpms 81 k
dwz x86_64 0.14-3.el9 rhel-9-appstream-rhui-rpms 130 k
ed x86_64 1.14.2-12.el9 rhel-9-baseos-rhui-rpms 78 k
efi-srpm-macros noarch 6-2.el9_0 rhel-9-appstream-rhui-rpms 24 k
elfutils x86_64 0.190-2.el9 rhel-9-baseos-rhui-rpms 559 k
fonts-srpm-macros noarch 1:2.0.5-7.el9.1 rhel-9-appstream-rhui-rpms 29 k
gcc x86_64 11.4.1-3.el9 rhel-9-appstream-rhui-rpms 32 M
gcc-plugin-annobin x86_64 11.4.1-3.el9 rhel-9-appstream-rhui-rpms 49 k
gdb-minimal x86_64 14.2-3.el9 rhel-9-appstream-rhui-rpms 4.2 M
ghc-srpm-macros noarch 1.5.0-6.el9 rhel-9-appstream-rhui-rpms 9.0 k
glibc-devel x86_64 2.34-100.el9_4.2 rhel-9-appstream-rhui-rpms 42 k
glibc-headers x86_64 2.34-100.el9_4.2 rhel-9-appstream-rhui-rpms 548 k
go-srpm-macros noarch 3.6.0-3.el9 rhel-9-appstream-rhui-rpms 28 k
info x86_64 6.7-15.el9 rhel-9-baseos-rhui-rpms 228 k
kernel-headers x86_64 5.14.0-503.19.1.el9_5 rhel-9-appstream-rhui-rpms 3.7 M
kernel-srpm-macros noarch 1.0-13.el9 rhel-9-appstream-rhui-rpms 17 k
keyutils x86_64 1.6.3-1.el9 rhel-9-baseos-rhui-rpms 78 k
libmpc x86_64 1.2.1-4.el9 rhel-9-appstream-rhui-rpms 65 k
libpkgconf x86_64 1.7.3-10.el9 rhel-9-baseos-rhui-rpms 37 k
libxcrypt-devel x86_64 4.4.18-3.el9 rhel-9-appstream-rhui-rpms 32 k
llvm-libs x86_64 18.1.8-3.el9 rhel-9-appstream-rhui-rpms 26 M
lua-srpm-macros noarch 1-6.el9 rhel-9-appstream-rhui-rpms 10 k
ocaml-srpm-macros noarch 6-6.el9 rhel-9-appstream-rhui-rpms 9.1 k
openblas-srpm-macros noarch 2-11.el9 rhel-9-appstream-rhui-rpms 8.6 k
patch x86_64 2.7.6-16.el9 rhel-9-appstream-rhui-rpms 130 k
perl-srpm-macros noarch 1-41.el9 rhel-9-appstream-rhui-rpms 9.4 k
pkgconf x86_64 1.7.3-10.el9 rhel-9-baseos-rhui-rpms 45 k
pkgconf-m4 noarch 1.7.3-10.el9 rhel-9-baseos-rhui-rpms 16 k
pkgconf-pkg-config x86_64 1.7.3-10.el9 rhel-9-baseos-rhui-rpms 12 k
pyproject-srpm-macros noarch 1.12.0-1.el9 rhel-9-appstream-rhui-rpms 14 k
python-srpm-macros noarch 3.9-54.el9 rhel-9-appstream-rhui-rpms 18 k
qt5-srpm-macros noarch 5.15.9-1.el9 rhel-9-appstream-rhui-rpms 9.1 k
redhat-rpm-config noarch 208-1.el9 rhel-9-appstream-rhui-rpms 75 k
rust-srpm-macros noarch 17-4.el9 rhel-9-appstream-rhui-rpms 11 k
rust-std-static x86_64 1.79.0-2.el9 rhel-9-appstream-rhui-rpms 34 M
unzip x86_64 6.0-57.el9 rhel-9-baseos-rhui-rpms 186 k
zip x86_64 3.0-35.el9 rhel-9-baseos-rhui-rpms 270 k
zstd x86_64 1.5.1-2.el9 rhel-9-baseos-rhui-rpms 552 k
Transaction Summary
=====================================================================================================================================
Install 47 Packages
Upgrade 11 Packages
Total download size: 157 M
Downloading Packages:
(1/58): rust-srpm-macros-17-4.el9.noarch.rpm 292 kB/s | 11 kB 00:00
(2/58): lua-srpm-macros-1-6.el9.noarch.rpm 256 kB/s | 10 kB 00:00
(3/58): ghc-srpm-macros-1.5.0-6.el9.noarch.rpm 213 kB/s | 9.0 kB 00:00
(4/58): libxcrypt-devel-4.4.18-3.el9.x86_64.rpm 3.6 MB/s | 32 kB 00:00
(5/58): dwz-0.14-3.el9.x86_64.rpm 6.9 MB/s | 130 kB 00:00
(6/58): libmpc-1.2.1-4.el9.x86_64.rpm 3.3 MB/s | 65 kB 00:00
(7/58): perl-srpm-macros-1-41.el9.noarch.rpm 909 kB/s | 9.4 kB 00:00
(8/58): efi-srpm-macros-6-2.el9_0.noarch.rpm 2.4 MB/s | 24 kB 00:00
(9/58): openblas-srpm-macros-2-11.el9.noarch.rpm 791 kB/s | 8.6 kB 00:00
(10/58): fonts-srpm-macros-2.0.5-7.el9.1.noarch.rpm 2.6 MB/s | 29 kB 00:00
(11/58): ocaml-srpm-macros-6-6.el9.noarch.rpm 823 kB/s | 9.1 kB 00:00
(12/58): kernel-srpm-macros-1.0-13.el9.noarch.rpm 2.0 MB/s | 17 kB 00:00
(13/58): patch-2.7.6-16.el9.x86_64.rpm 8.5 MB/s | 130 kB 00:00
(14/58): qt5-srpm-macros-5.15.9-1.el9.noarch.rpm 884 kB/s | 9.1 kB 00:00
(15/58): gcc-plugin-annobin-11.4.1-3.el9.x86_64.rpm 831 kB/s | 49 kB 00:00
(16/58): debugedit-5.0-5.el9.x86_64.rpm 7.7 MB/s | 81 kB 00:00
(17/58): cpp-11.4.1-3.el9.x86_64.rpm 7.2 MB/s | 11 MB 00:01
(18/58): pyproject-srpm-macros-1.12.0-1.el9.noarch.rpm 9.7 kB/s | 14 kB 00:01
(19/58): glibc-devel-2.34-100.el9_4.2.x86_64.rpm 4.0 MB/s | 42 kB 00:00
(20/58): glibc-headers-2.34-100.el9_4.2.x86_64.rpm 26 MB/s | 548 kB 00:00
(21/58): cargo-1.79.0-2.el9.x86_64.rpm 6.7 MB/s | 7.3 MB 00:01
(22/58): go-srpm-macros-3.6.0-3.el9.noarch.rpm 26 kB/s | 28 kB 00:01
(23/58): python-srpm-macros-3.9-54.el9.noarch.rpm 1.5 MB/s | 18 kB 00:00
(24/58): redhat-rpm-config-208-1.el9.noarch.rpm 7.3 MB/s | 75 kB 00:00
(25/58): openssl-devel-3.2.2-6.el9_5.x86_64.rpm 83 MB/s | 4.4 MB 00:00
(26/58): gcc-11.4.1-3.el9.x86_64.rpm 7.8 MB/s | 32 MB 00:04
(27/58): gdb-minimal-14.2-3.el9.x86_64.rpm 6.3 MB/s | 4.2 MB 00:00
(28/58): llvm-libs-18.1.8-3.el9.x86_64.rpm 103 MB/s | 26 MB 00:00
(29/58): rpm-build-4.16.1.3-34.el9.x86_64.rpm 8.5 MB/s | 71 kB 00:00
(30/58): rust-std-static-1.79.0-2.el9.x86_64.rpm 6.8 MB/s | 34 MB 00:05
(31/58): annobin-12.65-1.el9.x86_64.rpm 212 kB/s | 1.0 MB 00:05
(32/58): attr-2.5.1-3.el9.x86_64.rpm 6.7 MB/s | 65 kB 00:00
(33/58): bzip2-1.0.8-8.el9.x86_64.rpm 7.0 MB/s | 60 kB 00:00
(34/58): kernel-headers-5.14.0-503.19.1.el9_5.x86_64.rpm 75 MB/s | 3.7 MB 00:00
(35/58): ed-1.14.2-12.el9.x86_64.rpm 3.7 MB/s | 78 kB 00:00
(36/58): info-6.7-15.el9.x86_64.rpm 19 MB/s | 228 kB 00:00
(37/58): zstd-1.5.1-2.el9.x86_64.rpm 32 MB/s | 552 kB 00:00
(38/58): keyutils-1.6.3-1.el9.x86_64.rpm 9.3 MB/s | 78 kB 00:00
(39/58): libpkgconf-1.7.3-10.el9.x86_64.rpm 4.1 MB/s | 37 kB 00:00
(40/58): pkgconf-1.7.3-10.el9.x86_64.rpm 4.4 MB/s | 45 kB 00:00
(41/58): pkgconf-m4-1.7.3-10.el9.noarch.rpm 1.2 MB/s | 16 kB 00:00
(42/58): pkgconf-pkg-config-1.7.3-10.el9.x86_64.rpm 922 kB/s | 12 kB 00:00
(43/58): zip-3.0-35.el9.x86_64.rpm 16 MB/s | 270 kB 00:00
(44/58): elfutils-0.190-2.el9.x86_64.rpm 4.1 MB/s | 559 kB 00:00
(45/58): make-4.3-8.el9.x86_64.rpm 3.9 MB/s | 541 kB 00:00
(46/58): unzip-6.0-57.el9.x86_64.rpm 11 MB/s | 186 kB 00:00
(47/58): rpm-plugin-systemd-inhibit-4.16.1.3-34.el9.x86_64.rpm 2.9 MB/s | 18 kB 00:00
(48/58): ima-evm-utils-1.5-2.el9.x86_64.rpm 9.0 MB/s | 73 kB 00:00
(49/58): openssl-3.2.2-6.el9_5.x86_64.rpm 72 MB/s | 1.4 MB 00:00
(50/58): python3-rpm-4.16.1.3-34.el9.x86_64.rpm 9.1 MB/s | 68 kB 00:00
(51/58): openssl-libs-3.2.2-6.el9_5.x86_64.rpm 59 MB/s | 2.1 MB 00:00
(52/58): rpm-4.16.1.3-34.el9.x86_64.rpm 27 MB/s | 541 kB 00:00
(53/58): rpm-build-libs-4.16.1.3-34.el9.x86_64.rpm 8.6 MB/s | 90 kB 00:00
(54/58): rpm-libs-4.16.1.3-34.el9.x86_64.rpm 28 MB/s | 311 kB 00:00
(55/58): rpm-plugin-audit-4.16.1.3-34.el9.x86_64.rpm 1.5 MB/s | 17 kB 00:00
(56/58): rpm-plugin-selinux-4.16.1.3-34.el9.x86_64.rpm 2.7 MB/s | 18 kB 00:00
(57/58): rpm-sign-libs-4.16.1.3-34.el9.x86_64.rpm 3.5 MB/s | 22 kB 00:00
(58/58): rust-1.79.0-2.el9.x86_64.rpm 7.2 MB/s | 25 MB 00:03
-------------------------------------------------------------------------------------------------------------------------------------
Total 18 MB/s | 157 MB 00:08
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : openssl-libs-1:3.2.2-6.el9_5.x86_64 1/69
Upgrading : rpm-4.16.1.3-34.el9.x86_64 2/69
Upgrading : rpm-libs-4.16.1.3-34.el9.x86_64 3/69
Upgrading : rpm-build-libs-4.16.1.3-34.el9.x86_64 4/69
Installing : unzip-6.0-57.el9.x86_64 5/69
Installing : elfutils-0.190-2.el9.x86_64 6/69
Installing : llvm-libs-18.1.8-3.el9.x86_64 7/69
Installing : gdb-minimal-14.2-3.el9.x86_64 8/69
Installing : libmpc-1.2.1-4.el9.x86_64 9/69
Installing : dwz-0.14-3.el9.x86_64 10/69
Installing : debugedit-5.0-5.el9.x86_64 11/69
Installing : cpp-11.4.1-3.el9.x86_64 12/69
Installing : zip-3.0-35.el9.x86_64 13/69
Installing : lua-srpm-macros-1-6.el9.noarch 14/69
Installing : efi-srpm-macros-6-2.el9_0.noarch 15/69
Installing : make-1:4.3-8.el9.x86_64 16/69
Installing : pkgconf-m4-1.7.3-10.el9.noarch 17/69
Installing : libpkgconf-1.7.3-10.el9.x86_64 18/69
Installing : pkgconf-1.7.3-10.el9.x86_64 19/69
Installing : pkgconf-pkg-config-1.7.3-10.el9.x86_64 20/69
Installing : keyutils-1.6.3-1.el9.x86_64 21/69
Installing : zstd-1.5.1-2.el9.x86_64 22/69
Installing : info-6.7-15.el9.x86_64 23/69
Installing : ed-1.14.2-12.el9.x86_64 24/69
Installing : patch-2.7.6-16.el9.x86_64 25/69
Installing : bzip2-1.0.8-8.el9.x86_64 26/69
Installing : attr-2.5.1-3.el9.x86_64 27/69
Upgrading : ima-evm-utils-1.5-2.el9.x86_64 28/69
Upgrading : rpm-sign-libs-4.16.1.3-34.el9.x86_64 29/69
Installing : kernel-headers-5.14.0-503.19.1.el9_5.x86_64 30/69
Installing : glibc-headers-2.34-100.el9_4.2.x86_64 31/69
Installing : glibc-devel-2.34-100.el9_4.2.x86_64 32/69
Installing : libxcrypt-devel-4.4.18-3.el9.x86_64 33/69
Installing : gcc-11.4.1-3.el9.x86_64 34/69
Installing : rust-std-static-1.79.0-2.el9.x86_64 35/69
Installing : rust-1.79.0-2.el9.x86_64 36/69
Installing : gcc-plugin-annobin-11.4.1-3.el9.x86_64 37/69
Installing : annobin-12.65-1.el9.x86_64 38/69
Installing : qt5-srpm-macros-5.15.9-1.el9.noarch 39/69
Installing : kernel-srpm-macros-1.0-13.el9.noarch 40/69
Installing : ocaml-srpm-macros-6-6.el9.noarch 41/69
Installing : openblas-srpm-macros-2-11.el9.noarch 42/69
Installing : perl-srpm-macros-1-41.el9.noarch 43/69
Installing : rust-srpm-macros-17-4.el9.noarch 44/69
Installing : ghc-srpm-macros-1.5.0-6.el9.noarch 45/69
Installing : fonts-srpm-macros-1:2.0.5-7.el9.1.noarch 46/69
Installing : go-srpm-macros-3.6.0-3.el9.noarch 47/69
Installing : python-srpm-macros-3.9-54.el9.noarch 48/69
Installing : pyproject-srpm-macros-1.12.0-1.el9.noarch 49/69
Installing : redhat-rpm-config-208-1.el9.noarch 50/69
Running scriptlet: redhat-rpm-config-208-1.el9.noarch 50/69
Installing : rpm-build-4.16.1.3-34.el9.x86_64 51/69
Installing : cargo-1.79.0-2.el9.x86_64 52/69
Upgrading : python3-rpm-4.16.1.3-34.el9.x86_64 53/69
Installing : openssl-devel-1:3.2.2-6.el9_5.x86_64 54/69
Upgrading : rpm-plugin-systemd-inhibit-4.16.1.3-34.el9.x86_64 55/69
Upgrading : rpm-plugin-audit-4.16.1.3-34.el9.x86_64 56/69
Upgrading : rpm-plugin-selinux-4.16.1.3-34.el9.x86_64 57/69
Upgrading : openssl-1:3.2.2-6.el9_5.x86_64 58/69
Cleanup : openssl-1:3.0.7-27.el9.x86_64 59/69
Cleanup : python3-rpm-4.16.1.3-29.el9.x86_64 60/69
Cleanup : rpm-sign-libs-4.16.1.3-29.el9.x86_64 61/69
Cleanup : rpm-build-libs-4.16.1.3-29.el9.x86_64 62/69
Cleanup : rpm-plugin-selinux-4.16.1.3-29.el9.x86_64 63/69
Cleanup : rpm-plugin-audit-4.16.1.3-29.el9.x86_64 64/69
Cleanup : rpm-plugin-systemd-inhibit-4.16.1.3-29.el9.x86_64 65/69
Cleanup : rpm-4.16.1.3-29.el9.x86_64 66/69
Cleanup : rpm-libs-4.16.1.3-29.el9.x86_64 67/69
Cleanup : ima-evm-utils-1.4-4.el9.x86_64 68/69
Cleanup : openssl-libs-1:3.0.7-27.el9.x86_64 69/69
Running scriptlet: rpm-4.16.1.3-34.el9.x86_64 69/69
Running scriptlet: openssl-libs-1:3.0.7-27.el9.x86_64 69/69
Verifying : ghc-srpm-macros-1.5.0-6.el9.noarch 1/69
Verifying : lua-srpm-macros-1-6.el9.noarch 2/69
Verifying : rust-srpm-macros-17-4.el9.noarch 3/69
Verifying : dwz-0.14-3.el9.x86_64 4/69
Verifying : libmpc-1.2.1-4.el9.x86_64 5/69
Verifying : libxcrypt-devel-4.4.18-3.el9.x86_64 6/69
Verifying : perl-srpm-macros-1-41.el9.noarch 7/69
Verifying : efi-srpm-macros-6-2.el9_0.noarch 8/69
Verifying : openblas-srpm-macros-2-11.el9.noarch 9/69
Verifying : fonts-srpm-macros-1:2.0.5-7.el9.1.noarch 10/69
Verifying : ocaml-srpm-macros-6-6.el9.noarch 11/69
Verifying : patch-2.7.6-16.el9.x86_64 12/69
Verifying : kernel-srpm-macros-1.0-13.el9.noarch 13/69
Verifying : qt5-srpm-macros-5.15.9-1.el9.noarch 14/69
Verifying : gcc-plugin-annobin-11.4.1-3.el9.x86_64 15/69
Verifying : cpp-11.4.1-3.el9.x86_64 16/69
Verifying : pyproject-srpm-macros-1.12.0-1.el9.noarch 17/69
Verifying : debugedit-5.0-5.el9.x86_64 18/69
Verifying : gcc-11.4.1-3.el9.x86_64 19/69
Verifying : glibc-devel-2.34-100.el9_4.2.x86_64 20/69
Verifying : glibc-headers-2.34-100.el9_4.2.x86_64 21/69
Verifying : cargo-1.79.0-2.el9.x86_64 22/69
Verifying : go-srpm-macros-3.6.0-3.el9.noarch 23/69
Verifying : openssl-devel-1:3.2.2-6.el9_5.x86_64 24/69
Verifying : python-srpm-macros-3.9-54.el9.noarch 25/69
Verifying : redhat-rpm-config-208-1.el9.noarch 26/69
Verifying : rust-std-static-1.79.0-2.el9.x86_64 27/69
Verifying : annobin-12.65-1.el9.x86_64 28/69
Verifying : gdb-minimal-14.2-3.el9.x86_64 29/69
Verifying : llvm-libs-18.1.8-3.el9.x86_64 30/69
Verifying : rpm-build-4.16.1.3-34.el9.x86_64 31/69
Verifying : rust-1.79.0-2.el9.x86_64 32/69
Verifying : kernel-headers-5.14.0-503.19.1.el9_5.x86_64 33/69
Verifying : attr-2.5.1-3.el9.x86_64 34/69
Verifying : bzip2-1.0.8-8.el9.x86_64 35/69
Verifying : ed-1.14.2-12.el9.x86_64 36/69
Verifying : info-6.7-15.el9.x86_64 37/69
Verifying : zstd-1.5.1-2.el9.x86_64 38/69
Verifying : keyutils-1.6.3-1.el9.x86_64 39/69
Verifying : libpkgconf-1.7.3-10.el9.x86_64 40/69
Verifying : pkgconf-1.7.3-10.el9.x86_64 41/69
Verifying : pkgconf-m4-1.7.3-10.el9.noarch 42/69
Verifying : pkgconf-pkg-config-1.7.3-10.el9.x86_64 43/69
Verifying : zip-3.0-35.el9.x86_64 44/69
Verifying : elfutils-0.190-2.el9.x86_64 45/69
Verifying : make-1:4.3-8.el9.x86_64 46/69
Verifying : unzip-6.0-57.el9.x86_64 47/69
Verifying : rpm-plugin-systemd-inhibit-4.16.1.3-34.el9.x86_64 48/69
Verifying : rpm-plugin-systemd-inhibit-4.16.1.3-29.el9.x86_64 49/69
Verifying : ima-evm-utils-1.5-2.el9.x86_64 50/69
Verifying : ima-evm-utils-1.4-4.el9.x86_64 51/69
Verifying : openssl-1:3.2.2-6.el9_5.x86_64 52/69
Verifying : openssl-1:3.0.7-27.el9.x86_64 53/69
Verifying : openssl-libs-1:3.2.2-6.el9_5.x86_64 54/69
Verifying : openssl-libs-1:3.0.7-27.el9.x86_64 55/69
Verifying : python3-rpm-4.16.1.3-34.el9.x86_64 56/69
Verifying : python3-rpm-4.16.1.3-29.el9.x86_64 57/69
Verifying : rpm-4.16.1.3-34.el9.x86_64 58/69
Verifying : rpm-4.16.1.3-29.el9.x86_64 59/69
Verifying : rpm-build-libs-4.16.1.3-34.el9.x86_64 60/69
Verifying : rpm-build-libs-4.16.1.3-29.el9.x86_64 61/69
Verifying : rpm-libs-4.16.1.3-34.el9.x86_64 62/69
Verifying : rpm-libs-4.16.1.3-29.el9.x86_64 63/69
Verifying : rpm-plugin-audit-4.16.1.3-34.el9.x86_64 64/69
Verifying : rpm-plugin-audit-4.16.1.3-29.el9.x86_64 65/69
Verifying : rpm-plugin-selinux-4.16.1.3-34.el9.x86_64 66/69
Verifying : rpm-plugin-selinux-4.16.1.3-29.el9.x86_64 67/69
Verifying : rpm-sign-libs-4.16.1.3-34.el9.x86_64 68/69
Verifying : rpm-sign-libs-4.16.1.3-29.el9.x86_64 69/69
Installed products updated.
Upgraded:
ima-evm-utils-1.5-2.el9.x86_64 openssl-1:3.2.2-6.el9_5.x86_64
openssl-libs-1:3.2.2-6.el9_5.x86_64 python3-rpm-4.16.1.3-34.el9.x86_64
rpm-4.16.1.3-34.el9.x86_64 rpm-build-libs-4.16.1.3-34.el9.x86_64
rpm-libs-4.16.1.3-34.el9.x86_64 rpm-plugin-audit-4.16.1.3-34.el9.x86_64
rpm-plugin-selinux-4.16.1.3-34.el9.x86_64 rpm-plugin-systemd-inhibit-4.16.1.3-34.el9.x86_64
rpm-sign-libs-4.16.1.3-34.el9.x86_64
Installed:
annobin-12.65-1.el9.x86_64 attr-2.5.1-3.el9.x86_64 bzip2-1.0.8-8.el9.x86_64
cargo-1.79.0-2.el9.x86_64 cpp-11.4.1-3.el9.x86_64 debugedit-5.0-5.el9.x86_64
dwz-0.14-3.el9.x86_64 ed-1.14.2-12.el9.x86_64 efi-srpm-macros-6-2.el9_0.noarch
elfutils-0.190-2.el9.x86_64 fonts-srpm-macros-1:2.0.5-7.el9.1.noarch gcc-11.4.1-3.el9.x86_64
gcc-plugin-annobin-11.4.1-3.el9.x86_64 gdb-minimal-14.2-3.el9.x86_64 ghc-srpm-macros-1.5.0-6.el9.noarch
glibc-devel-2.34-100.el9_4.2.x86_64 glibc-headers-2.34-100.el9_4.2.x86_64 go-srpm-macros-3.6.0-3.el9.noarch
info-6.7-15.el9.x86_64 kernel-headers-5.14.0-503.19.1.el9_5.x86_64 kernel-srpm-macros-1.0-13.el9.noarch
keyutils-1.6.3-1.el9.x86_64 libmpc-1.2.1-4.el9.x86_64 libpkgconf-1.7.3-10.el9.x86_64
libxcrypt-devel-4.4.18-3.el9.x86_64 llvm-libs-18.1.8-3.el9.x86_64 lua-srpm-macros-1-6.el9.noarch
make-1:4.3-8.el9.x86_64 ocaml-srpm-macros-6-6.el9.noarch openblas-srpm-macros-2-11.el9.noarch
openssl-devel-1:3.2.2-6.el9_5.x86_64 patch-2.7.6-16.el9.x86_64 perl-srpm-macros-1-41.el9.noarch
pkgconf-1.7.3-10.el9.x86_64 pkgconf-m4-1.7.3-10.el9.noarch pkgconf-pkg-config-1.7.3-10.el9.x86_64
pyproject-srpm-macros-1.12.0-1.el9.noarch python-srpm-macros-3.9-54.el9.noarch qt5-srpm-macros-5.15.9-1.el9.noarch
redhat-rpm-config-208-1.el9.noarch rpm-build-4.16.1.3-34.el9.x86_64 rust-1.79.0-2.el9.x86_64
rust-srpm-macros-17-4.el9.noarch rust-std-static-1.79.0-2.el9.x86_64 unzip-6.0-57.el9.x86_64
zip-3.0-35.el9.x86_64 zstd-1.5.1-2.el9.x86_64
Complete!
■3. amazon-efs-utils のソースコード取得
amazon-efs-utilsのソースコードは、githubのAWS公式リポジトリで公開されています。
公式リポジトリをクローンして作業ディレクトリを移動していきます。
git clone https://github.com/aws/efs-utils
cd efs-utils
【実行結果】
[ec2-user@ip-10-0-1-177 ~]$ git clone https://github.com/aws/efs-utils
Cloning into 'efs-utils'...
remote: Enumerating objects: 1833, done.
remote: Counting objects: 100% (380/380), done.
remote: Compressing objects: 100% (114/114), done.
remote: Total 1833 (delta 310), reused 268 (delta 264), pack-reused 1453 (from 2)
Receiving objects: 100% (1833/1833), 864.36 KiB | 1.83 MiB/s, done.
Resolving deltas: 100% (1167/1167), done.
[ec2-user@ip-10-0-1-177 ~]$ cd efs-utils
[ec2-user@ip-10-0-1-177 efs-utils]$
■4. RPMパッケージのビルド
作業ディレクトリを移動したら、make rpm
を実行して amazon-efs-utils
のRPMパッケージを作成します。
make rpm
【実行結果】
[ec2-user@ip-10-0-1-177 efs-utils]$ make rpm
rm -rf build/rpmbuild
rm -rf amazon-efs-utils
rm -f amazon-efs-utils.tar.gz
mkdir -p amazon-efs-utils
mkdir -p amazon-efs-utils/dist
cp -p dist/amazon-efs-mount-watchdog.conf amazon-efs-utils/dist
cp -p dist/amazon-efs-mount-watchdog.service amazon-efs-utils/dist
cp -p dist/efs-utils.conf amazon-efs-utils/dist
cp -p dist/efs-utils.crt amazon-efs-utils/dist
mkdir -p amazon-efs-utils/src
cp -rp src/mount_efs amazon-efs-utils/src
cp -rp src/watchdog amazon-efs-utils/src
cp -rp src/proxy amazon-efs-utils/src
mkdir -p amazon-efs-utils/man
cp -rp man/mount.efs.8 amazon-efs-utils/man
tar -czf amazon-efs-utils.tar.gz amazon-efs-utils/*
mkdir -p build/rpmbuild/{SPECS,COORD_SOURCES,DATA_SOURCES,BUILD,RPMS,SOURCES,SRPMS}
cp amazon-efs-utils.spec build/rpmbuild/SPECS
cp amazon-efs-utils.tar.gz build/rpmbuild/SOURCES
cp config.toml build/rpmbuild/SOURCES
rpmbuild -ba --define "_topdir `pwd`/build/rpmbuild" --define "include_vendor_tarball false" build/rpmbuild/SPECS/amazon-efs-utils.spec --with system_rust
setting SOURCE_DATE_EPOCH=1731456000
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.qLXBBc
+ umask 022
+ cd /home/ec2-user/efs-utils/build/rpmbuild/BUILD
+ command -v cargo
+ command -v rustc
+ cd /home/ec2-user/efs-utils/build/rpmbuild/BUILD
+ rm -rf amazon-efs-utils
+ /usr/bin/gzip -dc /home/ec2-user/efs-utils/build/rpmbuild/SOURCES/amazon-efs-utils.tar.gz
+ /usr/bin/tar -xvvof -
drwxr-xr-x ec2-user/ec2-user 0 2024-12-25 05:37 amazon-efs-utils/dist/
drwxr-xr-x Creating directory: amazon-efs-utils
-rw-r--r-- ec2-user/ec2-user 571 2024-12-25 05:36 amazon-efs-utils/dist/amazon-efs-mount-watchdog.conf
-rw-r--r-- ec2-user/ec2-user 481 2024-12-25 05:36 amazon-efs-utils/dist/amazon-efs-mount-watchdog.service
-rw-r--r-- ec2-user/ec2-user 3958 2024-12-25 05:36 amazon-efs-utils/dist/efs-utils.conf
-rw-r--r-- ec2-user/ec2-user 4466 2024-12-25 05:36 amazon-efs-utils/dist/efs-utils.crt
drwxr-xr-x ec2-user/ec2-user 0 2024-12-25 05:37 amazon-efs-utils/man/
-rw-r--r-- ec2-user/ec2-user 11199 2024-12-25 05:36 amazon-efs-utils/man/mount.efs.8
drwxr-xr-x ec2-user/ec2-user 0 2024-12-25 05:37 amazon-efs-utils/src/
drwxr-xr-x ec2-user/ec2-user 0 2024-12-25 05:36 amazon-efs-utils/src/mount_efs/
-rwxr-xr-x ec2-user/ec2-user 143603 2024-12-25 05:36 amazon-efs-utils/src/mount_efs/__init__.py
drwxr-xr-x ec2-user/ec2-user 0 2024-12-25 05:36 amazon-efs-utils/src/watchdog/
-rwxr-xr-x ec2-user/ec2-user 80588 2024-12-25 05:36 amazon-efs-utils/src/watchdog/__init__.py
drwxr-xr-x ec2-user/ec2-user 0 2024-12-25 05:36 amazon-efs-utils/src/proxy/
-rw-r--r-- ec2-user/ec2-user 1041 2024-12-25 05:36 amazon-efs-utils/src/proxy/Cargo.toml
-rw-r--r-- ec2-user/ec2-user 110 2024-12-25 05:36 amazon-efs-utils/src/proxy/build.rs
drwxr-xr-x ec2-user/ec2-user 0 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/
-rw-r--r-- ec2-user/ec2-user 7196 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/config_parser.rs
-rw-r--r-- ec2-user/ec2-user 27819 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/connections.rs
-rw-r--r-- ec2-user/ec2-user 61327 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/controller.rs
-rw-r--r-- ec2-user/ec2-user 1145 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/efs_prot.x
-rw-r--r-- ec2-user/ec2-user 11557 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/efs_rpc.rs
-rw-r--r-- ec2-user/ec2-user 1277 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/error.rs
-rw-r--r-- ec2-user/ec2-user 184 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/lib.rs
-rw-r--r-- ec2-user/ec2-user 2200 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/logger.rs
-rw-r--r-- ec2-user/ec2-user 5655 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/main.rs
-rw-r--r-- ec2-user/ec2-user 17069 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/proxy.rs
-rw-r--r-- ec2-user/ec2-user 1348 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/proxy_identifier.rs
-rw-r--r-- ec2-user/ec2-user 8317 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/rpc.rs
-rw-r--r-- ec2-user/ec2-user 2114 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/shutdown.rs
-rw-r--r-- ec2-user/ec2-user 3263 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/status_reporter.rs
-rw-r--r-- ec2-user/ec2-user 8227 2024-12-25 05:36 amazon-efs-utils/src/proxy/src/tls.rs
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd amazon-efs-utils
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ mkdir -p /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/src/proxy/.cargo
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.voCnD4
+ umask 022
+ cd /home/ec2-user/efs-utils/build/rpmbuild/BUILD
+ cd amazon-efs-utils
+ cd /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/src/proxy
+ cargo build --release --manifest-path /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/src/proxy/Cargo.toml
Updating crates.io index
Locking 191 packages to latest compatible versions
Adding aho-corasick v0.6.10 (latest: v1.1.3)
Adding arc-swap v0.4.8 (latest: v1.7.1)
Adding bitflags v0.9.1 (latest: v2.6.0)
Adding bitflags v1.3.2 (latest: v2.6.0)
Adding clap v2.34.0 (latest: v4.5.23)
Adding clap v4.0.0 (latest: v4.5.23)
Adding clap_derive v4.0.0 (latest: v4.5.18)
Adding clap_lex v0.3.3 (latest: v0.7.4)
Adding env_logger v0.4.3 (latest: v0.11.6)
Adding error-chain v0.10.0 (latest: v0.12.4)
Adding fern v0.6.2 (latest: v0.7.1)
Adding hashbrown v0.12.3 (latest: v0.15.2)
Adding heck v0.4.1 (latest: v0.5.0)
Adding hermit-abi v0.1.19 (latest: v0.4.0)
Adding hermit-abi v0.3.9 (latest: v0.4.0)
Adding humantime v1.3.0 (latest: v2.1.0)
Adding indexmap v1.9.3 (latest: v2.7.0)
Adding lazy_static v0.2.11 (latest: v1.5.0)
Adding linux-raw-sys v0.4.14 (latest: v0.6.5)
Adding log v0.3.9 (latest: v0.4.22)
Adding log4rs v0.13.0 (latest: v1.3.0)
Adding memchr v1.0.2 (latest: v2.7.4)
Adding memoffset v0.7.1 (latest: v0.9.1)
Adding mio v0.8.11 (latest: v1.0.3)
Adding nix v0.26.4 (latest: v0.29.0)
Adding nom v3.2.1 (latest: v7.1.3)
Adding onc-rpc v0.2.5 (latest: v0.3.0)
Adding ordered-float v1.1.1 (latest: v4.6.0)
Adding os_str_bytes v6.6.1 (latest: v7.0.0)
Adding parking_lot v0.11.2 (latest: v0.12.3)
Adding parking_lot_core v0.8.6 (latest: v0.9.10)
Adding quick-error v1.2.3 (latest: v2.0.1)
Adding quote v0.3.15 (latest: v1.0.37)
Adding redox_syscall v0.1.57 (latest: v0.5.8)
Adding redox_syscall v0.2.16 (latest: v0.5.8)
Adding regex v0.2.11 (latest: v1.11.1)
Adding regex-syntax v0.5.6 (latest: v0.8.5)
Adding s2n-tls v0.0.41 (latest: v0.3.9)
Adding s2n-tls-sys v0.0.41 (latest: v0.3.9)
Adding s2n-tls-tokio v0.0.41 (latest: v0.3.9)
Adding serde-value v0.6.0 (latest: v0.7.0)
Adding serde_yaml v0.8.26 (latest: v0.9.34+deprecated)
Adding strsim v0.8.0 (latest: v0.11.1)
Adding strsim v0.10.0 (latest: v0.11.1)
Adding syn v1.0.109 (latest: v2.0.91)
Adding textwrap v0.11.0 (latest: v0.16.1)
Adding thiserror v1.0.69 (latest: v2.0.9)
Adding thiserror-impl v1.0.69 (latest: v2.0.9)
Adding thread-id v3.3.0 (latest: v5.0.0)
Adding thread_local v0.3.6 (latest: v1.1.8)
Adding tokio v1.38.1 (latest: v1.42.0)
Adding tokio-macros v2.3.0 (latest: v2.4.0)
Adding ucd-util v0.1.10 (latest: v0.2.2)
Adding unicode-width v0.1.14 (latest: v0.2.0)
Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.3+wasi-0.2.2)
Adding windows-core v0.52.0 (latest: v0.58.0)
Adding windows-sys v0.48.0 (latest: v0.59.0)
Adding windows-sys v0.52.0 (latest: v0.59.0)
Adding windows-targets v0.48.5 (latest: v0.52.6)
Adding windows_aarch64_gnullvm v0.48.5 (latest: v0.52.6)
Adding windows_aarch64_msvc v0.48.5 (latest: v0.52.6)
Adding windows_i686_gnu v0.48.5 (latest: v0.52.6)
Adding windows_i686_msvc v0.48.5 (latest: v0.52.6)
Adding windows_x86_64_gnu v0.48.5 (latest: v0.52.6)
Adding windows_x86_64_gnullvm v0.48.5 (latest: v0.52.6)
Adding windows_x86_64_msvc v0.48.5 (latest: v0.52.6)
Adding zerocopy v0.7.35 (latest: v0.8.14)
Adding zerocopy-derive v0.7.35 (latest: v0.8.14)
Downloaded atty v0.2.14
Downloaded adler2 v2.0.0
Downloaded async-trait v0.1.83
Downloaded ansi_term v0.12.1
Downloaded socket2 v0.5.8
Downloaded thread_local v0.3.6
Downloaded slab v0.4.9
Downloaded serde_derive v1.0.216
Downloaded typemap v0.3.3
Downloaded void v1.0.2
Downloaded traitobject v0.1.0
Downloaded log-mdc v0.1.0
Downloaded thread-id v3.3.0
Downloaded unsafe-any v0.4.2
Downloaded utf8-ranges v1.0.5
Downloaded thiserror-impl v1.0.69
Downloaded thiserror v1.0.69
Downloaded tokio-macros v2.3.0
Downloaded strsim v0.8.0
Downloaded xdr-codec v0.4.4
Downloaded version_check v0.9.5
Downloaded strsim v0.10.0
Downloaded uuid-macro-internal v1.11.0
Downloaded xdrgen v0.4.4
Downloaded vec_map v0.8.2
Downloaded textwrap v0.11.0
Downloaded termcolor v1.4.1
Downloaded signal-hook-registry v1.4.2
Downloaded zerocopy-derive v0.7.35
Downloaded smallvec v1.13.2
Downloaded uuid v1.11.0
Downloaded instant v0.1.13
Downloaded serde_yaml v0.8.26
Downloaded shlex v1.3.0
Downloaded futures-macro v0.3.31
Downloaded heck v0.4.1
Downloaded futures-core v0.3.31
Downloaded cfg-if v1.0.0
Downloaded futures-executor v0.3.31
Downloaded itoa v1.0.14
Downloaded anyhow v1.0.95
Downloaded addr2line v0.24.2
Downloaded yaml-rust v0.4.5
Downloaded unicode-ident v1.0.14
Downloaded lazy_static v1.5.0
Downloaded result v1.0.0
Downloaded futures-task v0.3.31
Downloaded tokio-util v0.7.13
Downloaded memchr v1.0.2
Downloaded log v0.3.9
Downloaded bitflags v0.9.1
Downloaded pin-utils v0.1.0
Downloaded serde_json v1.0.134
Downloaded futures-sink v0.3.31
Downloaded humantime v1.3.0
Downloaded scopeguard v1.2.0
Downloaded zerocopy v0.7.35
Downloaded rand_core v0.6.4
Downloaded quick-error v1.2.3
Downloaded serde_ini v0.2.0
Downloaded s2n-tls-tokio v0.0.41
Downloaded byteorder v1.5.0
Downloaded onc-rpc v0.2.5
Downloaded clap_lex v0.3.3
Downloaded quote v0.3.15
Downloaded vcpkg v0.2.15
Downloaded lazy_static v0.2.11
Downloaded env_logger v0.4.3
Downloaded futures-io v0.3.31
Downloaded syn v2.0.91
Downloaded autocfg v1.4.0
Downloaded unicode-width v0.1.14
Downloaded tokio v1.38.1
Downloaded pkg-config v0.3.31
Downloaded syn v1.0.109
Downloaded lock_api v0.4.12
Downloaded proc-macro-error-attr v1.0.4
Downloaded fnv v1.0.7
Downloaded hex v0.4.3
Downloaded crc32fast v1.4.2
Downloaded errno v0.3.10
Downloaded rand_chacha v0.3.1
Downloaded memoffset v0.7.1
Downloaded ppv-lite86 v0.2.20
Downloaded ordered-float v1.1.1
Downloaded arc-swap v0.4.8
Downloaded num_cpus v1.16.0
Downloaded jobserver v0.1.32
Downloaded getrandom v0.2.15
Downloaded bitflags v1.3.2
Downloaded proc-macro-error v1.0.4
Downloaded pin-project-lite v0.2.15
Downloaded once_cell v1.20.2
Downloaded parking_lot v0.11.2
Downloaded linked-hash-map v0.5.6
Downloaded serde-value v0.6.0
Downloaded quote v1.0.37
Downloaded rustc-demangle v0.1.24
Downloaded parking_lot_core v0.9.10
Downloaded os_str_bytes v6.6.1
Downloaded iana-time-zone v0.1.61
Downloaded log v0.4.22
Downloaded futures v0.3.31
Downloaded futures-channel v0.3.31
Downloaded parking_lot v0.12.3
Downloaded clap_derive v4.0.0
Downloaded ryu v1.0.18
Downloaded log4rs v0.13.0
Downloaded proc-macro2 v1.0.92
Downloaded s2n-tls v0.0.41
Downloaded parking_lot_core v0.8.6
Downloaded bytes v1.9.0
Downloaded indexmap v1.9.3
Downloaded miniz_oxide v0.8.2
Downloaded num-traits v0.2.19
Downloaded serde v1.0.216
Downloaded openssl-sys v0.9.104
Downloaded cc v1.2.5
Downloaded mio v0.8.11
Downloaded hashbrown v0.12.3
Downloaded backtrace v0.3.74
Downloaded flate2 v1.0.35
Downloaded rand v0.8.5
Downloaded nom v3.2.1
Downloaded memchr v2.7.4
Downloaded futures-util v0.3.31
Downloaded clap v2.34.0
Downloaded chrono v0.4.39
Downloaded fern v0.6.2
Downloaded gimli v0.31.1
Downloaded nix v0.26.4
Downloaded object v0.36.7
Downloaded libc v0.2.169
Downloaded error-chain v0.10.0
Downloaded regex v0.2.11
Downloaded ucd-util v0.1.10
Downloaded aho-corasick v0.6.10
Downloaded regex-syntax v0.5.6
Downloaded clap v4.0.0
Downloaded s2n-tls-sys v0.0.41
Downloaded 140 crates (9.4 MB) in 1.66s
Compiling proc-macro2 v1.0.92
Compiling unicode-ident v1.0.14
Compiling libc v0.2.169
Compiling autocfg v1.4.0
Compiling quote v1.0.37
Compiling syn v2.0.91
Compiling cfg-if v1.0.0
Compiling object v0.36.7
Compiling jobserver v0.1.32
Compiling memchr v2.7.4
Compiling shlex v1.3.0
Compiling cc v1.2.5
Compiling serde v1.0.216
Compiling smallvec v1.13.2
Compiling serde_derive v1.0.216
Compiling lock_api v0.4.12
Compiling version_check v0.9.5
Compiling pkg-config v0.3.31
Compiling vcpkg v0.2.15
Compiling openssl-sys v0.9.104
Compiling byteorder v1.5.0
Compiling adler2 v2.0.0
Compiling gimli v0.31.1
Compiling pin-project-lite v0.2.15
Compiling scopeguard v1.2.0
Compiling addr2line v0.24.2
Compiling miniz_oxide v0.8.2
Compiling num-traits v0.2.19
Compiling regex v0.2.11
Compiling ucd-util v0.1.10
Compiling lazy_static v1.5.0
Compiling rustc-demangle v0.1.24
Compiling parking_lot_core v0.9.10
Compiling backtrace v0.3.74
Compiling thread_local v0.3.6
Compiling regex-syntax v0.5.6
Compiling proc-macro-error-attr v1.0.4
Compiling s2n-tls-sys v0.0.41
Compiling zerocopy-derive v0.7.35
Compiling aho-corasick v0.6.10
Compiling slab v0.4.9
Compiling futures-sink v0.3.31
Compiling utf8-ranges v1.0.5
Compiling log v0.4.22
Compiling syn v1.0.109
Compiling unicode-width v0.1.14
Compiling futures-core v0.3.31
Compiling textwrap v0.11.0
Compiling log v0.3.9
Compiling zerocopy v0.7.35
Compiling error-chain v0.10.0
Compiling proc-macro-error v1.0.4
Compiling getrandom v0.2.15
Compiling memchr v1.0.2
Compiling atty v0.2.14
Compiling indexmap v1.9.3
Compiling bitflags v1.3.2
Compiling ansi_term v0.12.1
Compiling pin-utils v0.1.0
Compiling parking_lot_core v0.8.6
Compiling strsim v0.8.0
Compiling vec_map v0.8.2
Compiling bytes v1.9.0
Compiling clap v2.34.0
Compiling xdr-codec v0.4.4
Compiling nom v3.2.1
Compiling rand_core v0.6.4
Compiling parking_lot v0.12.3
Compiling env_logger v0.4.3
Compiling ppv-lite86 v0.2.20
Compiling futures-channel v0.3.31
Compiling tokio-macros v2.3.0
Compiling futures-macro v0.3.31
Compiling instant v0.1.13
Compiling mio v0.8.11
Compiling socket2 v0.5.8
Compiling num_cpus v1.16.0
Compiling signal-hook-registry v1.4.2
Compiling memoffset v0.7.1
Compiling lazy_static v0.2.11
Compiling bitflags v0.9.1
Compiling futures-io v0.3.31
Compiling serde_json v1.0.134
Compiling thiserror v1.0.69
Compiling hashbrown v0.12.3
Compiling futures-task v0.3.31
Compiling linked-hash-map v0.5.6
Compiling traitobject v0.1.0
Compiling ryu v1.0.18
Compiling quote v0.3.15
Compiling xdrgen v0.4.4
Compiling unsafe-any v0.4.2
Compiling yaml-rust v0.4.5
Compiling futures-util v0.3.31
Compiling tokio v1.38.1
Compiling rand_chacha v0.3.1
Compiling ordered-float v1.1.1
Compiling thiserror-impl v1.0.69
Compiling crc32fast v1.4.2
Compiling errno v0.3.10
Compiling quick-error v1.2.3
Compiling itoa v1.0.14
Compiling anyhow v1.0.95
Compiling hex v0.4.3
Compiling iana-time-zone v0.1.61
Compiling os_str_bytes v6.6.1
Compiling heck v0.4.1
Compiling clap_derive v4.0.0
Compiling clap_lex v0.3.3
Compiling chrono v0.4.39
Compiling s2n-tls v0.0.41
Compiling humantime v1.3.0
Compiling flate2 v1.0.35
Compiling serde-value v0.6.0
Compiling rand v0.8.5
Compiling parking_lot v0.11.2
Compiling serde_yaml v0.8.26
Compiling futures-executor v0.3.31
Compiling typemap v0.3.3
Compiling efs-proxy v2.1.0 (/home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/src/proxy)
Compiling uuid-macro-internal v1.11.0
Compiling thread-id v3.3.0
Compiling fnv v1.0.7
Compiling once_cell v1.20.2
Compiling arc-swap v0.4.8
Compiling strsim v0.10.0
Compiling void v1.0.2
Compiling result v1.0.0
Compiling log-mdc v0.1.0
Compiling termcolor v1.4.1
Compiling clap v4.0.0
Compiling log4rs v0.13.0
Compiling serde_ini v0.2.0
Compiling uuid v1.11.0
Compiling futures v0.3.31
Compiling nix v0.26.4
Compiling onc-rpc v0.2.5
Compiling s2n-tls-tokio v0.0.41
Compiling tokio-util v0.7.13
Compiling fern v0.6.2
Compiling async-trait v0.1.83
Finished `release` profile [optimized] target(s) in 3m 24s
warning: the following packages contain code that will be rejected by a future version of Rust: nom v3.2.1, traitobject v0.1.0
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.KoXPSY
+ umask 022
+ cd /home/ec2-user/efs-utils/build/rpmbuild/BUILD
+ '[' /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64 '!=' / ']'
+ rm -rf /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64
++ dirname /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64
+ mkdir -p /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT
+ mkdir /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64
+ cd amazon-efs-utils
+ mkdir -p /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/etc/amazon/efs
+ mkdir -p /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/usr/lib/systemd/system
+ install -p -m 644 /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/dist/amazon-efs-mount-watchdog.service /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/usr/lib/systemd/system
+ mkdir -p /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/sbin
+ mkdir -p /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/usr/bin
+ mkdir -p /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/var/log/amazon/efs
+ mkdir -p /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/usr/share/man/man8
+ install -p -m 644 /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/dist/efs-utils.conf /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/etc/amazon/efs
+ install -p -m 444 /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/dist/efs-utils.crt /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/etc/amazon/efs
+ install -p -m 755 /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/src/mount_efs/__init__.py /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/sbin/mount.efs
+ install -p -m 755 /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/src/watchdog/__init__.py /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/usr/bin/amazon-efs-mount-watchdog
+ install -p -m 644 /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/man/mount.efs.8 /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/usr/share/man/man8
+ install -p -m 755 /home/ec2-user/efs-utils/build/rpmbuild/BUILD/amazon-efs-utils/src/proxy/target/release/efs-proxy /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64/sbin/efs-proxy
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0
+ /usr/lib/rpm/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
mangling shebang in /usr/bin/amazon-efs-mount-watchdog from /usr/bin/env python3 to #!/usr/bin/python3
mangling shebang in /sbin/mount.efs from /usr/bin/env python3 to #!/usr/bin/python3
Processing files: amazon-efs-utils-2.2.0-1.el9.x86_64
Provides: amazon-efs-utils = 2.2.0-1.el9 amazon-efs-utils(x86-64) = 2.2.0-1.el9 config(amazon-efs-utils) = 2.2.0-1.el9
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh systemd
Requires(preun): /bin/sh systemd
Requires(postun): /bin/sh systemd
Requires: /usr/bin/python3 ld-linux-x86-64.so.2()(64bit) ld-linux-x86-64.so.2(GLIBC_2.3)(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.10)(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.16)(64bit) libc.so.6(GLIBC_2.17)(64bit) libc.so.6(GLIBC_2.18)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.25)(64bit) libc.so.6(GLIBC_2.27)(64bit) libc.so.6(GLIBC_2.28)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.2)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.32)(64bit) libc.so.6(GLIBC_2.33)(64bit) libc.so.6(GLIBC_2.34)(64bit) libc.so.6(GLIBC_2.7)(64bit) libc.so.6(GLIBC_2.9)(64bit) libcrypto.so.3()(64bit) libcrypto.so.3(OPENSSL_3.0.0)(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3)(64bit) libgcc_s.so.1(GCC_4.2.0)(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.29)(64bit) rtld(GNU_HASH)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/ec2-user/efs-utils/build/rpmbuild/BUILDROOT/amazon-efs-utils-2.2.0-1.el9.x86_64
Wrote: /home/ec2-user/efs-utils/build/rpmbuild/SRPMS/amazon-efs-utils-2.2.0-1.el9.src.rpm
Wrote: /home/ec2-user/efs-utils/build/rpmbuild/RPMS/x86_64/amazon-efs-utils-2.2.0-1.el9.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.da7WYV
+ umask 022
+ cd /home/ec2-user/efs-utils/build/rpmbuild/BUILD
+ cd amazon-efs-utils
+ RPM_EC=0
++ jobs -p
+ exit 0
cp build/rpmbuild/RPMS/*/*rpm build
ビルドが完了すると、RPMファイルが build/
ディレクトリに生成されます。
■5. パッケージの確認とインストール
ビルドされたRPMパッケージを確認し、インストールしましょう。
ls build/amazon-efs-utils*rpm
sudo dnf install -y build/amazon-efs-utils*rpm
【実行結果】
[ec2-user@ip-10-0-1-177 efs-utils]$ ls build/amazon-efs-utils*rpm
build/amazon-efs-utils-2.2.0-1.el9.x86_64.rpm
[ec2-user@ip-10-0-1-177 efs-utils]$ sudo dnf install -y build/amazon-efs-utils*rpm
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.
Last metadata expiration check: 0:14:27 ago on Wed 25 Dec 2024 05:28:52 AM UTC.
Dependencies resolved.
=====================================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================================
Installing:
amazon-efs-utils x86_64 2.2.0-1.el9 @commandline 1.3 M
Installing dependencies:
gssproxy x86_64 0.8.4-7.el9 rhel-9-baseos-rhui-rpms 114 k
libev x86_64 4.33-5.el9 rhel-9-baseos-rhui-rpms 56 k
libnfsidmap x86_64 1:2.5.4-27.el9 rhel-9-baseos-rhui-rpms 65 k
libtirpc x86_64 1.3.3-9.el9 rhel-9-baseos-rhui-rpms 97 k
libverto-libev x86_64 0.3.2-3.el9 rhel-9-baseos-rhui-rpms 15 k
nfs-utils x86_64 1:2.5.4-27.el9 rhel-9-baseos-rhui-rpms 463 k
quota x86_64 1:4.09-2.el9 rhel-9-baseos-rhui-rpms 202 k
quota-nls noarch 1:4.09-2.el9 rhel-9-baseos-rhui-rpms 79 k
rpcbind x86_64 1.2.6-7.el9 rhel-9-baseos-rhui-rpms 62 k
sssd-nfs-idmap x86_64 2.9.4-6.el9_4.1 rhel-9-baseos-rhui-rpms 44 k
stunnel x86_64 5.71-2.el9 rhel-9-baseos-rhui-rpms 173 k
Transaction Summary
=====================================================================================================================================
Install 12 Packages
Total size: 2.7 M
Total download size: 1.3 M
Installed size: 8.1 M
Downloading Packages:
(1/11): libev-4.33-5.el9.x86_64.rpm 1.3 MB/s | 56 kB 00:00
(2/11): libverto-libev-0.3.2-3.el9.x86_64.rpm 346 kB/s | 15 kB 00:00
(3/11): sssd-nfs-idmap-2.9.4-6.el9_4.1.x86_64.rpm 3.4 MB/s | 44 kB 00:00
(4/11): rpcbind-1.2.6-7.el9.x86_64.rpm 596 kB/s | 62 kB 00:00
(5/11): gssproxy-0.8.4-7.el9.x86_64.rpm 1.6 MB/s | 114 kB 00:00
(6/11): libnfsidmap-2.5.4-27.el9.x86_64.rpm 483 kB/s | 65 kB 00:00
(7/11): libtirpc-1.3.3-9.el9.x86_64.rpm 708 kB/s | 97 kB 00:00
(8/11): quota-4.09-2.el9.x86_64.rpm 1.3 MB/s | 202 kB 00:00
(9/11): nfs-utils-2.5.4-27.el9.x86_64.rpm 1.6 MB/s | 463 kB 00:00
(10/11): stunnel-5.71-2.el9.x86_64.rpm 1.4 MB/s | 173 kB 00:00
(11/11): quota-nls-4.09-2.el9.noarch.rpm 270 kB/s | 79 kB 00:00
-------------------------------------------------------------------------------------------------------------------------------------
Total 2.4 MB/s | 1.3 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : libtirpc-1.3.3-9.el9.x86_64 1/12
Installing : libnfsidmap-1:2.5.4-27.el9.x86_64 2/12
Running scriptlet: rpcbind-1.2.6-7.el9.x86_64 3/12
Installing : rpcbind-1.2.6-7.el9.x86_64 3/12
Running scriptlet: rpcbind-1.2.6-7.el9.x86_64 3/12
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service → /usr/lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket → /usr/lib/systemd/system/rpcbind.socket.
Installing : stunnel-5.71-2.el9.x86_64 4/12
Running scriptlet: stunnel-5.71-2.el9.x86_64 4/12
Installing : quota-nls-1:4.09-2.el9.noarch 5/12
Installing : quota-1:4.09-2.el9.x86_64 6/12
Installing : libev-4.33-5.el9.x86_64 7/12
Installing : libverto-libev-0.3.2-3.el9.x86_64 8/12
Installing : gssproxy-0.8.4-7.el9.x86_64 9/12
Running scriptlet: gssproxy-0.8.4-7.el9.x86_64 9/12
Running scriptlet: nfs-utils-1:2.5.4-27.el9.x86_64 10/12
Installing : nfs-utils-1:2.5.4-27.el9.x86_64 10/12
Running scriptlet: nfs-utils-1:2.5.4-27.el9.x86_64 10/12
Installing : amazon-efs-utils-2.2.0-1.el9.x86_64 11/12
Running scriptlet: amazon-efs-utils-2.2.0-1.el9.x86_64 11/12
Installing : sssd-nfs-idmap-2.9.4-6.el9_4.1.x86_64 12/12
Running scriptlet: sssd-nfs-idmap-2.9.4-6.el9_4.1.x86_64 12/12
Verifying : libev-4.33-5.el9.x86_64 1/12
Verifying : libverto-libev-0.3.2-3.el9.x86_64 2/12
Verifying : rpcbind-1.2.6-7.el9.x86_64 3/12
Verifying : sssd-nfs-idmap-2.9.4-6.el9_4.1.x86_64 4/12
Verifying : gssproxy-0.8.4-7.el9.x86_64 5/12
Verifying : libnfsidmap-1:2.5.4-27.el9.x86_64 6/12
Verifying : libtirpc-1.3.3-9.el9.x86_64 7/12
Verifying : nfs-utils-1:2.5.4-27.el9.x86_64 8/12
Verifying : quota-1:4.09-2.el9.x86_64 9/12
Verifying : quota-nls-1:4.09-2.el9.noarch 10/12
Verifying : stunnel-5.71-2.el9.x86_64 11/12
Verifying : amazon-efs-utils-2.2.0-1.el9.x86_64 12/12
Installed products updated.
Installed:
amazon-efs-utils-2.2.0-1.el9.x86_64 gssproxy-0.8.4-7.el9.x86_64 libev-4.33-5.el9.x86_64
libnfsidmap-1:2.5.4-27.el9.x86_64 libtirpc-1.3.3-9.el9.x86_64 libverto-libev-0.3.2-3.el9.x86_64
nfs-utils-1:2.5.4-27.el9.x86_64 quota-1:4.09-2.el9.x86_64 quota-nls-1:4.09-2.el9.noarch
rpcbind-1.2.6-7.el9.x86_64 sssd-nfs-idmap-2.9.4-6.el9_4.1.x86_64 stunnel-5.71-2.el9.x86_64
Complete!
■6. インストール確認
さいごにパッケージがインストールされたか確認します。
dnf list --installed | grep "amazon-efs-utils"
【実行結果】
[ec2-user@ip-10-0-1-177 efs-utils]$ dnf list --installed | grep "amazon-efs-utils"
amazon-efs-utils.x86_64 2.2.0-1.el9 @@commandline
EFSクライアント(amazon-efs-utils)のインストール手順は以上です。
まとめ
RHEL9にamazon-efs-utilsをインストールする方法を紹介しました。ソースコードからパッケージをビルドする必要があったので、手順をまとめてみました。
今回はインストールするだけで、実際にEFSとマウントはしておりません。次回の記事では、今回インストールしたamazon-efs-utilsを利用して、マウントをしてみようと思います。
参考リンク:AWS re:Post「Amazon EFS ファイルシステムのマウント、アンマウント、自動マウント、オンプレミスマウント方法を教えてください。」