Skip to content

Commit

Permalink
Handle complaints about shebangs during RPM build
Browse files Browse the repository at this point in the history
When building the Dangerzone RPMs, we were seeing the following shebang
warnings:

    + /usr/lib/rpm/redhat/brp-mangle-shebangs
    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
    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

These warnings are benign in nature, but coupled with #727, they could
lead to incorrect file permissions.

Remove shebangs from the following files, since they are not executed
directly, but are imported instead:

    dangerzone/conversion/common.py
    dangerzone/conversion/doc_to_pixels.py
    dangerzone/conversion/pixels_to_pdf.py

Also, accept the suggestions by Fedora (/bin/sh -> /usr/bin/sh,
/usr/bin/env python3 -> /usr/bin/python3) for the following files:

    qubes/dz.Convert
    qubes/dz.ConvertDev

Refs #727
  • Loading branch information
apyrgio committed May 28, 2024
1 parent 31114ff commit 0f33a21
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions dangerzone/conversion/common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

import asyncio
import glob
import json
Expand Down
1 change: 0 additions & 1 deletion dangerzone/conversion/doc_to_pixels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
import asyncio
import glob
import os
Expand Down
1 change: 0 additions & 1 deletion dangerzone/conversion/pixels_to_pdf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python3
"""
Here are the steps, with progress bar percentages:
Expand Down
2 changes: 1 addition & 1 deletion qubes/dz.Convert
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
#!/usr/bin/sh
python -m dangerzone.conversion.doc_to_pixels
2 changes: 1 addition & 1 deletion qubes/dz.ConvertDev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/python3

import asyncio
import glob
Expand Down

0 comments on commit 0f33a21

Please sign in to comment.