Error building Kibana RPM package (6.4.2)


I'm trying to build Kibana into an RPM. I keep getting an error from FPM, saying the 'target' directory doesn't exist. Trying to get around this, I manually create the 'target' before doing the build. Unfortunately, it seems that part of the build process involves deleting the 'target' directory as part of a cleanup step. See below for excerpts from my build log (all in docker).

Step 51/58 : RUN mkdir /opt/kibana/target 

Step 58/58 : RUN node scripts/build --oss --release --rpm --skip-archives --debug
 ---> Running in dbba4716ad7b
 info  [  global  ] Verifying environment meets requirements
   │ succ  Node.js version verified
   │ succ  ✓ 0 sec

 info  [  global  ] Cleaning artifacts from previous builds
   │ debg  Deleting patterns: [ '/opt/kibana/build', '/opt/kibana/target' ]
   │ debg  Deleted 1 files/directories
   │ succ  ✓ 0 sec

info $ fpm --force -t rpm --package /opt/kibana/target/NAME-6.4.2-ARCH.TYPE -s dir 
--name kibana-oss --description Explore and visualize your Elasticsearch data --version 6.4.2 
--iteration 18021 --url []( --vendor Elasticsearch, Inc. 
--maintainer Kibana Team <> --license ASL 2.0 --conflicts kibana --after-install 
/opt/kibana/src/dev/build/tasks/os_packages/package_scripts/ --before-install 
/opt/kibana/src/dev/build/tasks/os_packages/package_scripts/ --before-remove 
/opt/kibana/src/dev/build/tasks/os_packages/package_scripts/ --after-remove 
/opt/kibana/src/dev/build/tasks/os_packages/package_scripts/ --config-files 
/etc/kibana/kibana.yml --template-value user=kibana --template-value group=kibana --template-value 
optimizeDir=/usr/share/kibana/optimize --template-value configDir=/etc/kibana --template-value 
pluginsDir=/usr/share/kibana/plugins --template-value dataDir=/var/lib/kibana --exclude 
usr/share/kibana/config --exclude usr/share/kibana/data --architecture x86_64 
--rpm-os linux /opt/kibana/build/oss/kibana-6.4.2-linux-x86_64/=/usr/share/kibana/ 
/opt/kibana/build/oss/kibana-6.4.2-linux-x86_64/config/=/etc/kibana/ /opt/kibana/build/oss/kibana-6.4.2-linux-x86_64/data/=/var/lib/kibana/ 
/opt/kibana/src/dev/build/tasks/os_packages/service_templates/systemd/etc/=/etc/ │ info 

{:timestamp=>"2018-10-14T05:24:34.577506+0000", :message=>"Parent directory does not exist: 
/opt/kibana/target - cannot write to /opt/kibana/target/kibana-oss-6.4.2-x86_64.rpm", :level=>:fatal} │ERROR failure │ERROR Error: 
{:timestamp=>"2018-10-14T05:24:34.577506+0000", :message=>"Parent directory does not exist: /opt/kibana/target - cannot write to /opt/kibana/target/kibana-oss-6.4.2-x86_64.rpm", 
:level=>:fatal} │ │ 
at makeError (/opt/kibana/node_modules/execa/index.js:172:9) │ 
at Promise.all.then.arr (/opt/kibana/node_modules/execa/index.js:277:16) │ at <anonymous>

Any suggestions for what I might be doing wrong? Should I be running the build from a different location?

Many thanks,

Hmm, it may be a bug on the Kibana side. I think the rpm task is depending on the archives task to create the target dir. We tend to always build everything, so it makes sense that this would slip through the cracks.

Pending a bug fix can we try removing --skip-archives and see If that gets us closer?

Thanks for that Jon. Your suggestion has fixed my build issue.


And thank you! I opened for tracking.

Thanks for your help :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.