Hi Folks,
I have two parts in my snap both of which have .tar.gz files as their source:
chronograf:
plugin: dump
source: https://dl.influxdata.com/chronograf/releases/chronograf-1.8.6_linux_armhf.tar.gz
filesets:
bin: [ usr/bin/* ]
stage:
- $bin
telegraf:
plugin: dump
source: https://dl.influxdata.com/telegraf/releases/telegraf-1.15.3_linux_armhf.tar.gz
filesets:
bin: [ usr/bin/* ]
stage:
- $bin
The chrongraph one works fine and my snap includes the files from usr/bin, but no files get included from usr/bin in the telegraf archive.
Looking at the contents of the archives there is a slight difference in the path:
tar tvf chronograf-1.8.6_linux_armhf.tar.gz
drwxr-xr-x root/root 0 2020-08-26 19:49 ./chronograf-1.8.6-1/
drwxr-xr-x root/root 0 2020-08-26 19:49 ./chronograf-1.8.6-1/var/
drwxr-xr-x root/root 0 2020-08-26 19:49 ./chronograf-1.8.6-1/var/lib/
...
tar tvf telegraf-1.15.3_linux_armhf.tar.gz
drwxr-xr-x root/root 0 2020-09-11 19:48 ./
drwxr-xr-x root/root 0 2020-09-11 19:48 ./telegraf-1.15.3/
drwxr-xr-x root/root 0 2020-09-11 19:48 ./telegraf-1.15.3/usr/
drwxr-xr-x root/root 0 2020-09-11 19:48 ./telegraf-1.15.3/usr/lib/
...
It seems that when unpacking the chronograf archive the top level directory (chronograf-1.8.6-1) gets stripped wheres for telegraf (telegraf-1.15.3) it doesn’t
Looking in parts/ after running snapcraft I can see:
$ ls parts/chronograf/src
etc usr var
$ ls parts/telegraf/src
telegraf-1.15.3
$ ls parts/telegraf/src/telegraf-1.15.3/
etc usr var
Presumably the inclusion of the “-x” at the end of the top level directory in the chronograf archive is what is making the difference here.
Is there some way I to configure the dump plugin to cope with the telegraf archive ?
I tried changing my part definition to:
telegraf:
plugin: dump
source: https://dl.influxdata.com/telegraf/releases/telegraf-1.15.3_linux_armhf.tar.gz
filesets:
bin: [ telegraf-1.15.3/usr/bin/* ]
stage:
- $bin
but that still didn’t help