From e73b796f2a1bc5b6e4e9275b4c0e6f37d64e2901 Mon Sep 17 00:00:00 2001 From: qoijjj <129108030+qoijjj@users.noreply.github.com> Date: Wed, 24 Jul 2024 20:27:56 -0700 Subject: [PATCH 1/2] fix: undo dns patch fix accidentally reverted during 127 upgrade --- patches/set-default-secure-dns-mode-automatic.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/set-default-secure-dns-mode-automatic.patch b/patches/set-default-secure-dns-mode-automatic.patch index 28eca728..e3cb18f5 100644 --- a/patches/set-default-secure-dns-mode-automatic.patch +++ b/patches/set-default-secure-dns-mode-automatic.patch @@ -7,7 +7,7 @@ index 27526ac0c574b..0680d2912d381 100644 SecureDnsConfig::ParseMode(mode_str) ? std::string(mode_str) - : SecureDnsConfig::kModeOff); -+ : SecureDnsConfig::kAutomatic); ++ : SecureDnsConfig::kModeAutomatic); } const base::Value* templates = From 5b114a18482f18ff58534114a7e338f42e1ea325 Mon Sep 17 00:00:00 2001 From: 34n0 <34n0@immerda.ch> Date: Sat, 27 Jul 2024 22:07:16 +0200 Subject: [PATCH 2/2] doc: contributing guide including build instructions --- .gitignore | 3 ++ CONTRIBUTING.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 +++ 3 files changed, 95 insertions(+) create mode 100644 .gitignore create mode 100644 CONTRIBUTING.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a94f1479 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# build artifacts +dist +*.rpm \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..21346bc7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,88 @@ + +# Contributing to hardened-chromium + +First off, thanks for taking the time to contribute! ❤️ + +> If you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: +> - Star the project +> - Tweet about it +> - Refer this project in your project's readme +> - Mention the project at local meetups and tell your friends/colleagues + + +## Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [I Have a Question](#i-have-a-question) +- [I Want To Contribute](#i-want-to-contribute) + - [Building locally](#your-first-code-contribution) + - [Pull Requests](#💫-pull-requests) + + +## Code of Conduct + +This project and everyone participating in it is governed by the +[Code of Conduct](https://github.com/secureblue/hardened-chromium/blob/master/CODE_OF_CONDUCT.md). +By participating, you are expected to uphold this code. Please report unacceptable behavior +to . + + +## I Have a Question + +> If you want to ask a question, we assume that you have read the available [Documentation](). + +Before you ask a question, it is best to search for existing [Issues](https://github.com/secureblue/hardened-chromium/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. + +If you then still feel the need to ask a question and need clarification, we recommend the following: + +- Open an [Issue](https://github.com/secureblue/hardened-chromium/issues/new). +- Provide as much context as you can about what you're running into. +- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. + +We will then take care of the issue as soon as possible. + +## I Want To Contribute + +> ### Legal Notice +> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. + +### Building locally +#### Setup +Clone this repository: + +`git clone --depth 1 --recurse-submodules https://github.com/secureblue/hardened-chromium.git && cd hardened-chromium` + +Download chromium-%{version}-clean.tar.xz from the Fedora's server: + +`rpkg --path ./chromium sources` + +#### Harden +Copy the patches inside the source folder: + +`cp vanadium_patches/* ./chromium && cp patches/* ./chromium` + +Patch the spec file to build with the hardening patches: + +`patch -d ./chromium -p1 < hardening.patch` + +#### Build RPM +Build the patched chromium source from the spec file: + +`rpmbuild -bs -v --define "_sourcedir $PWD/chromium" --define "_rpmdir $PWD/chromium" --define "_builddir $PWD/chromium" --define "_specdir $PWD/chromium" --define "_srcrpmdir $PWD" chromium/chromium.spec` + +Rebuild the source for your system: + +`mock --resultdir=dist -r %{distro}-%{version}-%{arch} --rebuild hardened-chromium-%{version}.%{distro}.src.rpm` + +Install the built rpm... +### Pull Requests + +#### Before Submitting a Pull Request + +A good pull request should be ready for review before it is even created. For all pull requests, ensure: + +- Your changes are in a single commit +- Your changes passes all the checks +- You have no unnecessary changes, including and especially whitespace changes +- You're code is covered. +- For substantive changes, you include evidence of proper functionality in the pull request in addition to the build results. \ No newline at end of file diff --git a/README.md b/README.md index 5ee02e1f..5256c2f7 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,7 @@ A hardened chromium for desktop Linux inspired by [Vanadium](https://github.com/ * Any changes that sacrifice security for "privacy" (for example, enabling MV2) * Any novel functionality that is unrelated to security + +## Contributing + +Follow the [contributing documentation](CONTRIBUTING.md), and make sure to respect the [CoC](CODE_OF_CONDUCT.md). \ No newline at end of file