diff -Nru man-db-2.7.6.1/debian/changelog man-db-2.7.6.1/debian/changelog --- man-db-2.7.6.1/debian/changelog 2016-12-12 12:51:57.000000000 +0000 +++ man-db-2.7.6.1/debian/changelog 2016-12-13 13:10:25.000000000 +0000 @@ -1,3 +1,9 @@ +man-db (2.7.6.1-2) unstable; urgency=medium + + * Fix locale macro loading for Chinese. + + -- Colin Watson Tue, 13 Dec 2016 13:10:25 +0000 + man-db (2.7.6.1-1) unstable; urgency=medium * New upstream release: diff -Nru man-db-2.7.6.1/debian/.git-dpm man-db-2.7.6.1/debian/.git-dpm --- man-db-2.7.6.1/debian/.git-dpm 2016-12-12 12:50:43.000000000 +0000 +++ man-db-2.7.6.1/debian/.git-dpm 2016-12-13 13:09:52.000000000 +0000 @@ -1,6 +1,6 @@ # see git-dpm(1) from git-dpm package -7acc8f6dfc828594ebd2d0a68c338fde5856b956 -7acc8f6dfc828594ebd2d0a68c338fde5856b956 +601e631cd8cee11260b701adab13c96a8bd82e29 +601e631cd8cee11260b701adab13c96a8bd82e29 7acc8f6dfc828594ebd2d0a68c338fde5856b956 7acc8f6dfc828594ebd2d0a68c338fde5856b956 man-db_2.7.6.1.orig.tar.xz diff -Nru man-db-2.7.6.1/debian/patches/fix-chinese-locale-macros.patch man-db-2.7.6.1/debian/patches/fix-chinese-locale-macros.patch --- man-db-2.7.6.1/debian/patches/fix-chinese-locale-macros.patch 1970-01-01 00:00:00.000000000 +0000 +++ man-db-2.7.6.1/debian/patches/fix-chinese-locale-macros.patch 2016-12-13 13:09:52.000000000 +0000 @@ -0,0 +1,44 @@ +From 601e631cd8cee11260b701adab13c96a8bd82e29 Mon Sep 17 00:00:00 2001 +From: Colin Watson +Date: Tue, 13 Dec 2016 13:03:01 +0000 +Subject: Fix locale macro loading for Chinese + +The intent was always that we should load the macro file corresponding +to just the language part of the page's locale, and the debug output +agreed with this, but the actual implementation did not. Fix this. + +See: https://savannah.gnu.org/bugs/?44941 + +* src/man.c (display): Pass bits.language rather than page_lang to +locale_macros. Adjust memory allocation. + +Origin: upstream, http://git.savannah.gnu.org/cgit/man-db.git/commit/?id=d450d4c2d3c09a629ef95d02d250a6cb290764ca +Last-Update: 2016-12-13 + +Patch-Name: fix-chinese-locale-macros.patch +--- + src/man.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/man.c b/src/man.c +index 15a568a1..38483e3f 100644 +--- a/src/man.c ++++ b/src/man.c +@@ -2184,13 +2184,14 @@ static int display (const char *dir, const char *man_file, + name = xasprintf ("echo .mso %s.tmac", + bits.language); + lcmd = pipecmd_new_function ( +- name, locale_macros, free, page_lang); ++ name, locale_macros, free, ++ xstrdup (bits.language)); + pipecmd_sequence_command (seq, lcmd); + ++seq_ncmds; + free (name); + free_locale_bits (&bits); +- } else +- free (page_lang); ++ } ++ free (page_lang); + } + #endif /* TROFF_IS_GROFF */ + diff -Nru man-db-2.7.6.1/debian/patches/series man-db-2.7.6.1/debian/patches/series --- man-db-2.7.6.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ man-db-2.7.6.1/debian/patches/series 2016-12-13 13:09:52.000000000 +0000 @@ -0,0 +1 @@ +fix-chinese-locale-macros.patch