From 26cfbfdd1fafa64146fb028ae5dee6781725fa0c Mon Sep 17 00:00:00 2001 From: Malte Poll Date: Fri, 21 Oct 2022 14:55:13 +0200 Subject: [PATCH] Add AWS nvme udev rules (#351) --- image/mkosi.conf.d/aws.conf | 3 ++ image/mkosi.reposdir/amzn2-core.repo | 39 +++++++++++++++++++ .../39constellation-mount/module-setup.sh | 13 +++++++ 3 files changed, 55 insertions(+) create mode 100644 image/mkosi.conf.d/aws.conf create mode 100644 image/mkosi.reposdir/amzn2-core.repo diff --git a/image/mkosi.conf.d/aws.conf b/image/mkosi.conf.d/aws.conf new file mode 100644 index 000000000..75846a74c --- /dev/null +++ b/image/mkosi.conf.d/aws.conf @@ -0,0 +1,3 @@ +[Content] +Packages= + ec2-utils diff --git a/image/mkosi.reposdir/amzn2-core.repo b/image/mkosi.reposdir/amzn2-core.repo new file mode 100644 index 000000000..32b6472b4 --- /dev/null +++ b/image/mkosi.reposdir/amzn2-core.repo @@ -0,0 +1,39 @@ +[amzn2-core] +name=Amazon Linux 2 core repository +#mirrorlist=$awsproto://$amazonlinux.$awsregion.$awsdomain/$releasever/$product/$target/$basearch/mirror.list +mirrorlist=https://amazonlinux-2-repos-us-east-2.s3.dualstack.us-east-2.amazonaws.com/2/core/latest/x86_64/mirror.list +priority=10 +gpgcheck=1 +#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2 +gpgkey=https://cdn.amazonlinux.com/_assets/11CF1F95C87F5B1A.asc +enabled=1 +metadata_expire=300 +mirrorlist_expire=300 +report_instanceid=yes +includepkgs=ec2-utils + +# [amzn2-core-source] +# name=Amazon Linux 2 core repository - source packages +# mirrorlist=$awsproto://$amazonlinux.$awsregion.$awsdomain/$releasever/$product/$target/SRPMS/mirror.list +# priority=10 +# gpgcheck=1 +# #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2 +# gpgkey=https://cdn.amazonlinux.com/_assets/11CF1F95C87F5B1A.asc +# enabled=0 +# metadata_expire=300 +# mirrorlist_expire=300 +# report_instanceid=yes +# includepkgs=ec2-utils + +# [amzn2-core-debuginfo] +# name=Amazon Linux 2 core repository - debuginfo packages +# mirrorlist=$awsproto://$amazonlinux.$awsregion.$awsdomain/$releasever/$product/$target/debuginfo/$basearch/mirror.list +# priority=10 +# gpgcheck=1 +# #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2 +# gpgkey=https://cdn.amazonlinux.com/_assets/11CF1F95C87F5B1A.asc +# enabled=0 +# metadata_expire=300 +# mirrorlist_expire=300 +# report_instanceid=yes +# includepkgs=ec2-utils diff --git a/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/module-setup.sh b/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/module-setup.sh index 4029c0152..c1abf9af1 100644 --- a/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/module-setup.sh +++ b/image/mkosi.skeleton/usr/lib/dracut/modules.d/39constellation-mount/module-setup.sh @@ -56,4 +56,17 @@ install() { "/usr/lib/udev/rules.d/64-gce-disk-removal.rules" inst_simple "/usr/lib/udev/rules.d/65-gce-disk-naming.rules" \ "/usr/lib/udev/rules.d/65-gce-disk-naming.rules" + + inst_script "/usr/sbin/ebsnvme-id" \ + "/usr/sbin/ebsnvme-id" + inst_script "/usr/bin/ec2-metadata" \ + "/usr/bin/ec2-metadata" + inst_script "/usr/lib/udev/ec2nvme-nsid" \ + "/usr/lib/udev/ec2nvme-nsid" + inst_script "/usr/lib/udev/ec2nvme-nsid" \ + "/usr/sbin/ec2nvme-nsid" + inst_script "/usr/sbin/ec2udev-vbd" \ + "/usr/sbin/ec2udev-vbd" + inst_simple "/usr/lib/udev/rules.d/70-ec2-nvme-devices.rules" \ + "/usr/lib/udev/rules.d/70-ec2-nvme-devices.rules" }