From c006fb2ffefdbfa33dd26e50c5c7aba7f002a75dd31f9602becaa4a0649220dd Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 22 Jun 2022 07:18:21 +0000 Subject: [PATCH] Accepting request 984236 from home:dfaggioli:microos-desktop - Move config file in vendor specific path by default * Patch added: 0001-Read-config-in-usr-etc-too.patch - Update to latest version, 1.3.1 * all: allow users to specify non_interactive=true/false * all: improve code readability and formatting, follow happy paths * create: make it clearer to the user the container creation output * create: remove check about clone and image name * docs: Fix typo by @rugk in #308 * docs: remove WSL2 entry, cannot actively check if works correctly * enter: automatically create containers during 'distrobox-enter' (if they don't exist!) * export: add --root to rooful containers * export: fix DBusActivatable not working * host-exec docs: 755 -> 644 * host-exec: change [N/y] to [y/N] * init: fix apt hooks to make systemd install work * init: move zypper recommends after the basic packages install, make OpenSUSE containers creation faster * install: add --next flag to install latest commit from git * stop: update misleading comment * uninstall: interactive rm won't work when executed throught pipe * docs: update compatibility list * Confirm support for: Redhat UBI 9 Redhat UBI 9-init Redhat UBI 9-minimal AlmaLinux 8-minimal AlmaLinux 9-minimal AlmaLinux 9 OBS-URL: https://build.opensuse.org/request/show/984236 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/distrobox?expand=0&rev=11 --- 0001-Read-config-in-usr-etc-too.patch | 90 +++++++++++++++++++++++++++ distrobox-1.3.0.tar.gz | 3 - distrobox-1.3.1.tar.gz | 3 + distrobox.changes | 33 ++++++++++ distrobox.spec | 24 +++++-- 5 files changed, 145 insertions(+), 8 deletions(-) create mode 100644 0001-Read-config-in-usr-etc-too.patch delete mode 100644 distrobox-1.3.0.tar.gz create mode 100644 distrobox-1.3.1.tar.gz diff --git a/0001-Read-config-in-usr-etc-too.patch b/0001-Read-config-in-usr-etc-too.patch new file mode 100644 index 0000000..c411359 --- /dev/null +++ b/0001-Read-config-in-usr-etc-too.patch @@ -0,0 +1,90 @@ +From fd1243898d3547e890bd11cc69077fb2c57cf2df Mon Sep 17 00:00:00 2001 +From: Dario Faggioli +Date: Tue, 21 Jun 2022 18:17:59 +0200 +Subject: [PATCH] Read config in /usr/etc too + +Signed-off-by: Dario Faggioli +--- + distrobox-create | 1 + + distrobox-enter | 1 + + distrobox-list | 1 + + distrobox-rm | 1 + + distrobox-stop | 1 + + docs/README.md | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/distrobox-create b/distrobox-create +index b0bb0e9..94fe003 100755 +--- a/distrobox-create ++++ b/distrobox-create +@@ -79,6 +79,7 @@ version="1.3.1" + # leave priority to environment variables. + config_files=" + /usr/share/distrobox/distrobox.conf ++ /usr/etc/distrobox/distrobox.conf + /etc/distrobox/distrobox.conf + ${HOME}/.config/distrobox/distrobox.conf + ${HOME}/.distroboxrc +diff --git a/distrobox-enter b/distrobox-enter +index 138446c..2ddf9ac 100755 +--- a/distrobox-enter ++++ b/distrobox-enter +@@ -69,6 +69,7 @@ version="1.3.1" + # leave priority to environment variables. + config_files=" + /usr/share/distrobox/distrobox.conf ++ /usr/etc/distrobox/distrobox.conf + /etc/distrobox/distrobox.conf + ${HOME}/.config/distrobox/distrobox.conf + ${HOME}/.distroboxrc +diff --git a/distrobox-list b/distrobox-list +index f62da97..36788df 100755 +--- a/distrobox-list ++++ b/distrobox-list +@@ -42,6 +42,7 @@ container_manager="autodetect" + # leave priority to environment variables. + config_files=" + /usr/share/distrobox/distrobox.conf ++ /usr/etc/distrobox/distrobox.conf + /etc/distrobox/distrobox.conf + ${HOME}/.config/distrobox/distrobox.conf + ${HOME}/.distroboxrc +diff --git a/distrobox-rm b/distrobox-rm +index 4d6b0a8..e23a1d7 100755 +--- a/distrobox-rm ++++ b/distrobox-rm +@@ -46,6 +46,7 @@ version="1.3.1" + # leave priority to environment variables. + config_files=" + /usr/share/distrobox/distrobox.conf ++ /usr/etc/distrobox/distrobox.conf + /etc/distrobox/distrobox.conf + ${HOME}/.config/distrobox/distrobox.conf + ${HOME}/.distroboxrc +diff --git a/distrobox-stop b/distrobox-stop +index accfce0..f848b7e 100755 +--- a/distrobox-stop ++++ b/distrobox-stop +@@ -45,6 +45,7 @@ version="1.3.1" + # leave priority to environment variables. + config_files=" + /usr/share/distrobox/distrobox.conf ++ /usr/etc/distrobox/distrobox.conf + /etc/distrobox/distrobox.conf + ${HOME}/.config/distrobox/distrobox.conf + ${HOME}/.distroboxrc +diff --git a/docs/README.md b/docs/README.md +index df00785..61b2c7a 100644 +--- a/docs/README.md ++++ b/docs/README.md +@@ -243,6 +243,7 @@ Configuration files can be placed in the following paths, from the least importa + to the most important: + + - /usr/share/distrobox/distrobox.conf ++- /usr/etc/distrobox/distrobox.conf + - /etc/distrobox/distrobox.conf + - ${HOME}/.config/distrobox/distrobox.conf + - ${HOME}/.distroboxrc +-- +2.36.1 + diff --git a/distrobox-1.3.0.tar.gz b/distrobox-1.3.0.tar.gz deleted file mode 100644 index 76666c3..0000000 --- a/distrobox-1.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:03c0ba2115c14a178ad3ecc63f2103cf55c15ba42bc43978394ba00ad40da80b -size 79324 diff --git a/distrobox-1.3.1.tar.gz b/distrobox-1.3.1.tar.gz new file mode 100644 index 0000000..79138f5 --- /dev/null +++ b/distrobox-1.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22b6625ca243f55c08630d37015cdbfbe1939516022bfef502aa6603f42b4d00 +size 80081 diff --git a/distrobox.changes b/distrobox.changes index 62a3300..479543a 100644 --- a/distrobox.changes +++ b/distrobox.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Tue Jun 21 16:49:28 UTC 2022 - Dario Faggioli + +- Move config file in vendor specific path by default + * Patch added: + 0001-Read-config-in-usr-etc-too.patch +- Update to latest version, 1.3.1 + * all: allow users to specify non_interactive=true/false + * all: improve code readability and formatting, follow happy paths + * create: make it clearer to the user the container creation output + * create: remove check about clone and image name + * docs: Fix typo by @rugk in #308 + * docs: remove WSL2 entry, cannot actively check if works correctly + * enter: automatically create containers during 'distrobox-enter' (if they don't exist!) + * export: add --root to rooful containers + * export: fix DBusActivatable not working + * host-exec docs: 755 -> 644 + * host-exec: change [N/y] to [y/N] + * init: fix apt hooks to make systemd install work + * init: move zypper recommends after the basic packages install, + make OpenSUSE containers creation faster + * install: add --next flag to install latest commit from git + * stop: update misleading comment + * uninstall: interactive rm won't work when executed throught pipe + * docs: update compatibility list + * Confirm support for: + Redhat UBI 9 + Redhat UBI 9-init + Redhat UBI 9-minimal + AlmaLinux 8-minimal + AlmaLinux 9-minimal + AlmaLinux 9 + ------------------------------------------------------------------- Mon May 30 13:16:32 UTC 2022 - Dario Faggioli diff --git a/distrobox.spec b/distrobox.spec index 2918601..d5ba4c9 100644 --- a/distrobox.spec +++ b/distrobox.spec @@ -16,13 +16,15 @@ # Name: distrobox -Version: 1.3.0 +Version: 1.3.1 Release: 0 Summary: Use any linux distribution inside your terminal License: GPL-3.0 URL: https://github.com/89luca89/distrobox Source: distrobox-%{version}.tar.gz Source1: distrobox.conf +# Read the config from vendor specific directory (/usr/etc/distrobox) too +Patch1: 0001-Read-config-in-usr-etc-too.patch Requires: %{_bindir}/basename Requires: %{_bindir}/find Requires: %{_bindir}/grep @@ -39,17 +41,22 @@ external USB devices and graphical apps (X11/Wayland), and audio. %prep %setup -q -n distrobox-%{version} +%patch1 -p1 %build %install mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{_sysconfdir}/distrobox mkdir -p %{buildroot}%{_docdir}/%{name} ./install --prefix %{buildroot}/%{_prefix} install -m 0644 docs/*.md %{buildroot}%{_docdir}/%{name} +%if 0%{?suse_version} > 1500 +mkdir -p %{buildroot}%{_distconfdir}/distrobox +install -m 0644 %{SOURCE1} %{buildroot}%{_distconfdir}/distrobox/distrobox.conf +%else +mkdir -p %{buildroot}%{_sysconfdir}/distrobox install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/distrobox/distrobox.conf - +%endif %files %license COPYING.md %doc %{_docdir}/%{name} @@ -57,7 +64,14 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/distrobox/distrobox.conf %{_bindir}/%{name}-* %{_mandir}/man1/%{name}.1.gz %{_mandir}/man1/%{name}-*.1.gz +%if 0%{?suse_version} > 1500 +%{_distconfdir}/distrobox +%else %config %{_sysconfdir}/distrobox -%config %{_sysconfdir}/distrobox/distrobox.conf - +%endif +%if 0%{?suse_version} > 1500 +%{_distconfdir}/distrobox/distrobox.conf +%else +%config(noreplace) %{_sysconfdir}/distrobox/distrobox.conf +%endif %changelog