Bug 266179 - [NEW PORT] www/badwolf: Minimalist and privacy-oriented WebKitGTK+ browser
Summary: [NEW PORT] www/badwolf: Minimalist and privacy-oriented WebKitGTK+ browser
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL: https://hacktivis.me/projects/badwolf
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-02 15:00 UTC by Jesús Daniel Colmenares Oviedo
Modified: 2022-09-09 22:08 UTC (History)
1 user (show)

See Also:


Attachments
www-badwolf.patch (4.28 KB, patch)
2022-09-02 15:00 UTC, Jesús Daniel Colmenares Oviedo
no flags Details | Diff
poudriere-testport.badwolf-1.2.1.log (51.05 KB, text/plain)
2022-09-02 15:03 UTC, Jesús Daniel Colmenares Oviedo
no flags Details
portlint.badwolf-1.2.1.log (133 bytes, text/plain)
2022-09-02 15:05 UTC, Jesús Daniel Colmenares Oviedo
no flags Details
Add gnome in USES (4.29 KB, patch)
2022-09-02 23:58 UTC, Jesús Daniel Colmenares Oviedo
no flags Details | Diff
badwolf-1.2.1 v1 (3.06 KB, patch)
2022-09-08 11:17 UTC, Nuno Teixeira
no flags Details | Diff
Add gstreamer (4.46 KB, patch)
2022-09-08 19:13 UTC, Jesús Daniel Colmenares Oviedo
no flags Details | Diff
gtk40 (58.84 KB, text/plain)
2022-09-08 19:59 UTC, Jesús Daniel Colmenares Oviedo
no flags Details
badwolf-1.2.1 v2: +NLS (4.96 KB, patch)
2022-09-09 12:47 UTC, Nuno Teixeira
no flags Details | Diff
Fix missing file in pkg-plist (6.39 KB, patch)
2022-09-09 16:51 UTC, Jesús Daniel Colmenares Oviedo
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesús Daniel Colmenares Oviedo 2022-09-02 15:00:21 UTC
Created attachment 236313 [details]
www-badwolf.patch

BadWolf is a minimalist and privacy-oriented WebKitGTK+ browser.

Features:

* Privacy-oriented: No browser-level tracking, multiple ephemeral
  isolated sessions per new unrelated tabs, JavaScript off by default.
* Minimalist: Small codebase (~1 500 LoC), reuses existing components
  when available or makes them available.
* Customizable: WebKitGTK native extensions, Interface customizable
  through CSS.
* Powerful & Usable: Stable User-Interface; The common shortcuts are
  available, no vi-modal edition or single-key shortcuts are used.
* No annoyances: Dialogs are only used when required (save file,
  print, ...), javascript popups open in a background tab.

WWW: https://hacktivis.me/projects/badwolf
Comment 1 Jesús Daniel Colmenares Oviedo 2022-09-02 15:03:03 UTC
Created attachment 236314 [details]
poudriere-testport.badwolf-1.2.1.log
Comment 2 Jesús Daniel Colmenares Oviedo 2022-09-02 15:05:09 UTC
Created attachment 236315 [details]
portlint.badwolf-1.2.1.log
Comment 3 Jesús Daniel Colmenares Oviedo 2022-09-02 23:58:04 UTC
Created attachment 236322 [details]
Add gnome in USES

stage-qa reports many errors and warnings:

====> Running Q/A tests (stage-qa)
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libxml2.so.2 from textproc/libxml2 but it is not declared as a dependency
Warning: you need USE_GNOME+=libxml2
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libgtk-3.so.0 from x11-toolkits/gtk30 but it is not declared as a dependency
Warning: you need USE_GNOME+=gtk30
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libgdk-3.so.0 from x11-toolkits/gtk30 but it is not declared as a dependency
Warning: you need USE_GNOME+=gtk30
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libpangocairo-1.0.so.0 from x11-toolkits/pango but it is not declared as a dependency
Warning: you need USE_GNOME+=pango
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libpango-1.0.so.0 from x11-toolkits/pango but it is not declared as a dependency
Warning: you need USE_GNOME+=pango
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libatk-1.0.so.0 from accessibility/atk but it is not declared as a dependency
Warning: you need USE_GNOME+=atk
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libcairo-gobject.so.2 from graphics/cairo but it is not declared as a dependency
Warning: you need USE_GNOME+=cairo
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libcairo.so.2 from graphics/cairo but it is not declared as a dependency
Warning: you need USE_GNOME+=cairo
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libgdk_pixbuf-2.0.so.0 from graphics/gdk-pixbuf2 but it is not declared as a dependency
Warning: you need USE_GNOME+=gdkpixbuf2
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libsoup-2.4.so.1 from devel/libsoup but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libsoup-2.4.so:devel/libsoup
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libgmodule-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libglib-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libgio-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libgobject-2.0.so.0 from devel/glib20 but it is not declared as a dependency
Warning: you need USE_GNOME+=glib20

