-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create an osc container for package maintenance
- Loading branch information
Showing
4 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Packaging Container | ||
|
||
This is the openSUSE packaging container image, it includes all the necessary | ||
software to create and modify packages on the [Open Build | ||
Service](https://build.opensuse.org/) using | ||
[osc](https://github.com/openSUSE/osc/). | ||
|
||
|
||
## How to use this container image | ||
|
||
This container image is intended for interactive usage with your `.oscrc` and | ||
the osc cookiejar mounted into the container: | ||
|
||
```ShellSession | ||
# podman run --rm -it \ | ||
-v ~/.config/osc/oscrc:/root/.config/osc/oscrc:ro,z \ | ||
-v ~/.local/state/osc/cookiejar:/root/.local/state/osc/cookiejar:rw,z \ | ||
{{ image.reference }} | ||
``` | ||
|
||
The above command launches an interactive shell where your local osc config will | ||
be used. You can then proceed to checkout packages, perform modifications and | ||
send submissions to OBS. | ||
|
||
To work on an already checked out package, mount the current working directory | ||
as well: | ||
|
||
```ShellSession | ||
# podman run --rm -it \ | ||
-v ~/.config/osc/oscrc:/root/.config/osc/oscrc:ro,z \ | ||
-v ~/.local/state/osc/cookiejar:/root/.local/state/osc/cookiejar:z \ | ||
-v .:/root/osc-workdir:z \ | ||
{{ image.reference }} | ||
``` | ||
|
||
### Connecting to build.suse.de | ||
|
||
build.suse.de uses a ssh based authentication and thus requires additional | ||
resources to be available in the container: | ||
|
||
```ShellSession | ||
# podman run --rm -it \ | ||
-v ~/.config/osc/oscrc:/root/.config/osc/oscrc:ro,z \ | ||
-v ~/.local/state/osc/cookiejar:/root/.local/state/osc/cookiejar:z \ | ||
-v /etc/ssl/ca-bundle.pem:/etc/ssl/ca-bundle.pem:ro,z \ | ||
-v $SSH_AUTH_SOCK:/run/user/0/ssh-agent.socket:z \ | ||
-e SSH_AUTH_SOCK=/var/run/user/0/ssh-agent.socket:z \ | ||
-v "$PWD":/root/osc-workdir:z \ | ||
{{ image.reference }} | ||
``` | ||
|
||
|
||
## Limitations | ||
|
||
- It is currently not possible to build packages in a container. | ||
|
||
|
||
## Volumes | ||
|
||
The container image is preconfigured to put `/var/tmp` into a volume. This | ||
directory is used by `osc` to store the buildroot and the package cache. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -e /root/.config/osc/oscrc ]]; then | ||
cat << EOF | ||
This container is expected to be launched with your oscrc mounted to | ||
/root/.config/osc/oscrc | ||
Please consult the README or the label 'run' for the full invocation. | ||
EOF | ||
fi | ||
|
||
|
||
exec "$@" |