From Fedora Project Wiki

No edit summary
(Very weirdly named page, erasing all content since I cannot delete this)
Tag: Blanking
 
(174 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= What is Eclipse Fedora Packager? =
= Steps for Maintaining New Fedora Packages =
So, you have decided to become a package maintainer in the Fedora Project? This guide will lead you through your first package submission.
[[Image:fedora-submit-package.png|Fedora submit package]]


== Creating Account for New Contributors ==
If you are a new package maintainer:
=== Creating a new account on Fedora Account System ===
* First step is to create account on [https://admin.fedoraproject.org/accounts Fedora Account System (FAS)].
* Click '''New account''' and fill in the blanks.
*After you create your account, please be sure to sign the CLA (if you click on the '''My Account''' link in the top right, you should see ''CLA: CLA Done'').
*Also you need to upload a '''public RSA SSH key'''. You need to use the matching private key to access Fedora machines via SSH.
** Here is information on [http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen creating SSH key].
=== Creating a Bugzilla Account===
Create an account on [https://bugzilla.redhat.com/createaccount.cgi Red Hat bugzilla].
* The email address that you use for your bugzilla account should be the same email address as you use in the ''Fedora Account System'' for all things related to fedora packaging.
* Do not use your <code>@fedoraproject.org</code> address in bugzilla, because you will not get your bugzilla privileges once you are sponsored.
* If you want to use your <code>@fedoraproject.org</code> address, you might try to request at the ''Fedora Infrastructure Ticket System'' for an administrator to manually override the bugzilla address connected with your fedora account.
=== Initial Setup ===
: 1. You need to [https://admin.fedoraproject.org/accounts/user/gencert generate a client side certificate at the Fedora Account System]  and save the file in <code>~/.fedora.cert</code>, where fedpkg will look for it by default.
<pre> yum install fedora-packager </pre>
: Then run the following command and simply follow the instructions provided:
<pre> fedora-packager-setup </pre>
: 2. To build Packages for the Fedora Collection or [http://fedoraproject.org/wiki/EPEL EPEL], you also need [http://fedoraproject.org/wiki/Using_the_Koji_build_system Koji]. You can now use koji to try to build your RPM packages on platforms (e.g. PPC) or distributions you don't have. Note that you can test out builds ("scratch" builds) even when your package hasn't been approved and you don't have a sponsor.
:: [http://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Install_the_Client_Tools_.28Koji.29 Here] is a simple way to do a scratch build using koji on the command line. Check [http://fedoraproject.org/wiki/PackageMaintainers/Join#Install_the_Client_Tools_.28Koji.29 more information] on this koji syntax.
<pre> koji build --arch-override=PLATFORM --scratch TARGET path_to_source_RPM </pre>
== Making a Package ==
=== Packaging Guidlines ===
* If you don't know how to create a ''RPM package'', refer to the tutorial at [http://fedoraproject.org/wiki/A_Short_RPM_Tutorial A Short RPM Tutorial] or the more advanced and much more detailed [http://fedoraproject.org/wiki/How_to_create_an_RPM_package how to create an RPM package].
* Make sure it is a new package. Check this [https://admin.fedoraproject.org/pkgdb/acls/list/ list of existing packages].
* Make sure it is a suitable package. Read [http://fedoraproject.org/wiki/Packaging:Guidelines Packaging Guidelines] and [http://fedoraproject.org/wiki/Packaging:NamingGuidelines Packaging Naming Guidelines].
* 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 <code>package-review@lists.fedoraproject.org</code> mailing list.
=== Creating an RPM package: ===
Follow the following steps to create a RPM package:
: 1. Select '''File''' > '''New''' > '''Other...''' from the main menu. Choose '''RPM''' > '''RPM Project''', click '''Next'''.
: 2. Type the '''Project name'''. Click '''Finish'''.
: 3. Right click on SPECS, select '''New''' > '''Other...''', choose '''RPM''' > '''Specfile Based on a Template''', click '''Next'''.
: 4. Fill out the template or accept the default values and customize it based your package specifications.
:: You can also use RPM-stubby plug-in to create a spec-file stub (for Eclipse feature or maven project).
: 5. When your package is ready to submit for review, select '''File''' > '''Export''' from the main munu, choose '''RPM''' > '''Source/Binary RPM''', click '''Next'''.
: 6. Based on your requirements, select one or both options, click '''Finish'''.
* This [http://wiki.eclipse.org/Linux_Tools_Project/SpecfileEditor/User_Guide user guide] has more information on working with specfile-editor in Eclipse.
== Submiting For Review ==
=== Joining the Mailing Lists ===
When a new package maintainer joins the Fedora Project, we request that he/she introduces themselves on the <code>devel@lists.fedoraproject.org</code>. To sign up for the list, visit the devel list signup page.
* The primary purpose of this is to begin the process of building trust by learning about the package maintainer and increase the chances of your review request being processed sooner.
* The purpose of all this is 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.
: ''Subject:'' Self Introduction
: ''Body:'' Add any information you believe is applicable including past experience, 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.
* Here is the information of [http://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Join_the_important_Mailing_Lists possible mailing lists] for you to join. And there is also a list of [http://fedoraproject.org/wiki/Category:Packaging_SIGs special interest groups for Fedora Packaging].
=== Uploading the Package ===
Upload your SRPM and SPEC files onto the Internet somewhere. This can be anywhere accessible by a URL.
* If you need hosting space, please make a note of it in your ticket submission and someone will take care of you.
* If you have already got a Fedora Account then you can use your storage at <code><user-name>.fedorapeople.org</code> for this.
=== Creating Review Request ===
Before submitting your request, be sure there is not a previous request for the same package.
* Fill out this form at [https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review bugzilla].
* 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 <code>%description</code>) in the ''Review Description'' field.
* Include the URLs to your SRPM and SPEC files.
* If this is your first package, explain it and say that you need a sponsor.
=== Bugzilla feedback ===
* You should get notifications of changes by email. Fix any blockers that the reviewer(s) point out.
== Ready to Ship ==
Follow these steps after your package is approved by reviewers.
=== Obtaining Member Sponsorship ===
After your package is approved by reviewers, you must separately obtain member sponsorship 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 [http://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group how to get sponsored into the packager group] for more information.
=== Requesting a new package SCM ===
When the package is approved by the reviewer, request a git module and branches with the [http://fedoraproject.org/wiki/Package_SCM_admin_requests Source Code Management(SCM) admin requests].
* Mention the name of the branches you need your package to be included in.
=== Checking Out the Empty Module from SCM ===
Once you have the git module, checkout your module from git.
* Select '''import''' > '''Git''' > '''Projects from Fedora Git''' and click '''Next'''.
* type the name of the package in '''Package name'''.
: It is probably a good idea to make a "git" toplevel directory, then check-out your files inside of that. Refer to this user guide on [https://fedoraproject.org/wiki/Using_Fedora_GIT Using Fedora Git] for more information.
== Updating the SCM ==
=== Importing and Committing the Package Contents ===
After you checked out your empty git module, you need to import and commit your package contents into the master branch.
: 1. Right-click on your <code>src.rpm</code> file in SRPMS folder on your local RPM project in eclipse, click '''Copy'''.
: 2. Right-click on your cloned project from Fedora Git, click '''Paste'''.
: 3. To upload this file, right-click on it, select '''Fedora Packager''' > '''Upload this File''' > '''Add to Existing Sources'''. This either adds the file to the sources required to build the package or replaces the current content of the sources file to contain a single line with the MD5 sum of the file selected.
: 4. Do the steps 1-3 for your <code>.spec</code> file in SPECS folder.
: 5. To commit the package contents to the git repository, select the files to commit (alternatively select the Fedora Git project and select desired ''unstaged'' files when the commit dialog is shown), right-click, '''Team''' > '''Commit...'''
* Use this message for your initial commit: "<code> Initial import (#nnnnnn)</code>" (where nnnnnn is your Bugzilla package review bug number).
[[Image:GitCommit.png|Git Commit]]
= Using Eclipse Fedorapackager =
== Importing a Fedora Git Project ==
== Fedora Packaging Work ==
=== Uploading Source Files Required for a Package ===
=== Downloading Source Files Required for a Package ===
=== Using the Spec-File Editor ===
=== Committing Changes to the Local Git Repository ===
=== Switching Branches (Git Checkout) ===
=== Building the Package ===
==== Preparing Sources for Local Build ====
Eclipse Fedora Packager will download and prepare sources for building a package.
* Select your spec-file, right-click, '''Fedora Packager''' > '''Prepare for local build'''.
[[Image:PrepareSourcesForBuild.png|Prepare Sources for Build]]
==== Building RPM for a Local Architecture ====
This is a great way to test if the spec-file actually builds at all. Once the RPM has been successfully built locally, it is recommended further testing be carried out on the spec-file by completing a build in a chroot'ed environment using mock. Both ways are supported by Eclipse Fedora Packager.
* To build the RPM locally right-click on the spec-file '''Fedora Packager''' > '''Build for Local Architecture'''. Output of the RPM build will appear on the Eclipse console.
Using mock-builds is a great way to test the <code>Requires/BuildRequires</code> of a spec-file.
* To build the RPM locally using mock-build, right-click on the spec-file '''Fedora Packager''' > '''Local Build Using Mock'''. Be aware that this may take a long time (>20 minutes) and requires the mock package to be installed. Use Eclipse's ''Run in Background'' functionality for convenience.
=== Make Locally Committed Changes Public (Git Push) ===
=== Pushing a Build to Koji ===
=== Pushing a Bodhi Update ===
If this package will be built for any version of Fedora that is already released, please submit it for inclusion in the fedora-updates repository for those versions of Fedora. For doing this:
* Switch to the appropriate git branch on '''Git Repositories view'''.
* Right click on your project, '''Fedora Packager''' > '''Create New Bodhi Update'''.
= title? =
=== Feedback/Reporting Bugs ===
=== Closing the Bugzilla Ticket ===
* If the package built successfully, you should close it as '''NEXTRELEASE'''.
=== Enabling Upstream Release Monitoring ===
Fedora has infrastructure available for monitoring new upstream releases of the software you are packaging.
* Refer to [http://fedoraproject.org/wiki/Upstream_Release_Monitoring Upstream Release Monitoring] for more details.
* Learn to handle updates by reading the [http://fedoraproject.org/wiki/Package_update_HOWTO Package update HOWTO].
=== Updating Your Package ===
Once you have pushed your package into the git repository, you can follow these instructions on [https://fedoraproject.org/wiki/Eclipse_Fedora_Packager_User_Guide#Make_Locally_Committed_Changes_Public_.28Git_Push.29 Fedora Packaging in Eclipse] to modify your package contents and push them for koji build.

Latest revision as of 19:37, 2 October 2021