Comments (18)
I'll give it a try once I get home.
from distrobox.
That's a good idea, give me a sec.
from distrobox.
It could be that Fedora has some weird env vars that Ubuntu doesn't support?
from distrobox.
Okay, here's the verbose output. The formatting is a bit weird, but it has all of the info. One issue I can see right off the bat is that it's also moving env vars like these:
++ echo '--env="SSH_CONNECTION=10.25.25.52"'
++ echo '--env="SSH_CLIENT=10.25.25.52"'
++ echo '--env="SSH_TTY=/dev/pts/0"'
Maybe some sort of env var whitelist would make sense? This could be an unrelated issue though.
from distrobox.
It seems like it's detecting an env var named declare -f
. I ran echo $declare\ -f
and got nothing. I would recommend running cat dbresult.txt | grep 'declare -f
to highlight where it shows up.
from distrobox.
Mhh i see in the logs it picked up these envs
++ for i in $(printenv)
++ echo '--env="SSH_CONNECTION=10.25.25.52"'
++ for i in $(printenv)
++ echo '--env="56492"'
++ for i in $(printenv)
++ echo '--env="10.25.25.76"'
++ for i in $(printenv)
++ echo '--env="22"'
++ for i in $(printenv)
Which are invallid (not in NAME=VALUE format)
EDIT:
in particular I've found that it is this part it's giving errors
'--env="${which_declare}"'
which probably is set to declare -f
for whatever reason, let's see if the new patch fixes this
I'll check a better solution to pass the entire env to the container
from distrobox.
@ryleu I've worked a version that does not try to parse the env but just uses a temp file and the --env-file
flag instead of multiple single --env
flags
it is in the fix_env_passing
branch and it's this file:
https://raw.githubusercontent.com/89luca89/distrobox/fix_env_passing/distrobox-enter
Can you try with this file? If it does work I'll open a new PR to address this issue
from distrobox.
@ryleu seems to be a regression I've introduced in commit: enter: simplify env passing
I've reverted the commit and added an additional filter to remove lines containing spaces (which are the problem for env)
I've tested again on fedora 35 and it was giving me the same error, with this version is working as intended.
Culprit was this env variable which is oddly formatted:
BASH_FUNC_which%%=() { ( alias;
eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot "$@"
}
from distrobox.
Now it seems to be unable to connect to networking. Everything is working perfectly on the host system...
ryleu@riley-fedora ~> podman logs -f ubuntu-20-04
+ HOST_LINKS=/etc/host.conf /etc/hosts /etc/resolv.conf /etc/localtime /etc/timezone
+ rm -f /etc/host.conf
+ ln -s /run/host/etc/host.conf /etc/host.conf
+ rm -f /etc/hosts
+ ln -s /run/host/etc/hosts /etc/hosts
+ rm -f /etc/resolv.conf
+ ln -s /run/host/etc/resolv.conf /etc/resolv.conf
+ rm -f /etc/localtime
+ ln -s /run/host/etc/localtime /etc/localtime
+ rm -f /etc/timezone
+ ln -s /run/host/etc/timezone /etc/timezone
+ basename /bin/bash
+ shell_pkg=bash
+ command -v mount
/usr/bin/mount
+ command -v passwd
/usr/bin/passwd
+ command -v sudo
+ command -v apk
+ command -v apt-get
/usr/bin/apt-get
+ apt-get update
Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
+ apt-get install -y --no-install-recommends sudo apt-utils passwd procps util-linux bash
Reading package lists...
Building dependency tree...
Reading state information...
Package apt-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
apt
E: Unable to locate package sudo
E: Package 'apt-utils' has no installation candidate
+ [ 100 -ne 0 ]
An error occurred
+ echo An error occurred
from distrobox.
Oh yeah, it also uses apt-utils instead of apt for whatever reason.
Unrelated: do you have a Discord or something to make communication faster?
from distrobox.
from distrobox.
Yea probably I need a better "loading" screen π
Oh yeah, it also uses apt-utils instead of apt for whatever reason.
Unrelated: do you have a Discord or something to make communication faster?
No I don't have one yet
apt-utils
is being installed, not used
Err:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com'
This seems a dns resolution failure, I've just tested on Fedora 35 host and ubuntu 20.04 container and it works
Probably you need to recreate the container (podman rm -f ubuntu-20-04
) or simply stop it and restart it (podman kill -s 9 ubuntu-20-04
and then redo distrobox-enter
)
from distrobox.
Okay, I'll see if I set up SSH on my phone properly and give it a shot.
from distrobox.
Same issue... I'm going to try 21.10.
from distrobox.
If it's still the DNS problem let's open a separate issue for it so it's more clear it's another problem ok?
from distrobox.
Marking the env one as solved
from distrobox.
Sounds good, I'll let you know if the issue comes back once we get the DNS thing sorted.
from distrobox.
This one should be ok, if the podman command launches at all it means the env issue is resolved π
from distrobox.
Related Issues (20)
- [Suggestion] Blackarch toolbox image
- [Error] Unable to start rootless container created by distrobox with podman and runc v1.2.0~rc1
- [Error] distrobox enter fails if Username has "\" in name
- [QUESTION] How to run an entire desktop environment from distrobox
- shell prompt no longer differentiates when inside container HOT 1
- /home/USER/.local/bin/distrobox-create: 1: eval: tmpdir: parameter not set HOT 2
- [Error] Distrobox container created itβs own password, canβt use sudo. HOT 3
- [Discussion] Chrooting into arm/arm64 environment from distrobox
- Keyboard doesn't work in Ubuntu box
- [Discussion] Ubuntu 24.04 container - ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave HOT 1
- [Error] Cannot enter a void linux container from a void linux host
- Importing display for running mutter.
- Distrobox enter hangs indefinitely upon restarting image HOT 3
- [Error] XAUTHORITY is not set because host-spawn is not working. Move env setup to distrobox-enter HOT 2
- [Error] Can't install things in Ubuntu 22 container because directories are owned by nobody:nogroup
- [Suggestion] Allow changing linux capabilities
- [Error :: installing systemd (255.6-1) breaks dependency 'systemd=255.5' required by systemd-sysvcompat HOT 1
- [Error] dbus-broker-units: /usr/lib/systemd/system/dbus.service exists in filesystem (owned by dbus) HOT 1
- [Error] Ephemeral Distrobox (v1.7.2.1) not running on Ubuntu 23.10/Docker 26.1.1
- [Discussion] Bluetooth inside container
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distrobox.