Skip to content

Commit

Permalink
GitHub Actions: increase git POST size to clone systemd
Browse files Browse the repository at this point in the history
Building `systemd-selinux` fails with:

    ==> Retrieving sources...
      -> Cloning systemd-stable git repo...
    Cloning into bare repository '/startdir/systemd-selinux/systemd-stable'...
      -> Cloning systemd git repo...
    Cloning into bare repository '/startdir/systemd-selinux/systemd'...
    error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
    ==> ERROR: Failure while downloading systemd git repo
        Aborting...

More precisely, `git clone --mirror` fails:

    $ git clone --origin=origin --mirror https://github.com/systemd/systemd --verbose
    Cloning into bare repository 'systemd.git'...
    POST git-upload-pack (169 bytes)
    POST git-upload-pack (chunked)
    error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400

Increase the size of POST buffer to work around this:

    $ git clone --origin=origin --mirror https://github.com/systemd/systemd -c http.postBuffer=536870912 --verbose
    Cloning into bare repository 'systemd.git'...
    POST git-upload-pack (169 bytes)
    POST git-upload-pack (gzip 2502852 to 1211683 bytes)
    remote: Enumerating objects: 956381, done.
    remote: Counting objects: 100% (10445/10445), done.
    remote: Compressing objects: 100% (2150/2150), done.
    ...
  • Loading branch information
fishilico committed Apr 1, 2024
1 parent a342ac9 commit c506b18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
chown -R builduser /startdir /packages /build /logdest && \
sudo -u builduser /startdir/clean.sh && \
sudo -u builduser /startdir/recv_gpg_keys.sh && \
sudo -u builduser git config --global http.postBuffer 536870912 && \
sudo -u builduser /startdir/build_and_install_all.sh && \
rm -rf /startdir/*/src/ /startdir/*/pkg/ && \
pacman --noconfirm -Sc && rm -rf /var/cache/pacman/pkg/* && \
Expand Down

0 comments on commit c506b18

Please sign in to comment.