From 615487a784adae9fecc432f25dd6755a94e99b61 Mon Sep 17 00:00:00 2001 From: rxbryan Date: Wed, 26 Jun 2024 18:38:34 +0100 Subject: [PATCH 1/3] feat: add docs for build in-obs Related to packit/packit#2343 --- authors.yml | 6 ++++++ docs/cli/build/in-obs.md | 28 ++++++++++++++++++++++++++++ docs/cli/build/index.md | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 docs/cli/build/in-obs.md diff --git a/authors.yml b/authors.yml index 49d6b3b415..165922d385 100644 --- a/authors.yml +++ b/authors.yml @@ -56,3 +56,9 @@ venefilyn: email: freya@venefilyn.se url: https://github.com/Venefilyn image_url: https://github.com/Venefilyn.png + +rxbryan: + name: Bryan Elee + email: rxbryn@gmail.com + url: https://github.com/rxbryan + image_url: https://github.com/rxbryan.png diff --git a/docs/cli/build/in-obs.md b/docs/cli/build/in-obs.md new file mode 100644 index 0000000000..126bed7765 --- /dev/null +++ b/docs/cli/build/in-obs.md @@ -0,0 +1,28 @@ +--- +title: in-obs +date: 2024-06-27 +sidebar_position: 5 +--- + +# `packit build in-obs` + +Submit a build of the present content in the upstream or local repository to [OBS](https://build.opensuse.org/). + +## Requirements + +* SPEC file for the project placed in the repository. +* Packit config file placed in the repository. + + + +## Tutorial + +1. [Place a config file for packit in the root of your upstream repository.](/docs/configuration/) + +2. The command below creates a tarball (archive) of your repository and commits it along with the spec file to a package with a name corresponding to your upstream project on [OBS](https://build.opensuse.org/). The project defaults to home:$username:packit. Running packit build in-obs a second time creates a new commit in that package. + + ``` + $ cd my/ustream/project/ + $ packit build in-obs --project + ``` + diff --git a/docs/cli/build/index.md b/docs/cli/build/index.md index 5b1ca76234..ffbd13d51e 100644 --- a/docs/cli/build/index.md +++ b/docs/cli/build/index.md @@ -16,6 +16,7 @@ Subcommand that groups all RPM build related commands together. * [`in-mock`](/docs/cli/build/in-mock) * [`in-copr`](/docs/cli/build/in-copr) * [`in-koji`](/docs/cli/build/in-koji) +* [`in-obs`](/docs/cli/build/in-obs) * [`in-image-builder`](/docs/cli/build/in-image-builder) ## Help @@ -32,5 +33,6 @@ Subcommand that groups all RPM build related commands together. in-copr Build selected upstream project in Copr. in-image-builder Create a VM image in Image Builder. in-koji Build selected upstream project in Fedora. + in-obs Build selected repository in Open Build Service in-mock Build RPMs in mock using content of the upstream repository. locally Create RPMs using content of the upstream repository. From b268779aea26d8e528ec3d8eb9ba45b11dff14e1 Mon Sep 17 00:00:00 2001 From: Frantisek Lachman Date: Sat, 1 Feb 2025 10:54:09 +0100 Subject: [PATCH 2/3] Add help message section so it can be automatically regenerated Signed-off-by: Frantisek Lachman --- docs/cli/build/in-obs.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/cli/build/in-obs.md b/docs/cli/build/in-obs.md index 126bed7765..01c4252170 100644 --- a/docs/cli/build/in-obs.md +++ b/docs/cli/build/in-obs.md @@ -25,4 +25,30 @@ Submit a build of the present content in the upstream or local repository to [OB $ cd my/ustream/project/ $ packit build in-obs --project ``` - +## Help + + Usage: packit build in-obs [OPTIONS] [PATH_OR_URL] + + Build selected project in OBS + + Before Running this command, your opensuse user account and password needs + to be configured in osc configuration file ~/.config/osc/oscrc. This can be + done by running `osc`. + + Options: + --owner TEXT OBS user, owner of the project. (defaults to the + username from the oscrc) + --project TEXT Project name to build in. It will be created if does + not exist. It defaults to home:$owner:packit:$pkg + --targets TEXT Comma separated list of chroots to build in. (defaults + to 'fedora-rawhide-x86_64') + --description TEXT Description of the project to build in. + --upstream-ref TEXT Git ref of the last upstream commit in the current + branch from which packit should generate patches (this + option implies the repository is source-git). + --wait / --no-wait Wait for the build to finish + -p, --package TEXT Package to build, if more than one available, like in a + monorepo configuration. Use it multiple times to select + multiple packages.Defaults to all the packages listed + inside the config. + -h, --help Show this message and exit. From 0c90191da6a5d3d40a2b204046a54b6966655606 Mon Sep 17 00:00:00 2001 From: Frantisek Lachman Date: Sat, 1 Feb 2025 10:57:11 +0100 Subject: [PATCH 3/3] Mention osc setup for obs builds Signed-off-by: Frantisek Lachman --- docs/cli/build/in-obs.md | 47 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/docs/cli/build/in-obs.md b/docs/cli/build/in-obs.md index 01c4252170..9ce62ed2c7 100644 --- a/docs/cli/build/in-obs.md +++ b/docs/cli/build/in-obs.md @@ -12,7 +12,8 @@ Submit a build of the present content in the upstream or local repository to [OB * SPEC file for the project placed in the repository. * Packit config file placed in the repository. - +* OBS user account and password needs to be configured in osc configuration file ~/.config/osc/oscrc. + This can be done by running `osc`. ## Tutorial @@ -28,27 +29,27 @@ Submit a build of the present content in the upstream or local repository to [OB ## Help Usage: packit build in-obs [OPTIONS] [PATH_OR_URL] - - Build selected project in OBS - Before Running this command, your opensuse user account and password needs - to be configured in osc configuration file ~/.config/osc/oscrc. This can be - done by running `osc`. + Build selected project in OBS + + Before Running this command, your opensuse user account and password needs + to be configured in osc configuration file ~/.config/osc/oscrc. This can be + done by running `osc`. - Options: - --owner TEXT OBS user, owner of the project. (defaults to the - username from the oscrc) - --project TEXT Project name to build in. It will be created if does - not exist. It defaults to home:$owner:packit:$pkg - --targets TEXT Comma separated list of chroots to build in. (defaults - to 'fedora-rawhide-x86_64') - --description TEXT Description of the project to build in. - --upstream-ref TEXT Git ref of the last upstream commit in the current - branch from which packit should generate patches (this - option implies the repository is source-git). - --wait / --no-wait Wait for the build to finish - -p, --package TEXT Package to build, if more than one available, like in a - monorepo configuration. Use it multiple times to select - multiple packages.Defaults to all the packages listed - inside the config. - -h, --help Show this message and exit. + Options: + --owner TEXT OBS user, owner of the project. (defaults to the + username from the oscrc) + --project TEXT Project name to build in. It will be created if does + not exist. It defaults to home:$owner:packit:$pkg + --targets TEXT Comma separated list of chroots to build in. (defaults + to 'fedora-rawhide-x86_64') + --description TEXT Description of the project to build in. + --upstream-ref TEXT Git ref of the last upstream commit in the current + branch from which packit should generate patches (this + option implies the repository is source-git). + --wait / --no-wait Wait for the build to finish + -p, --package TEXT Package to build, if more than one available, like in a + monorepo configuration. Use it multiple times to select + multiple packages.Defaults to all the packages listed + inside the config. + -h, --help Show this message and exit.