On Mon, 2010-01-11 at 13:42 +0100, Mats Erik Andersson wrote: > I corrected the reference to state #553538 in a renewed upload to m.d.n.
[Attaching the diff to the bug for posterity.] Thanks, it looks good. I think I would use NEWS.Debian instead of README.Debian for details of the change - there's a chance that people using 'apt-listchanges' will only read news entries. Perhaps the images should have symlinks in /var/lib/iog now, otherwise the newly-installed package will not generate working HTML. I'm wondering about upgrades - do you think it's important to handle upgrades from previous installations smoothly? I might expect a debconf question offering to move my current /var/www/iog to /var/lib/iog if you are upgrading. But I'm not sure it's essential... perhaps it just adds complexity. I haven't checked how other people have fixed similar problems. -- Tim Retout <[email protected]>
diff -u iog-1.03/iog.cfg iog-1.03/iog.cfg --- iog-1.03/iog.cfg +++ iog-1.03/iog.cfg @@ -27,6 +27,6 @@ # sw2-port20:192.168.0.11:public:ifHCInOctets.20:ifHCOutOctets.20:/www/iog/ # -[localhost:127.0.0.1:public:sysUpTime.0:/var/www/iog] -localhost:127.0.0.1:public:ifInOctets.2:ifOutOctets.2:/var/www/iog +[localhost:127.0.0.1:public:sysUpTime.0:/var/lib/iog] +localhost:127.0.0.1:public:ifInOctets.2:ifOutOctets.2:/var/lib/iog diff -u iog-1.03/debian/changelog iog-1.03/debian/changelog --- iog-1.03/debian/changelog +++ iog-1.03/debian/changelog @@ -1,3 +1,15 @@ +iog (1.03-3.2) unstable; urgency=low + + * Non-maintainer upload. + * Repair 'dir-or-file-in-var-www'. (Closes: #553538) + + Replace '/var/www' with '/var/lib/iog' in 'iog.cfg'. + + debian/postinst: Now acts on '/var/lib/iog'. + Ownership 'www-data:www-data' should later be removed. + + Store images '*.gif' in '/usr/share/iog/'. + + debian/README.Debian: New file with explanations. + + -- Mats Erik Andersson <[email protected]> Mon, 11 Jan 2010 13:33:04 +0100 + iog (1.03-3.1) unstable; urgency=low * Non-maintainer upload. diff -u iog-1.03/debian/iog.install iog-1.03/debian/iog.install --- iog-1.03/debian/iog.install +++ iog-1.03/debian/iog.install @@ -1,3 +1,3 @@ -*.gif var/www/iog/ +*.gif usr/share/iog/ iog usr/sbin/ iog.cfg etc/ diff -u iog-1.03/debian/dirs iog-1.03/debian/dirs --- iog-1.03/debian/dirs +++ iog-1.03/debian/dirs @@ -3 +3,2 @@ -var/www/iog +usr/share/iog +var/lib/iog diff -u iog-1.03/debian/postinst iog-1.03/debian/postinst --- iog-1.03/debian/postinst +++ iog-1.03/debian/postinst @@ -14,7 +14,7 @@ case "$1" in configure) - chown -R www-data.www-data /var/www/iog + chown -R www-data:www-data /var/lib/iog ;; only in patch2: unchanged: --- iog-1.03.orig/debian/README.Debian +++ iog-1.03/debian/README.Debian @@ -0,0 +1,35 @@ +Due to the Debian Policy on FHS compliance, the habit of the +original source for this software to install web content +into the location '/var/www/' had to be prevented. + +Instead, three static pictures '{in,out,ioglogo}.gif' have +been relocated to + + /usr/share/iog/ + +and the dynamically generated web content will initially be +stored in + + /var/lib/iog/ + +at every run of the cron-script. + +To make the package productive, the Administrator should copy +the three (static) images into the web server directory + + /path-to-web-base/iog/ + +and alter the configuration file '/etc/iog.cfg' to use this new +directory + + [localhost:127.0.0.1:public:sysUpTime.0:/path-to-web-base/iog] + localhost:127.0.0.1:public:ifInOctets.2:ifOutOctets.2:/path-to-web-base/iog + +Observe that the only needed change is to replace '/var/www/iog' +with a correct and live path '/path-to-web-base/iog' at the very +end of both lines. The cron-script is run with owner 'www-data', +so the directory '/path-to-web-server/iog' needs to be writable +for this owner. + +Whether all this works for your snmpd-setup is another matter! +You need at least a 'rocommunity' entry for 'public'.

