rtptools
rtptools copied to clipboard
Centos 7 source rpm build fails with /usr/bin ... conflicts with file from package filesystem...
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
Thanks @poleguy. I will try and merge your changes.
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}/*