Hi James, 

can you show your spec file? 

 Part of the initialization of %install. also you maybe have this code in your 
spec?


%install
# Clean BUILDROOT
rm -fr %{buildroot}

or 

%clean
rm -fr %{buildroot}


this is why your directory ossec is deleted. Is a standard method to clean the 
rpm from bads previously compilations.

On the other hand please review your “ossec.tar.gz", if you extract this file, 
you need to have a folder called “ossec" with the source inside, if the folder 
has different name you need to modify the name to ossec and tar again the 
folder.

-----------------------
Jose Luis Ruiz
Wazuh Inc.
[email protected]



> On May 16, 2016, at 10:04 AM, James Dough <[email protected]> wrote:
> 
> I'm trying to build the OSSEC RPM with the most recent version, using my own 
> custom preloaded vars. 
> 
> I'm using the default spec file, modified to match the tar that I've chosen.
> 
> Here's the error I get.
> 
> + STATUS=0
> + '[' 0 -ne 0 ']'
> + cd ossec
> /var/tmp/rpm-tmp.CtNG72: line 36: cd: ossec: No such file or directory
> error: Bad exit status from /var/tmp/rpm-tmp.CtNG72 (%prep)
> 
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.CtNG72 (%prep)
> 
> 
> The tmp file has the follow code which is causing it to fail: (It deletes an 
> ossec directory, then tries to cd into it.)
> 
> cd '/root/rpmbuild/BUILD'
> rm -rf 'ossec'
> /usr/bin/gzip -dc '/root/rpmbuild/SOURCES/ossec.tar.gz' | /usr/bin/tar -xvvf -
> STATUS=$?
> if [ $STATUS -ne 0 ]; then
>   exit $STATUS
> fi
> cd 'ossec'
> /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
> 
> 
> I can't seem to find what generates this code. But I can't see why it 
> specifies to rm the ossec directory and then immediately CD into it. Any 
> suggestions? 
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "ossec-list" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"ossec-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to