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

[RPM] Fix handling paths containing whitespaces #733

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

k0walik
Copy link
Contributor

@k0walik k0walik commented Aug 16, 2023

What

Fixes #732:

  • Added quotes around paths to avoid string splitting when the path contains whitespaces
  • Added file attribute string template
  • Added .strip() calls around string templates to avoid extra blank lines

Verification

$ rpm -qlpviR bazel-bin/test/test-0.0.0-0..rpm
Name        : test
Version     : 0.0.0
Release     : 0
Architecture: x86_64
Install Date: (not installed)
Group       : Unspecified
Size        : 7
License     : license
Signature   : (none)
Source RPM  : test-0.0.0-0.src.rpm
Build Date  : Wed Aug 16 07:55:34 2023
Build Host  : tomasz-dev
Summary     : summary
Description :
description
pre,interp: /bin/sh
post,interp: /bin/sh
preun,interp: /bin/sh
postun,interp: /bin/sh
rpmlib: rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib: rpmlib(FileDigests) <= 4.6.0-1
rpmlib: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
drwxr-xr-x    2 root     root                        0 Aug 16 07:55 /dire ctory
-rw-r--r--    1 root     root                        0 Aug 16 07:55 /foo bar
-rw-r--r--    1 root     root                        0 Aug 16 07:55 /foobar
lrwxrwxrwx    1 root     root                        7 Aug 16 07:55 /sym link -> /foobar

Copy link
Collaborator

@aiuto aiuto left a comment

Choose a reason for hiding this comment

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

Mostly OK. Just the one question about quoting.

@aiuto aiuto merged commit a87cb8d into bazelbuild:main Aug 22, 2023
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.

pkg_rpm build fails if the source paths contain whitespaces
2 participants