Fix disk_writer perms in .deb files (#1994).
authorCarl Hetherington <cth@carlh.net>
Tue, 11 May 2021 20:35:22 +0000 (22:35 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 11 May 2021 22:11:37 +0000 (00:11 +0200)
debian/rules
wscript

index 9f39f6b008992e9b5ae8d9970d48fbf669735340..2a2a536395abd19cffff1ab2523156a5b47fa7c4 100755 (executable)
@@ -49,5 +49,5 @@ override_dh_shlibdeps:
        dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
 
 override_dh_fixperms:
-       dh_fixperms --exclude usr/bin/dcpomatic2_uuid
-       dh_fixperms --exclude usr/bin/dcpomatic2_disk_writer
+       dh_fixperms
+       chmod 4755 debian/dcpomatic/usr/bin/dcpomatic2_disk_writer
diff --git a/wscript b/wscript
index c0b14cbf600325536b3de8f69dd23dddbcc8e99c..b7ea7de6ca054d1ea171223ddbf81db2e42008b3 100644 (file)
--- a/wscript
+++ b/wscript
@@ -666,16 +666,10 @@ def create_version_cc(version, cxx_flags):
 def post(ctx):
     if ctx.cmd == 'install' and ctx.env.TARGET_LINUX:
         ctx.exec_command('/sbin/ldconfig')
-        # setuid root executables
-        for e in ['dcpomatic2_uuid', 'dcpomatic2_disk_writer']:
-            # I can't find anything which tells me where things have been installed to,
-            # so here's some nasty hacks to guess.
-            debian = os.path.join(ctx.out_dir, '../debian/dcpomatic/usr/bin/%s' % e)
-            prefix = os.path.join(ctx.env['INSTALL_PREFIX'], 'bin/%s' % e)
-            if os.path.exists(debian):
-                os.chmod(debian, 0o4755)
-            if os.path.exists(prefix):
-                os.chmod(prefix, 0o4755)
+        # setuid root executable
+        exe = os.path.join(ctx.env['INSTALL_PREFIX'], 'bin/%s/dcpomatic2_disk_writer')
+        if os.path.exists(exe):
+            os.chmod(exe, 0o4755)
 
 def pot(bld):
     bld.recurse('src')