name: suricata
base: core22
version: '6.0.5'
summary: Suricata is a tool
description: |
Suricata is a high performance Network IDS, IPS and Network Security
Monitoring engine. Open Source and owned by a community-run non-profit
foundation, the Open Information Security Foundation (OISF). Suricata is
developed by the OISF, its contributors and the Suricata community.
grade: stable
confinement: strict
apps:
suricata:
command: bin/suricata
plugs:
- network
- network-bind
parts:
suricata:
source: .
plugin: dump
source-type: local
organize:
suricata: snap/local/suricata/
iam getting this error
Generated snap metadata
Command β[βsnapβ, βpackβ, ββfilenameβ, βsuricata_6.0.5_amd64.snapβ, ββcompressionβ, βxzβ, PosixPath(β/root/primeβ), PosixPath(β/root/projectβ)]β returned non-zero exit status 1.
Failed to execute pack in instance.
The path of suricata is probably not what youβve given. Probably itβs just suricata. So, the command should be suricata. Also, you can shell into the environment by running snapcraft with --debug argument.
Iam getting this error:
Generated snap metadata
Command β[βsnapβ, βpackβ, ββfilenameβ, βsuricata_6.0.5_amd64.snapβ, ββcompressionβ, βxzβ, PosixPath(β/root/primeβ), PosixPath(β/root/projectβ)]β returned non-zero exit status 1.
Failed to execute pack in instance
Is there any particular reason you are installing into snap/local (which is a very special location in snaps to ship special scripts you do not want executed directly)
No special reason normally just wanted to create a snap for suricata, and try to install and check the functionalities like apt install .but facing errors creating from source so we moved to create a snap for binaries that we can able to create snap with just binary and supported libraries but if we install it not creating the folders and yaml files and rule files for that what i need to add for my yaml file
name: suricata
base: core22
version: '6.0.5'
summary: Suricata is a tool
description: |
Suricata is a high performance Network IDS, IPS and Network Security
Monitoring engine. Open Source and owned by a community-run non-profit
foundation, the Open Information Security Foundation (OISF). Suricata is
developed by the OISF, its contributors and the Suricata community.
grade: stable
confinement: strict
apps:
suricata:
command: suricata
plugs:
- network
- network-bind
parts:
suricata:
source: /root/project/snap/local/bin/
source-type: local
organize:
/root/project/snap/local/*: .
plugin: dump
Please drop the whole organize block, snap/ is a special dir holding package info Metadata, hooks and hook scripts, no payload data should go into it, just let snapcraft do its duty and you will be fine.
Your source: entry should likely just be:
source: suricata
So that things in that dir move into the toplevel of your snap
this is unsupported and may cause unexpected behavior. If you must store
these files within the 'snap' directory, move them to 'snap/local'
which is ignored by snapcraft.
Failed to pull source: 'suricata' not found.
Make sure the source path is correct and accessible.
Failed to execute pack in instance.
Well, i was assuming you have a βsuricataβ dir in your project tree β¦ where exactly does your source live before you add a snap/snapcraft.yaml to it and what is the structure ?
here they have snapcraft yaml file there that i have taken reference so what i thought is the link he is building from source , i tried downloaded source manually configured and make and then after with just binaries and supported libraries i have used that also not working as expected.
If you build something outside of the snapcraft build process, it is essential that you use a similar environment matching the base: you picked and then also make sure to use a correct DESTDIR variable to install it into its own location, not on the hostβ¦
TBH, Iβd just take the original snapcraft.yaml and update it to core22 (the original still uses core18 which corresponds to an 18.04 build environment) and bump all the necessary stage and build-package versions as well as moving to new snapcraft schemas β¦ and then let snapcraft do the build
yes i have also used the core 18 yaml and updated to 22 but iam new to this snap creation so where to use which fields not have much idea so confusing any documentation for creating local snaps and from github any idea?