Package: piwigo
Version: 2.2.1-1
Severity: important

  When upgrading and after being hit by the mysql upgrade bug (see my previous
report), the upgrade fails again :
[...]
applying upgrade sql for 2.1.2-3 -> 2.2.1.
dbconfig-common: flushing administrative password
dbconfig-common: flushing administrative password
dbconfig-common: flushing administrative password
dbconfig-common: flushing administrative password
mv: ne peut déplacer « /usr/share/piwigo/web/local » vers un sous-répertoire de 
lui-même « /var/lib/piwigo/web/local/local »
dpkg : erreur de traitement de piwigo (--configure) :
 le sous-processus script post-installation installé a retourné une erreur de 
sortie d'état 1
configured to not write apport reports
                                      Des erreurs ont été rencontrées pendant 
l'exécution :
 piwigo
E: Sub-process /usr/bin/dpkg returned an error code (1)


aya:/var/lib/piwigo/web/local# ls -ld /usr/share/piwigo/web/local 
/var/lib/piwigo/web/local
drwxr-xr-x 6 root root 4096 18 juin  10:10 /usr/share/piwigo/web/local
lrwxrwxrwx 1 root root   27 17 janv. 13:21 /var/lib/piwigo/web/local -> 
/usr/share/piwigo/web/local


If I understand correctly, you want to setup the reverse thing.
I do not remember if I manually created the /var/lib/piwigo/web/local symlinks
(it would have been in respond to a piwigo warning). In any case, you need to
make your upgrade script more robust.


