On Saturday 20 of December 2003 15:09, Jacek Konieczny wrote:
> On Sat, Dec 20, 2003 at 01:31:15PM +0100, Paweł Sikora wrote:
> > > Jednak wynik nie będzie mi się podobał (wymaganie mysql), ale to nie
> > > wina naszych pakietów, ale samego cyrus-sasl, który nie przewiduje
> > > rozdziału tych dwóch backendów.
> >
> > jest jeszcze jedna opcja:
> > wykorzystujac bcondy do genreacji roznych paczek:
> > - cyrus-sasl-mysql    (-pg +my)
> > - cyrus-sasl-pgsql    (+pg -my)
> > - cyrus-sasl-sql      (+pg +my)
> > co o tym myslisz?
>
> Wydaje się sensowne.


> Oczywiście cyrus-sasl-sql powinien mieć: 
> Provides: cyrus-sasl-mysql i cyrus-sasl-pgsql.

w jakim celu?
nie zauwazylem, zeby jakas paczka wymagala takiego providera
# egrep -i 'cyrus-sasl-.*sql' *.spec => no result.

zerknij na poprawionego speca.

teraz teoretycznie nie ma takiej mozliwosci, aby rownoczesnie zbudowaly
sie paczki -mysql, -pgsql oraz -sql. natomiast jesli ktos sobie przebuduje
z roznymi bcondami i bedzie chcial nadpisac libsql.so to rpm uraczy
go komunikatem o konflikcie pakietow. wydaje mi sie, ze tak jest ok.
ktos potrzebuje, to sobie przekompiluje, a domyslnie bedzie wsparcie
na obie bazy sql.

ja jeszcze zerkne w kod i moze uda mi sie rozbic ten plugin na dwa.
wtedy to bedzie pelen wypas, a nie takie robienie na okolo :)

-- 
The only thing necessary for the triumph of evil
  is for good men to do nothing.
                                           - Edmund Burke
--- cyrus-sasl.spec.orig	2003-12-04 11:27:29.000000000 +0100
+++ cyrus-sasl.spec	2003-12-20 16:36:17.000000000 +0100
@@ -2,17 +2,16 @@
 #
 # TODO:
 # - add ldap plugin from openldap sources
-# - pgsql? (but sql plugin would require both libs...)
 #
 # Conditional build:
 %bcond_without	ldap	# disable LDAP support for saslauthd
 %bcond_with	gssapi	# enable GSSAPI support for saslauthd and build gssapi plugin
-%bcond_without	mysql	# don't build mysql pluggin
-%bcond_with	pgsql	# don't build pgsql pluggin
-%bcond_with	srp	# build srp pluggin
+%bcond_without	mysql	# disable mysql support in the sql plugin
+%bcond_without	pgsql	# disable pgsql support in the sql plugin
+%bcond_with	srp	# build srp plugin
 %bcond_with	pwcheck	# build pwcheck helper (deprecated)
 %bcond_with	x509	# build x509 plugin (no sources in package???)
-#
+
 Summary:	The SASL library API for the Cyrus mail system
 Summary(pl):	Biblioteka Cyrus SASL
 Summary(pt_BR):	Implementaçăo da API SASL
@@ -345,29 +344,57 @@
 %description sasldb -l pl
 Wtyczka sasldb do Cyrus SASL.
 
+%if %{with mysql} && ! %{with pgsql}
 %package mysql
 Summary:	Cyrus SASL mysql plugin
 Summary(pl):	Wtyczka mysql do Cyrus SASL
 Group:		Libraries
 Requires:	%{name} = %{version}
+Requires:	mysql-libs
+Conflicts:	cyrus-sasl-pgsql
+Conflicts:	cyrus-sasl-sql
 
 %description mysql
 Cyrus SASL mysql plugin.
 
 %description mysql -l pl
 Wtyczka mysql do Cyrus SASL.
+%endif
 
+%if %{with pgsql} && ! %{with mysql}
 %package pgsql
 Summary:	Cyrus SASL PostgreSQL plugin
 Summary(pl):	Wtyczka PostgreSQL do Cyrus SASL
 Group:		Libraries
 Requires:	%{name} = %{version}
+Requires:	postgresql-libs
+Conflicts:	cyrus-sasl-mysql
+Conflicts:	cyrus-sasl-sql
 
 %description pgsql
 Cyrus SASL PostgreSQL plugin.
 
 %description pgsql -l pl
 Wtyczka PostgreSQL do Cyrus SASL.
+%endif
+
+%if %{with mysql} && %{with pgsql}
+%package sql
+Summary:	Cyrus SASL SQL plugin
+Summary(pl):	Wtyczka SQL do Cyrus SASL
+Group:		Libraries
+Requires:	%{name} = %{version}
+Requires:	mysql-libs
+Requires:	postgresql-libs
+Conflicts:	cyrus-sasl-mysql
+Conflicts:	cyrus-sasl-pgsql
+
+%description sql
+Cyrus SASL SQL plugin.
+
+%description sql -l pl
+Wtyczka SQL do Cyrus SASL.
+%endif
 
 %prep
 %setup -q
@@ -402,7 +429,9 @@
 	%{!?with_gssapi: --disable-gssapi} \
 	%{?with_gssapi: --enable-gssapi --with-gss_impl=heimdal} \
 	--enable-login \
+%if %{with mysql} || %{with pgsql}
 	--enable-sql \
+%endif
 	%{?with_srp: --enable-srp} \
 	--enable-static \
 	--with-configdir=%{_sysconfdir} \
@@ -529,18 +558,24 @@
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/sasl2/libsasldb.so*
 
-%if %{with mysql}
+%if %{with mysql} && ! %{with pgsql}
 %files mysql
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/sasl2/libsql*.so*
 %endif
 
-%if %{with pgsql}
+%if %{with pgsql} && ! %{with mysql}
 %files pgsql
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/sasl2/libsql*.so*
 %endif
 
+%if %{with mysql} && %{with pgsql}
+%files sql
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/sasl2/libsql*.so*
+%endif
+
 %if %{with srp}
 %files srp
 %defattr(644,root,root,755)

__________________________________________________________
nie pytaj co inni zrobili dla pld, pomysl ile sam zrobiles

Odpowiedź listem elektroniczym