Build tags omit network drivers by fahedouch · Pull Request #533 · rootless-containers/rootlesskit (original) (raw)

@fahedouch

AkihiroSuda

The child command can enter `$ROOTLESSKIT_STATE_DIR/netns` by itself to create nested network namespaces.
## Build tags to omit drivers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be probably in /BUILDING.md

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

AkihiroSuda

go build -tags no_slirp4netns ./cmd/rootlesskit
- Build without lxc-user-nic support:
go build -tags no_lxcusernic ./cmd/rootlesskit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one example should suffice for a document.

The CI should test all of them, and a combination of them too.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, but I what to test here ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just test go build with several combination s of the tags

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some tests

AkihiroSuda

// NewParentDriver returns a stub when built with the no_gvisortapvsock tag.
func NewParentDriver(logWriter io.Writer, mtu int, ipnet *net.IPNet, ifname string, disableHostLoopback bool, enableIPv6 bool) (network.ParentDriver, error) {
return &disabledParent{}, errors.New("gvisor-tap-vsock network driver disabled by build tag no_gvisortapvsock")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omitted drivers should not appear in --help

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@fahedouch

Signed-off-by: fahed dorgaa fahed.dorgaa@gmail.com

@fahedouch

AkihiroSuda

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})