From 08204b5d2bb93e930d706647d9e042e5e7f854c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Sun, 22 Mar 2020 01:33:15 -0300 Subject: [PATCH] fscrypt: update to 0.2.6 and include PAM module The previous template used for fscrypt didn't include the fscrypt PAM module, pam_fscrypt.so. This commit fixes this issue. The /etc/pam.d/fscrypt config file, which is supposed to be created by packagers to allow fscrypt to use the login password, wasn't included in the package either. This commit also includes that file. --- srcpkgs/fscrypt/files/pam_config | 1 + srcpkgs/fscrypt/template | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/fscrypt/files/pam_config diff --git a/srcpkgs/fscrypt/files/pam_config b/srcpkgs/fscrypt/files/pam_config new file mode 100644 index 00000000000..7e5d75ae45d --- /dev/null +++ b/srcpkgs/fscrypt/files/pam_config @@ -0,0 +1 @@ +auth required pam_unix.so diff --git a/srcpkgs/fscrypt/template b/srcpkgs/fscrypt/template index 2d81e8f4eee..8b12c2f55c4 100644 --- a/srcpkgs/fscrypt/template +++ b/srcpkgs/fscrypt/template @@ -1,10 +1,9 @@ # Template file for 'fscrypt' pkgname=fscrypt version=0.2.6 -revision=1 -build_style=go -go_import_path=github.com/google/fscrypt -go_package="${go_import_path}/cmd/fscrypt" +revision=2 +build_style=gnu-makefile +hostmakedepends="go m4" makedepends="pam-devel" short_desc="Tool for managing Linux filesystem encryption" maintainer="Andrea Brancaleoni " @@ -12,3 +11,16 @@ license="Apache-2.0" homepage="https://github.com/google/fscrypt" distfiles="https://github.com/google/fscrypt/archive/v${version}.tar.gz" checksum=bce54ebb716706150b759052665a29d01963d8df334ad9beb34105ce62d2de94 +conf_files="/etc/pam.d/fscrypt" + +make_install_args='PREFIX=${DESTDIR}/usr' +make_install_target="install-pam" +nostrip_files="fscrypt" + +post_install() { + vbin bin/fscrypt + # remove Ubuntu specific pam-config files + rm -rf ${DESTDIR}/usr/share/pam-configs/ + # add PAM config file + vinstall ${FILESDIR}/pam_config 644 etc/pam.d fscrypt +}