[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Seeking pre-approval on reprepro 3.5.2-5



Hi, I backported some changes from 3.6.2 (currently in experimental
to keep unstable open) to 3.5.2 (testing and unstable have 3.5.2-4).
Do they have a chance to get an unblock for testing
after being uploaded to unstable or should I change anything?

Diffstat of the source packages:
 ar.c              |    4 +
 debian/changelog  |   14 +++++
 docs/bzip.example |    2 
 docs/reprepro.1   |  146 +++++++++++++++++++++++++++++++-----------------------
 tracking.c        |   13 ++++
 5 files changed, 115 insertions(+), 64 deletions(-)

Diffstat of the deb packages (after unpacking all files):
 DEBIAN/control                               |    2 
 DEBIAN/md5sums                               |   10 +-
 usr/bin/changestool                          |binary
 usr/bin/reprepro                             |binary
 usr/share/doc/reprepro/changelog.Debian      |   14 ++
 usr/share/doc/reprepro/examples/bzip.example |    2 
 usr/share/man/man1/reprepro.1                |  146 +++++++++++++++------------
 7 files changed, 107 insertions(+), 67 deletions(-)

Total diff of the source package:

diff -r -u -N reprepro-3.5.2-4/debian/changelog reprepro-3.5.2-5/debian/changelog
--- reprepro-3.5.2-4/debian/changelog	2008-11-09 16:23:13.000000000 +0100
+++ reprepro-3.5.2-5/debian/changelog	2008-11-09 16:23:17.000000000 +0100
@@ -1,3 +1,17 @@
+reprepro (3.5.2-5) unstable; urgency=low
+
+  * backport some bugfixes of 3.6.2 to 3.5.2:
+  - fix parsing contents of very large .deb files (Closes: 504434)
+  - fix bug in (hopefully unreachable) error handling in tracking code
+    so that it no longer damages the tracking data even more
+  - improve documentation of remove and removefilter (Closes: 500105)
+  - improve documentation of copysrc and -C (Closes: 496347)
+  - fix many spelling and other errors in the manpage (Closes: 502531)
+  * backport forgotten fixes of 3.6.0:
+  - fix bashism in bzip.example (Closes: 489652)
+
+ -- Bernhard R. Link <brlink@debian.org>  Sun, 09 Nov 2008 15:58:14 +0100
+
 reprepro (3.5.2-4) unstable; urgency=low
 
   * change to use libdb4.6 (Closes: #442668)
diff -r -u -N reprepro-3.5.2-4/ar.c reprepro-3.5.2-5/ar.c
--- reprepro-3.5.2-4/ar.c	2008-03-06 15:34:39.000000000 +0100
+++ reprepro-3.5.2-5/ar.c	2008-11-09 16:23:17.000000000 +0100
@@ -190,7 +190,9 @@
 
 	/* calculate the length and mark possible fillers being needed */
 
-	ar->currentheader.ah_size[11] = '\0'; // ugly, but it works
+	/* make ah_size null-terminated by overwriting the following field */
+	assert( &ar->currentheader.ah_magictrailer[0] == ar->currentheader.ah_size + 10 );
+	ar->currentheader.ah_magictrailer[0] = '\0';
 
 	ar->bytes_left = strtoul(ar->currentheader.ah_size,&p,10);
 	if( *p != '\0' && *p != ' ' ) {
diff -r -u -N reprepro-3.5.2-4/tracking.c reprepro-3.5.2-5/tracking.c
--- reprepro-3.5.2-4/tracking.c	2008-06-10 16:54:47.000000000 +0200
+++ reprepro-3.5.2-5/tracking.c	2008-11-09 16:23:17.000000000 +0100
@@ -112,11 +112,20 @@
 
 	for( i = 0 ; i < pkg->filekeys.count ; i++ ) {
 		if( strcmp(pkg->filekeys.values[i],filekey) == 0 ) {
-			free(filekey);
 			if( pkg->filetypes[i] != ft ) {
+				/* if old file has refcount 0, just repair: */
+				if( pkg->refcounts[i] <= 0 ) {
+					free(filekey);
+					pkg->filetypes[i] = ft;
+					if( used )
+						pkg->refcounts[i] = 1;
+					return RET_OK;
+				}
 				fprintf(stderr,"Filekey '%s' already registered for '%s_%s' as type '%c' is tried to be reregistered as type '%c'!\n",filekey,pkg->sourcename,pkg->sourceversion,pkg->filetypes[i],ft);
+				free(filekey);
 				return RET_ERROR;
 			}
+			free(filekey);
 			if( used )
 				pkg->refcounts[i]++;
 			return RET_OK;
@@ -1275,7 +1284,7 @@
 "'%s' has refcount > 0, but was nowhere found.\n",
 				distribution->codename,
 				filekey);
-		pkg->filetypes[i] = 0;
+		pkg->refcounts[i] = 0;
 	}
 	return result;
 }
diff -r -u -N reprepro-3.5.2-4/docs/reprepro.1 reprepro-3.5.2-5/docs/reprepro.1
--- reprepro-3.5.2-4/docs/reprepro.1	2008-06-25 17:04:56.000000000 +0200
+++ reprepro-3.5.2-5/docs/reprepro.1	2008-11-09 16:23:17.000000000 +0100
@@ -1,6 +1,7 @@
 .TH REPREPRO 1 "2008-05-15" "reprepro" REPREPRO
 .SH NAME
 reprepro \- produce, manage and sync a local repository of debian packages
+reprepro \- produce, manage and sync a local repository of Debian packages
 .SH SYNOPSIS
 .B reprepro \-\-help
 
@@ -35,7 +36,7 @@
 Displays a short list of options and commands with description.
 .TP
 .B \-v, \-V, \-\-verbose
-Be more verbose. Can be applied multiple times. One upcase
+Be more verbose. Can be applied multiple times. One uppercase
 .B \-V
 counts as five lowercase
 .B \-v.
@@ -129,20 +130,30 @@
 for methods to call when importing from other repositories.
 .TP
 .B \-C, \-\-component \fIcomponent\fP
-Specify a component to force into, to remove from or to list only.
+Limit the specified command to this component only.
+This will force added packages to this component,
+limit removing packages from this component,
+only list packages in this component,
+and/or otherwise only look at packages in this component,
+depending on the command in question.
 .TP
 .B \-A, \-\-architecture \fIarchitecture\fP
-Specify an architecture to only include into, remove from or
-list.
-
-When including this does not lead to packages in the wrong architecture
-but will restrict effect to this architecture. This allows e.g. different
-versions of an
-.B Architecture: all
-\-package in different architectures of the same distribution.
+Limit the specified command to this architecture only.
+(i.e. only list such packages,
+only remove packages from the specified architecture,
+or otherwise only look at/act on this architecture
+depending on the specific command).
+
+Note that architecture \fBall\fP packages can be included to each
+architecture but are then handled separately.
+Thus using \fB\-A\fP correctly allows to have different versions of
+an architecture \fBall\fP package in different architectures of the
+same distribution.
 .TP
 .B \-T, \-\-type \fRdsc|deb|udeb
-Specify which type of files to include, remove or list.
+Limit the specified command to this packagetype only.
+(i.e. only list such packages, only remove such packages, only include
+such packages, ...)
 .TP
 .B \-S, \-\-section \fIsection\fP
 Overrides the section of inclusions. (Also override possible override files)
@@ -243,15 +254,15 @@
 To disable this behaviour, use \fBnone\fP.
 .TP
 .BI \-\-dbsafetymargin " bytes-count"
-If checking for free space, reserve \fIbyte-count\fP bytes on the fileystem
+If checking for free space, reserve \fIbyte-count\fP bytes on the filesystem
 containing the \fBdb/\fP directory.
 The default is 104857600 (i.e. 100MB), which is quite large.
 But as there is no way to know in advance how large the databases will
-grow and libdb is extremly touchy in that regard, lower only when you know
+grow and libdb is extremely touchy in that regard, lower only when you know
 what you do.
 .TP
 .BI \-\-safetymargin " bytes-count"
-If checking for free space, reserve \fIbyte-count\fP bytes on fileystems
+If checking for free space, reserve \fIbyte-count\fP bytes on filesystems
 not containing the \fBdb/\fP directory.
 The default is 1048576 (i.e. 1MB).
 .TP
@@ -310,8 +321,8 @@
 condition for its content in parentheses.
 These atoms can be combined with
 an exclamation mark '!' (meaning not),
-an pipe symbol '|' (meaning or) and
-an coma ',' (meaning and).
+a pipe symbol '|' (meaning or) and
+a coma ',' (meaning and).
 Additionally parentheses can be used to change binding
 (otherwise '!' binds more than '|' than ',').
 
@@ -325,20 +336,23 @@
 Examples:
 
 .B reprepro \-b . listfilter test2 'Section (== admin)'
-will list all packags in distribtuion test2 with an Section field and the value
+will list all packages in distribution test2 with a Section field and the value
 of that field being \fBadmin\fP.
 
 .B reprepro \-b . \-T deb listfilter test2 'Source (== \fIblub\fP) | ( !Source , Package (== \fIblub\fP) )'
-will find all .deb Packages with either an Source field blub or
+will find all .deb Packages with either a Source field blub or
 no Source field and a Package field blub.
-(That means all package generated by an source package \fIblub\fP,
+(That means all package generated by a source package \fIblub\fP,
 except those also specifying a version number with its Source).
 .TP
-.B remove \fIcodename\fP \fIpackage name\fP
-same as list, but remove instead of list.
+.B remove \fIcodename\fP \fIpackage-names\fP
+Delete all packages in the specified distribution,
+that have package name listed as argument.
+(i.e. remove all packages \fBlist\fP with the same arguments and options
+would list, except that an empty package list is not allowed.)
 .TP
 .B removefilter \fIcodename\fP \fIcondition\fP
-as listfilter, but remove matched packages instead of listing them.
+Delete all packages \fBlistfilter\fP with the same arguments would list.
 .TP
 .B removesrc \fIcodename\fP \fIsource-name\fP \fR[\fP\fIversion\fP\fR]\fP
 Remove all packages in distribution \fIcodename\fP belonging to source
@@ -346,7 +360,7 @@
 (Limited to those with source version \fIversion\fP if specified).
 
 If package tracking is activated, it will use that information to find the
-packages, otherwise it traverses all package indicies for the distribution.
+packages, otherwise it traverses all package indices for the distribution.
 .TP
 .BR update " [ " \fIcodenames\fP " ]"
 Sync the specified distributions (all if none given) as
@@ -375,7 +389,7 @@
 Plus if you cannot
 download a updated package in the (hopefully) following update
 run, you will end up with no package at all instead of an old one.
-This will also blow up pindex files if you are using the tiffany
+This will also blow up \fB.diff\fP files if you are using the tiffany
 example or something similar.
 So be careful when using this option or better get some more space so
 that update works.
@@ -464,7 +478,7 @@
 thereof given by \fB\-Af\fP,\fB\-C\fP or \fB\-T\fP).
 
 Note: only the control information is changed. Changing a section
-to a value, that would cause an other component to be guessed, will
+to a value, that would cause another component to be guessed, will
 not cause any warning.
 .TP
 .BR dumptracks " [ " \fIcodenames\fP " ]"
@@ -477,7 +491,7 @@
 First all files marked as part of a source package are set to
 unused.
 Then all files actually used are marked as thus.
-Finaly tidytracks is called remove everything no longer needed
+Finally tidytracks is called remove everything no longer needed
 with the new information about used files.
 
 (This behaviour, though a bit longsome, keeps even files only
@@ -500,17 +514,28 @@
 .TP
 .B copy \fIdestination-codename\fP \fIsource-codename\fP \fIpackages...\fP
 Copy the given packages from one distribution to another.
-No overrides are read, nothing is changed.
-.TP
-.B copysrc \fIdestination-codename\fP \fIsource-codename\fP \fIsourc-epackage\fP \fR[\fP\fIversions\fP\fR]\fP
-Copy packages with the given source name and version
-(all versions if no version is specified).
-No overrides are read, nothing is changed.
+The packages are copied verbatim, no override files are consulted.
+Only components and architectures present in the source distribution are
+copied.
+.TP
+.B copysrc \fIdestination-codename\fP \fIsource-codename\fP \fIsource-package\fP \fR[\fP\fIversions\fP\fR]\fP
+look at each package
+(where package means, as usual, every package be it dsc, deb or udeb)
+in the distribution specified by \fIsource-codename\fP
+and identifies the relevant source package for each.
+All packages matching the specified \fIsource-package\fP name
+(and any \fIversion\fP if specified)
+are copied to the \fIdestination-codename\fP distribution.
+The packages are copied verbatim, no override files are consulted.
+Only components and architectures present in the source distribution are
+copied.
 .TP
 .B copyfilter \fIdestination-codename\fP \fIsource-codename\fP \fIformula\fP
 Copy packages matching the given formula (see \fBlistfilter\fP).
 (all versions if no version is specified).
-No overrides are read, nothing is changed.
+The packages are copied verbatim, no override files are consulted.
+Only components and architectures present in the source distribution are
+copied.
 .TP
 .B restore \fIcodename\fP \fIsnapshot\fP \fIpackages...\fP
 .TP
@@ -518,7 +543,7 @@
 .TP
 .B restorefilter \fIdestination-codename\fP \fIsnapshot\fP \fIformula\fP
 Like the copy commands, but do not copy from another distribution,
-but from an snapshot generated with \fBgensnapshot\fP.
+but from a snapshot generated with \fBgensnapshot\fP.
 Note that this blindly trusts the contents of the files in your \fBdists/\fP
 directory and does no checking.
 .TP
@@ -556,7 +581,7 @@
 specified distributions.
 .TP
 .B translatefilelists
-Translate the file list chache within
+Translate the file list cache within
 .IB db /contents.cache.db
 into the new format used since reprepro 3.0.0.
 
@@ -636,11 +661,11 @@
 .B conf/
 subdirectory of the \fIbasedir\fP.
 
-If an file
+If a file
 .B options
 exists, it is parsed line by line.
 Each line can be the long
-name of an command line option (without the \-\-)
+name of a command line option (without the \-\-)
 plus an argument, where possible.
 Those are handled as if they were command line options given before
 (and thus lower priority than) any other command line option.
@@ -664,7 +689,7 @@
 
 The last three are in the format control files in Debian are in,
 i.e. paragraphs separated by empty lines consisting of
-fields. Each field consists of an fieldname, followed
+fields. Each field consists of a fieldname, followed
 by a colon, possible whitespace and the data. A field
 ends with a newline not followed by a space or tab.
 
@@ -709,7 +734,7 @@
 A list of distribution names.
 When a \fB.changes\fP file is told to be included
 into this distribution with the \fBinclude\fP command
-and the distribution header of that file is neigther
+and the distribution header of that file is neither
 the codename, nor the suite name, nor any name from the
 list, a \fBwrongdistribution\fP error is generated.
 The \fBprocess_incoming\fP command will also use this field,
@@ -835,7 +860,7 @@
 If there is a \fBudebs\fP keyword, \fB.udeb\fPs are also listed
 (in a file called \fBuContents\-\fP\fIarchitecture\fP.)
 If there is a \fBnodebs\fP keyword, \fB.deb\fPs are not listed.
-(Only usefull together with \fBudebs\fP)
+(Only useful together with \fBudebs\fP)
 If there is at least one of the keywords \fB.\fP, \fB.gz\fP and/or \fB.bz2\fP,
 the Contents files are written uncompressed, gzipped and/or bzip2ed instead
 of only gzipped.
@@ -897,8 +922,8 @@
 And any number of the following (or none):
 .br
 .B includechanges
-Add the .changes file to the tracked files of an source
-package. Thus it is also put into the pool.
+Add the .changes file to the tracked files of a source package.
+Thus it is also put into the pool.
 .br
 .B includebyhand
 Not yet implemented.
@@ -920,7 +945,7 @@
 The rest of the \fBLog:\fP line is the filename,
 every following line (as usual, have to begin with a single space)
 the name of a script to call.
-The name of the script may be preceeded with options of the
+The name of the script may be preceded with options of the
 form \fB\-\-type=\fP(\fBdsc\fP|\fBdeb\fP|\fBudeb\fP),
 \fB\-\-architecture=\fP\fIname\fP or
 \fB\-\-component=\fP\fIname\fP to only call the script for some
@@ -983,7 +1008,7 @@
 If this field is not there, all components from the distribution
 to update are tried.
 
-And emtpy field means no source or .deb packages are updated by this rule,
+An empty field means no source or .deb packages are updated by this rule,
 but only .udeb packages, if there are any.
 
 A rule might list components not available in all distributions
@@ -998,7 +1023,7 @@
 .B Architectures
 The architectures to update. If omitted all from the distribution
 to update from. (As with components, you can use ">" to download
-from one Architecture and add into an other one. (This only determine
+from one architecture and add into another one. (This only determine
 in which Package list they land, it neither overwrites the Architecture
 line in its description, nor the one in the filename determined from this
 one. In other words, it is no really useful without additional filtering))
@@ -1098,8 +1123,8 @@
 As in
 .BR conf/updates ,
 you can use ">" to download
-from one Architecture and add into an other one. (And again, only useful
-with filtering to avoid packages not architectur \fBall\fP to migrate).
+from one architecture and add into another one. (And again, only useful
+with filtering to avoid packages not architecture \fBall\fP to migrate).
 .TP
 .B UDebComponents
 Like
@@ -1156,20 +1181,21 @@
 files.
 .TP
 .B TempDir
-An directory where the files listed in the processed .changes files
+A directory where the files listed in the processed .changes files
 are copied into before they are read.
-To avoid an additional copy, place on the same partition as the pool
-hirachy (or at least at the largest part of it).
+You can avoid some copy operatations by placing this directory
+within the same moint point the pool hierachy
+is (at least partially) in.
 .TP
 .B Allow \fIarguments
 Each argument is either a pair \fIname1\fB>\fIname2\fR or simply
 \fIname\fP which is short for \fIname\fB>\fIname\fR.
 Each \fIname2\fP must identify a distribution,
-either by being Codename, an unique Suite, or an unique AlsoAcceptFor
+either by being Codename, a unique Suite, or a unique AlsoAcceptFor
 from \fBconf/distributions\fP.
 Each upload has each item in its
 .B Distribution:
-header compared first to last with earch \fIname1\fP in the rules
+header compared first to last with each \fIname1\fP in the rules
 and is put in the first one accepting this package.  e.g.:
 .br
 Allow: local unstable>sid
@@ -1186,7 +1212,7 @@
 .B Multiple
 Allow putting an upload in multiple distributions if it lists more
 than one. (Without this field, procession stops after the first
-successfull).
+success).
 .TP
 .B Permit \fIoptions
 A list of options to allow things otherwise causing errors:
@@ -1198,7 +1224,7 @@
 .br
 .B older_version
 .br
-Ignore a package not added because there already is a stricly newer
+Ignore a package not added because there already is a strictly newer
 version available instead of treating this as an error.
 .TP
 .B Cleanup \fIoptions
@@ -1234,13 +1260,13 @@
 .br
 which allows everything with any valid signature in or
 .br
-.B alllow *  by key \fIkey-id\fP
+.B allow *  by key \fIkey-id\fP
 .br
 which allows everything signed by this \fIkey-id\fP (to be specified
 without any spaces) in.
 .P
 (Other statements
-will follow once somebody tells me what restrictions are usefull).
+will follow once somebody tells me what restrictions are useful).
 .SH "ERROR IGNORING"
 With \fB\-\-ignore\fP on the command line or an \fIignore\fP
 line in the options file, the following type of errors can be
@@ -1258,7 +1284,7 @@
 ignore directive is given.
 .TP
 .B brokenversioncmp \fR(hopefully never seen)
-If comparing an old and a new version fails, assume the new one is newer.
+If comparing old and new version fails, assume the new one is newer.
 .TP
 .B dscinbinnmu
 If a .changes file has an explicit Source version that is different the
@@ -1457,7 +1483,7 @@
 .SS The magic delete rule ("\-").
 A minus as a single word in the
 .B Update:
-line of an distribution marks everything to be deleted. The mark causes later rules
+line of a distribution marks everything to be deleted. The mark causes later rules
 to get packages even if they have (strict) lower versions. The mark will
 get removed if a later rule sets the package on hold (hold is not yet implemented,
 in case you might wonder) or would get a package with the same version
@@ -1543,7 +1569,7 @@
 .B $(tty)
 or
 .B $SSH_TTY
-or anything else denoting a useable terminal. (You might also
+or anything else denoting a usable terminal. (You might also
 want to make sure you actually have a terminal available.
 With ssh you might need the
 .B \-t
@@ -1591,7 +1617,7 @@
 If dpkg\-buildpackage is run without the \fB\-sa\fP option to build a version with
 a Debian revision not being \-0 or \-1, it does not list the \fB.orig.tar.gz\fP file
 in the \fB.changes\fP file.
-If you want to \fBinclude\fP such a file with repepro
+If you want to \fBinclude\fP such a file with reprepro
 when the .orig.tar.gz file does not already exist in the pool, reprepro will report
 an error.
 This can be worked around by:
diff -r -u -N reprepro-3.5.2-4/docs/bzip.example reprepro-3.5.2-5/docs/bzip.example
--- reprepro-3.5.2-4/docs/bzip.example	2005-12-23 15:55:28.000000000 +0100
+++ reprepro-3.5.2-5/docs/bzip.example	2008-11-09 16:23:17.000000000 +0100
@@ -21,7 +21,7 @@
 # with reprepro <= 0.7 this could also be Packages.gz or Sources.gz,
 # but now only the uncompressed name is given. (even if not generated)
 if [ "xPackages" = "x$BASENAME" ] || [ "xSources" = "x$BASENAME" ] ; then
-	if [ "x$STATUS" == "xold" ] ; then
+	if [ "x$STATUS" = "xold" ] ; then
 		if [ -f "$DIROFDIST/$OLDNAME.bz2" ] ; then
 			echo "$OLDNAME.bz2" >&3
 		else

Thanks in advance,
	Bernhard R. Link


Reply to: