Re: [opensuse-packaging] Which dependencies should I set?

2007-12-09 Thread Christian Boltz
Hello,

thanks for all the suggestions.

on Mittwoch, 5. Dezember 2007, Adrian Schröter wrote:
[...]
> I would go with Recommends: in this case. Installing with YaST/zypper
> would install them, but you can deinstall the packages without
> breaking dependencies.

That's what I'll do.
(and Requires: php_any_db for suse_version > 1030 - thanks Cristian for 
adding this.)

However there's the problem left that Recommends: is not supported by 
other distributions (according to some failed build logs ;-)
I'm afraid those will get packages without proper dependencies, to avoid 
that unused packages have to be installed.

@darix: Yes, technically subpackages are the best solution. But creating 
them just to have "or" dependencies is not worth it IMHO.

Is there a feature request open to allow "Requires: foo OR bar"?


Regards,

Christian Boltz
-- 
Was hat ein Revolver mit Windows 98 gemeinsam?
Solange sie nicht geladen sind, sind sie harmlos.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] Which dependencies should I set?

2007-12-06 Thread Cristian Rodríguez
Lars Vogdt escribió:
> As  these two are the most supported databases in the open source world, 
> we should perhaps also think about a virtual provides for this two at 
> least. 

That's the way that will be used in openSUSE 11 ;)

> Whats the minimal SQL standard both support? 
> Perhaps we can add a virtual provides like "Provides: SQL2" 
> or "Provides: SQL-92" - so an application with a generic SQL interface 
> just have to require a SQL-92 compatible database...

not very useful in the particular case, since the condition is not the
used SQL standard but about what particualr PHP driver the application
supports..


-- 
"The only thing that interferes with my learning is my education." -
Albert Einstein

Cristian Rodríguez R.
Platform/OpenSUSE - Core Services
SUSE LINUX Products GmbH
Research & Development
http://www.opensuse.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] Which dependencies should I set?

2007-12-06 Thread Michal Marek
Christian Boltz wrote:
> Hello,
> 
> I have an interesting question: Which dependencies should I set for 
> Postfixadmin? (package is postfixadmin-svn in home:cboltz, specfile is 
> attached for easier access)
> 
> Short summary:
> - Postfixadmin is a PHP web interface, used for administration of 
>   virtual domains in postfix
> - it can use MySQL and PostgreSQL as database
> 
> Now to the dependency problems:
> - php-mysql and/or php-pgsql? One of them is always unused, but you 
>   never know which one in advance (from RPM's POV)
> - Should I require MySQL and/or PostgreSQL? You never know which one is 
>   used, and accessing the database on another machine is also possible, 
>   so technically none of them is really needed.
> - Should I require Postfix? Sure, Postfixadmin is used to administrate 
>   it, but it's the same as with MySQL: It could run on another machine.

Hmm, wouldn't that be a nice use-case for patterns / YMPs? ;-)

http://en.opensuse.org/Build_Service_Tutorial#Create_Patterns

Michal
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] Which dependencies should I set?

2007-12-06 Thread Marcus Rueckert
On 2007-12-06 12:27:32 +0100, Lars Vogdt wrote:
> On Donnerstag, 6. Dezember 2007 03:48:17 Cristian Rodríguez wrote:
> > Christian Boltz escribió:
> > > - php-mysql and/or php-pgsql? One of them is always unused, but you
> > >   never know which one in advance (from RPM's POV)
> >
> > Both now provides php_any_db virtual package.
> 
> This is one step - but what about the databases themselves?
> Currently MySQL provides mysql, PostGreSQL provides postgresql - what 
> should a package recommend, which runs with both databases?
> 
> As  these two are the most supported databases in the open source world, 
> we should perhaps also think about a virtual provides for this two at 
> least. 
> 
> Whats the minimal SQL standard both support? 
> Perhaps we can add a virtual provides like "Provides: SQL2" 
> or "Provides: SQL-92" - so an application with a generic SQL interface 
> just have to require a SQL-92 compatible database...

package: postfixadmin-mysql
 Requires: php5-mysql
 Requires: postfixadmin-php
 Recommends: mysql

package: postfixadmin-pgsql
 Requires: php5-pgsql
 Requires: postfixadmin-php
 Recommends: postgresql-server

package: postfixadmin-php
 Recommends: postfix mod_php_any


if you really want you can add a "Provides: postfixadmin_backend" and
add an empty postfixadmin package that requires postfixadmin_backend.

just my 2 cents

darix

-- 
   openSUSE - SUSE Linux is my linux
   openSUSE is good for you
   www.opensuse.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] Which dependencies should I set?

