Subject: changelist and packages and /etc/security
To: None <tech-security@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-security
Date: 08/19/2006 07:54:28
The /etc/security creates backup list of the package database directory's 
+REQUIRED_BY and +CONTENTS files.

Then the /etc/security uses its standard function to show differences (of 
all the CHANGELIST).

My problem is the format of the output specifically about the packages.

The + and - diff characters at beginning of lines can get overlooked. 
After my signature, I include a recent example. It is noisy and hard to 
follow.

Even the diff header is confusing as the filename of yesterday's old 
version is called "current".

I would like the format to be something like the following:

1) List package additions and then removals:

+ aiksaurus-1.2.1
+ lyx-qt-1.4.2
- aiksaurus-1.2.1
- lyx-qt-1.4.2

(In the above example, the same two package versions were reinstalled -- 
needed because of libsdtc++ changes on my box. But that is a different 
issue which could be discussed on tech-pkg.)

2) Or list packages that changes requirements of dependencies on them 
also:

- aiksaurus-1.2.1/+CONTENTS
+ aiksaurus-1.2.1/+CONTENTS
- aiksaurus-1.2.1/+REQUIRED_BY
+ aiksaurus-1.2.1/+REQUIRED_BY
- aspell-0.60.4nb2/+REQUIRED_BY
+ aspell-0.60.4nb2/+REQUIRED_BY
- lyx-qt-1.4.2/+CONTENTS
+ lyx-qt-1.4.2/+CONTENTS
- modular-xorg-libs-7.0nb6/+REQUIRED_BY
+ modular-xorg-libs-7.0nb6/+REQUIRED_BY
- perl-5.8.7nb4/+REQUIRED_BY
+ perl-5.8.7nb4/+REQUIRED_BY
- python23-2.3.5nb6/+REQUIRED_BY
+ python23-2.3.5nb6/+REQUIRED_BY
- python24-2.4.3nb3/+REQUIRED_BY
+ python24-2.4.3nb3/+REQUIRED_BY
- teTeX-bin-3.0nb7/+REQUIRED_BY
+ teTeX-bin-3.0nb7/+REQUIRED_BY
- texmf-dirs-1.2/+REQUIRED_BY
+ texmf-dirs-1.2/+REQUIRED_BY

What do you think about this?

grepping, cutting and sorting the diff output easily does this.

Jeremy C. Reed

p.s. The current way follows. Do we need all this?

======
/var/backups/work/pkgs diffs (OLD < > NEW)
======
--- /var/backups/work/pkgs.current	2006-08-18 08:27:59.000000000 +0000
+++ /var/backups/work/pkgs	2006-08-19 08:26:13.000000000 +0000
@@ -333,10 +333,10 @@
 -rw-r--r--  1 root  wheel       12 Apr 29 04:39:23 2006 Xaw3d-1.5Enb2/+REQUIRED_BY
 -rw-r--r--  1 root  wheel     6890 Aug  1 23:33:53 2006 aalib-1.4.0.5nb2/+CONTENTS
 -rw-r--r--  1 root  wheel       13 Jul 13 15:59:11 2006 aalib-1.4.0.5nb2/+REQUIRED_BY
--rw-r--r--  1 root  wheel      982 Oct 15 01:30:29 2005 aiksaurus-1.2.1/+CONTENTS
--rw-r--r--  1 root  wheel       13 Jul 28 13:24:35 2006 aiksaurus-1.2.1/+REQUIRED_BY
+-rw-r--r--  1 root  wheel      982 Aug 18 20:15:31 2006 aiksaurus-1.2.1/+CONTENTS
+-rw-r--r--  1 root  wheel       13 Aug 19 00:36:33 2006 aiksaurus-1.2.1/+REQUIRED_BY
 -rw-r--r--  1 root  wheel     9280 Aug 18 04:13:18 2006 aspell-0.60.4nb2/+CONTENTS
