rpmbuild -b?|-t?|--rebuild|--recompile operationrpmbuild -b?|-t?|--rebuild|--recompile operation
Desired behaviors:
- Current rpmbuild operation does not include any remote file retrieval. We wish to maintain that and leave any remote file retrieval to rpm -i operation.
- The only mode of operation that assumes everything is already installed is -b?, all other modes include some sort of installation. We wish to encourage -b? as the preferred mode of operation, and encourage rpm -i usage as the preferred means of installation. In this mode, the build process for either type of package is almost identical. For an srpm style package we set sourcedir, specdir, and builddir to what they are now and invoke the build using the spec file. For an scm repo checkout/clone, we set sourcedir, specdir, and builddir all to the checkout dir and then invoke the build using the spec file. The fact that we don't need to do any %setup or %patch work in the scm repo case is expected to be built into the spec file and rpmbuild is not expected to avoid executing macros that would be inappropriate in the scm repo case.
- For all the other build methods, we need to extend the install section to understand that a tarball can be of either type of package (although an srpm implicitly declares a package to be srpm type). For srpm packages, use the existing install code paths and then drop through to the build path for above. For tarballs we need to extract the spec file as we do now, then analyze the spec file, determine which type of tarball it is, and either proceed as we do know in the case of an srpm tarball or simply extract the tarball to builddir, and then drop through to the build code as though it was an scm repo checkout.