[opensuse-buildservice] Issues installing init scripts
I've been having issues getting my packages to install the init scripts. I am always left with a build failure stating: + /usr/bin/install -D -m755 init/bongo.init.fc4 -D /var/tmp/build-root-bongo/etc/init.d/bongo /usr/bin/install: cannot stat `init/bongo.init.fc4': No such file or directory The SUSE based builds also fail with the same error (they use a different init file. Could someone enlighten me as to what I'm doing wrong please? Many thanks, Andy -- Andrew Wafaa Business Tel: +44 (0)7919 522451 Personal Tel: +44 (0)7974 074546 e-Mail: andrew@forcev.net --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Andrew Wafaa wrote:
I've been having issues getting my packages to install the init scripts. I am always left with a build failure stating:
+ /usr/bin/install -D -m755 init/bongo.init.fc4 -D /var/tmp/build-root-bongo/etc/init.d/bongo
/usr/bin/install: cannot stat `init/bongo.init.fc4': No such file or directory
If you get "No such file or directory" error, odds are the file really isn't there :) So are you sure there's such file in build directory (assuming the command is run from the build directory)? Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Andrew Wafaa wrote:
I've been having issues getting my packages to install the init scripts. I am always left with a build failure stating:
+ /usr/bin/install -D -m755 init/bongo.init.fc4 -D /var/tmp/build-root-bongo/etc/init.d/bongo
/usr/bin/install: cannot stat `init/bongo.init.fc4': No such file or directory
Looks like your file is missing from the BUILD/<your-package> directory: the 1st thing rpmbuild does during the install phase is to go there: Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.23204 + umask 022 + cd /home/derbeyn/rpmbuild/BUILD + cd libtune-0.12 So (unless you did some 'cd xxx' before trying to install your init script), check that init/bongo.init.fc4 has been correctly generated in the BUILD directory. Hope this helps! Regards, Nadia -- =============================================================== Name.......... Nadia DERBEY Organization.. BULL/DT/OSwR&D/Linux --------------------------------------------------------------- Email......... mailto:Nadia.Derbey@bull.net Address....... BULL, B.P. 208, 38432 Echirolles Cedex, France Tel........... (33) 76 29 77 62 [Internal Bull: (229) 77 62] Telex,Fax..... 980648 F - (33) 76 29 76 00 Internal Bull. Mail: FREC-B1405 =============================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Nadia Derbey wrote:
Andrew Wafaa wrote:
I've been having issues getting my packages to install the init scripts. I am always left with a build failure stating:
+ /usr/bin/install -D -m755 init/bongo.init.fc4 -D /var/tmp/build-root-bongo/etc/init.d/bongo
/usr/bin/install: cannot stat `init/bongo.init.fc4': No such file or directory
Looks like your file is missing from the BUILD/<your-package> directory: the 1st thing rpmbuild does during the install phase is to go there:
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.23204 + umask 022 + cd /home/derbeyn/rpmbuild/BUILD + cd libtune-0.12
So (unless you did some 'cd xxx' before trying to install your init script), check that init/bongo.init.fc4 has been correctly generated in the BUILD directory.
Hope this helps!
Regards, Nadia
It looks like it moves from $RPM_BUILD_ROOT into /var/tmp/<package>, so I inserted a cd $RPM_BUILD_ROOT prior to trying to install the init script but still the same answer :( I think my %install isn't actually correct, but I'm still learning: %install mkdir -p $RPM_BUILD_ROOT/etc/init.d make DESTDIR=$RPM_BUILD_ROOT install cd $RPM_BUILD_ROOT #find . -type d -fprint $RPM_BUILD_DIR/file.list.%{name}.dirs #find . -type f -fprint $RPM_BUILD_DIR/file.list.%{name}.files.tmp #sed '/\/man\//s/$/.gz/g' $RPM_BUILD_DIR/file.list.%{name}.files.tmp > $RPM_BUILD_DIR/file.list.%{name}.files #find . -type l -fprint $RPM_BUILD_DIR/file.list.%{name}.libs #sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' $RPM_BUILD_DIR/file.list.%{name}.dirs > $RPM_BUILD_DIR/file.list.%{name} #sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.files >> $RPM_BUILD_DIR/file.list.%{name} #sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.libs >> $RPM_BUILD_DIR/file.list.%{name} %if 0%{?suse_version} #cd /usr/src/packages/BUILD/%{name}-%{version} %{__install} -D -m755 init/bongo.init.suse10 -D $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bongo %endif %if 0%{?fedora_version} #cd /usr/src/redhat/BUILD/%{name}-%{version} %{__install} -D -m755 init/bongo.init.fc4 -D $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bongo %endif %if 0%{?mandriva_version} #cd /usr/src/rpm/BUILD/%{name}-%{version} %{__install} -D -m755 init/bongo.init.fc4 -D $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bongo %endif Many thanks for the help, Andy -- Andrew Wafaa Business Tel: +44 (0)7919 522451 Personal Tel: +44 (0)7974 074546 e-Mail: andrew@forcev.net --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Andrew Wafaa wrote:
%if 0%{?suse_version} #cd /usr/src/packages/BUILD/%{name}-%{version} %{__install} -D -m755 init/bongo.init.suse10 -D $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bongo %endif %if 0%{?fedora_version} #cd /usr/src/redhat/BUILD/%{name}-%{version} %{__install} -D -m755 init/bongo.init.fc4 -D $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bongo %endif %if 0%{?mandriva_version} #cd /usr/src/rpm/BUILD/%{name}-%{version} %{__install} -D -m755 init/bongo.init.fc4 -D $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bongo %endif
You need init/bongo.init.{suse,fc4} in the build directory, that is these files either have to in the source tarball or they have to be generated during build. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Andrew Wafaa wrote:
Nadia Derbey wrote:
Andrew Wafaa wrote:
I've been having issues getting my packages to install the init scripts. I am always left with a build failure stating:
+ /usr/bin/install -D -m755 init/bongo.init.fc4 -D /var/tmp/build-root-bongo/etc/init.d/bongo
/usr/bin/install: cannot stat `init/bongo.init.fc4': No such file or directory
Looks like your file is missing from the BUILD/<your-package> directory: the 1st thing rpmbuild does during the install phase is to go there:
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.23204 + umask 022 + cd /home/derbeyn/rpmbuild/BUILD + cd libtune-0.12
So (unless you did some 'cd xxx' before trying to install your init script), check that init/bongo.init.fc4 has been correctly generated in the BUILD directory.
Hope this helps!
Regards, Nadia
It looks like it moves from $RPM_BUILD_ROOT into /var/tmp/<package>, so I inserted a cd $RPM_BUILD_ROOT prior to trying to install the init script but still the same answer :(
I think this is the thing u did wrong: the BuildRoot is the location where everything is installed before the package is actually built. so IMHO you shouldn't go there before your install. 1) the sources are uncomprssed into the BUILD/<your-package> 2) %build is done there 3) %install is done there too, with target directory = $RPM_BUILD_ROOT (which is /var/tmp/your-package> 4) %files is done relatively to $RPM_BUILD_ROOT with target drectory = RPM/<your-platform> Regards, Nadia --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Nadia Derbey wrote:
I think this is the thing u did wrong: the BuildRoot is the location where everything is installed before the package is actually built. so IMHO you shouldn't go there before your install. 1) the sources are uncomprssed into the BUILD/<your-package> 2) %build is done there 3) %install is done there too, with target directory = $RPM_BUILD_ROOT (which is /var/tmp/your-package> 4) %files is done relatively to $RPM_BUILD_ROOT with target drectory = RPM/<your-platform>
Regards, Nadia
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Thanks for the tip Nadia, Most appreciated, I'll try it without going into the BuildRoot. Regards, Andy -- Andrew Wafaa Business Tel: +44 (0)7919 522451 Personal Tel: +44 (0)7974 074546 e-Mail: andrew@forcev.net --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Andrew Wafaa wrote:
Nadia Derbey wrote:
Andrew Wafaa wrote:
I've been having issues getting my packages to install the init scripts. I am always left with a build failure stating:
+ /usr/bin/install -D -m755 init/bongo.init.fc4 -D /var/tmp/build-root-bongo/etc/init.d/bongo
/usr/bin/install: cannot stat `init/bongo.init.fc4': No such file or directory
Looks like your file is missing from the BUILD/<your-package> directory: the 1st thing rpmbuild does during the install phase is to go there:
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.23204 + umask 022 + cd /home/derbeyn/rpmbuild/BUILD + cd libtune-0.12
So (unless you did some 'cd xxx' before trying to install your init script), check that init/bongo.init.fc4 has been correctly generated in the BUILD directory.
Hope this helps!
Regards, Nadia
It looks like it moves from $RPM_BUILD_ROOT into /var/tmp/<package>, so I inserted a cd $RPM_BUILD_ROOT prior to trying to install the init script but still the same answer :(
I think my %install isn't actually correct, but I'm still learning:
BTW, there's a document (http://www.gurulabs.com/GURULABS-RPM-LAB/GURULABS-RPM-GUIDE-v1.0.PDF) that contains quite an interesting scheme (page # 18) about the directories involved in the rpm building process. Regards, Nadia --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Andrew Wafaa
-
Michal Marek
-
Nadia Derbey