Skip to content

Commit

Permalink
Merge pull request #1069 from yast/merge-SLE-15-SP4
Browse files Browse the repository at this point in the history
Merge SLE-15-SP4 into master
  • Loading branch information
imobachgs committed Nov 17, 2022
2 parents 44461a2 + 749de20 commit 9a2495e
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 19 deletions.
31 changes: 30 additions & 1 deletion package/yast2-installation.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
-------------------------------------------------------------------
Tue Nov 15 13:43:41 UTC 2022 - Ancor Gonzalez Sosa <ancor@suse.com>

- Fixed the help in the installation summary to include the texts
from the corresponding proposals (related to jsc#SLE-24764).
- 4.5.9

-------------------------------------------------------------------
Tue Nov 15 13:42:41 UTC 2022 - José Iván López González <jlopez@suse.com>

- Write config for ssg-apply script according to the enabled
security policy (part of jsc#SLE-24764).

-------------------------------------------------------------------
Tue Nov 15 13:41:41 UTC 2022 - Knut Anderssen <kanderssen@suse.com>

- Fix copy of entropy pool during installation (bsc#1204559).

-------------------------------------------------------------------
Tue Nov 15 13:40:41 UTC 2022 - Ladislav Slezák <lslezak@suse.cz>

- Do not use "xrdb" for setting the "Xft.dpi" value, use a specific
YaST tool from the yast2-x11 package (bsc#1201532)
(xrdb depends on the C pre-processor increasing the dependencies
about of 22MB)
- Install yast2-x11 only when GUI (libyui-qt) is installed,
avoid installing the dependent X libraries in minimal (text mode)
installation (bsc#1201966)

-------------------------------------------------------------------
Thu Oct 20 13:53:14 UTC 2022 - Steffen Winterfeldt <snwint@suse.com>

Expand Down Expand Up @@ -49,7 +78,7 @@ Wed Jun 15 11:28:30 UTC 2022 - Knut Anderssen <kanderssen@suse.com>

- Do not restart services when updating the package (bsc#1199480,
bsc#1200274)
-4.5.3
- 4.5.3

-------------------------------------------------------------------
Mon May 23 15:42:10 UTC 2022 - Knut Anderssen <kanderssen@suse.com>
Expand Down
10 changes: 5 additions & 5 deletions package/yast2-installation.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-installation
Version: 4.5.8
Version: 4.5.9
Release: 0
Summary: YaST2 - Installation Parts
License: GPL-2.0-only
Expand All @@ -42,8 +42,8 @@ BuildRequires: yast2-network >= 4.4.12
BuildRequires: yast2-packager >= 4.4.13
# yast/rspec/helpers.rb
BuildRequires: yast2-ruby-bindings >= 4.4.7
# For LSM classes
BuildRequires: yast2-security
# Support for SecurityPolicies
BuildRequires: yast2-security >= 4.5.3
# using /usr/bin/udevadm
BuildRequires: yast2-storage-ng >= 4.2.71
# Y2Users
Expand Down Expand Up @@ -96,6 +96,8 @@ Requires: yast2-services-manager >= 3.2.1
Requires: yast2-storage-ng >= 4.0.175
# Y2Users
Requires: yast2-users >= 4.4.2
# Support for SecurityPolicies
Requires: yast2-security >= 4.5.3
PreReq: %fillup_prereq
Recommends: yast2-add-on
Recommends: yast2-firewall
Expand All @@ -118,8 +120,6 @@ Conflicts: yast2-mouse < 2.18.0
Conflicts: yast2-pkg-bindings < 2.17.25
# Registration#get_updates_list does not handle exceptions
Conflicts: yast2-registration < 3.2.3
# Added support for selecting the desired LSM during installation
Conflicts: yast2-security < 4.4.2
# Top bar with logo
Conflicts: yast2-ycp-ui-bindings < 3.1.7
Obsoletes: yast2-installation-devel-doc
Expand Down
3 changes: 2 additions & 1 deletion src/lib/installation/clients/pre_umount_finish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def read_poolsize
poolsize = Builtins.regexpsub(poolsize, "^([[:digit:]]+).*", "\\1")
end

log.info "Using random/poolsize: #{poolsize}"
poolsize = (poolsize.to_i / 8).to_s
log.info "Using random/poolsize: #{poolsize} (Bytes)"
poolsize
end

Expand Down
14 changes: 13 additions & 1 deletion src/lib/installation/clients/security_finish.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ------------------------------------------------------------------------------
# Copyright (c) 2017 SUSE LLC
# Copyright (c) [2017-2022] SUSE LLC
#
#
# This program is free software; you can redistribute it and/or modify it under
Expand All @@ -21,6 +21,7 @@
require "y2firewall/firewalld"
require "installation/security_settings"
require "installation/finish_client"
require "y2security/security_policies/manager"

Yast.import "Mode"
Yast.import "SignatureCheckDialogs"
Expand Down Expand Up @@ -88,6 +89,8 @@ def write
# Write down the Linux Security Module configuration
settings.lsm_config.save

write_security_policies_config

true
end

Expand Down Expand Up @@ -182,6 +185,15 @@ def write_firewall
Yast::Service.Enable("sshd") if @settings.enable_sshd
configure_firewall if @firewalld.installed?
end

# Writes config for security policies
def write_security_policies_config
# write security policies config only during a fresh install
return if Yast::Mode.update

manager = Y2Security::SecurityPolicies::Manager.instance
manager.write
end
end
end
end
18 changes: 9 additions & 9 deletions src/lib/installation/proposal_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -611,16 +611,16 @@ def order_without_tabs
end

def modules_help(current_tab)
modules_order = presentation_order
if tabs? && current_tab
modules_order = modules_order[current_tab]

modules_order.each_with_object("") do |client, text|
description = description_for(client)
text << description["help"] if description && description["help"]
modules_order =
if tabs? && current_tab
presentation_order[current_tab]
else
presentation_order
end
else
""

modules_order.each_with_object("") do |client, text|
description = description_for(client)
text << description["help"] if description && description["help"]
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/lib/clients/pre_umount_finish_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
describe ::Installation::PreUmountFinish do
describe "#write" do
before do
allow(Yast::WFM).to receive(:Execute).and_return("exit"=>0)
allow(Yast::SCR).to receive(:Execute).and_return("exit"=>0)
allow(Yast::WFM).to receive(:Execute).and_return("exit" => 0)
allow(Yast::SCR).to receive(:Execute).and_return("exit" => 0)
# Set the target dir to /mnt
allow(Yast::WFM).to receive(:Args).and_return("initial")
end
Expand Down
14 changes: 14 additions & 0 deletions test/lib/clients/security_finish_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

require_relative "../../test_helper"
require "installation/clients/security_finish"
require "y2security/security_policies/manager"

Yast.import "Service"

describe Installation::Clients::SecurityFinish do
before do
allow_any_instance_of(Y2Firewall::Firewalld::Api).to receive(:running?).and_return(false)
allow(Y2Security::SecurityPolicies::Manager.instance).to receive(:write)
end

let(:proposal_settings) { Installation::SecuritySettings.create_instance }
Expand Down Expand Up @@ -46,6 +48,12 @@
subject.write
end

it "writes the security policies config" do
expect(Y2Security::SecurityPolicies::Manager.instance).to receive(:write)

subject.write
end

context "when firewalld is not installed" do
let(:installed) { false }

Expand Down Expand Up @@ -119,6 +127,12 @@

subject.write
end

it "skips writting the security policies config" do
expect(Y2Security::SecurityPolicies::Manager.instance).to_not receive(:write)

subject.write
end
end

context "when policy kit default priviges is defined" do
Expand Down

0 comments on commit 9a2495e

Please sign in to comment.