Hi,
element-desktop in an electron application.
Building javascript applications in a defined and offline build environment is a nightmare as not only package managers like yarn or npm but also the install scripts of some packages as well as the build scripts itself try to download stuff from the internet.
Therefore the element-web and element-desktop (which depends on element-web) were "built" locally and the resulting files were packaged. Of course this is no ideal solution which is why there is currently a delete request pending for that package.
It is possible to bundle the yarn dependencies and workaround some other issues, but my knowledge of tools like electron-builder is limited.
I managed to bundle the dependencies of element-web and get it actually building inside OBS, but it seems to be harder to do the same for element-desktop as it is using electron-builder which behaves as if it was deliberately written to make the life of a packager miserable.
For some reason it tries to download a prebuilt electron zip from github during build, and I wasn't able to fix this so far.
https://build.opensuse.org/package/live_build_log/home:dheidler:branches:dev...
My current state of work can be found in [1] and any help with getting this fixed would be appreciated.
Regards, Dominik
[1] https://build.opensuse.org/package/show/home:dheidler:branches:devel:languag...
Hi Dominik,
Does the native-packaged distribution provide any benefits over the flatpakized one[1]?
Thanks.
1: https://flathub.org/apps/details/im.riot.Riot
On Tue, Mar 15, 2022 at 12:54 PM Dominik Heidler dheidler@suse.de wrote:
Hi,
element-desktop in an electron application.
Building javascript applications in a defined and offline build environment is a nightmare as not only package managers like yarn or npm but also the install scripts of some packages as well as the build scripts itself try to download stuff from the internet.
Therefore the element-web and element-desktop (which depends on element-web) were "built" locally and the resulting files were packaged. Of course this is no ideal solution which is why there is currently a delete request pending for that package.
It is possible to bundle the yarn dependencies and workaround some other issues, but my knowledge of tools like electron-builder is limited.
I managed to bundle the dependencies of element-web and get it actually building inside OBS, but it seems to be harder to do the same for element-desktop as it is using electron-builder which behaves as if it was deliberately written to make the life of a packager miserable.
For some reason it tries to download a prebuilt electron zip from github during build, and I wasn't able to fix this so far.
https://build.opensuse.org/package/live_build_log/home:dheidler:branches:dev...
My current state of work can be found in [1] and any help with getting this fixed would be appreciated.
Regards, Dominik
[1] https://build.opensuse.org/package/show/home:dheidler:branches:devel:languag...
Hi Andrei,
the flatpak seem to be simply repackaging the official debian package and only seems to work on x86_64.
https://github.com/flathub/im.riot.Riot/blob/master/im.riot.Riot.yaml
Also I would prefer if stuff like that could be installed simply using zypper.
Regards, Dominik
Am 15.03.22 um 13:12 schrieb Andrei Dziahel:
Hi Dominik,
Does the native-packaged distribution provide any benefits over the flatpakized one[1]?
Thanks.
1: https://flathub.org/apps/details/im.riot.Riot
On Tue, Mar 15, 2022 at 12:54 PM Dominik Heidler dheidler@suse.de wrote:
Hi,
element-desktop in an electron application.
Building javascript applications in a defined and offline build environment is a nightmare as not only package managers like yarn or npm but also the install scripts of some packages as well as the build scripts itself try to download stuff from the internet.
Therefore the element-web and element-desktop (which depends on element-web) were "built" locally and the resulting files were packaged. Of course this is no ideal solution which is why there is currently a delete request pending for that package.
It is possible to bundle the yarn dependencies and workaround some other issues, but my knowledge of tools like electron-builder is limited.
I managed to bundle the dependencies of element-web and get it actually building inside OBS, but it seems to be harder to do the same for element-desktop as it is using electron-builder which behaves as if it was deliberately written to make the life of a packager miserable.
For some reason it tries to download a prebuilt electron zip from github during build, and I wasn't able to fix this so far.
https://build.opensuse.org/package/live_build_log/home:dheidler:branches:dev...
My current state of work can be found in [1] and any help with getting this fixed would be appreciated.
Regards, Dominik
[1] https://build.opensuse.org/package/show/home:dheidler:branches:devel:languag...
Hi,
I understand how it's diffcult can be. Maybe another obs service like cargo_vendor for npm?
On 2022-03-15 21:54, Dominik Heidler wrote:
Hi,
element-desktop in an electron application.
Building javascript applications in a defined and offline build environment is a nightmare as not only package managers like yarn or npm but also the install scripts of some packages as well as the build scripts itself try to download stuff from the internet.
Therefore the element-web and element-desktop (which depends on element-web) were "built" locally and the resulting files were packaged. Of course this is no ideal solution which is why there is currently a delete request pending for that package.
It is possible to bundle the yarn dependencies and workaround some other issues, but my knowledge of tools like electron-builder is limited.
I managed to bundle the dependencies of element-web and get it actually building inside OBS, but it seems to be harder to do the same for element-desktop as it is using electron-builder which behaves as if it was deliberately written to make the life of a packager miserable.
For some reason it tries to download a prebuilt electron zip from github during build, and I wasn't able to fix this so far.
https://build.opensuse.org/package/live_build_log/home:dheidler:branches:dev...
My current state of work can be found in [1] and any help with getting this fixed would be appreciated.
Regards, Dominik
[1] https://build.opensuse.org/package/show/home:dheidler:branches:devel:languag...
Hi,
Am 16.03.22 um 09:11 schrieb Konstantin Voinov:
Hi,
I understand how it's diffcult can be. Maybe another obs service like cargo_vendor for npm?
I don't know cargo_vendor, but it sounds like something related to rust, which might come in handy for the "yarn run build:native" command that is optional so I currently commented it out for simplicity.
But my main problem is not mainly the "normal" dependencies as listed in yarn.lock but the install scripts of some dependencies that dare to download stuff from the internet.
So these files would need to be bundled and the scripts (of electron-builder) would need to be patched to use that bundled files.
The problem is that I don't really understand what electron-builder exactly does and the documentation is not very good/existent.
Regards, Dominik
I am building bitwarden and vscode on OBS, you can take a look at the specfiles here: https://build.opensuse.org/project/show/home:dziobian:gulgul-ultron
In particular, `export ELECTRON_SKIP_BINARY_DOWNLOAD=1` might help with electron-builder trying to download electron itself, and `echo 'nodedir %{_includedir}/electron' >> .yarnrc` should help with yarn not finding headers from nodejs-electron-devel.