rpmbuild error --- Symlink points to BuildRoot:
hi all,
i am trying to create rpm for bzip2, in building i am getting following error message. also i am building as non-root user. {{{ + rm -rf /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzcmp + ln -s -f /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzdiff /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzcmp + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump Processing files: bzip2-1.0.6-6.i386 error: Symlink points to BuildRoot: /usr/local/bin/bzcmp -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzdiff error: Symlink points to BuildRoot: /usr/local/bin/bzegrep -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzgrep error: Symlink points to BuildRoot: /usr/local/bin/bzfgrep -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzgrep error: Symlink points to BuildRoot: /usr/local/bin/bzless -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzmore RPM build errors: Symlink points to BuildRoot: /usr/local/bin/bzcmp -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzdiff Symlink points to BuildRoot: /usr/local/bin/bzegrep -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzgrep Symlink points to BuildRoot: /usr/local/bin/bzfgrep -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzgrep Symlink points to BuildRoot: /usr/local/bin/bzless -> /home/rpmuser/rpmbuild/BUILDROOT/bzip2-1.0.6-6.i386/usr/local/bin/bzmore }}} It seams it is creating sybilic links in BUILDROOT. I have seen similar threads before.But i am still not getting how to solve this problem. perhaps i need to a add some changes to install section of my spec file. install section sample of my bzip2.spec file is as follows {{{ %install rm -rf $RPM_BUILD_ROOT %makeinstall DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr/local %clean }}} any help will be usefull :confused: |
Theres hard links and symbolic links but I've never heard of sibyllic links... And unless you're certain you only need to change details best post your complete .spec file, more efficient. Anyway, %_buildroot (the "BuildRoot:" directive in your .spec file) shouldn't be in %_builddir but set to something like "%{_tmppath}/%{name}-%{version}" (if %_topdir defaults to /home/rpmuser/rpmbuild then %_builddir is set to %{_topdir}/BUILD and %_tmppath may be %{_topdir}/tmp or /var/tmp or whatever else you want to configure in your ~/.rpmmacros file). Then you should be able to 'make DESTDIR=$RPM_BUILD_ROOT install' as proposed.
|
hi ,
my .rpmmacros file contains %_topdir /home/rpmuser/rpmbuild %_tmppath /home/rpmuser/rpmbuild/tmp and my complete spec file is {{{ Name:bzip2 Version:1.0.6 Release:6 Summary:bzip2 Group:compressing License:GPL URL: http://sources.redhat.com/bzip2/ Source0:bzip2-1.0.6.tar.gz BuildRoot: %{_tmppath}/ %{name}-root #BuildRequires: #Requires: %description start compressing %prep %setup -q %build make %install rm -rf $RPM_BUILD_ROOT %makeinstall DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr/local %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc /usr/local/bin/bunzip2 /usr/local/bin/bzcat /usr/local/bin/bzcmp /usr/local/bin/bzdiff /usr/local/bin/bzegrep /usr/local/bin/bzfgrep /usr/local/bin/bzgrep /usr/local/bin/bzip2 /usr/local/bin/bzip2recover /usr/local/bin/bzless /usr/local/bin/bzmore /usr/local/include/bzlib.h /usr/local/lib/libbz2.a /usr/local/man/man1/bzcmp.1 /usr/local/man/man1/bzdiff.1 /usr/local/man/man1/bzegrep.1 /usr/local/man/man1/bzfgrep.1 /usr/local/man/man1/bzgrep.1 /usr/local/man/man1/bzip2.1 /usr/local/man/man1/bzless.1 /usr/local/man/man1/bzmore.1 %changelog }}} by still getting that Symlink points to BuildRoot error. what i need to change in spec file ? |
2 Attachment(s)
Quote:
That said, find attached a 'diff -urN' with the .spec file you posted with comments and fix for the %install part and an example of how a .spec file could look like. HTH |
All times are GMT -5. The time now is 03:24 AM. |