Skip to content
Snippets Groups Projects
Commit bd3ff6ea authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

Bump 0.4.0

parent efdda513
No related branches found
No related tags found
No related merge requests found
......@@ -17,9 +17,8 @@ You can customize paths via flags given to configure. See `./configure --help` f
## Runtime dependencies
- execline version 2.7.0.0 or later: http://skarnet.org/software/execline/
- s6 version 2.10.0.0 or later: http://skarnet.org/software/s6/
- 66 version 0.6.0.0 or later https://framagit.org/Obarun/66/
- 66-tools version 0.0.7.0 or later https://framagit.org/Obarun/66-tools/
- optional dependencies:
* dbus-66serv version 0.2.0 or later https://framagit.org/pkg/observice/dbus-66serv
- execline version 2.9.4.0 or later: http://skarnet.org/software/execline/
- s6 version 2.12.0.2 or later: http://skarnet.org/software/s6/
- 66 version 0.7.0.0 or later https://git.obarun.org/Obarun/66/
- 66-tools version 0.1.0.0 or later https://git.obarun.org/Obarun/66-tools/
Copyright (c) 2018-2021 Eric Vidal <eric@obarun.org>
Copyright (c) 2018-2023 Eric Vidal <eric@obarun.org>
All rights reserved.
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
......
......@@ -15,31 +15,11 @@ include package/targets.mak
INSTALL := ./tools/install.sh
install: install-script install-service install-service-module install-service-instance-module install-configure
install-script: $(SCRIPT_TARGET:module/scandir@/configure/%=$(DESTDIR)$(module_directory)/scandir@/configure/%)
install-service: $(SERVICE_TARGET:service/%=$(DESTDIR)$(service_directory)/%)
install-service-module: $(MODULE_TARGET:module/scandir@/service/%=$(DESTDIR)$(module_directory)/scandir@/service/%)
install-service-instance-module: $(MODULE_INSTANCE_TARGET:module/scandir@/service@/%=$(DESTDIR)$(module_directory)/scandir@/service@/%)
install-configure: $(MODULE_CONFIGURE_TARGET:module/scandir@/configure/configure=$(DESTDIR)$(module_directory)/scandir@/configure/configure)
install: install-module install-script
install-module: $(MODULE_TARGET:module/%=$(DESTDIR)$(service_directory)/$(package)/%)
install-script: $(SCRIPT_TARGET:module/configure/%=$(DESTDIR)$(service_directory)/$(package)/configure/%)
$(DESTDIR)$(module_directory)/scandir@/configure/%: module/scandir@/configure/%
exec $(INSTALL) -D -m 755 $< $@
sed -i -e 's,@BINDIR@,$(bindir),' $@
$(DESTDIR)$(module_directory)/scandir@/configure/configure: module/scandir@/configure/configure
exec $(INSTALL) -D -m 755 $< $@
sed -i -e 's,@BINDIR@,$(bindir),' $@
$(DESTDIR)$(module_directory)/scandir@/service/%: module/scandir@/service/%
exec $(INSTALL) -D -m 644 $< $@
$(DESTDIR)$(module_directory)/scandir@/service@/%: module/scandir@/service@/%
exec $(INSTALL) -D -m 644 $< $@
$(DESTDIR)$(service_directory)/%: service/%
$(DESTDIR)$(service_directory)/$(package)/%: module/%
exec $(INSTALL) -D -m 644 $< $@
sed -i -e 's,@VERSION@,$(version),' \
-e "s,@LIVEDIR@,$(livedir)," \
......@@ -49,6 +29,10 @@ $(DESTDIR)$(service_directory)/%: service/%
-e "s,@VERBOSITY_LEVEL@,$(VERBOSITY_LEVEL)," \
-e "s,@NOTIFY@,$(NOTIFY)," $@
$(DESTDIR)$(service_directory)/$(package)/configure/%: module/configure/%
exec $(INSTALL) -D -m 755 $< $@
sed -i -e 's,@BINDIR@,$(bindir),' $@
version:
@echo $(version)
......
......@@ -2,6 +2,16 @@
---
# In 0.4.0
- Adapt to execline 2.9.4.0
- Adapt to 66 0.7.0.0-beta
- Adapt to 66-tools 0.1.0.0
---
# In 0.3.1
- Follow 66 envfile behavior: the $HOME/.66/svscan@<user>/.svscan@<user> is now created with a dot.
......
......@@ -16,18 +16,17 @@ Fine tuning of the installation directories:
--bindir=BINDIR user executables [EPREFIX/bin]
--datarootdir=DATAROOTDIR read-only architecture-independent data root [PREFIX/share]
--with-system-service=DIR 66 service intallation directory [DATAROOTDIR/$package_macro_dir/service]
--with-system-module=DIR 66 module intallation directory [DATAROOTDIR/$package_macro_dir/module]
--livedir=DIR 66 default live directory [/run/66]
--with-user-service-conf=DIR 66 user service configuration directory [.66/conf]
Fine tunning of scandir configuration:
--LOGGER=BOOLEAN create an associated logger [!yes]
--USE_ENVIRONMENT=BOOLEAN Launch the scandir with a environment [!yes]
--NOTIFY=BOOLEAN use notification [!yes]
--VERBOSITY_LEVEL=BOOLEAN level of verbosity [!3]
Use yes or no with lowercase character to set BOOLEAN values.
Empty value is a commented one and not used at all.
An exclamation mark '!' at the begin of the value unexport the variable
......@@ -91,7 +90,6 @@ exec_prefix='$prefix'
bindir='$exec_prefix/bin'
datarootdir='$prefix/share'
service_directory='$datarootdir/$package_macro_dir/service'
module_directory='$datarootdir/$package_macro_dir/module'
livedir='/run/66'
service_userconf='.66/conf'
LOGGER='!yes'
......@@ -107,7 +105,6 @@ for arg ; do
--bindir=*) bindir=${arg#*=} ;;
--datarootdir=*) datarootdir=${arg#*=} ;;
--with-system-service=*) service_directory=${arg#*=} ;;
--with-system-module=*) module_directory=${arg#*=} ;;
--livedir=*) livedir=${arg#*=} ;;
--with-user-service-conf=*) service_userconf=${arg#*=} ;;
--LOGGER=*) LOGGER=${arg#*=} ;;
......@@ -130,14 +127,14 @@ fi
# Expand installation directories
stripdir prefix
for i in exec_prefix bindir datarootdir \
livedir service_directory module_directory ; do
livedir service_directory; do
eval tmp=\${$i}
eval $i=$tmp
stripdir $i
done
stripdir datarootdir
for i in service_directory module_directory; do
for i in service_directory; do
eval tmp=\${$i}
eval $i=$tmp
stripdir $i
......@@ -175,13 +172,13 @@ cat << EOF
# $cmdline
# Any changes made here will be lost if configure is re-run.
package := $package
version := $version
prefix := $prefix
exec_prefix := $exec_prefix
bindir := $bindir
datarootdir := $datarootdir
service_directory := $service_directory
module_directory := $module_directory
package_macro_dir := $package_macro_dir
livedir := $livedir
service_userconf := $service_userconf
......
File moved
......@@ -6,23 +6,24 @@ export VERBOSITY="${MOD_VERBOSITY}"
export CLOCK_ENABLED=0
export COLOR_ENABLED="${MOD_COLOR}"
## script variable
FRONTEND_PATH="${MOD_MODULE_DIR}/frontend"
ACTIVATED_PATH="${MOD_MODULE_DIR}/activated"
owner="${1}"
home_env=$(homeof "${owner}" 2>/dev/null)
home_env="${home_env}/${MOD_SERVICE_USERCONFDIR}svscan@${owner}"
svscan="${FRONTEND_PATH}/svscan@"
die(){
66-yeller -f "${@}"
exit 111
}
owner="${1}"
home_env=$(homeof "${owner}" 2>/dev/null)
if [ -z "${home_env}" ]; then
die "invalid user: ${owner}"
fi
home_env="${home_env}/${MOD_SERVICE_USERCONFDIR}svscan@${owner}"
service_dir="${MOD_MODULE_DIR}/service@"
svscan="${service_dir}/svscan@"
check_empty_var(){
name="${1}" var_value="${2}"
if [ -z "${var_value}" ]; then
......@@ -39,10 +40,9 @@ disable() {
enable() {
name=${1}
66-yeller %benable%n service: "${name}"
touch "${MOD_MODULE_DIR}/service/${name}"
touch "${ACTIVATED_PATH}/${name}"
}
absolute_path(){
name="${1}" var="${2}"
if [ "$(66-yeller -i "${var}" | cut -c 1)" != "/" ]; then
......@@ -50,8 +50,6 @@ absolute_path(){
fi
}
if execl-toc -X -V LIVE_DIRECTORY; then
check_empty_var "LIVE_DIRECTORY" "${LIVE_DIRECTORY}"
......@@ -65,13 +63,12 @@ else
sed -i "s:@LIVE_DIR@:-l ${MOD_LIVE}:" "${svscan}" || die "unable to set the live directory to use"
fi
if [ "${USE_ENVIRONMENT}" = yes ]; then
enable "setenv@${owner}"
sed -i "s:@USE_ENVIRONMENT@:-e ${home_env}:" "${svscan}" || die "unable to set environment directory to use"
sed -i "s:@PATH_ENVIRONMENT@:${home_env}:g" "${service_dir}/setenv@" || die "unable to set environment directory to use"
sed -i "s:@PATH_ENVIRONMENT@:${home_env}:g" "${FRONTEND_PATH}/setenv@" || die "unable to set environment directory to use"
else
disable "setenv@@I"
sed -i "s:@USE_ENVIRONMENT@::" "${svscan}" || die "unable to set environment directory to use"
......@@ -79,7 +76,7 @@ fi
if [ "${LOGGER}" != "yes" ]; then
66-yeller %rdisable%n logger options
sed -i "s:#@options:@options:" "${svscan}" || die "unable to disable log options"
sed -i "s:log:!log:" "${svscan}" || die "unable to disable log options"
else
66-yeller %benable%n logger options
fi
......
File moved
[main]
@type = longrun
@type = classic
@version = @version@
@description = "Create and start a nested scandir for @I"
@user = ( root )
@depends = ( setenv@@I )
#@options = ( !log )
@notify = 3
@timeout-up = 3000
@timeout-kill = 3000
@options = ( log )
[start]
@runas = @I
@execute = (
s6-setsid -qb --
umask 022
if {
execl-cmdline -s { 66-scandir ${cmd_args_scandir} create }
}
execl-cmdline -s { 66-scanctl ${cmd_args_scanctl} start }
execl-cmdline -s { 66 ${main_args} scandir start ${scandir_args} }
)
[stop]
@runas = @I
@execute = (
66-scanctl @LIVE_DIR@ stop
execl-cmdline -s { 66 ${main_args} scandir stop }
)
[environment]
cmd_args_scandir=!@VERBOSITY_LEVEL@ @LIVE_DIR@
cmd_args_scanctl=!@VERBOSITY_LEVEL@ @NOTIFY@ @LIVE_DIR@ @USE_ENVIRONMENT@
main_args=!@VERBOSITY_LEVEL@ @LIVE_DIR@
scandir_args=!@NOTIFY@ @USE_ENVIRONMENT@
......@@ -3,6 +3,7 @@
@version = @VERSION@
@description = "Create a nested scandir for @I"
@user = ( root )
@intree = session
[regex]
@configure="@I"
......@@ -30,6 +31,6 @@
@NOTIFY@
## Level of verbosity [0-4]
## Level of verbosity [0-5]
@VERBOSITY_LEVEL@
package=scandir-66serv
version=0.3.1
package=scandir
version=0.4.0
package_macro_dir=66
SCRIPT_TARGET :=
SERVICE_TARGET := service/scandir@
MODULE_TARGET := $(shell find module/scandir@/service -type f)
MODULE_INSTANCE_TARGET := $(shell find module/scandir@/service@ -type f)
MODULE_CONFIGURE_TARGET := module/scandir@/configure/configure
SCRIPT_TARGET := module/configure/configure
MODULE_TARGET := $(shell find module/ -type f)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment