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

Bug#927304: unblock: aptly/1.3.0+ds1-2.2



Control: retitle -1 testing-pu: aptly/1.3.0+ds1-2.1+deb10u1
Control: tags -1 buster
Control: usertag -1 = pu

Since the build-depends golang-github-mattn-go-isatty and
golang-golang-x-sys are updated with new version in unstable, aptly
needs to be built in testing now.

The debdiff is almost same, only the version should be changed
to1.3.0+ds1-2.1+deb10u1

Thanks

On Thu, Apr 18, 2019 at 1:39 AM Shengjing Zhu <zhsj@debian.org> wrote:
>
> Package: release.debian.org
> Severity: normal
> User: release.debian.org@packages.debian.org
> Usertags: unblock
>
> Please unblock package aptly
>
> * It fixes #911924(support database migration from <= 1.3.0-6)
>
>   As I said in #911924, this should be grave. My justification is that
>   users should be able to upgrade from stretch, without losting data.
>
> * Previous NMU includes a patch which has a mistake, which may cause
>   lost one DB field info.
>
> unblock aptly/1.3.0+ds1-2.2
>
> The debdiff is:
>
>
> diff -Nru aptly-1.3.0+ds1/debian/changelog aptly-1.3.0+ds1/debian/changelog
> --- aptly-1.3.0+ds1/debian/changelog    2019-04-05 23:19:14.000000000 +0800
> +++ aptly-1.3.0+ds1/debian/changelog    2019-04-16 00:18:23.000000000 +0800
> @@ -1,3 +1,12 @@
> +aptly (1.3.0+ds1-2.2) unstable; urgency=medium
> +
> +  * Non-maintainer upload.
> +  * Add patch to fix DB backwards compatibility (Closes: #911924)
> +  * Fix struct field tag typo
> +  * Update debian/NEWS about DB compatibility
> +
> + -- Shengjing Zhu <zhsj@debian.org>  Tue, 16 Apr 2019 00:18:23 +0800
> +
>  aptly (1.3.0+ds1-2.1) unstable; urgency=medium
>
>    [ Shengjing Zhu ]
> diff -Nru aptly-1.3.0+ds1/debian/NEWS aptly-1.3.0+ds1/debian/NEWS
> --- aptly-1.3.0+ds1/debian/NEWS 2019-04-05 22:38:08.000000000 +0800
> +++ aptly-1.3.0+ds1/debian/NEWS 2019-04-16 00:18:23.000000000 +0800
> @@ -1,3 +1,13 @@
> +aptly (1.3.0+ds1-2.2) unstable; urgency=medium
> +
> +  This version tries to fix the database backwards compatibility,
> +  so you don't need to rebuild the database if you upgrade from
> +  aptly <= 1.3.0-6.
> +
> +  However some fields are missing, like created time of a snapshot.
> +
> + -- Shengjing Zhu <zhsj@debian.org>  Sat, 13 Apr 2019 23:26:39 +0800
> +
>  aptly (1.3.0+ds1-2) unstable; urgency=medium
>
>    * The database created by aptly <= 1.3.0-6 is not compatible
> diff -Nru aptly-1.3.0+ds1/debian/patches/Fix-time.Time-msgpack-decoding-backwards-compatibili.patch aptly-1.3.0+ds1/debian/patches/Fix-time.Time-msgpack-decoding-backwards-compatibili.patch
> --- aptly-1.3.0+ds1/debian/patches/Fix-time.Time-msgpack-decoding-backwards-compatibili.patch   1970-01-01 08:00:00.000000000 +0800
> +++ aptly-1.3.0+ds1/debian/patches/Fix-time.Time-msgpack-decoding-backwards-compatibili.patch   2019-04-16 00:18:23.000000000 +0800
> @@ -0,0 +1,40 @@
> +From: Shengjing Zhu <zhsj@debian.org>
> +Date: Sat, 13 Apr 2019 22:57:46 +0800
> +Subject: Fix time.Time msgpack decoding backwards compatibility
> +
> +This allows aptly to decode DB created by old codec library.
> +
> +Forwarded: https://github.com/aptly-dev/aptly/pull/830
> +---
> + deb/remote.go   | 3 ++-
> + deb/snapshot.go | 3 ++-
> + 2 files changed, 4 insertions(+), 2 deletions(-)
> +
> +diff --git a/deb/remote.go b/deb/remote.go
> +index 167d45f..71eb984 100644
> +--- a/deb/remote.go
> ++++ b/deb/remote.go
> +@@ -600,7 +600,8 @@ func (repo *RemoteRepo) Decode(input []byte) error {
> +       decoder := codec.NewDecoderBytes(input, &codec.MsgpackHandle{})
> +       err := decoder.Decode(repo)
> +       if err != nil {
> +-              if strings.HasPrefix(err.Error(), "codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80") {
> ++              if strings.HasPrefix(err.Error(), "codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80") ||
> ++                      strings.Contains(err.Error(), "invalid length of bytes for decoding time") {
> +                       // probably it is broken DB from go < 1.2, try decoding w/o time.Time
> +                       var repo11 struct { // nolint: maligned
> +                               UUID             string
> +diff --git a/deb/snapshot.go b/deb/snapshot.go
> +index fc7689c..feef44a 100644
> +--- a/deb/snapshot.go
> ++++ b/deb/snapshot.go
> +@@ -140,7 +140,8 @@ func (s *Snapshot) Decode(input []byte) error {
> +       decoder := codec.NewDecoderBytes(input, &codec.MsgpackHandle{})
> +       err := decoder.Decode(s)
> +       if err != nil {
> +-              if strings.HasPrefix(err.Error(), "codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80") {
> ++              if strings.HasPrefix(err.Error(), "codec.decoder: readContainerLen: Unrecognized descriptor byte: hex: 80") ||
> ++                      strings.Contains(err.Error(), "invalid length of bytes for decoding time") {
> +                       // probably it is broken DB from go < 1.2, try decoding w/o time.Time
> +                       var snapshot11 struct {
> +                               UUID      string
> diff -Nru aptly-1.3.0+ds1/debian/patches/Fix-UUID-struct-field-not-encoded-in-msgpack.patch aptly-1.3.0+ds1/debian/patches/Fix-UUID-struct-field-not-encoded-in-msgpack.patch
> --- aptly-1.3.0+ds1/debian/patches/Fix-UUID-struct-field-not-encoded-in-msgpack.patch   2019-04-05 23:18:43.000000000 +0800
> +++ aptly-1.3.0+ds1/debian/patches/Fix-UUID-struct-field-not-encoded-in-msgpack.patch   2019-04-16 00:18:23.000000000 +0800
> @@ -13,7 +13,7 @@
>   2 files changed, 5 insertions(+), 5 deletions(-)
>
>  diff --git a/deb/local.go b/deb/local.go
> -index e9fa17c..79cc308 100644
> +index e9fa17c..fb3e404 100644
>  --- a/deb/local.go
>  +++ b/deb/local.go
>  @@ -14,7 +14,7 @@ import (
> @@ -30,7 +30,7 @@
>         DefaultComponent string `codec:",omitempty"`
>         // Uploaders configuration
>  -      Uploaders *Uploaders `code:",omitempty" json:"-"`
> -+      Uploaders *Uploaders `code:"Uploaders,omitempty" json:"-"`
> ++      Uploaders *Uploaders `codec:"Uploaders,omitempty" json:"-"`
>         // "Snapshot" of current list of packages
>         packageRefs *PackageRefList
>   }
> diff -Nru aptly-1.3.0+ds1/debian/patches/series aptly-1.3.0+ds1/debian/patches/series
> --- aptly-1.3.0+ds1/debian/patches/series       2019-04-05 23:04:23.000000000 +0800
> +++ aptly-1.3.0+ds1/debian/patches/series       2019-04-16 00:18:23.000000000 +0800
> @@ -2,3 +2,4 @@
>  kjk-lzma.patch
>  pborman-uuid.patch
>  Fix-UUID-struct-field-not-encoded-in-msgpack.patch
> +Fix-time.Time-msgpack-decoding-backwards-compatibili.patch



-- 
Shengjing Zhu


Reply to: