From 6d293afbfb23ef81e716781b0dee54c24c0f2fdf Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Wed, 25 May 2016 09:12:08 -0500 Subject: [PATCH] [build] move install to /usr/share, config to /etc/kibana --- tasks/build/os_packages.js | 18 ++++++++++++------ tasks/build/pleaserun.js | 10 +++++++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/tasks/build/os_packages.js b/tasks/build/os_packages.js index 839782a9e3e55..62ba385c99cd9 100644 --- a/tasks/build/os_packages.js +++ b/tasks/build/os_packages.js @@ -32,14 +32,20 @@ module.exports = function (grunt) { '--before-install', resolve(packageScriptsDir, 'pre_install.sh'), '--before-remove', resolve(packageScriptsDir, 'pre_remove.sh'), '--after-remove', resolve(packageScriptsDir, 'post_remove.sh'), - '--config-files', '/opt/kibana/config/kibana.yml', + '--config-files', '/etc/kibana/kibana.yml', '--template-value', 'user=kibana', '--template-value', 'group=kibana' + + //uses relative path to --prefix + '--exclude', 'usr/share/kibana/config' ]; - const files = buildDir + '/=/opt/kibana'; - const sysv = servicesByName.sysv.outputDir + '/etc/=/etc/'; - const systemd = servicesByName.systemd.outputDir + '/lib/=/lib/'; + const files = [ + `${buildDir}/=/usr/share/kibana/`, + `${buildDir}/config/=/etc/kibana/`, + `${servicesByName.sysv.outputDir}/etc/=/etc/`, + `${servicesByName.systemd.outputDir}/lib/=/lib/` + ]; //Manually find flags, multiple args without assignment are not entirely parsed var flags = grunt.option.flags().join(','); @@ -50,10 +56,10 @@ module.exports = function (grunt) { grunt.file.mkdir(targetDir); if (buildDeb || noneSpecified) { - fpm(args.concat('-t', 'deb', '--deb-priority', 'optional', '-a', arch, files, sysv, systemd)); + fpm(args.concat('-t', 'deb', '--deb-priority', 'optional', '-a', arch, files)); } if (buildRpm || noneSpecified) { - fpm(args.concat('-t', 'rpm', '-a', arch, '--rpm-os', 'linux', files, sysv, systemd)); + fpm(args.concat('-t', 'rpm', '-a', arch, '--rpm-os', 'linux', files)); } }); diff --git a/tasks/build/pleaserun.js b/tasks/build/pleaserun.js index 8b8444235a9d0..907ebc7b2ec25 100644 --- a/tasks/build/pleaserun.js +++ b/tasks/build/pleaserun.js @@ -19,8 +19,16 @@ module.exports = function createServices(grunt) { '--sysv-log-path', '/var/log/kibana/', '-p', service.name, '-v', service.version, - '/opt/kibana/bin/kibana' + '/usr/share/kibana/bin/kibana', + '-c /etc/kibana/kibana.yml' ]); }); +<<<<<<< a9f1c863a78d71b9d350badac9d65a204898e566 +======= + + grunt.file.mkdir(userScriptsDir); + exec('please-manage-user', ['--output', userScriptsDir, 'kibana']); + appendFileSync(resolve(userScriptsDir, 'installer.sh'), 'chown -R kibana:kibana /usr/share/kibana/optimize'); +>>>>>>> [build] move install to /usr/share, config to /etc/kibana }); };