Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centos 7 source rpm build fails with /usr/bin ... conflicts with file from package filesystem... #132

Open
poleguy opened this issue Jun 4, 2019 · 2 comments

Comments

@poleguy
Copy link

poleguy commented Jun 4, 2019

On Centos 7, I tried to build and then install the source rpm:

rpmbuild --rebuild rtptools-1.22-1.src.rpm
sudo yum localinstall ~/rpmbuild/RPMS/x86_64/rtptools-1.22-1.x86_64.rpm

But it errors out with:

Transaction check error:
file /usr/bin from install of rtptools-1.22-1.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64

I'm not an expert, but I hacked in a fix:
rpm -i rtptools-1.22-1.src.rpm
cd ~/rpmbuild/SPECS/
emacs ~/rpmbuild/SPECS/rtptools-1.22.spec

Change the last few lines to, expicitly list the files that should be installed in /usr/bin:

%files
/usr/bin/multidump
/usr/bin/multiplay
/usr/bin/rtpdump
/usr/bin/rtpplay
/usr/bin/rtpsend
/usr/bin/rtptrans
%{_mandir}
#%{_bindir}

rpmbuild -bp rtptools-1.22.spec
rpmbuild -ba rtptools-1.22.spec

sudo yum localinstall ~/rpmbuild/RPMS/x86_64/rtptools-1.22-1.x86_64.rpm

Thanks to:
https://wiki.centos.org/HowTos/RebuildSRPM
https://stackoverflow.com/questions/38401664/rpmbuild-simple-copy-of-files
https://bugs.launchpad.net/galera/+bug/1199000
https://www.aelius.com/njh/posts/0002

@mcd500
Copy link
Contributor

mcd500 commented Sep 3, 2019

Thanks @poleguy. I will try and merge your changes.

@wasphin
Copy link

wasphin commented Dec 23, 2021

Hi, I have made a rpm repo, of which there is only one package(rtptools) by this time. You can try it here if interested.

rtptools.spec changed:

diff --git a/rtptools.spec b/rtptools.spec
index eead710..5db36f3 100644
--- a/rtptools.spec
+++ b/rtptools.spec
@@ -1,10 +1,10 @@
 Summary: RTP Tools
 Name: rtptools
-Version: VERSION
-Release: 1
+Version: 1.22.0
+Release: 241%{?dist}
 License: BSD
 URL: https://github.com/columbia-irt/rtptools
-Source0: rtptools-VERSION.tar.gz
+Source0: rtptools-%{version}.tar.gz
 
 %description
 The rtptools distribution consists of a number of small applications that
@@ -23,8 +23,8 @@ Akira Tsukamoto
 make
 
 %install
-make BINDIR=$RPM_BUILD_ROOT/usr/local/bin MANDIR=$RPM_BUILD_ROOT%{_mandir} install
+make BINDIR=$RPM_BUILD_ROOT%{_bindir} MANDIR=$RPM_BUILD_ROOT%{_mandir} install
 
 %files
-%{_mandir}
-/usr/local/bin
+%{_mandir}/*
+%{_bindir}/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants