Cybear-jinni use of gpio-control [Was: CyBear Jinni strict confinement request]

Hello Snapcraft

I am opening this request to get strict confinement approval for my snap.

Snap name: cybear-jinni

Snapcraft store: https://snapcraft.io/cybear-jinni

Source code of the snap : https://github.com/CyBear-Jinni/Smart-Home/tree/master/SmartDevice

Why strict confinement:
This snap is being installed on devices inside the walls and will make them smart devices.
These devices will control ceiling lamps blinds and more.

The software is running google dart programming language.

In order to make the smart home devices secure and get new features seamlessly and without intervening snap is coming into play.

In the updates the devices will get new features, bug fixes, updates to dart packages , security updates.
The updates will get to all end devices across the world that use this open source project to create their smart home.

name: cybear-jinni
base: core20
version: '0.1.0'  # Just for humans, typically '1.2+git' or '1.3.2'
summary: Smart home snap for CyBear Jinni smart devices.
description: |
  A CyBear Jinni snap for smart devices.

  Using this snap you can make your device smart and control lamp or blind (if the device is supported currently only NanoPi Duo2), you will be able to control it using physical buttons and even from your phones using CyBear Jinni app.

  Our goal here at CyBear Jinni is to raise the quality of life for everyone.
  We are doing this by making Smart-Home accessible for the common person.

This is open source project so feel free to take a look at the code and join us advancing the world forward.

grade: stable  # devel/stable
confinement: strict  # devmode/classic/strict

#architectures: [all]
architectures:
  - build-on: armhf
    run-on: armhf

parts:
  wiring-np:
    plugin: dump
    source: .
    build-attributes: [keep-execstack]
    override-build: |
      git clone https://github.com/CyBear-Jinni/WiringNP
      # git clone https://github.com/friendlyarm/WiringNP  // Does not work on the armbian os,  https://forum.armbian.com/topic/13889-nanopiduo2-wiringnp-unable-to-determine-board-revision/
      cd WiringNP/
      chmod 755 build
      ./build
      cd ..
    build-packages:
      - git
      - make

  smart-home:
    after: [wiring-np]
    plugin: dump
    source: .
    override-build: |
      scripts/bashScripts/nativeExecutableMaker.sh  # Downloading dart-sdk for the correct architecture.

      rm -r SmartDeviceDart

      cd scripts/bashScripts/
      ./compileAllCFiles.sh # Have to be executed when working directory is this file location
      cd ../..

      snapcraftctl build

    build-packages:
      - wget
      - unzip
      - gcc
      - g++
    stage-packages:
      - libatlas-base-dev
      - libevent-dev

apps:
  cybear-jinni:
    command: main.exe $SNAP
    daemon: simple
    plugs: [network, network-bind, gpio, gpio-control, hardware-observe]

Hey @guyluz11, thanks for your post.

We do have a defined Process for reviewing classic confinement snaps, but there is no need to request approval for strict confinement. You can take a look at the Snap confinement documentation for better understanding of confinement levels.

I do see though that you last revision failed the review process due to the use of the gpio-control interface. Given this interface allows privileged access to the gpio subsystem, it is reserved for vetted publishers. If your snap legitimately requires its use, can you please provide specific details about why your snap needs it?

Thanks!

1 Like

Thanks @emitorino

I have managed to publish it with the strict confinement and it is working great.

1 Like