Dear all,

Yes I have created a snap, and I am also happy to assist you in this 
mini-project.

As for the first step I have decided to create the minimal SNAP without the 
maven plugin to craft a minimalist snap. All the prebuild JARs were dumped into 
the snap, and a next to this a JRE was just added. The sed commands will help 
us to build the snap from trunk. The only thing should be figured out, is why 
the "lib" directory containing all the JARs should be placed on the writeable 
partition.
This is how it is so far...

name: minifi
version: '0.1'
summary: minifi from tarball
description: |
  tar desc

grade: devel
confinement: devmode

apps:
  myminifi:
    command: bin/minifi.sh
    plugs:
     - network
     - network-bind

parts:
  myminifi:
    plugin: dump
    source: minifi-0.2.0
    install: |
       SCOMMON="/var/snap/${SNAPCRAFT_PROJECT_NAME}/common"
       SDATA="/var/snap/${SNAPCRAFT_PROJECT_NAME}/current"
       sed -i 
"s|BOOTSTRAP_CONF_DIR=\"\${MINIFI_HOME}/conf\"|BOOTSTRAP_CONF_DIR=\"${SCOMMON}/conf\"|"
 $SNAPCRAFT_PART_INSTALL/bin/minifi.sh
       sed -i "s|conf\.dir=\./conf|conf\.dir=${SCOMMON}/conf|" 
$SNAPCRAFT_PART_INSTALL/conf/bootstrap.conf
       sed -i "s|lib\.dir=\./lib|lib\.dir=${SCOMMON}/lib|" 
$SNAPCRAFT_PART_INSTALL/conf/bootstrap.conf
       sed -i "s|export MINIFI_PID_DIR=\"\${MINIFI_HOME}/run\"|export 
MINIFI_PID_DIR=\"${SDATA}/run\"|" $SNAPCRAFT_PART_INSTALL/bin/minifi-env.sh
       sed -i "s|export MINIFI_LOG_DIR=\"\${MINIFI_HOME}/logs\"|export 
MINIFI_LOG_DIR=\"${SDATA}/logs\"|" $SNAPCRAFT_PART_INSTALL/bin/minifi-env.sh
       #rm -rf $SNAPCRAFT_PART_INSTALL/conf
       touch $SNAPCRAFT_PART_INSTALL/build-done
       sudo chmod 777 $SNAPCRAFT_PART_INSTALL/bin/minifi.sh
       sudo chmod 777 $SNAPCRAFT_PART_INSTALL/bin/minifi-env.sh

  jdk:
    plugin: jdk

Regards,
Gábor
____________________________________________________________________________________________________

Figyelmeztetés

Ez az e-mail üzenet, a fenti címzetteknek szánt, üzleti titoktartás alá eső 
bizalmas információkat tartalmazhat. Téves kézbesítés esetén kérjük, értesítsen 
a fent megjelölt telefonszámon, vagy e-mail címen. Kérjük, hogy az eredeti 
üzenet visszaküldéséről majd törléséről haladéktalanul gondoskodjon.



Notice:

This e-mail contains privileged and confidential business information intended 
only for the use of addresses(s) named above. Should you have received it in 
error, please notify us by phone or e-mail, and delete after returning the 
original e-mail to our address.

Reply via email to