But in Porter's Handbook, section 6.10.2, the example port shows a port that uses USE_GNOME but does not include gnome in USES. I have included gnome in USES and the errors and warning have disappeared.

The only warning and error in stage-qa that is shown at the moment is when I have used the GUri option instead of libsoup, but this dependency is optional and is conditionally handled in badwolf.c.
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2022-09-08 11:17:44 UTC
Created attachment 236437 [details]
badwolf-1.2.1 v1

cosmetic changes:
- pet portclippy
- reformat with portfmt
small fixes:
- mv WWW url from pkg-descr to Makefile
- strip binary

Does this program supports "USES= gtk40"? I will do some tests with it and then discuss with you the best way to include gtk4 support if possible.

Cheers
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2022-09-08 11:24:25 UTC
- youtube.com doesn't show videos list, do you have same experience?
- freebsd.org site is ok
Comment 6 Jesús Daniel Colmenares Oviedo 2022-09-08 14:05:55 UTC
(In reply to Nuno Teixeira from comment #4)

> cosmetic changes:
> - pet portclippy
> - reformat with portfmt
> small fixes:
> - mv WWW url from pkg-descr to Makefile
> - strip binary

Thanks Eduardo, I will keep your recommendations in mind for future ports!

> Does this program supports "USES= gtk40"? I will do some tests with it and then discuss with you the best way to include gtk4 support if possible.

I tried to create a patch for ${WRKSRC}/configure and modify ./Makefile to enable gtk40 but there are many things to change to support it. I will send the poudriere-testport log.

> - youtube.com doesn't show videos list, do you have same experience?

I can see videos in Youtube and Twitch. I will do some testing.
Comment 7 Jesús Daniel Colmenares Oviedo 2022-09-08 17:02:09 UTC
(In reply to Nuno Teixeira from comment #5)

I have removed all gstreamer1-* dependencies in my computer and tried to install badwolf again. webkit2-gtk3 depends on gstreamer1-plugins-gl and gstreamer1-plugins-bad, but it does not install gstreamer1-plugins-good, so you can't watch videos on Youtube. I have made some changes to add the recommendations on the official website. In a momment, I'm testing.
Comment 8 Jesús Daniel Colmenares Oviedo 2022-09-08 17:03:05 UTC
(In reply to Jesús Daniel Colmenares Oviedo from comment #7)

See the recommendations:

* https://hacktivis.me/projects/badwolf/fqa#multimedia
Comment 9 Jesús Daniel Colmenares Oviedo 2022-09-08 19:13:56 UTC
Created attachment 236440 [details]
Add gstreamer

Done. The gstreamer dependency has been added.
Comment 10 Jesús Daniel Colmenares Oviedo 2022-09-08 19:59:48 UTC
Created attachment 236441 [details]
gtk40

This is the result when using gtk40. I made some changes to ./Makefile and ${WRKSRC}/configure to enable it, but the source code does not use gtk 4.
Comment 11 Nuno Teixeira freebsd_committer freebsd_triage 2022-09-09 12:34:19 UTC
Hi,

It looks that GURI steel depends on libsoup or maybe a ports framework bug:

LIBSOUP=on
URI parser selected: libsoup-2.4
Checking: pkg-config libsoup-2.4 ... OK

GURI=on
URI parser selected: GUri from glib-2.0
Checking: pkg-config --atleast-version=2.66.0 glib-2.0 ... OK
---
Error: /usr/local/bin/badwolf is linked to /usr/local/lib/libsoup-2.4.so.1 from devel/libsoup but it is not declared as a dependency

0x0000000000000001 NEEDED               Shared library: [libsoup-2.4.so.1]
---
Comment 12 Nuno Teixeira freebsd_committer freebsd_triage 2022-09-09 12:47:55 UTC
Created attachment 236453 [details]
badwolf-1.2.1 v2:  +NLS

added NLS knob:
 - moved USES= gettext to NLS_USES
 - patched Makefile to not translate
 - added %%NLS%% to pkg-plist translations

Doubt about gstreamer:
since gstreamer is an option it must not be present at USES, but at GSTREAMER_USES right? This way we don't pull gstreamer dependency when it is turned off.
(Didn't test it yet, didn't change gstreamer dep)
Comment 13 Jesús Daniel Colmenares Oviedo 2022-09-09 16:51:33 UTC
Created attachment 236457 [details]
Fix missing file in pkg-plist

Hi,

Thanks for adding a patch for NLS. I have added %%NLS%% in pkg-plist when disabled to prevent:

Error: Missing: @dir %%DATADIR%%/locale

> It looks that GURI steel depends on libsoup or maybe a ports framework bug

I have seen that webkit2-gtk3 depends on geoclue which in turn depends on libsoup.

But in badwolf.c it is handled conditionally depending on whether libsoup or GUri is used:

#ifndef USE_LIBSOUP2
        GUri *failing_uri = g_uri_parse(failing_text, G_URI_FLAGS_NONE, NULL);
#else
        SoupURI *failing_uri = soup_uri_new(failing_text);
#endif

There are some parts of the source that use the preprocessor to conditionally handle these options.

> Doubt about gstreamer

I have seen that Mk/Uses/gstreamer.mk conditionally handles its options, so even if you include it, but don't define which options to use, it doesn't add dependencies. I think it's the same with the other Mks files, like gnome.mk.
Comment 14 Jesús Daniel Colmenares Oviedo 2022-09-09 16:57:59 UTC
(In reply to Jesús Daniel Colmenares Oviedo from comment #13)

But I have changed gstreamer from USES to GSTREAMER_USES to add it when it is only enabled for consistency to NLS and not spend time evaluating if an option is used or not when it is disabled.
Comment 15 commit-hook freebsd_committer freebsd_triage 2022-09-09 22:05:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=af765b38596ff0999f4f7a28f4609c96f224de10

commit af765b38596ff0999f4f7a28f4609c96f224de10
Author:     Jesús Daniel Colmenares Oviedo <DtxdF@disroot.org>
AuthorDate: 2022-09-09 22:01:25 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-09-09 22:03:48 +0000

    www/badwolf: New port: Minimalist and privacy-oriented WebKitGTK+ browser

     - submitter becomes maintainer

    BadWolf is a minimalist and privacy-oriented WebKitGTK+ browser.

    Features:

    * Privacy-oriented: No browser-level tracking, multiple ephemeral
      isolated sessions per new unrelated tabs, JavaScript off by default.
    * Minimalist: Small codebase (~1 500 LoC), reuses existing components
      when available or makes them available.
    * Customizable: WebKitGTK native extensions, Interface customizable
      through CSS.
    * Powerful & Usable: Stable User-Interface; The common shortcuts are
      available, no vi-modal edition or single-key shortcuts are used.
    * No annoyances: Dialogs are only used when required (save file,
      print, ...), javascript popups open in a background tab.

    WWW: https://hacktivis.me/projects/badwolf

    PR:             266179

 www/Makefile                                 |  1 +
 www/badwolf/Makefile (new)                   | 46 ++++++++++++++++++++++++++++
 www/badwolf/distinfo (new)                   |  3 ++
 www/badwolf/files/extra-patch-Makefile (new) | 40 ++++++++++++++++++++++++
 www/badwolf/pkg-descr (new)                  | 14 +++++++++
 www/badwolf/pkg-plist (new)                  | 17 ++++++++++
 6 files changed, 121 insertions(+)
Comment 16 Nuno Teixeira freebsd_committer freebsd_triage 2022-09-09 22:08:18 UTC
- can't see youtube.com videos at 14.0-CURRENT #0 main-n257818-6f7bc8e7a3d0
  but soon I will test it on a 13.1-RELEASE and try to figure out what is
  the problem

Committed, thank you!