Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] distrobox-based containerized application leaves behind temporary files #1623

Open
mcepl opened this issue Nov 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mcepl
Copy link
Contributor

mcepl commented Nov 29, 2024

Describe the bug

I am trying to use a distrobox-run container as an application, specifically my $EDITOR. Specifically, the project is hosted at https://build.opensuse.org/package/show/home:mcepl:moldavite/vis-master-container.

Everything works fine with slightly modified distrobox-export generated script, but when the editor leaves, there is sometime a temporary file left behind (..vis. pattern).

#!/bin/sh
# distrobox_binary
# name: vis
# outside of any container
if [ -z "${CONTAINER_ID}" ]; then
   exec /usr/bin/distrobox-enter  -n vis --  /usr/bin/vis  "$@"
# inside of the vis container
elif [ -x "/usr/bin/vis" ] ; then
    /usr/bin/vis "$@"
# inside of other container
elif [ -x "/usr/bin/distrobox-host-exec" ] ; then
    /usr/bin/distrobox-host-exec ~/.bin/vis "$@"
else
    echo "Cannot run vis"
    exit 255
fi

The only problem is that this editor leaves behind zero-length temporary files named .*.vis.* (e.g., ~/projekty/git-fixup/.git/.COMMIT_EDITMSG.vis.Hf71uh). I think those files I created at https://github.com/martanne/vis/blob/master/text-io.c#L253, and I wonder how it could clash with distrobox.

This change martanne/vis#507 looks a bit suspicious to me, but I wonder whether it is truly an error and whether distrobox shouldn’t accommodate it.

The problem doesn’t happen 100% (perhaps vis doesn’t create temporary files with small files?), so this log of distrobox-enter doesn’t show anything which I would consider wrong.

Desktop (please complete the following information):

  • Are you using podman, docker or lilipod? podman
  • Which version or podman, docker or lilipod? 5.2.5
  • Which version of distrobox? 1.8.0
  • Which host distribution? MicroOS (packages from openSUSE/Tumbleweed)
  • How did you install distrobox? system packages
@mcepl mcepl added the bug Something isn't working label Nov 29, 2024
@mcepl
Copy link
Contributor Author

mcepl commented Dec 9, 2024

vis-debug-log.txt

This is the output of one session where this creation of hidden files happened, but I don’t see anything interesting there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant