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

preflight.sh: Fix REPO_PORT condition syntax #8165

Merged

Conversation

agraul
Copy link
Member

@agraul agraul commented Jan 15, 2024

What does this PR change?

In Bash, the string to the right of the =~ operator is interpreted as a POSIX extended regular expression. A quoted expression is matched literally, therefore we can't quote the string on the right side.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: only internal and user invisible changes
  • DONE

Test coverage

  • No tests: already covered
  • DONE

Links

Issue(s): https://github.com/SUSE/spacewalk/issues/23369
Old PR causing the issues: #8034
Ports(s): # add downstream PR(s), if any

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

@agraul agraul added merge-candidate Meaning it needs to be considered for merging when the master branch is frozen and removed merge-candidate Meaning it needs to be considered for merging when the master branch is frozen labels Jan 15, 2024
In Bash, the string to the right of the =~ operator is interpreted as a POSIX
extended regular expression. A quoted expression is matched literally, therefore
we can't quote the string on the right side.

Other than that, there were a few slips (redirection, missing "fi", missing "+" in
regex)
@agraul agraul force-pushed the fix-preflight-script-syntax branch from dd81ac3 to 53a434e Compare January 15, 2024 14:07
@deneb-alpha deneb-alpha merged commit 3eaae2b into uyuni-project:master Jan 15, 2024
17 checks passed
m-czernek pushed a commit to m-czernek/uyuni that referenced this pull request May 28, 2024
* preflight.sh: write selinux policy if needed

SSH Push in the "tunnel" flavor can conflict with SELinux policies
shipped by operating systems. The default policies are not aware of
the additional port we need for the tunnel.

The preflight.sh script is executed at the beginning of bootstrapping to
download the Salt Bundle and allow Salt code execution. To allow for this
download, a custom policy is written when SELinux is enabled and the system is
managed via a tunnel. The policy is only written and loaded once.

Fixes bsc#1217594

(cherry picked from commit bc2d962)

* preflight.sh: Fix shell syntax (uyuni-project#8165)

In Bash, the string to the right of the =~ operator is interpreted as a POSIX
extended regular expression. A quoted expression is matched literally, therefore
we can't quote the string on the right side.

Other than that, there were a few slips (redirection, missing "fi", missing "+" in
regex)

(cherry picked from commit 3eaae2b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants