0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-21 21:23:08 -05:00
LibreWolf/README.md

191 lines
6.8 KiB
Markdown
Raw Permalink Normal View History

2022-04-13 09:27:39 -05:00
# LibreWolf Source Repository
2024-07-17 14:06:10 -05:00
This repository contains all the patches and theming that make up LibreWolf, as well as scripts and a Makefile to build LibreWolf. There also is the [Settings repository](https://codeberg.org/librewolf/settings), which contains the LibreWolf preferences.
2022-05-12 12:06:44 -05:00
## LibreWolf overview
```mermaid
graph LR
FFSRC(Firefox Source)
FFSRC--Tarball--->Source
subgraph librewolf-community/
Settings(Settings)--"librewolf.cfg<br>policies.json"-->Source
Website(Website<br><br>- Documentation<br>- FAQ)
subgraph browser/
Source(Source<br><br>- Patches<br>- Theming<br>- Build scripts)
bsys6(bsys6<br><br>New Docker building<br>repository)
bsys5(bsys5<br><br>Old Docker building<br>repository)
AppImage
Arch
end
end
Website-->librewolf.net
Source--"Source tarball"-->bsys6 & bsys5
AppImage--".appimage"-->librewolf.net
bsys6--"Windows setup.exe"--->librewolf.net
bsys6--"Windows portable.zip"--->librewolf.net
bsys6--"Windows .msix"--->MS("Microsoft Store")
bsys6--"Windows .nupkg"--->Chocolatey
bsys6--"Linux binary tarball"--->Flathub
bsys6--"Linux binary tarball"--> AppImage
bsys6--"Linux binary tarball for `librewolf-bin`"--> Arch
Source--"Source tarball for `librewolf`"-->Arch
Arch-->AUR
bsys5--"Linux .deb"--->deb.librewolf.net
bsys5--"Linux .rpm"--->rpm.librewolf.net
```
2022-04-13 09:27:39 -05:00
2022-03-08 08:37:52 -05:00
## Active repositories and projects
List of browser build sub projects. These are the locations where people have their repositories and build artifacts.
Currently active build repositories:
2022-05-12 12:06:44 -05:00
2024-07-17 14:06:10 -05:00
* [Arch](https://codeberg.org/librewolf/arch): Arch Linux package
* [Bsys5](https://codeberg.org/librewolf/bsys5): .deb/.rpm for Mint, Fedora, Ubuntu; .dmg for MacOS; portable/setup for Windows.
* [Gentoo](https://codeberg.org/librewolf/gentoo): Gentoo package
2022-03-08 08:37:52 -05:00
2022-05-12 12:06:44 -05:00
Currently active (and known) forks:
2022-03-13 08:22:37 -05:00
* Cachy-Browser: https://github.com/cachyos/cachyos-browser-settings
Previous forks:
2022-03-08 08:37:52 -05:00
* FireDragon: https://github.com/dr460nf1r3/firedragon-browser
2022-02-03 04:58:11 -05:00
## LibreWolf build instructions
2022-02-03 04:57:05 -05:00
2022-05-04 06:39:18 -05:00
There are two ways to build LibreWolf. You can either use the source tarball or compile directly with this repository.
2022-04-13 09:27:39 -05:00
### Building from the Tarball
2024-07-17 14:06:10 -05:00
First, let's **[download the latest tarball](https://codeberg.org/librewolf/source/releases)**. This tarball is the latest produced by the [CI](https://gitlab.com/librewolf-community/browser/source/-/jobs). You can also check the sha256sum of the tarball there.
2022-02-09 07:10:41 -05:00
```bash
2022-02-03 04:57:05 -05:00
tar xf <tarball>
cd <folder>
```
2022-04-13 09:27:39 -05:00
Then, you have to bootstrap your system to be able to build LibreWolf. You only have to do this one time. It is done by running the following commands:
```bash
2022-04-13 09:27:39 -05:00
./mach --no-interactive bootstrap --application-choice=browser
./lw/setup-wasi-linux.sh
```
Finally you can build LibreWolf and then package or run it with the following commands:
```bash
2022-04-13 09:27:39 -05:00
./mach build
./mach package
# OR
./mach run
2022-02-03 04:57:05 -05:00
```
2022-04-13 09:27:39 -05:00
### Building with this Repository
First, clone this repository with Git:
2022-02-03 04:17:35 -05:00
```bash
2022-04-13 09:27:39 -05:00
git clone --recursive https://gitlab.com/librewolf-community/browser/source.git librewolf-source
cd librewolf-source
2022-02-03 04:17:35 -05:00
```
2022-04-13 09:27:39 -05:00
Next, build the LibreWolf source code with the following command:
```bash
2022-04-13 09:27:39 -05:00
make dir
2022-02-03 04:17:35 -05:00
```
2022-04-13 09:27:39 -05:00
After that, you have to bootstrap your system to be able to build LibreWolf. You only have to do this one time. It is done by running the following command:
```bash
2022-02-03 04:17:35 -05:00
make bootstrap
```
2022-04-13 09:27:39 -05:00
Finally you can build LibreWolf and then package or run it with the following commands:
```bash
2022-04-13 09:27:39 -05:00
make build
2022-02-03 04:27:29 -05:00
make package
2022-04-13 09:27:39 -05:00
# OR
2022-02-03 04:27:29 -05:00
make run
```
2022-04-13 09:27:39 -05:00
## Development Notes
### How to make a patch
The easiest way to make patches is to go to the LibreWolf source folder:
```bash
2022-04-13 09:27:39 -05:00
cd librewolf-$(cat version)
git init
git add <path_to_file_you_changed>
git commit -am initial-commit
git diff > ../mypatch.patch
```
We have Gitter / Matrix rooms, and on the website we have links to the various issue trackers.
2022-04-27 04:36:30 -05:00
### How to work on an existing patch
The easiest way to make patches is to go to the LibreWolf source folder:
```bash
2022-04-27 04:36:30 -05:00
make fetch # get the firefox tarball
./scripts/git-patchtree.sh patches/sed-patches/disable-pocket.patch
```
Now change the source tree the way you want, keeping in mind to `git add` new files. When done, you can create the new patch with:
```bash
2022-04-27 04:36:30 -05:00
cd firefox-<version>
git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD > ../my-patch-name.patch
```
2022-05-04 06:39:18 -05:00
This ID is the hash value of the first commit, which is called `initial`. Dont forget to commit changes before doing this diff, or the patch will be incomplete.
2022-04-27 04:36:30 -05:00
2022-04-13 09:27:39 -05:00
### How to create a patch for problems in Mozilla's [Bugzilla](https://bugzilla.mozilla.org/).
2022-02-03 05:20:10 -05:00
Well, first of all:
* [Create an account](https://bugzilla.mozilla.org/createaccount.cgi).
* Handy link: [Bugs Filed Today](https://bugzilla.mozilla.org/buglist.cgi?cmdtype=dorem&remaction=run&namedcmd=Bugs%20Filed%20Today&sharer_id=1&list_id=15939480).
* The essential: [Firefox Source Tree Documentation](https://firefox-source-docs.mozilla.org/).
2022-02-03 05:54:09 -05:00
Now that you have a patch in LibreWolf, that's not enough to upload to Mozilla. See, Mozilla only accepts patches against Nightly. So here is how to do that:
2022-04-08 14:24:30 -05:00
If you have not done already, create the `mozilla-unified` folder and build Firefox with it:
```bash
2022-02-03 05:20:10 -05:00
hg clone https://hg.mozilla.org/mozilla-unified
cd mozilla-unified
hg update
MOZBUILD_STATE_PATH=$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser
./mach build
./mach run
```
2022-04-08 14:24:30 -05:00
If you skipped the previous step, you could ensure that you're up to date with:
```bash
2022-04-08 14:24:30 -05:00
cd mozilla-unified
hg pull
hg update
```
2022-02-03 05:20:10 -05:00
Now you can apply your patch to Nightly:
```bash
2022-02-03 05:20:10 -05:00
patch -p1 -i ../mypatch.patch
```
Now you let Mercurial create the patch:
```bash
2022-02-03 05:20:10 -05:00
hg diff > ../my-nightly-patch.patch
```
2022-02-03 05:54:09 -05:00
And it can be uploaded to Bugzilla.
2022-02-03 05:25:54 -05:00
2022-05-04 06:39:18 -05:00
##### *(excerpt from the Mozilla readme)* Now the fun starts
2022-02-03 05:25:54 -05:00
Time to start hacking! You should join us on [Matrix](https://chat.mozilla.org/), say hello in the [Introduction channel](https://chat.mozilla.org/#/room/#introduction:mozilla.org), and [find a bug to start working on](https://codetribute.mozilla.org/). See the [Firefox Contributors Quick Reference](https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html#firefox-contributors-quick-reference) to learn how to test your changes, send patches to Mozilla, update your source code locally, and more.
2022-02-03 06:34:45 -05:00
2022-11-02 04:55:12 -05:00
## Hey, I'm using MacOS or Windows..
2022-05-04 06:39:18 -05:00
We understand, life isn't always fair 😺. The same steps as above do apply, you'll just have to walk through the beginning part of the guides for:
* [MacOS](https://firefox-source-docs.mozilla.org/setup/macos_build.html): The cross-compiled Mac .dmg files are somewhat new. They should work, perhaps with the exception of the `make setup-wasi` step.
* [Windows](https://firefox-source-docs.mozilla.org/setup/windows_build.html): Building on Windows is not very well tested.
2022-05-04 09:29:37 -05:00
Help with testing these targets is always welcome.