diff --git a/sysutils/swtpm/Makefile b/sysutils/swtpm/Makefile index c636d8022344..099639aa2888 100644 --- a/sysutils/swtpm/Makefile +++ b/sysutils/swtpm/Makefile @@ -1,50 +1,50 @@ PORTNAME= swtpm DISTVERSIONPREFIX= v -DISTVERSION= 0.10.1 +DISTVERSION= 0.10.2 CATEGORIES= sysutils -MAINTAINER= meka@tilda.center +MAINTAINER= meka@sys.it.com COMMENT= Libtpms-based TPM emulator WWW= https://github.com/stefanberger/swtpm LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= base64>=0:converters/base64 \ bash>=0:shells/bash \ expect>=0:lang/expect \ gawk>=0:lang/gawk \ socat>=0:net/socat LIB_DEPENDS= libfuse.so:filesystems/fusefs-libs \ libgmp.so:math/gmp \ libgnutls.so:security/gnutls \ libjson-glib-1.0.so:devel/json-glib \ libtasn1.so:security/libtasn1 \ libtpms.so:sysutils/libtpms USES= autoreconf gettext-runtime gmake gnome libtool pathfix \ pkgconfig python:env,test shebangfix ssl USE_GITHUB= yes GH_ACCOUNT= stefanberger USE_GNOME= glib20 USE_LDCONFIG= yes USE_RC_SUBR= ${PORTNAME} SHEBANG_FILES= tests/_* tests/test_clientfds.py tests/test_setdatafd.py GNU_CONFIGURE= yes CONFIGURE_ARGS+= --with-tss-group=${GROUPS} \ --with-tss-user=${USERS} INSTALL_TARGET= install-strip TEST_ENV= LD_LIBRARY_PATH=${STAGEDIR}${PREFIX}/lib/swtpm:${LD_LIBRARY_PATH} \ PATH=${PATH}:${STAGEDIR}${PREFIX}/bin TEST_TARGET= ./installed-runner.sh TEST_WRKSRC= ${STAGEDIR}${PREFIX}/libexec/installed-tests/swtpm USERS= _tss GROUPS= ${USERS} do-test: cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${TEST_TARGET} .include diff --git a/sysutils/swtpm/distinfo b/sysutils/swtpm/distinfo index 273fae772351..e778730f3a35 100644 --- a/sysutils/swtpm/distinfo +++ b/sysutils/swtpm/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1746085619 -SHA256 (stefanberger-swtpm-v0.10.1_GH0.tar.gz) = f8da11cadfed27e26d26c5f58a7b8f2d14d684e691927348906b5891f525c684 -SIZE (stefanberger-swtpm-v0.10.1_GH0.tar.gz) = 415992 +TIMESTAMP = 1788708122 +SHA256 (stefanberger-swtpm-v0.10.2_GH0.tar.gz) = f61cf6f1e9bbcb4cefb30b70cafaf1c4df54c6961e65cfa63830e8ad0e220134 +SIZE (stefanberger-swtpm-v0.10.2_GH0.tar.gz) = 417378 diff --git a/sysutils/swtpm/files/swtpm.in b/sysutils/swtpm/files/swtpm.in index 15e24e044108..1c3587373009 100644 --- a/sysutils/swtpm/files/swtpm.in +++ b/sysutils/swtpm/files/swtpm.in @@ -1,121 +1,122 @@ #!/bin/sh # PROVIDE: swtpm # REQUIRE: FILESYSTEMS ldconfig # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local, /etc/rc.conf or # /etc/rc.conf.d/swtpm to enable this service: # # swtpm_enable (bool): Set to NO by default. # Set it to "YES" to enable swtpm. # swtpm_configs (string): List of configurations to use # Default is "tpm" # swtpm_tpm (string): Arguments passed to swtpm config named tpm . /etc/rc.subr name=swtpm desc="Software TPM manager" rcvar=${name}_enable start_precmd="${name}_precmd" start_cmd="${name}_start" stop_cmd="${name}_stop" status_cmd="${name}_status" command="%%PREFIX%%/bin/swtpm" command_args="socket" pidpath="/var/run/${name}" # required_modules="cuse" swtpm_default_args="\ --tpmstate dir=${pidpath} \ --tpm2 \ --log level=20" configs= load_rc_config $name : ${swtpm_enable:="NO"} : ${swtpm_configs:="tpm"} : ${swtpm_tpm:="$swtpm_default_args"} swtpm_pids() { pids=$(pgrep -d ' ' $name) pids=${pids% } printf "${pids}" } swtpm_precmd() { /usr/bin/install -d -m 0755 -o root ${pidpath} } start_instance() { config=$* instance_args=$(eval "echo \$swtpm_${config}") if [ -z "${instance_args}" ]; then echo "No such config ${config}" else echo -n "Starting SWTPM config ${config} ..." ${command} \ ${command_args} \ --daemon \ --pid file=${pidpath}/${config}.pid \ --ctrl type=unixio,path=${pidpath}/${config} \ ${instance_args} echo " done" fi } stop_instance() { config=$* instance_args=`eval "echo \$swtpm_${config}"` if [ -z "${instance_args}" ]; then echo "No such config ${config}" elif [ -e "${pidpath}/${config}.pid" ]; then pid=$(check_pidfile ${pidpath}/${config}.pid %%PREFIX%%/bin/swtpm) if [ ! -z "${pid}" ]; then echo -n "Stopping SWTPM config ${config} ... " - kill $pid + kill ${pid} rm -f ${pidpath}/${config}.pid + pwait ${pid} echo "done" fi fi } swtpm_start() { configs=$* [ -z "${configs}" ] && configs="${swtpm_configs}" for config in ${configs}; do start_instance $config done } swtpm_stop() { configs=$* [ -z "${configs}" ] && configs="${swtpm_configs}" for config in ${configs}; do stop_instance ${config} done } swtpm_status() { pids=$(swtpm_pids) if [ "${pids}" ]; then echo "${name} is running as pid ${pids}." else echo "${name} is not running." return 1 fi } run_rc_command $*