Bug 73

Summary: mgarepo submit failed when a parent directory has an accentued name (UTF-8 issue)
Product: Mageia Reporter: Thierry Vignaud <thierry.vignaud>
Component: RPM PackagesAssignee: papoteur <yvesbrungard>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: lists.jjorge, mageia, marja11, rwobben, thierry.vignaud, yvesbrungard
Version: CauldronKeywords: NEEDINFO
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: mgarepo-1.12.0-1.mga6 CVE:
Status comment:
Attachments: Prefix svn info command

Description Thierry Vignaud 2011-02-17 00:09:14 CET
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0b11) Gecko/20110208 Firefox/4.0b11
Build Identifier: 

Description of problem:
mgarepo submit failed when a parent directory has an accentued name

Version-Release number of selected component (if applicable): 1.9.8


How reproducible:
always when a parent directory is accentued.
Never when no parent directory is accentued.


Steps to Reproduce:
1. mkdir ~/Téléchargement/mga -p
2. cd ~/Téléchargement/mga
3. mgarepo co firefox-ext-noscript
4. cd firefox-ext-noscript
5. mgarepo submit
["svn: Can't convert string from native encoding to 'UTF-8':", 'svn: /home/tv/T?\\195?\\169l?\\195?\\169chargement/mga/pkgs/firefox-ext-noscript']
{'svn': '/home/tv/T?\\195?\\169l?\\195?\\169chargement/mga/pkgs/firefox-ext-noscript'}
error: missing URL from svn info /home/tv/Téléchargement/mga/pkgs/firefox-ext-noscript

(after adding print for debugging)

Reproducible: 

Steps to Reproduce:
Ahmad Samir 2011-02-17 02:48:17 CET

Assignee: ahmadsamir3891 => boklm

Comment 1 Marja Van Waes 2011-10-04 13:55:49 CEST
@ boklm 

Are you aware this bug was assigned to you on 2011-02-17 ?

CC: (none) => m.van.waes

Comment 2 Nicolas Vigier 2011-10-04 14:02:21 CEST
yes.
Comment 3 Marja Van Waes 2011-12-11 21:26:33 CET
@ Assignee
Please confirm this bug was assigned correctly by putting "OK" on the white board or by confirming in a comment
Nicolas Vigier 2011-12-16 16:04:46 CET

Status: NEW => ASSIGNED

Comment 4 Marja Van Waes 2012-05-26 13:09:00 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 5 Manuel Hiebel 2012-10-20 22:04:01 CEST
boklm leave Mageia

Assignee: boklm => bugsquad
Status: ASSIGNED => NEW

Comment 6 Marja Van Waes 2012-11-07 18:53:48 CET
@ tv

you filed this bug long before Mageia 1 was released. Is it still valid for mgarepo in current cauldron?

(mgarepo-1.10.2-3.mga3 IINM)
Comment 7 roelof Wobben 2012-12-31 09:14:41 CET
@Thierry :  It this bugs still valid. 

@Bolkm : Any news on fixing this bug ?

CC: (none) => r.wobben, thierry.vignaud

roelof Wobben 2012-12-31 09:15:20 CET

CC: (none) => boklm

Comment 8 Thierry Vignaud 2012-12-31 12:25:37 CET
Of course it's still valid.
the error is slighty different now:

$ mgarepo submit
error: missing URL from svn info /home/tv/Téléchargement/mga/firefox-ext-noscript
$ svn info
Path: .
Working Copy Root Path: /home/tv/Téléchargement/mga/firefox-ext-noscript
URL: svn+ssh://svn.mageia.org/svn/packages/cauldron/firefox-ext-noscript/current
Repository Root: svn+ssh://svn.mageia.org/svn/packages
Repository UUID: 01bf705a-734c-4999-978a-dc8ab10ec44d
Revision: 336559
Node Kind: directory
Schedule: normal
Last Changed Author: tv
Last Changed Rev: 332129
Last Changed Date: 2012-12-17 19:09:56 +0100 (lun, 17 Ker  2012)

'strace -f mgarepo submit' still shows the UTF-8 error:
[pid 29434] write(2, "svn: E000022: Can't convert stri"..., 68) = 68
Comment 9 roelof Wobben 2012-12-31 12:34:17 CET
Thanks for the answer. 

Roelof
Marja Van Waes 2013-03-15 20:33:11 CET

Keywords: NEEDINFO => (none)

Nicolas Vigier 2014-03-24 10:48:36 CET

CC: boklm => (none)

Thierry Vignaud 2015-06-11 16:19:53 CEST

CC: (none) => mageia

Comment 10 papoteur 2015-08-07 20:36:12 CEST
The problem is how the command to svn is formed.
In the above case, the command send is on the form:
 LANG=C LANGUAGE=C LC_ALL=C svn info /home/yves/Téléchargements/mga/firefox-ext-noscript --non-interactive

As result, svn provides an error.

svn: E000022: Can't convert string from native encoding to 'UTF-8':
svn: E000022: /home/yves/T?\195?\169l?\195?\169chargements/mga/firefox-ext-noscript

Without prefix, the command works well, but with lokalized info:
svn info /home/yves/Téléchargements/mga/firefox-ext-noscript --non-interactive                           
Chemin : /home/yves/Téléchargements/mga/firefox-ext-noscript
Chemin racine de la copie de travail : /home/yves/Téléchargements/mga/firefox-ext-noscript
URL : svn+ssh://svn.mageia.org/svn/packages/cauldron/firefox-ext-noscript/current
Relative URL: ^/cauldron/firefox-ext-noscript/current
Racine du dépôt : svn+ssh://svn.mageia.org/svn/packages
UUID du dépôt : 01bf705a-734c-4999-978a-dc8ab10ec44d
Révision : 861581
Type de nÅud : répertoire
Tâche programmée : normale
Auteur de la dernière modification : tv
Révision de la dernière modification : 667364
Date de la dernière modification: 2014-08-25 19:38:47 +0200 (lun. 25 août 2014)

CC: (none) => yves.brungard_mageia

Comment 11 papoteur 2015-08-08 21:24:00 CEST
The command with LANGUAGE=C prefix is perhaps enough:

LANGUAGE=C svn info /home/yves/Téléchargements/mga/firefox-ext-noscript --non-interactive
Path: /home/yves/Téléchargements/mga/firefox-ext-noscript
Working Copy Root Path: /home/yves/Téléchargements/mga/firefox-ext-noscript
URL: svn+ssh://svn.mageia.org/svn/packages/cauldron/firefox-ext-noscript/current
Relative URL: ^/cauldron/firefox-ext-noscript/current
Repository Root: svn+ssh://svn.mageia.org/svn/packages
Repository UUID: 01bf705a-734c-4999-978a-dc8ab10ec44d
Revision: 861581
Node Kind: directory
Schedule: normal
Last Changed Author: tv
Last Changed Rev: 667364
Last Changed Date: 2014-08-25 19:38:47 +0200 (lun., 25 août 2014)
Comment 12 papoteur 2015-08-10 07:07:41 CEST
Created attachment 6920 [details]
Prefix svn info command

C.utf8 instead of C in prefix to svn command didn't help.

