Commit graph

11 commits

Author SHA1 Message Date
Debarshi Ray
8b2d25f1e8 build: Replace join_paths with the / operator
Since Meson 0.49.0, the / operator on strings is equivalent to calling
join_paths() [1], and the former is less verbose, and easier to read.

[1] https://mesonbuild.com/Reference-manual_functions.html#join_paths

https://github.com/containers/toolbox/pull/1141
2022-10-21 17:24:03 +02:00
Debarshi Ray
708fa593e2 doc: Document the configuration file
https://github.com/containers/toolbox/pull/963
2021-12-17 13:23:37 +01:00
Debarshi Ray
0e78e4a313 build: Don't assume that all the pages are in section 1 of the manual
This will be used by the subsequent commit to add a page to document
the configuration file, which should go into section 5 of the manual.

https://github.com/containers/toolbox/pull/963
2021-12-17 13:23:33 +01:00
Debarshi Ray
120eea449e Remove the deprecated reset command
The Go implementation had deprecated the reset command, right from the
beginning, in favour of 'podman system reset'. It's time to finally
remove it.

https://github.com/containers/toolbox/pull/668
2021-01-12 03:21:35 +01:00
Debarshi Ray
2a099e8049 Add a reset command
The 'reset' command is meant to factory reset the local Podman and
Toolbox installations. Every now and then early adopters and testers of
Toolbox have to do this when their local Podman state has gotten
irrecoverably broken due to some Podman bug.

It's useful to have a command that encapsulates all the steps to do a
factory reset, as opposed to having to spell them out separately. It's
easier to document, helps with user support, and can enable less opaque
error messages that suggest a way forward when nothing is working.

Since this command is meant to be used when the Podman installation is
completely broken, it must avoid using any Podman commands at all
costs. This is why it cannot use 'podman stop' to stop any running
containers, nor can it use 'podman unshare' to delete
~/.local/share/containers when running rootless. Instead, it relies on
the user rebooting the machine for the former, and uses newgidmap(1),
newuidmap(1) and unshare(1) to reimplement 'podman unshare' for the
latter.

Note that when running as root, some care has been taken to avoid
removing directories that might be owned by the operating system. eg.,
on Fedora /var/lib/containers/sigstore is owned by the
containers-common RPM.

https://github.com/containers/toolbox/pull/295
2019-10-21 16:27:41 +02:00
Harry Míchal
5e63e9ec9b Improve the help or usage output
A new help command has been added which either shows the toolbox(1)
manual or a manual page for a specific command. The '--help' flag is
now identical to the help command and can be placed after the COMMAND
segment in the list of command line arguments.

Due to a bizarre quirk in less(1) [1], the default pager used to render
manuals on most systems, the man(1) invocations need the standard error
stream to point to the controlling terminal, if any, to work. This
interferes with the global redirection of standard error to /dev/null
in the absence of the '--verbose' flag, and is worked around by
redirecting to standard output instead.

[1] It turns out that less(1) tries to open the controlling terminal
    device /dev/tty to get to the keyboard for accepting input.
    However, it doesn't have a controlling terminal when invoked via
    D-Bus to render a manual on the host. It then strangely falls back
    to using the standard error stream to get to the keyboard.

https://github.com/debarshiray/toolbox/pull/200
2019-09-04 20:54:13 +02:00
Debarshi Ray
8b84b5e460 Drop the Buildah dependency and the user-specific customized image
This works by configuring the toolbox container after it has been
created, instead of before. The toolbox script itself is mentioned as
the entry point of the container, which does 'exec sleep +Inf' once the
initialization is done.

A new command 'init-container' was added to perform the initialization.
It is primarily meant to be used as the entry point for all toolbox
containers, and must be run inside the container that's to be
initialized. It is not expected to be directly invoked by humans, and
cannot be used on the host.

As a result, the default name for the toolbox containers is now
fedora-toolbox-<version-id>, not fedora-toolbox-<user>-<version-id>.
For backwards compatibility, 'toolbox enter' and 'toolbox run' will
continue to work with containers using the old naming scheme.

https://github.com/debarshiray/toolbox/pull/160
2019-05-16 15:47:33 +02:00
Toni Schmidbauer
2da4cc4634 Add a run command
This makes 'toolbox enter' similar to 'toolbox run $SHELL'.

The 'run' command is meant to spawn arbitrary binaries present inside
the toolbox container. Therefore it doesn't make sense for it to fall
back to /bin/bash, like it does for 'enter' if $SHELL is absent.

It's expected that users might use 'run' to create ad-hoc *.desktop
files. That's why it neither offers to create nor falls back to an
existing container like 'enter' does, because such interactions can't
happen when used in a *.desktop file. It's also a more advanced command
that new users are less likely to be interested in. Hence, this
shouldn't affect usability.

Some changes by Debarshi Ray.

https://github.com/debarshiray/toolbox/pull/76
2019-05-06 15:23:58 +02:00
Debarshi Ray
1cdaf21203 doc: Fix the installation of manuals
The manuals shouldn't be installed in the top-level directory, but in
one of the sub-directories corresponding to the relevant section.

Fallout from 0a972dfccc
2019-03-06 17:08:22 +01:00
Ondřej Zoder
7acc9936cf Add rm and rmi commands
https://github.com/debarshiray/toolbox/pull/45
2019-03-05 16:17:46 +01:00
Debarshi Ray
0a972dfccc Add manuals
https://github.com/debarshiray/toolbox/pull/66
2019-03-01 10:27:09 +01:00