Difficulty: Easy
Correct Answer: - - rebuild
Explanation:
Introduction / Context:
RPM-based distributions (such as Red Hat and SUSE families) allow rebuilding binary packages from source RPMs (SRPMs). When you modify spec files or apply patches, you need the correct rpm command to rebuild clean binaries that incorporate those changes.
Given Data / Assumptions:
Concept / Approach:
Historically, rpm --rebuild SRPM_name runs prep, build, and packaging steps, emitting binary RPMs in the designated RPMS directory. Newer systems use rpmbuild --rebuild, but the concept and option remain the same: “rebuild” integrates your patches into the compiled output.
Step-by-Step Solution:
Place SRPM and patches where rpmbuild can access them.Invoke the rebuild operation, e.g., rpmbuild --rebuild package.src.rpm.Wait for compile and packaging; binaries appear under RPMS/
Verification / Alternative check:
Confirm that your patched content is present by using rpm -qlp on the resulting RPM or inspecting file versions and changelogs after installation.
Why Other Options Are Wrong:
--recompile historically compiles but may not complete full packaging pipeline.--generate and --execute are not standard rpm build options for SRPM rebuilding.
Common Pitfalls:
Final Answer:
- - rebuild
Discussion & Comments