From Fedora Project Wiki

Revision as of 01:52, 19 February 2018 by Lobocode (talk | contribs) (Terminando de traduzir do Inglês para o Português do Brasil pois, a wiki está com a tradução incompleta.)

Contribuições

Contribuições
Esta é apenas uma sugestão para papeis de contribuição. Apenas sua imaginação estabelece os limites.


OS Developer

Como se juntar ao time de empacotamento Fedora?

Então, voccê decidiu se juntar ao time de empacotamento do Projeto Fedora? Este guia irá conduzi-lo a sua primeira submissão de pacote.

Tornando-se um Mantenedor de Pacotes Fedora

Leia as Diretrizes

Se você nao sabe como criar um pacote RPM, consulte o tutorial em How_to_create_a_GNU_Hello_RPM_package ou mais avançado e muito mais detalhado how to create an RPM package.

Leia as Diretrizes de Empacotamento e Diretrizes para Nomear Pacotes .

Você precisa se familiarizar com estas diretrizes. Elas governam toda submissão de pacotes. Se você tver duvidas pergunte na lista Fedora de Empacotamento.

Criando uma conta no Bugzilla

Certifique-se de que você tem uma conta no R Red Hat Bugzilla.
ATENÇÃO: E imprescindivel ter uma conta Fedora Account System, leia abaixo para mais informações.

O endereço de email que você usar em sua conta do bugzzila deve ser o mesmo endereço de email de que você usa no Fedora Account System e todas as coisas relacinadas ao Empacotamento Fedora.

Não use seu endereço @fedoraproject.org se você já possui um.
Você não deve usar seu endereço @fedoraproject.org no Bugzilla, because you will not get your bugzilla privileges once you are sponsored. Se você quiser usar seu endereço @fedoraproject.org, você pode solicitar em Fedora Infrastructure Ticket System para que um administrador possa substituir manualmente o endereço Bugzilla conectado com sua conda Fedora.

Criando uma conta no Fedora

Crie uma conta no Fedora Account System (esta não é a mesma conta que você registrou no bugzilla)

  1. Visite o sistema de contas da comunidade Fedora: https://admin.fedoraproject.org/accounts/
  2. Clique em 'New account' e preencha os espaços em branco. Observe que o e-mail usado no FAS, deve ser o mesmo que você se cadastrou bugzilla. Isso permite que o sistema vincule os privilégios entre as duas contas.
  3. Depois de criar sua conta, certifique-se de assinar o CLA (se você clicar no link "My Account" no canto superior direito, você verá o CLA: CLA Done).
  4. Você também precisará carregar uma chave pública SSH RSA, e usar uma chave privada correspondente para acessar as máquinas Fedora via SSH. Caso tenha dúvidas, poderá consultar sobre este procedimento em here.

Observação: Dentro do FAS - https://admin.fedoraproject.org/accounts/, ao logar-se, você poderá mudar o País, e lingua para o português do Brasil se desejar.

Junte-se às listas de discussão importantes

Você pode considerar envolver-se à lista de discussão do Fedora devel-announce. É uma lista de anuncios com poucas postagens onde são publicadas importantes informações de desenvolvimento.

Você pode considerar envolver-se à lista de discussão do Fedora devel, onde são realizadas discussões sobre o desenvolvimento do Fedora. Diferentemente da lista de discussões anterior, esta é mais movimentada.

Considere também a package-announce - lista de discussão que emite notificações sobre tudo o que compete à pacotes no repositório do Fedora. Esta é uma lista de discussão também bastante movimentada.

Outra lista de discussão que você poderá considerar (pelo menos para visualizar os arquivos) é packaging. Esta é a lista de discussão da Fedora Packaging Committee, que determinam as diretrizes oficiais de pacotes para projetos do Fedora.

Ensure the software you wish to package is suitable

Note that there's other methods for getting sponsored into the packager group than submitting a new package. check the How to get sponsored page for more info.

The package you are submitting can be of any free and open source project that is not already packaged in Fedora. Before creating your package, make sure that the software is not already in the Fedora repository, or waiting for review.

Entenda as suas responsabilidades

Software components included in Fedora need to be maintained actively, and bugs - especially security issues - need to be fixed in a timely manner. As a Fedora package maintainer, it is your primary responsibility to ensure this. We encourage you to get co-maintainers and seek the help of the Fedora community via the development mailing list whenever needed.

Read Other Submissions

Read some other package submissions to learn about packaging and gain familiarity with the process and requirements.

One way of doing this is to join the package-review mailing list;All comments on Fedora package reviews are sent to this (read-only from your point of view) list.

