@@ -324,32 +324,36 @@ For most users, it is recommended to install munet through pip (see:
324324https://munet.readthedocs.io/en/latest/usage.html). However, if you want to run
325325the unit tests, then you will need to set up your local enviornment:
326326
327- *** Dependencies
328-
329- μNET requires the following packages:
327+ *** `sudo -E` configuration
330328
331- python3 python3-venv
329+ To allow munet to be found when running with `sudo -E` the `secure_path` config
330+ should be disabled in /etc/sudoers:
332331
333- Automate tests require the following system packages:
332+ #+begin_src shell
333+ $ sudo sed -i -e '/secure_path/s/^/# /' /etc/sudoers
334+ #+end_src
334335
335- podman
336+ *** Dependencies
336337
337- Install the [[https://docs.astral.sh/uv/][uv]] package manager (either through
338- your system's package manager or directly via the official installer):
338+ Install the [[https://docs.astral.sh/uv/][uv]] python project
339+ manager (either through your system's package manager or directly via the
340+ official installer):
339341
340342#+begin_src shell
341343 curl -LsSf https://astral.sh/uv/install.sh | sh
342344#+end_src
343345
346+ Some of the munet unit tests will require the following system packages which
347+ you should install according to your OS procedures:
348+
349+ podman
350+
344351Install μNET with dependencies:
345352
346353#+begin_src shell
347354 make install
348355#+end_src
349356
350- NOTE: After syncing the environment with =uv sync=, you can either activate the
351- virtual environment (in =.venv= by default) or prefix commands with =uv run=.
352-
353357*** Check your install
354358
355359 make
@@ -358,11 +362,11 @@ virtual environment (in =.venv= by default) or prefix commands with =uv run=.
358362
359363The following uses FRR (see https://frrouting.org)
360364
361- sudo uv run munet -c examples/frr/ospf/ospf/munet.yaml
365+ uv run sudo -E munet -c examples/frr/ospf/ospf/munet.yaml
362366
363367For example:
364368#+begin_src shell
365- munet$ sudo uv run munet -c examples/frr/ospf/ospf/munet.yaml
369+ munet$ uv run sudo -E munet -c examples/frr/ospf/ospf/munet.yaml
3663702022-09-16 13:37:05,603: INFO: Loaded logging config /home/lberger/Code/github/labn/munet/munet/logconf.yaml
3673712022-09-16 13:37:05,609: INFO: Loaded config from /home/lberger/Code/github/labn/munet/examples/frr/ospf/ospf/munet.yaml
3683722022-09-16 13:37:05,623: INFO: Loaded kinds config /home/lberger/Code/github/labn/munet/munet/kinds.yaml
0 commit comments