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

exiv2: 0.27.2 -> 0.27.3 #96648

Merged
merged 1 commit into from Sep 4, 2020
Merged

exiv2: 0.27.2 -> 0.27.3 #96648

merged 1 commit into from Sep 4, 2020

Conversation

@paperdigits
Copy link
Contributor

@paperdigits paperdigits commented Aug 30, 2020

Motivation for this change

Upgrade exiv2 to the latest released version.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Copy link
Contributor

@jtojnar jtojnar left a comment

  1. Changes look mostly okay:

  2. It might be possible to remove these two lines:

    export LD_LIBRARY_PATH="$(realpath ../build/lib)"

    export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib

    since Exiv2/exiv2#1213 should do that.

  3. Python tests have been run by default for a while now, we can remove:

    postCheck = ''
    (cd ../tests/ && python3 runner.py)
    '';

  4. 🔴 There is a regression in aarch64-linux builds compared to previous update:

    https://github.com/NixOS/nixpkgs/pull/67453/checks?check_run_id=203082000

    Upstream issue: Exiv2/exiv2#1244
    Upstream pull request fixing that (likely not backportable): Exiv2/exiv2#1252

    Edit: This workaround might work https://github.com/Exiv2/exiv2/commit/1ea63ccb345a4498b41cb8842622ba7ecc9fd484.patch

  5. Could you add a comment that

    # Fix CMake export paths.
    postFixup = ''
    sed -i "$dev/lib/cmake/exiv2/exiv2Config.cmake" \
    -e "/INTERFACE_INCLUDE_DIRECTORIES/ s@\''${_IMPORT_PREFIX}@$dev@" \
    -e "/Compute the installation prefix/ a set(_IMPORT_PREFIX \"$out\")" \
    -e "/^get_filename_component(_IMPORT_PREFIX/ d"
    '';

    (introduced in f1a58ab)

    and

    # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
    # (setting it to an absolute path causes include files to go to $out/$out/include,
    # because the absolute path is interpreted with root at $out).
    "-DCMAKE_INSTALL_INCLUDEDIR=include"
    "-DCMAKE_INSTALL_LIBDIR=lib"

    (introduced in #81091)

    can be removed once Exiv2/exiv2#1263 is merged?

@paperdigits paperdigits force-pushed the paperdigits:exiv2-0.27.3 branch from 06da749 to 509dcc3 Aug 30, 2020
@paperdigits
Copy link
Contributor Author

@paperdigits paperdigits commented Aug 30, 2020

@jtojnar thanks for the quick review. I think I've hit every point you've made.

"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
];

patches = [

This comment has been minimized.

This comment has been minimized.

@jtojnar

jtojnar Aug 31, 2020
Contributor

Hmm, though it does not seem to work here. Maybe we also need to apply Exiv2/exiv2@dd2d181

This comment has been minimized.

@paperdigits

paperdigits Aug 31, 2020
Author Contributor

Patch Exiv2/exiv2@dd2d181 doesn't apply cleanly.

This comment has been minimized.

@jtojnar

jtojnar Sep 1, 2020
Contributor

Yes, the conflict would need to be resolved. (And ideally also send pull request upstream against 0.27-maintenance branch.)

This comment has been minimized.

@paperdigits

paperdigits Sep 4, 2020
Author Contributor

I'm not sure how to resolve the conflict and I don't have any arm systems to build against.

This comment has been minimized.

@jtojnar

jtojnar Sep 4, 2020
Contributor

I have resolved the conflict in Exiv2/exiv2#1271.

Currently verifying it natively on https://github.com/nix-community/aarch64-build-box (nix-build -A exiv2.all --argstr system aarch64-linux) and locally by cross-compiling (nix-shell -A pkgsCross.aarch64-multiplatform.netpbm).

Edit: confirmed that it builds.

This comment has been minimized.

@paperdigits

paperdigits Sep 4, 2020
Author Contributor

@jtojnar looks good!

@vcunat vcunat mentioned this pull request Sep 3, 2020
1 of 1 task complete
@paperdigits paperdigits force-pushed the paperdigits:exiv2-0.27.3 branch 3 times, most recently from 2717200 to 7a84dce Sep 4, 2020
@paperdigits
Copy link
Contributor Author

@paperdigits paperdigits commented Sep 4, 2020

@vcunat I think this can be merged! Should take care of the security advisory.

};

patches = [
# included in next release
# Fix aarch64 build
(fetchpatch {

This comment has been minimized.

@jtojnar

jtojnar Sep 4, 2020
Contributor

Could you also link the pull request in a comment for easier triage in the future?

This comment has been minimized.

@paperdigits

paperdigits Sep 4, 2020
Author Contributor

Done

'';

# With CMake we have to enable samples or there won't be
# With CMake we have to enable samples or there won't be

This comment has been minimized.

@jtojnar

jtojnar Sep 4, 2020
Contributor

This indentation is weird here. Otherwise looks good.

This comment has been minimized.

@paperdigits

paperdigits Sep 4, 2020
Author Contributor

Done.

@paperdigits paperdigits force-pushed the paperdigits:exiv2-0.27.3 branch from 7a84dce to b181edb Sep 4, 2020
@paperdigits
Copy link
Contributor Author

@paperdigits paperdigits commented Sep 4, 2020

@jtojnar thanks for the help!

@jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Sep 4, 2020

Thank YOU.

@jtojnar jtojnar merged commit e2a89f8 into NixOS:master Sep 4, 2020
2 of 3 checks passed
2 of 3 checks passed
tests tests
Details
action
Details
Wait for ofborg This failed status will be cleared when ofborg finishes eval.
Details
@vcunat vcunat mentioned this pull request Sep 5, 2020
1 of 1 task complete
@ckauhaus
Copy link
Contributor

@ckauhaus ckauhaus commented Sep 7, 2020

@jtojnar Would it be possible to backport this to 20.03 as it is a security fix? (#88282)

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

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.