Note that, after manually removing the /var/lib/piwigo/web/local symlinks,
I also needs to comment all lines in
/usr/share/dbconfig-common/data/piwigo/upgrade/mysql/piwigo
in order to pass the mysql upgrade (already done but your script is not
idempotent). I do not know if this is a bug in piwigo or in configdb.
In any case, I you want to be able to abort the upgrade due to detecting a
strange configuration in /var/lib/piwigo/web/local (or other things), you
whould do the mysql upgrade *after* so that dbconfig does not try to do it
several times. (and your upgrade script must be idempotent: I do not tried but
I really think that your test "if [ ! "$old_version" = "2.2.1-1" ];then" will
not prevent the following code to be reexecuted and I'm not sure it is
idempotent.


  Regards,
    Vincent

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages piwigo depends on:
ii  apache2                       2.2.19-1   Apache HTTP Server metapackage
ii  apache2-mpm-prefork [httpd]   2.2.19-1   Apache HTTP Server - traditional n
ii  dbconfig-common               1.8.47     common framework for packaging dat
ii  debconf [debconf-2.0]         1.5.39     Debian configuration management sy
ii  libapache2-mod-php5           5.3.3-7    server-side, HTML-embedded scripti
ii  libjs-jquery                  1.6.1-1    JavaScript library for dynamic web
ii  libphp-pclzip                 2.8.2-2    zip archive manager class for PHP
ii  php5                          5.3.3-7    server-side, HTML-embedded scripti
ii  php5-gd                       5.3.3-7    GD module for php5
ii  php5-mysql                    5.3.3-7    MySQL module for php5
ii  smarty                        2.6.26-0.2 Template engine for PHP

Versions of packages piwigo recommends:
ii  mysql-client                  5.1.57-1.3 MySQL database client (metapackage
ii  mysql-client-5.1 [mysql-clien 5.1.57-1.3 MySQL database client binaries
ii  mysql-server-5.1 [mysql-serve 5.1.57-1.3 MySQL database server binaries and

piwigo suggests no packages.

-- Configuration Files:
/etc/piwigo/apache.conf changed:
Alias /piwigo2/ /usr/share/piwigo/web/
Alias /piwigo/ /usr/share/piwigo/web/
<Directory /usr/share/piwigo/web/>
    DirectoryIndex index.php
    Options +FollowSymLinks -Indexes
</Directory>

/etc/piwigo/config_local.inc.php changed:
<?php
// This file allows to override the default configuration of
// /usr/share/piwigo/web/include/config_default.inc.php
$conf['prefix_thumbnail'] = 'TN-';
$conf['show_gt'] = true;
$conf['allow_random_representative'] = true;
$conf['order_by'] = ' ORDER BY file ASC';
$conf['order_by_inside_category'] = $conf['order_by'];
$conf['newcat_default_status'] = 'private';
$conf['links'] = array(
  'http://blogs.danjean.fr/lceg' => 'Toute notre cuisine',
);
$conf['default_email_format'] = 'text/plain';
$conf['alternative_email_format'] = 'text/html';
$conf['tags_default_display_mode'] = 'letters';
// From 
http://fr.piwigo.org/doc/doku.php?id=pwg2:utilisation:fonctionnalites:meta
// +-----------------------------------------------------------------------+
// |                           LES META-DONNEES                            |
// +-----------------------------------------------------------------------+
 
//          CHAPITRE 1er
//                              LES CHAMPS EXIF
 
// Le visiteur pourra faire apparaître les méta-données EXIF sur picture.php
// en cliquant sur l'icône appropriée.
// show_exif: [false] - [true];
// Si vous choisissez "false" les champs ne seront pas affichés.
// Si vous choisissez "true" les champs seront affichés.
$conf['show_exif'] = true;
// FIXEME: supprimer l'icône en cas de paramètre à false.
 
// Piwigo peut stocker les informations EXIF dans la base de données.
// Cela facilite notamment les recherches. 
// Pour utiliser les métadonnées EXIF lors de la synchronisation:
// $conf['use_exif'] = [false] - [true];
// Si vous choisissez "false", les données ne seront pas enregistrées dans la 
BDD.
// Si vous choisissez "true", les données seront enregistrées dans la BDD.
$conf['use_exif'] = true;
 
// Si vous décidez d'enregistrer des champs EXIF dans la Base De Données,
// il faut dire "lesquels". Ce paramétrage est utilisé durant
// la synchronisation. Chaque clé du tableau représente une colonne de la
// table images, chaque valeur correspond à un identifiant EXIF.
// Seuls les champs listés ci-après sont compatibles. N'en rajoutez pas plus
// ils ne seront pas inscrits dans la base de données.
$conf['use_exif_mapping'] = array(
'date_creation' => 'DateTimeOriginal'
);
// Pour rajouter d'autres champs, il faut adapter votre Base De Données. 
(expérimental)
 
// Pour n'afficher que les champs EXIF nécessaires, il vous faut définir ici
// à l'avance quels champs seront à afficher. (indépendant de use_exif_mapping).
// Évidement, les lignes vides n'apparaîtrons pas...
// Il est possible de choisir des champs parmi des groupes, par exemple
// ['COMPUTED']['ApertureFNumber']. Pour cela, créer une clé
// 'COMPUTED;ApertureFNumber'.
// Si le MOD MoreExif_EOS300D-40D est installé, certains EXIF seront
// automatiquement affichés même s'ils n'apparaissent pas la liste ci-dessous.
$conf['show_exif_fields'] = array(
'exif_field_Make'       => 'Make',
'exif_field_Model'       => 'Model',
'exif_field_ExposureTime'     => 'ExposureTime',
'exif_field_FocalLength'     => 'FocalLength', 
'exif_field_FNumber'       => 'FNumber',
'exif_field_ExposureBiasValue'     => 'ExposureBiasValue',
'exif_field_ISOSpeedRatings'     => 'ISOSpeedRatings',
'exif_field_DateTimeOriginal'     => 'DateTimeOriginal',
'exif_field_ExposureProgram'     => 'ExposureProgram',
'exif_field_Make'       => 'Make',
'exif_field_Model'       => 'Model',
'exif_field_ExposureTime'     => 'ExposureTime',
'exif_field_FocalLength'     => 'FocalLength', 
'exif_field_FNumber'       => 'FNumber',
'exif_field_ExposureBiasValue'     => 'ExposureBiasValue',
'exif_field_ISOSpeedRatings'     => 'ISOSpeedRatings',
'exif_field_DateTimeOriginal'     => 'DateTimeOriginal',
'exif_field_TakenDate'     => 'TakenDate',
'exif_field_ExposureProgram'     => 'ExposureProgram',
'exif_field_ModeArray'       => 'ModeArray',
'exif_field_SelfTimer'       => 'SelfTimer',
'exif_field_ImageQuality'     => 'ImageQuality',
'exif_field_Flash'      => 'Flash',
'exif_field_Drive'       => 'Drive',
'exif_field_FocusMode'       => 'FocusMode',
'exif_field_ImageSize'      => 'ImageSize',
'exif_field_EasyShootingMode'     => 'EasyShootingMode',
'exif_field_Contrast'      => 'Contrast',
'exif_field_Saturation'     => 'Saturation',
'exif_field_Sharpness'       => 'Sharpness',
'exif_field_MeteringMode'     => 'MeteringMode',
'exif_field_ExposureProgram'     => 'ExposureProgram',
'exif_field_MinFocal'       => 'MinFocal',
'exif_field_MaxFocal'       => 'MaxFocal',
'exif_field_FlashActivity'     => 'FlashActivity',
'exif_field_Stabilization'     => 'Stabilization',
'exif_field_SpotMeteringMode'     => 'SpotMeteringMode'
);
 
// Le titre de l'information affichée sur picture.php sera une clé de
// langue, comme par exemple $lang['exif_field_Make'] si elle existe.
// Pour les champs composés, ne prendre en compte que le dernier niveau 
// Par exemple pour la clé 'COMPUTED;ApertureFNumber' vous avez besoin de
// $lang['exif_field_ApertureFNumber']
//
// Maintenant que vous avez choisi vos informations EXIF à afficher, nous
// allons voir comment les traduire dans votre langue. J'utilise le plugin
// LocalFile Editor.
// Rendez vous dans Administration > Plugins > LocalFile Editor > Langue
// Choisissez le fichier de langue qui vous convient.
// Je veux traduire:   'exif_field_Make'
// Pour cela nous allons écrire la ligne suivante dans le fichier de langue :
// $lang['exif_field_Make']       = 'Marque';
// Vous avez donc la donnée encapsulée qui donne le résultat =... terminé par
// le point virgule à la fin de chaque ligne.
 
 
//          CHAPITRE 2e
//                             LES CHAMPS IPTC
 
 
// C'est exactement le même raisonnement que pour les champs EXIF.
// Pour plus d'informations sur la correspondance des champs :
// http://fr.piwigo.org/doc/doku.php?id=pwg2:utilisation:fonctionnalites:meta
 
$conf['show_iptc'] = true;
 
$conf['use_iptc'] = true;
 
$conf['use_iptc_mapping'] = array(
'keywords'        => '2#025',
'author'          => '2#122',
'name'            => '2#105',
'comment'         => '2#120'
);
 
$conf['show_iptc_mapping'] = array(
'iptc_Object'                                  => '2#005',
'iptc_Edit_Status'                             => '2#007',
'iptc_Urgency'                                 => '2#010',
'iptc_Category'                                => '2#015',
'iptc_Supplemental_Category'                   => '2#020',
'iptc_Fixture_Identifier'                      => '2#022',
'iptc_Keywords'                                => '2#025',
'iptc_Release_Date'                            => '2#030',
'iptc_Release_Time'                            => '2#035',
'iptc_Special_Instructions'                    => '2#040',
'iptc_Reference_service'                       => '2#045',
'iptc_Reference_Date'                          => '2#047',
'iptc_Reference_Number'                        => '2#050',
'iptc_Date_Created'                            => '2#055',
'iptc_Time_Created'                            => '2#060',
'iptc_Originating_Program'                     => '2#065',
'iptc_Program_version'                         => '2#070',
'iptc_Object_cycle'                            => '2#075',
'iptc_By_line'                                 => '2#080',
'iptc_By_line_Title'                           => '2#085',
'iptc_City'                                    => '2#090',
'iptc_Province_State'                          => '2#095',
'iptc_Country_Primary_Location_Code'           => '2#100',
'iptc_Country_Primary_Location_Name'           => '2#101',
'iptc_Original_Transmission_Reference'         => '2#103',
'iptc_Headline'                                => '2#105',
'iptc_Credit'                                  => '2#110',
'iptc_Source'                                  => '2#115',
'iptc_Copyright_Notice'                        => '2#116',
'iptc_Contact'                                 => '2#118',
'iptc_Caption_Abstract'                        => '2#120',
'iptc_Writer_Editor'                           => '2#122',
'iptc_Image_Type'                              => '2#130'
  );
?>


-- debconf information:
* piwigo/debconf_install: true
  piwigo/install-error: abort
  piwigo/pgsql/changeconf: false
* piwigo/admin_mail: [email protected]
  piwigo/pgsql/admin-user: postgres
  piwigo/pgsql/method: unix socket
* piwigo/upgrade-error: retry (skip questions)
  piwigo/pgsql/manualconf:
* piwigo/dbconfig-upgrade: true
  piwigo/db/basepath:
  piwigo/pgsql/authmethod-admin: ident
  piwigo/db/app-user: piwigo
  piwigo/remote/port:
  piwigo/pgsql/authmethod-user:
  piwigo/dbconfig-remove:
  piwigo/passwords-do-not-match:
  piwigo/remote/host:
  piwigo/pgsql/no-empty-passwords:
  piwigo/internal/skip-preseed: false
* piwigo/admin_login: vdanjean
* piwigo/database-type: mysql
  piwigo/upgrade-backup: true
  piwigo/remove-error: abort
* piwigo/dbconfig-install: true
  piwigo/dbconfig-reinstall: false
  piwigo/mysql/admin-user: root
  piwigo/mysql/method: unix socket
  piwigo/internal/reconfiguring: false
  piwigo/missing-db-package-error: abort
  piwigo/purge: false
  piwigo/remote/newhost:
  piwigo/db/dbname: piwigo
* piwigo/webserver: apache2



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to