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

libgit2: 0.27.8 -> 0.28.4 #72544

Merged
merged 3 commits into from Feb 10, 2020
Merged

libgit2: 0.27.8 -> 0.28.4 #72544

merged 3 commits into from Feb 10, 2020

Conversation

r-ryantm
Copy link
Contributor

@r-ryantm r-ryantm commented Nov 2, 2019

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/libgit2/versions.

meta.description for libgit2 is: '"The Git linkable library"'.

meta.homepage for libgit2 is: '"https://libgit2.github.com/"

Release on GitHub

Compare changes on GitHub

Checks done (click to expand)
Rebuild report (if merged into master) (click to expand)

4841 total rebuild path(s)

1592 package rebuild(s)

1564 x86_64-linux rebuild(s)
1398 i686-linux rebuild(s)
485 x86_64-darwin rebuild(s)
1394 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
AgdaSheaves
AgdaStdlib
Sylk
TotalParserCombinators
abiword
adapta-gtk-theme
adoptopenjdk-icedtea-web
aesop
afew
agdaBase
agdaIowaStdlib
agdaPrelude
ahoviewer
akregator
alacritty
alarm-clock-applet
almanah
alot
amarok
amarok-kf5
amber
amber-theme
amp
appeditor
appimage-run
apvlv
arandr
aravis
arc-theme
areca
ario
arx-libertatis
asc-key-to-qr-code-gif
asciidoc-full
asciidoc-full-with-plugins
astroid
asymptote
atom
atom-beta
auctex
audacious
audio-recorder
autokey
autotrace
avocode
awesome
awesome-4-0
awf
azureus
balsa

Instructions to test this update (click to expand)

Either download from Cachix:

nix-store -r /nix/store/gjg94izqhfk5nw1czkbzw519hmhipzli-libgit2-0.28.3 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)

Or, build yourself:

nix-build -A libgit2 https://github.com/r-ryantm/nixpkgs/archive/a014977f9fec49b479f3eb88f9244b0da09d02c1.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:

ls -la /nix/store/gjg94izqhfk5nw1czkbzw519hmhipzli-libgit2-0.28.3
ls -la /nix/store/gjg94izqhfk5nw1czkbzw519hmhipzli-libgit2-0.28.3/bin

@jtojnar
Copy link
Contributor

jtojnar commented Jan 6, 2020

@GrahamcOfBorg build libgit2-glib

@disassembler disassembler modified the milestones: 20.03, 20.09 Feb 5, 2020
@jtojnar jtojnar self-assigned this Feb 5, 2020
@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

pygit2 0.28.0 fails in checkPhase:

Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 149, in <module>
    ext_modules=ext_modules,
  File "/nix/store/35q07v2ici22k9sgrzbq3js64zq4zal1-python3.7-setuptools-44.0.0/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/nix/store/35q07v2ici22k9sgrzbq3js64zq4zal1-python3.7-setuptools-44.0.0/lib/python3.7/site-packages/setuptools/command/test.py", line 237, in run
    self.run_tests()
  File "/nix/store/35q07v2ici22k9sgrzbq3js64zq4zal1-python3.7-setuptools-44.0.0/lib/python3.7/site-packages/setuptools/command/test.py", line 259, in run_tests
    exit=False,
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/unittest/main.py", line 100, in __init__
    self.parseArgs(argv)
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/unittest/main.py", line 124, in parseArgs
    self._do_discovery(argv[2:])
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/unittest/main.py", line 244, in _do_discovery
    self.createTests(from_discovery=True, Loader=Loader)
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/unittest/main.py", line 154, in createTests
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/unittest/loader.py", line 349, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/unittest/loader.py", line 406, in _find_tests
    full_path, pattern, namespace)
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/unittest/loader.py", line 483, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/nix/store/35q07v2ici22k9sgrzbq3js64zq4zal1-python3.7-setuptools-44.0.0/lib/python3.7/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/lib/python3.7/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/build/pygit2-1.0.3/test/test_revwalk.py", line 28, in <module>
    from pygit2 import GIT_SORT_NONE, GIT_SORT_TIME, GIT_SORT_REVERSE
  File "/build/pygit2-1.0.3/pygit2/__init__.py", line 268, in <module>
    settings = Settings()
  File "/build/pygit2-1.0.3/pygit2/settings.py", line 63, in __init__
    self._initialize_tls_certificate_locations()
  File "/build/pygit2-1.0.3/pygit2/settings.py", line 71, in _initialize_tls_certificate_locations
    self._default_tls_verify_paths.capath,
  File "/build/pygit2-1.0.3/pygit2/settings.py", line 164, in set_ssl_cert_locations
    option(GIT_OPT_SET_SSL_CERT_LOCATIONS, ssl_cert_file, ssl_cert_dir)
_pygit2.GitError: OpenSSL error: failed to load certificates: error:00000000:lib(0):func(0):reason(0)

I guess the issue was introduced in libgit2/pygit2@ca61026#diff-5ac6455c49d523d8a4c642b918b677c9

Running python3 -c 'from ssl import get_default_verify_paths; print(get_default_verify_paths().openssl_cafile_env) determined I probably need to override SSL_CERT_FILE environment variable. Doing SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; seems to let the build progress.

Not sure if something similar is not require for consumers but at least on NixOS, python3 -c 'from ssl import get_default_verify_paths; print(get_default_verify_paths().cafile) returns /etc/ssl/certs/ca-certificates.crt so it probably works there.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

I was getting libgit2/pygit2#868 because setuptools-check-hook was being run before pytest-check-hook. I fixed it using dontUseSetuptoolsCheck.

Now I get the following and I am not sure how to fix it.

============================= test session starts ==============================
platform linux -- Python 3.7.6, pytest-5.3.2, py-1.8.1, pluggy-0.13.1 -- /nix/store/aw85aijllnc5spk2fqbivygrhx6x7411-python3-3.7.6/bin/python3.7
cachedir: .pytest_cache
rootdir: /build/pygit2-1.0.3, inifile: pytest.ini, testpaths: test/
collected 0 items / 55 errors                                                  

==================================== ERRORS ====================================
____________________ ERROR collecting test/test_archive.py _____________________
test/test_archive.py:29: in <module>
    from pygit2 import Index, Oid, Tree, Object
pygit2/__init__.py:33: in <module>
    from .blame import Blame, BlameHunk
pygit2/blame.py:27: in <module>
    from .ffi import ffi, C
pygit2/ffi.py:27: in <module>
    from ._libgit2 import ffi, lib as C
E   ModuleNotFoundError: No module named 'pygit2._libgit2'
____________________ ERROR collecting test/test_archive.py _____________________
ImportError while importing test module '/build/pygit2-1.0.3/test/test_archive.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test/test_archive.py:29: in <module>
    from pygit2 import Index, Oid, Tree, Object
pygit2/__init__.py:33: in <module>
    from .blame import Blame, BlameHunk
pygit2/blame.py:27: in <module>
    from .ffi import ffi, C
pygit2/ffi.py:27: in <module>
    from ._libgit2 import ffi, lib as C
E   ModuleNotFoundError: No module named 'pygit2._libgit2'

Disabling tests for now.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

I successfully built:

  • libgit2
  • libgit2-glib
  • python3.pkgs.pygit2
  • gitfs
  • gitg (also ran successfully)

I also ran gitfs but did not have patience to set up FUSE to make it work. @robbinch could you please verify it still works?

@jtojnar jtojnar changed the title libgit2: 0.27.8 -> 0.28.3 libgit2: 0.27.8 -> 0.28.4 Feb 6, 2020
@jtojnar jtojnar modified the milestones: 20.09, 20.03 Feb 6, 2020
@jtojnar jtojnar removed their assignment Feb 6, 2020
@FRidh
Copy link
Member

FRidh commented Feb 10, 2020

Pushed the gitfs change to master.

@jtojnar jtojnar merged commit 5ff9a68 into NixOS:staging Feb 10, 2020
Staging automation moved this from Needs review to Done Feb 10, 2020
@r-ryantm r-ryantm deleted the auto-update/libgit2 branch February 11, 2020 04:54
@abathur
Copy link
Member

abathur commented Jan 16, 2021

I guess it's expected, but for posterity I also found that I need to add SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; to an expression for a package that uses pygit2 in order to get the tests running on ubuntu in CI. They ran fine on macOS without it (presumably the macOS sandbox allows this to work?)

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

Successfully merging this pull request may close these issues.

None yet

5 participants