snapcraft.yaml: add support for building a snap package #77
Changes from all commits
b1ef055
7412c95
d615090
15cae56
54f32ae
6fcb27e
4271c2c
36ee005
d511b8f
108be18
06dda9b
203cff9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
stage | ||
snap | ||
prime | ||
parts | ||
*.snap |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: nextcloud-client | ||
version: 2.2.4+git | ||
icon: ../nextcloudtheme/theme/colored/Nextcloud-icon.svg | ||
summary: Nextcloud Desktop Client | ||
description: | | ||
The Nextcloud Desktop Client is a tool to synchronize files from Nextcloud | ||
Server with your computer. | ||
|
||
grade: stable | ||
confinement: strict | ||
|
||
parts: | ||
client: | ||
plugin: cmake | ||
source: ../ | ||
source-subdir: client | ||
build-packages: | ||
- g++ | ||
- libqt5webkit5-dev | ||
- libsqlite3-dev | ||
- libssl-dev | ||
- pkg-config | ||
- qt5keychain-dev | ||
- qttools5-dev-tools | ||
configflags: | ||
- -DCMAKE_BUILD_TYPE=Release | ||
- -DOEM_THEME_DIR=$SNAPCRAFT_PART_INSTALL/../src/nextcloudtheme | ||
|
||
# XXX: This is an hack to have a kind of bind-mount with absolute prefix. | ||
- -DCMAKE_INSTALL_PREFIX=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr | ||
- -DCMAKE_INSTALL_LIBDIR=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib | ||
- -DSYSCONF_INSTALL_DIR=/snap/$SNAPCRAFT_PROJECT_NAME/current/etc | ||
organize: | ||
snap/nextcloud-client/current: . | ||
|
||
after: | ||
- desktop-qt5 | ||
|
||
xdg-open: | ||
source: https://github.com/ubuntu-core/snapd-xdg-open.git | ||
source-depth: 1 | ||
plugin: dump | ||
organize: | ||
data/xdg-open: bin/xdg-open | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain this part, please? Obviously snapd-xdg-open needs to run as an external "trusted helper" if you will (i.e. outside of confinement). You're just copying a piece of it so as to not use the one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This kind of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough, thank you 😃 . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just saw this, by the way. Can you use the one in /usr/local/bin of the core snap? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No scratch that, it's not available until 2.23. Carry on. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eh, in fact that's why I didn't do it :-) |
||
prime: | ||
- bin | ||
|
||
apps: | ||
nextcloud-client: | ||
aliases: | ||
- nextcloud | ||
command: | | ||
env LD_LIBRARY_PATH=$SNAP/usr/lib/nextcloud:$LD_LIBRARY_PATH | ||
desktop-launch nextcloud | ||
desktop: usr/share/applications/nextcloud.desktop | ||
plugs: | ||
- unity7 | ||
- home | ||
- network | ||
- network-bind | ||
- network-manager | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is network-manager required? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See this bug, Qt network status checker needs it, and so this client if it wants to know the connection status. This is not an auto-connected interface, though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, okay. It still works if the interface is not connected, though? What features do we lose by not having it automatically connected? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Things will work properly anyway... I'm not sure if this client is actually using this feature, but consider that as an "optimization". When Qt knows if there's a connection or not, it won't try to transfer data. Users will be free to manually connect to this interface if they want an optimized client though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good deal. |
||
|
||
cmd: | ||
aliases: | ||
- nextcloudcmd | ||
command: | | ||
env LD_LIBRARY_PATH=$SNAP/usr/lib/nextcloud:$LD_LIBRARY_PATH | ||
desktop-launch nextcloudcmd | ||
plugs: | ||
- unity7 | ||
- home | ||
- network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose behind this? The commit mentions remembering config, but I don't have that issue with
nextcloud-client-kyrofa
. Am I misunderstanding?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, the client won't be able to access to
$SNAP/etc/Nextcloud/sync-exclude.lst
(which causes syncing not to work here; I deleted the log stating it, but if you want, I can paste it), the same with any other possibly hardcoded path. We need to be sure that the client will be able to access to such files.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @kyrofa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried simply
-DSYSCONF_INSTALL_DIR=config
(or etc if you prefer, though that meaning breaks down in a snap)? That works for me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that, but then my snap was trying to access located in
$PATH_WHERE_I_WAS_BUILDING_THIS_SNAP/part/client/build/config
not sure why...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also translations are there... For example:
for i in $(grep /snap/nextcloud-client prime/ -rl); do echo - $i:; strings $i | grep /snap/nextcloud-client; done
gives me:Let me see what happens using your way...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried that too, but it's not fine, the same command (with different pattern) gives me:
where
/media/marco/M.2-SSD/client_theming
is the local repo path.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried that too, but it's not fine, the same command (with different pattern) gives me:
where
/media/marco/M.2-SSD/client_theming
is the local repo path.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You say you get a log denying access. Do you still get that message? Do you get that message with nextcloud-client-kyrofa?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh, no... I can't either test what's the log saying though since the
run-client
is missing a$*
.I'll try to build it locally