Merge ~jchittum/ubuntu/+source/byobu:plucky-lp-2052610 into ubuntu/+source/byobu:ubuntu/devel

Proposed by John Chittum
Status: Needs review
Proposed branch: ~jchittum/ubuntu/+source/byobu:plucky-lp-2052610
Merge into: ubuntu/+source/byobu:ubuntu/devel
Diff against target: 81 lines (+49/-1)
4 files modified
debian/changelog (+9/-0)
debian/control (+2/-1)
debian/patches/lp-2052610-locale-time-estimation.patch (+37/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
Canonical Server packageset reviewers Pending
Canonical Server Reporter Pending
Review via email: mp+482630@code.launchpad.net

Description of the change

To post a comment you must log in.

Unmerged commits

7d4db62... by John Chittum

d/control update maintainers

f6ca4e7... by John Chittum

d/changelog update

3c3a8be... by John Chittum

d/patches/lp-2052610: strip by digits

strip time EPOCHREALTIME by digit not decimal separator
original code stripped only by period defined decimal.
Some locales separate by comma. The goal is to strip to a
non-decimal, so instead only using allowing digits,
and using start of string ensures safety. LP: #2052610

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 9a0718e..a2a5e8e 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+byobu (6.11-0ubuntu2) plucky; urgency=medium
7+
8+ * d/patches/lp-2052610: substitute only digits.
9+ Original code hardcoded a period as the decimal
10+ separator. This breaks in locales that use commas.
11+ Thank you gh: jakubskopal LP: #2052610
12+
13+ -- John Chittum <john.chittum@canonical.com> Mon, 03 Mar 2025 14:50:35 -0500
14+
15 byobu (6.11-0ubuntu1) noble; urgency=medium
16
17 * usr/share/byobu/profiles/bashrc:
18diff --git a/debian/control b/debian/control
19index fa02a92..3086919 100644
20--- a/debian/control
21+++ b/debian/control
22@@ -1,7 +1,8 @@
23 Source: byobu
24 Section: misc
25 Priority: optional
26-Maintainer: Dustin Kirkland <kirkland@ubuntu.com>
27+Maintainers: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28+Original-Maintainers: Dustin Kirkland <kirkland@ubuntu.com>
29 Uploaders: Antoine Beaupré <anarcat@koumbit.org>
30 Standards-Version: 4.1.3
31 Build-Depends: debhelper (>= 13), gettext-base, automake, autoconf, dh-python, python3
32diff --git a/debian/patches/lp-2052610-locale-time-estimation.patch b/debian/patches/lp-2052610-locale-time-estimation.patch
33new file mode 100644
34index 0000000..8acaccf
35--- /dev/null
36+++ b/debian/patches/lp-2052610-locale-time-estimation.patch
37@@ -0,0 +1,37 @@
38+Description: strip time EPOCHREALTIME by digit not decimal separator
39+ original code stripped only by period defined decimal.
40+ Some locales separate by comma. The goal is to strip to a
41+ non-decimal, so instead only allowing digits,
42+ and using start of string ensures safety.
43+Author: jakubskopal
44+Origin: uptream, https://github.com/dustinkirkland/byobu/pull/71
45+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/byobu/+bug/2052610
46+Reviewed-by: John Chittum, john.chittum@canonical.com
47+Last-Update: 2025-03-03
48+---
49+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
50+diff --git a/usr/share/byobu/profiles/bashrc b/usr/share/byobu/profiles/bashrc
51+index cf31b46..324e794 100644
52+--- a/usr/share/byobu/profiles/bashrc
53++++ b/usr/share/byobu/profiles/bashrc
54+@@ -36,8 +36,9 @@ byobu_prompt_runtime() {
55+ local starttime endtime duration days hours minutes seconds microseconds nanoseconds str
56+ [ ! -r $BYOBU_RUN_DIR/timer.$$ ] && printf "[0.000s]" && return
57+ read starttime < $BYOBU_RUN_DIR/timer.$$ 2>/dev/null || true
58+- endtime=${EPOCHREALTIME/./}
59+- starttime=${starttime/./}
60++ # strip to non-decimal time. avoids LP: #2052610
61++ endtime=${EPOCHREALTIME/[^0-9]/}
62++ starttime=${starttime/[^0-9]/}
63+ duration=$((endtime - starttime))
64+ days=$((duration/1000000/60/60/24))
65+ hours=$((duration/1000000/60/60%24))
66+@@ -54,7 +55,7 @@ byobu_prompt_runtime() {
67+ printf "[%s]" "$str" 1>&2
68+ }
69+ # Requires Bash 4.x
70+-export PS0='$(printf "%s" ${EPOCHREALTIME/./} >"$BYOBU_RUN_DIR/timer.$$")'
71++export PS0='$(printf "%s" ${EPOCHREALTIME/[^0-9]/} >"$BYOBU_RUN_DIR/timer.$$")'
72+
73+ case "$BYOBU_DISTRO" in
74+ "Ubuntu")
75diff --git a/debian/patches/series b/debian/patches/series
76new file mode 100644
77index 0000000..ef38806
78--- /dev/null
79+++ b/debian/patches/series
80@@ -0,0 +1 @@
81+lp-2052610-locale-time-estimation.patch

Subscribers

People subscribed via source and target branches