Accepting request 1007026 from home:dfaggioli:microos-desktop

- Update to latest version (1.4.1)
- Patches removed:
  0001-distrobox-if-no-command-is-specified-default-to-ente.patch
- Add a bash-completion subpackage
- Changes in 1.4.1:
  * completion: add bash completion support!
  * create/enter: revert 52a34fb
  * create: add --no-entry
  * docs: update host and guest lists
  * docs: redundant "else" in readme
  * init: add mesa and vulkan drivers by default
  * init: don't query filesystems mounted by beesd
  * install-podman: update to 4.2.1
  * install-podman: install crun, it generally
    works better in rootless.
  * install-podman: fix default configuration
  * ephemeral: do cleanup even in case of errors
  * generate-entry: auto-discover curl or wget.

OBS-URL: https://build.opensuse.org/request/show/1007026
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/distrobox?expand=0&rev=19
This commit is contained in:
Dario Faggioli 2022-09-29 16:40:34 +00:00 committed by Git OBS Bridge
parent 60d52da4fe
commit 91ee0575f2
5 changed files with 48 additions and 76 deletions

View File

@ -1,68 +0,0 @@
From a4f0fd0560c39d58472ef09e4228948e88012d33 Mon Sep 17 00:00:00 2001
From: Dario Faggioli <dfaggioli@suse.com>
Date: Thu, 28 Jul 2022 10:10:28 +0200
Subject: [PATCH] distrobox: if no command is specified, default to enter
If just `distrobox` is invoked, without any command, assume
`distrobox enter`.
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
---
distrobox | 18 ++++++++++++------
docs/README.md | 1 +
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/distrobox b/distrobox
index 0f83b54..9b53547 100755
--- a/distrobox
+++ b/distrobox
@@ -19,6 +19,12 @@
# along with distrobox; if not, see <http://www.gnu.org/licenses/>.
# POSIX
+# Optional env variables:
+# DBX_DEFAULT_COMMAND
+
+default_command="enter"
+[ -n "${DBX_DEFAULT_COMMAND}" ] && default_command="${DBX_DEFAULT_COMMAND}"
+
set -o errexit
set -o nounset
@@ -48,15 +54,15 @@ Choose one of the available commands:
EOF
}
+distrobox_path="$(dirname "${0}")"
if [ $# -eq 0 ]; then
- show_help
- exit
+ printf "No command specified. Assuming: distrobox-%s\n" "${default_command}"
+ distrobox_command="${default_command}"
+else
+ distrobox_command="${1}"
+ shift
fi
-distrobox_path="$(dirname "${0}")"
-distrobox_command="${1}"
-shift
-
# Simple wrapper to the distrobox utilities.
# We just detect the 1st argument and launch the matching distrobox utility.
case "${distrobox_command}" in
diff --git a/docs/README.md b/docs/README.md
index 8ec20bf..165985f 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -283,6 +283,7 @@ Alternatively it is possible to specify preferences using ENV variables:
- DBX_CONTAINER_NAME
- DBX_NON_INTERACTIVE
- DBX_SKIP_WORKDIR
+- DBX_DEFAULT_COMMAND
---
--
2.37.3

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e643a702c3f3f0d7467afe840b4f3ee6e4c369b6464618b6ec09f7ad27eb64f5
size 228027

3
distrobox-1.4.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be3266f77011b30da5d0035e246d4e4a9360b7c90fbd8b90ac581165a00217b8
size 231405

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Thu Sep 29 11:49:23 UTC 2022 - Dario Faggioli <dfaggioli@suse.com>
- Update to latest version (1.4.1)
- Patches removed:
0001-distrobox-if-no-command-is-specified-default-to-ente.patch
- Add a bash-completion subpackage
- Changes in 1.4.1:
* completion: add bash completion support!
* create/enter: revert 52a34fb
* create: add --no-entry
* docs: update host and guest lists
* docs: redundant "else" in readme
* init: add mesa and vulkan drivers by default
* init: don't query filesystems mounted by beesd
* install-podman: update to 4.2.1
* install-podman: install crun, it generally
works better in rootless.
* install-podman: fix default configuration
* ephemeral: do cleanup even in case of errors
* generate-entry: auto-discover curl or wget.
-------------------------------------------------------------------
Wed Sep 14 09:24:10 UTC 2022 - Dario Faggioli <dfaggioli@suse.com>

View File

@ -1,5 +1,5 @@
#
# spec file
# spec file for package distrobox
#
# Copyright (c) 2022 SUSE LLC
#
@ -15,23 +15,27 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: distrobox
Version: 1.4.0
Version: 1.4.1
Release: 0
Summary: Use any linux distribution inside your terminal
License: GPL-3.0
License: GPL-3.0-only
URL: https://github.com/89luca89/distrobox
Source: distrobox-%{version}.tar.gz
Source1: distrobox.conf
# Default to distrobox-enter when just distrobox is used
Patch1: 0001-distrobox-if-no-command-is-specified-default-to-ente.patch
Requires: %{_bindir}/basename
Requires: %{_bindir}/find
Requires: %{_bindir}/grep
Requires: %{_bindir}/sed
Requires: (%{_bindir}/podman or %{_bindir}/docker)
BuildRequires: hicolor-icon-theme
# Idea would be: if bash completion is already there, let's have it. If
# not, let's "only" recommend it...
Recommends: %{name}-bash-completion
Requires: (%{name}-bash-completion if bash-completion)
BuildRequires: ImageMagick
BuildRequires: hicolor-icon-theme
BuildArch: noarch
%description
@ -41,6 +45,16 @@ The created container will be tightly integrated with the host,
allowing sharing of the HOME directory of the user, external storage,
external USB devices and graphical apps (X11/Wayland), and audio.
%package bash-completion
Summary: Bash completion for %{name}
Requires: %{name} = %{version}
Requires: bash-completion
Supplements: (%{name} and bash-completion)
BuildArch: noarch
%description bash-completion
Bash command line completion support for distrobox.
%prep
%autosetup -p1 -n distrobox-%{version}
@ -90,4 +104,8 @@ done
%dir %{_datadir}/icons/hicolor/*x*/
%dir %{_datadir}/icons/hicolor/*x*/apps/
%{_datadir}/icons/hicolor/*/apps/terminal-distrobox-icon.png
%files bash-completion
%{_datadir}/bash-completion/completions/%{name}*
%changelog