2007-12-06 Thread Lars Vogdt
On Donnerstag, 6. Dezember 2007 03:48:17 Cristian Rodríguez wrote:
> Christian Boltz escribió:
> > - php-mysql and/or php-pgsql? One of them is always unused, but you
> >   never know which one in advance (from RPM's POV)
>
> Both now provides php_any_db virtual package.

This is one step - but what about the databases themselves?
Currently MySQL provides mysql, PostGreSQL provides postgresql - what 
should a package recommend, which runs with both databases?

As  these two are the most supported databases in the open source world, 
we should perhaps also think about a virtual provides for this two at 
least. 

Whats the minimal SQL standard both support? 
Perhaps we can add a virtual provides like "Provides: SQL2" 
or "Provides: SQL-92" - so an application with a generic SQL interface 
just have to require a SQL-92 compatible database...

Regards,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] Which dependencies should I set?

2007-12-05 Thread Cristian Rodríguez
Christian Boltz escribió:

> - php-mysql and/or php-pgsql? One of them is always unused, but you 
>   never know which one in advance (from RPM's POV)

Both now provides php_any_db virtual package.




-- 
"The only thing that interferes with my learning is my education." -
Albert Einstein

Cristian Rodríguez R.
Platform/OpenSUSE - Core Services
SUSE LINUX Products GmbH
Research & Development
http://www.opensuse.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] Which dependencies should I set?

2007-12-05 Thread Adrian Schröter
On Tuesday 04 December 2007 23:42:32 wrote Christian Boltz:
> Hello,
>
> I have an interesting question: Which dependencies should I set for
> Postfixadmin? (package is postfixadmin-svn in home:cboltz, specfile is
> attached for easier access)
>
> Short summary:
> - Postfixadmin is a PHP web interface, used for administration of
>   virtual domains in postfix
> - it can use MySQL and PostgreSQL as database
>
> Now to the dependency problems:
> - php-mysql and/or php-pgsql? One of them is always unused, but you
>   never know which one in advance (from RPM's POV)
> - Should I require MySQL and/or PostgreSQL? You never know which one is
>   used, and accessing the database on another machine is also possible,
>   so technically none of them is really needed.
> - Should I require Postfix? Sure, Postfixadmin is used to administrate
>   it, but it's the same as with MySQL: It could run on another machine.

I would go with Recommends: in this case. Installing with YaST/zypper would 
install them, but you can deinstall the packages without breaking 
dependencies.

> Postfixadmin also comes with a vacation script, which needs a
> user "vacation" and some additions to the postfix config.
>
> - should I create the user "vacation" in %pre?
> - if yes, should I delete it again in %preun? How to avoid this on
>   package updates?
>
> - is it a good idea to add some lines to /etc/postfix/master.cf auto-
>   matically ("grep vacation master.cf || cat some_lines >> master.cf")
>   or should I let this to the user?
>
>
> Other packaging questions:
>
> - setup.php is installed by the package, but needs to be deleted to make
>   Postfixadmin work. Is there any special trick how to handle this in
>   RPM?
>
> - any other comments on the specfile are also welcome ;-)
>
> I'm quite sure there is no "perfect" solution for the above questions,
> but some hints about good practise would be welcome.
>
>
> Regards,
>
> Christian Boltz



-- 

Adrian Schroeter
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] Which dependencies should I set?

2007-12-04 Thread Cristian Rodríguez
Christian Boltz escribió:

