autopkgtest failure in oracular

Bug #2067942 reported by Mitchell Dzurick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fcgiwrap (Debian)
Fix Released
Unknown
fcgiwrap (Ubuntu)
Fix Released
High
Mitchell Dzurick

Bug Description

fcgiwrap has been failing autopkgtest in proposed - https://autopkgtest.ubuntu.com/packages/fcgiwrap/oracular/amd64

Most likely related to the git upgrade. Can be reproduced in an LXC container easily:

$ lxc launch ubuntu-daily:oracular o
$ lxc shell o
# wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/fcgiwrap/1.1.0-14build1/fcgiwrap_1.1.0-14build1.dsc
# wget https://launchpad.net/ubuntu/+archive/primary/+files/fcgiwrap_1.1.0-14build1_amd64.deb
# wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/fcgiwrap/1.1.0-14build1/fcgiwrap_1.1.0.orig.tar.xz
# wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/fcgiwrap/1.1.0-14build1/fcgiwrap_1.1.0-14build1.debian.tar.xz
# cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF
# apt update -y
# apt install git -t oracular-proposed
# apt install fcgiwrap
# autopkgtest -B ./fcgiwrap_1.1.0-14build1_amd64.deb ./fcgiwrap_1.1.0-14build1.dsc -- null
autopkgtest [19:13:19]: test git-http-backend: [-----------------------
+ cd /tmp/autopkgtest.LbOXBv/autopkgtest_tmp
+ export GIT_AUTHOR_NAME=root
+ export GIT_AUTHOR_EMAIL=root@localhost
+ export GIT_AUTHOR_DATE=@1234567890 +0000
+ export GIT_COMMITTER_NAME=root
+ export GIT_COMMITTER_EMAIL=root@localhost
+ export GIT_COMMITTER_DATE=@1234567890 +0000
+ git init test1
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 /tmp/autopkgtest.LbOXBv/autopkgtest_tmp/test1/.git/
+ git -C test1 commit --allow-empty -m test
[master (root-commit) 0f8c7c0] test
+ tee /etc/nginx/sites-available/default
server {
        listen 80;

        location / {
                fastcgi_pass unix:/run/fcgiwrap.socket;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
                fastcgi_param GIT_PROJECT_ROOT "/tmp/autopkgtest.LbOXBv/autopkgtest_tmp";
                fastcgi_param GIT_HTTP_EXPORT_ALL "";
                fastcgi_param PATH_INFO $uri;
                fastcgi_param NO_BUFFERING "";
                fastcgi_buffering off;
                gzip off;
        }
}
+ systemctl restart nginx
+ git clone http://localhost/test1 test2
Cloning into 'test2'...
fatal: unable to access 'http://localhost/test1/': The requested URL returned error: 500
autopkgtest [19:13:19]: test git-http-backend: -----------------------]
autopkgtest [19:13:19]: test git-http-backend: - - - - - - - - - - results - - - - - - - - - -
git-http-backend FAIL non-zero exit status 128

Also related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072394

Related branches

description: updated
description: updated
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Running the autopkgtest commands manually in an LXC container:

```
AUTOPKGTEST_TMP="/tmp/autopkgtest.mitch/autopkgtest_tmp"
rm -rf "$AUTOPKGTEST_TMP"
mkdir -p "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"
export GIT_AUTHOR_NAME=root
export GIT_AUTHOR_EMAIL=root@localhost
export GIT_AUTHOR_DATE=@1234567890 +0000
export GIT_COMMITTER_NAME=root
export GIT_COMMITTER_EMAIL=root@localhost
export GIT_COMMITTER_DATE=@1234567890 +0000
git init test1
git -C test1 commit --allow-empty -m test

tee /etc/nginx/sites-available/default <<EOF
server {
        listen 80;

        location / {
                fastcgi_pass unix:/run/fcgiwrap.socket;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
                fastcgi_param GIT_PROJECT_ROOT "$AUTOPKGTEST_TMP";
                fastcgi_param GIT_HTTP_EXPORT_ALL "";
                fastcgi_param PATH_INFO \$uri;
                fastcgi_param NO_BUFFERING "";
                fastcgi_buffering off;
                gzip off;
        }
}
EOF
systemctl restart nginx
git clone http://localhost/test1 test2
```

I see:
# cat /var/log/nginx/error.log
2024/06/04 00:23:09 [error] 14300#14300: *1 FastCGI sent in stderr: "fatal: detected dubious ownership in repository at '/tmp/autopkgtest.mitch/autopkgtest_tmp/test1/.git'
To add an exception for this directory, call:

        git config --global --add safe.directory /tmp/autopkgtest.mitch/autopkgtest_tmp/test1/.git" while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /test1/info/refs?service=git-upload-pack HTTP/1.1", upstream: "fastcgi://unix:/run/fcgiwrap.socket:", host: "localhost"

Changed in fcgiwrap (Debian):
status: Unknown → New
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

I tried to upload a fix for this one, thanks!

tags: added: block-proposed
Changed in fcgiwrap (Ubuntu):
assignee: nobody → Mitchell Dzurick (mitchdz)
status: New → Triaged
importance: Undecided → High
tags: removed: block-proposed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fcgiwrap - 1.1.0-14ubuntu2

---------------
fcgiwrap (1.1.0-14ubuntu2) oracular; urgency=medium

  * d/t/git-http-backend: make www-data own $AUTOPKGTEST_TMP/test1/.git
    git introduced more aggressive security checking, so the dep8 test needs
    to explicitly change ownership of the new git directory.
    (LP: #2067942, Closes: #1072394)
  * d/t/git-http-backend: remove `git config --global --add safe.directory
    test1/.git` as it is not necessary for the dep8 test

 -- Mitchell Dzurick <email address hidden> Tue, 04 Jun 2024 19:57:31 +0200

Changed in fcgiwrap (Ubuntu):
status: Triaged → Fix Released
Changed in fcgiwrap (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.