LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-27-2004, 09:15 AM   #1
Baltasar
Member
 
Registered: Jan 2004
Distribution: Fedora & Debian
Posts: 43

Rep: Reputation: 15
rpm dependency problem


Hi,
I have a problem with a self made rpm.
One dependency for the rpm is PHP Version 4.3. The installation of the rpm will fail because "/usr/local/bin/php" is missing.
A "rpm -ivvh package.rpm" shows me that the rpm is searching for "/usr/bin/php" and "/usr/local/bin/php" what i didn't expected.
Has anyone an idea why this happen?

Thank you in advance!
Baltasar
 
Old 12-27-2004, 12:25 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,739

Rep: Reputation: 298Reputation: 298Reputation: 298
Inspect the rpm spec file you use to build the rpm. There are a series of directory variables you can set to specify where certain files will be searched for/installed.
PREFIX
EXEC
LIBDIR
BINDIR
and so on.
Look for one that is set to '/usr/local/bin' instead of '/usr/bin' and change it to '/usr/bin'.
 
Old 12-27-2004, 02:24 PM   #3
Baltasar
Member
 
Registered: Jan 2004
Distribution: Fedora & Debian
Posts: 43

Original Poster
Rep: Reputation: 15
Thank you for your response.

I try to make a rpm for the new horde release.
I looked in the spec file and my .rpmmacro again and again but there is no such line /usr/local/bin/php".
Following is the spec file which i use to build the rpm.



%define apachedir /etc/httpd
%define apacheuser apache
%define apachegroup apache
%define contentdir /var/www
%define phpini /etc/php.ini

Summary: The common Horde Framework for all Horde modules.
Name: horde
Version: 3.0
Release: 1
Copyright: LGPL
Group: Applications/Horde
Source: ftp://ftp.horde.org/pub/horde/%{name}-%{version}.tar.gz
Source1: horde.conf
Vendor: The Horde Project
URL: http://www.horde.org/
Packager: Brent J. Nordquist <bjn@horde.org>
BuildArchitectures: noarch
BuildRoot: tmp/%{name}-%{version}-%{release}
Requires: php >= 4.3.0
Requires: httpd >= 2.0.40
Prereq: /usr/bin/perl

%description
The Horde Framework provides a common structure and interface for Horde
applications (such as IMP, a web-based mail program). This RPM is
required for all other Horde module RPMs.

The Horde Project writes web applications in PHP and releases them under
Open Source licenses. For more information (including help with Horde
and its modules) please visit http://www.horde.org/.

%prep
%setup -q -n %{name}-%{version}

%build

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{apachedir}/conf.d
cp -p $RPM_SOURCE_DIR/horde.conf $RPM_BUILD_ROOT%{apachedir}/conf.d
mkdir -p $RPM_BUILD_ROOT%{contentdir}/html/horde
cp -pR * $RPM_BUILD_ROOT%{contentdir}/html/horde
chmod go-rwx $RPM_BUILD_ROOT%{contentdir}/html/horde/test.php
cd $RPM_BUILD_ROOT%{contentdir}/html/horde/config
for d in *.dist; do
d0=`basename $d .dist`
if [ ! -f "$d0" ]; then
cp -p $d $d0
fi
done

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%post
perl -pi -e 's/=\s*Off/= On/i if (/file_uploads\s*=\s*Off/i);' %{phpini}
# post-install instructions:
cat <<_EOF_
You must manually configure Horde and create any required database tables!
See "CONFIGURING HORDE" in %{contentdir}/html/horde/docs/INSTALL
You must also restart Apache with "service httpd restart"!
_EOF_

%postun
if [ $1 -eq 0 ]; then
cat <<_EOF2_
You must restart Apache with "service httpd restart"!
_EOF2_
fi

%files
%defattr(-,root,root)
# Apache horde.conf file
%config %{apachedir}/conf.d/horde.conf
# Include top level with %dir so not all files are sucked in
%dir %{contentdir}/html/horde
# Include top-level files by hand
%{contentdir}/html/horde/*.php
# Include these dirs so that all files _will_ get sucked in
%{contentdir}/html/horde/themes
%{contentdir}/html/horde/lib
%{contentdir}/html/horde/locale
%{contentdir}/html/horde/po
%{contentdir}/html/horde/scripts
%{contentdir}/html/horde/templates
%{contentdir}/html/horde/util
%{contentdir}/html/horde/js
%{contentdir}/html/horde/services
%{contentdir}/html/horde/admin
# Mark documentation files with %doc and %docdir
%doc %{contentdir}/html/horde/COPYING
%doc %{contentdir}/html/horde/README
%docdir %{contentdir}/html/horde/docs
%{contentdir}/html/horde/docs
# Mark configuration files with %config and use secure permissions
# (note that .dist files are considered software; don't mark %config)
%attr(750,root,%{apachegroup}) %dir %{contentdir}/html/horde/config
%defattr(640,root,%{apachegroup})
%{contentdir}/html/horde/config/.htaccess
%{contentdir}/html/horde/config/*.dist
%config %{contentdir}/html/horde/config/*.php
%config %{contentdir}/html/horde/config/*.xml

%changelog
* Sat Dec 25 2004 Baltasar <baltasar@gily.at> 3.0.0-1
- 3.0-1

* Mon Apr 28 2003 Brent J. Nordquist <bjn@horde.org> 2.2.3-1
- First release, 2.2.3-1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm dependency problem nkshirsagar Red Hat 1 01-12-2005 05:55 AM
command line rpm dependency problem rolandkirk55 Linux - Software 0 09-07-2004 08:14 PM
rpm dependency resolution problem blahJake Mandriva 2 03-01-2004 08:53 PM
rpm dependency problem horence Linux - Software 1 02-24-2004 12:20 PM
RPM Dependency Problem JoAnywhere Linux - Software 3 10-30-2003 12:54 PM


All times are GMT -5. The time now is 02:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration