A patch to make pciutils place pci.ids under /var. It also cleans up old
pci.ids.{new,neww,old} files on configure/purge (see #281413).
Of course, Debsums still complains when pci.ids are updated. It would be
better to have the update-pciids script divert pci.ids out of the way
the first time it is run. Are there any reasons why that's a bad idea?
--
Sam Morris
http://robots.org.uk/
PGP key id 5EA01078
3412 EA18 1277 354B 991B C869 B219 7FDB 5EA0 1078
diff -ruN pciutils-2.1.11.old/debian/changelog pciutils-2.1.11/debian/changelog
--- pciutils-2.1.11.old/debian/changelog 2005-08-01 19:03:36.482378172
+0100
+++ pciutils-2.1.11/debian/changelog 2005-08-01 19:03:43.503194380 +0100
@@ -1,3 +1,11 @@
+pciutils (1:2.1.11-15.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Store pci.ids under /var for better FHS complicance (closes: #278479)
+ * Remove pci.ids.old etc when purging the package (closes: #281413)
+
+ -- Sam Morris <[EMAIL PROTECTED]> Mon, 1 Aug 2005 18:29:17 +0100
+
pciutils (1:2.1.11-15) unstable; urgency=low
* Updated pci.ids
diff -ruN pciutils-2.1.11.old/debian/dirs pciutils-2.1.11/debian/dirs
--- pciutils-2.1.11.old/debian/dirs 2005-08-01 19:03:36.484377835 +0100
+++ pciutils-2.1.11/debian/dirs 2005-08-01 19:03:43.503194380 +0100
@@ -4,3 +4,4 @@
usr/lib
usr/share/lintian/overrides
bin
+var/lib/pciutils
diff -ruN pciutils-2.1.11.old/debian/postinst pciutils-2.1.11/debian/postinst
--- pciutils-2.1.11.old/debian/postinst 1970-01-01 01:00:00.000000000 +0100
+++ pciutils-2.1.11/debian/postinst 2005-08-01 19:03:43.504194211 +0100
@@ -0,0 +1,23 @@
+#! /bin/sh
+# postinst script for pciutils
+
+set -e
+
+case "$1" in
+configure)
+ for ext in new neww old
+ do
+ rm -f /usr/share/misc/pci.ids.$ext
+ done
+ ;;
+abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+*)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -ruN pciutils-2.1.11.old/debian/postrm pciutils-2.1.11/debian/postrm
--- pciutils-2.1.11.old/debian/postrm 1970-01-01 01:00:00.000000000 +0100
+++ pciutils-2.1.11/debian/postrm 2005-08-01 19:03:43.501194717 +0100
@@ -0,0 +1,23 @@
+#! /bin/sh
+# postrm script for pciutils
+
+set -e
+
+case "$1" in
+purge)
+ for ext in new neww old
+ do
+ rm -f /var/lib/pciutils/pci.ids.$ext
+ done
+ ;;
+remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+*)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -ruN pciutils-2.1.11.old/debian/rules pciutils-2.1.11/debian/rules
--- pciutils-2.1.11.old/debian/rules 2005-08-01 19:03:36.485377666 +0100
+++ pciutils-2.1.11/debian/rules 2005-08-01 19:03:43.511193031 +0100
@@ -44,7 +44,8 @@
#(cd `pwd`/debian/tmp/sbin; ln -s ../bin/lspci)
(cd `pwd`/debian/tmp/bin; ln -s /usr/bin/lspci .)
(cd `pwd`/debian/tmp/bin; ln -s /usr/bin/setpci .)
-
+ mv `pwd`/debian/tmp/usr/share/misc/pci.ids
`pwd`/debian/tmp/var/lib/pciutils/
+ (cd `pwd`/debian/tmp/usr/share/misc; ln -s
../../../var/lib/pciutils/pci.ids .)
# pciutils-dev
install -m 644 lib/libpci.a debian/pciutils-dev/usr/lib/libpci.a
diff -ruN pciutils-2.1.11.old/Makefile pciutils-2.1.11/Makefile
--- pciutils-2.1.11.old/Makefile 2005-08-01 19:03:36.449383735 +0100
+++ pciutils-2.1.11/Makefile 2005-08-01 19:03:43.484197583 +0100
@@ -60,7 +60,7 @@
common.o: common.c pciutils.h
update-pciids: update-pciids.sh
- sed <$< >$@ "[EMAIL PROTECTED]@DEST=$(SHAREDIR)/pci.ids@"
+ sed <$< >$@ "[EMAIL PROTECTED]@DEST=/var/lib/pciutils/pci.ids@"
%.8: %.man
M=`echo $(DATE) | sed
's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3
\2 \1/'` ; sed <$< >$@
"s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)$(SUFFIX)/;[EMAIL
PROTECTED]@#$(SHAREDIR)#"