Configurando seu Git

First thing to do when you set up Fedora packaging is to configure your user name and email address for Git. These are linked in each commit you do to Fedora packages.

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

Install the client tools (Koji) and set up your certificate

To build Packages for the Fedora Collection or EPEL in the Fedora build system you need Koji.

The fedora-packager package provides tools to help you setup and work with fedora; it will bring in everything necessary for general packaging work. Run the following as root:

yum install fedora-packager

After installation run the following as your user (not root) to setup your certificates and koji client configuration:

fedora-packager-setup
Certificate Expiration
The certificate this generates will expire after 6 months. Then you have to request another one by re-running fedora-packager-setup. Also every time you request a new certificate, the old one is invalidated and cannot be used anymore.

You can now use "koji" to try to build your RPM packages in the Fedora build system, even on platforms or Fedora versions you don't have. Note that you can (and definitely should) test out builds ("scratch" builds) even before your package has been approved and you have been sponsored. A simple way to do a scratch build using koji is to do this at the command line:

koji build --scratch TARGET path_to_source_RPM

Where:

  • TARGET is a distribution keyword such as f17 (for Fedora 17). You can run "koji list-targets" to see all targets. To build for the next release (rawhide), don't use "dist-rawhide" - use "fX" where X is one more than the latest stable or branched release.
  • Note that you need to supply the path to the source RPM (which ends in .src.rpm), and not a URL. (If you only have the spec file, use rpmbuild --nodeps -bs SPECFILE to create the new source RPM).

Your koji builds can only depend on packages that are actually in the TARGET distribution repository. Thus, you can't use koji to build for released distributions if your package depends on other new packages that Bodhi hasn't released yet. You can use koji to build for rawhide (the next unreleased version), even if it depends on other new packages, as long as the other packages were built for the "rawhide" as described below. If you need to build against a package that is not yet a stable released update, you can file a ticket with rel-eng at: https://fedorahosted.org/rel-eng/newticket and request that that package be added as a buildroot override. For packages in EPEL, you have to use the component epel to get the request to the right persons.

You can learn more about koji via:

koji --help            # General help
koji --help-commands   # list of koji commands
koji COMMAND --help    # help on command COMMAND

Using the Koji build system has more information about using Koji.

Criar um Pacote

Enviar o seu Pacote

Upload your SRPM and SPEC files onto the Internet somewhere so that others can retrieve them. This can be anywhere accessible by a URL, but it is important that the files be directly accessible, not hidden behind some service that makes people wait to download things or redirects through advertising pages. If you are in at least one project group then you can use your storage at http://fedorapeople.org for this. If you have not done anything with your account besides set it up and sign the CLA then you can request sufficient access to use fedorapeople space by visiting the sponsors trac instance and filing a ticket in the "Initial package hosting request" component.

Criando seu "Review Request"

Fill out this form: https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review.

  • Before submitting your request, be sure there’s not a previous request for the same package. There is a convenient search box on the package review status page.
  • Make sure that you put the name of the package (excluding version and release numbers) in the 'Review Summary' field, along with a very brief summary of what the package is.
  • Put a description of your package (usually, this can be the same thing as what you put in the spec %description) in the 'Review Description' field. Include the URLs to your SRPM and SPEC files.
  • Explain in the ticket that this is your first package and you need a sponsor. Also include any information that may help prospective sponsors. If you've been active in other review work, include links. If you're the upstream maintainer, be sure to say so.
  • For bonus points, include a link to a successful koji build so that everyone knows you did all of your homework.
Make sure that you mention in the 'Review Description' field that this is your first package, and you are seeking a sponsor. In Fedora Package Collection, all new contributors must be sponsored. Some potential sponsors will look at the FE-NEEDSPONSOR bug in bugzilla to find packages to review. You can add your package to this list by editing your review request bug and adding FE-NEEDSPONSOR in the 'Bug xyz blocks' field (where xyz is the bug number for your review request).

The review process is described in detail on the Package Review Process page.

Inform Upstream

Fedora as a project prefers to stay close to upstream. Inform the developers that you are packaging the software. You can do that by sending them an email introducing yourself and pointing out the review request. This sets up the stage for future conversations. They will usually advertise the fact that their software is now part of Fedora or might want to inform you of important bugs in the existing release, future roadmaps etc.

Apresente-se

When a new package maintainer joins the Fedora Project, we request that he/she introduces themselves on the Fedora devel mailing list. To sign up for the list, visit the devel list's signup page. The primary purpose of this is to begin the process of building trust by allowing the Fedora community members to get to know you a bit more and increase the chances of your review request being processed sooner.

