24 Commits

Author SHA1 Message Date
Dylan Aïssi
068f8fb18d Fix typo: environemnt -> environment
Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
2025-08-13 22:49:02 +02:00
Christopher Obbard
e794b20757 doc: examples: Upgrade debian-ospack example recipe to bookworm
Bullseye is outdated. Upgrade to bookwork.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
2025-08-05 16:15:46 +01:00
Christopher Obbard
e09ded2ed8 doc: examples: Move debian-ospack example to own directory
To allow for more examples to be merged in future, move the debian-ospack
example into its own directory.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
2025-08-05 12:18:30 +01:00
Christopher Obbard
03ec3cbfab Fix grammer/spelling issues in README
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2024-01-13 13:01:36 +00:00
bors[bot]
bcee56f3f5 Merge #375 #387
375: Modernise example recipes and fix bug r=obbardc a=obbardc

Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006823

387: ci: remove deprecated set-output r=obbardc a=evelikov

The option is deprecated and we should be using $GITHUB_OUTPUT instead. See the official announcement for details:

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/


Co-authored-by: Christopher Obbard <chris.obbard@collabora.com>
Co-authored-by: Emil Velikov <emil.velikov@collabora.com>
2023-01-03 13:08:56 +00:00
Arnaud Rebillout
6502331170 Add pacman action
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.
2022-12-09 12:17:56 +00:00
Emil Velikov
c5b570b1c3 Add pacstrap action
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.
2022-12-09 12:17:35 +00:00
Christopher Obbard
cc75f7df3c doc/examples: Don't install packages missing from bullseye
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
67aeea3424 doc/examples: Don't use chroot to set hostname
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
44fe73c3e9 doc/examples: Keep consistency with whitespace modifiers
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
1415971122 doc/examples: Reformat array to use multiple lines
Linebreaks are cheap; they also allow us to see changes in git history
a lot cleaner.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
2d0ed37410 doc/examples: Don't enable contrib and non-free
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
a909725e1b doc/examples: Set suite to bullseye
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
578d09f346 doc/examples: Rename example to debian-example-ospack
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
19a8ee6232 doc/examples: Use .tar.gz extension instead of .tgz
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
6be14af793 doc/examples: Move setup-user.sh into scripts directory
Usually to keep things clean we suggest users should keep
scripts in a separate directory.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:19 +01:00
Christopher Obbard
c8c5075853 doc/examples: Don't wait for user to enter password
The example user setup script calls adduser which in turn calls passwd
to ask the user for a password; which waits indefinitely for user
input. Since we set the password noninteractively, disable adduser
from asking the user to set a password.

Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006823
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2022-10-27 10:45:10 +01:00
Christopher Obbard
e9390903ae doc: man: Refresh man page
The readme got updated, so refresh the man page

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
2020-12-03 11:28:13 +01:00
Andrej Shadura
3998634802 Don’t indent the NAME section, this results in incorrectly formatted manpage
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
2020-12-02 14:26:05 +01:00
Daniel Stone
e5129ac453 doc/examples: Actually use suite variable
We declared the suite variable (defaulting to stretch), but only used it
for the filename and not for building the OS, which took a hardcoded
suite name.

Use the suite variable in OS building, changing the default to buster to
match the previous hard-coding.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2019-04-16 15:48:28 +02:00
Héctor Orón Martínez
f8d7e4804f sync manpage from README.md
Signed-off-by: Héctor Orón Martínez <hector.oron@collabora.co.uk>
2018-11-09 14:51:51 +01:00
Peter Senna Tschudin
d5de0f1f46 Add support to environment variables
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>
2018-11-05 09:28:46 +01:00
Ana Guerrero Lopez
a1009c0e20 doc/man: add manpage
The manpage is created with a quick&dirty script create_manpage.sh
from the README.md

Signed-off-by: Ana Guerrero Lopez <ana.guerrero@collabora.com>
2018-06-14 10:53:25 +02:00
Ana Guerrero Lopez
cd486ecb6d Add doc/examples with an example
Signed-off-by: Ana Guerrero Lopez <ana.guerrero@collabora.com>
2018-06-14 10:53:25 +02:00