Merge lp:~eugenenuke/ubuntu/wily/console-setup/fix-for-1565542 into lp:ubuntu/wily/console-setup

Proposed by Evgeniy Yanyuk on 2016-04-09
Status: Merged
Merge reported by: Mathieu Trudel-Lapierre
Merged at revision: not available
Proposed branch: lp:~eugenenuke/ubuntu/wily/console-setup/fix-for-1565542
Merge into: lp:ubuntu/wily/console-setup
Diff against target: 275 lines (+189/-4)
4 files modified
console-setup-tty (+58/-2)
debian/changelog (+9/-0)
debian/console-setup.initramfs-hook (+64/-0)
debian/console-setup.initramfs-top (+58/-2)
To merge this branch: bzr merge lp:~eugenenuke/ubuntu/wily/console-setup/fix-for-1565542
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre 2016-04-09 Approve on 2016-04-19
Review via email: mp+291433@code.launchpad.net

Description of the change

* Properly handle settings CODESET and FONSIZE when they equals 'guess' or are unset.
    - console-setup-tty, debian/console-setup.initramfs-hook,
      debian/console-setup.initramfs-top
    (LP: #1565542)

To post a comment you must log in.
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looks like this indeed fixes ru; and somewhat improves vi. Looks good to me (further improvements would most likely require fixing kbd too)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'console-setup-tty'
--- console-setup-tty 2010-03-19 11:08:58 +0000
+++ console-setup-tty 2016-04-09 08:35:42 +0000
@@ -29,6 +29,62 @@
2929
30. /etc/default/console-setup30. /etc/default/console-setup
3131
32# CODESET
33[ "$CODESET" != guess ] || CODESET=''
34if [ -z "$CODESET" ]; then
35 case "$CHARMAP" in
36 UTF-8) CODESET=Uni2;;
37 ARMSCII-8) CODESET=Armenian ;;
38 CP1251) CODESET=CyrSlav ;;
39 CP1255) CODESET=Hebrew ;;
40 CP1256) CODESET=Arabic ;;
41 GEORGIAN-ACADEMY) CODESET=Georgian ;;
42 GEORGIAN-PS) CODESET=Georgian ;;
43 IBM1133) CODESET=Lao ;;
44 ISIRI-3342) CODESET=Arabic ;;
45 ISO-8859-1) CODESET=Lat15 ;;
46 ISO-8859-2) CODESET=Lat2 ;;
47 ISO-8859-3) CODESET=Lat38 ;;
48 ISO-8859-4) CODESET=Lat7 ;; # sometimes Lat15
49 ISO-8859-5) CODESET=CyrSlav ;;
50 ISO-8859-6) CODESET=Arabic ;;
51 ISO-8859-7) CODESET=Greek ;;
52 ISO-8859-8) CODESET=Hebrew ;;
53 ISO-8859-9) CODESET=Lat15 ;;
54 ISO-8859-10) CODESET=Lat15 ;;
55 ISO-8859-11) CODESET=Thai ;;
56 ISO-8859-13) CODESET=Lat7 ;;
57 ISO-8859-14) CODESET=Lat38 ;;
58 ISO-8859-15) CODESET=Lat15 ;;
59 ISO-8859-16) CODESET=Lat2 ;;
60 KOI8-R) CODESET=CyrKoi ;;
61 KOI8-U) CODESET=CyrKoi ;;
62 TIS-620) CODESET=Thai ;;
63 VISCII) CODESET=Vietnamese ;;
64 *) ;;
65 esac
66fi
67
68# FONTSIZE
69if [ -z "$FONTSIZE" -o "$FONTSIZE" = guess ]; then
70 FONTSIZE=16
71fi
72case "$FONTSIZE" in
73 8x*)
74 FONTSIZE=${FONTSIZE#*x}
75 ;;
76 *x8)
77 FONTSIZE=${FONTSIZE%x*}
78 ;;
79 *x*)
80 a=${FONTSIZE%x*}
81 b=${FONTSIZE#*x}
82 if [ "$a" -lt "$b" ]; then
83 FONTSIZE=${b}x${a}
84 fi
85 ;;
86esac
87
32setup_unicode () {88setup_unicode () {
33 # Set up Unicode/non-Unicode mode.89 # Set up Unicode/non-Unicode mode.
34 # TODO: this will probably break something if terminal line emulation is90 # TODO: this will probably break something if terminal line emulation is
@@ -50,7 +106,7 @@
50 else106 else
51 FONT="/etc/console-setup/$CODESET-$FONTFACE$FONTSIZE.psf"107 FONT="/etc/console-setup/$CODESET-$FONTFACE$FONTSIZE.psf"
52 fi108 fi
53 if [ -f "$FONT" ]; then109 if [ -f "$FONT" ] || [ -f "$FONT.gz" ]; then
54 SETFONT_ARGS="${SETFONT_ARGS:+$SETFONT_ARGS }$FONT"110 SETFONT_ARGS="${SETFONT_ARGS:+$SETFONT_ARGS }$FONT"
55 fi111 fi
56 if [ "$ACM" ]; then112 if [ "$ACM" ]; then
@@ -59,7 +115,7 @@
59 else115 else
60 ACM="/etc/console-setup/$CHARMAP.acm"116 ACM="/etc/console-setup/$CHARMAP.acm"
61 fi117 fi
62 if [ -f "$ACM" ]; then118 if [ -f "$ACM" ] || [ -f "$ACM.gz" ]; then
63 SETFONT_ARGS="${SETFONT_ARGS:+$SETFONT_ARGS }-m $ACM"119 SETFONT_ARGS="${SETFONT_ARGS:+$SETFONT_ARGS }-m $ACM"
64 fi120 fi
65 if [ "$SETFONT_ARGS" ]; then121 if [ "$SETFONT_ARGS" ]; then
66122
=== modified file 'debian/changelog'
--- debian/changelog 2015-10-20 12:51:36 +0000
+++ debian/changelog 2016-04-09 08:35:42 +0000
@@ -1,3 +1,12 @@
1console-setup (1.108ubuntu10) UNRELEASED; urgency=medium
2
3 * Properly handle settings CODESET and FONSIZE when they equals 'guess' or are unset.
4 - console-setup-tty, debian/console-setup.initramfs-hook,
5 debian/console-setup.initramfs-top
6 (LP: #1565542)
7
8 -- Evgeniy Yanyuk <eugenenuke@gmail.com> Sat, 09 Apr 2016 11:14:28 +0300
9
1console-setup (1.108ubuntu9) wily; urgency=medium10console-setup (1.108ubuntu9) wily; urgency=medium
211
3 * Cherry-pick fix from git for udpkg/Hurd noise in keyboard-configuration.12 * Cherry-pick fix from git for udpkg/Hurd noise in keyboard-configuration.
413
=== modified file 'debian/console-setup.initramfs-hook'
--- debian/console-setup.initramfs-hook 2011-01-20 20:55:01 +0000
+++ debian/console-setup.initramfs-hook 2016-04-09 08:35:42 +0000
@@ -18,6 +18,62 @@
18[ -r /etc/default/console-setup ] || exit 018[ -r /etc/default/console-setup ] || exit 0
19. /etc/default/console-setup # also sources /etc/default/keyboard19. /etc/default/console-setup # also sources /etc/default/keyboard
2020
21# CODESET
22[ "$CODESET" != guess ] || CODESET=''
23if [ -z "$CODESET" ]; then
24 case "$CHARMAP" in
25 UTF-8) CODESET=Uni2;;
26 ARMSCII-8) CODESET=Armenian ;;
27 CP1251) CODESET=CyrSlav ;;
28 CP1255) CODESET=Hebrew ;;
29 CP1256) CODESET=Arabic ;;
30 GEORGIAN-ACADEMY) CODESET=Georgian ;;
31 GEORGIAN-PS) CODESET=Georgian ;;
32 IBM1133) CODESET=Lao ;;
33 ISIRI-3342) CODESET=Arabic ;;
34 ISO-8859-1) CODESET=Lat15 ;;
35 ISO-8859-2) CODESET=Lat2 ;;
36 ISO-8859-3) CODESET=Lat38 ;;
37 ISO-8859-4) CODESET=Lat7 ;; # sometimes Lat15
38 ISO-8859-5) CODESET=CyrSlav ;;
39 ISO-8859-6) CODESET=Arabic ;;
40 ISO-8859-7) CODESET=Greek ;;
41 ISO-8859-8) CODESET=Hebrew ;;
42 ISO-8859-9) CODESET=Lat15 ;;
43 ISO-8859-10) CODESET=Lat15 ;;
44 ISO-8859-11) CODESET=Thai ;;
45 ISO-8859-13) CODESET=Lat7 ;;
46 ISO-8859-14) CODESET=Lat38 ;;
47 ISO-8859-15) CODESET=Lat15 ;;
48 ISO-8859-16) CODESET=Lat2 ;;
49 KOI8-R) CODESET=CyrKoi ;;
50 KOI8-U) CODESET=CyrKoi ;;
51 TIS-620) CODESET=Thai ;;
52 VISCII) CODESET=Vietnamese ;;
53 *) ;;
54 esac
55fi
56
57# FONTSIZE
58if [ -z "$FONTSIZE" -o "$FONTSIZE" = guess ]; then
59 FONTSIZE=16
60fi
61case "$FONTSIZE" in
62 8x*)
63 FONTSIZE=${FONTSIZE#*x}
64 ;;
65 *x8)
66 FONTSIZE=${FONTSIZE%x*}
67 ;;
68 *x*)
69 a=${FONTSIZE%x*}
70 b=${FONTSIZE#*x}
71 if [ "$a" -lt "$b" ]; then
72 FONTSIZE=${b}x${a}
73 fi
74 ;;
75esac
76
21# Copy console-setup configuration77# Copy console-setup configuration
22mkdir -p "$DESTDIR/etc/default"78mkdir -p "$DESTDIR/etc/default"
23cp -p /etc/default/keyboard "$DESTDIR/etc/default"79cp -p /etc/default/keyboard "$DESTDIR/etc/default"
@@ -34,6 +90,10 @@
34 mkdir -p "$DESTDIR${FONT%/*}"90 mkdir -p "$DESTDIR${FONT%/*}"
35 cp -p "$FONT" "$DESTDIR$FONT"91 cp -p "$FONT" "$DESTDIR$FONT"
36fi92fi
93if [ -f "$FONT.gz" ]; then
94 mkdir -p "$DESTDIR${FONT%/*}"
95 cp -p "$FONT.gz" "$DESTDIR$FONT.gz"
96fi
37if [ -f "$ACM" ]; then97if [ -f "$ACM" ]; then
38 ACM="/etc/console-setup/${ACM##*/}"98 ACM="/etc/console-setup/${ACM##*/}"
39 ACM="${ACM%.gz}"99 ACM="${ACM%.gz}"
@@ -44,6 +104,10 @@
44 mkdir -p "$DESTDIR${ACM%/*}"104 mkdir -p "$DESTDIR${ACM%/*}"
45 cp -p "$ACM" "$DESTDIR$ACM"105 cp -p "$ACM" "$DESTDIR$ACM"
46fi106fi
107if [ -f "$ACM.gz" ]; then
108 mkdir -p "$DESTDIR${ACM%/*}"
109 cp -p "$ACM.gz" "$DESTDIR$ACM.gz"
110fi
47if [ -f /etc/console-setup/cached.kmap.gz ]; then111if [ -f /etc/console-setup/cached.kmap.gz ]; then
48 mkdir -p "$DESTDIR/etc/console-setup"112 mkdir -p "$DESTDIR/etc/console-setup"
49 cp -p /etc/console-setup/cached.kmap.gz \113 cp -p /etc/console-setup/cached.kmap.gz \
50114
=== modified file 'debian/console-setup.initramfs-top'
--- debian/console-setup.initramfs-top 2011-01-20 20:55:01 +0000
+++ debian/console-setup.initramfs-top 2016-04-09 08:35:42 +0000
@@ -20,6 +20,62 @@
2020
21[ "$ACTIVE_CONSOLES" ] || exit 021[ "$ACTIVE_CONSOLES" ] || exit 0
2222
23# CODESET
24[ "$CODESET" != guess ] || CODESET=''
25if [ -z "$CODESET" ]; then
26 case "$CHARMAP" in
27 UTF-8) CODESET=Uni2;;
28 ARMSCII-8) CODESET=Armenian ;;
29 CP1251) CODESET=CyrSlav ;;
30 CP1255) CODESET=Hebrew ;;
31 CP1256) CODESET=Arabic ;;
32 GEORGIAN-ACADEMY) CODESET=Georgian ;;
33 GEORGIAN-PS) CODESET=Georgian ;;
34 IBM1133) CODESET=Lao ;;
35 ISIRI-3342) CODESET=Arabic ;;
36 ISO-8859-1) CODESET=Lat15 ;;
37 ISO-8859-2) CODESET=Lat2 ;;
38 ISO-8859-3) CODESET=Lat38 ;;
39 ISO-8859-4) CODESET=Lat7 ;; # sometimes Lat15
40 ISO-8859-5) CODESET=CyrSlav ;;
41 ISO-8859-6) CODESET=Arabic ;;
42 ISO-8859-7) CODESET=Greek ;;
43 ISO-8859-8) CODESET=Hebrew ;;
44 ISO-8859-9) CODESET=Lat15 ;;
45 ISO-8859-10) CODESET=Lat15 ;;
46 ISO-8859-11) CODESET=Thai ;;
47 ISO-8859-13) CODESET=Lat7 ;;
48 ISO-8859-14) CODESET=Lat38 ;;
49 ISO-8859-15) CODESET=Lat15 ;;
50 ISO-8859-16) CODESET=Lat2 ;;
51 KOI8-R) CODESET=CyrKoi ;;
52 KOI8-U) CODESET=CyrKoi ;;
53 TIS-620) CODESET=Thai ;;
54 VISCII) CODESET=Vietnamese ;;
55 *) ;;
56 esac
57fi
58
59# FONTSIZE
60if [ -z "$FONTSIZE" -o "$FONTSIZE" = guess ]; then
61 FONTSIZE=16
62fi
63case "$FONTSIZE" in
64 8x*)
65 FONTSIZE=${FONTSIZE#*x}
66 ;;
67 *x8)
68 FONTSIZE=${FONTSIZE%x*}
69 ;;
70 *x*)
71 a=${FONTSIZE%x*}
72 b=${FONTSIZE#*x}
73 if [ "$a" -lt "$b" ]; then
74 FONTSIZE=${b}x${a}
75 fi
76 ;;
77esac
78
23if [ "$VERBOSE_OUTPUT" = yes ]; then79if [ "$VERBOSE_OUTPUT" = yes ]; then
24 verbose=80 verbose=
25else81else
@@ -45,7 +101,7 @@
45 else101 else
46 FONT="/etc/console-setup/$CODESET-$FONTFACE$FONTSIZE.psf"102 FONT="/etc/console-setup/$CODESET-$FONTFACE$FONTSIZE.psf"
47 fi103 fi
48 if [ -f "$FONT" ]; then104 if [ -f "$FONT" ] || [ -f "$FONT.gz" ]; then
49 if type consolechars >/dev/null 2>&1; then105 if type consolechars >/dev/null 2>&1; then
50 eval consolechars -v --tty=$console -f "$FONT" $verbose106 eval consolechars -v --tty=$console -f "$FONT" $verbose
51 elif type setfont >/dev/null 2>&1; then107 elif type setfont >/dev/null 2>&1; then
@@ -59,7 +115,7 @@
59 else115 else
60 ACM="/etc/console-setup/$CHARMAP.acm"116 ACM="/etc/console-setup/$CHARMAP.acm"
61 fi117 fi
62 if [ -f "$ACM" ]; then118 if [ -f "$ACM" ] || [ -f "$ACM.gz" ]; then
63 if type consolechars >/dev/null 2>&1; then119 if type consolechars >/dev/null 2>&1; then
64 eval consolechars -v --tty=$console --acm "$ACM" \120 eval consolechars -v --tty=$console --acm "$ACM" \
65 $verbose121 $verbose

Subscribers

People subscribed via source and target branches