From 14a1689111176782c0f5bb419bebc9e04992d84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 21 Oct 2024 15:56:31 +0100 Subject: [PATCH 1/7] fix: install missing packages during setup --- setup-services.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup-services.sh b/setup-services.sh index c573ea566e..46a961dc47 100755 --- a/setup-services.sh +++ b/setup-services.sh @@ -42,6 +42,7 @@ ZYPPER="zypper --non-interactive -v" $SUDO $ZYPPER install \ gcc \ gcc-c++ \ + git \ make \ openssl-devel \ ruby-devel \ @@ -137,6 +138,7 @@ $SUDO $ZYPPER install \ gzip \ jsonnet \ lshw \ + NetworkManager \ pam-devel \ python-langtable-data \ tar \ From ee738d3b359cce1b8fcc8136a6941ca9788668f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 21 Oct 2024 15:56:54 +0100 Subject: [PATCH 2/7] fix: update symbolic links during setup --- setup-services.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-services.sh b/setup-services.sh index 46a961dc47..2907cd985f 100755 --- a/setup-services.sh +++ b/setup-services.sh @@ -149,7 +149,7 @@ $SUDO $ZYPPER install \ cd $MYDIR/rust cargo build - ln -st /usr/bin $MYDIR/rust/target/debug/agama{,*server} + ln -sft /usr/bin $MYDIR/rust/target/debug/agama{,*server} ) # - D-Bus configuration From 8794454080d5d221725223ad3ebd7a0c62342363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 21 Oct 2024 15:57:12 +0100 Subject: [PATCH 3/7] fix: support for distrobox in the setup scripts --- setup-services.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup-services.sh b/setup-services.sh index 2907cd985f..0faf2a19ba 100755 --- a/setup-services.sh +++ b/setup-services.sh @@ -117,14 +117,15 @@ fi sed -e '/gemspec/a gem "ruby-dbus", path: "/checkout-ruby-dbus"' -i Gemfile fi - if [ -n "$CI" ]; then + if [ -n "${CI:-}" ] || [ -n "${DISTROBOX_ENTER_PATH:-}" ]; then # in CI reuse the pre-installed system gems from RPMs bundle config set --local disable_shared_gems 0 + sudo bundle install else bundle config set --local path 'vendor/bundle' + bundle install fi - bundle install ) # Rust service, CLI and auto-installation. From a9a9efe744ca97d9ee91e212cd0d132eae295742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 21 Oct 2024 16:49:34 +0100 Subject: [PATCH 4/7] fix: force symbolic links creation during setup --- setup-services.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-services.sh b/setup-services.sh index 0faf2a19ba..6c27088d6f 100755 --- a/setup-services.sh +++ b/setup-services.sh @@ -150,7 +150,7 @@ $SUDO $ZYPPER install \ cd $MYDIR/rust cargo build - ln -sft /usr/bin $MYDIR/rust/target/debug/agama{,*server} + sudo ln -sft /usr/bin $MYDIR/rust/target/debug/agama{,*server} ) # - D-Bus configuration From 98dab80ec79d032343562ef4e6067a4ccb072576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 24 Oct 2024 09:01:33 +0100 Subject: [PATCH 5/7] fix(setup): use the system D-Bus in distrobox --- setup-services.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/setup-services.sh b/setup-services.sh index 6c27088d6f..bd9dea7e5d 100755 --- a/setup-services.sh +++ b/setup-services.sh @@ -195,7 +195,19 @@ $SUDO mkdir -p /usr/share/agama/products.d $SUDO cp -f $MYDIR/products.d/*.yaml /usr/share/agama/products.d # - Make sure NetworkManager is running -$SUDO systemctl start NetworkManager +if [ -n "${DISTROBOX_ENTER_PATH:-}" ]; then + AGAMA_WEB_SERVER_SVC="/usr/lib/systemd/system/agama-web-server.service" + grep -q DBUS_SYSTEM_BUS_ADDRESS $AGAMA_WEB_SERVER_SVC || $SUDO sed -i \ + -e '/\[Service\]/a Environment="DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/host/run/dbus/system_bus_socket"' \ + $AGAMA_WEB_SERVER_SVC + + AGAMA_SVC="/usr/lib/systemd/system/agama.service" + grep -q DBUS_SYSTEM_BUS_ADDRESS $AGAMA_SVC || $SUDO sed -i \ + -e '/\[Service\]/a Environment="DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/host/run/dbus/system_bus_socket"' \ + $AGAMA_SVC +else + $SUDO systemctl start NetworkManager +fi # systemd reload and start of service ( From 9405f2be46ca780b5454cdb76cd438c9893cf089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 5 Nov 2024 15:33:57 +0000 Subject: [PATCH 6/7] fix(setup): do not use pre-installed gems in distrobox --- setup-services.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-services.sh b/setup-services.sh index bd9dea7e5d..669688c341 100755 --- a/setup-services.sh +++ b/setup-services.sh @@ -117,7 +117,7 @@ fi sed -e '/gemspec/a gem "ruby-dbus", path: "/checkout-ruby-dbus"' -i Gemfile fi - if [ -n "${CI:-}" ] || [ -n "${DISTROBOX_ENTER_PATH:-}" ]; then + if [ -n "${CI:-}" ]; then # in CI reuse the pre-installed system gems from RPMs bundle config set --local disable_shared_gems 0 sudo bundle install From cc8aa938a16e3ae9df8b0beaa97b4fffe7b87785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Wed, 6 Nov 2024 13:01:45 +0000 Subject: [PATCH 7/7] fix(setup): use sudo when needed --- setup-services.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-services.sh b/setup-services.sh index 669688c341..d41575235b 100755 --- a/setup-services.sh +++ b/setup-services.sh @@ -120,7 +120,7 @@ fi if [ -n "${CI:-}" ]; then # in CI reuse the pre-installed system gems from RPMs bundle config set --local disable_shared_gems 0 - sudo bundle install + $SUDO bundle install else bundle config set --local path 'vendor/bundle' bundle install @@ -150,7 +150,7 @@ $SUDO $ZYPPER install \ cd $MYDIR/rust cargo build - sudo ln -sft /usr/bin $MYDIR/rust/target/debug/agama{,*server} + $SUDO ln -sft /usr/bin $MYDIR/rust/target/debug/agama{,*server} ) # - D-Bus configuration