quick-docs/modules/ROOT/pages/_partials/proc_rpm_preparing_your_system.adoc
Ankur Sinha (Ankur Sinha Gmail) 912d2e22d9
fix(rpm packaging): add sudo
Otherwise they don't work and confuse newcomers.
2021-10-20 14:03:47 +01:00

34 lines
1.4 KiB
Text

[[preparing-your-system-to-create-rpm-packages]]
= Preparing your system to create RPM packages
Before you create RPM packages on Fedora, you must install packaging tools and set up any accounts that you want to use.
For general information about preparing your environment, understanding source code, building and patching software, see the https://rpm-packaging-guide.github.io/#preparing-software-for-packaging[Preparing Software for Packaging] section in the RPM packaging guide.
This installs the utilities that you require to work with and build packages in the same manner as official Fedora packages, including the tool that the package reviewers use to check package quality.
To prepare your build environment to create RPM packages, complete the following steps:
NOTE: You must run the following two commands as the root user.
. Install the _fedora-packager_ and _fedora-review_ tools:
+
------------
# sudo dnf install fedora-packager fedora-review
------------
+
. Add yourself to the *mock* group:
+
-----------
# sudo usermod -a -G mock yourusername
-----------
+
. Log out and back in for this change to take effect.
. Run the `id` command to verify that the *mock* group appears in your group list:
+
----------------
$ id
----------------
NOTE: You can also create a separate user and use it for doing RPM development. Ensure that the user is part of the *mock* group and enters the `fedora-packager-setup` command.