Vít Ondruch kirjoitti 29.9.2021 klo 13.56:
Dne 27. 09. 21 v 19:38 Otto Urpelainen napsal(a):
> Hello Ruby SIG,
>
> Jekyll 4.2.1 was recently released [1]. Consequently, I am working on
> updating the Fedora rubygem-jekyll package. Even though the update is
> a small bugfix release, various parts of the specfile that worked for
> 4.2.0 now fail.
Could you please be more specific, e.g. provide us with build.log or so?
Sure, here are truncated logs.
After bumping Version in the specfile from 4.2.0 to 4.2.1 and
downloading the new sources, a patch fails to apply due to "different
line endings":
$ fedpkg mockbuild
...lots of output...
+ echo 'Patch #0
(0000-jekyll-commands-remove-bundle-install-step-for-new.patch):'
Patch #0 (0000-jekyll-commands-remove-bundle-install-step-for-new.patch):
+ /usr/bin/patch --no-backup-if-mismatch -f -p1 --fuzz=0
patching file lib/jekyll/commands/new.rb
Hunk #1 FAILED at 13 (different line endings).
Hunk #2 FAILED at 132 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file
lib/jekyll/commands/new.rb.rej
patching file test/test_new_command.rb
error: Bad exit status from /var/tmp/rpm-tmp.vA9u1a (%prep)
...more lines about terminating the build...
Running 'dos2unix lib/jekyll/commands/new.rb' fixes this. Second run
after adding that fix to the specfile goes like this:
$ fedpkg mockbuild
...lots of output...
+ help2man -N -s1 -o
/builddir/build/BUILDROOT/rubygem-jekyll-4.2.1-1.fc36.x86_64/usr/share/man/man1/jekyll.1
/builddir/build/BUILDROOT/rubygem-jekyll-4.2.1-1.fc36.x86_64/usr/share/gems/gems/jekyll-4.2.1/exe/jekyll
help2man: can't get `--help' info from
/builddir/build/BUILDROOT/rubygem-jekyll-4.2.1-1.fc36.x86_64/usr/share/gems/gems/jekyll-4.2.1/exe/jekyll
Try `--no-discard-stderr' if option outputs to stderr
error: Bad exit status from /var/tmp/rpm-tmp.G6uvuX (%install)
Bad exit status from /var/tmp/rpm-tmp.G6uvuX (%install)
...more lines about terminating the build...
That does not really tell what was wrong, but trying to run the
'exe/jekyll --help' script from the unpacked gem reveals that the
shebang is corrupted by the additional CR:
$ exe/jekyll --help
/usr/bin/env: ‘ruby\r’: No such file or directory
Adding 'dos2unix exe/jekyll' to the specfile fixes this. After that,
'fedpkg mockbuild' runs to completion.
> I have determined the reason for those changes is that the files
> inside jekyll 4.2.1 gem have CRLF line endings.
This seems strange. Was there really some change like this in upstream?
Then it should be possible to understand the reason for such change from
Git log, but I can't find such change in Git neither I can see CRLF in
e.g.
https://raw.githubusercontent.com/jekyll/jekyll/master/lib/jekyll.rb.
Therefore I suspect that this might be release engineering issue.
Somebody released the gem from Windows where it previously was released
from Linux. This is something upstream should address.
No, nothing like that shows up in the Git history. However, Git can be
configured to convert line endings on checkout and commit. It is also
may assumption that earlier releases were created from a Git checkout
configured for LF line endings, but this new one used CRLF (and
presumably was a Windows machine, then).
The reason why I did not contact upstream yet was that I was not able to
find any specification or best practices saying that gems should be
released in one form or another. I guess I can write to upstream and
notify them that this change has caused trouble, maybe it was just an
accident and they want to revert to avoid any further trouble:
https://github.com/jekyll/jekyll/issues/8826
Otto