flatpak-builder icon indicating copy to clipboard operation
flatpak-builder copied to clipboard

[Bug]: fails to get git submodule

Open solopasha opened this issue 2 years ago • 3 comments

Checklist

  • [X] I agree to follow the Code of Conduct that this project adheres to.
  • [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

flatpak-builder version

1.3.3

Flatpak version

1.15.4

How to reproduce

  • create test.yml, try to build

test.yml

id: test
runtime: org.freedesktop.Platform
runtime-version: "22.08"
sdk: org.freedesktop.Sdk

modules:
  - name: test
    buildsystem: cmake-ninja
    builddir: true
    sources:
      - type: git
        url: https://github.com/TDesktop-x64/tdesktop.git
        commit: b5a138bfbe8d26d33ca7df1c6ed404ecfbecea02
        tag: v1.0.81

Expected Behavior

It should pull everything just like it would with git clone --recursive https://github.com/TDesktop-x64/tdesktop.git

Actual Behavior

❯ flatpak-builder build-dir test.yml                  
Downloading sources
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /home/solopasha/flatpak/test/.flatpak-builder/git/https_github.com_TDesktop-x64_tdesktop.git-4MYK21/
Fetching git repo https://github.com/TDesktop-x64/tdesktop.git, ref refs/tags/v1.0.81
remote: Enumerating objects: 3917, done.
remote: Counting objects: 100% (3917/3917), done.
remote: Compressing objects: 100% (3801/3801), done.
warning: object 92fbee05c936adf150b9f4f521cd19477fa28101: gitmodulesParse: could not parse gitmodules blob
remote: Total 3917 (delta 219), reused 2790 (delta 104), pack-reused 0
Receiving objects: 100% (3917/3917), 16.94 MiB | 3.34 MiB/s, done.
Resolving deltas: 100% (219/219), done.
From https://github.com/TDesktop-x64/tdesktop
 * [new tag]         v1.0.81    -> v1.0.81
Failed to download sources: module test: Key file contains line “[submodule "Telegram/ThirdParty/libtgvoip"]” which is not a key-value pair, group, or comment

Additional Information

No response

solopasha avatar Mar 29 '23 14:03 solopasha

Did this work in 1.2.x?

TingPing avatar Mar 29 '23 16:03 TingPing

Nope, errors out with the same message

solopasha avatar Mar 29 '23 17:03 solopasha

this case is fixed in https://github.com/TDesktop-x64/tdesktop/commit/57c01bbfb18ce0a63fe86d7e998f4a9ad7356915. Seems like flatpak-builder doesn't play well with Unicode text, UTF-8 (with BOM) text

solopasha avatar Apr 25 '23 11:04 solopasha