FAQ Database Discussion Community


RPM build - %prep not considered (user not created)

rpmbuild
I've created a rpm where in spec file in %prep I create user and group, so the new installed files do run under that specific user. However, looks like rpmbuild ignores my %prep and during rpm installation im gettin: Running Transaction Installing : appdynamics-machineagent-4.0.1.0-1.x86_64 1/1 warning: user appdynamics does not...

Can I have a RPM depend on a directory?

linux,dependency-management,rpm,rhel,rpmbuild
I'm creating an RPM file (with rpmbuild) whose post-install script will create a file in /etc/X11/xinit/xinitrc.d/. To make sure that the directory already exists, I'd like to specify a dependency on a package which creates it. Is it correct in this case to add a Requires: /etc/X11/xinit/xinitrc.d line to the...

How to prevent parallel installation of multiple version of an RPM?

linux,centos,rpm,rhel,rpmbuild
I'm creating an RPM file (with rpmbuild). Currently it is possible to install several versions of the RPM in parallel (apparently RPM doesn't prevent this), but this causes problems because my %pre and %post scripts create and delete some files, so multiple parallel installations will conflict with each other. Is...

Building RPM issue

rpm,centos6,rpmbuild
I tried to build RPM while following this guide http://theurbanpenguin.com/wp/?p=3307 but, when I have reached this step, when I want to copy the CentOS-tup.repo cd ~/rpmbuild/SOURCES mkdir -p tuprepo-1/etc/yum.repos.d cp /tmp/CentOS-Tup.repo !$ I keep getting an error that /Tpm/CentOS-Tup.repo directory not found. So where can I find the CentOS-tup.repo ?...

how to add shell commands to postInstall and preInstall in grunt-rpm plugin

node.js,gruntjs,rpm,rpmbuild
Following the documentation I was able to setup the grunt task and make a successful build. Now I need to have preInstall and postInstall scripts but I could not find any documentation on how to do that. This is my setup: rpm: { options: { // Task-specific options go here....

Variables and escaping in RPM SPEC file macros?

linux,rpm,rpmbuild,rpm-spec
I want to define a macro that will replace some placeholders in makefiles and systemd unit files with the results of RPM variables (macros). However, I don't know if the way expansion works will make the following behave correctly: %define repl_vars() (sed -e "s:\${LIBEXECDIR}:%{_libexecdir}:g" -e "s:\${LOCALSTATEDIR}:%{_localstatedir}:g" -e "s:\${SYSCONFIGDIR}:%{_sysconfdir}:g" %{1} >...

rpmbuild no such file or directory

centos,redhat,rpmbuild,rpm-spec
I'm just learning making rpm packages for some custom builds of software that gets compiled from source (some legacy stuff needs this, so I'm trying to learn, as some packages can't use the latest versions), but hitting an error (I'm doing this in Vagrant, and also as root, but typically...

CPAN install into temp directory?

perl,rpm,cpan,rpmbuild,cpanm
I'm trying to install quite a few modules from CPAN into a temporary directory. This is purely to place quite a few of them into a directory that I can then create a custom RPM out of. The rpm will then later be used on new installs as a bootstrap...

building RPM package: force to install in path of a dependent relocated package

rpm,rpmbuild,rpm-spec
I have 2 dependent packages who should be placed in the same target. Package B is dependent on package A. Package A can be relocated to any another location. I now want package B forced to be placed in the same target as package A. Or simply, package B should...

Check if installation folder of rpm exists on target machine then create another folder

rpm,rpmbuild,rpm-spec
I have a rpm spec file which produces a rpm named cdplayer-1.10.x86_64.rpm. The rpm on target machines (rpm -ivh cdplayer-1.10.x86_64.rpm --nodeps)creates a directory "/opt/cd-player/" and put all files in it. What I need is when user runs rpm command on target m/c then it should check if directory exists and...