Add a pacman action, whereby pacman is the Arch package manager akin to
apt for Debian. This allows us to install packages, after the initial
pacstrap action (or equivalent).
Akin to the pacstrap action - there is a Debian package for pacman. Plus
upstream pacman continuously builds and tests pacman against Arch,
Fedora and Debian.
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
v2: [Ed]
- Drop --color never as it is implicit
- Drop --noprogressbar likewise
- Reorder remaining arguments
- Style tweaks
v3: [Emil]
- Run the lot through gofmt -s -w
- Commit message
- Sort the action alphabetically
v4: [Emil]
- Drop quotes around pacman
Signed-off-by: Ed Smith <ed.smith@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
Similar to the pacstrap action, the formatting is a bit weird props to
gofmt. Happy to drop that hunk.
Add a pacstrap action, which is the Arch variant of debootstrap.
In other words, this allows us to bootstrap an Arch image.
Bear in mind that the tool pacstrap is a thin wrapper around the pacman
package manager. Both of those are separate projects and are available
as Debian packages, in case one wants to give them a try.
This is loosely based on the work by Arnaud Rebillout
Note: the action works only within a fakemachine instance, making it
work outside is doable but left for a later day.
v2:
- drop pacman-key capitalisation
v3:
- drop pacstrap capitalisation
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
Some of the changes made:
- Commit message
- Remove all pacman.conf and mirrorlist generation
- Use drop-in user files for ^^
- Remove custom flags passed to pacman-key, pacstrap
- Add Verify hook for validation
- Sort the action
- Run through gofmt -s -w
- Add PreNoMachine() stage
NOTE: the funky formatting of the pacstrap_action.do header is due to
gofmt. Can drop those changes if people prefer.
This change makes debos read a predefined set of environment variables
from the host and propagates it to fakemachine. The set of environment
variables is defined by environ_vars on cmd/debos/debos.go. Currently
the list of environment variables is configured to the proxy environment
variables as documented here[1]:
http_proxy, https_proxy, ftp_proxy, rsync_proxy, all_proxy, no_proxy
While the elements of environ_vars are in lower case, for each element
both lower and upper case variants are probed on the host, and if found
propagated to fakemachine. So if the host has the environment variables
HTTP_PROXY and no_proxy defined, both will be propagated to fakemachine
respecting the case.
This patch also adds --environ-var and -e command line options that can
be used to specify, overwrite, and unset environment variables for
fakemachine with the syntax:
$ debos -e ENVIRONVAR:VALUE ...
To unset an enviroment variable, or in other words, to prevent an
environment variable to be propagated to fakemachine, use the same
syntax without a value. debos accept multiple -e simultaneously.
[1] - https://wiki.archlinux.org/index.php/proxy_settings
This change depends on:
8b7eea7096cd015771cf9862647b7cd04bb41904 - machine.go: Add support to
environment variables
on fakemachine repository.
Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com>