A container to help packaging using AI
This container provides a setup of opencode to do packaging tasks.
The primary focus is atm git based package sources of rpms for openSUSE and SLFO.
However, it can be also extended to other distributions and package formats later.
The general setup is that you should share a work directory with the container. That way the AI does not need any credentials and can work with the public, but read only package git repositories on https://src.opensuse.org . It can be used to update package sources or to create further packages. Either single ones or entire stacks.
Pushing any changes needs to happen outside of the container after review. This is done by the maintainer using his credentials.
Running the container
podman run --privileged -ti --network=host -v $HOME/opencode:/opencode
--rm registry.opensuse.org/home/adriansuse/opencode/containers/opensuse/opencode-packaging
The privileged switch is required to run chroot builds inside of the container.
Provide own opencode configuration
Place a opencode.json configuration in your work dir, for example to define own AI providers. Extend the podman call with
-e OPENCODE_CONFIG=/opencode/YOUR_OPENCODE_JSON_FILE
Work with the packaging agent
The packaging agent has skills to help with your packaging sources. It runs by default, but you may want to switch to normal "build" or "plan" agents when you want to work on your project itself and not the packaging.
You can ask opencode for example
"Clone the MY_PACKAGE_NAME package and make a version update".
opencode will clone from https://src.opensuse.org/pool/MY_PACKAGE_NAME by default, look for newer sources, update the package and also run test builds using the build script.
By default it will get factory sources and also build for factory.