Hi,<br>
<br>
I am creating on example.sh in my source folder and tar it and put it in /home/user/rpmbuild/SOURCES directory.<br>
<br>
<br>
In that example.sh, I am creating one directory in my tmp folder.<br>
<br>
But, when I run the spec file, it not execute the shell script and run the command.<br>
<br>
I am using %pre section to run that shell script.<br>
<br>
My spec file is,<br>
<br>
******************************************************************<br>
<br>
Summary: This Package install example daemon application<br>
Name: example<br>
Version:1<br>
Release:5<br>
License: CC-GNU GPL version 2.0<br>
Group: Applications/System<br>
Source:example-1.tar.gz<br>
BuildRoot:%{_tmppath}/%{name}-root<br>
Requires: python = 2.2.3 <br>
Requires: gcc<br>
Requires(post): /bin/sh<br>
BuildRequires:  libpcap<br>
BuildRequires: gawk<br>
<br>
BuildArch:x86_64<br>
Packager:S.Jayaram<br>
<br>
%description<br>
This Package install CDaemon application<br>
%prep<br>
<br>
%setup -q<br>
%build<br>
%{__make}<br>
%pre<br>
sh example.sh<br>
sh javacheck.sh<br>
%install<br>
rm -rf $RPM_BUILD_ROOT<br>
mkdir -p $RPM_BUILD_ROOT/%{_tmppath}<br>
install -m755 example   $RPM_BUILD_ROOT%{_tmppath}/example<br>
%makeinstall<br>
<br>
%files<br>
%defattr(-,root,root,-)<br>
#%dir /home/nco_user/rpmbuild/SOURCES/example-1<br>
%{_bindir}/*<br>
<br>
<br>
%clean<br>
%{__rm} -rf %{buildroot}<br>
<br>
<br>
<br>
<br>
***************************************************************<br>
<br>
My script is,<br>
#!/bin/sh<br>
mkdir /home/nco_user/rpmbuild/tmp/CDaemon<br>
<br>
I am not able to run the script and create the folder.<br>
<br>
When I run rpmbuild , it run properly and create the binary.<br>
<br>
But when I installed it shows following error,<br>
<br>
[error]<br>
Preparing...                ########################################### [100%]<br>
sh: example.sh: No such file or directory<br>
sh: javacheck.sh: No such file or directory<br>
error: %pre(example-1-5.x86_64) scriptlet failed, exit status 127<br>
error:   install: %pre scriptlet failed (2), skipping example-1-5<br>
////////////////////////////////////////////////////<br>
<br>
<br>
what is my problem.<br>
I put my shell scripts in /home/user/rpmbuild/SOURCES/example-1/ directory and finally tar it.<br>
<br>
where can i call my own custom shell scripts.<br>
<br>
thank you.