We want to break anonymity and foster real-world community within the project. You are under no obligation to reveal personal secrets. The objective is to establish a level of trust with yourself and the other members of the project. But you should at least use your real name when communicating with us. Also a brief description of who you are, your motivations and perhaps a description of the software you have submitted for review is advisable.


Subject: Self Introduction:  <Your name>

Body:  Add any information you believe is applicable 
including past experience in free and open source projects, 
a link to the review request you have filed and 
a brief description of yourself. You can also post 
your GPG key information if you want to.

Watch for Feedback

Watch the Bugzilla report for your first package. You should get notifications of changes by email. Fix any blockers that the reviewer(s) point out.

Seja Patrocinado

When the package is APPROVED by the reviewer, you must separately obtain member sponsorship in order to check in and build your package. Sponsorship is not automatic and may require that you further participate in other ways in order to demonstrate your understanding of the packaging guidelines. Key to becoming sponsored is to convince an existing sponsor-level member that you understand and follow the project's guidelines and processes.

See how to get sponsored into the packager group for more information on the process of becoming sponsored.

Review and approval for the first package for new packagers must be done by registered sponsors. Subsequent reviews can be done by any package maintainer. Informal reviews can always be done by anyone interested.

Your sponsor can add you to the packager group. You should receive email confirmation of your sponsorship.

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

If you are becoming a maintainer for a new package, instead of being a co-maintainer, follow Package SCM admin requests to get a module for your new package and branches for recent releases.

This will be used to set up the proper records in the owners database, which is used for access to build the package, bugzilla population, and other features. This step creates a module in the repository your new package, with branches for each requested distribution.

Check out the module

You could check out your module 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.

Running ssh-add before doing any SCM operations is a very good idea. It will save you from having to type your key password for every operation. You only have to run ssh-add once per session, it will remember it until you log out or reboot. If ssh-add reports "Could not open a connection to your authentication agent.", start a new shell under it using exec ssh-agent bash.

Now you are ready to checkout your module from the SCM:

 fedpkg clone <packagename>

Where <packagename> should be replaced with the name of your package.

If this step fails, be sure your private ssh key (~/.ssh/id_rsa) mode is set to 0400. You might have to wait for up to an hour after your request for a new git module has been approved to get write access. Make sure your public key is the same as in the Fedora Account System (FAS). Key propagation may take an hour or so after uploading into FAS.
Note that fedpkg does not set the user config for your new git repo automatically. Make sure to have these set globally or locally in your new repo before you do your first commit (see Configure your global git settings).
Note: If you are not a member of the fedora packager group, you will receive a "permission denied" error. Use the -a flag to clone anonymously.

Teste Seu Pacote

Refer to Using_Mock_to_test_package_builds and Using_the_Koji_build_system#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

Now that you've checked out your (empty) package module with fedpkg, cd into the module's master 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 (#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.

This imports into, commits, and builds only the master (Rawhide) branch.

If the commit 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://admin.fedoraproject.org/pkgdb/package/PACKAGE_NAME to request those rights.

For more information on using the Fedora package maintenance system, see the Package maintenance guide.

Update Your Branches (if desired)

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

To switch to a branch first:

fedpkg switch-branch BRANCH (e.g. f41)

Merge the initial commit from master, creating an identical commit in the branch:

git merge master

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.

Be sure that you build for rawhide (master) branch before pushing updates for any other branches! Otherwise, those updates will get inherited into rawhide, which is almost certainly not what you want.
Sync to buildsys is an hourly thing. So, sometimes you might have to wait for an hour to get access of the build server to give "fedpkg build"

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

The Fedora update system called Bodhi is used for pushing updates, classifying packages etc. Do not submit Rawhide (master branch) builds via Bodhi.

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

fedpkg update

See the update submission guide for more details.

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 yum's package group operations. See How to use and edit comps.xml for package groups for more info.

Observe se há atualizações

Fedora has infrastructure available for monitoring new upstream releases of the software you are packaging. Refer to Upstream Release Monitoring for more details.

Obtendo ajuda

We know that this process can be as clear as mud sometimes, and we're always trying to make it better. If you run into any problems, or have any questions, please ask on the devel mailing list or in #fedora-devel[?] on freenode.net.

The Fedora Mentors Project has people willing to help new contributors in their packaging efforts. See the Mentors page for more information.

Getting a new package into Fedora Package Collection for existing maintainers

If you already maintain a package in Fedora and want to maintain another, follow the new package process for existing contributors .