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

Use lukko for file-locking #6345

Merged
merged 1 commit into from
Nov 15, 2019
Merged

Use lukko for file-locking #6345

merged 1 commit into from
Nov 15, 2019

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Nov 13, 2019


Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!

@phadej phadej requested a review from hvr November 13, 2019 11:59
@phadej
Copy link
Collaborator Author

phadej commented Nov 13, 2019

OFD.hsc:162:16: error: ‘F_OFD_SETLKW’ undeclared (first use in this function)

I wonder what causes that.

lukko has

#define _GNU_SOURCE
#include <unistd.h>
#include <fcntl.h>

so F_OFD_SETLKW should be there


EDIT: oh, dear, we run travis on trusty, which has kernels 3.13..3.19, ofd is 3.15+ (and I'm not sure which glibc had definitions). https://wiki.ubuntu.com/Kernel/Support

Copy link
Member

@hvr hvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@phadej phadej merged commit 274d295 into master Nov 15, 2019
@phadej phadej deleted the lukko branch November 15, 2019 07:19
@phadej phadej added this to the 3.0.1.0 milestone Nov 28, 2019
This was referenced Dec 3, 2019
@arybczak
Copy link
Collaborator

What's the advantage over previous solution?

@phadej
Copy link
Collaborator Author

phadej commented Feb 18, 2020

@arybczak are there some problems?

The reasons was to reduce the code duplication in cabal-install and hackage-security, and pain of tracking changes in GHC locking code semantics.

@arybczak
Copy link
Collaborator

No, I was just curious because I wrote the original locking code ;)

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Apr 25, 2021
3.4.0.0 Oleg Grenrus <oleg.grenrus@iki.fi> February 2021
	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.4.0.0.md

3.2.0.0 Herbert Valerio Riedel <hvr@gnu.org> April 2020
	* `v2-build` (and other `v2-`prefixed commands) now accept the
	  `--benchmark-option(s)` flags, which pass options to benchmark executables
	  (analogous to how `--test-option(s)` works). (#6209)
	* Add solver optimization to skip a version of a package if it does not resolve
	  any conflicts encountered in the last version, controlled by flag
	  '--fine-grained-conflicts'. (#5918)
	* `cabal v2-exec` doesn't fail in clean package (#6479)
	* Show full ABI hash for installed packages in solver log (#5892)
	* Create incoming directory even for empty packages (#4130)
	* Start GHCi with `main-is` module in scope (#6311)
	* Implement `--benchmark-options` for `v2-bench` (#6224)
	* Fix store-dir in ghc env files generated by `cabal install --lib
	  --package-env` (#6298)
	* `cabal v2-run` works with `.lhs` files (#6134)
	* `subdir` in source-repository-package accepts multiple entries (#5472)

3.0.1.0 Herbert Valerio Riedel <hvr@gnu.org> April 2020
	* Create store incoming directory
	  ([#4130](haskell/cabal#4130))
	* `fetchRepoTarball` output is not marked
	  ([#6385](haskell/cabal#6385))
	* Update `setupMinCabalVersionConstraint` for GHC-8.8
	  ([#6217](haskell/cabal#6217))
	* Implement `cabal install --ignore-project`
	  ([#5919](haskell/cabal#5919))
	* `cabal install executable` solver isn't affected by default
	  environment contents
	  ([#6410](haskell/cabal#6410))
	* Use `lukko` for file locking
	  ([#6345](haskell/cabal#6345))
	* Use `hackage-security-0.6`
	  ([#6388](haskell/cabal#6388))
	* Other dependency upgrades
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

Successfully merging this pull request may close these issues.

3 participants