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

Closed
mcepl opened this issue Nov 29, 2024 · 4 comments
Closed
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.

@89luca89
Copy link
Owner

If these files are created by the application I don't see how I can prevent this 🤷

@89luca89 89luca89 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2025
@mcepl
Copy link
Contributor Author

mcepl commented Jan 19, 2025

I was not asking so much for you doing something, but for suggesting if you have any idea what’s going on. However, only now I see that this project actually has discussions switched on. I will move this question there, then. I am sorry for bothering you here.

@mcepl
Copy link
Contributor Author

mcepl commented Jan 20, 2025

Right, I have actually filed that #1398 but it was ignored. Oh well.

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

2 participants