freedomofpress / dangerzone

Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs
https://dangerzone.rocks/
GNU Affero General Public License v3.0
3.35k stars 152 forks source link

Fix incorrect file permissions in Dangerzone RPMs #819

Closed apyrgio closed 1 month ago

apyrgio commented 1 month ago

Switch build directory for the rpmbuild command from ./install/linux/rpm-build to ~/rpmbuild. The main reason for this is that we want a build directory that will not be mounted in the container, since we've experienced issues with file permissions.

Regarding the choice of directories, we went with ~/rpmbuild because it's outside the Dangerzone source, and also because it's the default choice in Fedora 1.

In addition to the above fix, make the following changes:

  1. Add a check to detect if a Dangezone RPM is about to be built with wrong permissions.
  2. Fix some shebangs that were the cause of complaints during RPM build.

Closes #727