mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-01-11 08:28:30 +00:00
debian: drop postinst, no longer needed
Use sysusers and tmpfiles Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
This commit is contained in:
parent
e9db00fe7f
commit
3f687bdbce
1
.gitignore
vendored
1
.gitignore
vendored
@ -79,5 +79,4 @@ tests/test_config
|
||||
/debian/swtpm-dev
|
||||
/debian/swtpm-libs
|
||||
/debian/swtpm-tools
|
||||
/debian/swtpm-tools.postinst
|
||||
/debian/tmp
|
||||
|
||||
@ -483,7 +483,6 @@ AC_SUBST([MY_CFLAGS])
|
||||
AC_SUBST([MY_LDFLAGS])
|
||||
|
||||
AC_CONFIG_FILES([Makefile \
|
||||
debian/swtpm-tools.postinst \
|
||||
swtpm.spec \
|
||||
samples/Makefile \
|
||||
samples/swtpm-localca.conf \
|
||||
|
||||
1
debian/control
vendored
1
debian/control
vendored
@ -6,6 +6,7 @@ Standards-Version: 4.5.1
|
||||
Rules-Requires-Root: no
|
||||
Build-Depends: debhelper (>= 10),
|
||||
dh-apparmor,
|
||||
dh-sequence-installsysusers,
|
||||
expect,
|
||||
gawk,
|
||||
gnutls-bin,
|
||||
|
||||
2
debian/swtpm-tools.install
vendored
2
debian/swtpm-tools.install
vendored
@ -7,6 +7,8 @@ cat <<_EOF_
|
||||
/usr/bin/swtpm_ioctl
|
||||
/usr/bin/swtpm_localca
|
||||
/usr/bin/swtpm_setup
|
||||
/usr/lib/tmpfiles.d/swtpm-tmpfiles.conf
|
||||
/usr/lib/sysusers.d/swtpm-sysusers.conf
|
||||
/usr/share/man/man8/swtpm-create-tpmca.8*
|
||||
/usr/share/man/man8/swtpm-localca.8*
|
||||
/usr/share/man/man5/swtpm-localca.conf.5*
|
||||
|
||||
36
debian/swtpm-tools.postinst.in
vendored
36
debian/swtpm-tools.postinst.in
vendored
@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
SWTPM_LOCALCA_DIR=@LOCALSTATEDIR@/lib/swtpm-localca
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# creating @TSS_USER@ group if he isn't already there
|
||||
if ! getent group @TSS_USER@ >/dev/null; then
|
||||
addgroup --system @TSS_USER@
|
||||
fi
|
||||
|
||||
# creating @TSS_USER@ user if he isn't already there
|
||||
if ! getent passwd @TSS_USER@ >/dev/null; then
|
||||
adduser --system --ingroup @TSS_USER@ --shell /bin/false \
|
||||
--home /var/lib/tpm --no-create-home \
|
||||
--gecos "TPM software stack" \
|
||||
@TSS_USER@
|
||||
fi
|
||||
|
||||
if ! [ -d $SWTPM_LOCALCA_DIR ]; then
|
||||
mkdir -p $SWTPM_LOCALCA_DIR
|
||||
chown @TSS_USER@:root $SWTPM_LOCALCA_DIR
|
||||
chmod 0750 $SWTPM_LOCALCA_DIR
|
||||
fi
|
||||
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Loading…
Reference in New Issue
Block a user