Can’t install new rpms using yum? Update won’t work? Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again. Chances are if you’re seeing this error message the repository files are not the problem.
You don’t need to install an RPM package just to get to the files. This can be especially useful if you’re looking for the default configuration files or docs from a package. You may have the package already installed and don’t want to reinstall it. It’s not pretty, and I wish rpm and yum provided a prettier method of extracting a file, but it works.
Custom RPM repositories may modify comps.xml to include custom rpms, rebuilt packages, or ports. Existing Existing groups can be modified or you can create new groups entirely. Packages can install by default, optional, mandatory, or conditional.
his little utility comes with rpm, so it’s already installed and waiting for you. rpm2cpio converts a rpm file specified as as a command argument (or as standard input) and spits it out as a cpio archive to standard output.
Utilizing macros can make life easier when you’re dealing with building on, and for, multiple platforms. Why bother with hard-coding full paths to system utilities when you can simply refer to them by their macro name? These can also be useful for avoiding things like rpm check-files errors, installed (but unpackaged) file(s) found, and debuginfo related stuff.
If you’ve ever run into a dreaded configure problem such as C compiler cannot create executables, and gotten lost in a tangle of glibc/cc/g++ packages, you might find that building source rpms using Mock turns a multi-step process into a breezy single step. Build source rpms using mock which builds inside a chroot. This lets you compile 32-bit on 64-bit without a problem. Check out mock configurations in etc. You may have preconfigured configurations for your Linux distribution.
If you’re running Fedora or RedHat and you download the plugin required from Google to make voice calls from inside gmail, you’ll need to convert it to an RPM before you can use it. Alien will convert RPMs to Debian .deb packages and vice versa. Download and unpack. You don’t even need to compile or install to use it.
Start the spec file with %define statements at the top. Continue the spec file as you would normally, using the variables you just defined in place of the real name, version, build. Create an rpmbuild script that replaces the template variables with current information. Make an rpm target in your Makefile that calls the rpmbuild script.
You can list the contents of an rpm without installing it first. If you’re not going to build your own from source, you should at least check an rpm before installing it to see what it’s going to install.
With rpmbuild, you can make custom packages for any architecture, but what if there’s no difference between the architectures in what you’re building. If you’re copying around something like scripts, docs or other text files that have nothing to do with 32 vs 64 bit or endianness, it’s easier and more efficient to create a single noarch package and just keep one copy of it in a repository.
You are viewing a mobilized version of this site...
View original page here