Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to detect version #797

Closed
ThomasWaldmann opened this issue Dec 24, 2022 · 15 comments
Closed

unable to detect version #797

ThomasWaldmann opened this issue Dec 24, 2022 · 15 comments

Comments

@ThomasWaldmann
Copy link

ThomasWaldmann commented Dec 24, 2022

Did something that was fixed already break again for this?

I have a debian buster vagrant machine that throws the "unable to detect version" now and it used to always work.

tox  # works
fakeroot -u tox  # fails with "unable to detect version"

A debian bullseye vagrant machine with a very similar setup works.

borgbackup/borg#7224 this is the code I used (see Vagrantfile).

BTW: on misc. ubuntu dists this is broken since a longer while.

Traceback from the buster machine:

(borg-env) vagrant@buster:/vagrant/borg/borg$ borg -V
borg 1.2.3
(borg-env) vagrant@buster:/vagrant/borg/borg$ fakeroot -u tox
GLOB sdist-make: /vagrant/borg/borg/setup.py
ERROR: invocation failed (exit code 1), logfile: /vagrant/borg/borg/.tox/log/GLOB-0.log
================================================================================= log start ==================================================================================
Detected OpenSSL [via pkg-config]
Detected and preferring liblz4 [via pkg-config]
Detected and preferring libzstd [via pkg-config]
Using bundled xxhash
Traceback (most recent call last):
  File "/vagrant/borg/borg/setup.py", line 263, in <module>
    setup(
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 109, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 462, in __init__
    _Distribution.__init__(
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
    self.finalize_options()
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 886, in finalize_options
    ep(self)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 907, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/integration.py", line 75, in version_keyword
    _assign_version(dist, config)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
    _version_missing(config)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for /vagrant/borg/borg.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

================================================================================== log end ===================================================================================
ERROR: FAIL could not package project - v = InvocationError('/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/bin/python3.9 setup.py sdist --formats=zip --dist-dir .tox/dist', 1)
@RonnyPfannschmidt
Copy link
Contributor

Build output with SETUPTOOLS_SCM_DEBUG seems required

It's possible related to a git repo user trust mitigation (where git intentionally stops working when uids missmatch)

@ThomasWaldmann
Copy link
Author

(borg-env) vagrant@buster:/vagrant/borg/borg$ export SETUPTOOLS_SCM_DEBUG=1
(borg-env) vagrant@buster:/vagrant/borg/borg$ fakeroot -u tox
GLOB sdist-make: /vagrant/borg/borg/setup.py
ERROR: invocation failed (exit code 1), logfile: /vagrant/borg/borg/.tox/log/GLOB-0.log
================================================================================= log start ==================================================================================
Detected OpenSSL [via pkg-config]
Detected and preferring liblz4 [via pkg-config]
Detected and preferring libzstd [via pkg-config]
Using bundled xxhash
finalize hook {'name': 'borgbackup', 'version': None, 'author': 'The Borg Collective (see AUTHORS file)', 'author_email': 'borgbackup@python.org', 'maintainer': None, 'maintainer_email': None, 'url': 'https://borgbackup.readthedocs.io/', 'license': 'BSD', 'description': 'Deduplicated, encrypted, authenticated and compressed backups', 'long_description': '\nWhat is BorgBackup?\n-------------------\n\nBorgBackup (short: Borg) is a deduplicating backup program.\nOptionally, it supports compression and authenticated encryption.\n\nThe main goal of Borg is to provide an efficient and secure way to backup data.\nThe data deduplication technique used makes Borg suitable for daily backups\nsince only changes are stored.\nThe authenticated encryption technique makes it suitable for backups to not\nfully trusted targets.\n\nSee the `installation manual`_ or, if you have already\ndownloaded Borg, ``docs/installation.rst`` to get started with Borg.\nThere is also an `offline documentation`_ available, in multiple formats.\n\n.. _installation manual: https://borgbackup.readthedocs.org/en/stable/installation.html\n.. _offline documentation: https://readthedocs.org/projects/borgbackup/downloads\n\nMain features\n~~~~~~~~~~~~~\n\n**Space efficient storage**\n  Deduplication based on content-defined chunking is used to reduce the number\n  of bytes stored: each file is split into a number of variable length chunks\n  and only chunks that have never been seen before are added to the repository.\n\n  A chunk is considered duplicate if its id_hash value is identical.\n  A cryptographically strong hash or MAC function is used as id_hash, e.g.\n  (hmac-)sha256.\n\n  To deduplicate, all the chunks in the same repository are considered, no\n  matter whether they come from different machines, from previous backups,\n  from the same backup or even from the same single file.\n\n  Compared to other deduplication approaches, this method does NOT depend on:\n\n  * file/directory names staying the same: So you can move your stuff around\n    without killing the deduplication, even between machines sharing a repo.\n\n  * complete files or time stamps staying the same: If a big file changes a\n    little, only a few new chunks need to be stored - this is great for VMs or\n    raw disks.\n\n  * The absolute position of a data chunk inside a file: Stuff may get shifted\n    and will still be found by the deduplication algorithm.\n\n**Speed**\n  * performance-critical code (chunking, compression, encryption) is\n    implemented in C/Cython\n  * local caching of files/chunks index data\n  * quick detection of unmodified files\n\n**Data encryption**\n    All data can be protected using 256-bit AES encryption, data integrity and\n    authenticity is verified using HMAC-SHA256. Data is encrypted clientside.\n\n**Obfuscation**\n    Optionally, borg can actively obfuscate e.g. the size of files / chunks to\n    make fingerprinting attacks more difficult.\n\n**Compression**\n    All data can be optionally compressed:\n\n    * lz4 (super fast, low compression)\n    * zstd (wide range from high speed and low compression to high compression\n      and lower speed)\n    * zlib (medium speed and compression)\n    * lzma (low speed, high compression)\n\n**Off-site backups**\n    Borg can store data on any remote host accessible over SSH.  If Borg is\n    installed on the remote host, big performance gains can be achieved\n    compared to using a network filesystem (sshfs, nfs, ...).\n\n**Backups mountable as filesystems**\n    Backup archives are mountable as userspace filesystems for easy interactive\n    backup examination and restores (e.g. by using a regular file manager).\n\n**Easy installation on multiple platforms**\n    We offer single-file binaries that do not require installing anything -\n    you can just run them on these platforms:\n\n    * Linux\n    * Mac OS X\n    * FreeBSD\n    * OpenBSD and NetBSD (no xattrs/ACLs support or binaries yet)\n    * Cygwin (experimental, no binaries yet)\n    * Linux Subsystem of Windows 10 (experimental)\n\n**Free and Open Source Software**\n  * security and functionality can be audited independently\n  * licensed under the BSD (3-clause) license, see `License`_ for the\n    complete license\n\nEasy to use\n~~~~~~~~~~~\n\nInitialize a new backup repository (see ``borg init --help`` for encryption options)::\n\n    $ borg init -e repokey /path/to/repo\n\nCreate a backup archive::\n\n    $ borg create /path/to/repo::Saturday1 ~/Documents\n\nNow doing another backup, just to show off the great deduplication::\n\n    $ borg create -v --stats /path/to/repo::Saturday2 ~/Documents\n    -----------------------------------------------------------------------------\n    Archive name: Saturday2\n    Archive fingerprint: 622b7c53c...\n    Time (start): Sat, 2016-02-27 14:48:13\n    Time (end):   Sat, 2016-02-27 14:48:14\n    Duration: 0.88 seconds\n    Number of files: 163\n    -----------------------------------------------------------------------------\n                   Original size      Compressed size    Deduplicated size\n    This archive:        6.85 MB              6.85 MB             30.79 kB  <-- !\n    All archives:       13.69 MB             13.71 MB              6.88 MB\n\n                   Unique chunks         Total chunks\n    Chunk index:             167                  330\n    -----------------------------------------------------------------------------\n\n\nFor a graphical frontend refer to our complementary project `BorgWeb <https://borgweb.readthedocs.io/>`_.\n\nHelping, Donations and Bounties, becoming a Patron\n--------------------------------------------------\n\nYour help is always welcome!\n\nSpread the word, give feedback, help with documentation, testing or development.\n\nYou can also give monetary support to the project, see there for details:\n\nhttps://www.borgbackup.org/support/fund.html\n\nLinks\n-----\n\n* `Main Web Site <https://borgbackup.readthedocs.org/>`_\n* `Releases <https://github.com/borgbackup/borg/releases>`_,\n  `PyPI packages <https://pypi.python.org/pypi/borgbackup>`_ and\n  `ChangeLog <https://github.com/borgbackup/borg/blob/master/docs/changes.rst>`_\n* `Offline Documentation <https://readthedocs.org/projects/borgbackup/downloads>`_\n* `GitHub <https://github.com/borgbackup/borg>`_ and\n  `Issue Tracker <https://github.com/borgbackup/borg/issues>`_.\n* `Web-Chat (IRC) <https://web.libera.chat/#borgbackup>`_ and\n  `Mailing List <https://mail.python.org/mailman/listinfo/borgbackup>`_\n* `License <https://borgbackup.readthedocs.org/en/stable/authors.html#license>`_\n* `Security contact <https://borgbackup.readthedocs.io/en/latest/support.html#security-contact>`_\n\nCompatibility notes\n-------------------\n\nEXPECT THAT WE WILL BREAK COMPATIBILITY REPEATEDLY WHEN MAJOR RELEASE NUMBER\nCHANGES (like when going from 0.x.y to 1.0.0 or from 1.x.y to 2.0.0).\n\nNOT RELEASED DEVELOPMENT VERSIONS HAVE UNKNOWN COMPATIBILITY PROPERTIES.\n\nTHIS IS SOFTWARE IN DEVELOPMENT, DECIDE YOURSELF WHETHER IT FITS YOUR NEEDS.\n\nSecurity issues should be reported to the `Security contact`_ (or\nsee ``docs/support.rst`` in the source distribution).\n\n\n', 'keywords': None, 'platforms': ['Linux', 'MacOS X', 'FreeBSD', 'OpenBSD', 'NetBSD'], 'classifiers': ['Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: BSD :: FreeBSD', 'Operating System :: POSIX :: BSD :: OpenBSD', 'Operating System :: POSIX :: BSD :: NetBSD', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Topic :: Security :: Cryptography', 'Topic :: System :: Archiving :: Backup'], 'download_url': None, 'provides': None, 'requires': None, 'obsoletes': None}
pyproject.toml does not contain a tool.setuptools_scm section
version keyword {'name': 'borgbackup', 'version': None, 'author': 'The Borg Collective (see AUTHORS file)', 'author_email': 'borgbackup@python.org', 'maintainer': None, 'maintainer_email': None, 'url': 'https://borgbackup.readthedocs.io/', 'license': 'BSD', 'description': 'Deduplicated, encrypted, authenticated and compressed backups', 'long_description': '\nWhat is BorgBackup?\n-------------------\n\nBorgBackup (short: Borg) is a deduplicating backup program.\nOptionally, it supports compression and authenticated encryption.\n\nThe main goal of Borg is to provide an efficient and secure way to backup data.\nThe data deduplication technique used makes Borg suitable for daily backups\nsince only changes are stored.\nThe authenticated encryption technique makes it suitable for backups to not\nfully trusted targets.\n\nSee the `installation manual`_ or, if you have already\ndownloaded Borg, ``docs/installation.rst`` to get started with Borg.\nThere is also an `offline documentation`_ available, in multiple formats.\n\n.. _installation manual: https://borgbackup.readthedocs.org/en/stable/installation.html\n.. _offline documentation: https://readthedocs.org/projects/borgbackup/downloads\n\nMain features\n~~~~~~~~~~~~~\n\n**Space efficient storage**\n  Deduplication based on content-defined chunking is used to reduce the number\n  of bytes stored: each file is split into a number of variable length chunks\n  and only chunks that have never been seen before are added to the repository.\n\n  A chunk is considered duplicate if its id_hash value is identical.\n  A cryptographically strong hash or MAC function is used as id_hash, e.g.\n  (hmac-)sha256.\n\n  To deduplicate, all the chunks in the same repository are considered, no\n  matter whether they come from different machines, from previous backups,\n  from the same backup or even from the same single file.\n\n  Compared to other deduplication approaches, this method does NOT depend on:\n\n  * file/directory names staying the same: So you can move your stuff around\n    without killing the deduplication, even between machines sharing a repo.\n\n  * complete files or time stamps staying the same: If a big file changes a\n    little, only a few new chunks need to be stored - this is great for VMs or\n    raw disks.\n\n  * The absolute position of a data chunk inside a file: Stuff may get shifted\n    and will still be found by the deduplication algorithm.\n\n**Speed**\n  * performance-critical code (chunking, compression, encryption) is\n    implemented in C/Cython\n  * local caching of files/chunks index data\n  * quick detection of unmodified files\n\n**Data encryption**\n    All data can be protected using 256-bit AES encryption, data integrity and\n    authenticity is verified using HMAC-SHA256. Data is encrypted clientside.\n\n**Obfuscation**\n    Optionally, borg can actively obfuscate e.g. the size of files / chunks to\n    make fingerprinting attacks more difficult.\n\n**Compression**\n    All data can be optionally compressed:\n\n    * lz4 (super fast, low compression)\n    * zstd (wide range from high speed and low compression to high compression\n      and lower speed)\n    * zlib (medium speed and compression)\n    * lzma (low speed, high compression)\n\n**Off-site backups**\n    Borg can store data on any remote host accessible over SSH.  If Borg is\n    installed on the remote host, big performance gains can be achieved\n    compared to using a network filesystem (sshfs, nfs, ...).\n\n**Backups mountable as filesystems**\n    Backup archives are mountable as userspace filesystems for easy interactive\n    backup examination and restores (e.g. by using a regular file manager).\n\n**Easy installation on multiple platforms**\n    We offer single-file binaries that do not require installing anything -\n    you can just run them on these platforms:\n\n    * Linux\n    * Mac OS X\n    * FreeBSD\n    * OpenBSD and NetBSD (no xattrs/ACLs support or binaries yet)\n    * Cygwin (experimental, no binaries yet)\n    * Linux Subsystem of Windows 10 (experimental)\n\n**Free and Open Source Software**\n  * security and functionality can be audited independently\n  * licensed under the BSD (3-clause) license, see `License`_ for the\n    complete license\n\nEasy to use\n~~~~~~~~~~~\n\nInitialize a new backup repository (see ``borg init --help`` for encryption options)::\n\n    $ borg init -e repokey /path/to/repo\n\nCreate a backup archive::\n\n    $ borg create /path/to/repo::Saturday1 ~/Documents\n\nNow doing another backup, just to show off the great deduplication::\n\n    $ borg create -v --stats /path/to/repo::Saturday2 ~/Documents\n    -----------------------------------------------------------------------------\n    Archive name: Saturday2\n    Archive fingerprint: 622b7c53c...\n    Time (start): Sat, 2016-02-27 14:48:13\n    Time (end):   Sat, 2016-02-27 14:48:14\n    Duration: 0.88 seconds\n    Number of files: 163\n    -----------------------------------------------------------------------------\n                   Original size      Compressed size    Deduplicated size\n    This archive:        6.85 MB              6.85 MB             30.79 kB  <-- !\n    All archives:       13.69 MB             13.71 MB              6.88 MB\n\n                   Unique chunks         Total chunks\n    Chunk index:             167                  330\n    -----------------------------------------------------------------------------\n\n\nFor a graphical frontend refer to our complementary project `BorgWeb <https://borgweb.readthedocs.io/>`_.\n\nHelping, Donations and Bounties, becoming a Patron\n--------------------------------------------------\n\nYour help is always welcome!\n\nSpread the word, give feedback, help with documentation, testing or development.\n\nYou can also give monetary support to the project, see there for details:\n\nhttps://www.borgbackup.org/support/fund.html\n\nLinks\n-----\n\n* `Main Web Site <https://borgbackup.readthedocs.org/>`_\n* `Releases <https://github.com/borgbackup/borg/releases>`_,\n  `PyPI packages <https://pypi.python.org/pypi/borgbackup>`_ and\n  `ChangeLog <https://github.com/borgbackup/borg/blob/master/docs/changes.rst>`_\n* `Offline Documentation <https://readthedocs.org/projects/borgbackup/downloads>`_\n* `GitHub <https://github.com/borgbackup/borg>`_ and\n  `Issue Tracker <https://github.com/borgbackup/borg/issues>`_.\n* `Web-Chat (IRC) <https://web.libera.chat/#borgbackup>`_ and\n  `Mailing List <https://mail.python.org/mailman/listinfo/borgbackup>`_\n* `License <https://borgbackup.readthedocs.org/en/stable/authors.html#license>`_\n* `Security contact <https://borgbackup.readthedocs.io/en/latest/support.html#security-contact>`_\n\nCompatibility notes\n-------------------\n\nEXPECT THAT WE WILL BREAK COMPATIBILITY REPEATEDLY WHEN MAJOR RELEASE NUMBER\nCHANGES (like when going from 0.x.y to 1.0.0 or from 1.x.y to 2.0.0).\n\nNOT RELEASED DEVELOPMENT VERSIONS HAVE UNKNOWN COMPATIBILITY PROPERTIES.\n\nTHIS IS SOFTWARE IN DEVELOPMENT, DECIDE YOURSELF WHETHER IT FITS YOUR NEEDS.\n\nSecurity issues should be reported to the `Security contact`_ (or\nsee ``docs/support.rst`` in the source distribution).\n\n\n', 'keywords': None, 'platforms': ['Linux', 'MacOS X', 'FreeBSD', 'OpenBSD', 'NetBSD'], 'classifiers': ['Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: BSD License', 'Operating System :: POSIX :: BSD :: FreeBSD', 'Operating System :: POSIX :: BSD :: OpenBSD', 'Operating System :: POSIX :: BSD :: NetBSD', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Topic :: Security :: Cryptography', 'Topic :: System :: Archiving :: Backup'], 'download_url': None, 'provides': None, 'requires': None, 'obsoletes': None}
abs root {'root': '.', 'relative_to': None}
root '/vagrant/borg/borg'
relative_to None
dist name: borgbackup
version_from_ep setuptools_scm.parse_scm /vagrant/borg/borg
looking for ep setuptools_scm.parse_scm /vagrant/borg/borg
found ep EntryPoint(name='.git', value='setuptools_scm.git:parse', group='setuptools_scm.parse_scm') in /vagrant/borg/borg
cmd 'git rev-parse --show-prefix'
 in /vagrant/borg/borg
err b"fatal: detected dubious ownership in repository at '/vagrant/borg/borg'\nTo add an exception for this directory, call:\n\n\tgit config --global --add safe.directory /vagrant/borg/borg\n"
ret 128
EntryPoint(name='.git', value='setuptools_scm.git:parse', group='setuptools_scm.parse_scm') None
version_from_ep setuptools_scm.parse_scm_fallback /vagrant/borg/borg
looking for ep setuptools_scm.parse_scm_fallback /vagrant/borg/borg
found ep EntryPoint(name='pyproject.toml', value='setuptools_scm.hacks:fallback_version', group='setuptools_scm.parse_scm_fallback') in /vagrant/borg/borg
EntryPoint(name='pyproject.toml', value='setuptools_scm.hacks:fallback_version', group='setuptools_scm.parse_scm_fallback') None
found ep EntryPoint(name='setup.py', value='setuptools_scm.hacks:fallback_version', group='setuptools_scm.parse_scm_fallback') in /vagrant/borg/borg
EntryPoint(name='setup.py', value='setuptools_scm.hacks:fallback_version', group='setuptools_scm.parse_scm_fallback') None
Traceback (most recent call last):
  File "/vagrant/borg/borg/setup.py", line 263, in <module>
    setup(
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 109, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 462, in __init__
    _Distribution.__init__(
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
    self.finalize_options()
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 886, in finalize_options
    ep(self)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 907, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/integration.py", line 75, in version_keyword
    _assign_version(dist, config)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
    _version_missing(config)
  File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for /vagrant/borg/borg.

@ThomasWaldmann
Copy link
Author

hah, "dubious ownership"...

@RonnyPfannschmidt
Copy link
Contributor

That one is extra fun, i recommend configuration of git so that it can work

@ThomasWaldmann
Copy link
Author

ThomasWaldmann commented Dec 24, 2022

git config --global --add safe.directory /vagrant/borg/borg

That fixed it on the buster machine.

Now I have to find out why it does not happen on bullseye (or stretch), which both "just work".

@ThomasWaldmann
Copy link
Author

cmd 'git rev-parse --show-prefix'
err b"fatal: detected dubious ownership in repository at '/vagrant/borg/borg'\nTo add an exception for this directory, call:\n\n\tgit config --global --add safe.directory
ret 128

Could setuptools_scm fail earlier and output the msg from git?

@RonnyPfannschmidt
Copy link
Contributor

That's planned, but I'm currently a bit stretched

@RonnyPfannschmidt
Copy link
Contributor

@ThomasWaldmann can we verify if this works with the current switch to use git - -git-dir

@ThomasWaldmann
Copy link
Author

If you tell me what to do precisely, sure. I could not find docs about this.

@RonnyPfannschmidt
Copy link
Contributor

@ThomasWaldmann with the current release it should work out of the box, if it doesn't I'll have to dig way deeper

@ThomasWaldmann
Copy link
Author

So you mean I shall retry with setuptools_scm 7.1.0 and without the fix/workaround from #797 (comment) ?

@RonnyPfannschmidt
Copy link
Contributor

Yes

@RonnyPfannschmidt
Copy link
Contributor

is this still a issue?

@ThomasWaldmann
Copy link
Author

I retried with setuptools_scm 7.1.0, without the workaround and it just worked. So guess this can be closed.

@ThomasWaldmann
Copy link
Author

Thanks for fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants