cannot stat 'test.h': No such file or directory why?
Hi
I'm a new linux user and use ubuntu. I have tried to build a RPM package and followed the steps at http://searchenterpriselinux.techtar...kages-in-Linux and I removed the following lines from spec BuildRequires: /bin/rm, /bin/mkdir, /bin/cp Requires: /bin/bash, /bin/date But when Im building RMP I get "cannot stat 'test.h': No such file or directory" Thanks in advane Merh |
sounds like a typo somewhere.
isnt it supposed to be 'test.sh'? so search your thing for 'test.h' and change it to 'test.sh' Also - why are you building an RPM on a Ubuntu system? |
Just before we go anyfurther, want to confirm that you know that RPM packages are generally meant for Red Hat or SUSE variants of Linux? whereas ubuntu is branched off from the Debian side. deb or dpkg would be the alternatives for ubuntu I believe.
|
Quote:
I correct the type to .sh. but the same problem. I test in both Redhat and ubuntu. In Redhat I'm not root user. |
Hi
I correct the type to .sh. but the same problem. I'm testing in the both Redhat and ubuntu. In Redhat I'm not root user. |
Ok, so is this the redhat box or the ubuntu box you are testing this on? also can you supply the command you are running for when you see the issues? With output.
|
I have changed from ubuntu to Redhat so Im testing in Redhat which I'm not user.
I use the commond rpmbuild -ba demo.spec |
Redhat which I'm not root user. Command is rpmbuild -ba demo.spec
|
I have changed from ubuntu to Redhat so Im testing in Redhat which I'm not root user.
I use the commond rpmbuild -ba demo.spec |
I have changed from ubuntu to Redhat so Im testing in Redhat which I'm not roo user.
I use the commond rpmbuild -ba demo.spec and get cp test.sh /home/Merh/rpmbuild/BUILDROOT/test-1.0-1.el7.x86_64/home/Merh/bin cp: cannot stat 'test.sh': No such file or directory |
there is an edit button. What does `tar -tf ~/rpmbuild/SOURCES/test-1.0.tar.gz` return?
|
It returns
test-1.0/ test-1.0/test.sh |
Primary reason for the issue is that the article is crap. Its wrong. The spec file he uses is wrong.
So here. Here is my re-interpretation. Code:
(Log in as a non-root user) Code:
Name: test Code:
rpmbuild -ba rpmbuild/SPECS/demo.spec Code:
[user@tools ~]$ rpmbuild -ba rpmbuild/SPECS/demo.spec |
Thanks a lot. But when I install it nothing happens, I mean the directory bin under home/merh/ is not created and so on. I appreciate your help.
Name: test Version: 1.0 Release: 1%{?dist} Summary: A test package Group: Test Packages License: GPL URL: http://test.example.com Source0: %{name}-%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: /bin/rm, /bin/mkdir, /bin/cp Requires: /bin/bash, /bin/date %description Demo package for deployment of one single file %prerp %setup -q %build #configure #make %{? _smp_mflags} %install rm -rf $RPM_BUILD_ROOT #make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/home/mehr/bin cp test.sh $RPM_BUILD_ROOT/home/mehr/bin %clean rm -rf $RPM_BUILD_ROOT %files %defattr(755,root,root,755) #%doc %attr(0755,root,root)/home/mehr/bin/test.sh %changelog |
All times are GMT -5. The time now is 01:00 AM. |