I'd like to upload a revision of reprepro to unstable targeted
to squeeze with some changes cherry-picked from its CVS and
wanted to ask if those changes are acceptable and if not if
some subset is.

There are 4 changes:

- make it compile with gcc-4.5 (#600982)
  by simple including a header more.
  (gcc-4.5 is not in squeeze, but I guess it would still nice to
   have things in a release buildable with current tools).
- fix an error that reprepro errors out hard claiming out of memory
  when a package has a special override but no normal ones.
- adapt an example in the documentation to current dpkg-source
- add support for "ButAutomaticUpgrades" (compare #600358)
  (that is actually a feature addition, but should have not impact
   on other stuff).

        Bernhard R. Link

Following is the diff of the .debian.tar.gz files.


diff -r -u -N reprepro_4.2.0-1.debian.tar.gz/changelog 
reprepro_4.2.0-2.debian.tar.gz/changelog
--- reprepro_4.2.0-1.debian.tar.gz/changelog    2010-07-11 12:24:26.000000000 
+0200
+++ reprepro_4.2.0-2.debian.tar.gz/changelog    2010-10-22 16:54:03.000000000 
+0200
@@ -1,3 +1,13 @@
+reprepro (4.2.0-2) unstable; urgency=low
+
+  * include sys/stat.h in filecntl.h (Closes: 600982)
+  * Don't get confused with packages only having special override
+    entries
+  * adopt changelogs.example to new dpkg-source
+  * add support for ButAutomaticUpgrades (Closes: 600358)
+
+ -- Bernhard R. Link <brl...@debian.org>  Fri, 22 Oct 2010 16:54:03 +0200
+
 reprepro (4.2.0-1) unstable; urgency=low
 
   * Fix Berkley -> Berkeley (Closes: 586899)

diff -r -u -N reprepro_4.2.0-1.debian.tar.gz/patches/series 
reprepro_4.2.0-2.debian.tar.gz/patches/series
--- reprepro_4.2.0-1.debian.tar.gz/patches/series       1970-01-01 
01:00:00.000000000 +0100
+++ reprepro_4.2.0-2.debian.tar.gz/patches/series       2010-10-22 
16:54:03.000000000 +0200
@@ -0,0 +1,4 @@
+0001-include-sys-stat-in-filecntl.c.patch
+0002-Fix-error-in-reoverride-with-packages-that-have-a.patch
+0003-replace-sn-with-no-copy-in-changelogs.example.patch
+0004-add-support-for-ButAutomaticUpgrades-thanks-to-Mode.patch

diff -r -u -N 
reprepro_4.2.0-1.debian.tar.gz/patches/0001-include-sys-stat-in-filecntl.c.patch
 
reprepro_4.2.0-2.debian.tar.gz/patches/0001-include-sys-stat-in-filecntl.c.patch
--- 
reprepro_4.2.0-1.debian.tar.gz/patches/0001-include-sys-stat-in-filecntl.c.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
reprepro_4.2.0-2.debian.tar.gz/patches/0001-include-sys-stat-in-filecntl.c.patch
    2010-10-22 16:54:02.000000000 +0200
@@ -0,0 +1,24 @@
+From 19e449dc03710c09c6d5571e15a3c78f029bb7ff Mon Sep 17 00:00:00 2001
+From: Bernhard R. Link <brl...@debian.org>
+Date: Thu, 12 Aug 2010 14:15:42 +0000
+Subject: include sys/stat in filecntl.c
+
+---
+ filecntl.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/filecntl.c b/filecntl.c
+index 1da25f5..903349c 100644
+--- a/filecntl.c
++++ b/filecntl.c
+@@ -12,6 +12,7 @@
+ #include <stdbool.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <sys/stat.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <errno.h>
+-- 
+1.5.6.5
+

diff -r -u -N 
reprepro_4.2.0-1.debian.tar.gz/patches/0002-Fix-error-in-reoverride-with-packages-that-have-a.patch
 
reprepro_4.2.0-2.debian.tar.gz/patches/0002-Fix-error-in-reoverride-with-packages-that-have-a.patch
--- 
reprepro_4.2.0-1.debian.tar.gz/patches/0002-Fix-error-in-reoverride-with-packages-that-have-a.patch
 1970-01-01 01:00:00.000000000 +0100
+++ 
reprepro_4.2.0-2.debian.tar.gz/patches/0002-Fix-error-in-reoverride-with-packages-that-have-a.patch
 2010-10-22 16:54:02.000000000 +0200
@@ -0,0 +1,53 @@
+From ccafd1d03403fc068a3e3abc60998fd5480866b1 Mon Sep 17 00:00:00 2001
+From: Bernhard R. Link <brl...@debian.org>
+Date: Thu, 9 Sep 2010 16:48:46 +0000
+Subject: Fix error in reoverride with packages that have a "$Component" 
override but no other overrides. (reprepro erroneously thinks it is running out 
of memory in that case).
+
+---
+ binaries.c |    2 +-
+ override.c |    2 ++
+ sources.c  |    2 +-
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/binaries.c b/binaries.c
+index e9e72bd..31e3228 100644
+--- a/binaries.c
++++ b/binaries.c
+@@ -280,7 +280,7 @@ retvalue binaries_doreoverride(const struct target 
*target, const char *packagen
+               return RET_NOTHING;
+ 
+       r = override_allreplacefields(o, &fields);
+-      if( RET_WAS_ERROR(r) )
++      if( !RET_IS_OK(r) )
+               return r;
+       newchunk = chunk_replacefields(controlchunk, fields, "Filename", false);
+       addfield_free(fields);
+diff --git a/override.c b/override.c
+index ba70b3d..9ef52f2 100644
+--- a/override.c
++++ b/override.c
+@@ -382,6 +382,8 @@ retvalue override_allreplacefields(const struct 
overridedata *override, struct f
+                               return RET_ERROR_OOM;
+               }
+       }
++      if( fields == NULL )
++              return RET_NOTHING;
+       *fields_p = fields;
+       return RET_OK;
+ }
+diff --git a/sources.c b/sources.c
+index 8be47d0..c3944b1 100644
+--- a/sources.c
++++ b/sources.c
+@@ -336,7 +336,7 @@ retvalue sources_doreoverride(const struct target *target, 
const char *packagena
+               return RET_NOTHING;
+ 
+       r = override_allreplacefields(o, &fields);
+-      if( RET_WAS_ERROR(r) )
++      if( !RET_IS_OK(r) )
+               return r;
+       newchunk = chunk_replacefields(controlchunk, fields,
+                       "Directory", true);
+-- 
+1.5.6.5
+

diff -r -u -N 
reprepro_4.2.0-1.debian.tar.gz/patches/0003-replace-sn-with-no-copy-in-changelogs.example.patch
 
reprepro_4.2.0-2.debian.tar.gz/patches/0003-replace-sn-with-no-copy-in-changelogs.example.patch
--- 
reprepro_4.2.0-1.debian.tar.gz/patches/0003-replace-sn-with-no-copy-in-changelogs.example.patch
     1970-01-01 01:00:00.000000000 +0100
+++ 
reprepro_4.2.0-2.debian.tar.gz/patches/0003-replace-sn-with-no-copy-in-changelogs.example.patch
     2010-10-22 16:54:02.000000000 +0200
@@ -0,0 +1,25 @@
+From eff9641b21cd035660d4f23b0f7ede82c7960240 Mon Sep 17 00:00:00 2001
+From: Bernhard R. Link <brl...@debian.org>
+Date: Thu, 14 Oct 2010 08:38:07 +0000
+Subject: replace -sn with --no-copy in changelogs.example
+
+---
+ docs/changelogs.example |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/docs/changelogs.example b/docs/changelogs.example
+index 2ff7229..1a133af 100755
+--- a/docs/changelogs.example
++++ b/docs/changelogs.example
+@@ -51,7 +51,7 @@ addsource() {
+               echo "extract $CANONDSCFILE information to $TARGETDIR"
+               mkdir -p -- "$TARGETDIR"
+               EXTRACTDIR="$(mktemp -d)"
+-              (cd -- "$EXTRACTDIR" && dpkg-source -sn -x "$CANONDSCFILE" > 
/dev/null)
++              (cd -- "$EXTRACTDIR" && dpkg-source --no-copy -x 
"$CANONDSCFILE" > /dev/null)
+               install -D -- "$EXTRACTDIR"/*/debian/copyright 
"$TARGETDIR/copyright"
+               install -D -- "$EXTRACTDIR"/*/debian/changelog 
"$TARGETDIR/changelog"
+               chmod -R u+rwX -- "$EXTRACTDIR"
+-- 
+1.5.6.5
+

diff -r -u -N 
reprepro_4.2.0-1.debian.tar.gz/patches/0004-add-support-for-ButAutomaticUpgrades-thanks-to-Mode.patch
 
reprepro_4.2.0-2.debian.tar.gz/patches/0004-add-support-for-ButAutomaticUpgrades-thanks-to-Mode.patch
--- 
reprepro_4.2.0-1.debian.tar.gz/patches/0004-add-support-for-ButAutomaticUpgrades-thanks-to-Mode.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
reprepro_4.2.0-2.debian.tar.gz/patches/0004-add-support-for-ButAutomaticUpgrades-thanks-to-Mode.patch
       2010-10-22 16:54:03.000000000 +0200
@@ -0,0 +1,114 @@
+From 05d098def85d78f311d595482f7617bc9fc136b8 Mon Sep 17 00:00:00 2001
+From: Bernhard R. Link <brl...@debian.org>
+Date: Sat, 16 Oct 2010 12:47:56 +0000
+Subject: add support for ButAutomaticUpgrades (thanks to Modesta Vainius)
+
+---
+ distribution.c   |    3 +++
+ distribution.h   |    3 ++-
+ docs/manual.html |    3 ++-
+ docs/reprepro.1  |    7 +++++++
+ release.c        |    6 ++++++
+ 5 files changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/distribution.c b/distribution.c
+index 5c657d4..5e39965 100644
+--- a/distribution.c
++++ b/distribution.c
+@@ -52,6 +52,7 @@ static retvalue distribution_free(struct distribution 
*distribution) {
+               free(distribution->version);
+               free(distribution->origin);
+               free(distribution->notautomatic);
++              free(distribution->butautomaticupgrades);
+               free(distribution->label);
+               free(distribution->description);
+               free(distribution->signwith);
+@@ -387,6 +388,7 @@ CFallSETPROC(distribution, suite)
+ CFallSETPROC(distribution, version)
+ CFallSETPROC(distribution, origin)
+ CFallSETPROC(distribution, notautomatic)
++CFallSETPROC(distribution, butautomaticupgrades)
+ CFtruthSETPROC2(distribution, readonly, readonly)
+ CFallSETPROC(distribution, label)
+ CFallSETPROC(distribution, description)
+@@ -450,6 +452,7 @@ static const struct configfield distributionconfigfields[] 
= {
+       CF("Label",             distribution,   label),
+       CF("Log",               distribution,   logger),
+       CF("NotAutomatic",      distribution,   notautomatic),
++      CF("ButAutomaticUpgrades", distribution, butautomaticupgrades),
+       CF("Origin",            distribution,   origin),
+       CF("Pull",              distribution,   pulls),
+       CF("ReadOnly",          distribution,   readonly),
+diff --git a/distribution.h b/distribution.h
+index b62269a..5547c4a 100644
+--- a/distribution.h
++++ b/distribution.h
+@@ -35,7 +35,8 @@ struct distribution {
+        * generated, may be NULL. only suite is sometimes used
+        * (and only for sanity checks) */
+       /*...@null@*/char *suite,*version;
+-      /*...@null@*/char *origin,*label,*description,*notautomatic;
++      /*...@null@*/char *origin, *label, *description,
++              *notautomatic, *butautomaticupgrades;
+       /* What architectures and components are there */
+       struct atomlist architectures, components;
+       /* which update rules to use */
+diff --git a/docs/manual.html b/docs/manual.html
+index 0e4c4d1..1d4d1a8 100644
+--- a/docs/manual.html
++++ b/docs/manual.html
+@@ -528,7 +528,8 @@ The following headers are copied verbatim to the Release 
file, if they exist:
+ <tt class="header">Architectures</tt> (excluding a possible value 
"<tt>source</tt>"),
+ <tt class="header">Components</tt>,
+ <tt class="header">Description</tt>, and
+-<tt class="header">NotAutomatic</tt>.
++<tt class="header">NotAutomatic</tt>,
++<tt class="header">ButAutomaticUpgrades</tt>.
+ <h4><a name="compression">Choosing compression and file names</a></h4>
+ Depending on the type of the index files, different files are generated.
+ No specifying anything is equivalent to:
+diff --git a/docs/reprepro.1 b/docs/reprepro.1
+index 1784ea5..ffa2d1f 100644
+--- a/docs/reprepro.1
++++ b/docs/reprepro.1
+@@ -1087,6 +1087,13 @@ Release files.
+ though anything but \fByes\fP does make much
+ sense right now.)
+ .TP
++.B ButAutomaticUpgrades
++This optional field is simply copied into the
++Release files.
++(The value is handled as arbitrary string,
++though anything but \fByes\fP does make much
++sense right now.)
++.TP
+ .B Description
+ This optional field is simply copied into the
+ Release files.
+diff --git a/release.c b/release.c
+index d9e6faa..4a5097e 100644
+--- a/release.c
++++ b/release.c
+@@ -1131,6 +1131,8 @@ retvalue release_directorydescription(struct release 
*release, const struct dist
+       release_writeheader("Architecture",
+                       atoms_architectures[target->architecture_atom]);
+       release_writeheader("NotAutomatic",distribution->notautomatic);
++      release_writeheader("ButAutomaticUpgrades",
++                      distribution->butautomaticupgrades);
+       release_writeheader("Description",distribution->description);
+ #undef release_writeheader
+       r = release_finishfile(release, f);
+@@ -1291,6 +1293,10 @@ retvalue release_prepare(struct release *release, 
struct distribution *distribut
+               writestring("\nNotAutomatic: ");
+               writestring(distribution->notautomatic);
+       }
++      if( distribution->butautomaticupgrades != NULL ) {
++              writestring("\nButAutomaticUpgrades: ");
++              writestring(distribution->butautomaticupgrades);
++      }
+       writechar('\n');
+ 
+       for( cs = cs_md5sum ; cs < cs_hashCOUNT ; cs++ ) {
+-- 
+1.5.6.5
+


-- 
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20101023142119.ga30...@pcpool00.mathematik.uni-freiburg.de

Reply via email to