aws / aws/aws-ec2-instance-connect-config
This source has diverged from what is released
- Dominant language
- Shell
- Stars
- 88
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
If I use rpmrebuild to inspect the RPM file being provided on S3, I see that it has diverged from the version being offered in this repository.
```
$ curl -Lsf "https://amazon-ec2-instance-connect-us-west-2.s3.us-west-2.amazonaws.com/latest/linux_amd64/ec2-instance-connect.rpm" -o eic.rpm
$ EDITOR="cat" rpmrebuild -e -p eic.rpm
```
This outputs the following spec:
```
# rpmrebuild autogenerated specfile
BuildRoot: /root/.tmp/rpmrebuild.774/work/root
AutoProv: no
%undefine __find_provides
AutoReq: no
%undefine __find_requires
# Do not try autogenerate prereq/conflicts/obsoletes and check files
%undefine __check_files
%undefine __find_prereq
%undefine __find_conflicts
%undefine __find_obsoletes
# Be sure buildpolicy set to do nothing
%define __spec_install_post %{nil}
# Something that need for rpm-4.1
%define _missing_doc_files_terminate_build 0
#dummy
#dummy
#BUILDHOST: localhost
#BUILDTIME: Tue Dec 5 20:36:30 2023
#SOURCERPM: ec2-instance-connect-2.0.0-1.rhel9.src.rpm
#RPMVERSION: 4.11.3
#COOKIE: localhost 1701808590
#OS: linux
#SIZE: 7941597
#ARCHIVESIZE: 7942036
#ARCH: x86_64
BuildArch: x86_64
Name: ec2-instance-connect
Version: 2.0.0
Release: 1.rhel9
License: ASL2.0
Group: Unspecified
Summary: EC2 instance scripting and configuration for EC2 Instance Connect
Provides: ec2-instance-connect = 2.0.0-1.rhel9
Provides: ec2-instance-connect(x86-64) = 2.0.0-1.rhel9
Requires(post): /bin/grep
Requires(pre): /bin/sh
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires(postun): /bin/sh
Requires(pre): /usr/bin/getent
Requires(post): /usr/bin/printf
Requires(pre): /usr/sbin/adduser
Requires(postun): /usr/sbin/userdel
Requires(pre): /usr/sbin/usermod
Requires: coreutils
Requires: curl
Requires: libc.so.6()(64bit)
Requires: libc.so.6(GLIBC_2.2.5)(64bit)
Requires: libpthread.so.0()(64bit)
Requires: libpthread.so.0(GLIBC_2.2.5)(64bit)
Requires: libpthread.so.0(GLIBC_2.3.2)(64bit)
Requires: libresolv.so.2()(64bit)
Requires: openssh >= 8.0
Requires: openssh-server >= 8.0
Requires(post): openssh-server >= 8.0
Requires: openssl
#Requires: rpmlib(CompressedFileNames) <= 3.0.4-1
#Requires: rpmlib(FileDigests) <= 4.6.0-1
#Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: systemd
Requires(pre): systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires(pre): systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
#Requires: rpmlib(PayloadIsXz) <= 5.2-1
%description
EC2 instance scripting and configuration for EC2 Instance Connect
%files
%attr(0755, root, root) "/etc/ssh/sshd_config.d/60-ec2-instance-connect.conf"
%attr(0755, root, root) "/opt/aws/bin/eic_run_authorized_keys"
%pre -p /bin/sh
# Create/configure system user
/usr/bin/getent passwd ec2-instance-connect || /usr/sbin/useradd -r -M -s /sbin/nologin ec2-instance-connect
/usr/sbin/usermod -L ec2-instance-connect
%post -p /bin/sh
# Restart sshd
if /bin/systemctl is-active --quiet sshd ; then
/bin/systemctl restart sshd
fi
%preun -p /bin/sh
# Restart sshd
if /bin/systemctl is-active --quiet sshd ; then
/bin/systemctl restart sshd
fi
%postun -p /bin/sh
if [ $1 -eq 0 ] ; then
# Delete system user
/usr/sbin/userdel ec2-instance-connect
fi
%changelog
* Tue Dec 05 2023 Michael Drzal 2.0.0-1
- Added support for RHEL and CentOS
* Thu Jun 09 2022 Vishrutha Konappa Reddy 1.1-18
- Update curl command to not fail silently on HTTP server error.
* Mon May 09 2022 Jacob Meisler 1.1-17
- OpenSSL 3.0.2 breaks strict x509 verification for one of our intermediate CA certificates.
- Only verify CA certificates that aren't already trusted in /etc/ssl/certs.
- OpenSSL 3.0.2 also changes the formatting of the SHA1 fingerprint of an x509 certificate. Switch to a case insensitive match to be backwards and forwards compatible between OpenSSL versions.
* Thu Sep 09 2021 Vishrutha Konappa Reddy 1.1-15
- Change EIC Hostkeys Harvesting to be asynchronous from SSHD to improve instance boot time
- Rename and enable ec2-instance-connect-harvest-hostkeys.service. Remove pointer to old ec2-instance-connect.service.
* Fri Feb 26 2021 Paul Oh 1.1-14
- Ensure failure to run host key harvesting does not leave instances in degraded state
* Thu Oct 22 2020 Jacob Meisler 1.1-13
- Verify that domain returned from IMDS is an AWS domain
* Tue Nov 19 2019 Daniel Anderson 1.1-12
- Adding support for Instance Metadata Service Version 2
- Modifying cURL invocation to avoid need for eval
- Cleaning up shellcheck catches
* Wed Aug 21 2019 Daniel Anderson 1.1-11
- Removing errant write to /tmp
- Cleaning up bad bash practices, including umask race condition
* Wed Jul 03 2019 Daniel Anderson 1.1-10
- Fix for an update to openssl (or dependencies) affecting behavior of CApath option on openssl verify
- Fixing Nitro behavior of hostkey harvesting and post-installation systemd hooks
* Wed May 15 2019 Daniel Anderson 1.1-9
- Fixing existing AuthorizedKeysCommand detection
- Adding additional licensing headers
- Improved mechanism for detection if script is running on an EC2 instance
* Wed Apr 24 2019 Daniel Anderson 1.1-8
- Better detection of existing user customization
* Fri Mar 29 2019 Daniel Anderson 1.1-7
- Change to Amazon Linux configuration
* Wed Mar 20 2019 Daniel Anderson 1.1-6
- Verification of EC2 hypervisor UUID
* Fri Mar 15 2019 Daniel Anderson 1.1-5
- Added slightly stronger checks that we're getting valid data from Instance Metadata Service/on an instance
* Wed Jan 30 2019 Daniel Anderson 1.1-4
- Fixed a bug in reading instance-identity credentials as part of hostkey harvesting and dropped AWS CLI dependency
- Added support for non-Amazon Linux yum distributions, such as RHEL and CentOS
- Hardened error handling
* Fri Dec 21 2018 Daniel Anderson 1.1-3
- Fixing an issue with the hostkey harvesting script - it was using default creds instead of instance-identity
* Fri Dec 07 2018 Daniel Anderson 1.1-2
- Minor changes to package build process to share code with Debian packaging
* Tue Oct 23 2018 Anshumali Prasad 1.1-1
- Hostkey harvesting for EC2 Instance Connect.
* Mon Oct 22 2018 Daniel Anderson 1.0-3
- Updating exit status on no-data case, improving support for newer openssl versions
* Tue Oct 09 2018 Daniel Anderson 1.0-2
- Cleaning up package requirements & post installation hook
* Wed Jun 13 2018 Daniel Anderson 1.0-1
- Initial RPM build for EC2 Instance Connect targeting Amazon Linux 2.
```
Contributor guide
Research direction
Start by comparing the RPM downloaded from the S3 URL with the repository's packaging configuration, using the provided rpmrebuild command to inspect the released artifact. Trace why the package contents and metadata differ from the source, then verify that a newly built RPM matches the intended repository version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, linux, shell
- Domain
- build-system, operating-systems, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100