question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Five files have CRLF formatting issues

See original GitHub issue

I am using git-buildpackage to package Electrum for Debian. This creates branches in Git to hold the pristine tarball, the the upstream source, and the Debian specific directory. As part of the build process the system moves back and forth between these branches. Apparently, it really doesn’t like certain CRLF <-> LF issues in text files. I believe that what is happening is that these fields are being auto-substituted by Git push and pull, which is then causing the verification stage to fail because the files have changed unexpectedly. There are five specific text files that give it hard time:

electrum/gui/kivy/data/fonts/tron/License.txt electrum/gui/kivy/data/fonts/tron/Readme.txt electrum/gui/qml/fonts/PTMono.LICENSE electrum/ripemd.py electrum/wordlist/portuguese.txt

CRLF

I don’t consider myself an expert on this subject, but I think that the attached five files are formatted in a way that would make Git happier. (I had to add .txt to the end of PTMono.LICENSE and ripemd.py to make GitHub happy. The original file name should be restored.)

License.txt portuguese.txt Readme.txt PTMono.LICENSE.txt ripemd.py.txt

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SomberNightcommented, Oct 20, 2022

For future reference, files with CRLF line endings can be listed like this (from https://stackoverflow.com/a/73969):

$ find . -not -type d -exec file "{}" ";" | grep CRLF
./electrum/wordlist/portuguese.txt: ASCII text, with CRLF line terminators
./electrum/gui/qml/fonts/PTMono.LICENSE: Unicode text, UTF-8 (with BOM) text, with CRLF line terminators
./electrum/gui/kivy/data/fonts/tron/License.txt: ASCII text, with CRLF, LF line terminators
./electrum/gui/kivy/data/fonts/tron/Readme.txt: ASCII text, with CRLF, LF line terminators
./electrum/ripemd.py: Python script, ASCII text executable, with CRLF line terminators
0reactions
SomberNightcommented, Oct 20, 2022

Thanks for the PR. I was looking into how to avoid this reoccurring in the future. See https://github.com/spesmilo/electrum/pull/8029

Read more comments on GitHub >

github_iconTop Results From Across the Web

CR/LF Issues and Text Line-endings - Perforce
On UNIX, text file line-endings are terminated with a newline character (ASCII 0x0a, represented by the \n escape sequence in most languages), also...
Read more >
CR LF line endings - understanding and fixing the ... - YouTube
today's video covers the carriage return and line feed line terminators, what they are, and how to fix them. we'll cover some tools...
Read more >
Inconsistent line-length formatting between files with CRLF ...
The formatter splits lines inconsistently when the file has CRLF line endings vs. LF line endings. Specifically, when a line is 100 characters ......
Read more >
Carriage Returns and Line Feeds will ultimately bite you
What's a Carriage and why is it Returning? Carriage Return Line Feed WHAT DOES IT ALL MEAN!?! The paper on a typewriter rides...
Read more >
LF will be replaced by CRLF in git - What is that and is it ...
Formatting and whitespace issues are some of the more frustrating and subtle problems that many developers encounter when collaborating, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found