Skip to content

Wrong permissions on built Fedora artifacts #727

@apyrgio

Description

@apyrgio

While testing the produced RPMs for the 0.6.0 release, we stumbled upon this issue on Fedora 39 (Fedora 38 is also affected):

image

It seems that the produced RPMs have wrong permissions (current: rw------- / 600, expected: rw-r--r-- / 644), specifically on the following files:

dangerzone/conversion/common.py
dangerzone/conversion/doc_to_pixels.py
dangerzone/conversion/pixels_to_pdf.py
qubes/dz.Convert
qubes/dz.ConvertDev

While rebuilding the RPMs, we see the following warnings in the logs:

*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone-0.6.0.dist-info/LICENSE is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone-0.6.0.dist-info/WHEEL is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone-0.6.0.dist-info/entry_points.txt is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone-0.6.0.dist-info/INSTALLER is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone-0.6.0.dist-info/METADATA is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/util.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/__init__.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/logic.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/container-pip-requirements.txt is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/cli.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/document.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/gui/main_window.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/gui/__init__.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/gui/updater.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/gui/logic.py is executable but has no shebang, removing executable bit
mangling shebang in /usr/lib/python3.12/site-packages/dangerzone/conversion/doc_to_pixels.py from /usr/bin/env python3 to #!/usr/bin/python3
mangling shebang in /usr/lib/python3.12/site-packages/dangerzone/conversion/common.py from /usr/bin/env python3 to #!/usr/bin/python3
mangling shebang in /usr/lib/python3.12/site-packages/dangerzone/conversion/pixels_to_pdf.py from /usr/bin/env python3 to #!/usr/bin/python3
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/conversion/errors.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/settings.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/args.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/errors.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/isolation_provider/qubes.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/isolation_provider/container.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/isolation_provider/dummy.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/lib/python3.12/site-packages/dangerzone/isolation_provider/base.py is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/applications/press.freedom.dangerzone.desktop is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/dangerzone/image-id.txt is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/dangerzone/dangerzone.css is executable but has no shebang, removing executable bit
*** WARNING: ./usr/share/dangerzone/version.txt is executable but has no shebang, removing executable bit
mangling shebang in /etc/qubes-rpc/dz.ConvertDev from /usr/bin/env python3 to #!/usr/bin/python3
mangling shebang in /etc/qubes-rpc/dz.Convert from /bin/sh to #!/usr/bin/sh

We can see here that the files with the wrong permissions are the ones whose shebang has been mangled. The Fedora docs further explain this operation: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines

What's interesting though is that this warning is not present in the CI job that builds RPMs, nor is it reproduced locally: https://github.com/freedomofpress/dangerzone/actions/runs/8041707585/job/21961324246#step:5:207.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions