Now, you can look through the source code for Redis precisely as it was when Redis was compiled and put into the package that you have installed on your system. It is found in the BUILD directory under topdir: $ ls ~/rpmbuild/BUILD Next, prepare the source using the rpmbuild program, passing the -bp flag, and specifying the spec filename: $ rpmbuild -bp redis.spec This brings the source into the state it was in when the RPM was built.īegin by switching to the SPECS directory under your topdir: $ cd rpmbuild/SPECS Now, that you’ve installed the source RPM and build dependencies, you can prepare the source so that all patches are applied. You should now install the source RPM’s build dependencies by using yum-builddep: $ sudo yum-builddep redis The RPM spec file will be written to SPECS. This will write the source tarballs, patches, and other files to the SOURCES directory under your specified topdir. You can now install the source RPM: $ rpm -ivh. rpmmacros file will cause source RPMs installed by you to be written to my-rpm-build-dir in your home directory. rpmmacros in your home directory like this: %_topdir %(echo $HOME)/my-rpm-build-dir You can set your own topdir by creating a file named. On many systems, the default value is rpmbuild in the current user’s home directory. You can get the current value of topdir by checking the output of rpm -showrc | grep topdir. When a source RPM is installed, the source tarballs, patches, and auxilliary files will be installed under a top level directory. This will download the redis source RPM file in the current working directory. This program will download the source RPM for the named package.įor example, to get the source RPM for redis run: $ yumdownloader -source redis Start by using yumdownloader which is part of the yum-utils package. Getting the source for an RPM package is not as straight-forward as obtaining source packages for other systems. If you intend to rebuild or modify a source RPM, it is strongly recommended that you install the yum-utils and rpm-build packages which contains many useful tools for working with yum and RPMs: $ sudo yum install yum-utils rpm-build Getting Source RPMs We strongly recommend that people and organizations running applications in production on RPM-based systems become familiar with RPM source packages so that when a bug appears, system operators and developers will have the tools to quickly and easily obtain the source and debug the issue. Confirming whether or not a particular security fix has been applied to the source.Modifying existing applications to add additional logging.Debugging issues with applications and libraries.On RPM-based systems (CentOS, Red Hat Enterprise Linux, Oracle Linux, and many more) source RPMs are RPM files that contain a tarball of source code, patches, auxiliary files that are used during the build process, and a. Occasionally, the source may by patched by the package maintainer at build time.Ī source RPM captures the source code and patches as they were at RPM build time. Packages are typically generated from source code and a set of a metadata written by the package maintainer. A package is a collection of binaries, scripts, and associated data that is installed by your package manager.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |