New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dexc-desktop: Snap package #2580
base: master
Are you sure you want to change the base?
Conversation
95e4276
to
fc32448
Compare
765346c
to
bf46fe3
Compare
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.
Getting an error when running ./pkg/pkg-debian.sh
:
dpkg-deb: error: parsing file './build/dexc_bf46fe348fb83893408e875408499761a3df5ea4-0_amd64/DEBIAN/control' near line 2 package 'dexc':
'Version' field value 'bf46fe348fb83893408e875408499761a3df5ea4': version number does not start with digit
It pulls the version number from the If you |
bf46fe3
to
9bf282c
Compare
So the commit needs a tag to work? I did not know. Maybe add that to the readme there at least if it is a requirement? |
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.
After adding a bogus tag was able to build and install with snap.
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'm not seeing the benefit of the github actions deployment. What does it do for us over just running the script ourselves?
Icons: added SVG icon for hicolor and symbolic variations, fixed 128px PNG to match official version
Can you say more about the new files and what they do for us? Or point me to some documentation?
I don't care about the official logo version. I changed it because the official color was too dark and looked bad in my panel. None of this matters much, of course, because we're rebranding anyway, but prefer to use the lighter color that has margins.
client/cmd/dexc-desktop/metainfo/org.decred.dcrdex.metainfo.xml
Outdated
Show resolved
Hide resolved
client/cmd/dexc-desktop/metainfo/org.decred.dcrdex.metainfo.xml
Outdated
Show resolved
Hide resolved
client/cmd/dexc-desktop/metainfo/org.decred.dcrdex.metainfo.xml
Outdated
Show resolved
Hide resolved
client/cmd/dexc-desktop/metainfo/org.decred.dcrdex.metainfo.xml
Outdated
Show resolved
Hide resolved
client/cmd/dexc-desktop/metainfo/org.decred.dcrdex.metainfo.xml
Outdated
Show resolved
Hide resolved
It does the same thing but makes life a tad easier. The binary it packages into a snap comes from the .deb package.
dexc.png is scaled to 128px which is one of the default icon sizes, the 100px version was scaled up and rendered blurry https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
The tray icon should really match the other icons (menu, dock, task switcher), if it's different it looks odd. How about using the monochrome version? That's the most distinctly recognizable in the tray visually. |
1ffa951
to
97a53e9
Compare
if [ ! -d ../../webserver/site/dist ]; then | ||
CWD=$(pwd) | ||
cd ../../webserver/site | ||
npm clean-install | ||
npm run build | ||
cd $CWD | ||
fi |
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.
Just because there's a file there doesn't mean its the right one. Any reason not to just build it every time?
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.
The idea here was that the site package is added to the repo on the release branch so there's no need to build it at the time of building the release packages but it certainly won't hurt.
# in this directory. | ||
|
||
# pick up the release tag from git | ||
VER=$(git describe --tags --abbrev=0 --always | sed -e 's/^v//') |
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.
Hmm. If I do
git fetch upstream --tags
git checkout -b v0.6.3 v0.6.3
git describe --tags --abbrev=0 --always | sed -e 's/^v//'
I get
0.6.2
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.
Does upstream
point to github.com/decred/dcrdex
? I'm getting the correct tag on a fresh clone.
$ git clone https://github.com/decred/dcrdex
Cloning into 'dcrdex'...
...
$ cd dcrdex
$ git fetch origin --tags
$ git checkout -b v0.6.3 v0.6.3
Switched to a new branch 'v0.6.3'
$ git describe --tags --abbrev=0 --always | sed -e 's/^v//'
0.6.3
|
||
snapcraft login | ||
|
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.
This will prompt for snapcraft account credentials? Is it expected that the app is already snapcraft register
'd?
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.
Yes, it will ask for the account creds - the app must be registered in the same account.
https://snapcraft.io/snaps
prime: | ||
- -usr/lib/x86_64-linux-gnu/libEGL_mesa* | ||
- -usr/lib/x86_64-linux-gnu/libGLX_mesa* | ||
- -usr/lib/x86_64-linux-gnu/libGLESv2* | ||
- -usr/lib/x86_64-linux-gnu/libcaca++* | ||
- -usr/lib/x86_64-linux-gnu/libcolordprivate* | ||
- -usr/lib/x86_64-linux-gnu/libdconf* | ||
- -usr/lib/x86_64-linux-gnu/libexslt* | ||
- -usr/lib/x86_64-linux-gnu/libgstcheck-1.0* | ||
- -usr/lib/x86_64-linux-gnu/libgstcontroller-1.0* | ||
- -usr/lib/x86_64-linux-gnu/libicuio* | ||
- -usr/lib/x86_64-linux-gnu/libicutest* | ||
- -usr/lib/x86_64-linux-gnu/libjacknet* | ||
- -usr/lib/x86_64-linux-gnu/libjackserver* | ||
- -usr/lib/x86_64-linux-gnu/liborc-test-0.4* | ||
- -usr/lib/x86_64-linux-gnu/libpulse-simple* | ||
- -usr/lib/x86_64-linux-gnu/libunwind-coredump* | ||
- -usr/lib/x86_64-linux-gnu/libunwind-ptrace* | ||
- -usr/lib/x86_64-linux-gnu/libunwind-x86_64* | ||
- -usr/lib/x86_64-linux-gnu/libwoff2enc* | ||
- -usr/lib/x86_64-linux-gnu/libicutu* |
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.
How is this list generated and what does it mean?
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.
These are libraries that .deb packages in the dexc.deb
dependency tree (libgtk-3-0
, libwebkit2gtk-4.0-37
and their deps) install but are not required. The list is emitted by snapcraft
.
plugs: | ||
- home | ||
- opengl | ||
- x11 | ||
- desktop | ||
- desktop-legacy | ||
- network | ||
- network-status | ||
- browser-support | ||
- screen-inhibit-control | ||
- dbus-svc | ||
- dbus-dbusmenu | ||
- dbus-statusnotifier |
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.
How is this list generated and what does it mean?
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.
This list defines the snap interfaces the app needs access to, basically they translate into AppArmor permissions. It's assembled from the documentation and trial-and-error.
@@ -66,7 +66,7 @@ require ( | |||
github.com/decred/dcrd/dcrec/edwards/v2 v2.0.3 // indirect | |||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect | |||
github.com/decred/dcrd/dcrjson/v4 v4.0.1 // indirect | |||
github.com/decred/dcrd/dcrutil/v4 v4.0.1 // indirect | |||
github.com/decred/dcrd/dcrutil/v4 v4.0.2-0.20231005000813-c102e54b4128 // indirect |
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.
Did we need this for something?
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.
This is to incorporate decred/dcrd#3196
97a53e9
to
f845d98
Compare
This PR adds configuration, build scripts and Github workflow to build the Snap package and publishing it in the Snap Store.
The snap build uses the .deb package. The PR also contains a few fixes/improvements in the deb build: