How do you add config files - "file" can't find it's configuration files?

Dave Chiluk dave.chiluk at canonical.com
Thu Sep 15 21:10:32 UTC 2016


Hey guys, I'm trying to snap up file.  I thought it would be simple. 
This is what I have for my snapcraft.yaml.


vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
name: file  # the name of the snap
version: 0  # the version of the snap
summary: Unix file utility  # 79 char long summary
description: Unix file utility  # a longer description for the snap
confinement: devmode  # use "strict" to enforce system access only via
declared interfaces

apps:
    file:
        command: usr/bin/file

parts:
    file:  # Replace with a part name of your liking
        # Get more information about plugins by running
        # snapcraft help plugins
        # and more information about the available plugins
        # by running
        # snapcraft list-plugins
        plugin: nil
        stage-packages:
          - file
          - libmagic1
        filesets:
          libmagic1:
            - etc/magic*
            - usr/*
          file:
            - usr/bin/file
        snap:
          - $libmagic1
          - $file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

However when I go to run file out of my snap I get
"
chiluk at localhost:~$ file /home/chiluk/file_0_amd64.snap
/etc/magic, 0: Warning: using regular magic file `/usr/share/misc/magic'
file: could not find any valid magic files!
"

Both of these files are included with my snap, but not being found when
running "file /home/chiluk/  Feel free to post links to
documentation/examples as searches for ubuntu snapcraft add config file
have been useless.  I'm mostly trying to understand / learn so simply
fixing this yaml is not what I'm looking for.

Also once file is capable of finding it's configs, how do you make them
customizable such that root could modify them?

Thanks,
Dave.





More information about the Snapcraft mailing list