#How to help with the Wifi renewal "branch" in hg The wifi renewal project is trying to sync our sys/net80211 with FreeBSD as far as possible, to allow easier sharing of drivers. ## Why hg? The project started with a traditional CVS branch, but as we will be moving to mercurial anyway (and this "branch" could live for quite some time, even across the general repo switch), it is a good test case for the hg environment and also nice practice for the developers involved. The development uses a "topic", which is a kind of lightweight branch that goes away after the project finished. The hg documentation includes an [introduction to topics](https://www.mercurial-scm.org/doc/evolution/tutorials/topic-tutorial.html). ## Helping with testing ** Note that this project is not ready for general testing yet! ** If you just want to check out the wifi project source and build your own test kernel for it, you simply start by cloning the repository (assuming you have a working mercurial setup, see below for installation hints) from anonhg: > hg clone https://anonhg.netbsd.org/src-draft Now enable the 'topic' extension by installing py-hg-evolve and adding [extensions] topic= to the .hg/hgrc file in your clone directory and then update to the 'wifi' topic: > hg up wifi ## Helping with development See [[Converting drivers to the new wifi stack]] and [[tutorials/Converting USB drivers to usbwifi(9)]]. As a developer, you should start with an anonhg clone as well, as that uses 'clonebundles' and the CDN to get your clone faster. The development happens using the topic and evolve extensions, which unfortunately slows down some hg operations. After initial cloning (see above) you will have to edit your global ~/.hgrc and the clone local .hg/hgrc files. Here is my ~/.hgrc: [ui] user=Martin Husemann color = no ignore = ~/.hgignore [paths] default:pushrev = . [extensions] evolve= topic= share= purge= pager= rebase= The .hgignore file referenced there tells hg to leave editor backups and compiled kernels alone. Mine looks like: syntax: glob *~ *.o sys/arch/amd64/compile/* Finally the clone local config (.hg/hgrc) looks like this: [paths] default = ssh://hg.netbsd.org//repo/src-draft final = ssh://hg.netbsd.org//repo/src-public [phases] publish=false This directs normal pushes to the src-draft repository and prevents publishing (that is what "merging the branch to HEAD" would have been in CVS). When it is time to do that, a "final" push will be done that moves the changes to the src-public repository (and empties the topic, which will make it vanish on next update). ## Mercurial installation hints If you are working from pkgsrc or binary packages you need the `devel/mercurial` and `devel/py-hg-evolve` pkgs installed. If your clone command fails with (an attempt was made to load CA certificates but none were loaded; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error) abort: error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131) you are missing trust anchors - easiest way to fix it is to install `security/mozilla-rootcerts` and run `mozilla-rootcerts install` once (or install `security/mozilla-rootcerts-openssl`).