[SCM] ci-tooling packaging branch, master, updated. 74f5bb6f10f0c2df6ebd3866ad9e9277e985e7aa

Rohan Garg rohangarg-guest at moszumanska.debian.org
Thu Nov 19 22:46:19 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=74f5bb6

The following commit has been merged in the master branch:
commit 74f5bb6f10f0c2df6ebd3866ad9e9277e985e7aa
Author: Rohan Garg <rohan at garg.io>
Date:   Thu Nov 19 23:46:06 2015 +0100

    Chown on exit/term
---
 ci/imager.rb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/ci/imager.rb b/ci/imager.rb
index 555dff6..95b83d4 100755
--- a/ci/imager.rb
+++ b/ci/imager.rb
@@ -13,3 +13,17 @@ Dir.chdir('live-config') do
   system('./configure')
   system('make')
 end
+
+# Workaround for docker not having suidmaps. We run as root in the docker
+# which will result in uid/gid of written things to be 0 rather than whatever
+# jenkins has. So instead we have a fake jenkins user in the docker we can
+# chmod to. This ultimately ensures that the owernship is using the uid of
+# the host jenkins (equal to docker jenkins) such that we don't end up with
+# stuff owned by others.
+at_exit do
+  FileUtils.chown_R('jenkins', 'jenkins', Dir.pwd, verbose: true)
+end
+
+Signal.trap 'TERM' do
+  FileUtils.chown_R('jenkins', 'jenkins', Dir.pwd, verbose: true)
+end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list