> Now to the dependency problems:
> - php-mysql and/or php-pgsql? One of them is always unused, but you 
>   never know which one in advance (from RPM's POV)

There is something missing, that is more a bug than anything else..
php-pgsql and php.mysql should Provides: php-database-support or
something, please open a bug report and assign it to me in order to
avoid it getting lost.

> - Should I require MySQL and/or PostgreSQL? You never know which one is 
>   used, and accessing the database on another machine is also possible, 
>   so technically none of them is really needed.

Neither of those.

> - Should I require Postfix? Sure, Postfixadmin is used to administrate 
>   it, but it's the same as with MySQL: It could run on another machine.

PHP requires an smtp_daemon but as you say the server to be administered
can reside in other machine..

> - setup.php is installed by the package, but needs to be deleted to make 
>   Postfixadmin work. Is there any special trick how to handle this in 
>   RPM?

Should setup.php be ex3ecuted manually by the user in order to configure
sth ? if so, the deleting of the file is up to the user.


-- 
"The only thing that interferes with my learning is my education." -
Albert Einstein

Cristian Rodríguez R.
Platform/OpenSUSE - Core Services
SUSE LINUX Products GmbH
Research & Development
http://www.opensuse.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] Which dependencies should I set?

2007-12-04 Thread Cristian Rodríguez
Christian Boltz escribió:

> Now to the dependency problems:
> - php-mysql and/or php-pgsql? One of them is always unused, but you 
>   never know which one in advance (from RPM's POV)

There is something missing, that is more a bug than anything else..
php-pgsql and php.mysql should Provides: php-database-support or
something, please open a bug report and assign it to me in order to
avoid it getting lost.

> - Should I require MySQL and/or PostgreSQL? You never know which one is 
>   used, and accessing the database on another machine is also possible, 
>   so technically none of them is really needed.

Neither of those.

> - Should I require Postfix? Sure, Postfixadmin is used to administrate 
>   it, but it's the same as with MySQL: It could run on another machine.

PHP requires an smtp_daemon but as you say the server to be administered
can reside in other machine..

> - setup.php is installed by the package, but needs to be deleted to make 
>   Postfixadmin work. Is there any special trick how to handle this in 
>   RPM?

Should setup.php be ex3ecuted manually by the user in order to configure
the sth ? if so, the deleting of the file is up to the user.


-- 
"The only thing that interferes with my learning is my education." -
Albert Einstein

Cristian Rodríguez R.
Platform/OpenSUSE - Core Services
SUSE LINUX Products GmbH
Research & Development
http://www.opensuse.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[opensuse-packaging] Which dependencies should I set?

2007-12-04 Thread Christian Boltz
Hello,

I have an interesting question: Which dependencies should I set for 
Postfixadmin? (package is postfixadmin-svn in home:cboltz, specfile is 
attached for easier access)

Short summary:
- Postfixadmin is a PHP web interface, used for administration of 
  virtual domains in postfix
- it can use MySQL and PostgreSQL as database

Now to the dependency problems:
- php-mysql and/or php-pgsql? One of them is always unused, but you 
  never know which one in advance (from RPM's POV)
- Should I require MySQL and/or PostgreSQL? You never know which one is 
  used, and accessing the database on another machine is also possible, 
  so technically none of them is really needed.
- Should I require Postfix? Sure, Postfixadmin is used to administrate 
  it, but it's the same as with MySQL: It could run on another machine.

Postfixadmin also comes with a vacation script, which needs a 
user "vacation" and some additions to the postfix config.

- should I create the user "vacation" in %pre?
- if yes, should I delete it again in %preun? How to avoid this on 
  package updates?

- is it a good idea to add some lines to /etc/postfix/master.cf auto-
  matically ("grep vacation master.cf || cat some_lines >> master.cf")
  or should I let this to the user?


Other packaging questions:

- setup.php is installed by the package, but needs to be deleted to make 
  Postfixadmin work. Is there any special trick how to handle this in 
  RPM?

- any other comments on the specfile are also welcome ;-)

I'm quite sure there is no "perfect" solution for the above questions, 
but some hints about good practise would be welcome.


Regards,

Christian Boltz
-- 
There are no bugs expected after Beta3, that's why it is called RC.
[Jan Engelhardt]
Name: postfixadmin-svn
Version: 2.1.9.257
Release: 1
License: GPL
URL: http://postfixadmin.sourceforge.net/
Group: Productivity/Networking/Web/Frontends
Source0: %{name}-%{version}.tar.bz2
BuildArch: noarch
#Requires: httpd, postfix, php, mysql-server
Requires: mod_php_any php-mysql 
Requires: /usr/sbin/sendmail
Requires: perl-DBD-MySQL perl-Mail-Sendmail perl-MIME-tools perl-Email-Valid 
perl-MIME-EncWords perl-MIME-Charset
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build

Summary: Postfix Admin is a Web Based Management tool created for Postfix

%if %{defined fedora_version}
BuildRequires: httpd-devel
%define serverroot %(/usr/sbin/apxs -q datadir 2>/dev/null || /usr/sbin/apxs -q 
PREFIX)/htdocs/
%else
BuildRequires:  apache2-devel
%define serverroot %(/usr/sbin/apxs2 -q datadir 2>/dev/null || /usr/sbin/apxs2 
-q PREFIX)/htdocs/
Recommends: postfix
Suggests: php-pgsql
%endif

%description
Postfixadmin is a PHP based application that handles Postfix Style Virtual 
Domains and
Users that are stored in MySQL.
Postfix Admin supports:
- Virtual Mailboxes / Virtual Aliases / Forwarders.
- Domain to Domain forwarding / Catch-All.
- Vacation (auto-response) for Virtual Mailboxes.
- Quota / Alias & Mailbox limits per domain.
- Backup MX.
- Packaged with over 25 languages.

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

%build
echo "*** serverroot: %{serverroot} ***"
#find . -type d -exec rm -rf {}/.svn \;

%install
#rm -rf $RPM_BUILD_ROOT
mkdir -p -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
#mkdir -p -m0755 $RPM_BUILD_ROOT%{_datadir}/%{name}
mkdir -p -m0755 $RPM_BUILD_ROOT%{serverroot}/%{name}
mkdir -p -m0755 $RPM_BUILD_ROOT%{_var}/spool/vacation

# install the config files
#install -m 0640 config.inc.php.sample 
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.inc.php
#ln -s ../../../..%{_sysconfdir}/%{name}/config.inc.php \
#$RPM_BUILD_ROOT%{_datadir}/%{name}/config.inc.php

# install index.php
install -m 0644 *.php *.css *.txt $RPM_BUILD_ROOT%{serverroot}/%{name}/
# we already check setup (at least i hope so:-)
#mv $RPM_BUILD_ROOT%{_datadir}/%{name}/setup.php 
$RPM_BUILD_ROOT%{_datadir}/%{name}/setup.php.ori

mv VIRTUAL_VACATION/vacation.pl $RPM_BUILD_ROOT%{_var}/spool/vacation/

# copy over the rest
for d in admin images languages templates users; do
cp -rp $d $RPM_BUILD_ROOT%{serverroot}/%{name}/
done

# install the config file
#mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
#install -m 644 $RPM_SOURCE_DIR/%{name}.conf \
#   $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/

%clean
#rm -rf $RPM_BUILD_ROOT

#%pre
#if ! id vacation > /dev/null 2>&1 ; then
#/usr/sbin/useradd -c "Virtual Vacation" -d %{_var}/spool/vacation -s 
/sbin/nologin -M -r vacation 2>/dev/null
#fi
#if [ -z "`grep vacation /etc/postfix/master.cf 2>/dev/null`" ]; then
#%{__cat} <<'EOF' >>/etc/postfix/master.cf
## Postfix Admin Vacation
#vacation   unix-   n   n   -   -   pipe
#   flags=Rq user=vacation argv=/var/spool/vacation/vacation.pl -f 
${sender} -- ${recipient}
#EOF
#fi

#%preun
#if [ $1 = 0 ]; then
#/usr/sbin/userdel vacation 2>/dev/null || :
#fi

%files
%defattr(-,root,root)
#%config %dir %{_sysconfdir}/%{name}
#%attr(640,root,www) %config(noreplace) %{_sysconfdir}/%{name}/*.