Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-28 Thread Pierre Chifflier

 You can find my git branch at
 http://www.baby-gnu.org/~nebu/archives/ocsinventory/dad.git/


Hi,

I've merged all your patches and uploaded new version 1.02-3 (my git 
tree is also updated).

Thanks,
Pierre


signature.asc
Description: This is a digitally signed message part.


Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-27 Thread Daniel Dehennin
New update to fix dbconfig-common use.
--8---cut here---start-8---
git log -p 
cfe79b057b4ad014d91c9fbbfe7e11827ece3f29..89e5ed7cacf472851ea54df22fab922a20bd2c99
 | git shortlog
Daniel Dehennin (1):
  Purging one package if both are installed remove
  /etc/dbconfig-common/ocsinventory-server.conf: each package must
  use its own name for dbconfig-common.

git diff --stat 
cfe79b057b4ad014d91c9fbbfe7e11827ece3f29..89e5ed7cacf472851ea54df22fab922a20bd2c99
 debian/ocsinventory-reports.config   |7 ++-
 debian/ocsinventory-reports.postinst |6 +++---
 debian/ocsinventory-reports.postrm   |4 ++--
 debian/ocsinventory-server.config|5 +
 4 files changed, 16 insertions(+), 6 deletions(-)
--8---cut here---end---8---
Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1


pgppQyp2SPWOD.pgp
Description: PGP signature


Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-26 Thread Daniel Dehennin
Le 5745 Septembre 1993, Pierre Chifflier a envoyé:
 I am interested on your patches, but I must admit I am quite lost
 concerning your patches .. There are quite a number, impacting different
 parts of the code etc.

 Could you send me separate patch series for each feature ? I see you are
 using some kind of distributed VCS, this could help a lot - if you want,
 I can clone the repository for ocs, I am using git + git-buildpackage.
 Since several patches are affecting the same files, rebasing + stashing
 the patches would be a good thing.Since several patches are affecting
 the same files, rebasing + stashing the patches would be a good thing.

Hello,

You can find my git branch at
http://www.baby-gnu.org/~nebu/archives/ocsinventory/dad.git/

--8---cut here---start-8---
git log -p 
9025d749678b6ae1cf0d555df08358b80547f9f4..cfe79b057b4ad014d91c9fbbfe7e11827ece3f29
 | git shortlog
Daniel Dehennin (3):

  Create two SQL scripts for database management.
  Disable manual DB setup.
  ocsinventory-reports use dbconfig-common.

git diff --stat 
9025d749678b6ae1cf0d555df08358b80547f9f4..cfe79b057b4ad014d91c9fbbfe7e11827ece3f29
 debian/conf/dbconfig.inc.php |5 +
 debian/conf/ocsreports.conf  |   17 +-
 debian/db/1.02   |  271 ++
 debian/db/mysql  |  655
 ++
 debian/ocsinventory-reports.config   |   25 +-
 debian/ocsinventory-reports.install  |1 +
 debian/ocsinventory-reports.links|6 +-
 debian/ocsinventory-reports.postinst |   39 ++-
 debian/ocsinventory-reports.postrm   |   14 +-
 debian/ocsinventory-server.install   |2 +
 10 files changed, 988 insertions(+), 47 deletions(-)
--8---cut here---end---8---

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1


pgp9xfc20MOML.pgp
Description: PGP signature


Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-25 Thread Daniel Dehennin
Le 5742 Septembre 1993, Daniel Dehennin a envoyé:
 Package: ocsinventory-server
 Version: 1.02-2
 Severity: normal

 Hello,

 This is the last patch of this bug report.

 It remove the use of install.php, the dbconfig.inc.php is now
 automatically generated by dbconfig-common.

[...]

I have a problem with this.
If I run dbc_go in postrm /etc/dbconfig-common/ocsinventory-server.conf
is removed.

Both packages needs the same configuration informations, and both of them
can be installed alone.

I'm looking for an issue.

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-25 Thread Daniel Dehennin
I have a solution for this issue:

   revno: 11
   committer: Daniel Dehennin daniel.dehen...@baby-gnu.org
   timestamp: Mon 2009-05-25 21:48:40 +0200
   branch nick: 1.02-create-db
   message: Do not run dbconfig-common postrm if an Ocsinventory package 
remains.
  
  * debian/ocsinventory-reports.postrm: Run dbc_go if ocsinventory-server
