Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936124 - sci-electronics/pulseview-0.4.2-r1:0 emerge fails while trying to access my private git repository!
Summary: sci-electronics/pulseview-0.4.2-r1:0 emerge fails while trying to access my p...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-15 19:30 UTC by Marius Dinu
Modified: 2024-07-23 15:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (sci-electronics:pulseview-0.4.2-r1:20240715-175505.log,8.35 KB, text/x-log)
2024-07-15 19:31 UTC, Marius Dinu
Details
emerge --info (emerge-info-x86.txt,7.30 KB, text/plain)
2024-07-15 19:32 UTC, Marius Dinu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Dinu 2024-07-15 19:30:15 UTC
On my system, emerge sci-electronics/pulseview-0.4.2-r1:0 fails with this error:

-- Performing Test HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS
-- Performing Test HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS - Success
CMake Error: File //mnt/Work/Files/linux.git/.git/worktrees/root/packed-refs does not exist.
CMake Error at /var/tmp/portage/sci-electronics/pulseview-0.4.2-r1/work/pulseview-0.4.2_build/CMakeFiles/git-data/grabRef.cmake:27 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMake/GetGitRevisionDescription.cmake:77 (include)
  CMake/GetGitRevisionDescription.cmake:87 (get_git_head_revision)
  CMakeLists.txt:202 (git_describe)

//mnt/Work/Files/linux.git is a git repo where I keep my gentoo configuration files (mostly /etc files, not a portage repo!). The root mount is a worktree of that.

This is not just a bug, but an invasion of privacy too.

Reproducible: Always

Steps to Reproduce:
(I didn't test these steps, but they reflect how my system is set up.)

It may work by simply creating "/.git" file (not dir!) with this contents:
gitdir: /some/private/dir

If it doesn't:

1. Init a git repo in a private location such as "/mnt/something...".

2. Commit some config files from /etc to it, including the path starting with "etc/"

3. Make a new branch.

4. Checkout a worktree of that branch in a new location. Git will not allow creating a worktree in an existing dir such as root (/), so the worktree must be manually moved.

5. Move the worktree from it's checkout location to the root of Gentoo system. This means:
5a. Move the ".git" file from the worktree original dir to / (root dir) and check it's contents to match the git repo path (fix it in case it's a relative path).
5b. In the git repo, edit ".git/worktrees/<name>/gitdir" to match "/" (root dir of Gentoo).

6. There shouldn't be any "packed-refs" file in ".git/worktrees/<name>/".

7. Try to emerge pulseview.
Actual Results:  
Error accessing the private git repo.

Expected Results:  
Not try to read my private files!!!
Comment 1 Marius Dinu 2024-07-15 19:31:02 UTC
Created attachment 897743 [details]
build log
Comment 2 Marius Dinu 2024-07-15 19:32:41 UTC
Created attachment 897744 [details]
emerge --info
Comment 3 Mike Gilbert gentoo-dev 2024-07-23 15:45:05 UTC
It seems like you have really gone out of your way to create this situation.

Please do not put git artifacts in /.