Skip to content

remove LegacyPasswd code and dependency on crypt #1153

Closed
@peterbecich

Description

@peterbecich

hackage-server has a dependency on the extra-library crypt:

if !os(darwin)
extra-libraries: crypt

I believe that refers to this function: https://en.wikipedia.org/wiki/Crypt_(C)

It appears that crypt is deprecated:
https://www.gentoo.org/support/news-items/2021-10-18-libxcrypt-migration-stable.html

The implementation of libcrypt.so within glibc has been deprecated
for a long time and will be removed in the near future.

For this reason, we are following other distributions (where
this has been tested for years already) and switching to the
external libxcrypt implementation, now also in stable installations.

It also looks like Nix is moving away from libcrypt to a different library libxcrypt: NixOS/nixpkgs#181764


The usage of the library in hackage-server is here:

foreign import ccall unsafe "crypt" cCrypt :: CString-> CString -> CString

Can we replace libcrypt with libxcrypt , or replace this foreign import ccall with some other library like

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions