You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/08/26 22:46:46 UTC

[13/15] git commit: set policy_version in apparmor.json based on framework version

set policy_version in apparmor.json based on framework version


Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/24367fe1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/24367fe1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/24367fe1

Branch: refs/heads/master
Commit: 24367fe133409af6bfba02c3b53839fcf0cd09d5
Parents: 1f76dfe
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Mon Jul 28 03:42:08 2014 +0400
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Tue Aug 19 14:20:37 2014 +0400

----------------------------------------------------------------------
 bin/build/lib/ubuntu.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/24367fe1/bin/build/lib/ubuntu.js
----------------------------------------------------------------------
diff --git a/bin/build/lib/ubuntu.js b/bin/build/lib/ubuntu.js
index f17fae1..644856f 100644
--- a/bin/build/lib/ubuntu.js
+++ b/bin/build/lib/ubuntu.js
@@ -250,7 +250,6 @@ function buildClickPackage(campoDir, ubuntuDir, nobuild, architecture, framework
     }).then(function () {
         cp(path.join(ubuntuDir, 'www', '*'), path.join(prefixDir, 'www'));
         cp(path.join(ubuntuDir, 'qml', '*'), path.join(prefixDir, 'qml'));
-        cp(path.join(ubuntuDir, 'apparmor.json'), prefixDir);
         cp(path.join(ubuntuDir, 'cordova.desktop'), prefixDir);
         cp(path.join(ubuntuDir, 'config.xml'), prefixDir);
 
@@ -259,6 +258,13 @@ function buildClickPackage(campoDir, ubuntuDir, nobuild, architecture, framework
         content.framework = framework;
         fs.writeFileSync(path.join(prefixDir, 'manifest.json'), JSON.stringify(content));
 
+        content = JSON.parse(fs.readFileSync(path.join(ubuntuDir, 'apparmor.json'), {encoding: "utf8"}));
+        if (framework == 'ubuntu-sdk-13.10')
+            content.policy_version = 1;
+        else
+            content.policy_version = 1.1;
+        fs.writeFileSync(path.join(prefixDir, 'apparmor.json'), JSON.stringify(content));
+
         pushd(prefixDir);
 
         return execAsync('click build .');