[elbe-devel] [PATCH 1/2] debianize: make rules file executable

yegorslists at googlemail.com yegorslists at googlemail.com
Wed Jan 22 09:16:06 CET 2020


From: Yegor Yefremov <yegorslists at googlemail.com>

Some tools complain if rules file does not have
the executable permissions and change the permissions.
This leads to build breakage because of the uncommitted
changes.

Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
---
 elbepack/debianize/panels/barebox.py | 4 ++++
 elbepack/debianize/panels/kernel.py  | 4 ++++
 elbepack/debianize/panels/uboot.py   | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/elbepack/debianize/panels/barebox.py b/elbepack/debianize/panels/barebox.py
index f6ee16fbb..5a848b3f2 100644
--- a/elbepack/debianize/panels/barebox.py
+++ b/elbepack/debianize/panels/barebox.py
@@ -6,6 +6,7 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 import os
+import stat
 
 from shutil import copyfile
 
@@ -45,6 +46,9 @@ class BareBox(Panel):
                 mako = os.path.join(self.tmpl_dir, tmpl + '.mako')
                 f.write(template(mako, self.deb))
 
+        st = os.stat(os.path.join('debian', 'rules'))
+        os.chmod(os.path.join('debian', 'rules'), st.st_mode | stat.S_IEXEC)
+
         cmd = 'dch --package barebox-' + pkg_name + \
             ' -v ' + self.deb['p_version'] + \
             ' --create -M -D ' + self.deb['release'] + \
diff --git a/elbepack/debianize/panels/kernel.py b/elbepack/debianize/panels/kernel.py
index 7071d8318..4700f4ba9 100644
--- a/elbepack/debianize/panels/kernel.py
+++ b/elbepack/debianize/panels/kernel.py
@@ -7,6 +7,7 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 import os
+import stat
 
 from shutil import copyfile
 
@@ -71,6 +72,9 @@ class Kernel(Panel):
                 mako = os.path.join(self.tmpl_dir, tmpl + '.mako')
                 f.write(template(mako, self.deb))
 
+        st = os.stat(os.path.join('debian', 'rules'))
+        os.chmod(os.path.join('debian', 'rules'), st.st_mode | stat.S_IEXEC)
+
         cmd = 'dch --package linux-' + pkg_name + \
             ' -v ' + self.deb['p_version'] + \
             ' --create -M -D ' + self.deb['release'] + \
diff --git a/elbepack/debianize/panels/uboot.py b/elbepack/debianize/panels/uboot.py
index ed2fb6630..f6a52a79d 100644
--- a/elbepack/debianize/panels/uboot.py
+++ b/elbepack/debianize/panels/uboot.py
@@ -6,6 +6,7 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 import os
+import stat
 
 from shutil import copyfile
 
@@ -72,6 +73,9 @@ class UBoot(Panel):
                 mako = os.path.join(self.tmpl_dir, tmpl + '.mako')
                 f.write(template(mako, self.deb))
 
+        st = os.stat(os.path.join('debian', 'rules'))
+        os.chmod(os.path.join('debian', 'rules'), st.st_mode | stat.S_IEXEC)
+
         cmd = 'dch --package u-boot-' + pkg_name + \
             ' -v ' + self.deb['p_version'] + \
             ' --create -M -D ' + self.deb['release'] + \
-- 
2.17.0




More information about the elbe-devel mailing list