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

Incorrect shell being used in /usr/lib/venv-salt-minion/bin/post_start_cleanup.sh #9477

Open
rbrockway opened this issue Nov 15, 2024 · 1 comment
Assignees
Labels
bug Something isn't working P3

Comments

@rbrockway
Copy link

Problem description

The script /usr/lib/venv-salt-minion/bin/post_start_cleanup.sh is using /bin/sh and assumes it is linked to /usr/bin/bash. Debian links /bin/sh to dash not bash. The script executes /bin/sh and expects certain behaviour which it will not get from Debian.

Specifically, the builtin ‘builtin’ doesn’t exist in dash and thus throws an error. The error is unexpected and not trapped.

The script should simply have used #!/bin/bash rather than #!/bin/sh and avoided this problem.

Steps to reproduce

1.Execute the script /usr/lib/venv-salt-minion/bin/post_start_cleanup.sh on a Debian 10, 11 or 12 system.
2.The script will be executed with /bin/sh which links to /bin/dash on Debian
3.The script will error with the following output: "/usr/lib/venv-salt-minion/bin/post_start_cleanup.sh: 3: builtin: not found"
4.This might be a regression. Hosts installed under a previous Uyuni release use #!/usr/bin/env bash

Uyuni version

uyuni02:/ # zypper info Uyuni-Server-release
Retrieving repository 'Update repository of openSUSE Backports' metadata .............................................[done]
Building repository 'Update repository of openSUSE Backports' cache ..................................................[done]
Retrieving repository 'Update repository with updates from SUSE Linux Enterprise 15' metadata ........................[done]
Building repository 'Update repository with updates from SUSE Linux Enterprise 15' cache .............................[done]
Retrieving repository 'Main Update Repository' metadata ..............................................................[done]
Building repository 'Main Update Repository' cache ...................................................................[done]
Retrieving repository 'Update Repository (Non-Oss)' metadata .........................................................[done]
Building repository 'Update Repository (Non-Oss)' cache ..............................................................[done]
Loading repository data...
Reading installed packages...

Information for package Uyuni-Server-release:
---------------------------------------------
Repository     : uyuni-server-stable
Name           : Uyuni-Server-release
Version        : 2024.07-230900.219.1.uyuni3
Arch           : x86_64
Vendor         : obs://build.opensuse.org/systemsmanagement:Uyuni
Support Level  : Level 3
Installed Size : 1.4 KiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : Uyuni-Server-release-2024.07-230900.219.1.uyuni3.src
Upstream URL   : https://www.uyuni-project.org/
Summary        : Uyuni Server
Description    :
    Uyuni lets you efficiently manage physical, virtual,
    and cloud-based Linux systems. It provides automated and cost-effective
    configuration and software management, asset management, and system
    provisioning.

Uyuni proxy version (if used)

No response

Useful logs

No response

Additional information

No response

@rbrockway rbrockway added bug Something isn't working P5 labels Nov 15, 2024
@mcalmer
Copy link
Contributor

mcalmer commented Nov 15, 2024

CC @agraul @meaksh @vzhestkov

@agraul agraul added P3 and removed P5 labels Nov 25, 2024
@m-czernek m-czernek self-assigned this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3
Projects
None yet
Development

No branches or pull requests

4 participants