chef-boneyard / build-essential

Development repository for build-essential Chef Cookbook
https://supermarket.chef.io/cookbooks/build-essential
Apache License 2.0
116 stars 181 forks source link

Support for Amazon Linux special handling of kernel-devel needs to be added #99

Closed et304383 closed 8 years ago

et304383 commented 8 years ago

https://forums.aws.amazon.com/message.jspa?messageID=677316#677316

According to this, when Amazon releases a new AMI, the old AMI kernel-devel packages disappear unless a releasever is specified to yum.

As a result, if not running the latest Amazon Linux release, one has to provide this as a version parameter.

I'm encountered this issue today.

[etucker]# yum install kernel-devel-4.1.17-22.30.amzn1
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                                             | 2.1 kB     00:00     
amzn-updates/latest                                                          | 2.3 kB     00:00     
949 packages excluded due to repository priority protections
No package kernel-devel-4.1.17-22.30.amzn1 available.
Error: Nothing to do

[etucker]# yum --releasever=2015.09 install kernel-devel-4.1.17-22.30.amzn1
Loaded plugins: priorities, update-motd, upgrade-helper
938 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:4.1.17-22.30.amzn1 will be installed
--> Processing Dependency: /usr/sbin/hardlink for package: kernel-devel-4.1.17-22.30.amzn1.x86_64
--> Running transaction check
---> Package hardlink.x86_64 1:1.0-10.4.amzn1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch             Version                       Repository              Size
====================================================================================================
Installing:
 kernel-devel           x86_64           4.1.17-22.30.amzn1            amzn-updates           9.8 M
Installing for dependencies:
 hardlink               x86_64           1:1.0-10.4.amzn1              amzn-main              9.6 k

Transaction Summary
====================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 9.8 M
Installed size: 35 M
Is this ok [y/d/N]:

It looks like the rhel recipe needs to be forked and special handling needs to be added to use the platform version as part of the yum call to ensure folks not using the latest AMI don't break on this cookbook.

et304383 commented 8 years ago

Note that this is apparently caused by pointing at "latest" in /etc/yum.conf. I've configured this way to allow upgrading Amazon Linux to the latest AMI when available. This apparently conflicts with being able to access older packages once an update is available.

tas50 commented 8 years ago

The rollback of the kernel-devel version logic should fix this issue on Amazon