Builds are provided on openSUSE build servic for openSUSE, SUSE Linux Entreprise, CentOS, Fedora, Debian and Ubuntu. The repositories are listed as experimental on https://software.opensuse.org/package/obs-to-maven?search_term=obs-to-maven
To install from sources, run:
pip install -e .
This tool runs only on Python 3... all the listed dependencies need to be installed for it.
- PyYAML
- rpm
- cpio
Here is a sample configuration file:
url: https://download.opensuse.org/repositories
group: suse
repositories:
Leap:
project: openSUSE:Leap:15.4
repository: standard
Uyuni:
project: systemsmanagement:Uyuni:Master
repository: openSUSE_Leap_15.4
Leap_sle:
url: https://download.opensuse.org/update/leap/15.4/sle
artifacts:
- artifact: salt-netapi-client
repository: Uyuni
- artifact: asm
package: asm3
jar: asm3-all
repository: Leap
- artifact: google-gson
package: jakarta-commons-digester
jar: gson.jar
group: sle
repository: Leap_sle
The url
property is optional and defaults to https://download.opensuse.org/repositories
, but can be used to get packages from another download site.
The url
is used together with the project
and repository
values for each repository to construct the full repository URL.
The repositories
key contains a dictionary of repository definitions.
The name of those repositories is used in the artifacts.
A repository can either be specified by its project/repository name or a custom url
parameter that must be a full URL pointing to the repository.
If both are provided, the custom url
is used.
The artifacts
list describes all the artifacts to create in the maven repository.
The properties of each artifact help locating the RPM and jar files in OBS. The following properties are mandatory:
artifact
: the name of the artifact in the maven repositoryrepository
: one of the item defined inrepositories
, tells where to look for the rpm
Since there is no silver bullet to find the RPM or the JAR file in it, there are some additional optional properties to provide hints:
package
: the name of the package in OBS. Note that this is different from the RPM name. By default, the artifact name is used and thedemo
,test
,manual
,examples
andjavadoc
rpms are discarded. If the pattern includes the version match, terminate it with-
to avoid the-[0-9]
pattern to be appended.arch
: defaults tonoarch
, but this may need to be overriden in some cases.rpm
: a regular expression to match the file name of the RPM deprecatedjar
: a regular expression to match the non symlinked jar base name.
As a maven repository needs a group ID for each artifact, this can be configured at several levels.
Either at the root of the YAML structure in a group
attribute or overridden by a group
attribute in each artifact definition.
suse
is the default group if nothing is configured.
- Create a git tag like
git tag -s -m "obs-to-maven release 1.1.1" v1.1.1
- Create a release in github
- Branch the package in OBS
osc bco systemsmanagement:Uyuni:Utils/obs-to-maven
- Run
/path/to/prepare_obs.sh 1.1.1
from the OBS branch checkout, write the changelog andosc ci
- Submit the changes
osc sr