diff -Nru kbd-2.0.4/debian/changelog kbd-2.0.4/debian/changelog --- kbd-2.0.4/debian/changelog 2020-07-10 17:27:45.000000000 +0000 +++ kbd-2.0.4/debian/changelog 2020-08-12 11:01:20.000000000 +0000 @@ -1,3 +1,10 @@ +kbd (2.0.4-4ubuntu4) groovy; urgency=medium + + * Add d/p/fix-duplicate-progname.patch to fix duplicate progname linker + error under gcc-10 (LP: #1891316) + + -- Dave Jones Wed, 12 Aug 2020 12:01:20 +0100 + kbd (2.0.4-4ubuntu3) groovy; urgency=medium * No change rebuild against new CET ABI. diff -Nru kbd-2.0.4/debian/patches/fix-duplicate-progname.patch kbd-2.0.4/debian/patches/fix-duplicate-progname.patch --- kbd-2.0.4/debian/patches/fix-duplicate-progname.patch 1970-01-01 00:00:00.000000000 +0000 +++ kbd-2.0.4/debian/patches/fix-duplicate-progname.patch 2020-08-12 11:01:20.000000000 +0000 @@ -0,0 +1,38 @@ +Author: Dave Jones +Forwarded: not-needed +Description: work around duplicate progname linker error in gcc-10 + Under gcc-10, the "progname" variable (declared in version.h) causes a + multiple definition error at linker time (because it's declared in a header). + This patch simply shifts the definition to a trivial version.c. + . + This can be removed beyond version 2.3.0, which includes commit + 12c4be5d77f56aa918e5a98bb397278ff8640c2d that fixes this issue rather more + elegantly (introduces a get_progname function, etc. etc.) + +--- /dev/null ++++ b/src/version.c +@@ -0,0 +1,3 @@ ++#include "version.h" ++ ++char *progname; +--- a/src/version.h ++++ b/src/version.h +@@ -5,7 +5,7 @@ + #include + #include + +-char *progname; ++extern char *progname; + + static inline void + set_progname(char *name) +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -38,6 +38,7 @@ + + libcommon_a_SOURCES = \ + getfd.c getfd.h \ ++ version.c version.h \ + xmalloc.c xmalloc.h \ + kbd_error.c kbd_error.h + diff -Nru kbd-2.0.4/debian/patches/series kbd-2.0.4/debian/patches/series --- kbd-2.0.4/debian/patches/series 2019-05-09 15:22:51.000000000 +0000 +++ kbd-2.0.4/debian/patches/series 2020-08-12 11:01:20.000000000 +0000 @@ -7,3 +7,4 @@ loadkeys_ckbcomp.diff kbd_mode-Add-f-option-and-deny-dangerous-mode-switches-wi.patch kbd_mode-Exit-with-success-even-when-mode-change-is-not-p.patch +fix-duplicate-progname.patch