diff --git a/debian/0comments b/debian/0comments deleted file mode 100644 index 1cef1fc..0000000 --- a/debian/0comments +++ /dev/null @@ -1,22 +0,0 @@ -# Configuration file for pcsc-lite Debian package -# Ludovic Rousseau -# -# Do NOT edit this file directly but use update-reader.conf(8) instead. -# -# If the driver you use support debconf (for example libgempc410 does) use -# 'dpkg-reconfigure package-name' (dpkg-reconfigure libgempc410) -# -# If the driver you use DO NOT then create a NEW file under -# /etc/reader.conf.d/ that will contain something like (without comment): -# -# FRIENDLYNAME Any name -# DEVICENAME device filename used by the reader: -# /dev/ttyS0 for the first serial port -# or /dev/null if this is not used by the driver -# LIBPATH Location of the driver library for your reader -# CHANNELID -# 0x0103F8 or 1 for /dev/ttyS0 (COM1) -# 0x0102F8 or 2 for /dev/ttyS1 (COM2) -# 0x0103E8 or 3 for /dev/ttyS2 (COM3) -# 0x0102E8 or 4 for /dev/ttyS3 (COM4) -# diff --git a/debian/changelog b/debian/changelog index 2ebb6ce..57d1d8d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,14 @@ pcsc-lite (1.6.0-1) experimental; urgency=low * New upstream release * debian/libpcsclite-dev.install: do not install libpcsclite.a since it is no more built upstream. + * configure pcscd to use --enable-confdir=/etc/reader.conf.d instead of + /var/lib/pcscd since pcscd can now parse a directory and each file in it. + . Also remove update-reader.conf(8) script and related files since it is + now useless. + . pcscd.postinst now removes the unused files instead of calling + update-reader.conf. This script can be removed for squeeze+1 - -- Ludovic Rousseau Wed, 12 May 2010 15:46:51 +0200 + -- Ludovic Rousseau Wed, 12 May 2010 15:56:45 +0200 pcsc-lite (1.5.5-3) unstable; urgency=low diff --git a/debian/pcscd.install b/debian/pcscd.install index 7b9ad6f..4f45bc1 100644 --- a/debian/pcscd.install +++ b/debian/pcscd.install @@ -1,3 +1 @@ -etc/reader.conf.d/0comments usr/sbin/pcscd -usr/sbin/update-reader.conf diff --git a/debian/pcscd.manpages b/debian/pcscd.manpages index 29587c2..893c3ee 100644 --- a/debian/pcscd.manpages +++ b/debian/pcscd.manpages @@ -1,3 +1,2 @@ debian/tmp/usr/share/man/man8/pcscd.8 debian/tmp/usr/share/man/man5/reader.conf.5 -debian/update-reader.conf.8 diff --git a/debian/pcscd.postinst b/debian/pcscd.postinst index 43139c8..399ff01 100644 --- a/debian/pcscd.postinst +++ b/debian/pcscd.postinst @@ -2,9 +2,18 @@ set -e -# regenerate /etc/reader.conf -if [ -x /usr/sbin/update-reader.conf ]; then - update-reader.conf || true; +OLDCFGFILE=/etc/reader.conf +CFGDIR=/var/lib/pcscd +CFGFILE="$CFGDIR/reader.conf" + +# /etc/reader.conf is no more used +if [ -f $OLDCFGFILE ]; then + mv $OLDCFGFILE $OLDCFGFILE.old +fi + +# remove /var/lib/pcscd +if [ -d $CFGDIR ]; then + rm -rf $CFGDIR fi #DEBHELPER# diff --git a/debian/rules b/debian/rules index fa1890c..2e1d0e5 100755 --- a/debian/rules +++ b/debian/rules @@ -48,7 +48,7 @@ configure-stamp: # we add LDFLAGS="-lpthread" for bug #253629 ./configure $(confflags) \ - --enable-confdir=/var/lib/pcscd \ + --enable-confdir=/etc/reader.conf.d \ --prefix=/usr \ --enable-usbdropdir=/usr/lib/pcsc/drivers \ INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \ @@ -86,10 +86,6 @@ install: build # Add here commands to install the package into debian/tmp. $(MAKE) install DESTDIR=`pwd`/debian/tmp - # Move update-reader.conf files - install -m 755 debian/update-reader.conf `pwd`/debian/tmp/usr/sbin/ - install -D -m 644 debian/0comments `pwd`/debian/tmp/etc/reader.conf.d/0comments - # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. diff --git a/debian/update-reader.conf b/debian/update-reader.conf deleted file mode 100644 index 54763ad..0000000 --- a/debian/update-reader.conf +++ /dev/null @@ -1,115 +0,0 @@ -#! /bin/bash -# -# This is the update-reader.conf script for Debian GNU/Linux. -# Written by Ludovic Rousseau -# Based on update-modules written by Wichert Akkerman -# Copyright (C) 2001 Software in the Public Interest -# - -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -# $Id: update-reader.conf,v 1.4 2005-03-24 13:17:57 rousseau Exp $ - -OLDCFGFILE=/etc/reader.conf -CFGDIR=/var/lib/pcscd -CFGFILE="$CFGDIR/reader.conf" -TMPFILE=`mktemp /tmp/reader.conf.XXXXXX` -HEADER="### This file is automatically generated by update-reader.conf" - -trap "rm -f $TMPFILE; exit" INT TERM EXIT -set -e - -# Reset the sorting order since we depend on it -LC_COLLATE=C -export LC_COLLATE - -# Avoid side effects with LC_ALL. See #567764 -unset LC_ALL - -if [ 0 -ne "`id -u`" ]; then - echo "You have to be root to run $0" - exit 2 -fi - -if [ ! -d "$CFGDIR" ]; then - mkdir "$CFGDIR" -fi - -if [ -e "$OLDCFGFILE" ]; then - echo "moving the old configuration file $OLDCFGFILE to its new location: $CFGFILE" - mv "$OLDCFGFILE" "$CFGFILE" - if [ -e "$OLDCFGFILE".old ]; then - mv "$OLDCFGFILE".old "$CFGFILE".old - fi -fi - -needforce=0 -if [ -f "$CFGFILE" ]; then - FIRSTLINE=$(head -1 "$CFGFILE") - if [ "$FIRSTLINE" != "$HEADER" ]; then - #echo "new format or manual" - sha=$(echo "$FIRSTLINE" | cut -f2 -d' ') - #echo $sha - if [ ${#sha} -ne 40 ]; then - echo "Error: file $CFGFILE is not automatically generated." - needforce=1 - else - sha2=$(tail --lines=+2 "$CFGFILE" | sha1sum | cut -f1 -d' ') - #echo $sha2 - if [ $sha != $sha2 ]; then - echo "Error: file $CFGFILE was manually edited." - needforce=1 - fi - fi - fi -fi - -if [ "$1" = "force" ]; then - echo "force specified, (re)generating file anyway." - needforce=0 -fi - -if [ $needforce -eq 1 ]; then - echo "Use \"update-reader.conf force\" to force (re)generation." - exit 1 -fi - -if [ -e "$CFGFILE" ]; then - cp -f "$CFGFILE" "${CFGFILE}.old" -fi - -for cfg in /etc/reader.conf.d/* ; do - if ! echo "$cfg" | grep -q '\(\.dpkg-[a-z]*\|~\)$' ; then - echo "### update-reader.conf: start processing $cfg" >> "$TMPFILE" - echo >> "$TMPFILE" - if [ -x "$cfg" ]; then - "$cfg" >> "$TMPFILE" - else - cat "$cfg" >> "$TMPFILE" - fi - echo >> "$TMPFILE" - echo "### update-reader.conf: end processing $cfg" >> "$TMPFILE" - echo >> "$TMPFILE" - fi -done - -echo -n "#SHA1 " > "$CFGFILE" -sha1sum "$TMPFILE" >> "$CFGFILE" -cat "$TMPFILE" >> "$CFGFILE" -chmod 644 "$CFGFILE" - -rm -f "$TMPFILE" - diff --git a/debian/update-reader.conf.8 b/debian/update-reader.conf.8 deleted file mode 100644 index 0cd0891..0000000 --- a/debian/update-reader.conf.8 +++ /dev/null @@ -1,56 +0,0 @@ -.TH UPDATE-READER.CONF 8 "Debian GNU/Linux tools" "DEBIAN" -.SH NAME -update\-reader.conf \- (re)generate /etc/reader.conf -.SH SYNOPSIS -.B update\-reader.conf -[force] -.SH DESCRIPTION -.B update\-reader.conf -is a simple tool to manage -.IR /etc/reader.conf . -The PCSC daemon (pcscd) uses one configuration file for its -configuration. This makes it hard for packages to dynamically add -information about their own smart card reader drivers. To fix this -.B -update\-reader.conf -has been introduced. -.PP -.B update-reader.conf -attempts to fix this by generating the configuration file from separate -files which are located in -.IR /etc/reader.conf.d . -All files in that directory are assembled together to form -.IR /etc/reader.conf . -.PP -After generation a backup of the old file is put in -.IR /etc/reader.conf.old . -.SH "FILES" -.B update\-reader.conf -will ignore files that match the following regular expression: -.RS -.B *\e(\e.dpkg\-[a\-z]*\e|~\e)$ -.RE -(ie files with the extension -.IR .dpkg\-new , -.IR .dpkg\-orig , -.IR .dpkg\-dist , -.IR .dpkg\-old , -or whose filename end with a -.IR ~ ). -.SH OPTIONS -.TP -.I force -.B update\-reader.conf -check if the current -.I /etc/reader.conf -is a generated file by checking for a special tag on the first line. If this -tag is not found generation is aborted. By supplying -.I force -as parameter only a warning is printed. -.SH "SEE ALSO" -.BR pcscd (1) -.SH BUGS -None of course! :) -.SH AUTHOR -This manual page was written by Ludovic Rousseau - for the Debian GNU/Linux system.