From 71d195d1e28be8ef403a4ebcb3b6a7d6744a8a31 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 6 Jan 2016 12:54:49 +0100 Subject: [PATCH 1/3] reset default of libexecdir We want to revert to the codings standards here. https://www.gnu.org/prep/standards/html_node/Directory-Variables.html By using the default we might avoid differences betweeen bee install and "make install". --- src/beelib.config.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/beelib.config.sh.in b/src/beelib.config.sh.in index 1c174e4..89d6686 100644 --- a/src/beelib.config.sh.in +++ b/src/beelib.config.sh.in @@ -309,7 +309,7 @@ function config_verify_builtin_prefixes() { : ${EPREFIX:='${PREFIX}'} : ${BINDIR:='${EPREFIX}/bin'} : ${SBINDIR:='${EPREFIX}/sbin'} - : ${LIBEXECDIR:='${EPREFIX}/lib/${PKGNAME}'} + : ${LIBEXECDIR:='${EPREFIX}/libexec'} : ${SYSCONFDIR:=DEFAULT} : ${LOCALSTATEDIR:=DEFAULT} : ${SHAREDSTATEDIR:='${LOCALSTATEDIR}'} From aa4fd29902d004f183f2612dfe1cd4639bd6f4ff Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 25 Feb 2016 20:31:39 +0100 Subject: [PATCH 2/3] add hook for kernel modules --- Makefile | 1 + hooks/kernel-modules.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 hooks/kernel-modules.sh diff --git a/Makefile b/Makefile index 0c181ff..d760e9f 100644 --- a/Makefile +++ b/Makefile @@ -99,6 +99,7 @@ HELPER_HOOKS_SHELL+=mandb HELPER_HOOKS_SHELL+=systemd-tmpfiles HELPER_HOOKS_SHELL+=gconf-install-schemas HELPER_HOOKS_SHELL+=info-dir +HELPER_HOOKS_SHELL+=kernel-modules MANPAGES+=bee.1 MANPAGES+=bee-check.1 diff --git a/hooks/kernel-modules.sh b/hooks/kernel-modules.sh new file mode 100755 index 0000000..65e1f98 --- /dev/null +++ b/hooks/kernel-modules.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +action=${1} +pkg=${2} +content=${3} +: ${content:=${BEE_METADIR}/${pkg}/CONTENT} + +if [ -z ${BEE_VERSION} ] ; then + echo >&2 "BEE-ERROR: cannot call $0 from the outside of bee .." + exit 1 +fi + +: ${DEPMOD:=depmod} + +if [ ! type -p ${DEPMOD} >/dev/null 2>&1 ; then + exit 0 +fi + +if [ ! -r "${BEE_METADIR}/${pkg}/META" ] ; then + exit 0 +fi + +. ${BEE_METADIR}/${pkg}/META + +if [ ! "${BEEMETAFORMAT:=0}" -ge 2 ] ; then + exit 0 +fi + +case "${action}" in + "post-install"|"post-remove") + for ver in $(grep -Po ':file=/lib/modules/\K([^/]+)(?=/)' ${content}|sort -u) ; do + echo "$DEPMOD $ver" + test -e /lib/modules/$ver/modules.builtin && $DEPMOD $ver + done + ;; +esac From c4d5f39aaf6e5ca52ac39b47a30d9b8d217be8b6 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 22 Apr 2016 11:49:18 +0200 Subject: [PATCH 3/3] beesh: set umask to defined value --- src/beesh.sh.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/beesh.sh.in b/src/beesh.sh.in index d33ee67..bfa8e18 100644 --- a/src/beesh.sh.in +++ b/src/beesh.sh.in @@ -46,6 +46,8 @@ VERSION=${BEE_VERSION} # load libs . ${BEE_LIBEXECDIR}/bee/beelib.config.sh +umask 022 + function bee-cache() { ${BEE_LIBEXECDIR}/bee/bee.d/bee-cache "${@}" }