--- ocsinventory-server-1.01.orig/debian/TODO +++ ocsinventory-server-1.01/debian/TODO @@ -0,0 +1,11 @@ +- allow apache1 web server +- tune up the 'purge' part of postrm scripts +- add a manpage for Ocsinventory_local.pl + and eventually link ip-discover-util.pl in /usr/bin + and add a manpage +- tune up ocsreports php configuration +- move files/oui.txt to /var/lib as it's a table + and even all 'files' subdir. +- add a notice about agent.exe in README.Debian +- add a notice about install.php creating an ocs + account in the database in README.Debian --- ocsinventory-server-1.01.orig/debian/ocsinventory-reports.templates +++ ocsinventory-server-1.01/debian/ocsinventory-reports.templates @@ -0,0 +1,23 @@ +Template: ocsinventory-reports/setup-username +Type: string +Default: admin +_Description: User name for web-based setup system: + OCS Reports comes with a web-based setup/upgrade script. + The script is located at http://localhost/ocsreports/install.php. + For security reasons it requires authorization. + . + Leave empty if you want to use the default user name 'admin'. + +Template: ocsinventory-reports/setup-password +Type: password +Default: +_Description: Password for web-based setup system: + OCS Reports comes with a web-based setup/upgrade script. + The script is located at http://localhost/ocsreports/install.php. + For security reasons it requires authorization. + . + You can manage the usernames and passwords with the `htpasswd' command. + They are stored in /etc/ocsinventory/htpasswd.setup file. + . + Leave empty if you want to disable access to the web-based setup. + --- ocsinventory-server-1.01.orig/debian/control +++ ocsinventory-server-1.01/debian/control @@ -0,0 +1,41 @@ +Source: ocsinventory-server +Section: web +Priority: extra +Maintainer: Pierre Chifflier +Uploaders: Eric Décornod +Build-Depends: debhelper (>= 5), quilt (>= 0.40), po-debconf +Standards-Version: 3.8.0 +Homepage: http://www.ocsinventory-ng.org/ + +Package: ocsinventory-server +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, apache2, libapache2-mod-perl2, libdbi-perl, libapache-dbi-perl, libdbd-mysql-perl, libcompress-zlib-perl, libxml-simple-perl, libnet-ip-perl, ucf, dbconfig-common +Recommends: ocsinventory-reports +Suggests: mysql-server, libsoap-lite-perl, ocsinventory-agent +Description: Hardware and software inventory tool (Communication Server) + Open Computer and Software Inventory Next Generation is an application + designed to help a network or system administrator keep track of the + computers configuration and software that are installed on the network. + . + Information about Hardware and Operating System are collected. + OCS Inventory is also able to detect all active devices on your network, + such as switch, router, network printer and unattended devices. + It also allows deploying softwares, commands or files on client computers. + . + This package contains the 'Communication Server' part. + +Package: ocsinventory-reports +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, apache2, php4 | php4-cgi | libapache2-mod-php4 | php5 | php5-cgi | libapache2-mod-php5, php4-mysql | php5-mysql, ucf, dbconfig-common +Recommends: ocsinventory-server, php5-gd | php4-gd, libdbi-perl, libdbd-mysql-perl, libnet-ip-perl, libxml-simple-perl, nmap, samba-common +Description: Hardware and software inventory tool (Administration Console) + Open Computer and Software Inventory Next Generation is an application + designed to help a network or system administrator keep track of the + computers configuration and software that are installed on the network. + . + Information about Hardware and Operating System are collected. + OCS Inventory is also able to detect all active devices on your network, + such as switch, router, network printer and unattended devices. + It also allows deploying softwares, commands or files on client computers. + . + This package contains the 'Administration Console' part. --- ocsinventory-server-1.01.orig/debian/ocsinventory-reports.postrm +++ ocsinventory-server-1.01/debian/ocsinventory-reports.postrm @@ -0,0 +1,58 @@ +#!/bin/sh +# postrm script for ocsinventory-server +# +# see: dh_installdeb(1) + +set -e + +varpath="/var/lib/ocsinventory-server" +confpath="/etc/ocsinventory" +conffile="ocsreports.conf" + +. /usr/share/debconf/confmodule +db_version 2.0 || [ $? -lt 30 ] + +if [ "$1" = "purge" ]; then + + for FILE in $confpath/$conffile $confpath/htpasswd.setup; do + # Taken from the ucf example postrm + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-old; do + rm -f $FILE$ext + done + rm -f $FILE + done + + # remove dbconfig.inc.php (created by install.php) + rm -f /var/lib/ocsinventory-server/config/dbconfig.inc.php || true + + rmdir --ignore-fail-on-non-empty /etc/ocsinventory || true +fi + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + + webservers="apache2" + for webserver in $webservers; do + webserver=${webserver%,} + if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/$conffile ]; then + rm -f /etc/$webserver/conf.d/$conffile + fi + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver reload || true + else + /etc/init.d/$webserver reload || true + fi + done + +fi + +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi + + +#DEBHELPER# + +exit 0 + + --- ocsinventory-server-1.01.orig/debian/ocsinventory-reports.postinst +++ ocsinventory-server-1.01/debian/ocsinventory-reports.postinst @@ -0,0 +1,64 @@ +#!/bin/sh +# postinst script for ocsinventory-server +# +# see: dh_installdeb(1) + +set -e + +. /usr/share/debconf/confmodule +db_version 2.0 || [ $? -lt 30 ] + +if [ "$1" = "configure" ]; then + + # only on a new install + if [ "$2" = "" ]; then + varpath="/var/lib/ocsinventory-server" + confpath="/etc/ocsinventory" + conffile="ocsreports.conf" + + # Allow php to write there + for dirname in config 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 || true + fi + + # link apache config files in apache's conf.d dir + webservers="apache2" + for webserver in $webservers; do + webserver=${webserver%,} + if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/$conffile ]; then + ln -s $confpath/$conffile /etc/$webserver/conf.d/$conffile + fi + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver reload || true + else + /etc/init.d/$webserver reload || true + fi + done + fi +fi + + +#DEBHELPER# + +exit 0 + + --- ocsinventory-server-1.01.orig/debian/rules +++ ocsinventory-server-1.01/debian/rules @@ -0,0 +1,119 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DESTDIR=$(CURDIR)/debian/ocsinventory-server +GDIR=$(DESTDIR)/usr/share/ocsinventory-server +GCONFDIR=$(DESTDIR)/etc/ocsinventory +GVARDIR=$(DESTDIR)/var/lib/ocsinventory-server + + +# If set to a true value then MakeMaker's prompt function will +# always return the default without waiting for user input. +export PERL_MM_USE_DEFAULT=1 + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +ifndef PERL + PERL = /usr/bin/perl +endif + +configure: configure-stamp +configure-stamp: patch + dh_testdir + # Add here commands to configure the package. + cd Apache && perl Makefile.PL INSTALLDIRS=vendor + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) -C Apache OPTIMIZE="$(CFLAGS)" + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + [ ! -f Apache/Makefile ] || $(MAKE) -C Apache realclean + rm -f Apache/Makefile.old + + -debconf-updatepo + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/ocsinventory-server. + $(MAKE) -C Apache DESTDIR=$(CURDIR)/debian/ocsinventory-server install PREFIX=/usr + + # MakeMaker creates the dirs, we delete them from the deb: + [ ! -d $(CURDIR)/debian/ocsinventory-server/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents $(CURDIR)/debian/ocsinventory-server/usr/lib/perl5 + + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do by default. + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install + + # remove guide.pdf as it shouldn't reside in /usr/share/ocs... + rm -f $(CURDIR)/debian/ocsinventory-reports/usr/share/ocsinventory-server/ocsreports/files/guide.pdf + + # add execute to ipdiscover-util.pl + chmod a+x $(CURDIR)/debian/ocsinventory-reports/usr/share/ocsinventory-server/ocsreports/ipdiscover-util.pl + +# dh_installmenu + dh_installdebconf + dh_installlogrotate +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +include /usr/share/quilt/quilt.make + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- ocsinventory-server-1.01.orig/debian/watch +++ ocsinventory-server-1.01/debian/watch @@ -0,0 +1,4 @@ +# See uscan(1) for format +# (debscripts >= 2.9) +version=3 +http://sf.net/ocsinventory/OCSNG_LINUX_SERVER_([0-9].*)\.tar\.gz --- ocsinventory-server-1.01.orig/debian/changelog +++ ocsinventory-server-1.01/debian/changelog @@ -0,0 +1,75 @@ +ocsinventory-server (1.01-6) unstable; urgency=low + + * Fix configuration file if not using dbconfig (Closes: #492047) + * This also allows to install without a MySQL server (Closes: #489461) + * Bump standards version to 3.8.0 + * Replace Apache license in copyright file by a link to local file. + + -- Pierre Chifflier Tue, 29 Jul 2008 17:42:03 +0200 + +ocsinventory-server (1.01-5) unstable; urgency=low + + * Debconf translations: + - Basque (Closes: #483897) + - Brazilian Portuguese (Closes: #473351) + - Czech (Closes: #483298) + - Dutch (Closes: #450985) + - Finnish (Closes: #456962) + - Galician (Closes: #483732) + - Russian (Closes: #484320) + - Turkish (Closes: #484720) + + -- Pierre Chifflier Sun, 08 Jun 2008 13:01:14 +0200 + +ocsinventory-server (1.01-4) unstable; urgency=low + + * Acknowledge NMU (Closes: #468194) + Thanks to Mark Hymers + * Bump Standards version (no changes) + * Move homepage to pseudo-header + + -- Pierre Chifflier Mon, 14 Apr 2008 10:47:37 +0200 + +ocsinventory-server (1.01-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTBFS with Perl 5.10. Closes: #468194. + + -- Mark Hymers Sat, 05 Apr 2008 13:49:26 +0100 + +ocsinventory-server (1.01-3) unstable; urgency=low + + [ Pierre Chifflier ] + * Update my email address + * Debconf templates: + + French (Closes: #434080) + + (updated) Portuguese (Closes: #437287) + * Add installation notes (Closes: #439372, #433037) + + -- Pierre Chifflier Sun, 21 Oct 2007 18:07:55 +0200 + +ocsinventory-server (1.01-2) unstable; urgency=low + + * Fix spelling errors in debconf template (Closes: #432870) + * Debconf templates: + + German (Closes: #432868) + + Portuguese (Closes: #433186) + + -- Pierre Chifflier Tue, 17 Jul 2007 13:50:41 +0200 + +ocsinventory-server (1.01-1) unstable; urgency=low + + [ Pierre Chifflier ] + * Initial release (Closes: #419226) + * Should detect mod_perl version (1 or 2) in apache config + + [ Eric DECORNOD ] + * split in two packages : Comm. Server and Adm. Console (-server and -reports) + * ocsreports: - Changed the location of dbconfig, download and ipd + - moved guide.pdf to documentation + - replaced hardcoded user/pass in install.php + - protected install.php w/ /etc/ocsinventory/htpasswd.setup + * ipdiscover-util.pl: - Replaced hardcoded config to dbconfig.inc.php + + -- Pierre Chifflier Thu, 24 May 2007 16:17:06 +0200 + --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.examples +++ ocsinventory-server-1.01/debian/ocsinventory-server.examples @@ -0,0 +1 @@ +Apache/ocsinventory.conf --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.prerm +++ ocsinventory-server-1.01/debian/ocsinventory-server.prerm @@ -0,0 +1,18 @@ +#!/bin/sh +# prerm script for ocsinventory-server +# +# see: dh_installdeb(1) + +set -e + +# source debconf stuff +. /usr/share/debconf/confmodule +# source dbconfig-common stuff +. /usr/share/dbconfig-common/dpkg/prerm.mysql +dbc_go ocsinventory-server $@ + +#DEBHELPER# + +exit 0 + + --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.config +++ ocsinventory-server-1.01/debian/ocsinventory-server.config @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e + +action=$1 +version=$2 + +# Source debconf library. +. /usr/share/debconf/confmodule +db_version 2.0 || [ 0 -lt 30 ] + +#db_input medium ocsinventory-server/webserver || true +#db_go + +if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then + . /usr/share/dbconfig-common/dpkg/config.mysql + + # hints for dbconfig + dbc_dbname="ocsweb" + dbc_dbuser="ocs" + + dbc_go ocsinventory-server $@ +fi + +db_go + --- ocsinventory-server-1.01.orig/debian/mysql.conf +++ ocsinventory-server-1.01/debian/mysql.conf @@ -0,0 +1,8 @@ + --- ocsinventory-server-1.01.orig/debian/compat +++ ocsinventory-server-1.01/debian/compat @@ -0,0 +1 @@ +5 --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.install +++ ocsinventory-server-1.01/debian/ocsinventory-server.install @@ -0,0 +1 @@ +debian/conf/ocsinventory.conf usr/share/ocsinventory-server/files --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.postrm +++ ocsinventory-server-1.01/debian/ocsinventory-server.postrm @@ -0,0 +1,63 @@ +#!/bin/sh +# postrm script for ocsinventory-server +# +# see: dh_installdeb(1) + +set -e + +varpath="/var/lib/ocsinventory-server" +confpath="/etc/ocsinventory" +conffile="ocsinventory.conf" + +. /usr/share/debconf/confmodule +db_version 2.0 || [ $? -lt 30 ] + +if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then + . /usr/share/dbconfig-common/dpkg/postrm.mysql + dbc_go ocsinventory-server $@ +fi + +if [ "$1" = "purge" ]; then + + for FILE in $confpath/$conffile; do + # Taken from the ucf example postrm + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-old; do + rm -f $FILE$ext + done + rm -f $FILE + if which ucf >/dev/null 2>&1; then + ucf --purge $FILE + fi + done + + rmdir --ignore-fail-on-non-empty /etc/ocsinventory || true +fi + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + + webservers="apache2" + for webserver in $webservers; do + webserver=${webserver%,} + if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/$conffile ]; then + rm -f /etc/$webserver/conf.d/$conffile + fi + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver reload || true + else + /etc/init.d/$webserver reload || true + fi + done + +fi + +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi + + +#DEBHELPER# + +exit 0 + + --- ocsinventory-server-1.01.orig/debian/README.Debian +++ ocsinventory-server-1.01/debian/README.Debian @@ -0,0 +1,46 @@ +ocsinventory-server for Debian +============================== + +Database +-------- + +The Debian package uses dbconfig to automatically create the database user and +the database. The schema and data will be created by the install.php script +(see later for instructions). +If you choose not to use dbconfig, you will have to create them manually, +and configure files /etc/ocsinventory/dbconfig.inc.php and +/etc/ocsinventory/ocsinventory.conf + +Important: even if the debian package allows to change the database name, +using a different name from the default (ocsweb) will probably cause problems, +as the name is hardcoded in many files. This is being fixed. + +Post-installation notes +----------------------- + +Please note that after first installation, or after an upgrade, it's recommended +to call http://localhost/ocsreports/install.php ; please also note that this +particular page is restricted to localhost in /etc/ocsinventory/ocsreports.conf. + +For security reasons, this script is protected by an apache authentication, using +/etc/ocsinventory/htpasswd.setup + +Debian changes +-------------- + +Configuration file dbconfig.inc.php has been moved to /var/lib/ocsinventory-server/config +and is created/modified/deleted by http://localhost/ocsreports/install.php + +ipd and download directories are also in /var/lib/ocsinventory-server. + +It's possible to install ocsinventory-server and ocsinventory-reports +on different web-servers, but please take in account that +ocsinventory-reports's install.php script builds and update the database. + + +Security +-------- + +Important: access to the reports server should be restricted + + -- Pierre Chifflier Fri, 23 Feb 2007 15:06:24 +0100 --- ocsinventory-server-1.01.orig/debian/ocsinventory-reports.dirs +++ ocsinventory-server-1.01/debian/ocsinventory-reports.dirs @@ -0,0 +1,7 @@ +etc/ocsinventory +usr/share/ocsinventory-server +usr/share/ocsinventory-server/files +var/lib/ocsinventory-server/config +var/lib/ocsinventory-server/ipd +var/lib/ocsinventory-server/download +var/log/ocsinventory-server --- ocsinventory-server-1.01.orig/debian/ocsinventory-reports.docs +++ ocsinventory-server-1.01/debian/ocsinventory-reports.docs @@ -0,0 +1,2 @@ +README +ocsreports/files/guide.pdf --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.dirs +++ ocsinventory-server-1.01/debian/ocsinventory-server.dirs @@ -0,0 +1,4 @@ +etc/ocsinventory +usr/share/ocsinventory-server/files +usr/share/doc/ocsinventory-server +var/log/ocsinventory-server --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.docs +++ ocsinventory-server-1.01/debian/ocsinventory-server.docs @@ -0,0 +1,2 @@ +README +debian/mysql.conf --- ocsinventory-server-1.01.orig/debian/copyright +++ ocsinventory-server-1.01/debian/copyright @@ -0,0 +1,48 @@ +This package was debianized by Pierre Chifflier on +Fri, 23 Feb 2007 15:06:24 +0100. + +It was downloaded from http://www.ocsinventory-ng.org + +Upstream Author: Pascal DANEK + +Copyright: 2005-2007 - OCS Inventory Development Team: + Pascal DANEK, Goneri Le Bouder, + Pierre LEMMET, Didier LIROULET + +License: + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + + + + +For the files slider.js, range.js, timer.js and winclassic.css : + Copyright (c) 2002, 2003, 2006 Erik Arvidsson + Licensed under the Apache License, Version 2.0 + +On Debian GNU/Linux systems, the complete text of the Apache +License 2.0 can be found in `/usr/share/common-licenses/Apache-2.0'. + + +For the file DateTimePicker.js : + Copyright (c) 2003 TengYong Ng + Permission given to use this script in + ANY kind of applications if header lines + are left unchanged + Homepage: http://www.rainforestnet.com + + +The Debian packaging is (C) 2007, Pierre Chifflier and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + --- ocsinventory-server-1.01.orig/debian/ocsinventory-reports.install +++ ocsinventory-server-1.01/debian/ocsinventory-reports.install @@ -0,0 +1,3 @@ +ocsreports usr/share/ocsinventory-server +ipdiscover-util/ipdiscover-util.pl usr/share/ocsinventory-server/ocsreports +debian/conf/ocsreports.conf etc/ocsinventory --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.logrotate +++ ocsinventory-server-1.01/debian/ocsinventory-server.logrotate @@ -0,0 +1,21 @@ +################################################################################ +# +# OCS Inventory NG Communication Server +# +# Copyleft 2006 Didier LIROULET +# Web: http://ocsinventory.sourceforge.net +# +# This code is open source and may be copied and modified as long as the source +# code is always made freely available. +# Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt +################################################################################ +# +# Rotate OCS Inventory NG Communication server logs weekly, only if not empty +# Save 7 days old logs under compressed mode +/var/log/ocsinventory-server/*.log { + daily + rotate 7 + compress + notifempty + missingok +} --- ocsinventory-server-1.01.orig/debian/ocsinventory-reports.links +++ ocsinventory-server-1.01/debian/ocsinventory-reports.links @@ -0,0 +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 --- ocsinventory-server-1.01.orig/debian/ocsinventory-reports.config +++ ocsinventory-server-1.01/debian/ocsinventory-reports.config @@ -0,0 +1,16 @@ +#!/bin/sh + +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 +fi --- ocsinventory-server-1.01.orig/debian/ocsinventory-server.postinst +++ ocsinventory-server-1.01/debian/ocsinventory-server.postinst @@ -0,0 +1,75 @@ +#!/bin/sh +# postinst script for ocsinventory-server +# +# see: dh_installdeb(1) + +set -e + +. /usr/share/debconf/confmodule +db_version 2.0 || [ $? -lt 30 ] + +if [ "$1" = "configure" ]; then + + # only on a new install + if [ "$2" = "" ]; then + pkgpath="/usr/share/ocsinventory-server" + confpath="/etc/ocsinventory" + conffile="ocsinventory.conf" + + # Allow mod_perl to write there + for dirname in /var/log/ocsinventory-server; do + chown www-data:www-data $dirname + chmod g+w $dirname + done + + # use dbconfig to setup vars in apache config file + . /usr/share/dbconfig-common/dpkg/postinst.mysql + dbc_generate_include=template:$confpath/$conffile + dbc_generate_include_args="-U -o template_infile='$pkgpath/files/$conffile'" + dbc_generate_include_owner="root:www-data" + dbc_generate_include_perms="0640" + + dbc_go ocsinventory-server $@ + + # if not using dbconfig, set default values to have a valid config file + db_get ocsinventory-server/dbconfig-install + use_dbconfig=${RET:-false} + if [ "x$use_dbconfig" != "xtrue" ]; then + sed -i -e 's/^\(\s*\)PerlSetEnv OCS_DB_NAME\s\+$/\1PerlSetEnv OCS_DB_NAME ocsweb/' \ + -e 's/^\(\s*\)PerlSetEnv OCS_DB_LOCAL\s\+$/\1PerlSetEnv OCS_DB_LOCAL ocsweb/' \ + -e 's/^\(\s*\)PerlSetEnv OCS_DB_USER\s\+$/\1PerlSetEnv OCS_DB_USER ocs/' \ + -e 's/^\(\s*\)PerlSetVar OCS_DB_PWD\s\+$/\1PerlSetVar OCS_DB_PWD ocs/' \ + $confpath/$conffile + fi + + db_stop + + # fix dbconfig empty variables + if [ -z "$dbc_dbhost" ]; then + sed -i -e 's/^\(\s*\)PerlSetEnv OCS_DB_HOST\s\+$/\1PerlSetEnv OCS_DB_HOST localhost/' \ + -e 's/^\(\s*\)PerlSetEnv OCS_DB_PORT\s\+$/\1PerlSetEnv OCS_DB_PORT 3306/' \ + $confpath/$conffile + fi + + # link apache config files in apache's conf.d dir + webservers="apache2" + for webserver in $webservers; do + webserver=${webserver%,} + if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/$conffile ]; then + ln -s $confpath/$conffile /etc/$webserver/conf.d/$conffile + fi + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver reload || true + else + /etc/init.d/$webserver reload || true + fi + done + fi +fi + + +#DEBHELPER# + +exit 0 + + --- ocsinventory-server-1.01.orig/debian/po/templates.pot +++ ocsinventory-server-1.01/debian/po/templates.pot @@ -0,0 +1,61 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. They " +"are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "" --- ocsinventory-server-1.01.orig/debian/po/de.po +++ ocsinventory-server-1.01/debian/po/de.po @@ -0,0 +1,78 @@ +# Translation of ocsinventory-server debconf templates to German +# Copyright (C) Helge Kreutzmann , 2007. +# This file is distributed under the same license as the ocsinventory-server package. +# +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server 1.01-1\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2007-07-12 18:25+0200\n" +"Last-Translator: Helge Kreutzmann \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Benutzername fr das webbasierte Einrichtungssystem:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" +"OCS Reports enthlt ein webbasiertes Einrichtungs-/Upgrade-Skript. Das " +"Skript befindet sich unter http://localhost/ocsreports/install.php. Aus " +"Sicherheitsgrnden erfordert es eine Autorisierung." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "" +"Lassen Sie dies leer, falls Sie den vordefinierten Benutzernamen admin " +"verwenden mchten." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Passwort fr das webbasierte Einrichtungssystem:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. They " +"are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" +"Sie knnen die Benutzernamen und Passwrter mit dem htpasswd-Befehl " +"verwalten. Sie sind in der Datei /etc/ocsinventory/htpasswd.setup " +"gespeichert." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "" +"Lassen Sie dies leer, falls Sie den Zugriff auf die webbasierte Einrichtung " +"deaktivieren mchten." + +#~ msgid "" +#~ "OCS Reports comes with a webb-ased setup/upgrade script. The script is " +#~ "located at http://localhost/ocsreports/install.php . For security reasons " +#~ "it requires authorization." +#~ msgstr "" +#~ "OCS Reports enthlt ein webbasiertes Einrichtungs-/Upgrade-Skript. Das " +#~ "Skript befindet sich unter http://localhost/ocsreports/install.php. Aus " +#~ "Sicherheitsgrnden erfordert es eine Autorisierung." --- ocsinventory-server-1.01.orig/debian/po/cs.po +++ ocsinventory-server-1.01/debian/po/cs.po @@ -0,0 +1,62 @@ +# Czech translation of ocsinventory-server debconf messages. +# +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server_1.01-4\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2008-05-27 18:05+0200\n" +"Last-Translator: Daniel Kavan \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Uživatelské jméno pro nastavování přes web:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" +"OCS Reports mají svůj webový nastavovací/upgradovací skript. Skript se " +"nalézá na http://localhost/ocsreports/install.php. Z bezpečnostních " +"důvodů požaduje autorizaci." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "Pokud chcete používat předvolené jméno „admin“, ponechte prázdné." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Heslo pro webový nastavovací systém:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. They " +"are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" +"Jména a hesla můžete spravovat pomocí příkazu „htpasswd“. Uložena jsou " +"v souboru /etc/ocsinventory/htpasswd.setup." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "Pokud chcete zakázat přístup k webovému nastavování, ponechte prázdné." --- ocsinventory-server-1.01.orig/debian/po/fi.po +++ ocsinventory-server-1.01/debian/po/fi.po @@ -0,0 +1,53 @@ +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server_1.01-3\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2007-12-18 20:22+0200\n" +"Last-Translator: Esko Arajärvi \n" +"Language-Team: Finnish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Finnish\n" +"X-Poedit-Country: Finland\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Verkkopohjaisen asetusjärjestelmän käyttäjätunnus:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "OCS Reports comes with a web-based setup/upgrade script. The script is located at http://localhost/ocsreports/install.php. For security reasons it requires authorization." +msgstr "OCS Reportsin mukana on verkkopohjainen asetus- ja ylläpitokomentosarja. Komentosarjan sijainti on http://localhost/ocsreports/install.php. Turvallisuussyistä se vaatii tunnistautumisen." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "Jätä kenttä tyhjäksi, jos haluat käyttää oletuskäyttäjätunnusta ”admin”." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Verkkopohjaisen asetusjärjestelmän salasana:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "You can manage the usernames and passwords with the `htpasswd' command. They are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "Voit hallinnoida käyttäjätunnuksia ja salasanoja ”htpasswd”-komennon avulla. Ne on tallennettu tiedostoon /etc/ocsinventory/htpasswd.setup." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "Jätä kenttä tyhjäksi, jos haluat passivoida pääsyn verkkopohjaiseen asetusjärjestelmään." + --- ocsinventory-server-1.01.orig/debian/po/eu.po +++ ocsinventory-server-1.01/debian/po/eu.po @@ -0,0 +1,68 @@ +# translation of ocsinventory-server.po to Basque (eu) +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# xabier bilbao , 2008. +# Piarres Beobide , 2008. +msgid "" +msgstr "" +"Project-Id-Version: xp-ocsinventory-server\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2008-06-01 00:07+0200\n" +"Last-Translator: Piarres Beobide \n" +"Language-Team: Euskara \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Web bidezko konfigurazio sistemaren erabiltzaile-izena:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" +"OCS Reports-ek web bidez konfiguratzeko/bertsio-berritzeko script-a " +"dakar. Script honen kokagunea http://localhost/ocsreports/install.php da. " +"Segurtasun arrazoiengatik, baimena edukitzea eskatzen du." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "Bete gabe utzi lehenetsitako 'admin' erabiltzaile-izena erabili nahi baduzu." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Web bidezko konfigurazio sistemaren pasahitza:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. " +"They are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" +"Erabiltzaile-izenak eta pasahitzak 'htpasswd' komandoaren bitartez kudea " +"ditzakezu. /etc/ocsinventory/htpasswd.setup fitxategian daude gordeta." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "Bete gabe utzi web bidezko konfiguraziorako sarrera desgaitzeko." + --- ocsinventory-server-1.01.orig/debian/po/fr.po +++ ocsinventory-server-1.01/debian/po/fr.po @@ -0,0 +1,77 @@ +# This file is distributed under the same license as the ocsinventory-server package +# David Kremer , 2007. +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server_1.01-1_templates\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2007-07-13 19:44+0200\n" +"Last-Translator: David Kremer \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Identifiant pour le système web de configuration : " + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" +"OCS Reports est fourni avec un script web de configuration et mise à jour. " +"Le script est situé à l'adresse http://localhost/ocsreports/install.php. " +"Pour des raisons de sécurité, il nécessite une identification." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "" +"Veuillez laisser le champ vide si vous décidez d'utiliser le nom " +"d'utilisateur par défaut, « admin » ." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Mot de passe pour le système web de configuration :" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. They " +"are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" +"Vous pouvez gérer les identifiants et mots de passe avec la commande " +"htpasswd." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "" +"Veuillez laisser ce champ vide si vous décidez de désactiver l'accès à la " +"configuration web." + +#~ msgid "" +#~ "OCS Reports comes with a webb-ased setup/upgrade script. The script is " +#~ "located at http://localhost/ocsreports/install.php . For security reasons " +#~ "it requires authorization." +#~ msgstr "" +#~ "OCS Reports est fourni avec un script web de configuration et mise à " +#~ "jour. Le script est situé à l'adresse http://localhost/ocsreports/install." +#~ "php. Pour des raisons de sécurité, il nécessite une identification." --- ocsinventory-server-1.01.orig/debian/po/gl.po +++ ocsinventory-server-1.01/debian/po/gl.po @@ -0,0 +1,65 @@ +# Galician translation of ocsinventory-server's debconf templates +# This file is distributed under the same license as the ocsinventory-server package. +# Jacobo Tarrio , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2008-05-30 21:11+0100\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Nome de usuario para o sistema de configuración en web:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" +"OCS Reports inclúe un script de configuración/actualización baseado en web. " +"O script reside en http://localhost/ocsreports/install.php . Por motivos de " +"seguridade, o script precisa de autorización." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "" +"Déixeo en branco se quere empregar o nome de usuario por defecto, \"admin\"." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Contrasinal para o sistema de configuración en web:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. They " +"are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" +"Pode xestionar os nomes de usuario e contrasinais coa orde \"htpasswd\". " +"Están armacenados no ficheiro /etc/ocsinventory/htpasswd.setup." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "Déixeo en branco se quere desactivar o acceso á configuración en web." --- ocsinventory-server-1.01.orig/debian/po/nl.po +++ ocsinventory-server-1.01/debian/po/nl.po @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE 'S COPYRIGHT HOLDER +# This file is distributed under the same license as the package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2007-10-26 20:08+0100\n" +"Last-Translator: Bart Cornelis \n" +"Language-Team: debian-l10n-dutch \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Dutch\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Gebruikersnaam voor het webgebaseerde setupsysteem:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "OCS Reports comes with a web-based setup/upgrade script. The script is located at http://localhost/ocsreports/install.php. For security reasons it requires authorization." +msgstr "OCS Reports voorziet een webgebaseerd setup-/opwaarderings-script. Dit script bevindt zich op http://localhost/ocsreports/install.php. Om beveiligingsredenen vereist autorisatie. " + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "Laat dit leeg als u de standaard gebruikersnaam 'admin' wilt gebruiken." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Wachtwoord voor het webgebaseerde setupsysteem:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "You can manage the usernames and passwords with the `htpasswd' command. They are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "U kunt de gebruikersnamen en wachtwoorden beheren via het commando 'htpasswd', ze worden opgeslagen in het bestand /etc/ocsinventory/htpasswd.setup ." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "Laat dit leeg als u toegang tot het webgebaseerde setupsysteem wilt deactiveren." + --- ocsinventory-server-1.01.orig/debian/po/pt.po +++ ocsinventory-server-1.01/debian/po/pt.po @@ -0,0 +1,72 @@ +# translation of ocsinventory-server to Portuguese +# Copyright (C) 2007 Américo Monteiro +# This file is distributed under the same license as the ocsinventory-server package. +# +# Américo Monteiro , 2007. +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server 1.01-2\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2007-07-15 02:57+0100\n" +"Last-Translator: Américo Monteiro \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "" +"Nome de utilizador para o sistema de configuração através de interface Web:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" +"Os relatórios OCS vêem com um script de configuração/actualização através " +"duma interface Web. O script está localizado em http://localhost/ocsreports/" +"install.php. Por razões de segurança, necessita de autorização." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "" +"Deixe o campo vazio, se pretender usar o nome de utilizador dado por omissão " +"'admin'." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Password do sistema de configuração por interface Web:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. They " +"are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" +"Você pode gerir os nomes de utilizadores e suas passwords com o comando " +"'htpasswd'. Elas estão guardadas no ficheiro /etc/ocsinventory/htpasswd." +"setup." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "" +"Deixe o campo vazio se pretender desactivar o acesso à configuração por " +"interface Web." --- ocsinventory-server-1.01.orig/debian/po/ru.po +++ ocsinventory-server-1.01/debian/po/ru.po @@ -0,0 +1,72 @@ +# translation of ru.po to Russian +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Yuri Kozlov , 2008. +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server new\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2008-06-03 21:11+0400\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Имя пользователя для системы настройки через веб:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" +"OCS Reports содержит сценарий установки/обновления, управляемый через веб. " +"Сценарий доступен по адресу http://localhost/ocsreports/install.php. " +"В целях безопасности он требует имя и пароль." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "" +"Оставьте поле пустым, если хотите использовать имя пользователя " +"по умолчанию ('admin')." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Пароль для системы настройки через веб:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. They " +"are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" +"Вы можете управлять пользователями и паролями с помощью команды `htpasswd'. " +"Они хранятся в файле /etc/ocsinventory/htpasswd.setup." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "" +"Оставьте поле пустым, если хотите заблокировать доступ к настройке " +"через веб." + --- ocsinventory-server-1.01.orig/debian/po/tr.po +++ ocsinventory-server-1.01/debian/po/tr.po @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Mert Dirik , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2008-06-05 23:48+0200\n" +"Last-Translator: Mert Dirik \n" +"Language-Team: Debian L10n Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Poedit-Language: Turkish\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Web tabanlı kurulum sistemi için kullanıcı adı:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "OCS Reports comes with a web-based setup/upgrade script. The script is located at http://localhost/ocsreports/install.php. For security reasons it requires authorization." +msgstr "OCS Raporları web tabanlı bir kurulum/yükseltme betiğiyle gelir. Bu betik http://localhost/ocsreports/install.php adresindedir ve güvenlik nedeniyle kimlik doğrulama gerektirir." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "Öntanımlı kullanıcı adı olan 'admin'i kullanmak istiyorsanız bu alanı boş bırakın." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Web tabanlı kurulum sistemi için parola:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "You can manage the usernames and passwords with the `htpasswd' command. They are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "Kullanıcı adları ve parolaları 'htpasswd' komutuyla yönetebilirsiniz. Kullanıcı adları ve parolalar /etc/ocsinventory/htpasswd.setup dosyasında saklanır." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "Web tabanlı kuruluma erişimi devre dışı bırakmak için bu alanı boş bırakın." + --- ocsinventory-server-1.01.orig/debian/po/POTFILES.in +++ ocsinventory-server-1.01/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] ocsinventory-reports.templates --- ocsinventory-server-1.01.orig/debian/po/pt_BR.po +++ ocsinventory-server-1.01/debian/po/pt_BR.po @@ -0,0 +1,69 @@ +# ocsinventory-server Brazilian Portuguese po-debconf Translation. +# Copyright (C) 2008 THE ocsinventory-server COPYRIGHT HOLDER +# This file is distributed under the same license as the ocsinventory-server package. +# Jefferson Alexandre dos Santos , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: ocsinventory-server\n" +"Report-Msgid-Bugs-To: chifflier@inl.fr\n" +"POT-Creation-Date: 2007-07-17 13:47+0200\n" +"PO-Revision-Date: 2008-03-18 23:12-0300\n" +"Last-Translator: Jefferson Alexandre dos Santos, \n" +"Language-Team: l10n Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"pt_BR utf-8\n" + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "User name for web-based setup system:" +msgstr "Usuário para configuração baseada na web:" + +#. Type: string +#. Description +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:1001 +#: ../ocsinventory-reports.templates:2001 +msgid "" +"OCS Reports comes with a web-based setup/upgrade script. The script is " +"located at http://localhost/ocsreports/install.php. For security reasons it " +"requires authorization." +msgstr "" +"O OCS Reports vem com um script de configuração/atualização baseado na web. " +"Este script está localizado em http://localhost/ocsreports/install.php. Por " +"razões de segurança ele requer autorização." + +#. Type: string +#. Description +#: ../ocsinventory-reports.templates:1001 +msgid "Leave empty if you want to use the default user name 'admin'." +msgstr "" +"Deixe em branco se você quiser utilizar o nome de usuário padrão 'admin'." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Password for web-based setup system:" +msgstr "Senha para o sistema de configuração baseado na web:" + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "" +"You can manage the usernames and passwords with the `htpasswd' command. They " +"are stored in /etc/ocsinventory/htpasswd.setup file." +msgstr "" +"Você pode gerenciar os usuários e senhas com o comando 'htpasswd'. Eles são " +"armazenados no arquivo /etc/ocsinventory/htpasswd.setup." + +#. Type: password +#. Description +#: ../ocsinventory-reports.templates:2001 +msgid "Leave empty if you want to disable access to the web-based setup." +msgstr "" +"Deixe em branco se você quiser desabilitar o acesso a configuração baseada " +"na web." --- ocsinventory-server-1.01.orig/debian/conf/ocsreports.conf +++ ocsinventory-server-1.01/debian/conf/ocsreports.conf @@ -0,0 +1,45 @@ +#################################################################### +# +# OCS Inventory NG Administration Console Module Setup +# +#################################################################### + +Alias /ocsreports /usr/share/ocsinventory-server/ocsreports +Alias /download /var/lib/ocsinventory-server/download + + + Options Indexes FollowSymLinks + DirectoryIndex index.php + + # Authorize for setup + + # For Apache 1.3 and 2.0 + + AuthType Basic + AuthName "OCS Reports Setup" + AuthUserFile /etc/ocsinventory/htpasswd.setup + + # For Apache 2.2 + + AuthType Basic + AuthName "OCS Reports Setup" + AuthUserFile /etc/ocsinventory/htpasswd.setup + + Require valid-user + + + + AddType application/x-httpd-php .php + + php_value post_max_size 8m + php_value upload_max_filesize 8m + + + AddType application/x-httpd-php .php + + php_value post_max_size 8m + php_value upload_max_filesize 8m + + + +# vim: ft=apache : --- ocsinventory-server-1.01.orig/debian/conf/ocsinventory.conf +++ ocsinventory-server-1.01/debian/conf/ocsinventory.conf @@ -0,0 +1,117 @@ +################################################################################ +# +# OCS Inventory NG Communication Server Perl Module Setup +# +# Copyleft 2006 Pascal DANEK +# Web: http://ocsinventory.sourceforge.net +# +# This code is open source and may be copied and modified as long as the source +# code is always made freely available. +# Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt +################################################################################ + + + # Which version of mod_perl we are using + # For mod_perl <= 1.999_21, replace VERSION_MP by 1 + # For mod_perl > 1.999_21, replace VERSION_MP by 2 + + PerlSetEnv OCS_MODPERL_VERSION 2 + + + PerlSetEnv OCS_MODPERL_VERSION 1 + + + # Where to write detailled logs + PerlSetEnv OCS_LOGPATH "/var/log/ocsinventory-server" + + # Database options + # Replace DATABASE_SERVER by hostname or ip of MySQL server, generally localhost + PerlSetEnv OCS_DB_HOST _DBC_DBSERVER_ + # Replace DATABASE_PORT by port where running MySQL server, generally 3306 + PerlSetEnv OCS_DB_PORT _DBC_DBPORT_ + # Name of database + PerlSetEnv OCS_DB_NAME _DBC_DBNAME_ + PerlSetEnv OCS_DB_LOCAL _DBC_DBNAME_ + # User allowed to connect to database + PerlSetEnv OCS_DB_USER _DBC_DBUSER_ + # Password for user + PerlSetVar OCS_DB_PWD _DBC_DBPASS_ + + # The options below are overloaded if you are using ocs GUI + # Be careful: you must restart apache to have any effects + PerlSetEnv OCS_OPT_FREQUENCY 0 + PerlSetEnv OCS_OPT_PROLOG_FREQ 24 + PerlSetEnv OCS_OPT_DEPLOY 1 + PerlSetEnv OCS_OPT_TRACE_DELETED 0 + PerlSetEnv OCS_OPT_AUTO_DUPLICATE_LVL 7 + PerlSetEnv OCS_OPT_LOGLEVEL 0 + PerlSetEnv OCS_OPT_INVENTORY_DIFF 1 + PerlSetEnv OCS_OPT_INVENTORY_TRANSACTION 1 + PerlSetEnv OCS_OPT_PROXY_REVALIDATE_DELAY 3600 + PerlSetEnv OCS_OPT_LOCK_REUSE_TIME 3600 + + # Optional modules + PerlSetEnv OCS_OPT_IPDISCOVER 2 + PerlSetEnv OCS_OPT_IPDISCOVER_MAX_ALIVE 7 + PerlSetEnv OCS_OPT_IPDISCOVER_LATENCY 100 + PerlSetEnv OCS_OPT_REGISTRY 0 + PerlSetEnv OCS_OPT_UPDATE 0 + PerlSetEnv OCS_OPT_DOWNLOAD 0 + PerlSetEnv OCS_OPT_DOWNLOAD_FRAG_LATENCY 10 + PerlSetEnv OCS_OPT_DOWNLOAD_CYCLE_LATENCY 0 + PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LATENCY 0 + PerlSetEnv OCS_OPT_DOWNLOAD_TIMEOUT 30 + PerlSetEnv OCS_OPT_WEB_SERVICE_ENABLED 0 + PerlSetEnv OCS_OPT_PROLOG_FILTER_ON 1 + PerlSetEnv OCS_OPT_INVENTORY_FILTER_ON 1 + PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP 1 + PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME 60 + + ############ DO NOT MODIFY BELOW ! ####################### + + # External modules + PerlModule Apache::DBI + PerlModule Compress::Zlib + PerlModule XML::Simple + + # Ocs + PerlModule Apache::Ocsinventory + PerlModule Apache::Ocsinventory::Server::Constants + PerlModule Apache::Ocsinventory::Server::System + PerlModule Apache::Ocsinventory::Server::Communication + PerlModule Apache::Ocsinventory::Server::Inventory + PerlModule Apache::Ocsinventory::Server::Duplicate + + # Options + PerlModule Apache::Ocsinventory::Server::Option::Registry + PerlModule Apache::Ocsinventory::Server::Option::Update + PerlModule Apache::Ocsinventory::Server::Option::Ipdiscover + PerlModule Apache::Ocsinventory::Server::Option::Download + # This module guides you through the module creation + # PerlModule Apache::Ocsinventory::Server::Option::Example + # This module adds some rules to filter some request sent to ocs server in the prolog and inventory stages + # PerlModule Apache::Ocsinventory::Server::Option::Filter + + # Virtual directory for handling OCS Inventory NG agents communications + # Be carefull, do not create such directory into your web server root document ! + #PerlTaintCheck On + + order deny,allow + allow from all + Satisfy Any + SetHandler perl-script + PerlHandler Apache::Ocsinventory + + + PerlModule Apache::Ocsinventory::SOAP; + + SetHandler perl-script + perlHandler "Apache::Ocsinventory::SOAP" + order deny,allow + allow from all + Satisfy any + + + + +# vim: ft=apache : --- ocsinventory-server-1.01.orig/debian/patches/do-not-set-mysql-permissions.patch +++ ocsinventory-server-1.01/debian/patches/do-not-set-mysql-permissions.patch @@ -0,0 +1,20 @@ +Index: OCSNG_LINUX_SERVER_1.01/ocsreports/files/ocsbase.sql +=================================================================== +--- OCSNG_LINUX_SERVER_1.01.orig/ocsreports/files/ocsbase.sql 2007-05-15 15:35:39.000000000 +0200 ++++ OCSNG_LINUX_SERVER_1.01/ocsreports/files/ocsbase.sql 2007-05-15 15:36:57.000000000 +0200 +@@ -1,5 +1,5 @@ +-CREATE DATABASE ocsweb; +-USE ocsweb; ++-- CREATE DATABASE ocsweb; ++-- USE ocsweb; + + + CREATE TABLE hardware ( +@@ -617,5 +617,5 @@ + + INSERT INTO `operators` VALUES ('admin','admin','admin','admin',1, 'Default administrator account'); + +-GRANT ALL PRIVILEGES ON ocsweb.* TO ocs IDENTIFIED BY 'ocs'; +-GRANT ALL PRIVILEGES ON ocsweb.* TO ocs@localhost IDENTIFIED BY 'ocs'; ++-- GRANT ALL PRIVILEGES ON ocsweb.* TO ocs IDENTIFIED BY 'ocs'; ++-- GRANT ALL PRIVILEGES ON ocsweb.* TO ocs@localhost IDENTIFIED BY 'ocs'; --- ocsinventory-server-1.01.orig/debian/patches/dbconfig.patch +++ ocsinventory-server-1.01/debian/patches/dbconfig.patch @@ -0,0 +1,87 @@ + +Move dbconfig.inc.php from ocsreports to /var/lib/ocsinventory/config +where it can be easily deleted/created/modified by install.php + +Index: ocsinventory-server-1.01/ocsreports/install.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/install.php 2007-05-03 17:11:27.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/install.php 2007-05-03 17:12:18.000000000 +0200 +@@ -12,6 +12,8 @@ + + @set_time_limit(0); + error_reporting(E_ALL & ~E_NOTICE); ++ ++define('DBCONFIG_INC', '/var/lib/ocsinventory-server/config/dbconfig.inc.php'); + ?> + + +@@ -98,9 +100,9 @@ + } + if( ! $instOk ) { + +- if( $hnd = @fopen("dbconfig.inc.php", "r") ) { ++ if( $hnd = @fopen(DBCONFIG_INC, "r") ) { + fclose($hnd); +- require("dbconfig.inc.php"); ++ require(DBCONFIG_INC); + $valNme = $_SESSION["COMPTE_BASE"]; + $valPass = $_SESSION["PSWD_BASE"]; + $valServ = $_SESSION["SERVEUR_SQL"]; +@@ -173,7 +175,7 @@ + echo "
ERROR: MySql authentication problem. (using host=".$_POST["host"]." login=ocs pass=ocs).
"; + + echo "
ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected
"; +- unlink("dbconfig.inc.php"); ++ unlink(DBCONFIG_INC); + } + else { + echo "
Installation finished you can log in index.php with login=admin and pass=admin

