diff -Nru golang-github-juju-clock-1.0.2/debian/changelog golang-github-juju-clock-1.0.2/debian/changelog --- golang-github-juju-clock-1.0.2/debian/changelog 2022-08-12 11:45:33.000000000 +0000 +++ golang-github-juju-clock-1.0.2/debian/changelog 2022-08-12 21:44:00.000000000 +0000 @@ -1,3 +1,9 @@ +golang-github-juju-clock (1.0.2-2) unstable; urgency=medium + + * Fix unaligned panics on 32 bit architectures + + -- Mathias Gibbens Fri, 12 Aug 2022 21:44:00 +0000 + golang-github-juju-clock (1.0.2-1) unstable; urgency=medium * New upstream release diff -Nru golang-github-juju-clock-1.0.2/debian/patches/000-fix-atomic-alignment.patch golang-github-juju-clock-1.0.2/debian/patches/000-fix-atomic-alignment.patch --- golang-github-juju-clock-1.0.2/debian/patches/000-fix-atomic-alignment.patch 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-juju-clock-1.0.2/debian/patches/000-fix-atomic-alignment.patch 2022-08-12 21:43:52.000000000 +0000 @@ -0,0 +1,24 @@ +From: Mathias Gibbens +Description: Fix atomic alignment for 32 bit architectures +Forwarded: https://github.com/juju/clock/issues/11 +diff --git a/testclock/dilated.go b/testclock/dilated.go +index 4333b11..0b4d764 100644 +--- a/testclock/dilated.go ++++ b/testclock/dilated.go +@@ -24,11 +24,14 @@ func NewDilatedWallClock(realSecondDuration time.Duration) AdvanceableClock { + } + + type dilationClock struct { ++ // offsetAtomic is the current dilated offset to allow for time jumps/advances. ++ // Must be the first item in the struct to ensure proper 64-bit alignment as ++ // documented at https://pkg.go.dev/sync/atomic#pkg-note-BUG ++ offsetAtomic int64 ++ + epoch time.Time + realSecondDuration time.Duration + +- // offsetAtomic is the current dilated offset to allow for time jumps/advances. +- offsetAtomic int64 + // offsetChanged is a channel that is closed when timers need to be signaled + // that there is a offset change coming. + offsetChanged chan any diff -Nru golang-github-juju-clock-1.0.2/debian/patches/series golang-github-juju-clock-1.0.2/debian/patches/series --- golang-github-juju-clock-1.0.2/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-juju-clock-1.0.2/debian/patches/series 2022-08-12 21:40:10.000000000 +0000 @@ -0,0 +1 @@ +000-fix-atomic-alignment.patch