diff -Nru ros-gencpp-0.6.2/debian/changelog ros-gencpp-0.6.2/debian/changelog --- ros-gencpp-0.6.2/debian/changelog 2019-10-26 06:36:46.000000000 +0000 +++ ros-gencpp-0.6.2/debian/changelog 2019-11-08 07:12:01.000000000 +0000 @@ -1,3 +1,9 @@ +ros-gencpp (0.6.2-4) unstable; urgency=medium + + * Add patch for reproducible file generation + + -- Jochen Sprickerhof Fri, 08 Nov 2019 08:12:01 +0100 + ros-gencpp (0.6.2-3) unstable; urgency=medium * Drop Python 2 package (Closes: #938375) diff -Nru ros-gencpp-0.6.2/debian/patches/0003-Sort-list-and-dict-to-make-output-reproducible.patch ros-gencpp-0.6.2/debian/patches/0003-Sort-list-and-dict-to-make-output-reproducible.patch --- ros-gencpp-0.6.2/debian/patches/0003-Sort-list-and-dict-to-make-output-reproducible.patch 1970-01-01 00:00:00.000000000 +0000 +++ ros-gencpp-0.6.2/debian/patches/0003-Sort-list-and-dict-to-make-output-reproducible.patch 2019-11-08 07:08:29.000000000 +0000 @@ -0,0 +1,47 @@ +From: Jochen Sprickerhof +Date: Fri, 8 Nov 2019 08:05:35 +0100 +Subject: Sort list and dict to make output reproducible + +--- + scripts/msg.h.template | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/scripts/msg.h.template b/scripts/msg.h.template +index 3e7e24c..b2d709e 100644 +--- a/scripts/msg.h.template ++++ b/scripts/msg.h.template +@@ -19,6 +19,7 @@ + import genmsg.msgs + import gencpp + import os ++from collections import OrderedDict + + cpp_namespace = '::%s::'%(spec.package) # TODO handle nested namespace + cpp_class = '%s_'%spec.short_name +@@ -183,7 +184,7 @@ namespace message_traits + { + + @{ +-bool_traits = dict(IsMessage=True, ++bool_traits = OrderedDict(IsMessage=True, + IsFixedSize=gencpp.is_fixed_length(spec, msg_context, search_path), + HasHeader=spec.has_header(), + ) +@@ -194,14 +195,14 @@ def booltotype(b): + // BOOLTRAITS @bool_traits + + @# TODO +-// !!!!!!!!!!! @(dir(spec)) ++// !!!!!!!!!!! @(sorted(dir(spec))) + @#if spec.is_fixed_length(): + @# traits = traits.append('IsFixedSize') + + @#template +-@#struct IsFixedSize<@(cpp_full_name_with_alloc) >:: @(dir(spec)) ? "TrueType" ! "FalseType") { }; ++@#struct IsFixedSize<@(cpp_full_name_with_alloc) >:: @(sorted(dir(spec))) ? "TrueType" ! "FalseType") { }; + @#template +-@#struct IsFixedSize<@(cpp_full_name_with_alloc) const >:: @(dir(spec)) ? "TrueType" ! "FalseType") { }; ++@#struct IsFixedSize<@(cpp_full_name_with_alloc) const >:: @(sorted(dir(spec))) ? "TrueType" ! "FalseType") { }; + + @# Binary traits + diff -Nru ros-gencpp-0.6.2/debian/patches/series ros-gencpp-0.6.2/debian/patches/series --- ros-gencpp-0.6.2/debian/patches/series 2019-07-31 18:11:05.000000000 +0000 +++ ros-gencpp-0.6.2/debian/patches/series 2019-11-08 07:08:29.000000000 +0000 @@ -1,2 +1,3 @@ 0001-Fix-location-of-gen_cpp.py.patch 0002-Remove-comment-with-build-path.patch +0003-Sort-list-and-dict-to-make-output-reproducible.patch