--rw-r--r--  1 root  wheel       56 Aug 18 04:13:17 2006 aspell-0.60.4nb2/+REQUIRED_BY
+-rw-r--r--  1 root  wheel       56 Aug 19 00:36:33 2006 aspell-0.60.4nb2/+REQUIRED_BY
 -rw-r--r--  1 root  wheel    11861 Apr 16 02:28:56 2006 atk-1.11.4/+CONTENTS
 -rw-r--r--  1 root  wheel      180 Aug 17 22:26:15 2006 atk-1.11.4/+REQUIRED_BY
 -rw-r--r--  1 root  wheel     4700 Oct 15 02:00:06 2005 autoconf-2.59nb2/+CONTENTS
@@ -619,7 +619,7 @@
 -rw-r--r--  1 root  wheel      107 Aug 18 00:27:03 2006 libxslt-1.1.17/+REQUIRED_BY
 -rw-r--r--  1 root  wheel     4565 Jun 29 16:33:07 2006 lua-5.0.2nb4/+CONTENTS
 -rw-r--r--  1 root  wheel       17 Jun 29 16:33:10 2006 lua-5.0.2nb4/+REQUIRED_BY
--rw-r--r--  1 root  wheel    80756 Jul 28 13:24:34 2006 lyx-qt-1.4.2/+CONTENTS
+-rw-r--r--  1 root  wheel    80756 Aug 19 00:36:32 2006 lyx-qt-1.4.2/+CONTENTS
 -rw-r--r--  1 root  wheel     1265 Apr 28 04:16:47 2006 lzo-2.02/+CONTENTS
 -rw-r--r--  1 root  wheel       71 Aug 17 22:26:00 2006 lzo-2.02/+REQUIRED_BY
 -rw-r--r--  1 root  wheel     2194 Oct 15 01:59:27 2005 m4-1.4.3/+CONTENTS
@@ -632,7 +632,7 @@
 -rw-r--r--  1 root  wheel     1090 Apr 12 23:22:24 2006 mng-1.0.9nb1/+CONTENTS
 -rw-r--r--  1 root  wheel       18 Jul 13 16:01:20 2006 mng-1.0.9nb1/+REQUIRED_BY
 -rw-r--r--  1 root  wheel      764 Aug  1 23:33:53 2006 modular-xorg-libs-7.0nb6/+CONTENTS
--rw-r--r--  1 root  wheel      546 Aug 18 07:36:28 2006 modular-xorg-libs-7.0nb6/+REQUIRED_BY
+-rw-r--r--  1 root  wheel      546 Aug 19 00:36:34 2006 modular-xorg-libs-7.0nb6/+REQUIRED_BY
 -rw-r--r--  1 root  wheel      851 Jul 19 15:30:17 2006 mpeg2codec-1.2nb1/+CONTENTS
 -rw-r--r--  1 root  wheel       20 Jul 19 15:30:23 2006 mpeg2codec-1.2nb1/+REQUIRED_BY
 -rw-r--r--  1 root  wheel      418 Jul 18 19:46:10 2006 mpg123-0.59.18nb9/+CONTENTS
@@ -686,7 +686,7 @@
 -rw-r--r--  1 root  wheel     4281 Jun 13 05:40:45 2006 pcre-6.6/+CONTENTS
 -rw-r--r--  1 root  wheel       31 Jun 13 05:54:26 2006 pcre-6.6/+REQUIRED_BY
 -rw-r--r--  1 root  wheel   187614 Oct 15 00:39:15 2005 perl-5.8.7nb4/+CONTENTS
--rw-r--r--  1 root  wheel      574 Aug 18 04:29:54 2006 perl-5.8.7nb4/+REQUIRED_BY
+-rw-r--r--  1 root  wheel      574 Aug 19 00:36:34 2006 perl-5.8.7nb4/+REQUIRED_BY
 -rw-r--r--  1 root  wheel     1375 Jun 29 02:03:41 2006 pico-4.10nb1/+CONTENTS
 -rw-r--r--  1 root  wheel       10 Jun 29 02:03:42 2006 pico-4.10nb1/+REQUIRED_BY
 -rw-r--r--  1 root  wheel     1794 Jun 29 02:03:42 2006 pine-4.64/+CONTENTS
@@ -727,9 +727,9 @@
 -rw-r--r--  1 root  wheel    64220 Aug  8 00:21:00 2006 py24-xml-0.8.4nb2/+CONTENTS
 -rw-r--r--  1 root  wheel       14 Aug  8 02:57:53 2006 py24-xml-0.8.4nb2/+REQUIRED_BY
 -rw-r--r--  1 root  wheel   204959 Apr 12 21:22:51 2006 python23-2.3.5nb6/+CONTENTS
--rw-r--r--  1 root  wheel      105 Aug 17 22:23:10 2006 python23-2.3.5nb6/+REQUIRED_BY
+-rw-r--r--  1 root  wheel       92 Aug 19 00:26:59 2006 python23-2.3.5nb6/+REQUIRED_BY
 -rw-r--r--  1 root  wheel   231151 Aug  8 00:14:51 2006 python24-2.4.3nb3/+CONTENTS
--rw-r--r--  1 root  wheel      174 Aug 18 06:59:18 2006 python24-2.4.3nb3/+REQUIRED_BY
+-rw-r--r--  1 root  wheel      187 Aug 19 00:36:34 2006 python24-2.4.3nb3/+REQUIRED_BY
 -rw-r--r--  1 root  wheel     4111 Jul 10 16:37:59 2006 qemu-0.8.0nb1/+CONTENTS
 -rw-r--r--  1 root  wheel    30291 Jul 13 16:01:19 2006 qt3-libs-3.3.5nb6/+CONTENTS
 -rw-r--r--  1 root  wheel       38 Aug 18 06:59:18 2006 qt3-libs-3.3.5nb6/+REQUIRED_BY
@@ -766,11 +766,11 @@
 -rw-r--r--  1 root  wheel     8816 Jul 13 13:48:24 2006 t1lib-5.1.0nb5/+CONTENTS
 -rw-r--r--  1 root  wheel       17 Jul 13 13:49:19 2006 t1lib-5.1.0nb5/+REQUIRED_BY
 -rw-r--r--  1 root  wheel    26154 Jul 13 13:49:19 2006 teTeX-bin-3.0nb7/+CONTENTS
--rw-r--r--  1 root  wheel       68 Jul 28 13:24:36 2006 teTeX-bin-3.0nb7/+REQUIRED_BY
+-rw-r--r--  1 root  wheel       68 Aug 19 00:36:34 2006 teTeX-bin-3.0nb7/+REQUIRED_BY
 -rw-r--r--  1 root  wheel  1380965 Apr 12 18:49:30 2006 teTeX-texmf-3.0nb3/+CONTENTS
 -rw-r--r--  1 root  wheel       17 Jul 13 13:49:19 2006 teTeX-texmf-3.0nb3/+REQUIRED_BY
 -rw-r--r--  1 root  wheel      154 Jul 13 13:56:33 2006 texmf-dirs-1.2/+CONTENTS
--rw-r--r--  1 root  wheel       36 Jul 28 13:24:36 2006 texmf-dirs-1.2/+REQUIRED_BY
+-rw-r--r--  1 root  wheel       36 Aug 19 00:36:34 2006 texmf-dirs-1.2/+REQUIRED_BY
 -rw-r--r--  1 root  wheel      149 Apr 16 06:53:35 2006 theme-dirs-1.1nb1/+CONTENTS
 -rw-r--r--  1 root  wheel        0 Apr 19 14:28:06 2006 theme-dirs-1.1nb1/+REQUIRED_BY
 -rw-r--r--  1 root  wheel    18129 Nov  9 05:02:18 2005 tiff-3.7.4/+CONTENTS