configuration file is not present.
  
  * debian/ocsinventory-server.postrm: Run dbc_go if ocsinventory-reports
configuration file is not present.

Patch attached.

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

=== modified file 'debian/ocsinventory-reports.postrm'
--- debian/ocsinventory-reports.postrm	2009-05-22 08:09:04 +
+++ debian/ocsinventory-reports.postrm	2009-05-25 19:44:48 +
@@ -13,7 +13,10 @@
 . /usr/share/debconf/confmodule
 db_version 2.0 || [ $? -lt 30 ]
 
-if [ -f /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql ]; then
+# Do not remove dbconfig-common settings if ocsinventory-server is
+# still installed
+if [ ! -f $confpath/ocsinventory.conf ] \
+[ -f /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql ]; then
 . /usr/share/dbconfig-common/dpkg/frontend.postrm.mysql
 dbc_go ocsinventory-server $@
 fi

=== modified file 'debian/ocsinventory-server.postrm'
--- debian/ocsinventory-server.postrm	2009-05-19 05:39:42 +
+++ debian/ocsinventory-server.postrm	2009-05-25 19:45:34 +
@@ -12,7 +12,10 @@
 . /usr/share/debconf/confmodule
 db_version 2.0 || [ $? -lt 30 ]
 
-if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
+# Do not remove dbconfig-common settings if ocsinventory-reports is
+# still installed
+if [ ! -f $confpath/ocsreports.conf ] \
+ [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
 . /usr/share/dbconfig-common/dpkg/postrm.mysql
 dbc_go ocsinventory-server $@
 fi



pgpx7ZE4wy05x.pgp
Description: PGP signature


Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-25 Thread Pierre Chifflier
On Mon, May 25, 2009 at 09:52:38PM +0200, Daniel Dehennin wrote:
 I have a solution for this issue:
 
revno: 11
committer: Daniel Dehennin daniel.dehen...@baby-gnu.org
timestamp: Mon 2009-05-25 21:48:40 +0200
branch nick: 1.02-create-db
message: Do not run dbconfig-common postrm if an Ocsinventory package 
 remains.
   
   * debian/ocsinventory-reports.postrm: Run dbc_go if ocsinventory-server
 configuration file is not present.
   
   * debian/ocsinventory-server.postrm: Run dbc_go if ocsinventory-reports
 configuration file is not present.
 
 Patch attached.
 

Hi Daniel,

I am interested on your patches, but I must admit I am quite lost
concerning your patches .. There are quite a number, impacting different
parts of the code etc.

Could you send me separate patch series for each feature ? I see you are
using some kind of distributed VCS, this could help a lot - if you want,
I can clone the repository for ocs, I am using git + git-buildpackage.
Since several patches are affecting the same files, rebasing + stashing
the patches would be a good thing.Since several patches are affecting
the same files, rebasing + stashing the patches would be a good thing.

Cheers,
Pierre



signature.asc
Description: Digital signature


Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-25 Thread Daniel Dehennin
Le 5745 Septembre 1993, Pierre Chifflier a envoyé:
 Hi Daniel,

Hello,

 I am interested on your patches, but I must admit I am quite lost
 concerning your patches .. There are quite a number, impacting different
 parts of the code etc.

 Could you send me separate patch series for each feature ? I see you are
 using some kind of distributed VCS, this could help a lot - if you want,
 I can clone the repository for ocs, I am using git + git-buildpackage.
 Since several patches are affecting the same files, rebasing + stashing
 the patches would be a good thing.Since several patches are affecting
 the same files, rebasing + stashing the patches would be a good thing.

No problem, I'll do this tomorrow.

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1


pgpN2ArGH84lx.pgp
Description: PGP signature


Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-22 Thread Daniel Dehennin
Package: ocsinventory-server
Version: 1.02-2
Severity: normal

Hello,

This is the last patch of this bug report.

It remove the use of install.php, the dbconfig.inc.php is now
automatically generated by dbconfig-common.

Log from my bzr repository:

   revno: 9
   committer: Daniel Dehennin daniel.dehen...@ac-caen.fr
   timestamp: Fri 2009-05-22 10:09:04 +0200
   branch nick: 1.02-create-db
   message: ocsinventory-reports provides a dbconfig-common based 
dbconfig.inc.php.
  
  * debian/conf/dbconfig.inc.php: Add dbconfig-common template.
  
  * debian/ocsinventory-reports.install: Install the template.
  
  * debian/ocsinventory-reports.config: Remove htpasswd handling.
Add dbconfig-common frontend.
  
  * debian/ocsinventory-reports.postinst: Do not add write mode in
/var/lib/ocsinventory-server/config for php.
Generate the config file from the template and install it in
/etc/ocsinventory/.
Provide default values if dbconfig-common is not use.

  * debian/ocsinventory-reports.links: Fix links, dbconfig.inc.php is
placed in /etc/ocsinventory.
  
  * debian/ocsinventory-reports.postrm: Use dbconfig-common frontend.
Remove dbconfig-common configuration file.
htpasswd.setup is not created anymore.

   revno: 8
   committer: Daniel Dehennin daniel.dehen...@baby-gnu.org
   timestamp: Thu 2009-05-21 11:59:10 +0200
   branch nick: 1.02-create-db
   message: htpasswd access is now useless.
  
  * debian/ocsinventory-reports.postinst: Do not generate an htpasswd for 
install.php.

   revno: 7
   committer: Daniel Dehennin daniel.dehen...@baby-gnu.org
   timestamp: Thu 2009-05-21 11:52:24 +0200
   branch nick: 1.02-create-db
   message: install.php is useless now.
  
  * debian/conf/ocsreports.conf: Deny access to install.php.

Regards.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (90, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-rc6+hati.1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
=== added file 'debian/conf/dbconfig.inc.php'
--- debian/conf/dbconfig.inc.php1970-01-01 00:00:00 +
+++ debian/conf/dbconfig.inc.php2009-05-21 10:12:35 +
@@ -0,0 +1,5 @@
+?php 
+$_SESSION[SERVEUR_SQL]=_DBC_DBSERVER_;
+$_SESSION[COMPTE_BASE]=_DBC_DBUSER_;
+$_SESSION[PSWD_BASE]=_DBC_DBPASS_;
+?

=== modified file 'debian/conf/ocsreports.conf'
--- debian/conf/ocsreports.conf 2009-05-19 05:39:42 +
+++ debian/conf/ocsreports.conf 2009-05-21 09:51:41 +
@@ -11,21 +11,10 @@
Options Indexes FollowSymLinks
DirectoryIndex index.php
 
-   # Authorize for setup
+   # Disable install.php
Files install.php
-# For Apache 1.3 and 2.0
-IfModule mod_auth.c
-AuthType Basic
-AuthName OCS Reports Setup
-AuthUserFile /etc/ocsinventory/htpasswd.setup
-/IfModule
-# For Apache 2.2
-IfModule mod_authn_file.c
-AuthType Basic
-AuthName OCS Reports Setup
-AuthUserFile /etc/ocsinventory/htpasswd.setup
-/IfModule
-Require valid-user
+Order deny,allow
+   Deny from all
/Files
 
IfModule mod_php4.c

=== modified file 'debian/ocsinventory-reports.install'
--- debian/ocsinventory-reports.install 2009-05-19 05:39:42 +
+++ debian/ocsinventory-reports.install 2009-05-21 10:02:51 +
@@ -1,3 +1,4 @@
 ocsreports  usr/share/ocsinventory-server
 #ipdiscover-util/ipdiscover-util.pl  
usr/share/ocsinventory-server/ocsreports
 debian/conf/ocsreports.conf etc/ocsinventory
+debian/conf/dbconfig.inc.php   usr/share/ocsinventory-server/files

=== modified file 'debian/ocsinventory-reports.links'
--- debian/ocsinventory-reports.links   2009-05-19 05:39:42 +
+++ debian/ocsinventory-reports.links   2009-05-21 10:13:34 +
@@ -1,3 +1,3 @@
-var/lib/ocsinventory-server/config/dbconfig.inc.php
usr/share/ocsinventory-server/ocsreports/dbconfig.inc.php
-var/lib/ocsinventory-server/config/dbconfig.inc.php
etc/ocsinventory/dbconfig.inc.php
-var/lib/ocsinventory-server/ipd
usr/share/ocsinventory-server/ocsreports/ipd
+etc/ocsinventory/dbconfig.inc.php
usr/share/ocsinventory-server/ocsreports/dbconfig.inc.php
+etc/ocsinventory/dbconfig.inc.php
var/lib/ocsinventory-server/config/dbconfig.inc.php
+var/lib/ocsinventory-server/ipd  
usr/share/ocsinventory-server/ocsreports/ipd

=== modified file 'debian/ocsinventory-reports.postinst'
--- debian/ocsinventory-reports.postinst2009-05-19 05:39:42 +
+++ debian/ocsinventory-reports.postinst2009-05-21 10:11:54 +
@@ -15,31 +15,35 @@
 varpath=/var/lib/ocsinventory-server
 confpath=/etc/ocsinventory
 conffile=ocsreports.conf
+

Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-22 Thread Daniel Dehennin
The patch file was not complete.

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
=== added file 'debian/conf/dbconfig.inc.php'
--- debian/conf/dbconfig.inc.php	1970-01-01 00:00:00 +
+++ debian/conf/dbconfig.inc.php	2009-05-21 10:12:35 +
@@ -0,0 +1,5 @@
+?php 
+$_SESSION[SERVEUR_SQL]=_DBC_DBSERVER_;
+$_SESSION[COMPTE_BASE]=_DBC_DBUSER_;
+$_SESSION[PSWD_BASE]=_DBC_DBPASS_;
+?

=== modified file 'debian/conf/ocsreports.conf'
--- debian/conf/ocsreports.conf	2009-05-19 05:39:42 +
+++ debian/conf/ocsreports.conf	2009-05-21 09:51:41 +
@@ -11,21 +11,10 @@
Options Indexes FollowSymLinks
DirectoryIndex index.php
 
-   # Authorize for setup
+   # Disable install.php
Files install.php
-# For Apache 1.3 and 2.0
-IfModule mod_auth.c
-AuthType Basic
-AuthName OCS Reports Setup
-AuthUserFile /etc/ocsinventory/htpasswd.setup
-/IfModule
-# For Apache 2.2
-IfModule mod_authn_file.c
-AuthType Basic
-AuthName OCS Reports Setup
-AuthUserFile /etc/ocsinventory/htpasswd.setup
-/IfModule
-Require valid-user
+Order deny,allow
+	Deny from all
/Files
 
IfModule mod_php4.c

=== modified file 'debian/ocsinventory-reports.config'
--- debian/ocsinventory-reports.config	2009-05-19 05:39:42 +
+++ debian/ocsinventory-reports.config	2009-05-22 08:54:08 +
@@ -1,16 +1,23 @@
-#!/bin/sh
+#!/bin/bash 
 
 set -e
 
-# Only on new install
-if [ $2 =  ]; then
-. /usr/share/debconf/confmodule
-db_version 2.0
-
-if [ ! -f /etc/ocsinventory/htpasswd.setup ]; then
-db_input low ocsinventory-reports/setup-username || true
-db_input low ocsinventory-reports/setup-password || true
-fi
-
-db_go || true
+action=$1
+version=$2
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0 || [ 0 -lt 30 ]
+
+if [ -f /usr/share/dbconfig-common/dpkg/frontend.config.mysql ]; then
+  . /usr/share/dbconfig-common/dpkg/frontend.config.mysql
+
+  # hints for dbconfig
+  dbc_dbname=ocsweb
+  dbc_dbuser=ocs
+
+  dbc_go ocsinventory-server $@
 fi
+
+db_go
+

=== modified file 'debian/ocsinventory-reports.install'
--- debian/ocsinventory-reports.install	2009-05-19 05:39:42 +
+++ debian/ocsinventory-reports.install	2009-05-21 10:02:51 +
@@ -1,3 +1,4 @@
 ocsreports  usr/share/ocsinventory-server
 #ipdiscover-util/ipdiscover-util.pl  usr/share/ocsinventory-server/ocsreports
 debian/conf/ocsreports.conf etc/ocsinventory
+debian/conf/dbconfig.inc.php		usr/share/ocsinventory-server/files

=== modified file 'debian/ocsinventory-reports.links'
--- debian/ocsinventory-reports.links	2009-05-19 05:39:42 +
+++ debian/ocsinventory-reports.links	2009-05-21 10:13:34 +
@@ -1,3 +1,3 @@
-var/lib/ocsinventory-server/config/dbconfig.inc.phpusr/share/ocsinventory-server/ocsreports/dbconfig.inc.php
-var/lib/ocsinventory-server/config/dbconfig.inc.phpetc/ocsinventory/dbconfig.inc.php
-var/lib/ocsinventory-server/ipdusr/share/ocsinventory-server/ocsreports/ipd
+etc/ocsinventory/dbconfig.inc.phpusr/share/ocsinventory-server/ocsreports/dbconfig.inc.php
+etc/ocsinventory/dbconfig.inc.phpvar/lib/ocsinventory-server/config/dbconfig.inc.php
+var/lib/ocsinventory-server/ipd  usr/share/ocsinventory-server/ocsreports/ipd

=== modified file 'debian/ocsinventory-reports.postinst'
--- debian/ocsinventory-reports.postinst	2009-05-19 05:39:42 +
+++ debian/ocsinventory-reports.postinst	2009-05-22 08:54:08 +
@@ -12,34 +12,39 @@
 
   # only on a new install
   if [ $2 =  ]; then
+pkgpath=/usr/share/ocsinventory-server
 varpath=/var/lib/ocsinventory-server
 confpath=/etc/ocsinventory
 conffile=ocsreports.conf
+dbconffile=dbconfig.inc.php
 
 # Allow php to write there
-for dirname in config ipd download; do
+for dirname in ipd download; do
   chown www-data:www-data $varpath/$dirname
   chmod g+w   $varpath/$dirname
 done
   
-# Generate an htpasswd file for the web based setup
-if [ ! -f $confpath/htpasswd.setup ]; then
-  touch $confpath/htpasswd.setup
-  chgrp www-data $confpath/htpasswd.setup
-  chmod 0640 $confpath/htpasswd.setup
-  db_get ocsinventory-reports/setup-username
-  setup_username=${RET:-admin}
-  db_get ocsinventory-reports/setup-password
-  if [ -n $RET ]; then
-setup_password=`perl -le 'print crypt($ARGV[0], join(, map{(a..z,A..Z,0..9)[int(rand(62))]}(1..2)))' $RET`
-  else
-setup_password=*
-  fi
-  echo $setup_username:$setup_password  $confpath/htpasswd.setup
-  db_reset ocsinventory-reports/setup-username || true
-  db_reset ocsinventory-reports/setup-password 

Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-20 Thread Daniel Dehennin
Package: ocsinventory-server
Severity: wishlist
Tags: patch

Hello,

Following the bug #512660 I make some changes to let ocsinventory-server
create the database.

I use dbconfig-common with two SQL scripts:
 - debian/db/mysql: for a new installation
 - debian/db/1.02: for an upgrade from 1.01

I don't have a 1.0 and previous version database to make the diffs and I
suppose that it's not a serious problem since they are not packaged.

The process is not ended for now, I need to modify ocsinventory-reports
to automatically create dbconfig.inc.php (with dbconfig-common).

I attach a gziped diff, I publish my developpement in a bzr repository
at http://www.baby-gnu.org/~nebu/archives/ocsinventory/server/dad/

Regards.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (90, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-rc6+hati.1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

=== added directory 'debian/db'
=== added file 'debian/db/1.02'
--- debian/db/1.02	1970-01-01 00:00:00 +
+++ debian/db/1.02	2009-05-20 10:21:06 +
@@ -0,0 +1,271 @@
+-- -*- sql -*-
+USE ocsweb;
+
+--  
+-- Create new schema
+-- 
+CREATE TABLE `blacklist_macaddresses` (
+`ID` INTEGER auto_increment,
+`MACADDRESS` VARCHAR(255),
+PRIMARY KEY (`MACADDRESS`),
+KEY `ID` (`ID`)
+) ENGINE = MYISAM;
+
+CREATE TABLE `blacklist_serials` (
+`ID` INTEGER auto_increment,
+`SERIAL` VARCHAR(255),
+PRIMARY KEY (`SERIAL`),
+KEY `ID` (`ID`)
+) ENGINE = MYISAM;
+
+CREATE TABLE `download_affect_rules` (
+`ID` int(11) NOT NULL auto_increment,
+`RULE` int(11) NOT NULL,
+`PRIORITY` int(11) NOT NULL,
+`CFIELD` varchar(20) collate latin1_general_ci NOT NULL,
+`OP` varchar(20) collate latin1_general_ci NOT NULL,
+`COMPTO` varchar(20) collate latin1_general_ci NOT NULL,
+`SERV_VALUE` varchar(20) collate latin1_general_ci default NULL,
+`RULE_NAME` varchar(200) collate latin1_general_ci NOT NULL,
+PRIMARY KEY (`ID`)
+) ENGINE=MyISAM;
+
+CREATE TABLE `download_servers` (
+`HARDWARE_ID` int(11) NOT NULL,
+`URL` varchar(250) collate latin1_general_ci NOT NULL,
+`ADD_PORT` int(11) NOT NULL,
+`ADD_REP` varchar(250) collate latin1_general_ci NOT NULL,
+`GROUP_ID` int(11) NOT NULL,
+PRIMARY KEY (`HARDWARE_ID`)
+) ENGINE=MyISAM;
+
+CREATE TABLE `engine_mutex` (
+`NAME` varchar(255) NOT NULL default '',
+`PID` int(11) default NULL,
+`TAG` varchar(255) NOT NULL default '',
+PRIMARY KEY (`NAME`, `TAG`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1;
+
+CREATE TABLE `engine_persistent` (
+`ID` int(11) NOT NULL auto_increment,
+`NAME` varchar(255) NOT NULL default '',
+`IVALUE` int(11) default NULL,
+`TVALUE` varchar(255) default NULL,
+UNIQUE KEY `NAME` (`NAME`),
+KEY `ID` (`ID`)
+) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
+
+CREATE TABLE `groups` (
+`HARDWARE_ID` integer default NULL,
+`REQUEST` longtext,
+`CREATE_TIME` INT default 0,
+`REVALIDATE_FROM` INT default 0,
+PRIMARY KEY (`HARDWARE_ID`)
+) ENGINE=MYISAM;
+
+CREATE TABLE `groups_cache` (
+`HARDWARE_ID` integer NOT NULL default 0,
+`GROUP_ID` integer NOT NULL default 0,
+`STATIC` integer default 0,
+PRIMARY KEY (`HARDWARE_ID`, `GROUP_ID`)
+) ENGINE=MYISAM;
+
+CREATE TABLE `hardware_osname_cache` (
+`ID` INTEGER auto_increment,
+`OSNAME` VARCHAR(255) UNIQUE,
+PRIMARY KEY (`ID`)
+) ENGINE = MYISAM;
+
+CREATE TABLE `prolog_conntrack` (
+`ID` int(11) NOT NULL auto_increment,
+`DEVICEID` varchar(255) default NULL,
+`TIMESTAMP` int(11) default NULL,
+`PID` int(11) default NULL,
+KEY `ID` (`ID`),
+KEY `DEVICEID` (`DEVICEID`)
+) ENGINE=MEMORY;
+
+CREATE TABLE `softwares_name_cache` (
+`ID` INTEGER auto_increment,
+`NAME` VARCHAR(255) UNIQUE,
+PRIMARY KEY (`ID`)
+) ENGINE = MYISAM;
+
+CREATE TABLE `tags` (
+`Tag` VARCHAR(255) NOT NULL default '',
+`Login` VARCHAR(255) NOT NULL default '',
+PRIMARY KEY (`Tag`, `Login`),
+KEY `Tag` (`Tag`),
+KEY `Login` (`Login`)
+) ENGINE=MyISAM;
+
+CREATE TABLE `registry_name_cache` (
+`ID` INTEGER auto_increment,
+`NAME` VARCHAR(255) UNIQUE,
+PRIMARY KEY (`ID`)
+) ENGINE = MYISAM;
+
+CREATE TABLE `registry_regvalue_cache` (
+`ID` INTEGER auto_increment,
+`REGVALUE` VARCHAR(255) UNIQUE,
+PRIMARY KEY (`ID`)
+) ENGINE = MYISAM;
+
+
+--
+-- Update existing schemas
+--
+
+-- accesslog
+ALTER TABLE `accesslog` ADD KEY `USERID` (`USERID`);
+
+-- devices
+ALTER TABLE `devices` ADD KEY `IVALUE` (`IVALUE`);
+ALTER TABLE `devices` ADD KEY `NAME` (`NAME`);
+
+-- download_enable
+ALTER TABLE `download_enable` ADD COLUMN `SERVER_ID` INTEGER;
+ALTER TABLE `download_enable` ADD COLUMN 

Bug#529595: ocsinventory-server: Let ocsinventory-server create the database

2009-05-20 Thread Daniel Dehennin
Le 5740 Septembre 1993, Daniel Dehennin a envoyé:
 Package: ocsinventory-server

[...]

This mode may have one pitfall if OCSinventory supports load balancing
between several communication servers: the database will be create more
than one time.

Maybe all the database handling should be handled by the report package,
permitting to install several ocsinventory-server on a single database
backend?

Regards.
-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1


pgpOKnrhLeOoM.pgp
Description: PGP signature