Click here to enter OCS-NG GUI
"; +@@ -182,7 +184,7 @@ + } + + +-if(!$ch = @fopen("dbconfig.inc.php","w")) { ++if(!$ch = @fopen(DBCONFIG_INC,"w")) { + echo "
ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull)
"; + die(); + } +@@ -299,7 +301,7 @@ + + if($nberr) { + echo "
ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected
"; +- unlink("dbconfig.inc.php"); ++ unlink(DBCONFIG_INC); + die(); + } + $nberr=0; +@@ -339,7 +341,7 @@ + if(mysql_errno()==2006) { + echo "
ERROR: $fil was not inserted. You need to set the max_allowed_packet mysql value to at least 2M
"; + echo "
ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected
"; +- unlink("dbconfig.inc.php"); ++ unlink(DBCONFIG_INC); + die(); + } + echo "
ERROR: $fil not inserted
"; +@@ -368,7 +370,7 @@ + + if($nberr) { + echo "
ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected
"; +- unlink("dbconfig.inc.php"); ++ unlink(DBCONFIG_INC); + die(); + } + +Index: ocsinventory-server-1.01/ocsreports/preferences.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/preferences.php 2007-05-03 14:59:41.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/preferences.php 2007-05-03 17:11:27.000000000 +0200 +@@ -41,7 +41,7 @@ + $_SESSION["queryString"] .= "&".$key."=".$val; + } + +-require('dbconfig.inc.php'); ++require('/var/lib/ocsinventory-server/config/dbconfig.inc.php'); + require("fichierConf.class.php"); + + if( isset($_GET["uid"]) ) { --- ocsinventory-server-1.01.orig/debian/patches/no-download.patch +++ ocsinventory-server-1.01/debian/patches/no-download.patch @@ -0,0 +1,126 @@ +Move /download to /var/lib/ocsinventory/download, +instead of apache's document root. +Index: ocsinventory-server-1.01/ocsreports/install.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/install.php 2007-05-03 15:05:11.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/install.php 2007-05-03 15:15:07.000000000 +0200 +@@ -64,7 +64,9 @@ + echo "
WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting \";extension=php_openssl.dll\" (windows) by removing the semicolon in file php.ini, or try installing the php4-openssl package (Linux).
"; + } + ++/* Disabled in Debian + @mkdir($_SERVER["DOCUMENT_ROOT"]."/download"); ++*/ + $pms = "post_max_size"; + $umf = "upload_max_filesize"; + +Index: ocsinventory-server-1.01/ocsreports/tele_package.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/tele_package.php 2007-05-03 15:15:18.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/tele_package.php 2007-05-03 15:19:37.000000000 +0200 +@@ -9,6 +9,7 @@ + // Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt + //==================================================================================== + //Modified on $Date: 2007/02/08 15:53:24 $$Author: plemmet $($Revision: 1.10 $) ++define('SERVER_DOCUMENT_ROOT','/var/lib/ocsinventory-server'); + ?> + "); + } +@@ -139,8 +140,8 @@ + } + else { + $id = time(); +- if( ! @mkdir( $_SERVER["DOCUMENT_ROOT"]."/download/".$id)) { +- echo "
ERROR: can't write in ".$_SERVER["DOCUMENT_ROOT"]."/download/ folder, please refresh when corrected
"; ++ if( ! @mkdir( SERVER_DOCUMENT_ROOT."/download/".$id)) { ++ echo "
ERROR: can't write in ".SERVER_DOCUMENT_ROOT."/download/ folder, please refresh when corrected
"; + die(""); + } + ?> +@@ -161,7 +162,7 @@ + else if( isset( $_POST["nbfrags"] ) ) { + + //fragmenter +- $fname = $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/tmp"; ++ $fname = SERVER_DOCUMENT_ROOT."/download/".$_POST["id"]."/tmp"; + if( $size = @filesize( $fname )) { + $handle = fopen ( $fname, "rb"); + +@@ -169,7 +170,7 @@ + for( $i=1; $i<$_POST["nbfrags"]; $i++ ) { + $contents = fread ($handle, $size / $_POST["nbfrags"] ); + $read += strlen( $contents ); +- $handfrag = fopen( $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/".$_POST["id"]."-".$i, "w+b" ); ++ $handfrag = fopen( SERVER_DOCUMENT_ROOT."/download/".$_POST["id"]."/".$_POST["id"]."-".$i, "w+b" ); + fwrite( $handfrag, $contents ); + fclose( $handfrag ); + //echo "FRAG ".$i." lu ".strlen( $contents ). " (en tout " .$read.")
"; +@@ -177,12 +178,12 @@ + + $contents = fread ($handle, $size - $read); + $read += strlen( $contents ); +- $handfrag = fopen( $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/".$_POST["id"]."-".$i, "w+b" ); ++ $handfrag = fopen( SERVER_DOCUMENT_ROOT."/download/".$_POST["id"]."/".$_POST["id"]."-".$i, "w+b" ); + fwrite( $handfrag, $contents ); + fclose( $handfrag ); + fclose ($handle); + +- unlink( $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/tmp" ); ++ unlink( SERVER_DOCUMENT_ROOT."/download/".$_POST["id"]."/tmp" ); + } + + //creation info +@@ -206,7 +207,7 @@ + "NEED_DONE_ACTION_TEXT=\"".clean($_SESSION["down_NEED_DONE_ACTION_TEXT"])."\" ". + "GARDEFOU=\"rien\" />\n"; + +- $handinfo = fopen( $_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."/info", "w+" ); ++ $handinfo = fopen( SERVER_DOCUMENT_ROOT."/download/".$_POST["id"]."/info", "w+" ); + fwrite( $handinfo, $info ); + fclose( $handinfo ); + +@@ -217,7 +218,7 @@ + + mysql_query( $req, $_SESSION["writeServer"] ); + echo mysql_error(); +- echo "
".$l->g(437)." ".$_SERVER["DOCUMENT_ROOT"]."/download/".$_POST["id"]."

"; ++ echo "
".$l->g(437)." ".SERVER_DOCUMENT_ROOT."/download/".$_POST["id"]."

"; + + unset( $_POST["nbfrags"] ); + //vider session +Index: ocsinventory-server-1.01/ocsreports/tele_activate.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/tele_activate.php 2007-05-03 15:21:55.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/tele_activate.php 2007-05-03 15:22:47.000000000 +0200 +@@ -9,6 +9,7 @@ + // Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt + //==================================================================================== + //Modified on $Date: 2007/02/16 16:39:13 $$Author: plemmet $($Revision: 1.7 $) ++define('SERVER_DOCUMENT_ROOT','/var/lib/ocsinventory-server'); + + PrintEnTete($l->g(465)); + +@@ -117,8 +118,8 @@ + $reqDelAvailable = "DELETE FROM download_available WHERE FILEID='".$_GET["suppack"]."'"; + @mysql_query($reqDelAvailable, $_SESSION["writeServer"]) or die(mysql_error()); + +- if( ! @recursive_remove_directory( $_SERVER["DOCUMENT_ROOT"]."/download/".$_GET["suppack"] )) { +- echo "
".$l->g(472)." ".$_SERVER["DOCUMENT_ROOT"]."/download/".$_GET["suppack"]."
"; ++ if( ! @recursive_remove_directory( SERVER_DOCUMENT_ROOT."/download/".$_GET["suppack"] )) { ++ echo "
".$l->g(472)." ".SERVER_DOCUMENT_ROOT."/download/".$_GET["suppack"]."
"; + } + } + --- ocsinventory-server-1.01.orig/debian/patches/ipdiscover-util-dbconfig.patch +++ ocsinventory-server-1.01/debian/patches/ipdiscover-util-dbconfig.patch @@ -0,0 +1,25 @@ +Patch to allow ipdiscover-util.pl to read it's config +values from dbconfig.inc.php rather than hardcoded. +Index: ocsinventory-server-1.01/ipdiscover-util/ipdiscover-util.pl +=================================================================== +--- ocsinventory-server-1.01.orig/ipdiscover-util/ipdiscover-util.pl 2007-05-04 08:49:36.000000000 +0200 ++++ ocsinventory-server-1.01/ipdiscover-util/ipdiscover-util.pl 2007-05-04 09:03:52.000000000 +0200 +@@ -48,6 +48,18 @@ + my $dbpwd = 'ocs'; + my $db = 'ocsweb'; + my $dbp = '3306'; ++# Read values from dbconfig.inc.php (added for Debian) ++# ++open DBCONFIG, '/var/lib/ocsinventory-server/config/dbconfig.inc.php' ++ or warn "cant't open dbconfig.inc.php: $!"; ++my $dbconfig_lines = join ('', ); ++close DBCONFIG; ++$dbhost = $1 ++ if $dbconfig_lines =~ /^\s*\$_SESSION\s*\[\s*['"]SERVEUR_SQL['"]\s*\]\s*=\s*['"](.*)['"]\s*;/m; ++$dbuser = $1 ++ if $dbconfig_lines =~ /^\s*\$_SESSION\s*\[\s*['"]COMPTE_BASE['"]\s*\]\s*=\s*['"](.*)['"]\s*;/m; ++$dbpwd = $1 ++ if $dbconfig_lines =~ /^\s*\$_SESSION\s*\[\s*['"]PSWD_BASE['"]\s*\]\s*=\s*['"](.*)['"]\s*;/m; + # + my %xml; + my $ipdiscover; --- ocsinventory-server-1.01.orig/debian/patches/guide-in-doc.patch +++ ocsinventory-server-1.01/debian/patches/guide-in-doc.patch @@ -0,0 +1,15 @@ +guide.pdf has been moved to package documentation, +so the link changed to reflect that. +Index: ocsinventory-server-1.01/ocsreports/index.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/index.php 2007-05-03 15:05:12.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/index.php 2007-05-03 15:05:31.000000000 +0200 +@@ -267,7 +267,7 @@ + case 13: $img = "local"; break; + case 12: $img = "label"; break; + case 28: $img = "aide"; +- $llink = "files/guide.pdf' target='_BLANK"; ++ $llink = "/doc/ocsinventory-reports/guide.pdf.gz' target='_BLANK"; + break; + default: if( $label==$l->g(15) ) + $img = "utilisateurs"; --- ocsinventory-server-1.01.orig/debian/patches/ipdiscover-util-gnmap.patch +++ ocsinventory-server-1.01/debian/patches/ipdiscover-util-gnmap.patch @@ -0,0 +1,71 @@ +Moved .gnmap files from ocsreports to ipd +subdir, thus it can be moved to /var/lib... +Index: ocsinventory-server-1.01/ipdiscover-util/ipdiscover-util.pl +=================================================================== +--- ocsinventory-server-1.01.orig/ipdiscover-util/ipdiscover-util.pl 2007-05-04 10:01:46.000000000 +0200 ++++ ocsinventory-server-1.01/ipdiscover-util/ipdiscover-util.pl 2007-05-04 10:05:59.000000000 +0200 +@@ -542,7 +542,7 @@ + my @ips; + push @ips, $$_[1] for(@hosts); + #Check that there is no analyses of this network pending +- open NMAP, "+>$filter.gnmap"; ++ open NMAP, "+>ipd/$filter.gnmap"; + unless(flock(NMAP, LOCK_EX|LOCK_NB)){ + if($xml){ + print "345"; +@@ -552,13 +552,13 @@ + } + } + #Analyse +- system("nmap -R -v @ips -p 135,80,22,23 -oG $filter.gnmap -P0 > /dev/null"); ++ system("nmap -R -v @ips -p 135,80,22,23 -oG ipd/$filter.gnmap -P0 > /dev/null"); + # + my @gnmap; + if($net){ + @gnmap = ; + close NMAP; +- unlink "$filter.gnmap"; ++ unlink "ipd/$filter.gnmap"; + # + ########### + # +@@ -685,14 +685,14 @@ + # + sub _cleanup{ + my($name, @files); +- opendir DIR, "."; ++ opendir DIR, "ipd"; + while($name = readdir DIR){ + push @files, $name if $name=~/\.gnmap$/i; + } + closedir DIR; + for(@files){ +- open FILE, $_ or next; +- unlink $_ if(flock(FILE, LOCK_EX|LOCK_NB)); ++ open FILE, "ipd/$_" or next; ++ unlink "ipd/$_" if(flock(FILE, LOCK_EX|LOCK_NB)); + } + } + +Index: ocsinventory-server-1.01/ocsreports/ipdiscover.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/ipdiscover.php 2007-05-04 10:07:32.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/ipdiscover.php 2007-05-04 10:11:11.000000000 +0200 +@@ -18,7 +18,7 @@ + if( ! is_executable($fipdisc) ) { + $scriptPresent = false; + } +- else if( ! is_writable(".") ) { ++ else if( ! is_writable("ipd") ) { + $scriptPresent = false; + } + } +@@ -38,7 +38,7 @@ + if( ! is_executable($fipdisc) ) { + echo "
$fipdisc ".$l->g(341)."
"; + } +- else if( ! is_writable(".") ) { ++ else if( ! is_writable("ipd") ) { + echo "
".$l->g(342)." $fipdisc
"; + } + } --- ocsinventory-server-1.01.orig/debian/patches/dbconfig-get-default.patch +++ ocsinventory-server-1.01/debian/patches/dbconfig-get-default.patch @@ -0,0 +1,22 @@ +install.php now checks for a file /etc/oscinventory/dbconfig.inc.php +before asking the user. +Index: ocsinventory-server-1.01/ocsreports/install.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/install.php 2007-05-15 14:01:47.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/install.php 2007-05-15 14:19:12.000000000 +0200 +@@ -107,6 +107,15 @@ + $valPass = $_SESSION["PSWD_BASE"]; + $valServ = $_SESSION["SERVEUR_SQL"]; + } ++ # added for debian to get default values from dbconfig-common ++ elseif( $hnd = @file_get_contents("/etc/ocsinventory/ocsinventory.conf") ) { ++ if (preg_match('/^\s*PerlSetEnv\s*OCS_DB_USER\s*(\S+)/im',$hnd,$matches)) ++ $valNme = $matches[1]; ++ if (preg_match('/^\s*PerlSetVar\s*OCS_DB_PWD\s*(\S+)/im',$hnd,$matches)) ++ $valPass = $matches[1]; ++ if (preg_match('/^\s*PerlSetEnv\s*OCS_DB_HOST\s*(\S+)/im',$hnd,$matches)) ++ $valServ = $matches[1]; ++ } + + echo "
+ --- ocsinventory-server-1.01.orig/debian/patches/series +++ ocsinventory-server-1.01/debian/patches/series @@ -0,0 +1,8 @@ +ipdiscover-util-gnmap.patch +ipdiscover-util-dbconfig.patch +guide-in-doc.patch +no-download.patch +dbconfig.patch +do-not-set-mysql-permissions.patch +hardcoded-dbauth.patch +dbconfig-get-default.patch --- ocsinventory-server-1.01.orig/debian/patches/hardcoded-dbauth.patch +++ ocsinventory-server-1.01/debian/patches/hardcoded-dbauth.patch @@ -0,0 +1,23 @@ +removed hardcoded mysql user "ocs" with password "ocs" in ocsreports/install.php +Index: ocsinventory-server-1.01/ocsreports/install.php +=================================================================== +--- ocsinventory-server-1.01.orig/ocsreports/install.php 2007-05-18 10:47:30.000000000 +0200 ++++ ocsinventory-server-1.01/ocsreports/install.php 2007-05-18 10:47:43.000000000 +0200 +@@ -166,7 +166,7 @@ + } + + if($_POST["fin"]=="fin") { +- if(!@mysql_connect($_POST["host"],"ocs","ocs")) { ++ if(!@mysql_connect($_POST["host"],$_POST["name"],$_POST["pass"])) { + if(mysql_errno()==0) { + echo "
ERROR: MySql authentication problem. You must add the 'old-passwords' in your mysql configuration file (my.ini). Then restart mysql, and relaunch install.php
"; + die(); +@@ -189,7 +189,7 @@ + die(); + } + +-fwrite($ch,""); ++fwrite($ch,""); + fclose($ch); + + echo "
MySql config file successfully written
";