Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package yast2-apparmor for openSUSE:Factory checked in at 2021-06-01 10:33:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-apparmor (Old)
and /work/SRC/openSUSE:Factory/.yast2-apparmor.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-apparmor"
Tue Jun 1 10:33:45 2021 rev:81 rq:895204 version:4.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-apparmor/yast2-apparmor.changes 2021-05-02 18:36:05.108955706 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-apparmor.new.1898/yast2-apparmor.changes 2021-06-01 10:33:56.692453791 +0200
@@ -1,0 +2,6 @@
+Mon May 24 14:49:39 UTC 2021 - Imobach Gonzalez Sosa
+
+- Do not crash when the profiles list is empty (bsc#1186330).
+- 4.4.1
+
+-------------------------------------------------------------------
Old:
----
yast2-apparmor-4.4.0.tar.bz2
New:
----
yast2-apparmor-4.4.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-apparmor.spec ++++++
--- /var/tmp/diff_new_pack.o5ZVIm/_old 2021-06-01 10:33:57.244454732 +0200
+++ /var/tmp/diff_new_pack.o5ZVIm/_new 2021-06-01 10:33:57.248454738 +0200
@@ -17,7 +17,7 @@
Name: yast2-apparmor
-Version: 4.4.0
+Version: 4.4.1
Release: 0
Summary: YaST2 - Plugins for AppArmor Profile Management
License: GPL-2.0-only
++++++ yast2-apparmor-4.4.0.tar.bz2 -> yast2-apparmor-4.4.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-apparmor-4.4.0/package/yast2-apparmor.changes new/yast2-apparmor-4.4.1/package/yast2-apparmor.changes
--- old/yast2-apparmor-4.4.0/package/yast2-apparmor.changes 2021-04-30 18:13:10.000000000 +0200
+++ new/yast2-apparmor-4.4.1/package/yast2-apparmor.changes 2021-05-24 17:41:49.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon May 24 14:49:39 UTC 2021 - Imobach Gonzalez Sosa
+
+- Do not crash when the profiles list is empty (bsc#1186330).
+- 4.4.1
+
+-------------------------------------------------------------------
Tue Apr 20 13:51:55 UTC 2021 - Ladislav Slez��k
- 4.4.0 (bsc#1185510)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-apparmor-4.4.0/package/yast2-apparmor.spec new/yast2-apparmor-4.4.1/package/yast2-apparmor.spec
--- old/yast2-apparmor-4.4.0/package/yast2-apparmor.spec 2021-04-30 18:13:10.000000000 +0200
+++ new/yast2-apparmor-4.4.1/package/yast2-apparmor.spec 2021-05-24 17:41:49.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-apparmor
-Version: 4.4.0
+Version: 4.4.1
Release: 0
Summary: YaST2 - Plugins for AppArmor Profile Management
Url: https://github.com/yast/yast-apparmor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-apparmor-4.4.0/src/lib/apparmor/profiles.rb new/yast2-apparmor-4.4.1/src/lib/apparmor/profiles.rb
--- old/yast2-apparmor-4.4.0/src/lib/apparmor/profiles.rb 2021-04-30 18:13:10.000000000 +0200
+++ new/yast2-apparmor-4.4.1/src/lib/apparmor/profiles.rb 2021-05-24 17:41:49.000000000 +0200
@@ -203,6 +203,8 @@
end
def dialog_content
+ profile = visible_profiles.first&.last
+
VBox(
# Header
Heading(_('Profile List')),
@@ -217,13 +219,19 @@
# Footer buttons
HBox(
HWeight(1,
- PushButton(Id(:setEnforce),
- ((table_items.first.params[1] == "enforce") ? Opt(:disabled) : Opt()),
- _("S&et to 'enforce'"))),
+ PushButton(
+ Id(:setEnforce),
+ profile.nil? || profile.status == "enforce" ? Opt(:disabled) : Opt(),
+ _("S&et to 'enforce'")
+ )
+ ),
HWeight(1,
- PushButton(Id(:setComplain),
- ((table_items.first.params[1] == "complain") ? Opt(:disabled) : Opt()),
- _("Set to '&complain'"))),
+ PushButton(
+ Id(:setComplain),
+ profile.nil? || profile.status == "complain" ? Opt(:disabled) : Opt(),
+ _("Set to '&complain'")
+ )
+ ),
HStretch(),
HWeight(1, PushButton(Id(:finish), Yast::Label.FinishButton))
)
@@ -240,14 +248,25 @@
)
end
+ # Returns the list of visible profiles
+ #
+ # Each element of the array is another array with the profile name
+ # and a profile object.
+ #
+ # [["apache2", #AppArmor::Profile...], ["dovecot", #AppArmor::Profile...]]
+ #
+ # @return [Array>]
+ def visible_profiles
+ if @active
+ @profiles.active
+ else
+ @profiles.all
+ end
+ end
+
def table_items
- profs = if @active
- @profiles.active
- else
- @profiles.all
- end
arr = []
- profs.each do |_n, pr|
+ visible_profiles.each do |_n, pr|
arr.push(pr.to_array)
end
arr.map { |i| Item(*i) }
@@ -283,12 +302,15 @@
def entries_table_handler
selected_item = Yast::UI.QueryWidget(Id(:entries_table), :CurrentItem)
- if(@profiles.all[selected_item].status == "enforce")
+ selected_profile = @profiles.all[selected_item]
+
+ if selected_profile.nil? || selected_profile.status == "enforce"
Yast::UI.ChangeWidget(Id(:setEnforce), :Enabled, false)
else
Yast::UI.ChangeWidget(Id(:setEnforce), :Enabled, true)
end
- if(@profiles.all[selected_item].status == "complain")
+
+ if selected_profile.nil? || selected_profile.status == "complain"
Yast::UI.ChangeWidget(Id(:setComplain), :Enabled, false)
else
Yast::UI.ChangeWidget(Id(:setComplain), :Enabled, true)