Skip to content

[autobackport: sssd-2-9] Use macro rather than shell expansion for string processing in spec file#8520

Draft
sssd-bot wants to merge 2 commits intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8511-to-sssd-2-9
Draft

[autobackport: sssd-2-9] Use macro rather than shell expansion for string processing in spec file#8520
sssd-bot wants to merge 2 commits intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8511-to-sssd-2-9

Conversation

@sssd-bot
Copy link
Contributor

This is an automatic backport of PR#8511 Use macro rather than shell expansion for string processing in spec file to branch sssd-2-9, created by @nforro.

Caution

@nforro The patches did not apply cleanly. It is necessary to resolve conflicts before merging this pull request. Commits that introduced conflict are marked with CONFLICT!.

You can push changes to this pull request

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8511-to-sssd-2-9
git checkout SSSD-sssd-backport-pr8511-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr8511-to-sssd-2-9 --force

Original commits
f9697d4 - Use macro rather than shell expansion for string processing in spec file
caa0ec2 - Add a default for %samba_package_version

Backported commits

  • 29098c2 - CONFLICT! Use macro rather than shell expansion for string processing in spec file
  • f21cec3 - Add a default for %samba_package_version

Conflicting Files Information (check for deleted and re-added files)

  • CONFLICT! Use macro rather than shell expansion for string processing in spec file
On branch SSSD-sssd-backport-pr8511-to-sssd-2-9
You are currently cherry-picking commit f9697d4ff.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   contrib/sssd.spec.in

no changes added to commit (use "git add" and/or "git commit -a")

Original Pull Request Body

We've hardened security in Packit Service and shell expansions in spec files are now rejected as they can be used to execute arbitrary code. There is no need to use shell expansion for string processing, there is an existing macro for this very purpose.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request contains an unresolved merge conflict in contrib/sssd.spec.in. The conflict markers have been committed directly into the file, which makes it invalid and will break the build. This is a critical issue that must be resolved before merging.

Comment on lines +61 to +65
<<<<<<< HEAD
Version: %{downstream_version}
=======
Version: %{gsub @PACKAGE_VERSION@ - ~}
>>>>>>> f9697d4ff (Use macro rather than shell expansion for string processing in spec file)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This block contains unresolved merge conflict markers (<<<<<<<, =======, >>>>>>>). This makes the spec file invalid and must be resolved. The intention of the original change was to replace a shell expansion with an RPM macro. The correct resolution is to use the gsub macro. Also, the syntax for gsub in the conflict seems incorrect. The correct line should be Version: %{gsub:@PACKAGE_VERSION@:-:~}. As part of this change, the %global downstream_version definition on line 8 should also be removed.

Version: %{gsub:@PACKAGE_VERSION@:-:~}

@thalman thalman force-pushed the SSSD-sssd-backport-pr8511-to-sssd-2-9 branch from f21cec3 to df2b025 Compare March 16, 2026 14:14
nforro added 2 commits March 16, 2026 15:46
Signed-off-by: Nikola Forró <nforro@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit f9697d4)
Signed-off-by: Nikola Forró <nforro@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit caa0ec2)
@thalman thalman force-pushed the SSSD-sssd-backport-pr8511-to-sssd-2-9 branch from df2b025 to 6b297f6 Compare March 16, 2026 14:46
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.

3 participants