Bug 2213926 - Angelfish built-in ad blocker not built due to missing Rust BRs (rust-adblock)
Summary: Angelfish built-in ad blocker not built due to missing Rust BRs (rust-adblock)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: angelfish
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kevin Kofler
QA Contact:
URL: https://kojipkgs.fedoraproject.org/pa...
Whiteboard:
Depends On: 2209376 2266634
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-10 00:03 UTC by Kevin Kofler
Modified: 2024-03-26 15:30 UTC (History)
6 users (show)

Fixed In Version: angelfish-24.02.0-2.fc41
Clone Of:
Environment:
Last Closed: 2024-03-26 15:30:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Debian BTS 1037279 0 None None None 2023-06-10 10:13:58 UTC

Description Kevin Kofler 2023-06-10 00:03:28 UTC
Angelfish has a built-in ad blocker based on the Rust adblock crate from the Brave developers. This feature is missing from the Fedora package because Corrosion and other build-time dependencies are not BuildRequired.

Reproducible: Always

Steps to Reproduce:
1. Check the build.log.
Actual Results:  
-- The following RECOMMENDED packages have not been found:
 * Corrosion, CMake scripts to seamlessly build and link to targets using cargo, <https://github.com/AndrewGaspar/corrosion>
   Required to build the builtin adblocker

Expected Results:  
The ad blocker is built.

In addition to Corrosion, you will need cargo (though Corrosion should already be Requiring it), rust-adblock, rust-cxx-build, and rust-cxx. You may also need to hack things up so that it can build offline, ask the Rust SIG if you need help.

Comment 1 Kevin Kofler 2023-06-10 02:03:01 UTC
The status of the dependencies:
* corrosion: missing, review request: bug #2209376 (submitted 17 days ago, no response yet)
* rust-adblock: missing, no review request yet
* rust-cxx-build: available: https://src.fedoraproject.org/rpms/rust-cxx-build
* rust-cxx: available: https://src.fedoraproject.org/rpms/rust-cxx

Comment 2 Kevin Kofler 2023-06-10 10:13:59 UTC
The Debian package has the same issue, so I have reported it to them too:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037279

Comment 3 Fabio Valentini 2023-06-11 13:31:23 UTC
Once corrosion and the adblock crate are packaged for Fedora, it should be relatively straightforward to adapt this package.
- add BR: corrosion
- add BR: cargo-rpm-macros
- add %cargo_prep at the end of %prep (this prepares an offline build environment for cargo) 
- add %generate_buildrequires section and run %cargo_generate_buildrequires in the directory that contains the Rust extension (this will automatically generate dependencies for all required Rust libraries)

Note that you might need to adapt the license tag of this package after this change. All Rust code that's needed at runtime will be statically linked into angelfish, so the licenses of these components will need to be taken into account. The %cargo_license / %cargo_license_summary macros can help with this (run them in the same directory as %cargo_generate_buildrequires).

Comment 4 Fabio Valentini 2023-06-15 17:46:48 UTC
Corrosion is now available in Rawhide (and F38 / F37 updates are pending).
The corrosion spec file could serve as an example of how to handle a mixed CMake / Rust project.

If you need help with packaging the "adblock" crate and / or adapting the angelfish packaging, let me know.

Comment 5 Kevin Kofler 2023-11-07 12:05:07 UTC
So, with Corrosion now available: https://src.fedoraproject.org/rpms/corrosion (thanks Fabio!), rust-adblock is the one missing dependency.

Comment 6 Fabio Valentini 2023-12-04 16:01:34 UTC
If the package maintainer is actually interested in enabling the AdBlock functionality, I can help with packaging the "adblock" crate.
But I won't spend time on that for now, since the maintainer hasn't responsed to this bug at all yet.

Comment 7 Kevin Kofler 2023-12-04 16:59:14 UTC
I am willing to comaintain Angelfish to add the Rust Adblock support. I already comaintain qt5-qtwebengine and maintain (with comaintainers) Falkon, so I am familiar with QtWebEngine browsers. I am not familiar with Rust stuff, but I hope Fabio would help me with that. So, Onuralp, can I please get commmit (or if you wish admin, but I only really need commit) access on Angelfish? (Technically, I could do the commits as a provenpackager, but I would rather not do this kind of changes without explicitly approved commit access, because they are not really what provenpackager is for.)

Fabio, I would be interested in your help, but I am now also waiting for the maintainer (or at least someone else from the KDE SIG, the entire group is listed as co-admins on the package) to respond.

Comment 8 Steve Cossette 2023-12-15 11:04:58 UTC
(In reply to Kevin Kofler from comment #7)
> I am willing to comaintain Angelfish to add the Rust Adblock support. I
> already comaintain qt5-qtwebengine and maintain (with comaintainers) Falkon,
> so I am familiar with QtWebEngine browsers. I am not familiar with Rust
> stuff, but I hope Fabio would help me with that. So, Onuralp, can I please
> get commmit (or if you wish admin, but I only really need commit) access on
> Angelfish? (Technically, I could do the commits as a provenpackager, but I
> would rather not do this kind of changes without explicitly approved commit
> access, because they are not really what provenpackager is for.)
> 
> Fabio, I would be interested in your help, but I am now also waiting for the
> maintainer (or at least someone else from the KDE SIG, the entire group is
> listed as co-admins on the package) to respond.

I sent a ping to neal in Matrix. Feel free to come bug him there, but I don't see why he wouldn't like the help!

Comment 9 Neal Gompa 2023-12-15 12:31:12 UTC
I've given you commit privileges to angelfish, Kevin.

Comment 10 Kevin Kofler 2023-12-15 13:09:11 UTC
Great, thank you!

Fabio, I would appreciate your help with the rust-adblock packaging.

Comment 11 Kevin Kofler 2024-02-28 15:21:26 UTC
kdepim-addons 24.02 can now also use rust-adblock for a KMail plugin. Unfortunately, the maintainers decided to bundle it:
https://src.fedoraproject.org/rpms/kdepim-addons/c/d18a2b6d8e143773216b8bfb13b4b459c410d66e?branch=rawhide
instead of packaging it for Angelfish and others to benefit.

Comment 12 Kevin Kofler 2024-02-28 15:34:24 UTC
Filed bug #2266623 against kdepim-addons.

Comment 13 Kevin Kofler 2024-02-28 15:38:30 UTC
Note that I would also expect Falkon and/or Konqueror to start wanting this dependency sooner or later, considering that it supports more complex ad blocking rules than those browsers' current ad blocking implementation.

Comment 14 Kevin Kofler 2024-03-26 15:03:01 UTC
We have rust-adblock now, kdepim-addons builds against it successfully, so I will now look into enabling this for Angelfish.

Comment 15 Kevin Kofler 2024-03-26 15:30:20 UTC
Actually, this was already enabled by 2 KDE SIG folks (Yaakov Selkowitz enabled bundled adblock on Feb 5, and Steve Cossette switched to system adblock on Mar 26). Closing.


Note You need to log in before you can comment on or make changes to this bug.