--- ocsinventory-server-2.0.5.orig/debian/ocsinventory-server.postrm +++ ocsinventory-server-2.0.5/debian/ocsinventory-server.postrm @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e +#set -x + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + + webserver="apache2" + conffile="ocsinventory.conf" +confpath="/etc/ocsinventory" +if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/$conffile ]; then + rm -f /etc/$webserver/conf.d/$conffile + fi + +if [ -f /etc/init.d/$webserver ] ; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver restart 3>/dev/null || true + else + /etc/init.d/$webserver restart 3>/dev/null || true + fi + fi +fi + +if [ "$1" = "purge" ]; then + rm -f $confpath/$conffile +fi + +#DEBHELPER# + +exit 0 --- ocsinventory-server-2.0.5.orig/debian/rules +++ ocsinventory-server-2.0.5/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-arch build-indep +build-arch: build-stamp +build-indep: 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 + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + # Add here commands to install the package into debian/ocsinventory-server. + $(MAKE) -C Apache DESTDIR=$(CURDIR)/debian/ocsinventory-server install PREFIX=/usr + cp -r binutils $(CURDIR)/debian/ocsinventory-server/usr/share/ocsinventory-server/ + find $(CURDIR)/debian/ocsinventory-server/usr/share/ocsinventory-server/ -name '*.pl' -exec chmod +x {} \; + chmod -x $(CURDIR)/debian/ocsinventory-server/usr/share/ocsinventory-server/binutils/ocs-errors + # 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 + # fix permissions for scripts and images + find $(CURDIR)/debian/ocsinventory-reports/usr/share/ocsinventory-reports -type f -exec chmod a-x {} \; + # Remove embedded copy of jquery.js + rm -f debian/ocsinventory-reports/usr/share/ocsinventory-reports/js/graph/jquery-1.6.2.js; \ + ln -s /usr/share/javascript/jquery/jquery.js \ + debian/ocsinventory-reports/usr/share/ocsinventory-reports/js/graph/jquery-1.6.2.js +# 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 build-arch build-indep clean binary-indep binary-arch binary install configure --- ocsinventory-server-2.0.5.orig/debian/control +++ ocsinventory-server-2.0.5/debian/control @@ -0,0 +1,61 @@ +Source: ocsinventory-server +Section: web +Priority: extra +Maintainer: Pierre Chifflier +Uploaders: Eric Décornod , Yves Guimard +Build-Depends: debhelper (>= 7), quilt +Standards-Version: 3.9.3 +Homepage: http://www.ocsinventory-ng.org/ + +Package: ocsinventory-server +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, + ucf (>= 0.28), + libapache2-mod-perl2, + libxml-simple-perl, + perl (>= 5.14) | libcompress-zlib-perl, + libdbi-perl, + libdbd-mysql-perl, + libnet-ip-perl, + libphp-pclzip, + libapache-dbi-perl, + libjs-jquery, + apache2, +Recommends: ocsinventory-reports +Suggests: mysql-server, libsoap-lite-perl, ocsinventory-agent, nmap, samba-common +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. + Note that this is the XML-RPC/SOAP server, not the web interface (which is + provided in the ocsinventory-reports package). + +Package: ocsinventory-reports +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends}, + apache2, + php5, + libapache2-mod-php5, + php5-mysql, + php5-gd, + mysql-client, + php-net-ldap +Recommends: ocsinventory-server, 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-2.0.5.orig/debian/ocsinventory-reports.dirs +++ ocsinventory-server-2.0.5/debian/ocsinventory-reports.dirs @@ -0,0 +1,5 @@ +etc/ocsinventory +usr/share/ocsinventory-reports +var/lib/ocsinventory-reports/snmp +var/lib/ocsinventory-reports/ipd +var/lib/ocsinventory-reports/download --- ocsinventory-server-2.0.5.orig/debian/ocsinventory-reports.docs +++ ocsinventory-server-2.0.5/debian/ocsinventory-reports.docs @@ -0,0 +1,2 @@ +README +#ocsreports/files/guide.pdf --- ocsinventory-server-2.0.5.orig/debian/changelog +++ ocsinventory-server-2.0.5/debian/changelog @@ -0,0 +1,222 @@ +ocsinventory-server (2.0.5-1.1) unstable; urgency=low + + * Non-maintainer upload. + + [ Stuart Prescott ] + * Revert change of ocsinventory-server.conf to a conffile and only install + if on new installs (Closes: #656090). + + -- gregor herrmann Wed, 13 Mar 2013 18:48:22 +0100 + +ocsinventory-server (2.0.5-1) unstable; urgency=low + + * Imported Upstream version 2.0.5 + * Bump Standards Version to 3.9.3 + * libcompress-zlib-perl is now in perl, so fix the dependency line + * Re-enable /snmp, file snmp_com.txt has been removed and replaced by a table + in the SQL database + + -- Pierre Chifflier Thu, 05 Apr 2012 21:14:51 +0200 + +ocsinventory-server (2.0.2-2) unstable; urgency=high + + * Security: disable the /snmp web Alias to prevent unauthenticated users to + get the list of SNMP communities names and passwords + + -- Pierre Chifflier Sat, 29 Oct 2011 11:44:50 +0200 + +ocsinventory-server (2.0.2-1) unstable; urgency=low + + * Imported Upstream version 2.0.2 + - jpgraph and FusionChartsFree have been removed (Closes: #639833) + - security: fix Cross-site scripting (XSS) vulnerability CVE-2011-4024 + * Drop patch 01-compat_with_other_agents.patch, upstream has included a + solution. + See README.Debian for instructions on how to add agents. + * Update copyright file + * Remove embedded copy of jQuery library (replace it with a symlink) + + -- Pierre Chifflier Thu, 27 Oct 2011 22:29:10 +0200 + +ocsinventory-server (2.0-1) unstable; urgency=low + + * New upstream Version (Closes: #630815, #575248, #607478) + - Many changes, see ocsinventory-ng websites for more details + - archive does not contain vim swap files (Closes: #611868) + - see README.Debian for more intformation + * Add Yves Guimard to co-maintainers + * Merge packages changes from Yves Guimard: + - import new upstream version + - remove dbconfig support (Closes: #585915, #529398, #632152) + - remove debconf templates and translations since we none are used now + (Closes: #622136) + - remove quilt patches + * Fix lintian warnings + * Bump Standards Version + * Remove all previous quilt patches + * Add 01-compat_with_other_agents.patch: + - Allow fusioninventory agent to communicate with ocsinventory + * Add license info for jpgraph in copyright + + -- Pierre Chifflier Sat, 09 Jul 2011 14:30:43 +0200 + +ocsinventory-server (1.02.2-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix pending l10n issues. Debconf translations: + - Spanish (Camaleón). Closes: #583773 + - Danish (Joe Hansen). Closes: #599831 + - Italian (Vincenzo Campanella). Closes: #600441 + - Bokmål, Norwegian (Bjørn Steensrud). Closes: #600517 + + -- Christian Perrier Tue, 19 Oct 2010 07:29:19 +0200 + +ocsinventory-server (1.02.2-1) unstable; urgency=low + + * New upstream security release + * Bump Standards Version to 3.8.3 + * Add --debconf-ok to dbconfig calls (Closes: #531438) + * Add Japanese po-debconf template translation (Closes: #554087) + * Create /var/lib/ocsinventory-reports/download folder (Closes: #557782) + + -- Pierre Chifflier Sun, 31 Jan 2010 21:12:11 +0100 + +ocsinventory-server (1.02.1-2) unstable; urgency=high + + * Security update: fix potential SQL injection in ocsreports/machine.php + - no CVE yet (see http://seclists.org/fulldisclosure/2009/Aug/0143.html) + - urgency high + - Closes: #541995 + * Bump Standards Version to 3.8.2 (no changes) + + -- Pierre Chifflier Tue, 18 Aug 2009 14:40:20 +0200 + +ocsinventory-server (1.02.1-1) unstable; urgency=low + + * New Upstream Version (Closes: #529409): + - Some security fixes + - Use the same error for wrong user or wrong password (Closes: #529344) + * Fix name of upstream tgz in watch file (Closes: #529608) + * Upload to unstable: + - The SQL table is fully created by dbconfig-common (Closes: #512660) + + -- Pierre Chifflier Mon, 01 Jun 2009 10:39:03 +0200 + +ocsinventory-server (1.02-3) experimental; urgency=low + + * Apply patches from Daniel Dehennin: + * Use dbconfig-common to fully create the database (Closes: #529595) + Running install.php after installation is not required anymore if + dbconfig-common is used. + * Try to load required apache modules during install (Closes: #530716) + + -- Pierre Chifflier Thu, 28 May 2009 16:07:55 +0200 + +ocsinventory-server (1.02-2) experimental; urgency=low + + * Fix extra comma in dbconfig.patch (Closes: #529437) + * Re-introduce hardcoded-dbauth.patch to fix DB login during install + (Closes: #529447) + + -- Pierre Chifflier Tue, 19 May 2009 21:32:32 +0200 + +ocsinventory-server (1.02-1) experimental; urgency=low + + * New Upstream Version (Closes: #526829, #513124) + * Refreshed patches + * Symlink is created during ocsinventory-reports.postinst (Closes: #518318) + * Add Swedish debconf translation (Closes: #504331) + * Bump standards version to 3.8.1 + * Handle upgrade from previous versions by moving the old (incompatible) + config file out of the way (Closes: #499820). + See README.Debian for details + * Add local scripts to ocsinventory-server package (Closes: #527354) + + -- Pierre Chifflier Mon, 18 May 2009 22:28:05 +0200 + +ocsinventory-server (1.02~rc2-1) experimental; urgency=low + + * New upstream release candidate + * Drop patches for ipdiscover, the script was removed upstream + * Re-enable download feature + * Note: the documentation guide was removed upstream (Closes: #440656) + * Re-write configuration file + * Prefer PHP5 over PHP4 + + -- Pierre Chifflier Mon, 08 Sep 2008 16:43:49 +0200 + +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-2.0.5.orig/debian/ocsinventory-server.postinst +++ ocsinventory-server-2.0.5/debian/ocsinventory-server.postinst @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e + +confpath="/etc/ocsinventory" +conffile="ocsinventory.conf" +log="/var/log/ocsinventory-server" + +# allow mod_perl to write on log files + +chown -R www-data:www-data $log +chmod -R g+w $log + + +if [ "$1" = "configure" -a "$#" -eq 2 ]; then + if [ ! -f $confpath/$conffile ]; then + cp /usr/share/ocsinventory-server/files/$conffile $confpath/$conffile + fi +fi + +if [ "$1" = "configure" ]; then + + # enable required apache modules + a2enmod perl + + # link apache config files in apache's conf.d dir + webserver="apache2" + if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/$conffile ]; then + ln -s $confpath/$conffile /etc/$webserver/conf.d/$conffile + fi + if [ -f /etc/init.d/$webserver ] ; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver reload || true + else + /etc/init.d/$webserver reload || true + fi + fi +fi + +#DEBHELPER# + +exit 0 --- ocsinventory-server-2.0.5.orig/debian/compat +++ ocsinventory-server-2.0.5/debian/compat @@ -0,0 +1 @@ +7 --- ocsinventory-server-2.0.5.orig/debian/ocsinventory-reports.postinst +++ ocsinventory-server-2.0.5/debian/ocsinventory-reports.postinst @@ -0,0 +1,44 @@ +#!/bin/sh +# postinst script for ocsinventory-reports +# +# see: dh_installdeb(1) + +set -e + +pkgpath="/usr/share/ocsinventory-reports" +varpath="/var/lib/ocsinventory-reports" +confpath="/etc/ocsinventory" +conffile="ocsreports.conf" + +# Allow php to write there +for dirname in ipd download snmp; do + chown -R www-data:www-data $varpath/$dirname + chmod -R g+w $varpath/$dirname +done + +for dirname in $pkgpath; do + chown -R www-data:www-data $dirname +done + +if [ "$1" = "configure" ]; then + + # enable required apache modules + a2enmod php5 + a2enmod rewrite + webserver="apache2" + if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/$conffile ]; then + ln -s $confpath/$conffile /etc/$webserver/conf.d/$conffile + fi +if [ -f /etc/init.d/$webserver ] ; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver reload || true + else + /etc/init.d/$webserver reload || true + fi + fi +fi + +#DEBHELPER# + +exit 0 + --- ocsinventory-server-2.0.5.orig/debian/ocsinventory-server.docs +++ ocsinventory-server-2.0.5/debian/ocsinventory-server.docs @@ -0,0 +1 @@ +README --- ocsinventory-server-2.0.5.orig/debian/README.Debian +++ ocsinventory-server-2.0.5/debian/README.Debian @@ -0,0 +1,63 @@ +ocsinventory-server for Debian +============================== + +Support for other agents +------------------------ + +Starting from version 2.0.2, support for non-native agents has been included upstream. +To add support for another agent, edit file etc/ocsinventory/ocsinventory-server.conf +and add:: + +PerlSetEnv OCS_OPT_EXT_USERAGENTS_FILE_PATH /etc/ocsinventory/agents.txt + +Create file /etc/ocsinventory/agents.txt and add one agent name per line. + +Database +-------- + +Since version 2.0, the Debian package does not use dbconfig to automatically +create the database user and the database. You will have to run install.php to +create database and ocs user. + +Please note that this has been decided in agreement with upstream developers. + +Post-installation notes +----------------------- + +Please note that after first installation, or after an upgrade, it's recommended +to call http://your_ocs_server/ocsreports/install.php ; + +Upgrading from previous version +------------------------------- + +If the previous version was installed using dbconfig to create the database, you +will have to get the password to be able to perform the upgrade. +The password can be found in file /etc/ocsinventory/ocsinventory.conf, and +also in /etc/dbconfig-common/ocsinventory-server.conf +The default login is 'ocs'. + +The install.php script will handle the database upgrade (it can take a while). + + +Debian changes +-------------- + +File /etc/ocsinventory/ocsinventory-reports.conf and /etc/ocsinventory/ocsinventory-server.conf have been renamed ocsinventory.conf and +ocsreports.conf to allow an easy upgrade from previous versions. + +ipd,snmp and download directories are placed in /var/lib/ocsinventory-server. + +The embedded copy of jquery (ocsinventory-reports/js/graph/jquery-1.6.2.js) is +replace by a symlink to the file from package libjs-jquery. + +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 Thu, 05 Apr 2012 21:09:29 +0200 --- ocsinventory-server-2.0.5.orig/debian/ocsinventory-server.install +++ ocsinventory-server-2.0.5/debian/ocsinventory-server.install @@ -0,0 +1 @@ +debian/conf/ocsinventory.conf usr/share/ocsinventory-server/files/ --- ocsinventory-server-2.0.5.orig/debian/copyright +++ ocsinventory-server-2.0.5/debian/copyright @@ -0,0 +1,64 @@ +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'. + + +Directory ocsreports/js/, 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 + + +File ocsreports/js/graph/elycharts.js: + Copyright 2010 Void Labs s.n.c. (http://void.it) + License: MIT License (http://creativecommons.org/licenses/MIT/) + +File ocsreports/js/graph/raphael.js: + Copyright 2010 Dmitry Baranovskiy (http://raphaeljs.com) + License: MIT License (http://raphaeljs.com/license.html) + +File ocsreports/js/graph/jquery-1.6.2.js: + Copyright 2011, John Resig + License: Dual licensed under the MIT or GPL Version 2 licenses. + (http://jquery.org/license) + Includes Sizzle.js 'http://sizzlejs.com/) + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + + +The Debian packaging is (C) 2007, Pierre Chifflier and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + --- ocsinventory-server-2.0.5.orig/debian/ocsinventory-server.dirs +++ ocsinventory-server-2.0.5/debian/ocsinventory-server.dirs @@ -0,0 +1,3 @@ +etc/ocsinventory +usr/share/ocsinventory-server/ +var/log/ocsinventory-server --- ocsinventory-server-2.0.5.orig/debian/ocsinventory-server.preinst +++ ocsinventory-server-2.0.5/debian/ocsinventory-server.preinst @@ -0,0 +1,43 @@ +#!/bin/sh +# preinst script for ocsinventory-reports +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install) + ;; + + upgrade) + if dpkg --compare-versions "$2" lt-nl "1.02-1"; then + # move old file out of the way + mv /etc/ocsinventory/ocsinventory.conf /etc/ocsinventory/ocsinventory.conf-$2 + ucf --debconf-ok --purge /etc/ocsinventory/ocsinventory.conf + fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- ocsinventory-server-2.0.5.orig/debian/watch +++ ocsinventory-server-2.0.5/debian/watch @@ -0,0 +1,4 @@ +# See uscan(1) for format +# (debscripts >= 2.9) +version=3 +http://sf.net/ocsinventory/OCSNG_UNIX_SERVER_([0-9].*)\.tar\.gz --- ocsinventory-server-2.0.5.orig/debian/ocsinventory-reports.install +++ ocsinventory-server-2.0.5/debian/ocsinventory-reports.install @@ -0,0 +1,2 @@ +ocsreports/* usr/share/ocsinventory-reports +debian/conf/ocsreports.conf etc/ocsinventory --- ocsinventory-server-2.0.5.orig/debian/ocsinventory-server.logrotate +++ ocsinventory-server-2.0.5/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-2.0.5.orig/debian/ocsinventory-reports.postrm +++ ocsinventory-server-2.0.5/debian/ocsinventory-reports.postrm @@ -0,0 +1,37 @@ +#!/bin/sh +# postrm script for ocsinventory-reports +# + +set -e + +varpath="/var/lib/ocsinventory-reports" +confpath="/etc/ocsinventory" +conffile="ocsreports.conf" + +if [ "$1" = purge ] ; then + rm -f $confpath/$conffile + rm -rf $varpath +fi + + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + + webserver="apache2" + if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/$conffile ]; then + rm -f /etc/$webserver/conf.d/$conffile + fi + +if [ -f /etc/init.d/$webserver ] ; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver restart 3>/dev/null || true + else + /etc/init.d/$webserver restart 3>/dev/null || true + fi + fi +fi + +#DEBHELPER# + +exit 0 + + --- ocsinventory-server-2.0.5.orig/debian/patches/01-compat_with_other_agents.patch +++ ocsinventory-server-2.0.5/debian/patches/01-compat_with_other_agents.patch @@ -0,0 +1,25 @@ +Description: Allow fusioninventory agent to communicate with ocsinventory + ocsinventory blocks user-agents by default, so allow fusioninventory. +Origin: vendor, http://forge.fusioninventory.org/projects/fusioninventory-agent/wiki/Patch_ocs_server +Author: Pierre Chifflier +Index: ocsinventory-server/Apache/Ocsinventory/Server/Useragent.pm +=================================================================== +--- ocsinventory-server.orig/Apache/Ocsinventory/Server/Useragent.pm 2011-07-10 11:14:32.000000000 +0200 ++++ ocsinventory-server/Apache/Ocsinventory/Server/Useragent.pm 2011-07-10 11:15:52.000000000 +0200 +@@ -54,6 +54,7 @@ + 'OCS-NG_windows_client' => [4032,4062], + 'OCS-NG_WINDOWS_AGENT' => undef, + 'OCS-NG_windows_mobile_agent' => undef, ++ 'FusionInventory-Agent' => undef, + ); + + sub useragent_prolog_read{ +@@ -70,6 +71,8 @@ + unless ($ocsagents{$useragent->{NAME}}) { #If no version specifed in hash + if ($useragent->{'VERSION'} <= $srvver) { + $stop=0; ++ } elsif ($useragent->{NAME} eq "FusionInventory-Agent") { ++ $stop = 0; + } + } elsif ($useragent->{'VERSION'} >= $ocsagents{$useragent->{'NAME'}}[0] && $useragent->{'VERSION'} <= $ocsagents{$useragent->{'NAME'}}[1]) { #For old windows agent versions compatibility + $stop= 0; --- ocsinventory-server-2.0.5.orig/debian/conf/snmp_com.txt +++ ocsinventory-server-2.0.5/debian/conf/snmp_com.txt @@ -0,0 +1,10 @@ + + + 0 + 2c + public + + + + + --- ocsinventory-server-2.0.5.orig/debian/conf/ocsreports.conf +++ ocsinventory-server-2.0.5/debian/conf/ocsreports.conf @@ -0,0 +1,65 @@ +################################################################################ +# +# OCS Inventory NG Administration Server +# +# Copyleft 2008 OCS Inventory NG Team +# Web: http://www.ocsinventory-ng.org +# +# 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 +################################################################################ + +# +# ANY CHANGE ON THIS FILE REQUIRES APACHE RESTART TO TAKE EFFECT +# + +################################################################################ +# Administration console public pages +# +# Alias used to put Administration Server static page (typically PHP) outside +# Apache document root directory +# +Alias /ocsreports /usr/share/ocsinventory-reports/ + + + # By default, users can use console from everywhere + Order deny,allow + Allow from all + Options Indexes FollowSymLinks + DirectoryIndex index.php + AllowOverride Options + + # Uncomment following to force use of HTTPS in Administration Server + #SSLRequireSSL + + # PHP tuning (not working on all distribution, use php.ini instead) + AddType application/x-httpd-php .php + php_flag file_uploads on + # Some PHP tuning for deployement feature up to 8 MB + # post_max_size must be greater than upload_max_filesize + # because of HTTP headers + php_value post_max_size 101m + php_value upload_max_filesize 100m + # You may have to uncomment following on errors + #php_value max_execution_time -1 + #php_value max_input_time -1 + + #!! Mandatory !! : set magic_quotes_gpc to off (to make ocsreports works correctly) + php_flag magic_quotes_gpc off + + # Uncomment following to allow HTTP body request up to 4 MB + # instead default 512 KB + #LimitRequestBody 4194304 + + # Uncomment following if you need to specify a mysql socket + #php_value mysql.default_socket "path/to/mysql/unix/socket" + + + +################################################################################ +# Deployment packages download area +# +# Alias to put Deployement package files outside Apache document root directory +# +Alias /download /var/lib/ocsinventory-reports/download --- ocsinventory-server-2.0.5.orig/debian/conf/ocsinventory.conf +++ ocsinventory-server-2.0.5/debian/conf/ocsinventory.conf @@ -0,0 +1,306 @@ +################################################################################ +# +# OCS Inventory NG Communication Server Perl Module Setup +# +# Copyleft 2006 Pascal DANEK +# Web: http://www.ocsinventory-ng.org +# +# 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 + + # Master Database settings + # Replace DATABASE_SERVER by hostname or ip of MySQL server for WRITE + PerlSetEnv OCS_DB_HOST localhost + # Replace DATABASE_PORT by port where running MySQL server, generally 3306 + PerlSetEnv OCS_DB_PORT 3306 + # Name of database + PerlSetEnv OCS_DB_NAME ocsweb + PerlSetEnv OCS_DB_LOCAL ocsweb + # User allowed to connect to database + PerlSetEnv OCS_DB_USER ocs + # Password for user + PerlSetVar OCS_DB_PWD ocs + + # Slave Database settings + # Replace DATABASE_SERVER by hostname or ip of MySQL server for READ + # Useful if you handle mysql slave databases + # PerlSetEnv OCS_DB_SL_HOST DATABASE_SERVER + # Replace DATABASE_PORT by port where running MySQL server, generally 3306 + # PerlSetEnv OCS_DB_SL_PORT_SLAVE DATABASE_PORT + # User allowed to connect to database + # PerlSetEnv OCS_DB_SL_USER ocs + # Name of the database + # PerlSetEnv OCS_DB_SL_NAME ocsweb + # Password for user + # PerlSetVar OCS_DB_SL_PWD ocs + + # Path to log directory (must be writeable) + PerlSetEnv OCS_OPT_LOGPATH "/var/log/ocsinventory-server/" + + # If you need to specify a mysql socket that the client's built-in + #PerlSetEnv OCS_OPT_DBI_MYSQL_SOCKET "path/to/mysql/unix/socket" + # DBI verbosity + PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 0 + + # Unicode support + PerlSetEnv OCS_OPT_UNICODE_SUPPORT 1 + + # If you are using a multi server architecture, + # Put the ip addresses of the slaves on the master + # (This is read as perl regular expressions) + PerlAddVar OCS_OPT_TRUSTED_IP 127.0.0.1 + #PerlAddVar OCS_OPT_TRUSTED_IP XXX.XXX.XXX.XXX + +# ===== WEB SERVICE (SOAP) SETTINGS ===== + + PerlSetEnv OCS_OPT_WEB_SERVICE_ENABLED 0 + PerlSetEnv OCS_OPT_WEB_SERVICE_RESULTS_LIMIT 100 + # PerlSetEnv OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF "WEBSERV_PRIV_MOD_CONF_FILE" + +# Be careful: you must restart apache to make settings taking effects + + # Configure engine to use the settings from this file + PerlSetEnv OCS_OPT_OPTIONS_NOT_OVERLOADED 0 + + # Try to use other compress algorythm than raw zlib + # GUNZIP and clear XML are supported + PerlSetEnv OCS_OPT_COMPRESS_TRY_OTHERS 1 + +############################################################## +# ===== OPTIONS BELOW ARE OVERLOADED IF YOU USE OCS GUI =====# +############################################################## + +# NOTE: IF YOU WANT TO USE THIS CONFIG FILE INSTEAD, set OCS_OPT_OPTIONS_NOT_OVERLOADED to '1' + +# ===== MAIN SETTINGS ===== + + # Enable engine logs (see LOGPATH setting) + PerlSetEnv OCS_OPT_LOGLEVEL 0 + # Specify agent's prolog frequency + PerlSetEnv OCS_OPT_PROLOG_FREQ 12 + # Configure the duplicates detection system + PerlSetEnv OCS_OPT_AUTO_DUPLICATE_LVL 15 + # Futur security improvements + PerlSetEnv OCS_OPT_SECURITY_LEVEL 0 + # Validity of a computer's lock + PerlSetEnv OCS_OPT_LOCK_REUSE_TIME 600 + # Enable the history tracking system (useful for external data synchronisation + PerlSetEnv OCS_OPT_TRACE_DELETED 0 + +# ===== INVENTORY SETTINGS ===== + + # Specify the validity of inventory data + PerlSetEnv OCS_OPT_FREQUENCY 0 + # Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load) + PerlSetEnv OCS_OPT_INVENTORY_DIFF 1 + # Make engine consider an inventory as a transaction (lower concurency, better disk usage) + PerlSetEnv OCS_OPT_INVENTORY_TRANSACTION 1 + # Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load + PerlSetEnv OCS_OPT_INVENTORY_WRITE_DIFF 1 + # Enable some stuff to improve DB queries, especially for GUI multicriteria searching system + PerlSetEnv OCS_OPT_INVENTORY_CACHE_ENABLED 1 + # Specify when the engine will clean the inventory cache structures + PerlSetEnv OCS_OPT_INVENTORY_CACHE_REVALIDATE 7 + # Enable you to keep trace of every elements encountered in db life + PerlSetEnv OCS_OPT_INVENTORY_CACHE_KEEP 1 + +# ===== SOFTWARES DEPLOYMENT SETTINGS ===== + + # Enable this feature + PerlSetEnv OCS_OPT_DOWNLOAD 0 + # Package wich have a priority superior than this value will not be downloaded + PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LENGTH 10 + # Time between two download cycles (bandwidth control) + PerlSetEnv OCS_OPT_DOWNLOAD_CYCLE_LATENCY 60 + # Time between two fragment downloads (bandwidth control) + PerlSetEnv OCS_OPT_DOWNLOAD_FRAG_LATENCY 60 + # Specify if you want to track packages affected to a group on computer's level + PerlSetEnv OCS_OPT_DOWNLOAD_GROUPS_TRACE_EVENTS 1 + # Time between two download periods (bandwidth control) + PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LATENCY 60 + # Agents will send ERR_TIMEOUT event and clean the package it is older than this setting + PerlSetEnv OCS_OPT_DOWNLOAD_TIMEOUT 7 + # Number of cycle within a period + + # Enable ocs engine to deliver agent's files (deprecated) + PerlSetEnv OCS_OPT_DEPLOY 0 + # Enable the softwares deployment capacity (bandwidth control) + +# ===== GROUPS SETTINGS ===== + + # Enable the computer\s groups feature + PerlSetEnv OCS_OPT_ENABLE_GROUPS 1 + # Random number computed in the defined range. Designed to avoid computing many groups in the same process + PerlSetEnv OCS_OPT_GROUPS_CACHE_OFFSET 43200 + # Specify the validity of computer's groups (default: compute it once a day - see offset) + PerlSetEnv OCS_OPT_GROUPS_CACHE_REVALIDATE 43200 + +# ===== IPDISCOVER SETTINGS ===== + + # Specify how much agent per LAN will discovered connected peripherals (0 to disable) + PerlSetEnv OCS_OPT_IPDISCOVER 2 + # Specify the minimal difference to replace an ipdiscover agent + PerlSetEnv OCS_OPT_IPDISCOVER_BETTER_THRESHOLD 1 + # Time between 2 arp requests (mini: 10 ms) + PerlSetEnv OCS_OPT_IPDISCOVER_LATENCY 100 + # Specify when to remove a computer when it has not come until this period + PerlSetEnv OCS_OPT_IPDISCOVER_MAX_ALIVE 14 + # Disable the time before a first election (not recommended) + PerlSetEnv OCS_OPT_IPDISCOVER_NO_POSTPONE 0 + # Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents) + PerlSetEnv OCS_OPT_IPDISCOVER_USE_GROUPS 1 + +# ===== INVENTORY FILES MAPPING SETTINGS ===== + + # Use with ocsinventory-injector, enable the multi entities feature + PerlSetEnv OCS_OPT_GENERATE_OCS_FILES 0 + # Generate either compressed file or clear XML text + PerlSetEnv OCS_OPT_OCS_FILES_FORMAT OCS + # Specify if you want to keep trace of all inventory between to synchronisation with the higher level server + PerlSetEnv OCS_OPT_OCS_FILES_OVERWRITE 0 + # Path to ocs files directory (must be writeable) + PerlSetEnv OCS_OPT_OCS_FILES_PATH /tmp + +# ===== FILTER SETTINGS ===== + + # Enable prolog filter stack + PerlSetEnv OCS_OPT_PROLOG_FILTER_ON 0 + # Enable core filter system to modify some things "on the fly" + PerlSetEnv OCS_OPT_INVENTORY_FILTER_ENABLED 0 + # Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period + PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP 0 + # Period definition for INVENTORY_FILTER_FLOOD_IP + PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME 300 + # Enable inventory filter stack + PerlSetEnv OCS_OPT_INVENTORY_FILTER_ON 0 + +# ===== DATA FILTER ===== + + #Enable the dat filtering capacity + PerlSetEnv OCS_OPT_DATA_FILTER 0 + + # Set the table names and the field associated you want to filter + #PerlAddVar OCS_OPT_DATA_TO_FILTER HARDWARE + #PerlAddVar OCS_OPT_DATA_TO_FILTER USERID + + +# ===== REGISTRY SETTINGS ===== + + # Enable the registry capacity + PerlSetEnv OCS_OPT_REGISTRY 1 + +# ===== SNMP SETTINGS ===== + + # Enable the SNMP capacity + PerlSetEnv OCS_OPT_SNMP 0 + + # Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) + PerlSetEnv OCS_OPT_SNMP_INVENTORY_DIFF 1 + +# ===== SESSION SETTINGS ===== +# Not yet in GUI + + # Validity of a session (prolog=>postinventory) + PerlSetEnv OCS_OPT_SESSION_VALIDITY_TIME 600 + # Consider a session obsolete if it is older thant this value + PerlSetEnv OCS_OPT_SESSION_CLEAN_TIME 86400 + # Accept an inventory only if required by server + #( Refuse "forced" inventory) + PerlSetEnv OCS_OPT_INVENTORY_SESSION_ONLY 0 + +# ===== TAG ===== + + # The default behavior of the server is to ignore TAG changes from the + # agent. + PerlSetEnv OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT 0 + + +# ===== DEPRECATED ===== + + # Set the proxy cache validity in http headers when sending a file + PerlSetEnv OCS_OPT_PROXY_REVALIDATE_DELAY 3600 + # Deprecated + PerlSetEnv OCS_OPT_UPDATE 0 + +############ 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 + + # Capacities + PerlModule Apache::Ocsinventory::Server::Capacities::Registry + PerlModule Apache::Ocsinventory::Server::Capacities::Update + PerlModule Apache::Ocsinventory::Server::Capacities::Ipdiscover + PerlModule Apache::Ocsinventory::Server::Capacities::Download + PerlModule Apache::Ocsinventory::Server::Capacities::Notify + PerlModule Apache::Ocsinventory::Server::Capacities::Snmp + # This module guides you through the module creation + # PerlModule Apache::Ocsinventory::Server::Capacities::Example + # This module adds some rules to filter some request sent to ocs server in the prolog and inventory stages + # PerlModule Apache::Ocsinventory::Server::Capacities::Filter + # This module add availibity to filter data from HARDWARE section (data filtered won't be stored in database) + # PerlModule Apache::Ocsinventory::Server::Capacities::Datafilter + + # PerlTaintCheck On + + # SSL apache settings + #SSLEngine "SSL_ENABLE" + #SSLCertificateFile "SSL_CERTIFICATE_FILE" + #SSLCertificateKeyFile "SSL_CERTIFICATE_KEY_FILE" + #SSLCACertificateFile "SSL_CERTIFICATE_FILE" + #SSLCACertificatePath "SSL_CERTIFICATE_PATH" + #SSLVerifyClient "SSL_VALIDATE_CLIENT" + + # Engine apache settings + # "Virtual" directory for handling OCS Inventory NG agents communications + # Be careful, do not create such directory into your web server root document ! + + order deny,allow + allow from all + Satisfy Any + # If you protect this area you have to deal with http_auth_* agent's parameters + # AuthType Basic + # AuthName "OCS Inventory agent area" + # AuthUserFile "APACHE_AUTH_USER_FILE" + # require valid-user + SetHandler perl-script + PerlHandler Apache::Ocsinventory + + + # Web service apache settings + PerlModule Apache::Ocsinventory::SOAP + + + SetHandler perl-script + PerlHandler "Apache::Ocsinventory::SOAP" + + # By default, you can query web service from everywhere with a valid user + Order deny,allow + Allow from all + AuthType Basic + AuthName "OCS Inventory SOAP Area" + # Use htpasswd to create/update soap-user (or another granted user) + AuthUserFile "APACHE_AUTH_USER_FILE" + require "SOAP_USER" + + +