Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not treat debian stable-updates as security updates #716

Merged
merged 2 commits into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/facter/apt_updates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package = line.gsub(%r{^Inst\s([^\s]+)\s.*}, '\1').strip
apt_package_updates[0].push(package)
security_matches = [
%r{ Debian[^\s]+-updates[, ]},
%r{ Debian-Security:},
%r{ Ubuntu[^\s]+-security[, ]},
%r{ gNewSense[^\s]+-security[, ]},
Expand Down
8 changes: 5 additions & 3 deletions spec/unit/facter/apt_package_security_updates_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@
"Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
"Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
"Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
"Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
"Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
"Inst curl [7.52.1-5] (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64]) []\n" \
"Conf curl (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64])\n" \
end

it {
if Facter.version < '2.0.0'
is_expected.to eq('tzdata')
is_expected.to eq('curl')
else
is_expected.to eq(['tzdata'])
is_expected.to eq(['curl'])
end
}
end
Expand Down
4 changes: 3 additions & 1 deletion spec/unit/facter/apt_security_updates_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"Inst tzdata [2015f-0+deb8u1] (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
"Conf tzdata (2015g-0+deb8u1 Debian:stable-updates [all])\n" \
"Inst unhide.rb [13-1.1] (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
"Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n"
"Conf unhide.rb (22-2~bpo8+1 Debian Backports:jessie-backports [all])\n" \
"Inst curl [7.52.1-5] (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64]) []\n" \
"Conf curl (7.52.1-5+deb9u2 Debian-Security:9/stable [amd64])\n" \
end

it { is_expected.to eq(1) }
Expand Down