openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 2020
- 1 participants
- 2232 discussions
Hello community,
here is the log from the commit of package yast2-schema for openSUSE:Factory checked in at 2020-07-30 10:00:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-schema (Old)
and /work/SRC/openSUSE:Factory/.yast2-schema.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-schema"
Thu Jul 30 10:00:08 2020 rev:59 rq:823349 version:4.3.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-schema/yast2-schema.changes 2020-07-05 01:12:23.179856959 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-schema.new.3592/yast2-schema.changes 2020-07-30 10:00:24.799232423 +0200
@@ -1,0 +2,7 @@
+Tue Jul 28 14:07:48 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Fix the schema definition for the add_on_products and
+ add_on_others elements (boo#1174424).
+- 4.3.4
+
+-------------------------------------------------------------------
Old:
----
yast2-schema-4.3.3.tar.bz2
New:
----
yast2-schema-4.3.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-schema.spec ++++++
--- /var/tmp/diff_new_pack.qYTWSs/_old 2020-07-30 10:00:26.163233238 +0200
+++ /var/tmp/diff_new_pack.qYTWSs/_new 2020-07-30 10:00:26.167233240 +0200
@@ -17,7 +17,7 @@
Name: yast2-schema
-Version: 4.3.3
+Version: 4.3.4
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -37,8 +37,8 @@
# make report elements and descendants optional
BuildRequires: autoyast2 >= 4.3.20
BuildRequires: yast2
-# add_on_others element
-BuildRequires: yast2-add-on >= 4.3.0
+# add_on_products and add_on_others types
+BuildRequires: yast2-add-on >= 4.3.3
BuildRequires: yast2-audit-laf >= 4.3.0
BuildRequires: yast2-auth-client >= 4.3.0
BuildRequires: yast2-auth-server
++++++ yast2-schema-4.3.3.tar.bz2 -> yast2-schema-4.3.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-schema-4.3.3/package/yast2-schema.changes new/yast2-schema-4.3.4/package/yast2-schema.changes
--- old/yast2-schema-4.3.3/package/yast2-schema.changes 2020-07-03 10:34:34.000000000 +0200
+++ new/yast2-schema-4.3.4/package/yast2-schema.changes 2020-07-29 11:38:47.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Tue Jul 28 14:07:48 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Fix the schema definition for the add_on_products and
+ add_on_others elements (boo#1174424).
+- 4.3.4
+
+-------------------------------------------------------------------
Thu Jul 2 19:13:36 UTC 2020 - Knut Anderssen <kanderssen(a)suse.com>
- Make the report section elements optional as AutoYaST proposes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-schema-4.3.3/package/yast2-schema.spec new/yast2-schema-4.3.4/package/yast2-schema.spec
--- old/yast2-schema-4.3.3/package/yast2-schema.spec 2020-07-03 10:34:34.000000000 +0200
+++ new/yast2-schema-4.3.4/package/yast2-schema.spec 2020-07-29 11:38:47.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-schema
-Version: 4.3.3
+Version: 4.3.4
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -39,8 +39,8 @@
# make report elements and descendants optional
BuildRequires: autoyast2 >= 4.3.20
BuildRequires: yast2
-# add_on_others element
-BuildRequires: yast2-add-on >= 4.3.0
+# add_on_products and add_on_others types
+BuildRequires: yast2-add-on >= 4.3.3
BuildRequires: yast2-audit-laf >= 4.3.0
BuildRequires: yast2-auth-client >= 4.3.0
BuildRequires: yast2-auth-server
1
0
Hello community,
here is the log from the commit of package yast2-security for openSUSE:Factory checked in at 2020-07-30 10:00:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-security (Old)
and /work/SRC/openSUSE:Factory/.yast2-security.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-security"
Thu Jul 30 10:00:05 2020 rev:94 rq:823343 version:4.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-security/yast2-security.changes 2020-05-15 23:50:39.941353259 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-security.new.3592/yast2-security.changes 2020-07-30 10:00:22.959231324 +0200
@@ -1,0 +2,8 @@
+Tue Jul 28 13:52:52 CEST 2020 - aschnell(a)suse.com
+
+- Use pam_pwquality instead of pam_cracklib depending on
+ availability (bsc#1171318)
+- Fix setting dictpath for pam_pwquality (bsc#1174619)
+- 4.3.1
+
+-------------------------------------------------------------------
Old:
----
yast2-security-4.3.0.tar.bz2
New:
----
yast2-security-4.3.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-security.spec ++++++
--- /var/tmp/diff_new_pack.BxtUaR/_old 2020-07-30 10:00:23.643231733 +0200
+++ /var/tmp/diff_new_pack.BxtUaR/_new 2020-07-30 10:00:23.647231735 +0200
@@ -17,7 +17,7 @@
Name: yast2-security
-Version: 4.3.0
+Version: 4.3.1
Release: 0
Summary: YaST2 - Security Configuration
License: GPL-2.0-only
@@ -30,8 +30,9 @@
BuildRequires: perl-XML-Writer
BuildRequires: pkg-config
BuildRequires: update-desktop-files
+# Pam.List
BuildRequires: yast2-devtools >= 4.2.2
-BuildRequires: yast2-pam
+BuildRequires: yast2-pam >= 4.3.1
BuildRequires: rubygem(%{rb_default_ruby_abi}:rspec)
BuildRequires: rubygem(%{rb_default_ruby_abi}:yast-rake) >= 0.2.5
# CFA::SysctlConfig
@@ -48,6 +49,8 @@
# CFA::SysctlConfig
Requires: yast2 >= 4.2.66
Requires: yast2-ruby-bindings >= 1.0.0
+# Pam.List
+Requires: yast2-pam >= 4.3.1
Provides: y2c_sec
Provides: y2t_sec
++++++ yast2-security-4.3.0.tar.bz2 -> yast2-security-4.3.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/.rubocop.yml new/yast2-security-4.3.1/.rubocop.yml
--- old/yast2-security-4.3.0/.rubocop.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-security-4.3.1/.rubocop.yml 2020-07-29 11:04:42.000000000 +0200
@@ -0,0 +1,505 @@
+# use the shared YaST defaults
+inherit_from:
+ /usr/share/YaST2/data/devtools/data/rubocop-0.71.0_yast_style.yml
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: outdent, indent
+Layout/AccessModifierIndentation:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: with_first_argument, with_fixed_indentation
+Layout/AlignArguments:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+
+# Offense count: 11
+# Cop supports --auto-correct.
+# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
+# SupportedHashRocketStyles: key, separator, table
+# SupportedColonStyles: key, separator, table
+# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
+Layout/AlignHash:
+ Exclude:
+ - 'src/clients/security.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Layout/BlockEndNewline:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
+# SupportedStylesAlignWith: keyword, variable, start_of_line
+Layout/EndAlignment:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
+Layout/IndentFirstArgument:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/helps.rb'
+
+# Offense count: 7
+# Cop supports --auto-correct.
+Layout/LeadingCommentSpace:
+ Exclude:
+ - 'src/clients/security.rb'
+ - 'src/include/security/dialogs.rb'
+
+# Offense count: 3
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, IndentationWidth.
+# SupportedStyles: aligned, indented
+Layout/MultilineOperationIndentation:
+ Exclude:
+ - 'src/clients/security.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: AllowForAlignment.
+Layout/SpaceAroundOperators:
+ Exclude:
+ - 'test/security_test.rb'
+
+# Offense count: 3
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
+# SupportedStyles: space, no_space
+# SupportedStylesForEmptyBraces: space, no_space
+Layout/SpaceInsideBlockBraces:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
+# SupportedStyles: space, no_space, compact
+# SupportedStylesForEmptyBraces: space, no_space
+Layout/SpaceInsideHashLiteralBraces:
+ Exclude:
+ - 'test/levels_test.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
+# SupportedStyles: space, no_space
+# SupportedStylesForEmptyBrackets: space, no_space
+Layout/SpaceInsideReferenceBrackets:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+
+# Offense count: 59
+# Cop supports --auto-correct.
+# Configuration parameters: IndentationWidth.
+Layout/Tab:
+ Exclude:
+ - 'src/clients/security.rb'
+ - 'src/clients/security_auto.rb'
+ - 'src/clients/security_finish.rb'
+ - 'src/clients/security_summary.rb'
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/helps.rb'
+ - 'src/include/security/levels.rb'
+ - 'src/include/security/routines.rb'
+ - 'src/include/security/users.rb'
+ - 'src/include/security/widgets.rb'
+ - 'src/include/security/wizards.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 7
+# Cop supports --auto-correct.
+# Configuration parameters: AllowInHeredoc.
+Layout/TrailingWhitespace:
+ Exclude:
+ - 'src/clients/security.rb'
+ - 'src/clients/security_auto.rb'
+ - 'src/clients/security_summary.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/lib/security/clients/security_finish.rb'
+ - 'test/security_test.rb'
+
+# Offense count: 8
+Lint/LiteralAsCondition:
+ Exclude:
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/users.rb'
+ - 'src/include/security/wizards.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Lint/ScriptPermission:
+ Exclude:
+ - 'test/security_finish_test.rb'
+
+# Offense count: 5
+# Configuration parameters: AllowKeywordBlockArguments.
+Lint/UnderscorePrefixedVariableName:
+ Exclude:
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/routines.rb'
+
+# Offense count: 3
+# Cop supports --auto-correct.
+# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
+Lint/UnusedMethodArgument:
+ Exclude:
+ - 'src/include/security/helps.rb'
+ - 'src/include/security/levels.rb'
+ - 'src/include/security/widgets.rb'
+
+# Offense count: 2
+Lint/UselessAssignment:
+ Exclude:
+ - 'src/clients/security.rb'
+ - 'src/include/security/dialogs.rb'
+
+# Offense count: 20
+Metrics/AbcSize:
+ Max: 126
+
+# Offense count: 19
+# Configuration parameters: CountComments, ExcludedMethods.
+# ExcludedMethods: refine
+Metrics/BlockLength:
+ Max: 591
+
+# Offense count: 9
+# Configuration parameters: CountBlocks.
+Metrics/BlockNesting:
+ Max: 6
+
+# Offense count: 1
+# Configuration parameters: CountComments.
+Metrics/ClassLength:
+ Max: 634
+
+# Offense count: 19
+Metrics/CyclomaticComplexity:
+ Max: 34
+
+# Offense count: 41
+# Cop supports --auto-correct.
+# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
+# URISchemes: http, https
+Metrics/LineLength:
+ Max: 587
+
+# Offense count: 22
+# Configuration parameters: CountComments, ExcludedMethods.
+Metrics/MethodLength:
+ Max: 259
+
+# Offense count: 7
+# Configuration parameters: CountComments.
+Metrics/ModuleLength:
+ Max: 757
+
+# Offense count: 20
+Metrics/PerceivedComplexity:
+ Max: 39
+
+# Offense count: 2
+# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
+# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
+Naming/FileName:
+ Exclude:
+ - 'src/modules/Security.rb'
+ - 'test/SCRStub.rb'
+
+# Offense count: 38
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: snake_case, camelCase
+Naming/MethodName:
+ Exclude:
+ - 'src/clients/security.rb'
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/routines.rb'
+ - 'src/include/security/users.rb'
+ - 'src/include/security/wizards.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 9
+# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
+# AllowedNames: io, id, to, by, on, in, at, ip, db
+Naming/UncommunicativeMethodParamName:
+ Exclude:
+ - 'src/include/security/routines.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 29
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: snake_case, camelCase
+Naming/VariableName:
+ Exclude:
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/helps.rb'
+ - 'src/include/security/levels.rb'
+ - 'src/include/security/routines.rb'
+ - 'src/include/security/widgets.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
+# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
+# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
+# FunctionalMethods: let, let!, subject, watch
+# IgnoredMethods: lambda, proc, it
+Style/BlockDelimiters:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 4
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
+# SupportedStyles: assign_to_condition, assign_inside_condition
+Style/ConditionalAssignment:
+ Exclude:
+ - 'src/include/security/helps.rb'
+ - 'src/include/security/routines.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Style/Dir:
+ Exclude:
+ - 'test/test_helper.rb'
+
+# Offense count: 16
+Style/Documentation:
+ Exclude:
+ - 'spec/**/*'
+ - 'test/**/*'
+ - 'src/clients/security.rb'
+ - 'src/clients/security_auto.rb'
+ - 'src/clients/security_summary.rb'
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/helps.rb'
+ - 'src/include/security/levels.rb'
+ - 'src/include/security/routines.rb'
+ - 'src/include/security/users.rb'
+ - 'src/include/security/widgets.rb'
+ - 'src/include/security/wizards.rb'
+ - 'src/lib/security/clients/security_finish.rb'
+ - 'src/lib/security/ctrl_alt_del_config.rb'
+ - 'src/lib/security/display_manager.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: empty, nil, both
+Style/EmptyElse:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 16
+# Cop supports --auto-correct.
+Style/Encoding:
+ Enabled: false
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Style/ExpandPathArguments:
+ Exclude:
+ - 'test/test_helper.rb'
+
+# Offense count: 22
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: always, never
+Style/FrozenStringLiteralComment:
+ Enabled: false
+
+# Offense count: 8
+# Configuration parameters: MinBodyLength.
+Style/GuardClause:
+ Exclude:
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/users.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 70
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
+# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
+Style/HashSyntax:
+ Exclude:
+ - 'src/clients/security_auto.rb'
+ - 'src/include/security/routines.rb'
+ - 'src/include/security/wizards.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 1
+Style/IfInsideElse:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 6
+# Cop supports --auto-correct.
+Style/IfUnlessModifier:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/routines.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 7
+# Cop supports --auto-correct.
+Style/InfiniteLoop:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/users.rb'
+ - 'src/include/security/wizards.rb'
+
+# Offense count: 10
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: line_count_dependent, lambda, literal
+Style/Lambda:
+ Exclude:
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/wizards.rb'
+
+# Offense count: 4
+# Cop supports --auto-correct.
+Style/LineEndConcatenation:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Style/MultilineIfModifier:
+ Exclude:
+ - 'src/include/security/widgets.rb'
+
+# Offense count: 4
+Style/MultilineTernaryOperator:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+
+# Offense count: 9
+Style/MultipleComparison:
+ Exclude:
+ - 'src/include/security/complex.rb'
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/users.rb'
+ - 'src/include/security/wizards.rb'
+
+# Offense count: 6
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: literals, strict
+Style/MutableConstant:
+ Exclude:
+ - 'src/include/security/widgets.rb'
+ - 'src/lib/security/ctrl_alt_del_config.rb'
+ - 'src/lib/security/display_manager.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 4
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: predicate, comparison
+Style/NilComparison:
+ Exclude:
+ - 'src/clients/security.rb'
+ - 'src/include/security/routines.rb'
+
+# Offense count: 6
+# Cop supports --auto-correct.
+# Configuration parameters: IncludeSemanticChanges.
+Style/NonNilCheck:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+ - 'src/include/security/routines.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 4
+# Cop supports --auto-correct.
+# Configuration parameters: PreferredDelimiters.
+Style/PercentLiteralDelimiters:
+ Exclude:
+ - 'test/security_test.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: short, verbose
+Style/PreferredHashMethods:
+ Exclude:
+ - 'src/include/security/dialogs.rb'
+ - 'test/SCRStub.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Style/RedundantConditional:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+Style/RescueModifier:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
+# Whitelist: present?, blank?, presence, try, try!
+Style/SafeNavigation:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 3
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
+# SupportedStyles: single_quotes, double_quotes
+Style/StringLiterals:
+ Exclude:
+ - 'src/modules/Security.rb'
+ - 'test/levels_test.rb'
+ - 'test/test_helper.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: single_quotes, double_quotes
+Style/StringLiteralsInInterpolation:
+ Exclude:
+ - 'src/modules/Security.rb'
+
+# Offense count: 5
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, AllowSafeAssignment.
+# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
+Style/TernaryParentheses:
+ Exclude:
+ - 'src/include/security/routines.rb'
+ - 'src/modules/Security.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Style/ZeroLengthPredicate:
+ Exclude:
+ - 'src/modules/Security.rb'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/Rakefile new/yast2-security-4.3.1/Rakefile
--- old/yast2-security-4.3.0/Rakefile 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/Rakefile 2020-07-29 11:04:42.000000000 +0200
@@ -1,6 +1,6 @@
require "yast/rake"
Yast::Tasks.configuration do |conf|
- #lets ignore license check for now
+ # lets ignore license check for now
conf.skip_license_check << /.*/
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/package/yast2-security.changes new/yast2-security-4.3.1/package/yast2-security.changes
--- old/yast2-security-4.3.0/package/yast2-security.changes 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/package/yast2-security.changes 2020-07-29 11:04:42.000000000 +0200
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Tue Jul 28 13:52:52 CEST 2020 - aschnell(a)suse.com
+
+- Use pam_pwquality instead of pam_cracklib depending on
+ availability (bsc#1171318)
+- Fix setting dictpath for pam_pwquality (bsc#1174619)
+- 4.3.1
+
+-------------------------------------------------------------------
Tue May 12 15:16:34 UTC 2020 - josef Reidinger <jreidinger@localhost>
- Autoyast schema: Allow optional types for string and map objects
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/package/yast2-security.spec new/yast2-security-4.3.1/package/yast2-security.spec
--- old/yast2-security-4.3.0/package/yast2-security.spec 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/package/yast2-security.spec 2020-07-29 11:04:42.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-security
-Version: 4.3.0
+Version: 4.3.1
Release: 0
Group: System/YaST
License: GPL-2.0-only
@@ -30,7 +30,8 @@
BuildRequires: pkg-config
BuildRequires: perl-XML-Writer
BuildRequires: update-desktop-files
-BuildRequires: yast2-pam
+# Pam.List
+BuildRequires: yast2-pam >= 4.3.1
BuildRequires: yast2-devtools >= 4.2.2
BuildRequires: rubygem(%{rb_default_ruby_abi}:yast-rake) >= 0.2.5
BuildRequires: rubygem(%{rb_default_ruby_abi}:rspec)
@@ -48,6 +49,8 @@
# CFA::SysctlConfig
Requires: yast2 >= 4.2.66
Requires: yast2-ruby-bindings >= 1.0.0
+# Pam.List
+Requires: yast2-pam >= 4.3.1
Provides: y2c_sec yast2-config-security
Provides: yast2-trans-security y2t_sec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/autoyast-rnc/security.rnc new/yast2-security-4.3.1/src/autoyast-rnc/security.rnc
--- old/yast2-security-4.3.0/src/autoyast-rnc/security.rnc 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/autoyast-rnc/security.rnc 2020-07-29 11:04:42.000000000 +0200
@@ -35,6 +35,7 @@
passwd_encryption = element passwd_encryption { STRING }
passwd_remember_history = element passwd_remember_history { STRING }
passwd_use_cracklib = element passwd_use_cracklib { STRING }
+passwd_use_pwquality = element passwd_use_pwquality { STRING }
permission_security = element permission_security { STRING }
run_updatedb_as = element run_updatedb_as { STRING }
runlevel3_extra_services = element runlevel3_extra_services { STRING }
@@ -91,6 +92,7 @@
| pass_min_len
| pass_warn_age
| passwd_use_cracklib
+ | passwd_use_pwquality
| permission_security
| run_updatedb_as
| runlevel3_extra_services
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/clients/security.rb new/yast2-security-4.3.1/src/clients/security.rb
--- old/yast2-security-4.3.0/src/clients/security.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/clients/security.rb 2020-07-29 11:04:42.000000000 +0200
@@ -50,8 +50,6 @@
Yast.include self, "security/wizards.rb"
-
-
# the command line description map
@cmdline = {
"id" => "security",
@@ -142,7 +140,7 @@
"mappings" => {
"summary" => [],
"level" => ["workstation", "roaming", "server"],
- #FIXME 1,2,3 aliases
+ #FIXME: 1,2,3 aliases
"set" => [
"passwd",
"crack",
@@ -216,10 +214,10 @@
end
if Builtins.haskey(options, "crack") &&
Ops.get_string(options, "crack", "") !=
- Ops.get(Security.Settings, "PASSWD_USE_CRACKLIB", "")
+ Ops.get(Security.Settings, "PASSWD_USE_PWQUALITY", "")
Ops.set(
Security.Settings,
- "PASSWD_USE_CRACKLIB",
+ "PASSWD_USE_PWQUALITY",
Ops.get_string(options, "crack", "yes")
)
Security.modified = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/data/security/level1.yml new/yast2-security-4.3.1/src/data/security/level1.yml
--- old/yast2-security-4.3.0/src/data/security/level1.yml 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/data/security/level1.yml 2020-07-29 11:04:42.000000000 +0200
@@ -14,7 +14,7 @@
HIBERNATE_SYSTEM: active_console
PASSWD_ENCRYPTION: sha512
PASSWD_REMEMBER_HISTORY: '0'
-PASSWD_USE_CRACKLIB: 'yes'
+PASSWD_USE_PWQUALITY: 'yes'
PASS_MAX_DAYS: '99999'
PASS_MIN_DAYS: '1'
PASS_MIN_LEN: '5'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/data/security/level2.yml new/yast2-security-4.3.1/src/data/security/level2.yml
--- old/yast2-security-4.3.0/src/data/security/level2.yml 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/data/security/level2.yml 2020-07-29 11:04:42.000000000 +0200
@@ -14,7 +14,7 @@
HIBERNATE_SYSTEM: active_console
PASSWD_ENCRYPTION: sha512
PASSWD_REMEMBER_HISTORY: '0'
-PASSWD_USE_CRACKLIB: 'yes'
+PASSWD_USE_PWQUALITY: 'yes'
PASS_MAX_DAYS: '99999'
PASS_MIN_DAYS: '1'
PASS_MIN_LEN: '5'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/data/security/level3.yml new/yast2-security-4.3.1/src/data/security/level3.yml
--- old/yast2-security-4.3.0/src/data/security/level3.yml 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/data/security/level3.yml 2020-07-29 11:04:42.000000000 +0200
@@ -14,7 +14,7 @@
HIBERNATE_SYSTEM: active_console
PASSWD_ENCRYPTION: sha512
PASSWD_REMEMBER_HISTORY: '0'
-PASSWD_USE_CRACKLIB: 'yes'
+PASSWD_USE_PWQUALITY: 'yes'
PASS_MAX_DAYS: '99999'
PASS_MIN_DAYS: '1'
PASS_MIN_LEN: '6'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/include/security/dialogs.rb new/yast2-security-4.3.1/src/include/security/dialogs.rb
--- old/yast2-security-4.3.0/src/include/security/dialogs.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/include/security/dialogs.rb 2020-07-29 11:04:42.000000000 +0200
@@ -167,7 +167,6 @@
ret
end
-
def OverviewText(type)
ret = ""
ret_table = []
@@ -319,7 +318,6 @@
end
end
-
if type == :table
Builtins.y2debug("Overview table: %1", ret_table)
return deep_copy(ret_table)
@@ -358,7 +356,6 @@
srvs = Ops.add(Ops.add(srvs, group), "<BR>")
end
-
# richtext message: %1 = runlevel ("3" or "5"), %2 = list of services
help +=
_("<P>These basic system services are not enabled:<BR><B>%s</B></P>") % srvs
@@ -747,7 +744,7 @@
0.15,
_("Checks"),
VBox(
- settings2widget("PASSWD_USE_CRACKLIB"),
+ settings2widget("PASSWD_USE_PWQUALITY"),
VSeparator(),
settings2widget("PASS_MIN_LEN"),
VSeparator(),
@@ -800,7 +797,7 @@
UI.ChangeWidget(
Id("PASS_MIN_LEN"),
:Enabled,
- Ops.get(Security.Settings, "PASSWD_USE_CRACKLIB", "") == "yes"
+ Ops.get(Security.Settings, "PASSWD_USE_PWQUALITY", "") == "yes"
)
ret = nil
@@ -816,8 +813,8 @@
end
elsif ret == :back
break
- elsif ret == "PASSWD_USE_CRACKLIB"
- # minlen is an option for pam_cracklib
+ elsif ret == "PASSWD_USE_PWQUALITY"
+ # minlen is an option for pam_pwquality
UI.ChangeWidget(
Id("PASS_MIN_LEN"),
:Enabled,
@@ -874,7 +871,7 @@
widget2settings("PASS_MIN_DAYS")
widget2settings("PASS_MAX_DAYS")
widget2settings("PASS_MIN_LEN")
- widget2settings("PASSWD_USE_CRACKLIB")
+ widget2settings("PASSWD_USE_PWQUALITY")
widget2settings("PASS_WARN_AGE")
widget2settings("PASSWD_ENCRYPTION")
widget2settings("PASSWD_REMEMBER_HISTORY")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/include/security/helps.rb new/yast2-security-4.3.1/src/include/security/helps.rb
--- old/yast2-security-4.3.0/src/include/security/helps.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/include/security/helps.rb 2020-07-29 11:04:42.000000000 +0200
@@ -334,7 +334,6 @@
"<P>Every running service is a potential target of a security attack. Therefore it is recommended to turn off all services which are not used by the system.</P>"
)
}
-
end
def boot_dialog_help
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/include/security/levels.rb new/yast2-security-4.3.1/src/include/security/levels.rb
--- old/yast2-security-4.3.0/src/include/security/levels.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/include/security/levels.rb 2020-07-29 11:04:42.000000000 +0200
@@ -71,6 +71,7 @@
@Levels = @LevelsNames.keys.each_with_object({}) do |level, levels|
lfile = Directory.find_data_file("security/#{level.downcase}.yml")
raise(Errno::ENOENT, "#{level.downcase}.yml file not found") unless lfile
+
levels[level] = YAML.load_file(lfile)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/include/security/widgets.rb new/yast2-security-4.3.1/src/include/security/widgets.rb
--- old/yast2-security-4.3.0/src/include/security/widgets.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/include/security/widgets.rb 2020-07-29 11:04:42.000000000 +0200
@@ -186,7 +186,7 @@
"Value" => "des",
"Notify" => "yes"
},
- "PASSWD_USE_CRACKLIB" => {
+ "PASSWD_USE_PWQUALITY" => {
"Widget" => "CheckBox",
# CheckBox label
"Label" => _("&Check New Passwords"),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/lib/security/ctrl_alt_del_config.rb new/yast2-security-4.3.1/src/lib/security/ctrl_alt_del_config.rb
--- old/yast2-security-4.3.0/src/lib/security/ctrl_alt_del_config.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/lib/security/ctrl_alt_del_config.rb 2020-07-29 11:04:42.000000000 +0200
@@ -56,6 +56,7 @@
def current
return current_systemd if systemd?
return current_inittab if inittab?
+
nil
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/lib/security/display_manager.rb new/yast2-security-4.3.1/src/lib/security/display_manager.rb
--- old/yast2-security-4.3.0/src/lib/security/display_manager.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/lib/security/display_manager.rb 2020-07-29 11:04:42.000000000 +0200
@@ -37,7 +37,6 @@
private_class_method :new
attr_reader :name
-
def self.current
configured_dm = Yast::SCR.Read(Yast::Path.new(CONFIG_PATH)).to_s
configured_dm.empty? ? nil : new(configured_dm)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/src/modules/Security.rb new/yast2-security-4.3.1/src/modules/Security.rb
--- old/yast2-security-4.3.0/src/modules/Security.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/src/modules/Security.rb 2020-07-29 11:04:42.000000000 +0200
@@ -64,7 +64,6 @@
"USERDEL_POSTCMD"
].freeze
-
attr_reader :display_manager
def main
@@ -87,7 +86,6 @@
end
def init_settings
-
# Services to check
srv_file = Directory.find_data_file("security/services.yml")
if srv_file
@@ -126,7 +124,7 @@
"GID_MIN" => "1000",
"HIBERNATE_SYSTEM" => "active_console",
"PASSWD_ENCRYPTION" => "sha512",
- "PASSWD_USE_CRACKLIB" => "yes",
+ "PASSWD_USE_PWQUALITY" => "yes",
"PASS_MAX_DAYS" => "99999",
"PASS_MIN_DAYS" => "0",
"PASS_MIN_LEN" => "5",
@@ -195,7 +193,7 @@
}
# Mapping of /etc/sysctl.conf keys to old (obsoleted) sysconfig ones
- # (used during autoYaST import
+ # (used during autoYaST import)
@sysctl2sysconfig = {
"kernel.sysrq" => "ENABLE_SYSRQ",
"net.ipv4.tcp_syncookies" => "IP_TCP_SYNCOOKIES",
@@ -280,6 +278,7 @@
# @return blah blah lahjk
def Abort
return Builtins.eval(@AbortFunction) == true if @AbortFunction != nil
+
false
end
@@ -323,7 +322,7 @@
# Read the information about ctrl+alt+del behavior
# See bug 742783 for description
def ReadConsoleShutdown
- @Settings["CONSOLE_SHUTDOWN"] = ::Security::CtrlAltDelConfig.current || ::Security::CtrlAltDelConfig.default
+ @Settings["CONSOLE_SHUTDOWN"] = ::Security::CtrlAltDelConfig.current || ::Security::CtrlAltDelConfig.default
end
# Read the settings from the files included in @Locations
@@ -382,16 +381,16 @@
def read_pam_settings
read_encryption_method
- # cracklib and pwhistory settings (default values)
+ # pwquality and pwhistory settings (default values)
@Settings["PASS_MIN_LEN"] = "5"
@Settings["PASSWD_REMEMBER_HISTORY"] = "0"
@Settings["CRACKLIB_DICT_PATH"] = "/usr/lib/cracklib_dict"
- pam_cracklib = Pam.Query("cracklib") || {}
- @Settings["PASSWD_USE_CRACKLIB"] = pam_cracklib.size > 0 ? "yes" : "no"
+ pam_pwquality = Pam.Query(pwquality_module) || {}
+ @Settings["PASSWD_USE_PWQUALITY"] = pam_pwquality.size > 0 ? "yes" : "no"
- pam_cracklib.fetch("password", []).each do |entry|
- key,value = entry.split("=")
+ pam_pwquality.fetch("password", []).each do |entry|
+ key, value = entry.split("=")
if value
@Settings["CRACKLIB_DICT_PATH"] = value if key == "dictpath"
@Settings["PASS_MIN_LEN"] = value if key == "minlen"
@@ -400,7 +399,7 @@
pam_history = Pam.Query("pwhistory") || {}
pam_history.fetch("password", []).each do |entry|
- key,value = entry.split("=")
+ key, value = entry.split("=")
if key == "remember" && value
@Settings["PASSWD_REMEMBER_HISTORY"] = value
end
@@ -440,6 +439,17 @@
"#{@Settings['HIBERNATE_SYSTEM']}"
end
+ # The name of the PAM module to deal with password quality. Either
+ # "pwquality" or "cracklib". See bug #1171318 why this is needed.
+ def pwquality_module
+ return @mod_name if @mod_name
+
+ # Both pwquality and cracklib can be installed. in that case
+ # cracklib seems to be a non-functional deprecated module. So
+ # prefer pwquality.
+ @mod_name = Pam.List.include?("pwquality") ? "pwquality" : "cracklib"
+ end
+
# Read all security settings
# @return true on success
def Read
@@ -545,24 +555,24 @@
# Write settings related to PAM behavior
def write_pam_settings
- # use cracklib?
- if @Settings["PASSWD_USE_CRACKLIB"] == "yes"
- Pam.Add("cracklib")
+ # use pwquality?
+ if @Settings["PASSWD_USE_PWQUALITY"] == "yes"
+ Pam.Add(pwquality_module)
pth = @Settings["CRACKLIB_DICT_PATH"]
if pth && pth != "/usr/lib/cracklib_dict"
- Pam.Add("--cracklib-dictpath=#{pth}")
+ Pam.Add(pwquality_module + "-dictpath=#{pth}")
end
else
- Pam.Remove("cracklib")
+ Pam.Remove(pwquality_module)
end
# save min pass length
min_len = @Settings["PASS_MIN_LEN"]
- if min_len && min_len != "5" && @Settings["PASSWD_USE_CRACKLIB"] == "yes"
- Pam.Add("cracklib") # minlen is part of cracklib
- Pam.Add("cracklib-minlen=#{min_len}")
+ if min_len && min_len != "5" && @Settings["PASSWD_USE_PWQUALITY"] == "yes"
+ Pam.Add(pwquality_module) # minlen is part of pwquality
+ Pam.Add(pwquality_module + "-minlen=#{min_len}")
else
- Pam.Remove("cracklib-minlen")
+ Pam.Remove(pwquality_module + "-minlen")
end
# save "remember" value (number of old user passwords to not allow)
@@ -642,6 +652,7 @@
# NOTE: the call to #sort is only needed to satisfy the old testsuite
@activation_mapping.sort.each do |setting, action|
next if @Settings[setting] == @Settings_bak[setting]
+
log.info(
"Option #{setting} has been modified, "\
"activating the change: #{action}"
@@ -655,6 +666,7 @@
# @return true on success
def Write
return true if !@modified
+
log.info "Writing configuration"
# Security read dialog caption
@@ -694,6 +706,7 @@
# Write security settings
return false if Abort()
+
Progress.NextStage
if !@Settings["PERMISSION_SECURITY"].include?("local")
@Settings["PERMISSION_SECURITY"] << " local"
@@ -703,11 +716,13 @@
# Write inittab settings
return false if Abort()
+
Progress.NextStage
write_console_shutdown((a)Settings.fetch("CONSOLE_SHUTDOWN", "ignore"))
# Write authentication and privileges settings
return false if Abort()
+
Progress.NextStage
write_pam_settings
write_polkit_settings
@@ -715,14 +730,17 @@
# Finish him
return false if Abort()
+
Progress.NextStage
apply_new_settings(sysctl: sysctl_modified)
return false if Abort()
+
Progress.NextStage
activate_changes
return false if Abort()
+
@modified = false
true
end
@@ -753,6 +771,10 @@
end
end
+ if settings.key?("PASSWD_USE_CRACKLIB")
+ settings["PASSWD_USE_PWQUALITY"] = settings.delete("PASSWD_USE_CRACKLIB")
+ end
+
return true if settings == {}
@modified = true
@@ -786,6 +808,10 @@
end
end
+ if pwquality_module == "cracklib"
+ settings["PASSWD_USE_CRACKLIB"] = settings.delete("PASSWD_USE_PWQUALITY")
+ end
+
settings
end
@@ -897,6 +923,7 @@
# @return [Yast2::CFA::SysctlConfig]
def sysctl_config
return @sysctl_config if @sysctl_config
+
@sysctl_config = CFA::SysctlConfig.new
@sysctl_config.load
@sysctl_config
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/test/levels_test.rb new/yast2-security-4.3.1/test/levels_test.rb
--- old/yast2-security-4.3.0/test/levels_test.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/test/levels_test.rb 2020-07-29 11:04:42.000000000 +0200
@@ -60,9 +60,10 @@
let(:empty_bash_output) { {"exit" => 0, "stdout" => "", "stderr" => ""} }
it "defines the system behavior" do
- expect(SCR).to exec_bash_output("/usr/sbin/pam-config -a --cracklib")
+ allow(Pam).to receive(:List).and_return(["pwquality", "pwhistory"])
+ expect(SCR).to exec_bash_output("/usr/sbin/pam-config -a --pwquality")
.and_return(empty_bash_output)
- expect(SCR).to exec_bash_output("/usr/sbin/pam-config -d --cracklib-minlen")
+ expect(SCR).to exec_bash_output("/usr/sbin/pam-config -d --pwquality-minlen")
.and_return(empty_bash_output)
expect(SCR).to exec_bash_output("/usr/sbin/pam-config -d --pwhistory-remember")
.and_return(empty_bash_output)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-security-4.3.0/test/security_test.rb new/yast2-security-4.3.1/test/security_test.rb
--- old/yast2-security-4.3.0/test/security_test.rb 2020-05-12 17:38:04.000000000 +0200
+++ new/yast2-security-4.3.1/test/security_test.rb 2020-07-29 11:04:42.000000000 +0200
@@ -533,19 +533,19 @@
Security.read_pam_settings
end
- it "sets cracklib settings" do
+ it "sets pwquality settings" do
allow(Pam).to receive(:Query).with("pwhistory")
- allow(Pam).to receive(:Query).with("cracklib")
+ allow(Pam).to receive(:Query).with("pwquality")
.and_return("password" => ["dictpath=/shared/cracklib_dict", "minlen="])
Security.read_pam_settings
- expect(Security.Settings["PASSWD_USE_CRACKLIB"]).to eql("yes")
+ expect(Security.Settings["PASSWD_USE_PWQUALITY"]).to eql("yes")
expect(Security.Settings["CRACKLIB_DICT_PATH"]).to eql("/shared/cracklib_dict")
expect(Security.Settings["PASS_MIN_LEN"]).to eql("5")
end
it "sets password remember history settings" do
- allow(Pam).to receive(:Query).with("cracklib")
+ allow(Pam).to receive(:Query).with("pwquality")
allow(Pam).to receive(:Query).with("pwhistory")
.and_return("password" => ["remember=5"])
@@ -739,7 +739,7 @@
describe "#Import" do
before do
# GENERAL
- Security.Settings["FAIL_DELAY"] = "5"
+ Security.Settings["FAIL_DELAY"] = "5"
Security.Settings["PASS_MIN_LEN"] = "3"
Security.Settings["MANDATORY_SERVICES"] = "no"
1
0
Hello community,
here is the log from the commit of package yast2-add-on for openSUSE:Factory checked in at 2020-07-30 10:00:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-add-on (Old)
and /work/SRC/openSUSE:Factory/.yast2-add-on.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-add-on"
Thu Jul 30 10:00:02 2020 rev:108 rq:823342 version:4.3.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-add-on/yast2-add-on.changes 2020-07-21 15:48:48.124177847 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-add-on.new.3592/yast2-add-on.changes 2020-07-30 10:00:21.487230445 +0200
@@ -1,0 +2,7 @@
+Tue Jul 28 14:05:54 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Fix the schema definition for the add_on_products
+ and add_on_others elements (boo#1174424).
+- 4.3.3
+
+-------------------------------------------------------------------
Old:
----
yast2-add-on-4.3.2.tar.bz2
New:
----
yast2-add-on-4.3.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-add-on.spec ++++++
--- /var/tmp/diff_new_pack.AFIiqu/_old 2020-07-30 10:00:22.151230842 +0200
+++ /var/tmp/diff_new_pack.AFIiqu/_new 2020-07-30 10:00:22.155230845 +0200
@@ -17,7 +17,7 @@
Name: yast2-add-on
-Version: 4.3.2
+Version: 4.3.3
Release: 0
Summary: YaST2 - Add-On media installation code
License: GPL-2.0-only
++++++ yast2-add-on-4.3.2.tar.bz2 -> yast2-add-on-4.3.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-add-on-4.3.2/package/yast2-add-on.changes new/yast2-add-on-4.3.3/package/yast2-add-on.changes
--- old/yast2-add-on-4.3.2/package/yast2-add-on.changes 2020-07-19 23:21:03.000000000 +0200
+++ new/yast2-add-on-4.3.3/package/yast2-add-on.changes 2020-07-29 11:04:01.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Tue Jul 28 14:05:54 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
+
+- Fix the schema definition for the add_on_products
+ and add_on_others elements (boo#1174424).
+- 4.3.3
+
+-------------------------------------------------------------------
Thu Jul 16 10:17:01 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
- Do not export registered add-ons, as they should be included
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-add-on-4.3.2/package/yast2-add-on.spec new/yast2-add-on-4.3.3/package/yast2-add-on.spec
--- old/yast2-add-on-4.3.2/package/yast2-add-on.spec 2020-07-19 23:21:03.000000000 +0200
+++ new/yast2-add-on-4.3.3/package/yast2-add-on.spec 2020-07-29 11:04:01.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-add-on
-Version: 4.3.2
+Version: 4.3.3
Release: 0
Summary: YaST2 - Add-On media installation code
License: GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-add-on-4.3.2/src/autoyast-rnc/add-on.rnc new/yast2-add-on-4.3.3/src/autoyast-rnc/add-on.rnc
--- old/yast2-add-on-4.3.2/src/autoyast-rnc/add-on.rnc 2020-07-19 23:21:03.000000000 +0200
+++ new/yast2-add-on-4.3.3/src/autoyast-rnc/add-on.rnc 2020-07-29 11:04:01.000000000 +0200
@@ -78,7 +78,7 @@
#
add_on_products =
element add_on_products {
- attribute config:type { text }?,
+ LIST,
listentry*
}
#
@@ -91,6 +91,6 @@
#
add_on_others =
element add_on_others {
- attribute config:type { text }?,
+ LIST,
listentry*
}
1
0
Hello community,
here is the log from the commit of package yast2-users for openSUSE:Factory checked in at 2020-07-30 09:59:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-users (Old)
and /work/SRC/openSUSE:Factory/.yast2-users.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-users"
Thu Jul 30 09:59:55 2020 rev:234 rq:823189 version:4.3.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-users/yast2-users.changes 2020-07-21 15:47:54.208111189 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-users.new.3592/yast2-users.changes 2020-07-30 10:00:19.291229134 +0200
@@ -1,0 +2,7 @@
+Fri Jul 24 14:00:40 UTC 2020 - David Diaz <dgonzalez(a)suse.com>
+
+- Load the right nsswitch.conf from either, /usr/etc or /etc
+- Related to bsc#1173119.
+- 4.3.5
+
+-------------------------------------------------------------------
Old:
----
yast2-users-4.3.4.tar.bz2
New:
----
yast2-users-4.3.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.g1L0Dd/_old 2020-07-30 10:00:20.151229648 +0200
+++ /var/tmp/diff_new_pack.g1L0Dd/_new 2020-07-30 10:00:20.151229648 +0200
@@ -17,7 +17,7 @@
Name: yast2-users
-Version: 4.3.4
+Version: 4.3.5
Release: 0
Summary: YaST2 - User and Group Configuration
License: GPL-2.0-only
@@ -46,8 +46,8 @@
Requires: perl-gettext
Requires: yast2-country
-# Autologin.supported?
-Requires: yast2-pam >= 4.2.0
+# CFA::Nsswitch
+Requires: yast2-pam >= 4.3.0
Requires: yast2-security
++++++ yast2-users-4.3.4.tar.bz2 -> yast2-users-4.3.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.3.4/package/yast2-users.changes new/yast2-users-4.3.5/package/yast2-users.changes
--- old/yast2-users-4.3.4/package/yast2-users.changes 2020-07-15 09:41:52.000000000 +0200
+++ new/yast2-users-4.3.5/package/yast2-users.changes 2020-07-28 17:02:15.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Jul 24 14:00:40 UTC 2020 - David Diaz <dgonzalez(a)suse.com>
+
+- Load the right nsswitch.conf from either, /usr/etc or /etc
+- Related to bsc#1173119.
+- 4.3.5
+
+-------------------------------------------------------------------
Tue Jul 14 15:06:32 UTC 2020 - José Iván López González <jlopez(a)suse.com>
- Use available kadmin.local binary (either at /usr/lib/mit/sbin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.3.4/package/yast2-users.spec new/yast2-users-4.3.5/package/yast2-users.spec
--- old/yast2-users-4.3.4/package/yast2-users.spec 2020-07-15 09:41:52.000000000 +0200
+++ new/yast2-users-4.3.5/package/yast2-users.spec 2020-07-28 17:02:15.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-users
-Version: 4.3.4
+Version: 4.3.5
Release: 0
Summary: YaST2 - User and Group Configuration
License: GPL-2.0-only
@@ -46,8 +46,8 @@
Requires: perl-gettext
Requires: yast2-country
-# Autologin.supported?
-Requires: yast2-pam >= 4.2.0
+# CFA::Nsswitch
+Requires: yast2-pam >= 4.3.0
Requires: yast2-security
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-users-4.3.4/src/modules/Users.pm new/yast2-users-4.3.5/src/modules/Users.pm
--- old/yast2-users-4.3.4/src/modules/Users.pm 2020-07-15 09:41:52.000000000 +0200
+++ new/yast2-users-4.3.5/src/modules/Users.pm 2020-07-28 17:02:15.000000000 +0200
@@ -251,6 +251,7 @@
YaST::YCP::Import ("UsersSimple");
YaST::YCP::Import ("UsersUI");
YaST::YCP::Import ("SSHAuthorizedKeys");
+YaST::YCP::Import ("Nsswitch");
##-------------------------------------------------------------------------
##----------------- various routines --------------------------------------
@@ -5750,15 +5751,12 @@
BEGIN { $TYPEINFO{ReadNISAvailable} = ["function", "boolean"];}
sub ReadNISAvailable {
- my $passwd_source = SCR->Read (".etc.nsswitch_conf.passwd");
- if (defined $passwd_source) {
- foreach my $source (split (/ /, $passwd_source)) {
+ my $passwd_source = Nsswitch->ReadDb ("passwd");
- if ($source eq "nis" || $source eq "compat") {
- return (Package->Installed ("ypbind") && Service->Status ("ypbind") == 0);
- }
- }
+ if ( grep ( /^(nis|compat)$/, @$passwd_source ) ) {
+ return (Package->Installed ("ypbind") && Service->Status ("ypbind") == 0);
}
+
return 0;
}
##-------------------------------------------------------------------------
1
0
Hello community,
here is the log from the commit of package yast2-nis-client for openSUSE:Factory checked in at 2020-07-30 09:59:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-nis-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-nis-client.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-nis-client"
Thu Jul 30 09:59:50 2020 rev:74 rq:823184 version:4.3.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-nis-client/yast2-nis-client.changes 2020-06-14 18:14:58.326775645 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-nis-client.new.3592/yast2-nis-client.changes 2020-07-30 10:00:14.511226280 +0200
@@ -1,0 +2,13 @@
+Tue Jul 28 12:49:27 UTC 2020 - Ancor Gonzalez Sosa <ancor(a)suse.com>
+
+- Fixed the mechanism used to ensure the usage of "compat" for
+ certain databases (bsc#1174603).
+- 4.3.3
+
+-------------------------------------------------------------------
+Fri Jul 24 14:19:42 UTC 2020 - David Diaz <dgonzalez(a)suse.com>
+
+- Properly save the NSS configuration (related to bsc#1173119).
+- 4.3.2
+
+-------------------------------------------------------------------
Old:
----
yast2-nis-client-4.3.1.tar.bz2
New:
----
yast2-nis-client-4.3.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-nis-client.spec ++++++
--- /var/tmp/diff_new_pack.SXkxaT/_old 2020-07-30 10:00:15.875227095 +0200
+++ /var/tmp/diff_new_pack.SXkxaT/_new 2020-07-30 10:00:15.879227097 +0200
@@ -20,7 +20,7 @@
Summary: YaST2 - Network Information Services (NIS, YP) Configuration
License: GPL-2.0-only
Group: System/YaST
-Version: 4.3.1
+Version: 4.3.3
Release: 0
Url: https://github.com/yast/yast-nis-client
@@ -29,20 +29,22 @@
# SuSEfirewall2_* services merged into one service yast2-2.23.17
BuildRequires: doxygen
BuildRequires: gcc-c++
-BuildRequires: libnsl-devel
-BuildRequires: libtirpc-devel
BuildRequires: libtool
BuildRequires: update-desktop-files
BuildRequires: yast2 >= 2.23.17
BuildRequires: yast2-core-devel
+# Nsswitch#Write
+BuildRequires: libnsl-devel
+BuildRequires: libtirpc-devel
BuildRequires: yast2-devtools >= 4.2.2
-BuildRequires: yast2-pam
+BuildRequires: yast2-pam >= 4.3.0
BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
# Wizard::SetDesktopTitleAndIcon
Requires: yast2 >= 2.21.22
Requires: yast2-network
-Requires: yast2-pam
+# Fixed Nsswitch#WriteDb
+Requires: yast2-pam >= 4.3.2
Requires: yast2-ruby-bindings >= 1.0.0
Requires: yp-tools
++++++ yast2-nis-client-4.3.1.tar.bz2 -> yast2-nis-client-4.3.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nis-client-4.3.1/package/yast2-nis-client.changes new/yast2-nis-client-4.3.3/package/yast2-nis-client.changes
--- old/yast2-nis-client-4.3.1/package/yast2-nis-client.changes 2020-06-11 16:14:48.000000000 +0200
+++ new/yast2-nis-client-4.3.3/package/yast2-nis-client.changes 2020-07-28 16:32:29.000000000 +0200
@@ -1,4 +1,17 @@
-------------------------------------------------------------------
+Tue Jul 28 12:49:27 UTC 2020 - Ancor Gonzalez Sosa <ancor(a)suse.com>
+
+- Fixed the mechanism used to ensure the usage of "compat" for
+ certain databases (bsc#1174603).
+- 4.3.3
+
+-------------------------------------------------------------------
+Fri Jul 24 14:19:42 UTC 2020 - David Diaz <dgonzalez(a)suse.com>
+
+- Properly save the NSS configuration (related to bsc#1173119).
+- 4.3.2
+
+-------------------------------------------------------------------
Thu Jun 11 11:29:59 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
- Do not export any setting if ypbind is not installed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nis-client-4.3.1/package/yast2-nis-client.spec new/yast2-nis-client-4.3.3/package/yast2-nis-client.spec
--- old/yast2-nis-client-4.3.1/package/yast2-nis-client.spec 2020-06-11 16:14:48.000000000 +0200
+++ new/yast2-nis-client-4.3.3/package/yast2-nis-client.spec 2020-07-28 16:32:29.000000000 +0200
@@ -18,7 +18,7 @@
Name: yast2-nis-client
Summary: YaST2 - Network Information Services (NIS, YP) Configuration
-Version: 4.3.1
+Version: 4.3.3
Release: 0
Url: https://github.com/yast/yast-nis-client
Group: System/YaST
@@ -28,7 +28,9 @@
# SuSEfirewall2_* services merged into one service yast2-2.23.17
BuildRequires: yast2 >= 2.23.17
-BuildRequires: gcc-c++ doxygen yast2-core-devel yast2-pam update-desktop-files libtool
+BuildRequires: gcc-c++ doxygen yast2-core-devel update-desktop-files libtool
+# Nsswitch#Write
+BuildRequires: yast2-pam >= 4.3.0
BuildRequires: libnsl-devel
BuildRequires: libtirpc-devel
BuildRequires: yast2-devtools >= 4.2.2
@@ -36,7 +38,9 @@
# Wizard::SetDesktopTitleAndIcon
Requires: yast2 >= 2.21.22
-Requires: yast2-pam yast2-network
+Requires: yast2-network
+# Fixed Nsswitch#WriteDb
+Requires: yast2-pam >= 4.3.2
Requires: yast2-ruby-bindings >= 1.0.0
Requires: yp-tools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nis-client-4.3.1/src/modules/Nis.rb new/yast2-nis-client-4.3.3/src/modules/Nis.rb
--- old/yast2-nis-client-4.3.1/src/modules/Nis.rb 2020-06-11 16:14:48.000000000 +0200
+++ new/yast2-nis-client-4.3.3/src/modules/Nis.rb 2020-07-28 16:32:29.000000000 +0200
@@ -1048,7 +1048,7 @@
# We get [] meaning compat, so it's ok to make it explicit
db_l = Nsswitch.ReadDb(db)
- if db_l.include?("compat")
+ if !db_l.include?("compat")
# remove "files" and "nis", if there;
db_l -= ["files", "nis"]
@@ -1107,11 +1107,7 @@
end
end
- return true if SCR.Write(path(".etc.nsswitch_conf"), nil)
-
- Report.Error(Message.ErrorWritingFile("/etc/nsswitch.conf"))
-
- false
+ Nsswitch.Write
end
# Only write new configuration w/o starting any scripts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-nis-client-4.3.1/test/nis_test.rb new/yast2-nis-client-4.3.3/test/nis_test.rb
--- old/yast2-nis-client-4.3.1/test/nis_test.rb 2020-06-11 16:14:48.000000000 +0200
+++ new/yast2-nis-client-4.3.3/test/nis_test.rb 2020-07-28 16:32:29.000000000 +0200
@@ -19,6 +19,7 @@
allow(Yast::Service).to receive(:Status).and_return(0)
allow(Y2Firewall::Firewalld.instance).to receive(:read)
allow(Yast::Autologin).to receive(:Read)
+ allow(Yast::Nsswitch).to receive(:Write).and_return(true)
allow(Yast::Nsswitch).to receive(:ReadDb).and_return([])
allow(Yast::Package).to receive(:Installed).and_return(true)
1
0
Hello community,
here is the log from the commit of package yast2-pam for openSUSE:Factory checked in at 2020-07-30 09:59:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-pam (Old)
and /work/SRC/openSUSE:Factory/.yast2-pam.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-pam"
Thu Jul 30 09:59:46 2020 rev:41 rq:823151 version:4.3.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-pam/yast2-pam.changes 2019-08-27 10:14:22.307967598 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-pam.new.3592/yast2-pam.changes 2020-07-30 10:00:11.131224262 +0200
@@ -1,0 +2,19 @@
+Tue Jul 28 11:35:47 UTC 2020 - Ancor Gonzalez Sosa <ancor(a)suse.com>
+
+- Fixed a bug, introduced in the latest version, related to
+ deletion of nsswitch entries (related to bsc#1173119).
+- 4.3.2
+
+-------------------------------------------------------------------
+Tue Jul 28 11:03:14 CEST 2020 - aschnell(a)suse.com
+
+- Added function to query PAM modules (bsc#1171318).
+- 4.3.1
+
+-------------------------------------------------------------------
+Fri Jul 24 11:01:03 UTC 2020 - David Diaz <dgonzalez(a)suse.com>
+
+- Support reading nsswitch.conf from /usr/etc (bsc#1173119).
+- 4.3.0
+
+-------------------------------------------------------------------
Old:
----
yast2-pam-4.2.4.tar.bz2
New:
----
yast2-pam-4.3.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-pam.spec ++++++
--- /var/tmp/diff_new_pack.eFgbS5/_old 2020-07-30 10:00:12.035224802 +0200
+++ /var/tmp/diff_new_pack.eFgbS5/_new 2020-07-30 10:00:12.039224804 +0200
@@ -1,7 +1,7 @@
#
# spec file for package yast2-pam
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,27 +17,35 @@
Name: yast2-pam
-Version: 4.2.4
+Version: 4.3.2
Release: 0
+Summary: YaST2 - PAM Agent
+License: GPL-2.0-only
+Group: System/YaST
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+URL: http://github.com/yast/yast-pam
Source0: %{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Url: http://github.com/yast/yast-pam
+BuildRequires: yast2
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: rubygem(%{rb_default_ruby_abi}:yast-rake)
+# cfa for parsing nsswitch
+BuildRequires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.4
+# lenses are needed to use cfa
+BuildRequires: augeas-lenses
+# testsuite
+BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
Requires: yast2
-
+# cfa for parsing nsswitch
+Requires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.4
+# lenses are needed to use cfa
+Requires: augeas-lenses
Requires: pam-config >= 0.8
-
-BuildArch: noarch
-
Requires: yast2-ruby-bindings >= 1.0.0
-Summary: YaST2 - PAM Agent
-License: GPL-2.0-only
-Group: System/YaST
+BuildArch: noarch
%description
This agent is used by YaST2 to modify the PAM configuration files
@@ -59,6 +67,7 @@
%{yast_moduledir}/*
%dir %{yast_scrconfdir}
%{yast_scrconfdir}/*.scr
+%{yast_libdir}
%dir %{yast_agentdir}
%{yast_agentdir}/ag_passwd
%doc %{yast_docdir}
++++++ yast2-pam-4.2.4.tar.bz2 -> yast2-pam-4.3.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/.rubocop.yml new/yast2-pam-4.3.2/.rubocop.yml
--- old/yast2-pam-4.2.4/.rubocop.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-4.3.2/.rubocop.yml 2020-07-28 14:27:50.000000000 +0200
@@ -0,0 +1,145 @@
+# use the shared YaST defaults
+inherit_from:
+ /usr/share/YaST2/data/devtools/data/rubocop-0.71.0_yast_style.yml
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Layout/EmptyLineAfterGuardClause:
+ Exclude:
+ - 'src/modules/Pam.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
+Layout/EmptyLineBetweenDefs:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Nsswitch.rb'
+
+# Offense count: 3
+# Cop supports --auto-correct.
+Layout/EmptyLines:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Nsswitch.rb'
+
+# Offense count: 15
+# Cop supports --auto-correct.
+# Configuration parameters: IndentationWidth.
+Layout/Tab:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Nsswitch.rb'
+ - 'src/modules/Pam.rb'
+
+# Offense count: 1
+Lint/ShadowingOuterLocalVariable:
+ Exclude:
+ - 'src/modules/Pam.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
+Lint/UnusedMethodArgument:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+
+# Offense count: 5
+# Configuration parameters: CountComments, ExcludedMethods.
+# ExcludedMethods: refine
+Metrics/BlockLength:
+ Exclude:
+ - 'test/**/*'
+
+# Offense count: 3
+# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
+# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
+Naming/FileName:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Nsswitch.rb'
+ - 'src/modules/Pam.rb'
+
+# Offense count: 16
+# Configuration parameters: .
+# SupportedStyles: snake_case, camelCase
+Naming/MethodName:
+ Exclude:
+ - 'src/modules/Nsswitch.rb'
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Pam.rb'
+
+# Offense count: 6
+Style/Documentation:
+ Exclude:
+ - 'spec/**/*'
+ - 'test/**/*'
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Nsswitch.rb'
+ - 'src/modules/Pam.rb'
+
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: compact, expanded
+Style/EmptyMethod:
+ Exclude:
+ - 'src/modules/Pam.rb'
+
+# Offense count: 3
+# Cop supports --auto-correct.
+Style/Encoding:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Nsswitch.rb'
+ - 'src/modules/Pam.rb'
+
+# Offense count: 8
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: always, never
+Style/FrozenStringLiteralComment:
+ Exclude:
+ - 'Rakefile'
+ - 'src/lib/cfa/nsswitch.rb'
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Nsswitch.rb'
+ - 'src/modules/Pam.rb'
+ - 'test/cfa/nsswitch_test.rb'
+ - 'test/nsswitch_test.rb'
+ - 'test/test_helper.rb'
+
+# Offense count: 1
+# Configuration parameters: MinBodyLength.
+Style/GuardClause:
+ Exclude:
+ - 'src/lib/cfa/nsswitch.rb'
+
+# Offense count: 43
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
+# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
+Style/HashSyntax:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+ - 'src/modules/Nsswitch.rb'
+ - 'src/modules/Pam.rb'
+
+# Offense count: 2
+# Cop supports --auto-correct.
+Style/LineEndConcatenation:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle.
+# SupportedStyles: predicate, comparison
+Style/NilComparison:
+ Exclude:
+ - 'src/modules/Autologin.rb'
+
+# Offense count: 1
+# Cop supports --auto-correct.
+Style/RedundantBegin:
+ Exclude:
+ - 'test/nsswitch_test.rb'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/CONTRIBUTING.md new/yast2-pam-4.3.2/CONTRIBUTING.md
--- old/yast2-pam-4.2.4/CONTRIBUTING.md 2019-08-22 15:12:21.000000000 +0200
+++ new/yast2-pam-4.3.2/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100
@@ -1,89 +0,0 @@
-YaST Contribution Guidelines
-============================
-
-YaST is an open source project and as such it welcomes all kinds of
-contributions. If you decide to contribute, please follow these guidelines to
-ensure the process is effective and pleasant both for you and the YaST maintainers.
-
-There are two main forms of contribution: reporting bugs and performing code
-changes.
-
-Bug Reports
------------
-
-If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
-or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
-registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
-if you don't have an account yet.)
-
-When creating a bug report, please follow our [bug reporting
-guidelines](http://en.opensuse.org/openSUSE:Report_a_YaST_bug).
-
-We can't guarantee that every bug will be fixed, but we'll try.
-
-Code Changes
-------------
-
-We welcome all kinds of code contributions, from simple bug fixes to significant
-refactorings and implementation of new features. However, before making any
-non-trivial contribution, get in touch with us first — this can prevent wasted
-effort on both sides. Also, have a look at our [development
-documentation](http://en.opensuse.org/openSUSE:YaST_development).
-
-To send us your code change, use GitHub pull requests. The workflow is as
-follows:
-
- 1. Fork the project.
-
- 2. Create a topic branch based on `master`.
-
- 3. Implement your change, including tests (if possible). Make sure you adhere
- to the [Ruby style
- guide](https://github.com/SUSE/style-guides/blob/master/Ruby.md).
-
- 4. Update the package version (in `packages/*.spec`, usually by
- `rake version:bump`) and add a new entry to the `package/*.changes` file
- (by `osc vc package`).
- For bigger changes or changes which need longer discussion it is advised to
- add this as a separate last commit so it can be easily updated when another
- change is merged in the meantime.
-
- 5. Make sure your change didn't break anything by building the RPM package
- (`rake osc:build`). The build process includes running the full testsuite.
-
- 6. Publish the branch and create a pull request.
-
- 7. YaST developers will review your change and possibly point out issues.
- Adapt the code under their guidance until they are all resolved.
-
- 8. Finally, the pull request will get merged or rejected.
-
-See also [GitHub's guide on
-contributing](https://help.github.com/articles/fork-a-repo).
-
-If you want to do multiple unrelated changes, use separate branches and pull
-requests.
-
-### Commits
-
-Each commit in the pull request should do only one thing, which is clearly
-described by its commit message. Especially avoid mixing formatting changes and
-functional changes into one commit. When writing commit messages, adhere to
-[widely used
-conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
-
-If your commit is related to a bug in Bugzilla or an issue on GitHub, make sure
-you mention it in the commit message for cross-reference. Use format like
-bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
-autolinking](https://help.github.com/articles/github-flavored-markdown#references)
-and [openSUSE abbreviation
-reference](http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Current_set_of_abbreviations).
-
-Additional Information
-----------------------
-
-If you have any question, feel free to ask at the [development mailing
-list](http://lists.opensuse.org/yast-devel/) or at the
-[#yast](http://webchat.freenode.net/?channels=%23yast) IRC channel on freenode.
-We'll do our best to provide a timely and accurate answer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/Rakefile new/yast2-pam-4.3.2/Rakefile
--- old/yast2-pam-4.2.4/Rakefile 2019-08-22 15:12:21.000000000 +0200
+++ new/yast2-pam-4.3.2/Rakefile 2020-07-28 14:27:50.000000000 +0200
@@ -1,6 +1,6 @@
require "yast/rake"
Yast::Tasks.configuration do |conf|
- #lets ignore license check for now
+ # lets ignore license check for now
conf.skip_license_check << /.*/
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/package/yast2-pam.changes new/yast2-pam-4.3.2/package/yast2-pam.changes
--- old/yast2-pam-4.2.4/package/yast2-pam.changes 2019-08-22 15:12:21.000000000 +0200
+++ new/yast2-pam-4.3.2/package/yast2-pam.changes 2020-07-28 14:27:50.000000000 +0200
@@ -1,4 +1,23 @@
-------------------------------------------------------------------
+Tue Jul 28 11:35:47 UTC 2020 - Ancor Gonzalez Sosa <ancor(a)suse.com>
+
+- Fixed a bug, introduced in the latest version, related to
+ deletion of nsswitch entries (related to bsc#1173119).
+- 4.3.2
+
+-------------------------------------------------------------------
+Tue Jul 28 11:03:14 CEST 2020 - aschnell(a)suse.com
+
+- Added function to query PAM modules (bsc#1171318).
+- 4.3.1
+
+-------------------------------------------------------------------
+Fri Jul 24 11:01:03 UTC 2020 - David Diaz <dgonzalez(a)suse.com>
+
+- Support reading nsswitch.conf from /usr/etc (bsc#1173119).
+- 4.3.0
+
+-------------------------------------------------------------------
Thu Aug 22 15:07:52 CEST 2019 - schubi(a)suse.de
- Using rb_default_ruby_abi tag in the spec file in order to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/package/yast2-pam.spec new/yast2-pam-4.3.2/package/yast2-pam.spec
--- old/yast2-pam-4.2.4/package/yast2-pam.spec 2019-08-22 15:12:21.000000000 +0200
+++ new/yast2-pam-4.3.2/package/yast2-pam.spec 2020-07-28 14:27:50.000000000 +0200
@@ -15,29 +15,36 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+Name: yast2-pam
+Version: 4.3.2
+Release: 0
+Summary: YaST2 - PAM Agent
+
+Group: System/YaST
+License: GPL-2.0-only
+URL: http://github.com/yast/yast-pam
+Source0: %{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+BuildRequires: yast2
+BuildRequires: yast2-devtools >= 3.1.10
+BuildRequires: rubygem(%{rb_default_ruby_abi}:yast-rake)
+# cfa for parsing nsswitch
+BuildRequires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.4
+# lenses are needed to use cfa
+BuildRequires: augeas-lenses
+# testsuite
+BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
+
+Requires: yast2
+# cfa for parsing nsswitch
+Requires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.4
+# lenses are needed to use cfa
+Requires: augeas-lenses
+Requires: pam-config >= 0.8
+Requires: yast2-ruby-bindings >= 1.0.0
-Name: yast2-pam
-Version: 4.2.4
-Release: 0
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: %{name}-%{version}.tar.bz2
-
-Group: System/YaST
-License: GPL-2.0-only
-url: http://github.com/yast/yast-pam
-BuildRequires: yast2-devtools >= 3.1.10
-BuildRequires: rubygem(%{rb_default_ruby_abi}:yast-rake)
-
-Requires: yast2
-
-Requires: pam-config >= 0.8
-
-BuildArch: noarch
-
-Requires: yast2-ruby-bindings >= 1.0.0
-
-Summary: YaST2 - PAM Agent
+BuildArch: noarch
%description
This agent is used by YaST2 to modify the PAM configuration files
@@ -59,6 +66,7 @@
%{yast_moduledir}/*
%dir %{yast_scrconfdir}
%{yast_scrconfdir}/*.scr
+%{yast_libdir}
%dir %{yast_agentdir}
%{yast_agentdir}/ag_passwd
%doc %{yast_docdir}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/src/lib/cfa/nsswitch.rb new/yast2-pam-4.3.2/src/lib/cfa/nsswitch.rb
--- old/yast2-pam-4.2.4/src/lib/cfa/nsswitch.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-4.3.2/src/lib/cfa/nsswitch.rb 2020-07-28 14:27:50.000000000 +0200
@@ -0,0 +1,260 @@
+# Copyright (c) [2020] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+require "cfa/base_model"
+require "yast2/target_file"
+
+Yast.import "FileUtils"
+
+module CFA
+ # Model to handle the Name Service Switch configuration file
+ #
+ # @note The NSS configuration file cannot be overwritten partially, which means that once
+ # /etc/nsswith.conf (local) file exists in the system /usr/etc/nsswitch.conf (vendor) will be
+ # completely ignored. In other words, it does not allow to override single entries.
+ # Consequently, to guarantee not losing full distribution provided configuration the content
+ # will be read from the vendor file if the local one does not exist yet but will be always
+ # written to the local file.
+ #
+ # @example Reading service specifications of a database
+ # file = Nsswitch.new
+ # file.load
+ # file.services_for("hosts") #=> ["db", "files"]
+ #
+ # @example Writing service specifications for a database
+ # file = Nsswitch.new
+ # file.load
+ # file.update_entry("hosts", ["db", "files"])
+ # file.save
+ #
+ # @example Deleting a database entry
+ # file = Nsswitch.new
+ # file.load
+ # file.delete_entry("hosts")
+ # file.save
+ #
+ # @example Loading shortcut
+ # file = Nsswitch.load
+ # file.entries #=> ["passwd", "group", "shadow", "hosts", "networks", "aliases"]
+ class Nsswitch < BaseModel
+ include Yast::Logger
+
+ # Path to local configuration file
+ LOCAL_PATH = "/etc/nsswitch.conf".freeze
+ private_constant :LOCAL_PATH
+
+ # Path to vendor configuration file
+ VENDOR_PATH = "/usr/etc/nsswitch.conf".freeze
+ private_constant :VENDOR_PATH
+
+ class << self
+ # Instantiates and loads the file
+ #
+ # This method is basically a shortcut to instantiate and load the content in just one call.
+ #
+ # @param file_handler [#read,#write] something able to read/write a string (like File)
+ # @return [Nsswitch] File with the already loaded content
+ def load(file_handler: Yast::TargetFile)
+ new(file_handler: file_handler).tap(&:load)
+ end
+ end
+
+ attr_reader :load_path, :write_path
+
+ # Constructor
+ #
+ # @param file_handler [#read,#write] something able to read/write a string (like File)
+ #
+ # @see CFA::BaseModel#initialize
+ def initialize(file_handler: Yast::TargetFile)
+ # Path for loading the content
+ @load_path = Yast::FileUtils.Exists(LOCAL_PATH) ? LOCAL_PATH : VENDOR_PATH
+ # Path for writing the content, always the local file
+ @write_path = LOCAL_PATH
+
+ super(AugeasParser.new("nsswitch.lns"), load_path, file_handler: file_handler)
+ end
+
+ # Loads the file content
+ #
+ # If the file does not exist, consider it as empty.
+ #
+ # @see CFA::BaseModel#load
+ def load
+ super
+ fix_collection_names(data)
+ @current_content = @parser.serialize(data)
+ rescue Errno::ENOENT # PATH does not exist yet
+ self.data = @parser.empty
+ @loaded = true
+ end
+
+ # Returns a list of defined databases
+ #
+ # @return [Array<String>] List of database names
+ def entries
+ databases.keys
+ end
+
+ # Service specifications for given database name
+ #
+ # @param db_name [String] the database name, e.g., "passwd" or "hosts"
+ #
+ # @return [Array<String>] database service specifications or empty list if db_name is not found
+ def services_for(db_name)
+ databases[db_name]&.services || []
+ end
+
+ # Update (or create if it does not exist yet) the entry for given database name
+ #
+ #
+ # @note Current services, if any, are completely replaced
+ #
+ # @see #entry_for
+ # @see DatabaseEntry#services=
+ #
+ # @param db_name [String] the database name, e.g., "passwd" or "hosts"
+ # @param services [Array<String>] service specifications for the database
+ def update_entry(db_name, services)
+ database = entry_for(db_name)
+ database.services = services
+ end
+
+ # Delete entry for given database name
+ #
+ # @param db_name [String] the database db_name, e.g., "passwd" or "hosts"
+ def delete_entry(db_name)
+ data.delete(database_matcher(db_name))
+ end
+
+ # Writes the current content to /etc/nsswitch.conf
+ #
+ # @see CFA::BaseModel#save
+ def save
+ @parser.file_name = write_path if @parser.respond_to?(:file_name=)
+ content = @parser.serialize(data)
+
+ if content != @current_content
+ @file_handler.write(write_path, content)
+ @current_content = content
+ end
+ end
+
+ private
+
+ # Return the CFA::Matcher for given database name
+ #
+ # @param db_name [String] the database name, e.g., "passwd" or "hosts"
+ #
+ # @return [CFA::Matcher]
+ def database_matcher(db_name)
+ CFA::Matcher.new { |k, v| k == "database[]" && v.value == db_name }
+ end
+
+ # Find or create the DatabaseEntry for given database name
+ #
+ # @param db_name [String] the database name, e.g., "passwd" or "hosts"
+ #
+ # @return [DatabaseEntry]
+ def entry_for(db_name)
+ return databases[db_name] if databases.keys.include?(db_name)
+
+ database = CFA::AugeasTreeValue.new(CFA::AugeasTree.new, db_name)
+ data.add("database[]", database)
+ DatabaseEntry.new(database)
+ end
+
+ # Available databases
+ #
+ # @return [Hash{String => DatabaseEntry}]
+ def databases
+ raw_databases.each_with_object({}) do |database, collection|
+ name = database[:value].value.to_s
+ collection[name] = DatabaseEntry.new(database[:value])
+ end
+ end
+
+ # Available databases in internal structure
+ #
+ # @return [Array<Hash{Symbol => CFA::AugeasTreeValue, String, Symbol}>]
+ def raw_databases
+ data.select(CFA::Matcher.new(collection: "database"))
+ end
+
+ # Known collection keys
+ COLLECTION_KEYS = ["database", "service"].freeze
+ private_constant :COLLECTION_KEYS
+
+ # Fix collection names adding the missing "[]"
+ #
+ # When a collection has only one element, Augeas does not add "[]" suffix, reason why is
+ # necessary to fix at least those collections that are going to be hitted for either, read or
+ # write.
+ #
+ # @param tree [AugeasTree,AugeasTreeValue]
+ def fix_collection_names(tree)
+ tree.data.each do |entry|
+ entry[:key] << "[]" if COLLECTION_KEYS.include?(entry[:key])
+ fix_collection_names(entry[:value].tree) if entry[:value].is_a?(AugeasTreeValue)
+ fix_collection_names(entry[:value]) if entry[:value].is_a?(AugeasTree)
+ end
+ end
+
+ # Internal class for managing database entries
+ class DatabaseEntry
+ # Constructor
+ #
+ # @param data [CFA::AugeasTreeValue]
+ def initialize(data)
+ @data = data
+ end
+
+ # The database name
+ #
+ # @return [String]
+ def name
+ data.value
+ end
+
+ # The database service specifications
+ #
+ # @return [Array<String>]
+ def services
+ data.tree.collection("service").map(&:to_s)
+ end
+
+ # Set service specifications
+ #
+ # TODO: add support for reactions
+ #
+ # @param services [Array<String>]
+ def services=(services)
+ data.tree.delete("service[]")
+ data.tree.delete("reaction[]")
+
+ services.each { |service| data.tree.add("service[]", service) }
+ end
+
+ private
+
+ attr_reader :data
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/src/modules/Nsswitch.rb new/yast2-pam-4.3.2/src/modules/Nsswitch.rb
--- old/yast2-pam-4.2.4/src/modules/Nsswitch.rb 2019-08-22 15:12:21.000000000 +0200
+++ new/yast2-pam-4.3.2/src/modules/Nsswitch.rb 2020-07-28 14:27:50.000000000 +0200
@@ -27,78 +27,95 @@
#
# $Id$
require "yast"
+require "cfa/nsswitch"
module Yast
class NsswitchClass < Module
def main
-
Yast.import "Message"
Yast.import "Report"
end
# Reads a database entry from nsswitch_conf and returns it as a list
- # @param [String] db eg. "passwd"
- # @return eg. ["files", "nis"]
- def ReadDb(db)
- db_s = Convert.to_string(
- SCR.Read(Builtins.add(path(".etc.nsswitch_conf"), db))
- )
- db_s = "" if db_s == nil
- Builtins.filter(Builtins.splitstring(db_s, " \t")) { |s| s != "" }
+ #
+ # @see CFA::Nsswitch#services_for
+ #
+ # @param db_name [String] database entry name, e.g. "passwd"
+ def ReadDb(db_name)
+ cfa_model.services_for(db_name)
end
- # Writes a database entry as a list to nsswitch_conf
- # @param [String] db eg. "passwd"
- # @param [Array<String>] entries eg. ["files", "nis"]
- # @return success?
- def WriteDb(db, entries)
- entries = deep_copy(entries)
- # if there are no entries, delete the key using nil
- entry = Builtins.mergestring(entries, " ")
- SCR.Write(
- Builtins.add(path(".etc.nsswitch_conf"), db),
- entry == "" ? nil : entry
- )
- end
- # Configures the name service switch for autofs
- # according to chosen settings
- # @param [Boolean] start autofs and service (ldap/nis) should be started
- # @param [String] source for automounter data (ldap/nis)
- # @return success?
+ # Writes a database entry as a list to nsswitch_conf or deletes an existing
+ # database entry
+ #
+ # @see CFA::Nsswitch#update_entry
+ # @see CFA::Nsswitch#delete_entry
+ #
+ # @param db_name [String] database entry name, e.g. "passwd"
+ # @param services [Array<String>] use a valid service specs (e.g. ["files", "nis"])
+ # to write an entry or an empty array to remove the existing entry
+ def WriteDb(db_name, services)
+ # For improved compatibility with the old implementation, check also [""]
+ if services.empty? || services == [""]
+ cfa_model.delete_entry(db_name)
+ else
+ cfa_model.update_entry(db_name, services)
+ end
+ end
+
+ # Configures the name service switch for autofs according to chosen settings
+ #
+ # @see #Write
+ #
+ # @param start [Boolean] whether autofs and service (ldap/nis) should be started
+ # @param source [String] source for automounter data (ldap/nis)
+ #
+ # @return [Boolean] true on success; false otherwise
def WriteAutofs(start, source)
- ok = true
+ automount_services = cfa_model.services_for("automount")
- # nsswitch automount:
- # bracket options not allowed, order does not matter
- automount_l = ReadDb("automount")
- enabled = Builtins.contains(automount_l, source)
- # enable it if it is not enabled yet and both services run
- if start && !enabled
- automount_l = Builtins.add(automount_l, source)
- ok = WriteDb("automount", automount_l)
- ok = ok && SCR.Write(path(".etc.nsswitch_conf"), nil)
- # disable it if it is enabled and either service does not run
- elsif !start && enabled
- automount_l = Builtins.filter(automount_l) { |s| s != source }
- ok = WriteDb("automount", automount_l)
- ok = ok && SCR.Write(path(".etc.nsswitch_conf"), nil)
+ if start
+ automount_services |= [source]
+ else
+ automount_services -= [source]
end
- Report.Error(Message.ErrorWritingFile("/etc/nsswitch.conf")) if !ok
- ok
+ cfa_model.update_entry("automount", automount_services)
+ Write()
end
- # Writes the edited files to the disk
- # @return true on success
+ # Writes changes to the file
+ #
+ # @note sadly, this method will directly report to the user if something goes wrong.
+ #
+ # @return [Boolean] true on success; false otherwise
def Write
- SCR.Write(path(".etc.nsswitch_conf"), nil)
+ cfa_model.save
+ true
+ rescue CFA::AugeasSerializingError
+ Report.Error(Message.ErrorWritingFile(cfa_model.write_path))
+
+ false
+ end
+
+ # Convenience method to force the CFA model reloading for next action
+ #
+ # Especially useful for testing the behavior
+ def reset
+ @cfa_model = nil
end
publish :function => :ReadDb, :type => "list <string> (string)"
publish :function => :WriteDb, :type => "boolean (string, list <string>)"
publish :function => :WriteAutofs, :type => "boolean (boolean, string)"
publish :function => :Write, :type => "boolean ()"
+
+ private
+
+ def cfa_model
+ @cfa_model ||= CFA::Nsswitch.load
+ end
end
Nsswitch = NsswitchClass.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/src/modules/Pam.rb new/yast2-pam-4.3.2/src/modules/Pam.rb
--- old/yast2-pam-4.2.4/src/modules/Pam.rb 2019-08-22 15:12:21.000000000 +0200
+++ new/yast2-pam-4.3.2/src/modules/Pam.rb 2020-07-28 14:27:50.000000000 +0200
@@ -25,14 +25,43 @@
# Authors: Jiri Suchomel <jsuchome(a)suse.cz>
# Flags: Unstable
#
-# $Id$
-#
require "yast"
+require "yast2/execute"
module Yast
class PamClass < Module
+ include Yast::Logger
+
def main
+ end
+
+ PAM_CONFIG_BIN = "/usr/sbin/pam-config".freeze
+
+ # List PAM modules.
+ #
+ # The returned module names do not include the "pam_" prefix nor
+ # the ".so" suffix. So just "pwquality" instead of "pam_pwquality.so".
+ #
+ # @return [Array{String}]
+ def List
+ begin
+ lines = Yast::Execute.locally!(PAM_CONFIG_BIN, "--list-modules",
+ :stdout => :capture).split("\n")
+ rescue Cheetah::ExecutionFailed => e
+ log.error "pam-config --list-modules failed #{e.message}"
+ return []
+ end
+
+ rx = /[ \t]*pam_([a-z0-9_]+)\.so[ \t]*/
+ mods = lines.reduce([]) do |mods, line|
+ m = line.match(rx)
+ m ? mods.push(m[1]) : mods
+ end
+
+ log.info("pam modules #{mods}")
+
+ mods
end
# Query PAM configuration for status of given module
@@ -42,10 +71,7 @@
def Query(mod)
ret = {}
out = Convert.to_map(
- SCR.Execute(
- path(".target.bash_output"),
- Ops.add("/usr/sbin/pam-config -q --", mod)
- )
+ SCR.Execute(path(".target.bash_output"), PAM_CONFIG_BIN + " -q --" + mod)
)
if Ops.get_integer(out, "exit", 0) != 0
Builtins.y2warning("pam-config for %1 returned %2", mod, out)
@@ -78,10 +104,7 @@
# @return success
def Add(mod)
out = Convert.to_map(
- SCR.Execute(
- path(".target.bash_output"),
- Ops.add("/usr/sbin/pam-config -a --", mod)
- )
+ SCR.Execute(path(".target.bash_output"), PAM_CONFIG_BIN + " -a --" + mod)
)
if Ops.get_integer(out, "exit", 0) != 0
Builtins.y2warning("pam-config for %1 returned %2", mod, out)
@@ -95,10 +118,7 @@
# @return success
def Remove(mod)
out = Convert.to_map(
- SCR.Execute(
- path(".target.bash_output"),
- Ops.add("/usr/sbin/pam-config -d --", mod)
- )
+ SCR.Execute(path(".target.bash_output"), PAM_CONFIG_BIN + " -d --" + mod)
)
if Ops.get_integer(out, "exit", 0) != 0
Builtins.y2warning("pam-config for %1 returned %2", mod, out)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/src/scrconf/etc_nsswitch.scr new/yast2-pam-4.3.2/src/scrconf/etc_nsswitch.scr
--- old/yast2-pam-4.2.4/src/scrconf/etc_nsswitch.scr 2019-08-22 15:12:21.000000000 +0200
+++ new/yast2-pam-4.3.2/src/scrconf/etc_nsswitch.scr 1970-01-01 01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-/**
- * File: etc_nsswitch_conf.scr
- * Summary: Agent for reading/writing /etc/nsswitch.conf
- * Access: read / write
- * Author: Petr Blahos <pblahos(a)suse.cz>
- *
- * Example:
- * Dir(.etc.nsswitch_conf)
- * (["passwd", "group", "hosts", "networks", "services"])
- **
- * Read(.etc.nsswitch_conf.passwd)
- * ("compat")
- **
- * Write(.etc.nsswitch_conf.passwd, "files ldap")
- * (true)
- *
- * $Id$
- */
-.etc.nsswitch_conf
-
-`ag_ini(
- `IniAgent( "/etc/nsswitch.conf",
- $[
- "options" : [ "ignore_case", "global_values", "flat" ],
- "comments" : [ "^#.*", "^[ \t]*$", ],
- "params" : [
- $[ "match" : [ "^[ \t]*([a-zA-Z0-9_]+)[ \t]*:[ \t]*(.*[^ \t]|)[ \t]*$", "%s:\t%s" ] ]
- ]
- ]
- )
-)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/test/cfa/nsswitch_test.rb new/yast2-pam-4.3.2/test/cfa/nsswitch_test.rb
--- old/yast2-pam-4.2.4/test/cfa/nsswitch_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-4.3.2/test/cfa/nsswitch_test.rb 2020-07-28 14:27:50.000000000 +0200
@@ -0,0 +1,184 @@
+# Copyright (c) [2020] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require_relative "../test_helper"
+require "cfa/nsswitch"
+require "cfa/memory_file"
+
+describe CFA::Nsswitch do
+ subject { described_class.new(file_handler: file_handler) }
+
+ let(:file_handler) { Yast::TargetFile }
+ let(:scenario) { "custom" }
+
+ around do |example|
+ change_scr_root(File.join(DATA_PATH, "nsswitch.conf", scenario), &example)
+ end
+
+ describe "#load" do
+ context "when /etc/nsswitch.conf exists" do
+ before do
+ allow(file_handler).to receive(:read).and_call_original
+ end
+
+ it "does not read /usr/etc/nsswitch.conf file" do
+ expect(file_handler).to_not receive(:read)
+ .with("/usr/etc/nsswitch.conf")
+ subject.load
+ end
+
+ it "reads /etc/nsswitch.conf file" do
+ expect(file_handler).to receive(:read)
+ .with("/etc/nsswitch.conf")
+ .and_call_original
+ subject.load
+ end
+ end
+
+ context "when /etc/nsswitch.conf does not exist" do
+ let(:scenario) { "vendor" }
+
+ it "reads vendor files" do
+ expect(file_handler).to receive(:read)
+ .with("/usr/etc/nsswitch.conf")
+ .and_call_original
+ subject.load
+ end
+ end
+ end
+
+ describe "#save" do
+ before { subject.load }
+
+ let(:file_handler) { CFA::MemoryFile.new(file_content) }
+ let(:file_content) do
+ <<~CONTENT
+ # An custom Name Service Switch config file.
+ #
+ # Valid databases are: aliases, ethers, group, gshadow, hosts,
+ # initgroups, netgroup, networks, passwd, protocols, publickey,
+ # rpc, services, and shadow.
+
+ passwd: compat
+ group: compat
+ shadow: compat
+
+ hosts: db files
+ CONTENT
+ end
+
+ context "when it has changed" do
+ before do
+ subject.update_entry("hosts", ["dns", "nis"])
+ end
+
+ it "writes requested changes" do
+ subject.save
+
+ expect(file_handler.content).to match(/hosts:\s+dns nis/)
+ expect(file_handler.content).to_not match(/hosts: db files/)
+ end
+
+ it "writes to /etc/nsswitch.conf file" do
+ expect(file_handler).to receive(:write)
+ .with("/etc/nsswitch.conf", anything)
+ subject.save
+ end
+
+ it "does not write to /usr/etc/nsswitch.conf file" do
+ expect(file_handler).to_not receive(:write)
+ .with("/user/etc/nsswitch.conf", anything)
+ subject.save
+ end
+ end
+
+ context "when it has not changed" do
+ it "does nothing" do
+ expect(file_handler).to_not receive(:write)
+
+ subject.save
+
+ expect(file_handler.content).to eq(file_content)
+ end
+ end
+ end
+
+ describe "#entries" do
+ before { subject.load }
+
+ it "returns the database names currently present in the configuration" do
+ expect(subject.entries).to eq(["passwd", "group", "shadow", "hosts"])
+ end
+ end
+
+ describe "#services_for" do
+ before { subject.load }
+
+ context "when given an available database entry" do
+ it "returns the service specifications for given database name" do
+ expect(subject.services_for("hosts")).to eq(["db", "files"])
+ end
+ end
+
+ context "when given a not available database entry" do
+ it "returns an empty list" do
+ expect(subject.services_for("foo")).to eq([])
+ end
+ end
+ end
+
+ describe "#update_entry" do
+ before { subject.load }
+
+ context "when given an available database entry" do
+ it "changes database entry to use given services" do
+ old_services = subject.services_for("hosts")
+ new_services = ["other", "services"]
+ subject.update_entry("hosts", new_services)
+ updated_services = subject.services_for("hosts")
+
+ expect(updated_services).to eq(new_services)
+ expect(updated_services).to_not eq(old_services)
+ end
+ end
+
+ context "when given a not available database entry" do
+ it "creates the database entry with given services" do
+ expect(subject.entries).to_not include("foo")
+
+ subject.update_entry("foo", ["bar"])
+
+ expect(subject.entries).to include("foo")
+ expect(subject.services_for("foo")).to eq(["bar"])
+ end
+ end
+ end
+
+ describe "#delete_entry" do
+ before { subject.load }
+
+ it "deletes given entry" do
+ expect(subject.services_for("hosts")).to eq(["db", "files"])
+
+ subject.delete_entry("hosts")
+
+ expect(subject.services_for("hosts")).to eq([])
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/test/data/nsswitch.conf/custom/etc/nsswitch.conf new/yast2-pam-4.3.2/test/data/nsswitch.conf/custom/etc/nsswitch.conf
--- old/yast2-pam-4.2.4/test/data/nsswitch.conf/custom/etc/nsswitch.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-4.3.2/test/data/nsswitch.conf/custom/etc/nsswitch.conf 2020-07-28 14:27:50.000000000 +0200
@@ -0,0 +1,13 @@
+# /etc/nsswitch.conf
+#
+# An custom Name Service Switch config file.
+#
+# Valid databases are: aliases, ethers, group, gshadow, hosts,
+# initgroups, netgroup, networks, passwd, protocols, publickey,
+# rpc, services, and shadow.
+
+passwd: compat
+group: compat
+shadow: compat
+
+hosts: db files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/test/data/nsswitch.conf/custom/usr/etc/nsswitch.conf new/yast2-pam-4.3.2/test/data/nsswitch.conf/custom/usr/etc/nsswitch.conf
--- old/yast2-pam-4.2.4/test/data/nsswitch.conf/custom/usr/etc/nsswitch.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-4.3.2/test/data/nsswitch.conf/custom/usr/etc/nsswitch.conf 2020-07-28 14:27:50.000000000 +0200
@@ -0,0 +1,74 @@
+#
+# /etc/nsswitch.conf
+#
+# An example Name Service Switch config file. This file should be
+# sorted with the most-used services at the beginning.
+#
+# Valid databases are: aliases, ethers, group, gshadow, hosts,
+# initgroups, netgroup, networks, passwd, protocols, publickey,
+# rpc, services, and shadow.
+#
+# Valid service provider entries include (in alphabetical order):
+#
+# compat Use /etc files plus *_compat pseudo-db
+# db Use the pre-processed /var/db files
+# dns Use DNS (Domain Name Service)
+# files Use the local files in /etc
+# hesiod Use Hesiod (DNS) for user lookups
+# nis Use NIS (NIS version 2), also called YP
+# nisplus Use NIS+ (NIS version 3)
+#
+# See `info libc 'NSS Basics'` for more information.
+#
+# Commonly used alternative service providers (may need installation):
+#
+# ldap Use LDAP directory server
+# myhostname Use systemd host names
+# mymachines Use systemd machine names
+# mdns*, mdns*_minimal Use Avahi mDNS/DNS-SD
+# resolve Use systemd resolved resolver
+# sss Use System Security Services Daemon (sssd)
+# systemd Use systemd for dynamic user option
+# winbind Use Samba winbind support
+# wins Use Samba wins support
+# wrapper Use wrapper module for testing
+#
+# Notes:
+#
+# 'sssd' performs its own 'files'-based caching, so it should generally
+# come before 'files'.
+#
+# WARNING: Running nscd with a secondary caching service like sssd may
+# lead to unexpected behaviour, especially with how long
+# entries are cached.
+#
+# Installation instructions:
+#
+# To use 'db', install the appropriate package(s) (provide 'makedb' and
+# libnss_db.so.*), and place the 'db' in front of 'files' for entries
+# you want to be looked up first in the databases, like this:
+#
+# passwd: db files
+# shadow: db files
+# group: db files
+
+passwd: compat
+group: compat
+shadow: compat
+# Allow initgroups to default to the setting for group.
+# initgroups: compat
+
+hosts: files dns
+networks: files dns
+
+aliases: files usrfiles
+ethers: files usrfiles
+gshadow: files usrfiles
+netgroup: files nis
+protocols: files usrfiles
+publickey: files
+rpc: files usrfiles
+
+bootparams: files
+netmasks: files
+services: files usrfiles
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/test/data/nsswitch.conf/vendor/usr/etc/nsswitch.conf new/yast2-pam-4.3.2/test/data/nsswitch.conf/vendor/usr/etc/nsswitch.conf
--- old/yast2-pam-4.2.4/test/data/nsswitch.conf/vendor/usr/etc/nsswitch.conf 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-4.3.2/test/data/nsswitch.conf/vendor/usr/etc/nsswitch.conf 2020-07-28 14:27:50.000000000 +0200
@@ -0,0 +1,74 @@
+#
+# /etc/nsswitch.conf
+#
+# An example Name Service Switch config file. This file should be
+# sorted with the most-used services at the beginning.
+#
+# Valid databases are: aliases, ethers, group, gshadow, hosts,
+# initgroups, netgroup, networks, passwd, protocols, publickey,
+# rpc, services, and shadow.
+#
+# Valid service provider entries include (in alphabetical order):
+#
+# compat Use /etc files plus *_compat pseudo-db
+# db Use the pre-processed /var/db files
+# dns Use DNS (Domain Name Service)
+# files Use the local files in /etc
+# hesiod Use Hesiod (DNS) for user lookups
+# nis Use NIS (NIS version 2), also called YP
+# nisplus Use NIS+ (NIS version 3)
+#
+# See `info libc 'NSS Basics'` for more information.
+#
+# Commonly used alternative service providers (may need installation):
+#
+# ldap Use LDAP directory server
+# myhostname Use systemd host names
+# mymachines Use systemd machine names
+# mdns*, mdns*_minimal Use Avahi mDNS/DNS-SD
+# resolve Use systemd resolved resolver
+# sss Use System Security Services Daemon (sssd)
+# systemd Use systemd for dynamic user option
+# winbind Use Samba winbind support
+# wins Use Samba wins support
+# wrapper Use wrapper module for testing
+#
+# Notes:
+#
+# 'sssd' performs its own 'files'-based caching, so it should generally
+# come before 'files'.
+#
+# WARNING: Running nscd with a secondary caching service like sssd may
+# lead to unexpected behaviour, especially with how long
+# entries are cached.
+#
+# Installation instructions:
+#
+# To use 'db', install the appropriate package(s) (provide 'makedb' and
+# libnss_db.so.*), and place the 'db' in front of 'files' for entries
+# you want to be looked up first in the databases, like this:
+#
+# passwd: db files
+# shadow: db files
+# group: db files
+
+passwd: compat
+group: compat
+shadow: compat
+# Allow initgroups to default to the setting for group.
+# initgroups: compat
+
+hosts: files dns
+networks: files dns
+
+aliases: files usrfiles
+ethers: files usrfiles
+gshadow: files usrfiles
+netgroup: files nis
+protocols: files usrfiles
+publickey: files
+rpc: files usrfiles
+
+bootparams: files
+netmasks: files
+services: files usrfiles
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/test/nsswitch_test.rb new/yast2-pam-4.3.2/test/nsswitch_test.rb
--- old/yast2-pam-4.2.4/test/nsswitch_test.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-4.3.2/test/nsswitch_test.rb 2020-07-28 14:27:50.000000000 +0200
@@ -0,0 +1,203 @@
+#!/usr/bin/env rspec
+# Copyright (c) [2020] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require_relative "test_helper"
+require "tmpdir"
+
+Yast.import "Nsswitch"
+
+describe Yast::Nsswitch do
+ subject(:nsswitch) { Yast::Nsswitch }
+
+ let(:tmpdir) { Dir.mktmpdir }
+ let(:original_data_example) { File.join(DATA_PATH, "nsswitch.conf/custom/etc") }
+ let(:file_path) { "#{tmpdir}/etc/nsswitch.conf" }
+
+ around do |example|
+ begin
+ FileUtils.cp_r(original_data_example, tmpdir)
+ change_scr_root(tmpdir, &example)
+ nsswitch.reset
+ ensure
+ FileUtils.remove_entry(tmpdir)
+ end
+ end
+
+ describe "#ReadDb" do
+ context "when given an available database entry" do
+ let(:db_name) { "hosts" }
+
+ it "returns its defined service specifications" do
+ expect(nsswitch.ReadDb(db_name)).to eq(["db", "files"])
+ end
+ end
+
+ context "when given a not available database entry" do
+ let(:db_name) { "ethers" }
+
+ it "returns an empty list" do
+ expect(nsswitch.ReadDb(db_name)).to eq([])
+ end
+ end
+ end
+
+ describe "#WriteDb" do
+ it "changes given database without writing to the file" do
+ expect(File.read(file_path)).to_not match(/ethers:/)
+ expect(nsswitch.ReadDb("ethers")).to eq([])
+
+ nsswitch.WriteDb("ethers", ["nis", "files"])
+
+ expect(nsswitch.ReadDb("ethers")).to eq(["nis", "files"])
+ expect(File.read(file_path)).to_not match(/ethers:/)
+ end
+
+ context "when given an already defined database entry" do
+ it "replaces its service specifications with given ones" do
+ expect(nsswitch.ReadDb("hosts")).to eq(["db", "files"])
+
+ nsswitch.WriteDb("hosts", ["nis", "files"])
+
+ expect(nsswitch.ReadDb("hosts")).to eq(["nis", "files"])
+ end
+
+ context "if the service specification is an empty array" do
+ it "removes the database entry" do
+ expect(nsswitch.ReadDb("hosts")).to eq(["db", "files"])
+
+ nsswitch.WriteDb("hosts", [])
+
+ expect(nsswitch.ReadDb("hosts")).to eq([])
+ end
+ end
+ end
+
+ context "when given not defined yet database entry" do
+ it "adds it to the configuration" do
+ expect(nsswitch.ReadDb("ethers")).to eq([])
+
+ nsswitch.WriteDb("ethers", ["nis", "files"])
+
+ expect(nsswitch.ReadDb("ethers")).to eq(["nis", "files"])
+ end
+
+ context "if the service specification is an empty array" do
+ it "changes nothing" do
+ expect(nsswitch.ReadDb("ethers")).to eq([])
+
+ nsswitch.WriteDb("ethers", [])
+
+ expect(nsswitch.ReadDb("ethers")).to eq([])
+ end
+ end
+ end
+ end
+
+ describe "#WriteAutofs" do
+ let(:db_name) { "automount" }
+
+ context "when services should start" do
+ let(:start) { true }
+
+ context "and it is not enabled yet" do
+ let(:source) { "nis" }
+
+ it "enables it by adding it to service specifications" do
+ nsswitch.WriteAutofs(start, source)
+
+ expect(File.read(file_path)).to match(/automount:\s+nis/)
+ end
+ end
+ end
+
+ context "when services should not start" do
+ let(:start) { false }
+
+ context "but it is enabled" do
+ let(:source) { "nis" }
+
+ before do
+ nsswitch.WriteDb(db_name, ["nis", "ldap"])
+ nsswitch.Write
+ end
+
+ it "disables it by removing it from service specifications" do
+ expect(File.read(file_path)).to match(/automount:\s+nis ldap/)
+
+ nsswitch.WriteAutofs(start, source)
+
+ expect(File.read(file_path)).to match(/automount:\s+ldap/)
+ expect(File.read(file_path)).to_not match(/automount:\s+nis/)
+ end
+ end
+ end
+ end
+
+ describe "#Write" do
+ context "when everything is right" do
+ it "returns true" do
+ nsswitch.WriteDb("ethers", ["nis", "files"])
+ expect(nsswitch.Write).to eq(true)
+ end
+
+ it "writes changes to the file" do
+ expect(File.read(file_path)).to_not match(/ethers:/)
+ expect(File.read(file_path)).to match(/hosts:/)
+ expect(File.read(file_path)).to_not match(/netmasks:/)
+
+ nsswitch.WriteDb("ethers", ["nis", "files"])
+ # Test deleting entries
+ nsswitch.WriteDb("hosts", [])
+ nsswitch.WriteDb("netmasks", [])
+ nsswitch.Write
+
+ expect(File.read(file_path)).to match(/ethers:\s+nis files/)
+ expect(File.read(file_path)).to_not match(/hosts:/)
+ expect(File.read(file_path)).to_not match(/netmasks:/)
+ end
+ end
+
+ context "when something is wrong" do
+ it "returns false" do
+ # there is not support for actions yet
+ nsswitch.WriteDb("ethers", ["nis [NOTFOUND=return]", "files"])
+ expect(nsswitch.Write).to eq(false)
+ end
+
+ it "reports an error" do
+ # there is not support for actions yet
+ nsswitch.WriteDb("ethers", ["nis [NOTFOUND=return]", "files"])
+ expect(Yast::Message).to receive(:ErrorWritingFile).with(/nsswitch\.conf/)
+ expect(Yast::Report).to receive(:Error)
+ nsswitch.Write
+ end
+
+ it "does not change the file" do
+ expect(File.read(file_path)).to_not match(/ethers:/)
+
+ # there is not support for actions yet
+ nsswitch.WriteDb("ethers", ["nis [NOTFOUND=return]", "files"])
+ nsswitch.Write
+
+ expect(File.read(file_path)).to_not match(/ethers:\s+nis files/)
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-pam-4.2.4/test/test_helper.rb new/yast2-pam-4.3.2/test/test_helper.rb
--- old/yast2-pam-4.2.4/test/test_helper.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-pam-4.3.2/test/test_helper.rb 2020-07-28 14:27:50.000000000 +0200
@@ -0,0 +1,50 @@
+# Copyright (c) [2020] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+# Set the paths
+SRC_PATH = File.expand_path("../src", __dir__)
+DATA_PATH = File.join(__dir__, "data")
+y2dirs = ENV.fetch("Y2DIR", "").split(":")
+ENV["Y2DIR"] = y2dirs.unshift(SRC_PATH).join(":")
+
+# Ensure the tests runs with English locales
+ENV["LANG"] = "en_US.UTF-8"
+ENV["LC_ALL"] = "en_US.UTF-8"
+
+require "yast"
+require "yast/rspec"
+
+if ENV["COVERAGE"]
+ require "simplecov"
+ SimpleCov.start do
+ add_filter "/test/"
+ end
+
+ # track all ruby files under src
+ SimpleCov.track_files("#{SRC_PATH}/**/*.rb")
+
+ # use coveralls for on-line code coverage reporting at Travis CI
+ if ENV["TRAVIS"]
+ require "coveralls"
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+ SimpleCov::Formatter::HTMLFormatter,
+ Coveralls::SimpleCov::Formatter
+ ]
+ end
+end
1
0
Hello community,
here is the log from the commit of package yast2-registration for openSUSE:Factory checked in at 2020-07-30 09:59:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old)
and /work/SRC/openSUSE:Factory/.yast2-registration.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration"
Thu Jul 30 09:59:44 2020 rev:57 rq:823074 version:4.3.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes 2020-07-21 15:48:39.328166972 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-registration.new.3592/yast2-registration.changes 2020-07-30 10:00:08.599222750 +0200
@@ -1,0 +2,6 @@
+Tue Jul 28 07:20:28 UTC 2020 - Josef Reidinger <jreidinger(a)suse.com>
+
+- Handle exceptions when parsing xml file (related to bsc#1170886)
+- 4.3.5
+
+-------------------------------------------------------------------
Old:
----
yast2-registration-4.3.4.tar.bz2
New:
----
yast2-registration-4.3.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.UXKUuM/_old 2020-07-30 10:00:09.391223223 +0200
+++ /var/tmp/diff_new_pack.UXKUuM/_new 2020-07-30 10:00:09.399223228 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.3.4
+Version: 4.3.5
Release: 0
Summary: YaST2 - Registration Module
License: GPL-2.0-only
++++++ yast2-registration-4.3.4.tar.bz2 -> yast2-registration-4.3.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.4/package/yast2-registration.changes new/yast2-registration-4.3.5/package/yast2-registration.changes
--- old/yast2-registration-4.3.4/package/yast2-registration.changes 2020-07-19 23:20:54.000000000 +0200
+++ new/yast2-registration-4.3.5/package/yast2-registration.changes 2020-07-28 09:33:33.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Jul 28 07:20:28 UTC 2020 - Josef Reidinger <jreidinger(a)suse.com>
+
+- Handle exceptions when parsing xml file (related to bsc#1170886)
+- 4.3.5
+
+-------------------------------------------------------------------
Fri Jul 17 10:54:41 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa(a)suse.com>
- Export the registration settings in the <suse_register/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.4/package/yast2-registration.spec new/yast2-registration-4.3.5/package/yast2-registration.spec
--- old/yast2-registration-4.3.4/package/yast2-registration.spec 2020-07-19 23:20:54.000000000 +0200
+++ new/yast2-registration-4.3.5/package/yast2-registration.spec 2020-07-28 09:33:33.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 4.3.4
+Version: 4.3.5
Release: 0
Summary: YaST2 - Registration Module
License: GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.4/src/lib/registration/registration_codes_loader.rb new/yast2-registration-4.3.5/src/lib/registration/registration_codes_loader.rb
--- old/yast2-registration-4.3.4/src/lib/registration/registration_codes_loader.rb 2020-07-19 23:20:54.000000000 +0200
+++ new/yast2-registration-4.3.5/src/lib/registration/registration_codes_loader.rb 2020-07-28 09:33:33.000000000 +0200
@@ -34,6 +34,7 @@
module RegistrationCodesLoader
include Yast::I18n # missing in yast2-update
include Yast::Transfer::FileFromUrl
+ include Yast::Logger
REGCODES_NAME_HANDLERS = {
"regcodes.xml" => :reg_codes_from_xml,
@@ -83,6 +84,9 @@
return nil unless File.readable?(filename) && File.file?(filename)
xml_hash = Yast::XML.XMLToYCPFile(filename)
parse_xml(xml_hash)
+ rescue Yast::XMLDeserializationError => e
+ log.error "Invalid reg codes XML: #{e.inspect}"
+ return nil
end
# @param xml_hash [Hash] as used in AY and returned by Yast::XML.XMLToYCPFile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.3.4/test/registration_codes_loader_spec.rb new/yast2-registration-4.3.5/test/registration_codes_loader_spec.rb
--- old/yast2-registration-4.3.4/test/registration_codes_loader_spec.rb 2020-07-19 23:20:54.000000000 +0200
+++ new/yast2-registration-4.3.5/test/registration_codes_loader_spec.rb 2020-07-28 09:33:33.000000000 +0200
@@ -143,6 +143,12 @@
expect(subject.reg_codes_from_xml("/etc")).to eq(nil)
end
+ it "returns nil if xml is not valid" do
+ allow(Yast::XML).to receive(:XMLToYCPFile).and_raise(Yast::XMLDeserializationError)
+ filename = fixtures_file("regcodes.xml")
+ expect(subject.reg_codes_from_xml(filename)).to eq nil
+ end
+
it "parses a valid fixture" do
filename = fixtures_file("regcodes.xml")
expect(subject.reg_codes_from_xml(filename)).to eq(valid_fixture_codes)
1
0
Hello community,
here is the log from the commit of package yast2-packager for openSUSE:Factory checked in at 2020-07-30 09:59:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-packager (Old)
and /work/SRC/openSUSE:Factory/.yast2-packager.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-packager"
Thu Jul 30 09:59:42 2020 rev:399 rq:823073 version:4.3.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-packager/yast2-packager.changes 2020-07-21 15:48:13.628135199 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-packager.new.3592/yast2-packager.changes 2020-07-30 10:00:06.175221303 +0200
@@ -1,0 +2,6 @@
+Mon Jul 27 21:10:29 UTC 2020 - Josef Reidinger <jreidinger(a)suse.com>
+
+- Handle exceptions when parsing xml file (related to bsc#1170886)
+- 4.3.5
+
+-------------------------------------------------------------------
Old:
----
yast2-packager-4.3.4.tar.bz2
New:
----
yast2-packager-4.3.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-packager.spec ++++++
--- /var/tmp/diff_new_pack.bOityW/_old 2020-07-30 10:00:07.215221923 +0200
+++ /var/tmp/diff_new_pack.bOityW/_new 2020-07-30 10:00:07.223221928 +0200
@@ -17,7 +17,7 @@
Name: yast2-packager
-Version: 4.3.4
+Version: 4.3.5
Release: 0
Summary: YaST2 - Package Library
License: GPL-2.0-or-later
++++++ yast2-packager-4.3.4.tar.bz2 -> yast2-packager-4.3.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.3.4/package/yast2-packager.changes new/yast2-packager-4.3.5/package/yast2-packager.changes
--- old/yast2-packager-4.3.4/package/yast2-packager.changes 2020-07-15 16:06:57.000000000 +0200
+++ new/yast2-packager-4.3.5/package/yast2-packager.changes 2020-07-28 09:20:21.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Jul 27 21:10:29 UTC 2020 - Josef Reidinger <jreidinger(a)suse.com>
+
+- Handle exceptions when parsing xml file (related to bsc#1170886)
+- 4.3.5
+
+-------------------------------------------------------------------
Tue Jul 14 10:41:22 CEST 2020 - aschnell(a)suse.com
- Handle variable expansion in repository name (bsc#1172477)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.3.4/package/yast2-packager.spec new/yast2-packager-4.3.5/package/yast2-packager.spec
--- old/yast2-packager-4.3.4/package/yast2-packager.spec 2020-07-15 16:06:57.000000000 +0200
+++ new/yast2-packager-4.3.5/package/yast2-packager.spec 2020-07-28 09:20:21.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-packager
-Version: 4.3.4
+Version: 4.3.5
Release: 0
Summary: YaST2 - Package Library
License: GPL-2.0-or-later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.3.4/src/lib/y2packager/clients/inst_productsources.rb new/yast2-packager-4.3.5/src/lib/y2packager/clients/inst_productsources.rb
--- old/yast2-packager-4.3.4/src/lib/y2packager/clients/inst_productsources.rb 2020-07-15 16:06:57.000000000 +0200
+++ new/yast2-packager-4.3.5/src/lib/y2packager/clients/inst_productsources.rb 2020-07-28 09:20:21.000000000 +0200
@@ -502,10 +502,10 @@
return false
end
- xml_file_content = XML.XMLToYCPFile(download_file)
-
- if xml_file_content.nil?
- Builtins.y2error("Reading file %1 failed", download_file)
+ begin
+ xml_file_content = XML.XMLToYCPFile(download_file)
+ rescue XMLDeserializationError => e
+ log.error "Reading file #{download_file} failed: #{e.inspect}"
return false
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.3.4/src/modules/AddOnProduct.rb new/yast2-packager-4.3.5/src/modules/AddOnProduct.rb
--- old/yast2-packager-4.3.4/src/modules/AddOnProduct.rb 2020-07-15 16:06:57.000000000 +0200
+++ new/yast2-packager-4.3.5/src/modules/AddOnProduct.rb 2020-07-28 09:20:21.000000000 +0200
@@ -1191,14 +1191,16 @@
return []
end
- xmlfile_products = XML.XMLToYCPFile(parse_file)
-
- if xmlfile_products.nil?
+ begin
+ xmlfile_products = XML.XMLToYCPFile(parse_file)
+ rescue XMLDeserializationError => e
# TRANSLATORS: error report
Report.Error(_("Unable to use additional products."))
- Builtins.y2error("Erroneous file %1", parse_file)
+ log.error "Erroneous file #{parse_file}: #{e.inspect}"
return []
- elsif Ops.get_list(xmlfile_products, "product_items", []) == []
+ end
+
+ if Ops.get_list(xmlfile_products, "product_items", []) == []
Builtins.y2warning("Empty file %1", parse_file)
return []
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-packager-4.3.4/test/addon_product_test.rb new/yast2-packager-4.3.5/test/addon_product_test.rb
--- old/yast2-packager-4.3.4/test/addon_product_test.rb 2020-07-15 16:06:57.000000000 +0200
+++ new/yast2-packager-4.3.5/test/addon_product_test.rb 2020-07-28 09:20:21.000000000 +0200
@@ -770,4 +770,24 @@
end
end
end
+
+ describe "#ParseXMLBasedAddOnProductsFile" do
+ context "Passed xml is not valid" do
+ before do
+ allow(Yast::FileUtils).to receive(:Exists).and_return(true)
+
+ allow(Yast::XML).to receive(:XMLToYCPFile).and_raise(Yast::XMLDeserializationError)
+ end
+
+ it "return empty array" do
+ expect(subject.ParseXMLBasedAddOnProductsFile("test", "test")).to eq []
+ end
+
+ it "shows error report" do
+ expect(Yast::Report).to receive(:Error)
+
+ subject.ParseXMLBasedAddOnProductsFile("test", "test")
+ end
+ end
+ end
end
1
0
Hello community,
here is the log from the commit of package ca-certificates-mozilla for openSUSE:Factory checked in at 2020-07-30 09:59:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ca-certificates-mozilla (Old)
and /work/SRC/openSUSE:Factory/.ca-certificates-mozilla.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ca-certificates-mozilla"
Thu Jul 30 09:59:40 2020 rev:49 rq:823414 version:2.42
Changes:
--------
--- /work/SRC/openSUSE:Factory/ca-certificates-mozilla/ca-certificates-mozilla.changes 2020-04-05 20:52:30.273122881 +0200
+++ /work/SRC/openSUSE:Factory/.ca-certificates-mozilla.new.3592/ca-certificates-mozilla.changes 2020-07-30 10:00:01.247218360 +0200
@@ -1,0 +2,21 @@
+Wed Jul 29 13:06:19 UTC 2020 - Marcus Meissner <meissner(a)suse.com>
+
+- update to 2.42 state of the Mozilla NSS Certificate store (bsc#1174673)
+
+ Removed CAs:
+ - AddTrust External CA Root
+ - AddTrust Class 1 CA Root
+ - LuxTrust Global Root 2
+ - Staat der Nederlanden Root CA - G2
+ - Symantec Class 1 Public Primary Certification Authority - G4
+ - Symantec Class 2 Public Primary Certification Authority - G4
+ - VeriSign Class 3 Public Primary Certification Authority - G3
+
+ Added CAs:
+ - certSIGN Root CA G2
+ - e-Szigno Root CA 2017
+ - Microsoft ECC Root Certificate Authority 2017
+ - Microsoft RSA Root Certificate Authority 2017
+
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ca-certificates-mozilla.spec ++++++
--- /var/tmp/diff_new_pack.4KoIQJ/_old 2020-07-30 10:00:03.271219569 +0200
+++ /var/tmp/diff_new_pack.4KoIQJ/_new 2020-07-30 10:00:03.275219571 +0200
@@ -37,7 +37,7 @@
Name: ca-certificates-mozilla
# Version number is NSS_BUILTINS_LIBRARY_VERSION in this file:
# http://hg.mozilla.org/projects/nss/file/default/lib/ckfw/builtins/nssckbi.h
-Version: 2.40
+Version: 2.42
Release: 0
Summary: CA certificates for OpenSSL
License: MPL-2.0
++++++ certdata.txt ++++++
++++ 2058 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/ca-certificates-mozilla/certdata.txt
++++ and /work/SRC/openSUSE:Factory/.ca-certificates-mozilla.new.3592/certdata.txt
++++++ certdata2pem.py ++++++
--- /var/tmp/diff_new_pack.4KoIQJ/_old 2020-07-30 10:00:03.419219657 +0200
+++ /var/tmp/diff_new_pack.4KoIQJ/_new 2020-07-30 10:00:03.423219659 +0200
@@ -177,6 +177,11 @@
"CKA_TRUST_EMAIL_PROTECTION": "emailProtection",
}
+cert_distrust_types = {
+ "CKA_NSS_SERVER_DISTRUST_AFTER": "nss-server-distrust-after",
+ "CKA_NSS_EMAIL_DISTRUST_AFTER": "nss-email-distrust-after",
+}
+
for tobj in objects:
if tobj['CKA_CLASS'] == 'CKO_NSS_TRUST':
key = tobj['CKA_LABEL'] + printable_serial(tobj)
@@ -369,6 +374,16 @@
f.write("nss-mozilla-ca-policy: true\n")
f.write("modifiable: false\n");
+ # requires p11-kit >= 0.23.19
+ for t in list(cert_distrust_types.keys()):
+ if t in obj:
+ value = obj[t]
+ if value == 'CK_FALSE':
+ value = bytearray(1)
+ f.write(cert_distrust_types[t] + ": \"")
+ f.write(urllib.parse.quote(value));
+ f.write("\"\n")
+
f.write("-----BEGIN CERTIFICATE-----\n")
temp_encoded_b64 = base64.b64encode(obj['CKA_VALUE'])
temp_wrapped = textwrap.wrap(temp_encoded_b64.decode(), 64)
++++++ nssckbi.h ++++++
--- /var/tmp/diff_new_pack.4KoIQJ/_old 2020-07-30 10:00:03.443219671 +0200
+++ /var/tmp/diff_new_pack.4KoIQJ/_new 2020-07-30 10:00:03.443219671 +0200
@@ -46,8 +46,8 @@
* It's recommend to switch back to 0 after having reached version 98/99.
*/
#define NSS_BUILTINS_LIBRARY_VERSION_MAJOR 2
-#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 40
-#define NSS_BUILTINS_LIBRARY_VERSION "2.40"
+#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 42
+#define NSS_BUILTINS_LIBRARY_VERSION "2.42"
/* These version numbers detail the semantic changes to the ckfw engine. */
#define NSS_BUILTINS_HARDWARE_VERSION_MAJOR 1
1
0
Hello community,
here is the log from the commit of package perl-PPIx-QuoteLike for openSUSE:Factory checked in at 2020-07-30 09:59:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-PPIx-QuoteLike (Old)
and /work/SRC/openSUSE:Factory/.perl-PPIx-QuoteLike.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-PPIx-QuoteLike"
Thu Jul 30 09:59:36 2020 rev:7 rq:823412 version:0.012
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-PPIx-QuoteLike/perl-PPIx-QuoteLike.changes 2020-04-05 20:51:53.857088042 +0200
+++ /work/SRC/openSUSE:Factory/.perl-PPIx-QuoteLike.new.3592/perl-PPIx-QuoteLike.changes 2020-07-30 09:59:54.643214417 +0200
@@ -1,0 +2,9 @@
+Wed Jul 29 03:09:13 UTC 2020 - Tina Müller <timueller+perl(a)suse.de>
+
+- updated to 0.012
+ see /usr/share/doc/packages/perl-PPIx-QuoteLike/Changes
+
+ 0.012 2020-07-28 T. R. Wyant
+ Remove prototypes from testing subroutines defined in t/*.t.
+
+-------------------------------------------------------------------
Old:
----
PPIx-QuoteLike-0.011.tar.gz
New:
----
PPIx-QuoteLike-0.012.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-PPIx-QuoteLike.spec ++++++
--- /var/tmp/diff_new_pack.1BlWLK/_old 2020-07-30 09:59:55.587214981 +0200
+++ /var/tmp/diff_new_pack.1BlWLK/_new 2020-07-30 09:59:55.591214983 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-PPIx-QuoteLike
#
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: perl-PPIx-QuoteLike
-Version: 0.011
+Version: 0.012
Release: 0
%define cpan_name PPIx-QuoteLike
Summary: Parse Perl string literals and string-literal-like things
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
-Url: https://metacpan.org/release/%{cpan_name}
+URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/W/WY/WYANT/%{cpan_name}-%{version}.tar…
Source1: cpanspec.yml
BuildArch: noarch
++++++ PPIx-QuoteLike-0.011.tar.gz -> PPIx-QuoteLike-0.012.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/Changes new/PPIx-QuoteLike-0.012/Changes
--- old/PPIx-QuoteLike-0.011/Changes 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/Changes 2020-07-28 14:17:36.000000000 +0200
@@ -1,3 +1,6 @@
+0.012 2020-07-28 T. R. Wyant
+ Remove prototypes from testing subroutines defined in t/*.t.
+
0.011 2020-03-31 T. R. Wyant
Normalize interpolation before feeding to PPI. This produces a
more-easily-analyzed PPI parse.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/META.json new/PPIx-QuoteLike-0.012/META.json
--- old/PPIx-QuoteLike-0.011/META.json 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/META.json 2020-07-28 14:17:36.000000000 +0200
@@ -48,51 +48,51 @@
"provides" : {
"PPIx::QuoteLike" : {
"file" : "lib/PPIx/QuoteLike.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Constant" : {
"file" : "lib/PPIx/QuoteLike/Constant.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Dumper" : {
"file" : "lib/PPIx/QuoteLike/Dumper.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Token" : {
"file" : "lib/PPIx/QuoteLike/Token.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Token::Control" : {
"file" : "lib/PPIx/QuoteLike/Token/Control.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Token::Delimiter" : {
"file" : "lib/PPIx/QuoteLike/Token/Delimiter.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Token::Interpolation" : {
"file" : "lib/PPIx/QuoteLike/Token/Interpolation.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Token::String" : {
"file" : "lib/PPIx/QuoteLike/Token/String.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Token::Structure" : {
"file" : "lib/PPIx/QuoteLike/Token/Structure.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Token::Unknown" : {
"file" : "lib/PPIx/QuoteLike/Token/Unknown.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Token::Whitespace" : {
"file" : "lib/PPIx/QuoteLike/Token/Whitespace.pm",
- "version" : "0.011"
+ "version" : "0.012"
},
"PPIx::QuoteLike::Utils" : {
"file" : "lib/PPIx/QuoteLike/Utils.pm",
- "version" : "0.011"
+ "version" : "0.012"
}
},
"release_status" : "stable",
@@ -110,6 +110,6 @@
"web" : "https://github.com/trwyant/perl-PPIx-QuoteLike"
}
},
- "version" : "0.011",
- "x_serialization_backend" : "JSON::PP version 4.04"
+ "version" : "0.012",
+ "x_serialization_backend" : "JSON::PP version 4.05"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/META.yml new/PPIx-QuoteLike-0.012/META.yml
--- old/PPIx-QuoteLike-0.011/META.yml 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/META.yml 2020-07-28 14:17:36.000000000 +0200
@@ -19,40 +19,40 @@
provides:
PPIx::QuoteLike:
file: lib/PPIx/QuoteLike.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Constant:
file: lib/PPIx/QuoteLike/Constant.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Dumper:
file: lib/PPIx/QuoteLike/Dumper.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Token:
file: lib/PPIx/QuoteLike/Token.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Token::Control:
file: lib/PPIx/QuoteLike/Token/Control.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Token::Delimiter:
file: lib/PPIx/QuoteLike/Token/Delimiter.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Token::Interpolation:
file: lib/PPIx/QuoteLike/Token/Interpolation.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Token::String:
file: lib/PPIx/QuoteLike/Token/String.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Token::Structure:
file: lib/PPIx/QuoteLike/Token/Structure.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Token::Unknown:
file: lib/PPIx/QuoteLike/Token/Unknown.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Token::Whitespace:
file: lib/PPIx/QuoteLike/Token/Whitespace.pm
- version: '0.011'
+ version: '0.012'
PPIx::QuoteLike::Utils:
file: lib/PPIx/QuoteLike/Utils.pm
- version: '0.011'
+ version: '0.012'
requires:
Carp: '0'
Encode: '0'
@@ -72,5 +72,5 @@
bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=PPIx-QuoteLike
license: http://dev.perl.org/licenses/
repository: git://github.com/trwyant/perl-PPIx-QuoteLike.git
-version: '0.011'
+version: '0.012'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/eg/pqldump new/PPIx-QuoteLike-0.012/eg/pqldump
--- old/PPIx-QuoteLike-0.011/eg/pqldump 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/eg/pqldump 2020-07-28 14:17:36.000000000 +0200
@@ -9,7 +9,7 @@
use Pod::Usage;
use PPIx::QuoteLike::Dumper;
-our $VERSION = '0.011';
+our $VERSION = '0.012';
my %opt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/eg/variables new/PPIx-QuoteLike-0.012/eg/variables
--- old/PPIx-QuoteLike-0.011/eg/variables 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/eg/variables 2020-07-28 14:17:36.000000000 +0200
@@ -10,7 +10,7 @@
use PPI::Document;
use PPIx::QuoteLike::Utils qw{ __variables };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
my %opt;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/inc/My/Module/Recommend/Any.pm new/PPIx-QuoteLike-0.012/inc/My/Module/Recommend/Any.pm
--- old/PPIx-QuoteLike-0.011/inc/My/Module/Recommend/Any.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/inc/My/Module/Recommend/Any.pm 2020-07-28 14:17:36.000000000 +0200
@@ -12,7 +12,7 @@
BEGIN {
*import = \&Exporter::import;
}
-our $VERSION = '0.011';
+our $VERSION = '0.012';
our @EXPORT_OK = qw{ __any };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Constant.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Constant.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Constant.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Constant.pm 2020-07-28 14:17:36.000000000 +0200
@@ -8,7 +8,7 @@
use Carp;
use base qw{ Exporter };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
our @CARP_NOT = qw{
PPIx::QuoteLike
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Dumper.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Dumper.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Dumper.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Dumper.pm 2020-07-28 14:17:36.000000000 +0200
@@ -12,7 +12,7 @@
use PPIx::QuoteLike::Utils qw{ __instance };
use Scalar::Util ();
-our $VERSION = '0.011';
+our $VERSION = '0.012';
use constant SCALAR_REF => ref \0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Control.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Control.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Control.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Control.pm 2020-07-28 14:17:36.000000000 +0200
@@ -9,7 +9,7 @@
use PPIx::QuoteLike::Constant qw{ @CARP_NOT };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
{
# TODO make this a state variable when we can require Perl 5.10.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Delimiter.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Delimiter.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Delimiter.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Delimiter.pm 2020-07-28 14:17:36.000000000 +0200
@@ -9,7 +9,7 @@
use PPIx::QuoteLike::Constant qw{ MINIMUM_PERL @CARP_NOT };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
# Perl 5.29.0 disallows unassigned code points and combining code points
# as delimiters. Unfortunately for me non-characters and illegal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Interpolation.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Interpolation.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Interpolation.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Interpolation.pm 2020-07-28 14:17:36.000000000 +0200
@@ -20,7 +20,7 @@
use base qw{ PPIx::QuoteLike::Token };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
sub ppi {
my ( $self ) = @_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/String.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/String.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/String.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/String.pm 2020-07-28 14:17:36.000000000 +0200
@@ -9,7 +9,7 @@
use PPIx::QuoteLike::Constant qw{ @CARP_NOT };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Structure.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Structure.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Structure.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Structure.pm 2020-07-28 14:17:36.000000000 +0200
@@ -9,7 +9,7 @@
use PPIx::QuoteLike::Constant qw{ @CARP_NOT };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Unknown.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Unknown.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Unknown.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Unknown.pm 2020-07-28 14:17:36.000000000 +0200
@@ -9,7 +9,7 @@
use PPIx::QuoteLike::Constant qw{ @CARP_NOT };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Whitespace.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Whitespace.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token/Whitespace.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token/Whitespace.pm 2020-07-28 14:17:36.000000000 +0200
@@ -9,7 +9,7 @@
use PPIx::QuoteLike::Constant qw{ @CARP_NOT };
-our $VERSION = '0.011';
+our $VERSION = '0.012';
sub significant {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Token.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Token.pm 2020-07-28 14:17:36.000000000 +0200
@@ -16,7 +16,7 @@
visual_column_number
};
-our $VERSION = '0.011';
+our $VERSION = '0.012';
# Private to this package.
sub __new {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Utils.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Utils.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike/Utils.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike/Utils.pm 2020-07-28 14:17:36.000000000 +0200
@@ -39,7 +39,7 @@
__variables
};
-our $VERSION = '0.011';
+our $VERSION = '0.012';
# Readonly::Scalar my $BRACED_RE => __match_enclosed( LEFT_CURLY );
Readonly::Scalar my $BRACKETED_RE => __match_enclosed( '[' ); # ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike.pm new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike.pm
--- old/PPIx-QuoteLike-0.011/lib/PPIx/QuoteLike.pm 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/lib/PPIx/QuoteLike.pm 2020-07-28 14:17:36.000000000 +0200
@@ -40,7 +40,7 @@
use Scalar::Util ();
use Text::Tabs ();
-our $VERSION = '0.011';
+our $VERSION = '0.012';
use constant CLASS_CONTROL => 'PPIx::QuoteLike::Token::Control';
use constant CLASS_DELIMITER => 'PPIx::QuoteLike::Token::Delimiter';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/t/normalize_interpolation_for_ppi.t new/PPIx-QuoteLike-0.012/t/normalize_interpolation_for_ppi.t
--- old/PPIx-QuoteLike-0.011/t/normalize_interpolation_for_ppi.t 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/t/normalize_interpolation_for_ppi.t 2020-07-28 14:17:36.000000000 +0200
@@ -8,33 +8,31 @@
use PPIx::QuoteLike::Utils qw{ __normalize_interpolation_for_ppi };
use Test::More 0.88; # Because of done_testing();
-sub norm ($$;$);
+norm( '$foo', '$foo' );
-norm '$foo', '$foo';
+norm( '$ foo', '$foo' );
-norm '$ foo', '$foo';
+norm( '${foo}', '$foo' );
-norm '${foo}', '$foo';
+norm( '${ foo }', '$foo' );
-norm '${ foo }', '$foo';
-
-norm '$ { foo }', '$foo';
+norm( '$ { foo }', '$foo' );
# NOTE this is a warning, and so (for now) not supported
-# norm '${foo{bar}}', '$foo{bar}';
+# norm( '${foo{bar}}', '$foo{bar}' );
# NOTE this is a warning, and so (for now) not supported
-# norm '@{foo{bar}}', '@foo{bar}';
+# norm( '@{foo{bar}}', '@foo{bar}' );
-norm '@{$x[$i]}', '@{$x[$i]}';
+norm( '@{$x[$i]}', '@{$x[$i]}' );
-norm '@{ [ foo() ] }', 'foo()';
+norm( '@{ [ foo() ] }', 'foo()' );
-norm '${ \\ ( foo() ) }', 'foo()';
+norm( '${ \\ ( foo() ) }', 'foo()' );
done_testing;
-sub norm ($$;$) {
+sub norm {
my ( $norm, $want, $title ) = @_;
defined $title
or $title = "'$norm' normalizes to '$want'";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PPIx-QuoteLike-0.011/t/variables.t new/PPIx-QuoteLike-0.012/t/variables.t
--- old/PPIx-QuoteLike-0.011/t/variables.t 2020-03-31 14:01:57.000000000 +0200
+++ new/PPIx-QuoteLike-0.012/t/variables.t 2020-07-28 14:17:36.000000000 +0200
@@ -10,47 +10,43 @@
use PPIx::QuoteLike::Utils qw{ __variables };
use Test::More 0.88; # Because of done_testing();
-sub check (@);
-sub check_class (@);
-sub check_token (@);
+check( q<"foo$bar">, qw< $bar > );
-check q<"foo$bar">, qw< $bar >;
+check( q<'foo$bar'> );
-check q<'foo$bar'>;
+check_token( q<"foo$bar">, qw< $bar > );
-check_token q<"foo$bar">, qw< $bar >;
+check_token( q<'foo$bar'> );
-check_token q<'foo$bar'>;
-
-check_class q<"foo$bar">, qw< PPIx::QuoteLike $bar >;
+check_class( q<"foo$bar">, qw< PPIx::QuoteLike $bar > );
# Note -- the following was done using the trinary operator rather than
# if/else because I hoped that with the former implementation, when I
# added tests I would do so correctly.
-note HAVE_PPIX_REGEXP ?
+note( HAVE_PPIX_REGEXP ?
'PPIx::Regexp is installed; we can find variables in Regexps' :
- 'PPIx::Regexp is not installed; we can not find variables in Regexps';
+ 'PPIx::Regexp is not installed; we can not find variables in Regexps' );
-check q<my ( $foo ) = $bar =~ m/(baz|$burfle)/smx;>,
+check( q<my ( $foo ) = $bar =~ m/(baz|$burfle)/smx;>,
HAVE_PPIX_REGEXP ? qw< $bar $burfle $foo > :
- qw< $bar $foo >;
+ qw< $bar $foo > );
-check q<qr/ foo (?{ "$bar" }) />,
- HAVE_PPIX_REGEXP ? qw< $bar > : ();
+check( q<qr/ foo (?{ "$bar" }) />,
+ HAVE_PPIX_REGEXP ? qw< $bar > : () );
-check_token q<s/ foo ( $bar[0] ) / xyz( $1 ) /smxe;>,
- HAVE_PPIX_REGEXP ? qw{ $1 @bar } : ();
+check_token( q<s/ foo ( $bar[0] ) / xyz( $1 ) /smxe;>,
+ HAVE_PPIX_REGEXP ? qw{ $1 @bar } : () );
if ( HAVE_PPIX_REGEXP ) {
- check_class q<qr/ foo (?{ "$bar" }) />, qw< PPIx::Regexp $bar >;
+ check_class( q<qr/ foo (?{ "$bar" }) />, qw< PPIx::Regexp $bar > );
}
done_testing;
-sub check (@) {
+sub check {
my ( $expr, @want ) = @_;
my $doc = PPI::Document->new( \$expr );
my @got = sort( __variables( $doc ) );
@@ -58,7 +54,7 @@
goto &is_deeply;
}
-sub check_class (@) {
+sub check_class {
my ( $expr, $class, @want ) = @_;
( my $fn = "$class.pm" ) =~ s| :: |/|smxg;
require $fn;
@@ -68,7 +64,7 @@
goto &is_deeply;
}
-sub check_token (@) {
+sub check_token {
my ( $expr, @want ) = @_;
my $doc = PPI::Document->new( \$expr );
my ( $elem ) = @{ $doc->find( sub {
1
0