Results 1 to 4 of 4
Hello
When I build my software with rpmbuild command, the rpms are not getting
generated in the directory specified in rpmmacros file(%_rpmdir)
This is what I am doing..
rpmbuild -bb ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-17-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 6
rpm getting generated in diff directory
Hello
When I build my software with rpmbuild command, the rpms are not getting
generated in the directory specified in rpmmacros file(%_rpmdir)
This is what I am doing..
rpmbuild -bb -vv --buildroot <build root path> --target=x86_64 --rcfile /tmp/rpmrc /tmp/mySpecfile.spec
# cat /tmp/rpmrc
macrofiles: /tmp/rpmmacros
# cat /tmp/rpmmacros
%_arch {$ARCH}
%_builddir /home/manju/build/mysoftware/temp/install
%_buildshell /bin/sh
%_rpmdir /home/manju/build/mysoftware/dest/ix86_linux24/images/
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.{$ARCH}.rpm
%_tmppath /home/manju/build/mysoftware/install/tmp
So I expect the rpms to be present under the directory specified by %_rpmdir
but instead they are going to /root/rpmbuild/RPMS/x86_64 directory.
How do I address this ? Anyone has faced the same problem?
regards,
manju
- 09-17-2010 #2
You forgot the "."
and also the .rpmmacros file needs to be in your $HOME, not in /tmp
aka: ~/.rpmmacros
Also, judging from this:
You are building as root, which is not advised and also not neccessary...but instead they are going to /root/rpmbuild/RPMS/x86_64 directory.
Why?
*DONT* try this
Executed as root, it will wipe your disk.Code:%clean %{__rm} -rf /
And the "/" is just a bad variable expansion away
In fact, I use a dedicated and easily replaceable VM for building RPMs.You must always face the curtain with a bow.
- 09-17-2010 #3Just Joined!
- Join Date
- Sep 2010
- Posts
- 6
Hello Irithori
I use the same command on another system
which is 32bit. There is copies the files to correct directory mentioned in rpmmacros
files.
Btw. with --rcfile option, specifies my rpmrc file
--rcfile FILELIST
Each of the files in the colon separated FILELIST is read sequentially by rpm for configuration information. Only the first file in the list must exist, and tildes will be expanded to the value of $HOME. The default FILELIST is /usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc:/etc/rpmrc:~/.rpmrc.
so --rcfile /tmp/rpmrc is valid.
Also rpmrc contents specify the name of rpmmacros file that I am using. Here also
I can specify the absolute path of the rpmmacros file.
- 09-17-2010 #4
You are right, I didnt see --rcfile.
Hmm, in theory --rcfile should be used.
But maybe you have a .rpmacros file in your home, that (strangely) overrides?
Other than that I can only think of typos or permission issues.
You can try and copy the content of /tmp/rpmmacros into ~/.rpmmacros
and then drop --rcfile.You must always face the curtain with a bow.


Reply With Quote
