Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into master-bsc-1168342
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jun 18, 2021
2 parents b4a19ac + ed0e76e commit 7bfb5a1
Show file tree
Hide file tree
Showing 31 changed files with 556 additions and 50 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2

# just for easier debugging...
- name: Inspect Installed Packages
Expand All @@ -38,7 +38,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Rubocop
run: rake check:rubocop
Expand All @@ -50,7 +50,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Package Build
run: yast-ci-ruby -o package
Expand All @@ -62,7 +62,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Yardoc
run: rake check:doc
Expand All @@ -76,7 +76,7 @@ jobs:
steps:

- name: Git Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Perl Syntax
run: yast-ci-ruby -o perl_syntax
Expand Down
116 changes: 115 additions & 1 deletion package/yast2-packager.changes
Original file line number Diff line number Diff line change
@@ -1,8 +1,122 @@
-------------------------------------------------------------------
Tue Dec 8 22:47:19 UTC 2020 - Stefan Schubert <schubi@schubi.de>
Fri Jun 18 08:39:06 UTC 2021 - Stefan Schubert <schubi@schubi.de>

- Adding NFS repository: Checking user input e.g. white spaces in
server name (bsc#1168342).
- 4.4.6

-------------------------------------------------------------------
Thu Jun 17 15:47:33 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- When editing a repository display the repository alias as a
fallback if the repository name is not set, do not display
empty name (bsc#1184935)
- 4.4.5

-------------------------------------------------------------------
Tue Jun 15 09:17:24 UTC 2021 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Fix the Comment entry in the desktop file so the tooltip
in the control center is properly translated (bsc#1187270).
- 4.4.4

-------------------------------------------------------------------
Thu May 27 07:43:27 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- Use the "armv7hl" packages on the "armv7l" architecture
(bsc#1183795)
- 4.4.3

-------------------------------------------------------------------
Mon May 24 11:16:11 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- Logging all available product information into directory
/var/log/YaST2/installation_info. This should help for evaluating
the cause of e.g. bsc#1180888, bsc#1180908, bsc#1178688.
- 4.4.2

-------------------------------------------------------------------
Thu Apr 22 07:51:02 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- Revert copying the libzypp cache to the target system and
replacing it by a symlink, it is not safe and it can
cause crash (segfault) in some cases (bsc#1183711)
- 4.4.1

-------------------------------------------------------------------
Wed Apr 7 11:06:45 UTC 2021 - David Diaz <dgonzalez@suse.com>

- Hide the abort button when the network client is called
(bsc#1183586).
- 4.4.0

-------------------------------------------------------------------
Thu Mar 18 16:33:19 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- Do not create zypp cache symlink when running in installed
system, it would create /var/cache/zypp -> /var/cache/zypp
loop (bsc#1183683)
- Remove the "Software Repositories" button from the YaST console,
users can easily break the installer with it. Added
"configure_repositories" command to the command line interface
for experts (bsc#1183687)
- 4.3.20

-------------------------------------------------------------------
Thu Mar 11 15:01:58 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- Move the libzypp cache to the installed system to save some
memory and avoid crashing because out of memory (bsc#1182928)
- 4.3.19

-------------------------------------------------------------------
Tue Mar 9 09:15:41 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- Added IBM tools product rename to the list (part of bsc#1182837)
- 4.3.18

-------------------------------------------------------------------
Mon Mar 8 15:44:31 UTC 2021 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- During installation, explain what "online repositories" are
(bsc#1180707).
- 4.3.17

-------------------------------------------------------------------
Mon Mar 8 14:31:30 UTC 2021 - Ladislav Slezák <lslezak@suse.cz>

- Extend the special installer configuration dialog with
repository options (jsc#PM-1895, jsc#SLE-16263)
- 4.3.16

-------------------------------------------------------------------
Fri Mar 5 10:41:42 UTC 2021 - Ancor Gonzalez Sosa <ancor@suse.com>

- Support for configuring minimalistic DNF (bsc#1182849)
contributed by Sasi Olin (hel@lcp.world).
- 4.3.15

Fri Feb 19 14:07:15 UTC 2021 - Josef Reidinger <jreidinger@suse.com>
-------------------------------------------------------------------

- Show correct number of downloaded packages in log (bsc#1180278)
- Fix crash when installation proposal require pattern and such
pattern is not available in any repository (found during testing
jsc#SLE-17427)
- 4.3.14

-------------------------------------------------------------------
Mon Feb 15 20:07:15 UTC 2021 - Josef Reidinger <jreidinger@suse.com>

- Adapted unit test to recent changes in Yast::Report (related to
bsc#1179893).
- 4.3.13

-------------------------------------------------------------------
Fri Jan 15 12:11:32 UTC 2021 - Ancor Gonzalez Sosa <ancor@suse.com>

- Proposal: fixed the logic to detect whether the partitioning has
changed since the previous execution (found by bsc#1180537).
- 4.3.12

-------------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions package/yast2-packager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-packager
Version: 4.3.12
Version: 4.4.6
Release: 0
Summary: YaST2 - Package Library
License: GPL-2.0-or-later
Expand All @@ -36,8 +36,8 @@ BuildRequires: rubygem(%{rb_default_ruby_abi}:nokogiri)
BuildRequires: yast2-storage-ng >= 4.0.141
# break the yast2-packager -> yast2-storage-ng -> yast2-packager build cycle
#!BuildIgnore: yast2-packager
# Y2Packager::Repositories
BuildRequires: yast2 >= 4.2.60
# Installation::InstallationInfo
BuildRequires: yast2 >= 4.4.4
# raw_name
BuildRequires: yast2-pkg-bindings >= 4.2.8
# Augeas lenses
Expand All @@ -48,8 +48,8 @@ BuildRequires: ruby-solv
Requires: yast2-country-data >= 2.16.3
# raw_name
Requires: yast2-pkg-bindings >= 4.2.8
# Y2Packager::Repositories
Requires: yast2 >= 4.2.60
# Installation::InstallationInfo
Requires: yast2 >= 4.4.4
# unzipping license file
Requires: unzip
# HTTP, FTP, HTTPS modules (inst_productsources.ycp)
Expand Down Expand Up @@ -116,8 +116,8 @@ This package contains the libraries and modules for software management.
%{yast_yncludedir}/packager/*
%{yast_libdir}/language_tag.rb
%{yast_libdir}/packager/*
%{yast_libdir}/packager/cfa/*
%{yast_libdir}/y2packager/*
%{yast_libdir}/installation/*
%{yast_clientdir}/*.rb
%{yast_moduledir}/*
%{yast_desktopdir}/*.desktop
Expand Down
2 changes: 1 addition & 1 deletion src/desktop/org.opensuse.yast.SWSource.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Exec=xdg-su -c "/sbin/yast2 repositories"

Name=YaST Software Repositories
GenericName=Software Repositories
Comment=Choose the repositories for installation of software packages (CD, network, etc.), add the community repositories
Comment="Choose the repositories for installation of software packages (CD, network, etc.), add the community repositories"
StartupNotify=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ------------------------------------------------------------------------------
# Copyright (c) 2021 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.
#
# ------------------------------------------------------------------------------

module Installation
module Console
# define the "configure_repositories" command in the expert console
class Commands
def configure_repositories
run_yast_module("repositories")
end

private

def configure_repositories_description
"Run the repository manager. Be careful when using it,\n" \
"you might easily break the installer when wrongly used!"
end
end
end
end
38 changes: 38 additions & 0 deletions src/lib/installation/console/plugins/repositories_command.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ------------------------------------------------------------------------------
# Copyright (c) 2021 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.
#
# ------------------------------------------------------------------------------

require "pp"
require "yast"

module Installation
module Console
# define the "repositories" command in the expert console
class Commands
def repositories
Yast.import "Pkg"

repos = Yast::Pkg.SourceGetCurrent(false).map do |repo|
Yast::Pkg.SourceGeneralData(repo)
end

pp repos
end

private

def repositories_description
"Dump the details of the currently defined software repositories"
end
end
end
end
36 changes: 36 additions & 0 deletions src/lib/packager/cfa/dnf_conf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
require "cfa/base_model"
require "cfa/augeas_parser"
require "cfa/matcher"

module Yast
module Packager
module CFA
# Represents a dnf configuration file.
class DnfConf < ::CFA::BaseModel
# Configuration parser
PARSER = ::CFA::AugeasParser.new("puppet.lns")
# Path to configuration file
PATH = "/etc/dnf/dnf.conf".freeze

def initialize(file_handler: nil)
super(PARSER, PATH, file_handler: file_handler)
end

# Set options to keep a minimalistic package selection
def set_minimalistic!
tree = data["main"]
if !tree
tree = ::CFA::AugeasTree.new
data["main"] = tree
end
generic_set("install_weak_deps", "False", tree)
generic_set("tsflags", "nodocs", tree)
end

def section(name)
data[name]
end
end
end
end
end
26 changes: 18 additions & 8 deletions src/lib/packager/clients/pkg_finish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
require "installation/finish_client"
require "y2packager/repository"
require "packager/cfa/zypp_conf"
require "packager/cfa/dnf_conf"

Yast.import "InstURL"

Expand All @@ -32,6 +33,11 @@ class PkgFinishClient < ::Installation::FinishClient
"&& /bin/tar -czf '%<archive>s' '%<source>s'".freeze
# Format of the timestamp to be used as repositories backup
BACKUP_TIMESTAMP_FORMAT = "%Y%m%d-%H%M%S".freeze
# Map the CFAs to package managers
PKG_MAPPING = {
"dnf" => Packager::CFA::DnfConf,
"libzypp" => Packager::CFA::ZyppConf
}.freeze

# Constructor
def initialize
Expand Down Expand Up @@ -100,7 +106,7 @@ def write
# recommended packages, doc-packages,...
# (needed for products like CASP)
if ProductFeatures.GetBooleanFeature("software", "minimalistic_libzypp_config")
set_minimalistic_libzypp_conf
set_minimalistic_pkg_conf
end

# copy list of failed packages to installed system
Expand Down Expand Up @@ -284,15 +290,19 @@ def sync_target_sources
Pkg.TargetInitialize(Installation.destdir)
end

# Set libzypp configuration to install the minimal amount of packages
# Set package manager configuration to install the minimal amount of packages
#
# @see Yast::Packager::CFA::ZyppConf#set_minimalistic!
def set_minimalistic_libzypp_conf
log.info("Setting libzypp configuration as minimalistic")
config = Packager::CFA::ZyppConf.new
config.load
config.set_minimalistic!
config.save
def set_minimalistic_pkg_conf
PKG_MAPPING.each do |pkg, cfa|
next unless File.file?(File.join(Installation.destdir, cfa::PATH))

log.info("Setting #{pkg} configuration as minimalistic")
config = cfa.new
config.load
config.set_minimalistic!
config.save
end
end
end
end
7 changes: 6 additions & 1 deletion src/lib/packager/clients/repositories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,12 @@ def repo_replace_handler(source_state, global_current)
old_url = url2
plaindir = Ops.get_string(generalData, "type", "YaST") == @plaindir_type

SourceDialogs.SetRepoName(source_state.fetch("raw_name", ""))
repo_name = source_state.fetch("raw_name", "")
# if the repository does not define a name then "raw_name" is empty,
# display "name" which contains the repository alias in that case
repo_name = source_state.fetch("name", "") if repo_name.empty?

SourceDialogs.SetRepoName(repo_name)

begin
url2 = SourceDialogs.EditPopupType(url2, plaindir)
Expand Down
Loading

0 comments on commit 7bfb5a1

Please sign in to comment.