Mailinglist Archive: opensuse (1184 mails)
| < Previous | Next > |
[opensuse] building rpm packages and automatic dependencies.
- From: mailing lists <listas.correo@xxxxxxxx>
- Date: Mon, 31 May 2010 15:55:16 +0000 (GMT)
- Message-id: <853930.98176.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Hello,
I need build some packages but I'm unable to understand how to override
automatic dependencies.
For a package like haproxy which depends of libpcreposix0 I specify a
requires tag containing libpcreposix0. However find-requires adds
libpcreposix.so.0()(64bit)
as a dependency and finally the installation halts to request the
library instead of showing the required package.
Anyone knows how to solve this?
# rpm -qp --requires RPMS/x86_64/haproxy-1.4.4-1.x86_64.rpm
/sbin/chkconfig
/sbin/service
libpcreposix0 <------------------------------------------ requires tag
dependency
/bin/sh
/bin/sh
/bin/sh
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
/bin/sh
libcrypt.so.1()(64bit)
libcrypt.so.1(GLIBC_2.2.5)(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3.2)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libpcreposix.so.0()(64bit) <-------------------------- find-requires adds this
libpcre.so.0()(64bit)
rpmlib(PayloadIsLzma) <= 4.4.6-1
# zypper install -r 1 haproxy
Retrieving repository 'Opensuse11.2-local' metadata [done]
Building repository 'Opensuse11.2-local' cache [done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: nothing provides libpcreposix.so.0()(64bit) needed by
haproxy-1.4.4-1.x86_64
Solution 1: do not ask to install a solvable providing haproxy
Solution 2: break haproxy by ignoring some of its dependencies
# cat haproxy.spec
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability
environments
Name: haproxy
Version: 1.4.4
Release: 1
License: GPL
Group: System Environment/Daemons
URL: http://haproxy.1wt.eu/
Source0: http://haproxy.1wt.eu/download/1.3/src/%{name}-%{version}.tar.gz
Source1: %{name}.init
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pcre-devel
Requires: /sbin/chkconfig, /sbin/service
Requires: libpcreposix0
Patch0: haproxy_user.patch
%description
HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
availability environments.
%prep
%setup -q
%patch0 -p1
# We don't want any perl dependecies in this RPM:
%define __perl_requires /bin/true
%build
%{__make} USE_PCRE=1 DEBUG="" ARCH=%{_target_cpu} TARGET=linux26
%install
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%{__install} -d %{buildroot}%{_sbindir}
%{__install} -d %{buildroot}%{_sysconfdir}/init.d
%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
%{__install} -d %{buildroot}%{_mandir}/man1/
%{__install} -s %{name} %{buildroot}%{_sbindir}/
%{__install} -c -m 644 examples/%{name}.cfg %{buildroot}%{_sysconfdir}/%{name}/
%{__install} -c -m 755 doc/%{name}.1 %{buildroot}%{_mandir}/man1/
cd $RPM_BUILD_ROOT/%{_sbindir}
%if 0%{?suse_version}
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name}
%endif
ln -sf ../../etc/init.d/%{name} rc%{name}
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%pre
/usr/sbin/groupadd -r %{name} &>/dev/null ||:
/usr/sbin/useradd -m -g %{name} -s /bin/false -r -c "user for %{name}" -d
/var/lib/%{name} %{name} &>/dev/null ||:
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 = 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root)
%doc CHANGELOG TODO examples/*.cfg doc/haproxy-en.txt doc/haproxy-fr.txt
doc/architecture.txt doc/configuration.txt
%doc %{_mandir}/man1/%{name}.1*
%attr(0755,root,root) %{_sbindir}/%{name}
%dir %{_sysconfdir}/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.cfg
%attr(0755,root,root) %config %{_sysconfdir}/init.d/%{name}
%{_sbindir}/rchaproxy
%changelog
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
I need build some packages but I'm unable to understand how to override
automatic dependencies.
For a package like haproxy which depends of libpcreposix0 I specify a
requires tag containing libpcreposix0. However find-requires adds
libpcreposix.so.0()(64bit)
as a dependency and finally the installation halts to request the
library instead of showing the required package.
Anyone knows how to solve this?
# rpm -qp --requires RPMS/x86_64/haproxy-1.4.4-1.x86_64.rpm
/sbin/chkconfig
/sbin/service
libpcreposix0 <------------------------------------------ requires tag
dependency
/bin/sh
/bin/sh
/bin/sh
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
/bin/sh
libcrypt.so.1()(64bit)
libcrypt.so.1(GLIBC_2.2.5)(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3.2)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libpcreposix.so.0()(64bit) <-------------------------- find-requires adds this
libpcre.so.0()(64bit)
rpmlib(PayloadIsLzma) <= 4.4.6-1
# zypper install -r 1 haproxy
Retrieving repository 'Opensuse11.2-local' metadata [done]
Building repository 'Opensuse11.2-local' cache [done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...
Problem: nothing provides libpcreposix.so.0()(64bit) needed by
haproxy-1.4.4-1.x86_64
Solution 1: do not ask to install a solvable providing haproxy
Solution 2: break haproxy by ignoring some of its dependencies
# cat haproxy.spec
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability
environments
Name: haproxy
Version: 1.4.4
Release: 1
License: GPL
Group: System Environment/Daemons
URL: http://haproxy.1wt.eu/
Source0: http://haproxy.1wt.eu/download/1.3/src/%{name}-%{version}.tar.gz
Source1: %{name}.init
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pcre-devel
Requires: /sbin/chkconfig, /sbin/service
Requires: libpcreposix0
Patch0: haproxy_user.patch
%description
HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
availability environments.
%prep
%setup -q
%patch0 -p1
# We don't want any perl dependecies in this RPM:
%define __perl_requires /bin/true
%build
%{__make} USE_PCRE=1 DEBUG="" ARCH=%{_target_cpu} TARGET=linux26
%install
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%{__install} -d %{buildroot}%{_sbindir}
%{__install} -d %{buildroot}%{_sysconfdir}/init.d
%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
%{__install} -d %{buildroot}%{_mandir}/man1/
%{__install} -s %{name} %{buildroot}%{_sbindir}/
%{__install} -c -m 644 examples/%{name}.cfg %{buildroot}%{_sysconfdir}/%{name}/
%{__install} -c -m 755 doc/%{name}.1 %{buildroot}%{_mandir}/man1/
cd $RPM_BUILD_ROOT/%{_sbindir}
%if 0%{?suse_version}
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name}
%endif
ln -sf ../../etc/init.d/%{name} rc%{name}
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%pre
/usr/sbin/groupadd -r %{name} &>/dev/null ||:
/usr/sbin/useradd -m -g %{name} -s /bin/false -r -c "user for %{name}" -d
/var/lib/%{name} %{name} &>/dev/null ||:
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 = 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%files
%defattr(-,root,root)
%doc CHANGELOG TODO examples/*.cfg doc/haproxy-en.txt doc/haproxy-fr.txt
doc/architecture.txt doc/configuration.txt
%doc %{_mandir}/man1/%{name}.1*
%attr(0755,root,root) %{_sbindir}/%{name}
%dir %{_sysconfdir}/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.cfg
%attr(0755,root,root) %config %{_sysconfdir}/init.d/%{name}
%{_sbindir}/rchaproxy
%changelog
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |