Bugzilla – Bug 1224133
element-desktop: garbage in app.asar
Last modified: 2024-05-29 13:21:04 UTC
app.asar contains files that should not be shipped (source codes etc.) In particular the directories `npm-packages-offline-cache` and `.hak` take up several hundred MB. I suggest not using asar and instead shipping the app unpacked. Then many such problems would be detected by rpmlint. (Would help build reproducibility, too.)
I build yours package on Fedora copr on https://copr.fedorainfracloud.org/coprs/sergiomb/electrons/ Fedora moved (almost) all communications to matrix so I use element-desktop on daily basis I notice the package element-desktop has grown and element-desktop-1.11.65-1.1.x86_64.rpm have 235M and unpacked have 929M . I had fix this and I like to know what is the best way to send you the patches you can check it out https://copr-dist-git.fedorainfracloud.org/cgit/sergiomb/electrons/element-desktop.git/tree/
If you are familiar with osc, you could osc branch devel:languages:nodejs/element-desktop osc checkout <BRANCH LOCATION> cd <BRANCH LOCATION> <MAKE YOUR CHANGES> osc add <IF YOU ADDED FILES> osc rm <IF YOU REMOVED FILES> osc checkin osc submitrequest to make a submit request on build.opensuse.org. The account is the same as your bugzilla account. Or you could attach the patches to this bug.
created request id 1174089 for element-web
created request id 1174092 for element-desktop I sent the all package , I don't know if you want split that in various requests element-web : move element-web data to {_datadir}/element/webapp/ jitsi_external_api.min.js (removed) is already provide by element-web element-logo.svg is provide by element-web not eleement-desktop , but I didn't found if is used config.sample.json is in place ( _datadir/element/webapp/ ) no need to move or be copied element-desktop: use electron-builder as element-desktop pre 1.11.54 Drop BuildRequires: element-web LD_PRELOAD=/usr/lib64/libsqlcipher.so to fix private messages search (https://github.com/element-hq/element-desktop/issues/904)
BTW, to build on Fedora we need : +BuildRequires: nodejs BuildRequires: nodejs-electron-devel -BuildRequires: yarn +BuildRequires: yarnpkg BuildRequires: rust BuildRequires: cargo BuildRequires: python3 +BuildRequires: python3-setuptools
(In reply to sergio Basto from comment #5) > BTW, to build on Fedora we need : I'm doing a genereal cleanup of this package (thanks to macros i've introduced to nodejs-electron-devel) and was going to fix Fedora builds anyway.
completely broken changes +BuildRequires: element-web = %{version} , wrong fedora got yarnpkg-1.22.21-2.fc39.x86_64 - %{_isa} should have "?" %{?_isa} etc support to i686 ?!?
app-builder package does not exist in Fedora
> BuildRequires: element-web = %{version} It's needed only because element-web provides some directories we install into. We don't use element-web during build otherwise. > - %{_isa} should have "?" %{?_isa} It does not really need it. All versions of RPM without the _isa macro have been unsupported long ago. [Also closing this since https://build.opensuse.org/request/show/1175898 got accepted into factory]
(In reply to sergio Basto from comment #8) > app-builder package does not exist in Fedora This package should work https://build.opensuse.org/package/show/devel:languages:nodejs/app-builder
Fedora also don't have cargo-vendor-filterer, neither cargo-auditable and cargo-packaging conflicts with rust-srpm-macros or something like that . fedora element-desktop-1.11.67-2.fc39.x86_64.rpm size is now 3.1M while src.rpm is 212M you check it out here: https://build.opensuse.org/package/rdiff/home:sergiomb/element-desktop?linkrev=base&rev=3 but I can't find a way to run `yarn run hak build` offline , it give me an error I'd like that Suse and Fedora goes in same way , I see that Rust / cargo packaging it is different , and IMO that is bad , because if we use the same structure we may help each other . (virtualbox is an example where I'm evolved) I'm proven packager on Fedora , I can fix any package if you need any thing from Fedora let me know