diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-09 15:24:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-09 15:24:38 +0100 |
| commit | d841f44724f7ca0cec9ebc12a8cb5654884bfca8 (patch) | |
| tree | eb53701e8c2c7578bc087978e6c843334d4afd2c | |
| parent | 7e92fadf9e4165460d51e9b1f4ed87d1aa154440 (diff) | |
More appimage tweaks.
| -rwxr-xr-x | cdist | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -492,12 +492,15 @@ class DockerTarget(Target): super(DockerTarget, self).__init__(platform, directory) self.version = version self.mounts = [] + self.privileged = False def setup(self): - mounts = '-v %s:%s ' % (self.directory, self.directory) + opts = '-v %s:%s ' % (self.directory, self.directory) for m in self.mounts: - mounts += '-v %s:%s ' % (m, m) - self.container = command_and_read('%s run -u %s %s -itd %s /bin/bash' % (config.docker(), getpass.getuser(), mounts, self.image)).read().strip() + opts += '-v %s:%s ' % (m, m) + if self.privileged: + opts += '--privileged=true ' + self.container = command_and_read('%s run -u %s %s -itd %s /bin/bash' % (config.docker(), getpass.getuser(), opts, self.image)).read().strip() def command(self, cmd): dir = os.path.join(self.directory, os.path.relpath(os.getcwd(), self.directory)) @@ -636,6 +639,7 @@ class AppImageTarget(LinuxTarget): def __init__(self, work): super(AppImageTarget, self).__init__('ubuntu', '18.04', 64, work) self.detail = 'appimage' + self.privileged = True class OSXTarget(Target): @@ -1002,7 +1006,7 @@ def main(): target = target_factory(args) - if target.platform == 'linux': + if target.platform == 'linux' and target.detail != "appimage": if target.distro != 'arch': output_dir = os.path.join(args.output, '%s-%s-%d' % (target.distro, target.version, target.bits)) else: |
