|
| 1 | +--- |
| 2 | +title: in-obs |
| 3 | +date: 2024-06-27 |
| 4 | +sidebar_position: 5 |
| 5 | +--- |
| 6 | + |
| 7 | +# `packit build in-obs` |
| 8 | + |
| 9 | +Submit a build of the present content in the upstream or local repository to [OBS](https://build.opensuse.org/). |
| 10 | + |
| 11 | +## Requirements |
| 12 | + |
| 13 | +* SPEC file for the project placed in the repository. |
| 14 | +* Packit config file placed in the repository. |
| 15 | +* OBS user account and password needs to be configured in osc configuration file ~/.config/osc/oscrc. |
| 16 | + This can be done by running `osc`. |
| 17 | + |
| 18 | + |
| 19 | +## Tutorial |
| 20 | + |
| 21 | +1. [Place a config file for packit in the root of your upstream repository.](/docs/configuration/) |
| 22 | + |
| 23 | +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. |
| 24 | + |
| 25 | + ``` |
| 26 | + $ cd my/ustream/project/ |
| 27 | + $ packit build in-obs --project <project_name> |
| 28 | + ``` |
| 29 | +## Help |
| 30 | +
|
| 31 | + Usage: packit build in-obs [OPTIONS] [PATH_OR_URL] |
| 32 | + |
| 33 | + Build selected project in OBS |
| 34 | + |
| 35 | + Before Running this command, your opensuse user account and password needs |
| 36 | + to be configured in osc configuration file ~/.config/osc/oscrc. This can be |
| 37 | + done by running `osc`. |
| 38 | + |
| 39 | + Options: |
| 40 | + --owner TEXT OBS user, owner of the project. (defaults to the |
| 41 | + username from the oscrc) |
| 42 | + --project TEXT Project name to build in. It will be created if does |
| 43 | + not exist. It defaults to home:$owner:packit:$pkg |
| 44 | + --targets TEXT Comma separated list of chroots to build in. (defaults |
| 45 | + to 'fedora-rawhide-x86_64') |
| 46 | + --description TEXT Description of the project to build in. |
| 47 | + --upstream-ref TEXT Git ref of the last upstream commit in the current |
| 48 | + branch from which packit should generate patches (this |
| 49 | + option implies the repository is source-git). |
| 50 | + --wait / --no-wait Wait for the build to finish |
| 51 | + -p, --package TEXT Package to build, if more than one available, like in a |
| 52 | + monorepo configuration. Use it multiple times to select |
| 53 | + multiple packages.Defaults to all the packages listed |
| 54 | + inside the config. |
| 55 | + -h, --help Show this message and exit. |
0 commit comments