-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
stable_lts
recipe for the LTS repository
Support Squeeze's "Long Term Support" repository: https://wiki.debian.org/LTS Enabled by default on Squeeze. Fixes #14
- Loading branch information
Teemu Matilainen
committed
Jul 17, 2014
1 parent
4f58a9e
commit 5844893
Showing
7 changed files
with
98 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# Cookbook Name:: debian | ||
# Recipe:: stable_lts | ||
# | ||
# Author:: Teemu Matilainen <teemu.matilainen@reaktor.fi> | ||
# | ||
# Copyright 2014, Reaktor Innovations Oy | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
if node['platform_version'].to_i >= 7 | ||
Chef::Log.info "#{node['debian']['codename']}-lts does not exist yet" | ||
Chef::Log.info "Please file an issue if I'm wrong: https://github.com/reaktor/chef-debian/issues" | ||
else | ||
debian_repository "stable-lts" do | ||
distribution "#{node['debian']['codename']}-lts" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
require 'spec_helper' | ||
|
||
describe 'debian::stable_lts' do | ||
context 'on Squeeze' do | ||
let(:chef_run) do | ||
debian_runner('6.0.5').converge('debian::stable_lts') | ||
end | ||
|
||
it 'configures the LTS repository' do | ||
expect(chef_run).to add_apt_source( | ||
'deb http://http.debian.net/debian squeeze-lts main contrib non-free', | ||
'stable-lts.list') | ||
end | ||
end | ||
|
||
context 'on Wheezy' do | ||
let(:chef_run) do | ||
debian_runner('7.0').converge('debian::stable_lts') | ||
end | ||
|
||
it 'warns' do | ||
allow(Chef::Log).to receive(:info) | ||
expect(Chef::Log).to receive(:info).with('wheezy-lts does not exist yet') | ||
chef_run | ||
end | ||
|
||
it 'does not configure the LTS repository' do | ||
expect(chef_run).to_not create_file('/etc/apt/sources.list.d/stable-lts.list') | ||
end | ||
end | ||
end |