Bug 13826 - [4.10 backport needed]make will fail with encoding error if locale is not set to utf8
Summary: [4.10 backport needed]make will fail with encoding error if locale is not set...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: 4.10.0rc4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-08 03:30 UTC by Joe Guo (mail address dead)
Modified: 2020-02-12 20:28 UTC (History)
4 users (show)

See Also:


Attachments
backport patch to fix make error (5.69 KB, patch)
2019-03-08 05:08 UTC, Joe Guo (mail address dead)
abartlet: review+
npower: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Guo (mail address dead) 2019-03-08 03:30:20 UTC
On a system where locale is not set to utf8, make will fail with encoding error.
The details and fix is in commit 87149445af26b8577566dfe5e311b32e3650c6e6 in master branch already. However, it's not backported to 4.10 yet.
Comment 1 Joe Guo (mail address dead) 2019-03-08 05:08:17 UTC
Created attachment 14911 [details]
backport patch to fix make error

CI is in progress:

https://gitlab.com/catalyst-samba/samba/pipelines/50864620

which is branch v4-10-test + cherry-pick, have to also remove swap in .gitlab-ci.yml for ci to start.
Comment 2 Andrew Bartlett 2019-03-08 06:21:54 UTC
Comment on attachment 14911 [details]
backport patch to fix make error

Can I get a second team reviewer please?
Comment 3 Louis 2019-03-08 09:10:10 UTC
The patchs works for my Debian Stretch builds with 4.10.0rc4
Thanks for the patch notification.
Comment 4 Andrew Bartlett 2019-03-08 18:38:52 UTC
Karolin,

Please select for the next available 4.10.x release to allow builds with the new python3 default in packaging chroot environments where (eg) LANG=en_US.utf8 is not set.

Thanks!
Comment 5 Karolin Seeger 2019-03-11 07:53:23 UTC
(In reply to Andrew Bartlett from comment #4)
Pushed to autobuild-v4-10-test.
Comment 6 Karolin Seeger 2019-03-12 09:46:05 UTC
(In reply to Karolin Seeger from comment #5)
Patch does not apply on current v4-10-test branch:

Applying: s4/scripting/bin: open unicode files with utf8 encoding and write unicode string
error: patch failed: source4/scripting/bin/gen_ntstatus.py:20
error: source4/scripting/bin/gen_ntstatus.py: patch does not apply
error: patch failed: source4/scripting/bin/gen_werror.py:20
error: source4/scripting/bin/gen_werror.py: patch does not apply
Patch failed at 0001 s4/scripting/bin: open unicode files with utf8 encoding and write unicode string
Comment 7 Joe Guo (mail address dead) 2019-03-12 21:10:16 UTC
Hi Karolin,

I had a double check, the patch has already been applied to v4-10-test branch as 7bd135d25d67c96b92f732bee1d4acad67db241c.
Comment 8 Andrew Bartlett 2020-02-12 20:28:31 UTC
Fixed per comment #7