Skip to content
Snippets Groups Projects
Unverified Commit 62748729 authored by Daniel O'Connor's avatar Daniel O'Connor Committed by Li-Wen Hsu
Browse files

sysutils/pefs-kmod: Fix build for 13+ and take maintainership

PR:		256956
Approved by:	gleb (original maintainer)
parent d0694d9f
No related branches found
No related tags found
No related merge requests found
# Created by: Gleb Kurtsou <gleb@FreeBSD.org>
PORTNAME= pefs
DISTVERSION= 2018-11-26
DISTVERSION= g20210628
PORTEPOCH= 1
CATEGORIES= sysutils
MASTER_SITES= LOCAL/gleb
PKGNAMESUFFIX= -kmod
MAINTAINER= gleb@FreeBSD.org
MAINTAINER= darius@dons.net.au
COMMENT= PEFS kernel level stacked cryptographic filesystem
LICENSE= BSD2CLAUSE
BROKEN_armv6= fails to compile: implicit declaration of function 'cp15_pmccntr_get' is invalid in C99
BROKEN_DragonFly= fails to build: don't know how to make vnode_if.h
ONLY_FOR_ARCHS= amd64 armv6 i386
ONLY_FOR_ARCHS= amd64 armv6 armv7 i386
ONLY_FOR_ARCHS_REASON= untested on any other arch
BROKEN_FreeBSD_13= fails to compile: too many arguments to function call, expected single argument 'vp', have 2 arguments
BROKEN_FreeBSD_14= fails to compile: too many arguments to function call, expected single argument 'vp', have 2 arguments
# PEFS works on -current but out of tree KLDs get incorrectly compiled without INVARIANTS
BROKEN_FreeBSD_14= crashes on mount due to INVARIANTS
USES= kmod uidfix
USE_GITHUB= yes
GH_ACCOUNT= freebsd-pefs
GH_TAGNAME= 4e03778
MAKE_JOBS_UNSAFE=yes
MAKE_ENV= BINDIR="${PREFIX}/sbin" MANDIR="${MANPREFIX}/man/man"
OPTIONS_DEFINE= AESNI
OPTIONS_DEFAULT=
AESNI_DESC= Enable AES-NI hardware acceleration
PLIST_FILES= sbin/pefs \
lib/pam_pefs.so \
lib/pam_pefs.so.6 \
man/man8/pam_pefs.8.gz \
man/man8/pefs.8.gz \
${KMODDIR}/pefs.ko
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MAESNI}
MAKE_ENV+= PEFS_AESNI=yes
.endif
.if ${OPSYS} == FreeBSD
PLIST_FILES+= lib/pam_pefs.so.6
.endif
.include <bsd.port.mk>
TIMESTAMP = 1543813366
SHA256 (pefs-2018-11-26.tar.gz) = b1d185982fdc7533ef99deeeb740157f0ea215a238a967ac5bfe56279e810bdb
SIZE (pefs-2018-11-26.tar.gz) = 90259
TIMESTAMP = 1626164725
SHA256 (freebsd-pefs-pefs-g20210628-4e03778_GH0.tar.gz) = 37ef7274f8d48000c16ef892c33fad1df929e37507e7c6c48bbfd9e2e8616690
SIZE (freebsd-pefs-pefs-g20210628-4e03778_GH0.tar.gz) = 91903
--- lib/libpam/modules/Makefile.inc.orig 2011-12-25 08:01:28.000000000 +0200
+++ lib/libpam/modules/Makefile.inc 2011-12-25 08:02:17.000000000 +0200
@@ -1,4 +1,6 @@
# Include Makefiles from $SRCDIR
-.include </usr/src/lib/libpam/modules/Makefile.inc>
+LIBDIR=${PREFIX}/lib
+
+.include <${SYSDIR}/../lib/libpam/modules/Makefile.inc>
--- sys/modules/pefs/Makefile.orig
+++ sys/modules/pefs/Makefile
@@ -8,7 +8,7 @@
pefs_dircache.c \
pefs_xts.c vmac.c
-.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+.if defined(PEFS_AESNI)
SRCS+= pefs_aesni.c
CFLAGS+= -DPEFS_AESNI
.endif
--- lib/libpam/modules/pam_pefs/Makefile.orig 2013-10-13 11:08:05.000000000 -0700
+++ lib/libpam/modules/pam_pefs/Makefile 2013-10-13 11:08:33.000000000 -0700
@@ -26,3 +26,6 @@
.PATH: ${SYS}/fs/pefs
.PATH: ${SYS}/crypto/rijndael
.PATH: ${SYS}/crypto/sha2
+
+# Fix build without OBJDIR for shared components
+.NOPATH: ${OBJS}
--- sys/fs/pefs/pefs_aesni.h.orig
+++ sys/fs/pefs/pefs_aesni.h
@@ -26,6 +26,8 @@
* $FreeBSD$
*/
+#ifdef PEFS_AESNI
+
#include <crypto/aesni/aesni.h>
struct pefs_aesni_ctx {
@@ -41,3 +43,5 @@
u_int fpu_cpuid;
int fpu_saved;
};
+
+#endif
......@@ -9,5 +9,5 @@ Key features:
* Modern cryptographic algorithms: AES and Camellia in XTS mode,
PKCS#5v2 and HKDF for key generation.
WWW: https://github.com/glk/pefs
WWW: https://github.com/freebsd-pefs/pefs
WWW: http://wiki.freebsd.org/PEFS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment