Processo de novo pacote para novos colaboradores

Esta é uma versão longa do processo de novo pacote, contendo mais detalhes para que novos colaboradores possam acompanhá-lo mais facilmente. Além disso, a etapa obrigatória depatrocínio está incluída.

Instalar ferramentas de empacotador

Verificar se o pacote já existe

Se algum software útil ainda não estiver incluído no Fedora, você poderá enviá-lo como um novo pacote. O pacote que você está enviando pode ser de qualquer projeto livre e de código aberto.

Antes de criar seu pacote, certifique-se de que o software ainda não esteja no repositório Fedora:

Criar um pacote

Enviar seu pacote

Envie seus arquivos SRPM e SPEC para a Internet em algum lugar para que outros possam obtê-los. Isso pode ser acessível em qualquer lugar por meio de uma URL, mas é importante que os arquivos sejam diretamente acessíveis, e não escondidos atrás de algum serviço que faça as pessoas esperarem para baixar coisas ou redirecionar através de páginas publicitárias.

Se você deseja disponibilizar construções ad-hoc para os usuários enquanto coloca o pacote nos repositórios oficiais, considere usar o Copr. É um sistema de construção automatizado e leve que pode criar repositórios usando o SRPM que você carrega. Você pode usar este espaço Copr para direcionar os revisores para seu src.rpm e especificações.

Criar sua solicitação de revisão

  • Antes de enviar sua solicitação, certifique-se de que não haja uma solicitação anterior para o mesmo pacote. Há uma caixa de pesquisa conveniente na página de status de revisão de pacotes.

  • Certifique-se de colocar o nome do pacote (excluindo números de versão e lançamento) no campo Review Summary, junto com um breve resumo do que é o pacote.

  • Coloque uma descrição do seu pacote (normalmente, pode ser a mesma coisa que você colocou na especificação %description) no campo Review Description. Inclua as URLs de seus arquivos SRPM e SPEC.

  • Explique no ticket que este é seu primeiro pacote e você precisa de um patrocinador. Além disso, inclua qualquer informação que possa ajudar os possíveis patrocinadores. Se você esteve ativo em outro trabalho de revisão, inclua links. Se você é o mantenedor original, não se esqueça de dizer isso.

  • Para ganhar pontos extras, inclua um link para uma construção de koji bem-sucedida para que todos saibam que você fez todo o dever de casa.

O processo de revisão é descrito em detalhes na página Processo de Revisão de Pacote.

Informar ao upstream

O Projeto Fedora prefere se Manter próximo aos Projetos Upstream. Informe aos desenvolvedores que você está empacotando o software. Você pode fazer isso enviando um e-mail apresentando-se e apontando a solicitação de revisão. Isso prepara o terreno para conversas futuras. Eles geralmente anunciam o fato de que seu software agora faz parte do Fedora ou podem querer lhe informar sobre bugs importantes na versão existente, roteiros futuros, etc.

Fique atento aos feedbacks

Acompanhe o relatório do Bugzilla para seu primeiro pacote. Você deverá receber notificações de alterações por e-mail. Corrija quaisquer questões bloqueantes apontadas pelo(s) revisor(es).

Obtenha patrocínio

Quando o pacote for dado como APPROVED pelo revisor, você deverá obter separadamente o patrocínio de membro para fazer o check-in e construir seu pacote. O patrocínio não é automático e pode exigir que você participe de outras formas para demonstrar sua compreensão das diretrizes de empacotamento. A chave para ser patrocinado é convencer um membro patrocinador existente de que você entende e segue as diretrizes e processos do projeto.

Consulte Como ser patrocinado para o grupo packager para obter mais informações sobre o processo de se tornar patrocinado.

Seu patrocinador pode adicioná-lo ao grupo packager. Você deverá receber um e-mail de confirmação do seu patrocínio.

Add Package to Source Code Management (SCM) system and Set Owner

Before proceeding, please sync your account by login on Fedora Package Sources using your FAS credentials.

If you are becoming a maintainer for a new package, instead of being a co-maintainer, use fedpkg to request a new git repository for your package. The sub-command is fedpkg request-repo which includes help text for setting up the Pagure API token the command requires. When creating your API-key choose toggle-all for the ACLs. You must specify the repository name and review bug number. For example:

fedpkg request-repo python-prometheus_client 1590452

The request will be reviewed and processed automatically. After processing, you will have access to commit and build the package. In case the automation does not work, you can report the problem to Toddlers issue tracker.

fedpkg request-repo only creates a branch for Rawhide. To request branches for other Fedora releases, use fedpkg request-branch:

  1. fedpkg request-branch --repo python-prometheus_client f38

You will need to run this for each non-rawhide branch.
If you wish, you can also use the `--all-releases` flag
to request branches for all current Fedora releases.

[#check_out_the_distgit_repository]
== [[check_out_the_module]] Check out the distgit repository

You _could_ check out your distgit repository now, but before doing that, consider doing `mkdir ~/fedora-scm ; cd ~/fedora-scm` — that way, all your files are inside a single directory. Also, run `ssh-add`, so that you won't have to keep typing in your key password.

Now you are ready to checkout your distgit repository from the SCM:
fedpkg clone your-package
[#test_your_package]
== Test Your Package

Refer to https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds[Using Mock to test package builds] and xref:Using_the_Koji_Build_System.adoc#scratch_builds[Koji Scratch Builds] for more information on testing your package. Mock uses your local system while Koji command line tool uses the Fedora build system server.

[#import_commit_and_build_your_package]
== Import, commit, and build your package

Now that you've checked out your (empty) distgit repository with `fedpkg`, cd into the repository's main branch:

cd <packagename>

Run fedpkg to import the contents of the SRPM into the SCM:

fedpkg import PATH_TO_SRPM


Review Changes, press 'q' to stop; Revert with: git reset --hard HEAD git commit -m "Initial import (fedora#XXXXXX)." git push fedpkg build

Obviously, replace `PATH_TO_SRPM` with the full path
(not URL)
to your approved SRPM,
and `XXXXXX` with the package review bug number.

If your package is using _autochangelog_, writing the bug number as specified
will make the Fedora update system automatically close the bug when your package is
submitted to Rawhide stable repository.

This imports into, commits, and builds only the *main*
(xref:releases::rawhide.adoc[Rawhide])
branch.

If the push fails with this kind of message:

W access for why DENIED to YOUR_ACCOUNT fatal: The remote end hung up unexpectedly Could not push: Command '['git', 'push']' returned non-zero exit status 128

Then you don't have the necessary rights to modify that package branch.
View `\https://src.fedoraproject.org/rpms/PACKAGE_NAME` to request those rights.

For more information on using the Fedora package maintenance system,
see the xref:Package_Maintenance_Guide.adoc[Package maintenance guide].

[#update_your_branches]
== Update Your Branches (if desired)

Branches are `f#` (formerly `F-#` and before that `FC-#`), `main`, etc. So `f` is the branch for Fedora.

To switch to a branch first:

fedpkg switch-branch BRANCH

(e.g. `f{MAJOROSVER}`)

Merge the initial commit from main (Rawhide),
creating an identical commit in the branch:

git merge rawhide

Push the changes to the server:

git push

Build the package:

fedpkg build

If there is another branch to work with
repeat _To switch to a branch_
and import and commit to each branch.

If everything goes well,
it should queue up your branch for building,
the package will cleanly build,
and you're done!

If it fails to build,
the build system will send you an email
to report the failure
and show you to the logs.
Commit any needed changes to git,
bump the SPEC release number,
and request a new build.

[#submit_package_as_update_in_bodhi]
=== Submit Package as Update in Bodhi

The Fedora update system called https://bodhi.fedoraproject.org[Bodhi] is used for pushing updates, classifying packages etc. You do not need to submit updates for Rawhide (main) manually because these are automatically created for you when the build completes. For all other branches, you must manually push updates for all builds that you would like to make available to users.

You can push an update using Bodhi via the command line using this in each branch:

fedpkg update

It is often easier to complete builds for all your branches
and then push a single update using the https://bodhi.fedoraproject.org/updates/new[Bodhi web interface].
Bodhi is smart enough to split your update into individual updates,
one for each Fedora release branch.

You can also select multiple builds from different packages
to include in a single update using the web interface.
This is useful when you would like to push linked builds,
for example: an application package and its dependencies
that are necessary for it to run correctly.

Please see the xref:Package_Update_Guide.adoc[Package Update Guide] for more details.

[#make_the_package_available_in_comps_files]
== Make the package available in "comps" files

If appropriate for the package, make it available in "comps" files so that it can be selected during installation and included in dnf package group operations. See https://fedoraproject.org/wiki/How_to_use_and_edit_comps.xml_for_package_groups?rd=PackageMaintainers/CompsXml[How to use and edit comps.xml for package groups] for more info.

[#watch_for_updates]
=== Watch for updates

Fedora has the infrastructure available for monitoring new upstream releases of the software you are packaging. Refer to xref:Upstream_Release_Monitoring.adoc[Upstream Release Monitoring] for more details.