Here is a patch which applies a specific prefix to the command svn info, i.e. only:
LANGUAGE=C svn info ...
I get the same behaviour of the command 'svn commit' either in a path without accent or in Téléchargements/mga.
Comment 13 Rémi Verschelde 2015-08-10 09:02:35 CEST
(In reply to papoteur from comment #12)
> Created attachment 6920 [details]
> Prefix svn info command
> 
> C.utf8 instead of C in prefix to svn command didn't help.

What about C.UTF-8, is it the same?
Comment 14 papoteur 2015-08-10 09:57:23 CEST
Hello Akien,
The same:
LC_ALL=C.UTF-8 svn info /home/yves/Téléchargements/mga/firefox-ext-noscript --non-interactive
svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LC_ALL is C.UTF-8
svn: warning: please check that your locale name is correct
svn: E000022: Can't convert string from native encoding to 'UTF-8':
svn: E000022: /home/yves/T?\195?\169l?\195?\169chargements/mga/firefox-ext-noscript
Comment 15 papoteur 2015-10-31 20:58:09 CET
(In reply to papoteur from comment #12)
> Created attachment 6920 [details]
> Prefix svn info command
> 
> C.utf8 instead of C in prefix to svn command didn't help.
> 
> Here is a patch which applies a specific prefix to the command svn info,
> i.e. only:
> LANGUAGE=C svn info ...
> I get the same behaviour of the command 'svn commit' either in a path
> without accent or in Téléchargements/mga.

The patch is committed now.
Papoteur
Comment 16 Marja Van Waes 2016-03-03 16:13:11 CET
(In reply to papoteur from comment #15)

> 
> The patch is committed now.
> Papoteur


Thanks, Yves.

Assuming it got pushed, too, so closing as FIXED.

Feel free to reopen if needed (or if the same fix still needs to be done for Mga5)

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 17 Thierry Vignaud 2016-03-05 23:17:22 CET
I confirm the fix.
Thanks :-)
Comment 18 Thierry Vignaud 2016-03-22 22:47:47 CET
Actually it happens again:

[tv@localhost Téléchargement]$ mgarepo submit gnome-shell
Fetching revision...
error: svn: E000022: Can't convert string from native encoding to 'UTF-8':
svn: E000022: /home/tv/Telechargement/

Source RPM: mgarepo => mgarepo-1.12.0-1.mga6
Resolution: FIXED => (none)
Ever confirmed: 1 => 0
Status: RESOLVED => UNCONFIRMED
Hardware: i586 => All

Comment 19 Mageia Robot 2016-03-24 22:40:03 CET
commit ddf79169973aa14d7ba96deadcf39edd51475363
Author: Papoteur <papoteur@...>
Date:   Thu Mar 24 21:32:44 2016 +0100

    add svn log command in list of command not to prefix with LC_ALL=C (mga#73)
---
 Commit Link:
   http://gitweb.mageia.org/software/build-system/mgarepo/commit/?id=ddf79169973aa14d7ba96deadcf39edd51475363
Comment 20 Thierry Vignaud 2016-03-25 09:25:11 CET
It looks better with this patch indeed :-)
Comment 21 papoteur 2016-03-25 22:38:07 CET
Yes, it's better.
I dealt with svn info and svn checkout commands, but forgotten svn log.
mgarepo log and mgarepo rpmlog was also impacted.
I pushed a new release 1.12.1
Papoteur
Comment 22 Marja Van Waes 2016-04-15 18:43:00 CEST
(In reply to Thierry Vignaud from comment #20)
> It looks better with this patch indeed :-)

(In reply to papoteur from comment #21)
> Yes, it's better.
> I dealt with svn info and svn checkout commands, but forgotten svn log.
> mgarepo log and mgarepo rpmlog was also impacted.
> I pushed a new release 1.12.1
> Papoteur

Thanks, Yves :-)

So now really closing as fixed

Resolution: (none) => FIXED
Status: UNCONFIRMED => RESOLVED

Comment 23 José Jorge 2018-04-06 18:55:37 CEST
Looks like this bug came back : I can't "mgarepo sync -d" if the path contains a folder named "Transferências".

CC: (none) => lists.jjorge
Ever confirmed: 0 => 1
Resolution: FIXED => (none)
Status: RESOLVED => REOPENED

Comment 24 papoteur 2018-04-07 15:17:40 CEST
Hi zézinho,
I just pushed a patch in git repo.
Can you try it?
For me, it's OK, but I have just tested sync command.
The culprit is the svn status command.
To try it
git clone git://git.mageia.org/software/build-system/mgarepo
cd mgarepo
python3 setup.py install
Comment 25 papoteur 2018-04-07 15:18:10 CEST
The last command as root
Marja Van Waes 2018-04-12 16:20:26 CEST

Assignee: bugsquad => yves.brungard_mageia
Keywords: (none) => NEEDINFO

Comment 26 Marja Van Waes 2021-05-26 11:50:44 CEST
Assuming papoteur's last patch fixed the issue zézinho had with the "Transferências" directory in the path, because he never told otherwise in the two years after april 7 2018 and because no one else complained about this issue since then.

Again closing

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED