Bug 2271765 - Exclude distrobox-host-exec from shebang mangling
Summary: Exclude distrobox-host-exec from shebang mangling
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: distrobox
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Alessio
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-27 09:19 UTC by Olivier Samyn
Modified: 2024-04-19 21:24 UTC (History)
1 user (show)

Fixed In Version: distrobox-1.7.1-2.fc39 distrobox-1.7.1-2.el8 distrobox-1.7.1-2.el9 distrobox-1.7.1-2.fc38 distrobox-1.7.1-2.fc40
Clone Of:
Environment:
Last Closed: 2024-03-30 01:09:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Olivier Samyn 2024-03-27 09:19:08 UTC
Distrobox mounts some shell scripts from host's /usr/bin to the guest containers /usr/bin.
Some distributions like alpine linux are not linking /bin to /usr/bin. In those distribution, shell scripts that starts with /usr/bin/sh can not execute.

This is already solved in the distrobox spec file for the following scripts:
- /usr/bin/distrobox-export
- /usr/bin/distrobox-init

This issue is about adding /usr/bin/distrobox-host-exec to the list.

Related distrobox issues: 
- https://github.com/89luca89/distrobox/issues/626
- https://github.com/89luca89/distrobox/issues/127


Reproducible: Always

Steps to Reproduce:
1. distrobox create --image alpine tst
2. distrobox enter tst
3. distrobox-host-exec echo "hello"
Actual Results:  
$ distrobox-host-exec echo "hello"
bash: /usr/bin/distrobox-host-exec: cannot execute: required file not found

Expected Results:  
$ distrobox-host-exec echo "hello"
hello

Replacing `#!/usr/bin/sh` with `#!/bin/sh` at the top of /usr/bin/distrobox-host-exec solves the issue.

Comment 1 Fedora Update System 2024-03-29 12:08:13 UTC
FEDORA-2024-4e8edfc51d (distrobox-1.7.1-2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-4e8edfc51d

Comment 2 Fedora Update System 2024-03-29 14:20:56 UTC
FEDORA-2024-8bc20a8711 (distrobox-1.7.1-2.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-8bc20a8711

Comment 3 Fedora Update System 2024-03-29 14:40:16 UTC
FEDORA-EPEL-2024-a3fef77779 (distrobox-1.7.1-2.el9) has been submitted as an update to Fedora EPEL 9.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-a3fef77779

Comment 4 Fedora Update System 2024-03-29 15:09:12 UTC
FEDORA-EPEL-2024-e0e8dbadbe (distrobox-1.7.1-2.el8) has been submitted as an update to Fedora EPEL 8.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-e0e8dbadbe

Comment 5 Fedora Update System 2024-03-29 16:27:24 UTC
FEDORA-2024-4e8edfc51d has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-4e8edfc51d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-4e8edfc51d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2024-03-29 20:59:53 UTC
FEDORA-2024-74538ba691 (distrobox-1.7.1-2.fc38) has been submitted as an update to Fedora 38.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-74538ba691

Comment 7 Fedora Update System 2024-03-30 01:09:43 UTC
FEDORA-2024-8bc20a8711 (distrobox-1.7.1-2.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2024-03-30 01:21:29 UTC
FEDORA-EPEL-2024-a3fef77779 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-a3fef77779

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-03-30 01:32:52 UTC
FEDORA-EPEL-2024-e0e8dbadbe has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-e0e8dbadbe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2024-03-30 02:10:33 UTC
FEDORA-2024-74538ba691 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-74538ba691`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-74538ba691

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2024-04-07 00:31:46 UTC
FEDORA-EPEL-2024-e0e8dbadbe (distrobox-1.7.1-2.el8) has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2024-04-07 00:39:59 UTC
FEDORA-EPEL-2024-a3fef77779 (distrobox-1.7.1-2.el9) has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2024-04-07 01:04:59 UTC
FEDORA-2024-74538ba691 (distrobox-1.7.1-2.fc38) has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2024-04-19 21:24:49 UTC
FEDORA-2024-4e8edfc51d (distrobox-1.7.1-2.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.