From 49726a334c55f0ec1a28e191bee8f1d6bb3c0e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 31 Aug 2023 12:02:21 +0100 Subject: [PATCH 1/4] Use org.opensuse.Agama.Manager1 to expose users settings --- rust/agama-lib/src/users/proxies.rs | 2 +- service/lib/agama/dbus/clients/users.rb | 2 +- service/lib/agama/dbus/manager_service.rb | 25 +++---------- service/lib/agama/manager.rb | 6 +--- service/lib/agama/users.rb | 7 ++++ service/test/agama/dbus/clients/users_test.rb | 22 ++++++------ .../test/agama/dbus/manager_service_test.rb | 36 +++++++++---------- service/test/agama/dbus/manager_test.rb | 4 +-- service/test/agama/manager_test.rb | 5 ++- web/src/client/users.js | 2 +- 10 files changed, 48 insertions(+), 63 deletions(-) diff --git a/rust/agama-lib/src/users/proxies.rs b/rust/agama-lib/src/users/proxies.rs index 4a2850a8f3..9d9b255913 100644 --- a/rust/agama-lib/src/users/proxies.rs +++ b/rust/agama-lib/src/users/proxies.rs @@ -4,7 +4,7 @@ use zbus::dbus_proxy; #[dbus_proxy( - interface = "org.opensuse.Agama.Users1", + interface = "org.opensuse.Agama.Manager1", default_service = "org.opensuse.Agama.Users1", default_path = "/org/opensuse/Agama/Users1" )] diff --git a/service/lib/agama/dbus/clients/users.rb b/service/lib/agama/dbus/clients/users.rb index 59e548b865..c142c70f43 100644 --- a/service/lib/agama/dbus/clients/users.rb +++ b/service/lib/agama/dbus/clients/users.rb @@ -40,7 +40,7 @@ def initialize # @return [String] def service_name - @service_name ||= "org.opensuse.Agama.Users1" + @service_name ||= "org.opensuse.Agama.Manager1" end # Configuration of the first user to create during the installation diff --git a/service/lib/agama/dbus/manager_service.rb b/service/lib/agama/dbus/manager_service.rb index 147d12ff02..1e39c41620 100644 --- a/service/lib/agama/dbus/manager_service.rb +++ b/service/lib/agama/dbus/manager_service.rb @@ -37,16 +37,9 @@ module DBus # It connects to the system D-Bus and answers requests on objects below # `/org/opensuse/Agama1`. class ManagerService - # List of D-Bus services exposed by this class - # - # This basically allows to define "aliases" - all exposed services holds the same objects - # but under different names - # - # @return [Array] - MANAGER_SERVICE = "org.opensuse.Agama.Manager1" - USERS_SERVICE = "org.opensuse.Agama.Users1" - private_constant :MANAGER_SERVICE - private_constant :USERS_SERVICE + # D-Bus service (org.opensuse.Agama.Manager1) + SERVICE_NAME = "org.opensuse.Agama.Manager1" + private_constant :SERVICE_NAME # Agama D-Bus # @@ -94,9 +87,6 @@ def export paths = dbus_objects.map(&:path).join(", ") logger.info "Exported #{paths} objects" - - # Request our service names only when we're ready to serve the objects - service_aliases.each { |s| bus.request_name(s) } end # Call this from some main loop to dispatch the D-Bus messages @@ -117,16 +107,9 @@ def setup_cockpit cockpit.setup(config.data["web"]) end - def service_aliases - @service_aliases ||= [ - MANAGER_SERVICE, - USERS_SERVICE - ] - end - # @return [::DBus::ObjectServer] def service - @service ||= bus.object_server + @service ||= bus.request_service(SERVICE_NAME) end # @return [Array<::DBus::Object>] diff --git a/service/lib/agama/manager.rb b/service/lib/agama/manager.rb index f3153aac34..69b5c5b36f 100644 --- a/service/lib/agama/manager.rb +++ b/service/lib/agama/manager.rb @@ -160,11 +160,7 @@ def language # # @return [DBus::Clients::Users] def users - @users ||= DBus::Clients::Users.new.tap do |client| - client.on_service_status_change do |status| - service_status_recorder.save(client.service.name, status) - end - end + @users ||= Users.new(logger) end # Network manager diff --git a/service/lib/agama/users.rb b/service/lib/agama/users.rb index eb73aee7be..d2d86a59ff 100644 --- a/service/lib/agama/users.rb +++ b/service/lib/agama/users.rb @@ -141,6 +141,13 @@ def validate ] end + # Determines whether the users configuration is valid + # + # @return [Boolean] + def valid? + validate.empty? + end + private attr_reader :logger diff --git a/service/test/agama/dbus/clients/users_test.rb b/service/test/agama/dbus/clients/users_test.rb index b84beaf7f1..ed2e89265d 100644 --- a/service/test/agama/dbus/clients/users_test.rb +++ b/service/test/agama/dbus/clients/users_test.rb @@ -29,7 +29,7 @@ describe Agama::DBus::Clients::Users do before do allow(Agama::DBus::Bus).to receive(:current).and_return(bus) - allow(bus).to receive(:service).with("org.opensuse.Agama.Users1").and_return(service) + allow(bus).to receive(:service).with("org.opensuse.Agama.Manager1").and_return(service) allow(service).to receive(:[]).with("/org/opensuse/Agama/Users1") .and_return(dbus_object) allow(dbus_object).to receive(:introspect) @@ -40,10 +40,10 @@ end let(:bus) { instance_double(Agama::DBus::Bus) } - let(:service) { instance_double(::DBus::ProxyService) } - let(:dbus_object) { instance_double(::DBus::ProxyObject) } - let(:users_iface) { instance_double(::DBus::ProxyObjectInterface) } - let(:service_status_iface) { instance_double(::DBus::ProxyObjectInterface) } + let(:service) { instance_double(DBus::ProxyService) } + let(:dbus_object) { instance_double(DBus::ProxyObject) } + let(:users_iface) { instance_double(DBus::ProxyObjectInterface) } + let(:service_status_iface) { instance_double(DBus::ProxyObjectInterface) } subject { described_class.new } @@ -72,7 +72,7 @@ describe "#create_first_user" do # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(::DBus::ProxyObject) } + let(:dbus_object) { double(DBus::ProxyObject) } it "configures the first user" do expect(dbus_object).to receive(:SetFirstUser).with("Test user", "user", "n0ts3cr3t", true, {}) @@ -84,7 +84,7 @@ describe "#remove_first_user" do # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(::DBus::ProxyObject) } + let(:dbus_object) { double(DBus::ProxyObject) } it "removes the configuration of the first user" do expect(dbus_object).to receive(:RemoveFirstUser) @@ -105,7 +105,7 @@ describe "#root_ssh_key=" do # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(::DBus::ProxyObject) } + let(:dbus_object) { double(DBus::ProxyObject) } it "sets the SSH key for root" do expect(dbus_object).to receive(:SetRootSSHKey).with("1234-abcd") @@ -126,7 +126,7 @@ describe "#root_password=" do # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(::DBus::ProxyObject) } + let(:dbus_object) { double(DBus::ProxyObject) } it "sets the password for root" do expect(dbus_object).to receive(:SetRootPassword).with("n0ts3cr3t", false) @@ -137,7 +137,7 @@ describe "#remove_root_info" do # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(::DBus::ProxyObject) } + let(:dbus_object) { double(DBus::ProxyObject) } it "removes the SSH key and password for root" do expect(dbus_object).to receive(:RemoveRootPassword) @@ -149,7 +149,7 @@ describe "#write" do # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(::DBus::ProxyObject) } + let(:dbus_object) { double(DBus::ProxyObject) } it "applies changes into the system" do expect(dbus_object).to receive(:Write) diff --git a/service/test/agama/dbus/manager_service_test.rb b/service/test/agama/dbus/manager_service_test.rb index c46b5402a1..8de02632b6 100644 --- a/service/test/agama/dbus/manager_service_test.rb +++ b/service/test/agama/dbus/manager_service_test.rb @@ -29,25 +29,28 @@ let(:config) { Agama::Config.new } let(:logger) { Logger.new($stdout, level: :warn) } let(:manager) { Agama::Manager.new(config, logger) } - let(:locale_interface) { double("[]" => "en", on_signal: nil) } - let(:locale_service) do - double(object: double(introspect: nil, path: "test", "[]": locale_interface)) - end - let(:bus) { instance_double(Agama::DBus::Bus, request_name: nil, service: locale_service) } - let(:bus_service) do - instance_double(::DBus::ObjectServer, export: nil) - end + + let(:object_server) { instance_double(DBus::ObjectServer, export: nil) } + let(:bus) { instance_double(Agama::DBus::Bus, request_name: nil) } + let(:cockpit) { instance_double(Agama::CockpitManager, setup: nil) } - let(:software_client) do - instance_double(Agama::DBus::Clients::Software, on_product_selected: nil) + + let(:manager_obj) { instance_double(Agama::DBus::Manager, path: "/org/opensuse/Agama/Users1") } + let(:users_obj) { instance_double(Agama::DBus::Users, path: "/org/opensuse/Agama/Users1") } + + let(:locale_client) do + instance_double(Agama::DBus::Clients::Locale, ui_locale: "en_US", on_ui_locale_change: nil) end before do allow(Agama::DBus::Bus).to receive(:current).and_return(bus) - allow(bus).to receive(:object_server).and_return(bus_service) + allow(bus).to receive(:request_service).with("org.opensuse.Agama.Manager1") + .and_return(object_server) allow(Agama::Manager).to receive(:new).with(config, logger).and_return(manager) allow(Agama::CockpitManager).to receive(:new).and_return(cockpit) - allow(manager).to receive(:software).and_return(software_client) + allow(Agama::DBus::Clients::Locale).to receive(:new).and_return(locale_client) + allow(Agama::DBus::Manager).to receive(:new).with(manager, logger).and_return(manager_obj) + allow(Agama::DBus::Users).to receive(:new).and_return(users_obj) end describe "#start" do @@ -58,12 +61,9 @@ end describe "#export" do - it "exports the manager object" do - manager_obj = instance_double(Agama::DBus::Manager, path: nil) - allow(Agama::DBus::Manager).to receive(:new) - .with(manager, logger).and_return(manager_obj) - - expect(bus_service).to receive(:export).with(manager_obj) + it "exports the manager and the user objects" do + expect(object_server).to receive(:export).with(manager_obj) + expect(object_server).to receive(:export).with(users_obj) service.export end end diff --git a/service/test/agama/dbus/manager_test.rb b/service/test/agama/dbus/manager_test.rb index 6fb2c1912d..627bb57962 100644 --- a/service/test/agama/dbus/manager_test.rb +++ b/service/test/agama/dbus/manager_test.rb @@ -215,11 +215,11 @@ describe "#busy_services" do before do - allow(backend).to receive(:busy_services).and_return(["org.opensuse.Agama.Users1"]) + allow(backend).to receive(:busy_services).and_return(["org.opensuse.Agama.Software1"]) end it "returns the names of the busy services" do - expect(subject.busy_services).to contain_exactly("org.opensuse.Agama.Users1") + expect(subject.busy_services).to contain_exactly("org.opensuse.Agama.Software1") end end diff --git a/service/test/agama/manager_test.rb b/service/test/agama/manager_test.rb index b050600515..e63d6595f4 100644 --- a/service/test/agama/manager_test.rb +++ b/service/test/agama/manager_test.rb @@ -47,8 +47,7 @@ end let(:users) do instance_double( - Agama::DBus::Clients::Users, - write: nil, on_service_status_change: nil, valid?: true + Agama::Users, write: nil, valid?: true ) end let(:locale) { instance_double(Agama::DBus::Clients::Locale, finish: nil) } @@ -68,7 +67,7 @@ allow(Agama::DBus::Clients::Locale).to receive(:new).and_return(locale) allow(Agama::DBus::Clients::Software).to receive(:new).and_return(software) allow(Agama::DBus::Clients::Storage).to receive(:new).and_return(storage) - allow(Agama::DBus::Clients::Users).to receive(:new).and_return(users) + allow(Agama::Users).to receive(:new).and_return(users) end describe "#startup_phase" do diff --git a/web/src/client/users.js b/web/src/client/users.js index 2401674eb0..109d9c71d8 100644 --- a/web/src/client/users.js +++ b/web/src/client/users.js @@ -24,7 +24,7 @@ import DBusClient from "./dbus"; import { WithValidation } from "./mixins"; -const USERS_SERVICE = "org.opensuse.Agama.Users1"; +const USERS_SERVICE = "org.opensuse.Agama.Manager1"; const USERS_IFACE = "org.opensuse.Agama.Users1"; const USERS_PATH = "/org/opensuse/Agama/Users1"; From 02b9111b736047fc61053de38108f531198054f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 31 Aug 2023 12:04:19 +0100 Subject: [PATCH 2/4] Remove the org.opensuse.Agama.Users1 service --- rust/agama-lib/src/users/proxies.rs | 4 ++-- rust/share/dbus-test.conf | 2 -- service/share/dbus.conf | 2 -- service/share/org.opensuse.Agama.Users1.service | 4 ---- 4 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 service/share/org.opensuse.Agama.Users1.service diff --git a/rust/agama-lib/src/users/proxies.rs b/rust/agama-lib/src/users/proxies.rs index 9d9b255913..f1a71a2825 100644 --- a/rust/agama-lib/src/users/proxies.rs +++ b/rust/agama-lib/src/users/proxies.rs @@ -4,8 +4,8 @@ use zbus::dbus_proxy; #[dbus_proxy( - interface = "org.opensuse.Agama.Manager1", - default_service = "org.opensuse.Agama.Users1", + interface = "org.opensuse.Agama.Users1", + default_service = "org.opensuse.Agama.Manager1", default_path = "/org/opensuse/Agama/Users1" )] trait Users1 { diff --git a/rust/share/dbus-test.conf b/rust/share/dbus-test.conf index 99da927d20..19d576b6b3 100644 --- a/rust/share/dbus-test.conf +++ b/rust/share/dbus-test.conf @@ -37,14 +37,12 @@ - - contexts/dbus_contexts diff --git a/service/share/dbus.conf b/service/share/dbus.conf index 5033e30ab3..e7dcecf975 100644 --- a/service/share/dbus.conf +++ b/service/share/dbus.conf @@ -39,14 +39,12 @@ - - contexts/dbus_contexts diff --git a/service/share/org.opensuse.Agama.Users1.service b/service/share/org.opensuse.Agama.Users1.service deleted file mode 100644 index 0d32b94598..0000000000 --- a/service/share/org.opensuse.Agama.Users1.service +++ /dev/null @@ -1,4 +0,0 @@ -[D-BUS Service] -Name=org.opensuse.Agama.Users1 -Exec=/usr/bin/agamactl manager -User=root From 2a314eb006256562a3684fba14a7d51c8dbe47ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Fri, 1 Sep 2023 07:53:15 +0100 Subject: [PATCH 3/4] Drop the DBus users client --- service/lib/agama/dbus/clients/users.rb | 115 ------------- service/lib/agama/manager.rb | 1 - service/lib/agama/users.rb | 1 - service/test/agama/dbus/clients/users_test.rb | 162 ------------------ 4 files changed, 279 deletions(-) delete mode 100644 service/lib/agama/dbus/clients/users.rb delete mode 100644 service/test/agama/dbus/clients/users_test.rb diff --git a/service/lib/agama/dbus/clients/users.rb b/service/lib/agama/dbus/clients/users.rb deleted file mode 100644 index c142c70f43..0000000000 --- a/service/lib/agama/dbus/clients/users.rb +++ /dev/null @@ -1,115 +0,0 @@ -# frozen_string_literal: true - -# Copyright (c) [2022-2023] 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 "agama/dbus/clients/base" -require "agama/dbus/clients/with_service_status" -require "agama/dbus/clients/with_validation" - -module Agama - module DBus - module Clients - # D-Bus client for users configuration - class Users < Base - include WithServiceStatus - include WithValidation - - def initialize - super - - @dbus_object = service["/org/opensuse/Agama/Users1"] - @dbus_object.introspect - end - - # @return [String] - def service_name - @service_name ||= "org.opensuse.Agama.Manager1" - end - - # Configuration of the first user to create during the installation - # - # @return [Array] full name, name, password and autologin - def first_user - dbus_object["org.opensuse.Agama.Users1"]["FirstUser"][0..3] - end - - # Configures the first user to create during the installation - # - # @param name [String] - # @param fullname [String, nil] - # @param password [String, nil] - # @param autologin [Boolean] - # @return [Array] - def create_first_user(name, fullname: nil, password: nil, autologin: false) - dbus_object.SetFirstUser(fullname.to_s, name, password.to_s, !!autologin, {}) - end - - # Removes the configuration of the first user - def remove_first_user - dbus_object.RemoveFirstUser - end - - # SSH key for root - # - # @return [String] empty if no SSH key set - def root_ssh_key - dbus_object["org.opensuse.Agama.Users1"]["RootSSHKey"] - end - - # Sets the SSH key for root - # - # @param value [String] - def root_ssh_key=(value) - dbus_object.SetRootSSHKey(value) - end - - # Whether the root password is set - # - # @return [Boolean] - def root_password? - dbus_object["org.opensuse.Agama.Users1"]["RootPasswordSet"] - end - - # Sets the root password - # - # @param value [String] - def root_password=(value) - dbus_object.SetRootPassword(value, false) - end - - # Removes the SSH key and password for root - def remove_root_info - dbus_object.RemoveRootPassword - dbus_object.SetRootSSHKey("") - end - - # Commit the changes - def write - dbus_object.Write - end - - private - - # @return [::DBus::Object] - attr_reader :dbus_object - end - end - end -end diff --git a/service/lib/agama/manager.rb b/service/lib/agama/manager.rb index 69b5c5b36f..4f445aad79 100644 --- a/service/lib/agama/manager.rb +++ b/service/lib/agama/manager.rb @@ -30,7 +30,6 @@ require "agama/dbus/clients/locale" require "agama/dbus/clients/software" require "agama/dbus/clients/storage" -require "agama/dbus/clients/users" require "agama/helpers" Yast.import "Stage" diff --git a/service/lib/agama/users.rb b/service/lib/agama/users.rb index d2d86a59ff..898a72239f 100644 --- a/service/lib/agama/users.rb +++ b/service/lib/agama/users.rb @@ -30,7 +30,6 @@ module Agama # Backend class using YaST code. # # {Agama::DBus::Users} wraps it with a D-Bus interface and - # {Agama::DBus::Clients::Users} is a D-Bus client for that. class Users include Helpers diff --git a/service/test/agama/dbus/clients/users_test.rb b/service/test/agama/dbus/clients/users_test.rb deleted file mode 100644 index ed2e89265d..0000000000 --- a/service/test/agama/dbus/clients/users_test.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright (c) [2022-2023] 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 "agama/dbus/clients/users" -require "agama/dbus/service_status" -require "agama/dbus/interfaces/service_status" -require_relative "with_validation_examples" -require "dbus" - -describe Agama::DBus::Clients::Users do - before do - allow(Agama::DBus::Bus).to receive(:current).and_return(bus) - allow(bus).to receive(:service).with("org.opensuse.Agama.Manager1").and_return(service) - allow(service).to receive(:[]).with("/org/opensuse/Agama/Users1") - .and_return(dbus_object) - allow(dbus_object).to receive(:introspect) - allow(dbus_object).to receive(:[]).with("org.opensuse.Agama.Users1") - .and_return(users_iface) - allow(dbus_object).to receive(:[]).with("org.opensuse.Agama1.ServiceStatus") - .and_return(service_status_iface) - end - - let(:bus) { instance_double(Agama::DBus::Bus) } - let(:service) { instance_double(DBus::ProxyService) } - let(:dbus_object) { instance_double(DBus::ProxyObject) } - let(:users_iface) { instance_double(DBus::ProxyObjectInterface) } - let(:service_status_iface) { instance_double(DBus::ProxyObjectInterface) } - - subject { described_class.new } - - describe "#service_status" do - before do - allow(service_status_iface).to receive(:[]).with("Current") - .and_return(Agama::DBus::Interfaces::ServiceStatus::SERVICE_STATUS_BUSY) - end - - it "returns the value of the service status" do - expect(subject.service_status).to eq(Agama::DBus::ServiceStatus::BUSY) - end - end - - describe "#first_user" do - before do - allow(users_iface).to receive(:[]).with("FirstUser").and_return( - ["Test user", "user", "12345", true, {}] - ) - end - - it "returns the configuration of the first user" do - expect(subject.first_user).to contain_exactly("Test user", "user", "12345", true) - end - end - - describe "#create_first_user" do - # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(DBus::ProxyObject) } - - it "configures the first user" do - expect(dbus_object).to receive(:SetFirstUser).with("Test user", "user", "n0ts3cr3t", true, {}) - - subject.create_first_user("user", - fullname: "Test user", password: "n0ts3cr3t", autologin: true) - end - end - - describe "#remove_first_user" do - # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(DBus::ProxyObject) } - - it "removes the configuration of the first user" do - expect(dbus_object).to receive(:RemoveFirstUser) - - subject.remove_first_user - end - end - - describe "#root_ssh_key" do - before do - allow(users_iface).to receive(:[]).with("RootSSHKey").and_return("1234-abcd") - end - - it "returns SSH key for root" do - expect(subject.root_ssh_key).to eq("1234-abcd") - end - end - - describe "#root_ssh_key=" do - # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(DBus::ProxyObject) } - - it "sets the SSH key for root" do - expect(dbus_object).to receive(:SetRootSSHKey).with("1234-abcd") - - subject.root_ssh_key = "1234-abcd" - end - end - - describe "#root_password?" do - before do - allow(users_iface).to receive(:[]).with("RootPasswordSet").and_return(true) - end - - it "returns whether the root password is set" do - expect(subject.root_password?).to eq(true) - end - end - - describe "#root_password=" do - # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(DBus::ProxyObject) } - - it "sets the password for root" do - expect(dbus_object).to receive(:SetRootPassword).with("n0ts3cr3t", false) - - subject.root_password = "n0ts3cr3t" - end - end - - describe "#remove_root_info" do - # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(DBus::ProxyObject) } - - it "removes the SSH key and password for root" do - expect(dbus_object).to receive(:RemoveRootPassword) - expect(dbus_object).to receive(:SetRootSSHKey).with("") - - subject.remove_root_info - end - end - - describe "#write" do - # Using partial double because methods are dynamically added to the proxy object - let(:dbus_object) { double(DBus::ProxyObject) } - - it "applies changes into the system" do - expect(dbus_object).to receive(:Write) - - subject.write - end - end - - include_examples "validation" -end From 6fc7564644589607dd5543c01cf97909198d4cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 14 Sep 2023 11:10:53 +0100 Subject: [PATCH 4/4] Update the changes file --- rust/package/agama-cli.changes | 7 +++++++ service/package/rubygem-agama.changes | 7 +++++++ web/package/cockpit-agama.changes | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/rust/package/agama-cli.changes b/rust/package/agama-cli.changes index 9999eb7733..bb5e037ee4 100644 --- a/rust/package/agama-cli.changes +++ b/rust/package/agama-cli.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 14 10:10:37 UTC 2023 - Imobach Gonzalez Sosa + +- Use a single D-Bus service to connect to the manager and the + users API (gh#openSUSE/agama#753, follow-up of + gh#openSUSE/agama#729). + ------------------------------------------------------------------- Wed Sep 13 09:27:22 UTC 2023 - Knut Anderssen diff --git a/service/package/rubygem-agama.changes b/service/package/rubygem-agama.changes index 87c4c04a57..cb7f1ea4cc 100644 --- a/service/package/rubygem-agama.changes +++ b/service/package/rubygem-agama.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 14 09:04:29 UTC 2023 - Imobach Gonzalez Sosa + +- Use a single D-Bus service to expose the manager and the users + settings (gh#openSUSE/agama#753, follow-up of + gh#openSUSE/agama#729). + ------------------------------------------------------------------- Tue Sep 12 12:27:33 UTC 2023 - Imobach Gonzalez Sosa diff --git a/web/package/cockpit-agama.changes b/web/package/cockpit-agama.changes index 59e8331d58..187fa506a9 100644 --- a/web/package/cockpit-agama.changes +++ b/web/package/cockpit-agama.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 14 10:09:07 UTC 2023 - Imobach Gonzalez Sosa + +- Use a single D-Bus service to connect to the manager and the + users API (gh#openSUSE/agama#753, follow-up of + gh#openSUSE/agama#729). + ------------------------------------------------------------------- Mon Sep 11 11:56:56 UTC 2023 - David Diaz