git: a6890d074354 - main - www/foreign-cdm: Update to 20231105

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Sat, 18 Nov 2023 13:26:34 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a6890d074354bbdcd00df0eec8217e1a269529dc

commit a6890d074354bbdcd00df0eec8217e1a269529dc
Author:     Alex S <iwtcex@gmail.com>
AuthorDate: 2023-11-18 13:10:29 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-11-18 13:11:35 +0000

    www/foreign-cdm: Update to 20231105
    
    This updates brings support for jailing the Widevine host process.
    
    Co-authored-by: Gleb Popov <arrowd@FreeBSD.org>
---
 www/foreign-cdm/Makefile                | 12 +++++++++---
 www/foreign-cdm/distinfo                |  6 +++---
 www/foreign-cdm/files/fcdm-setup-env.in |  2 +-
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/www/foreign-cdm/Makefile b/www/foreign-cdm/Makefile
index d76f9b9a1148..09cbd3b2f78d 100644
--- a/www/foreign-cdm/Makefile
+++ b/www/foreign-cdm/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	foreign-cdm
-PORTVERSION=	3
+PORTVERSION=	20231105
 CATEGORIES=	www multimedia linux
 MASTER_SITES=	https://arrowd.name/:cdm
 DISTFILES=	cdm-${CDM_INT_HASH}.tar.gz:cdm
@@ -19,7 +19,7 @@ RUN_DEPENDS=	linux_base-c7>0:emulators/linux_base-c7
 USE_GITHUB=	yes
 GH_ACCOUNT=	shkhln
 GH_PROJECT=	foreign-cdm
-GH_TAGNAME=	e953bc0d35344b7e4474969ed37f4e0f9be01451
+GH_TAGNAME=	963d3bc2450997e67e583457d74260daaa7e29ef
 GH_TUPLE=	capnproto:capnproto:928c8390d4d562bd32dc79a42eb64e9bdba572d8:capnproto/third_party/capnproto
 
 MAKE_ENV=	LINUX_CC=/compat/linux/opt/rh/devtoolset-11/root/usr/bin/g++ \
@@ -27,7 +27,8 @@ MAKE_ENV=	LINUX_CC=/compat/linux/opt/rh/devtoolset-11/root/usr/bin/g++ \
 
 SUB_FILES=	fcdm-setup-env
 
-PLIST_FILES=	libexec/fcdm-worker \
+PLIST_FILES=	libexec/fcdm-jail \
+		libexec/fcdm-worker \
 		lib/foreign-cdm/fcdm-fbsd.so \
 		share/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so \
 		share/chromium/WidevineCdm/manifest.json \
@@ -38,7 +39,12 @@ CDM_INT_HASH=	fef0b5aa1bd31efb88dfab804bdbe614f3d54f28
 post-extract:
 	${MV} ${WRKDIR}/*.h ${WRKSRC}/third_party/cdm/
 
+post-patch:
+	${REINPLACE_CMD} -e 's|chmod a+srX|chmod a+rX|' ${WRKSRC}/Makefile
+
 do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/build/fcdm-jail ${STAGEDIR}${PREFIX}/libexec/
+	${CHMOD} u+s ${STAGEDIR}${PREFIX}/libexec/fcdm-jail
 	${INSTALL_PROGRAM} ${WRKSRC}/build/fcdm-worker ${STAGEDIR}${PREFIX}/libexec/
 
 	${MKDIR} ${STAGEDIR}${DATADIR}
diff --git a/www/foreign-cdm/distinfo b/www/foreign-cdm/distinfo
index 0ee1880f2820..e94471524a4a 100644
--- a/www/foreign-cdm/distinfo
+++ b/www/foreign-cdm/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1696775809
+TIMESTAMP = 1700309740
 SHA256 (cdm-fef0b5aa1bd31efb88dfab804bdbe614f3d54f28.tar.gz) = 178ae15061d67943fa754e9ddf1903536c4cdb813dcdd90f98007f6238781a26
 SIZE (cdm-fef0b5aa1bd31efb88dfab804bdbe614f3d54f28.tar.gz) = 14361
-SHA256 (shkhln-foreign-cdm-3-e953bc0d35344b7e4474969ed37f4e0f9be01451_GH0.tar.gz) = 12c081634d6ae9637666d592b29525726288e408d722838e8c17b07431e036ba
-SIZE (shkhln-foreign-cdm-3-e953bc0d35344b7e4474969ed37f4e0f9be01451_GH0.tar.gz) = 13365
+SHA256 (shkhln-foreign-cdm-20231105-963d3bc2450997e67e583457d74260daaa7e29ef_GH0.tar.gz) = c8874f0b5649d2257326f155146128160454ce63e1fe25f91e979aaf6fa9fcd3
+SIZE (shkhln-foreign-cdm-20231105-963d3bc2450997e67e583457d74260daaa7e29ef_GH0.tar.gz) = 16000
 SHA256 (capnproto-capnproto-928c8390d4d562bd32dc79a42eb64e9bdba572d8_GH0.tar.gz) = 5c867f4758d7a3e2e0213e732e2b9a5ad70d1193a4d615bbab41df1d4051de37
 SIZE (capnproto-capnproto-928c8390d4d562bd32dc79a42eb64e9bdba572d8_GH0.tar.gz) = 2413835
diff --git a/www/foreign-cdm/files/fcdm-setup-env.in b/www/foreign-cdm/files/fcdm-setup-env.in
index 1bc9c3cb400b..93785fb7e166 100644
--- a/www/foreign-cdm/files/fcdm-setup-env.in
+++ b/www/foreign-cdm/files/fcdm-setup-env.in
@@ -1,2 +1,2 @@
 export FCDM_CDM_SO_PATH=%%PREFIX%%/lib/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
-export FCDM_WORKER_PATH=%%PREFIX%%/libexec/fcdm-worker
+export FCDM_BINDIR_PATH=%%PREFIX%%/libexec