hkbd/ukbd: sysctls to swap macbook kbd modifiers
Many applications, desktop environments, window managers & text editors
favor the usage of Alt or Ctrl over Super (Cmd). On a Macbook it is
quite annoying that the Super (Cmd) key gets pride of place by the spacebar.
The standard MacBook Cmd key location only really makes sense for macOS
or maybe in some tiling wm if Mod4/Super is your main modifier.
For most mainstream desktops and window managers, having Alt or Ctrl
in that location makes much much more sense.
This patch adds two sysctls for swapping either Opt(Alt) or Ctrl with Cmd(Super).
Linux has similar sysctls to this; allowing a user to make an Apple
keyboard more "orthodox"/useful at a level that takes effect independent
of typing context - ie) tty, Xorg and/or wayland.
Having a sysctl to do these swaps means that a user doesn't have to faff
about with both creating a custom vt keymap AND figure out which magic
[8 lines not shown]
sysutils/py-ansible-core: Only portscout the master ports
Never the metaport. This avoids false positives due to the metaport
using a 2.19 instead of 2.20 (because 2.20 requires Python 3.12 to be
the default python).
jls: add a -c mode to check for a jail's existence
This is intended to be primarily used in scripts that want to check if
a jail exists before taking some action -- for instance, the jail(8)
test cleanup functions that want to remove the jail if it still exists.
Having a mode that limits its output for their usage is useful both
for cleaner scripts and also to avoid masking real problems.
Reviewed by: jamie
(cherry picked from commit 1d8590371049bb14a6410fa83cd03d9eca32f764)
jls: minor simplification to arg handling
It's easier to reason about the state of argc/argv if we just augment
them by optind after our getopt() loop.
No functional change, but this sets the stage for another change to add
a `-c` mode to (c)heck for the existence of a jail quietly without
the caller having to worry about spurious output.
Reviewed by: jamie
(cherry picked from commit dbaaadd4373a725950ad11e578dab61537b7c4f2)
jail: fix backfilling the "name" for jid-named jails
Using the cfparam variant of add_param() will actually copy the name and
flags from the passed-in param, which I hadn't considered. We actually
want the name/flags from the "name" param so that we can do variable
expansion against it right after that -- otherwise it cannot be found,
since variable expansion actually searches by name.
While we're here, `jls -e` was the intermediate name for `jls -c` that
never saw the light of the day. Fix our existence test.
Reviewed by: jamie
Fixes: 02944d8c49 ("jail: consistently populate the KP_JID [...]")
(cherry picked from commit b81fd3fc8b20eaad64b5c41826432124fd92d6a7)
jail: consistently populate the KP_JID and KP_NAME parameters
The gaps here, specifically, were:
- When we have to discover a running jail's jid from name, we should
populate the missing jid param
- When we populate jid/name from the config, if the name is a jid we
wouldn't populate the name; now we do both.
- When we create a jail, we should populate jid and name with whatever
details we have now that we didn't both.
As a consequence, we can cleanup a few things:
- vnet.interface and zfs.dataset can just always use the jid
- Trying to populate JNAME should always work now, where it would be
a little crashy before if you create a jail that didn't have a name
or jid on the command line
- We can simplify the just-prior JID population now that we'll keep a
stringified jid in our intparams.
This primarily fixes the below, but the issues with vnet.interface and
[6 lines not shown]
jail: tests: cleanup the commands test a bit
We shouldn't be doing setup in a head() function, as this can cause
various problems. For instance, in this case, it caused test listing
to fail in some cases if we didn't get to execute the cleanup properly
by complaining to stderr if the directory could not be created.
Switch to using atf_check for sanity checking stdout; most of these
expressions are self-explanatory and will make it clear what the problem
is.
commands.jail.conf contains a hard-coded path that we can avoid, which
is probably good to avoid weird conflicts if other tests try to copy it
and do the same. Just make a copy of our jail.conf and add the test's
$PWD to it to get a generally unique jail root.
Finally, simplify the cleanup handler a bit.
Reviewed by: jamie
[2 lines not shown]
jail: add JID, JNAME and JPATH to environment for exec.* commands
Although variable substitution is available in the jail configuration
file, the jail identifier is often not since it is dynamically
attributed at run time.
In order to facilitate scripting of exec.* commands executed on the
system, this change sets the JID, JNAME and JPATH environment variables.
These variables are not added when using exec.clean. Neither are they
for commands executed inside jails, to avoid disclosing information
about the host system.
Reviewed by: imp
(cherry picked from commit d8f021add40c321c4578da55dae52fb93c7ccb5f)
jail: tests: cosmetic-ish improvements
The new version of incrementing `jid` is a little cleaner and harder to
mess up, and also fix a nwlin omission while we're here.
These comments were dropped on D51502; ngie takes a co-author credit
so that they're not blamed for the commit message, but I can't claim
that I tweaked their suggestions.
Co-authored-by: ngie
makeman: switch over to the .lua implementation
Nobody will test it as long as it's not tied into the top-level target,
and we don't really have a good reason not to cut over to it since it
does produce identical results. Switch over but do not remove the old
sh implementation yet, just in case.
Note that this replacement is driven by a significant speedup from how
the new version is designed: tha lua version actually tries to
parallelize its data collection efforts to speed up generation.
Reviewed by: imp (previous version), emaste
Differential Revision: https://reviews.freebsd.org/D56558
linuxkpi: Implement __GFP_THISNODE in alloc_pages()
It indicates to `alloc_pages()` to allocate the pages from the current
NUMA domain. If it couldn't, it should not retry elsewhere and return
failure.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56590