nuageinit: fix test after recent behaviour change
with recent change nuageinit always create a "freebsd" user, if no
users are specified, which means we do need to get the rootdir in the
testsuite containing a group file otherwise pw complains and the tests
fails.
(cherry picked from commit 65e77d34fdff9065616cfaedef3ef53329cdad26)
release: make sh the default shell
The default shell for root has been changed to sh(1) followup changing
in release images sh(1) the shell for the "freebsd" user.
MFC After: 1 week
Reviewed by: manu, emaste (re)
Approved by: manu, emaste (re)
Differential Revision: https://reviews.freebsd.org/D54602
(cherry picked from commit d64db8892f8519f108d838f8d7e1d3b675ed37cd)
nuageinit: config2_network support dns service cfg
This change enhances `config2_network()` to honor the DNS
configuration, when it's defined through the `services` section.
The `network_data.json` file can hold DNS configuration at two different
places:
- within a network configuration entry
- or `dns` entry in the `services` section, in this case the configuration is global.
An example of such configuration:
{"links": [{"id": "interface0", "type": "phy",
"ethernet_mac_address": "52:54:00:01:59:03"}], "networks": [{"id": "private-ipv4-0", "type": "ipv4", "link": "interface0",
"ip_address": "192.168.123.5", "netmask": "255.255.255.0", "routes": [{"network": "0.0.0.0", "netmask": "0.0.0.0", "gateway":
"192.168.123.1"}], "network_id": "9e5b1ed9-f5e6-4941-a90f-2e06bab858de", "dns_nameservers": ["192.168.123.1"], "services": [{"type":
"dns", "address": "192.168.123.1"}]}], "services": [{"type": "dns", "address": "192.168.123.1"}]}
See: https://docs.openstack.org/nova/latest/user/metadata.html
[5 lines not shown]
nuageinit: only create the default user when needed
The "default" user should only be created when:
- the `users` key is missing
- or the `default` string is present in the `users` list
Since the `public_keys` is extracted from the meta-data, this patch has
to slightly adjust the way they are loaded.
The change simplify the logic around the default user SSH key injection.
Both `ssh_authorized_keys` and `public_keys` are handled at the same time.
MFC After: 1 week
Signed-off-by: Gonéri Le Bouder <goneri at lebouder.net>
Pull Request: https://github.com/freebsd/freebsd-src/pull/1952
(cherry picked from commit cbc00fcc2b92e6e38b0a180261547b1a22b461bd)
nuageinit/man: clarify how to enable sudo and doas
Clarify that both `sudo` and `doas` are not part of the base system and
they need to be listed in the `packages` section if the user wants to
enable them.
MFC After: 1 week
Signed-off-by: Gonéri Le Bouder <goneri at lebouder.net>
Pull Request: https://github.com/freebsd/freebsd-src/pull/1944
(cherry picked from commit 402f1353707783e2adc8d0bff01faf557820f6f5)
release: make sh the default shell
The default shell for root has been changed to sh(1) followup changing
in release images sh(1) the shell for the "freebsd" user.
MFC After: 1 week
Reviewed by: manu, emaste (re)
Approved by: manu, emaste (re)
Differential Revision: https://reviews.freebsd.org/D54602
(cherry picked from commit d64db8892f8519f108d838f8d7e1d3b675ed37cd)
nuageinit: only create the default user when needed
The "default" user should only be created when:
- the `users` key is missing
- or the `default` string is present in the `users` list
Since the `public_keys` is extracted from the meta-data, this patch has
to slightly adjust the way they are loaded.
The change simplify the logic around the default user SSH key injection.
Both `ssh_authorized_keys` and `public_keys` are handled at the same time.
MFC After: 1 week
Signed-off-by: Gonéri Le Bouder <goneri at lebouder.net>
Pull Request: https://github.com/freebsd/freebsd-src/pull/1952
(cherry picked from commit cbc00fcc2b92e6e38b0a180261547b1a22b461bd)
nuageinit: fix test after recent behaviour change
with recent change nuageinit always create a "freebsd" user, if no
users are specified, which means we do need to get the rootdir in the
testsuite containing a group file otherwise pw complains and the tests
fails.
(cherry picked from commit 65e77d34fdff9065616cfaedef3ef53329cdad26)
nuageinit: config2_network support dns service cfg
This change enhances `config2_network()` to honor the DNS
configuration, when it's defined through the `services` section.
The `network_data.json` file can hold DNS configuration at two different
places:
- within a network configuration entry
- or `dns` entry in the `services` section, in this case the configuration is global.
An example of such configuration:
{"links": [{"id": "interface0", "type": "phy",
"ethernet_mac_address": "52:54:00:01:59:03"}], "networks": [{"id": "private-ipv4-0", "type": "ipv4", "link": "interface0",
"ip_address": "192.168.123.5", "netmask": "255.255.255.0", "routes": [{"network": "0.0.0.0", "netmask": "0.0.0.0", "gateway":
"192.168.123.1"}], "network_id": "9e5b1ed9-f5e6-4941-a90f-2e06bab858de", "dns_nameservers": ["192.168.123.1"], "services": [{"type":
"dns", "address": "192.168.123.1"}]}], "services": [{"type": "dns", "address": "192.168.123.1"}]}
See: https://docs.openstack.org/nova/latest/user/metadata.html
[5 lines not shown]
nuageinit/man: clarify how to enable sudo and doas
Clarify that both `sudo` and `doas` are not part of the base system and
they need to be listed in the `packages` section if the user wants to
enable them.
MFC After: 1 week
Signed-off-by: Gonéri Le Bouder <goneri at lebouder.net>
Pull Request: https://github.com/freebsd/freebsd-src/pull/1944
(cherry picked from commit 402f1353707783e2adc8d0bff01faf557820f6f5)
ncurses: readd "bsdpads"
During the import of ncurses 6.5 some bsd specifics configuration where
lost and reintroduce quickly after the import, unfortunatly there was a
typo in this fix which caused the "bsdpads" to not be enabled in
ncurses.
Fortunatly only very old programs may be affected by this change,
unfortunatly Nethack (in the ports tree is one of them.)
PR: 287358
MFC After: 3 days
(cherry picked from commit 836a0d46320c18d83029bf138b630b6ce5ebe6ae)
ncurses: readd "bsdpads"
During the import of ncurses 6.5 some bsd specifics configuration where
lost and reintroduce quickly after the import, unfortunatly there was a
typo in this fix which caused the "bsdpads" to not be enabled in
ncurses.
Fortunatly only very old programs may be affected by this change,
unfortunatly Nethack (in the ports tree is one of them.)
PR: 287358
MFC After: 3 days
(cherry picked from commit 836a0d46320c18d83029bf138b630b6ce5ebe6ae)
pfctl: allow new page character (^L) in pf.conf
PF configuration files can contains many things.
Using the new page characters (i.e. ^L, \014) to mark the beginning
of parts is useful because many editors such as emacs and vim has
facilities to jump next/previous ones.
PR: 86635
MFC after: 2 weeks
Submitted by: MOROHOSHI Akihiko <moro at remus.dti.ne.jp>
Submitted by: Simon Wollwage <rootnode+freebsd at wollwage.com>
Sponsored by: Rubicon Communications, LLC ("Netgate")