openSUSE:OBS to Git

Jump to: navigation, search

OBS to Git migration effort

This page is about the migration effort and how it works. To learn about the new git packaging workflow visit the dedicated page.


We are moving new development from OBS based projects to Git based projects. This is a work-in-progress. The goal is to migrate openSUSE:Factory to Git for source management. The first steps will involve migrating 265 devel projects from having sources in OBS to Git. Devel projects will be migrated one at a time.

When devel projects are migrated, the source contributions to the devel project will change. You will have to submit changes via either Gitea PR or git push, if you have repo access.

openSUSE:Factory contribution method will not change. It will continue to rely on osc sr devel_project/package openSUSE:Factory for now.

What will get migrated

We are moving source management to Git. We are not moving the build out of OBS — projects will continue to be built in OBS.

  1. Maintainership information will be retained in the Git-based devel projects. Initially, we will give maintainers package and project rights.
  2. Each devel project listed below will be assigned an organization name that matches relatively closely what we have in OBS.
  3. Package data and history will be imported using git-importer.

We will continue to use OBS devel projects to build these sources.

Where does the project go and how can I update packages?

The project will be the _ObsPrj repository in the devel organization. It will be created and automatically updated when you push/merge changes to the main branch of the package. Every repository will be automatically added to _ObsPrj. _ObsPrj will be kept up-to-date with the current state of packages in the organization.

OBS will then point to _ObsPrj via the <scmsync> mechanism, and build the latest state in the OBS devel project. Binaries will remain in OBS. Sources will be in Git.

How to create a new package?

  • Create a new repository in your home.
  • Add a .gitattributes files (to make git-LFS work).
  • Add a spec file and build sources as normal. Make sure to track large sources in Git LFS.
  • Transfer the ownership of the repository to the devel project organization of your choice. _ObsPrj will automatically be updated.

To make this process easier we recommend that you use the new_package repository as a template. It already contains a .gitattributes and .gitignore file.

One way to initialize a new package is obs-git-init. It is part of Factory and openSUSE:Tools project for all distributions. It can also be used to update existing git repositories with current recommended configuration.

When you want to initialize a new package you go to "New Repository" and select as template pool/new_package. This will add the necessary .gitattributes. You can also access it directly through https://src.opensuse.org/pool/new_package/src/branch/main/.gitattributes

When will my project be migrated?

To be determined. The less complicated a project, the faster it is expected to be migrated.

The ideal goal here is to finish the devel project migration in March 2025, but the possibility of going into April is very likely.

How will this happen for my devel project?

A day or two before migration, you will receive an email that your project will be migrated. After receiving this email, please do not open any new submit requests to the devel project and merge any requests that are pending as soon as possible. The same applies to new osc commit actions. There is a possibility that you will merge something that has already been imported and then switching to Git will "revert" your merge.

After migration, the changes can no longer be accepted in OBS and the accept action must be performed in/with Git.

What to do when this happens for my devel project?

1. Sign into src.opensuse.org with your OBS account. Once you have signed in, we can add you automatically as owner to the new devel project.

2. Add SSH key to your Profile in Gitea. This is key to make sure you can continue to contribute to the devel project

3. Please merge any pending SR that could be opened to your package and project. After the sources are migrated to Git, the pending requests can no longer be merged directly in OBS.

4. Briefly check that your packages are in same state as in OBS and there's nothing grossly wrong with the imported package(s)

FAQ

I'm using OBS links ....

OBS links will no longer work in Git based packages. If you have a package that has multiple spec files to build different variants of a package, these will have to be migrated to using _multibuild instead.

If you are using OBS links to link to Git based packages/projects from a regular OBS package, (eg. linkpac to devel project in your home), those mechanisms continue to function as today. This only affects git based packages and git based projects.

How can I invoke osc branch from a devel project to my own project and build many packages there?

You can do this manually via git fork and referencing the packages in OBS via scmsync. The automatic procedure for this is a work in progress. See this ticket.

What should I do now to prepare?

  • Go to src.opensuse.org
  • Login with your OBS/Bugzilla credentials
  • Go to Settings -> SSH/GPG keys
  • Add your SSH key

so you'll be able to have push access to your repositories.

Gitea SSH keys were posted to the factory ML and will be added to the front page of src.opensuse.org too. They are:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFKNThLRPznU5Io1KrAYHmYpaoLQEMGM9nwpKyYQCkPx
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDJ8V51MVIFUkQqQOdHwC3SP9NPqp1ZWYoEbcjvZ7HhSFi2XF8ALo/h1Mk+q8kT2O75/goeTsKFbcU8zrYFeOh0=
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCkVeXePin0haffC085V2L0jvILfwbB2Mt1fpVe21QAOcWNM+/jOC5RwtWweV/LigHImB39/KvkuPa9yLoDf+eLhdZQckSSauRfDjxtlKeFLPrfJKSA0XeVJT3kJcOvDT/3ANFhYeBbAUBTAeQt5bi2hHC1twMPbaaEdJ2jiMaIBztFf6aE9K58uoS+7Y2tTv87Mv/7lqoBW6BFMoDmjQFWgjik6ZMCvIM/7bj7AgqHk/rjmr5zKS4ag5wtHtYLm1L3LBmHdj7d0VFsOpPQexIOEnnjzKqlwmAxT6eYJ/t3qgBlT8KRfshBFgEuUZ5GJOC7TOne4PfB0bboPMZzIRo3WE9dPGRR8kAIme8XqhFbmjdJ+WsTjg0Lj+415tIbyRQoNkLtawrJxozvevs6wFEFcA/YG6o03Z577tiLT3WxOguCcD5vrALH48SyZb8jDUtcVgTWMW0to/n63S8JGUNyF7Bkw9HQWUx+GO1cv2GNzKpk22KS5dlNUVGE9E/7Ydc=

Will osc maintainership and related commands cease working?

Correct.

How to submit from devel project to Factory?

The same as before:

osc sr devel_project/package openSUSE:Factory

This process does not change until Factory is also migrated to Git.

What process will keep the _PrjGit and the repositories in sync?

This will initially be done via a bot, workflow-direct. The sources can be found in the autogits repo.

Can I run these bots myself?

Yes.

Is there more documentation?

There is the Git Packaging Workflow and a summary written by Jan on how to work with the openSUSE git backend.

Can I still have _service with server side services?

Yes, but these service runs will not be reflected in the Git sources. Packages that use this today, will not have the in their histories as they cannot be built as-is anyway since checking in such a source will get the files overwritten.

I don't want to type git clone gitea@src.opensuse.org:foo/bar all the time

Add the following to your ~/.gitconfig and then you can type git clone soo:foo/bar

   [url "gitea@src.opensuse.org:"]
       insteadOf = soo:


Codestream Project Status table

Products who's sources are now in Git are below.

Products projects to Git Migration Status
Product OBS project GIT project pool branch Git managed
Factory openSUSE:Factory openSUSE/Factory factory No
Leap-16.0 openSUSE:Leap:16.0 openSUSE/Leap leap-16.0 Yes
Backports openSUSE:Backports:SLE-16.0 products/PackageHub leap-16.0 Yes
SLES-16.0 SUSE:SLFO:1.2 products/SLFO slfo-1.2 Yes


Devel Project Status table

This is now tracked in Google Sheets. No login required.

https://docs.google.com/spreadsheets/d/1HFpQvD95RiJhDa27jXfucVsYWQoTkKmJqWL7P7BPMN0/