Skip to content

Commit

Permalink
add git-confined contents
Browse files Browse the repository at this point in the history
  • Loading branch information
janesser committed Dec 8, 2024
1 parent 490d1c5 commit 246217f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
25 changes: 21 additions & 4 deletions snapcraft.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@ apps:
extensions: [gnome]
desktop: eclipse.desktop
plugs:
- personal-git-global
- personal-gitconfig
- personal-sshid
- git-plug
- personal-maven-cache
- personal-eclipse-config
- sources-dir
- network

plugs:
personal-git-global:
personal-gitconfig:
interface: personal-files
read:
- $HOME/.gitconfig
personal-sshid:
interface: personal-files
read:
- $HOME/.ssh
personal-maven-cache:
interface: personal-files
write:
Expand All @@ -50,11 +56,16 @@ plugs:
write:
- $HOME/.eclipse
- $HOME/.swt
- $HOME/eclipse-workspace
# ln -s ~/snap/eclipse-pde/current/workspace/ ~/eclipse-workspace/
sources-dir:
interface: personal-files
write:
- $HOME/projs
git-plug:
interface: content
content: git-cli
target: $SNAP/git-snap
default-provider: git-confined

parts:
eclipse:
Expand All @@ -80,5 +91,11 @@ parts:

# https://bugzilla.mozilla.org/show_bug.cgi?id=1710326
layout:
/usr/shar/libdrm:
/usr/share/libdrm:
bind: $SNAP/gnome-platform/usr/share/libdrm
$SNAP/usr/bin:
bind: $SNAP/git-snap/bin
/usr/libexec/git-core:
symlink: $SNAP/git-snap/git-core
/usr/share/git-core/templates:
symlink: $SNAP/git-snap/templates
13 changes: 9 additions & 4 deletions try-build.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
#!/bin/bash
set -e

ECLIPSE_PACKAGE=$1
if [ -n $1 ]; then
ECLIPSE_PACKAGE=$1
fi

export ECLIPSE_PACKAGE=${ECLIPSE_PACKAGE:='eclipse-java'}

./set-eclipse-package.sh
. ./set-eclipse-package.sh

# snapcraft clean
# sudo less /var/snap/lxd/common/lxd/logs/lxd.log
snapcraft try --debug

sudo snap try prime # --devmode

sudo snap connect $ECLIPSE_PACKAGE:personal-git-global
sudo snap connect $ECLIPSE_PACKAGE:personal-gitconfig
sudo snap connect $ECLIPSE_PACKAGE:personal-sshid
sudo snap connect $ECLIPSE_PACKAGE:personal-maven-cache
sudo snap connect $ECLIPSE_PACKAGE:personal-eclipse-config
sudo snap connect $ECLIPSE_PACKAGE:sources-dir
sudo snap connect $ECLIPSE_PACKAGE:git-plug git-confined

snap run $ECLIPSE_PACKAGE
# snap run $ECLIPSE_PACKAGE

0 comments on commit 246217f

Please sign in to comment.