diff --git a/INSTALL.md b/INSTALL.md index 2b4f6265f1cd22bd9f6d5b92cc4cd2543274c7c0..db569c47a228a357814e9512d4e222588eaaaedb 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,7 +4,7 @@ Build Instructions ## Requirements - GNU make version 3.81 or later - + This software will install on any operating system that implements POSIX.1-2008, available at [opengroup](http://pubs.opengroup.org/onlinepubs/9699919799/). ## Standard usage @@ -16,10 +16,7 @@ This software will install on any operating system that implements POSIX.1-2008, You can customize paths via flags given to configure. See `./configure --help` for a list of all available configure options. ## Runtime dependencies - -- 66 version 0.5.1.0 or later https://framagit.org/Obarun/66/ -- 66-tools version 0.0.6.2 or later https://framagit.org/Obarun/66-tools/ -- scandir-66serv version 0.2.1 or later https://framagit.org/pkg/obmods/scandir-66erv -- optional dependencies: - * console-tracker-66serv version 0.2.1 or later https://framagit.org/pkg/obmods/console-tracker-66serv - * display-manager-66serv version 0.2.1 or later https://framagit.org/pkg/obmods/display-manager-66serv + +- 66 version 0.5.1.0 or later https://git.obarun.org/Obarun/66/ +- 66-tools version 0.0.6.2 or later https://git.obarun.org/Obarun/66-tools/ +- scandir-66serv version 0.2.1 or later https://git.obarun.org/pkg/obmods/scandir-66erv diff --git a/Makefile b/Makefile index 91b8d03656260a8f0991a882c73356d3268c5c92..e4a452be318945e291073280e37ee1d20712bcab 100644 --- a/Makefile +++ b/Makefile @@ -15,31 +15,12 @@ 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/boot-user@/configure/%=$(DESTDIR)$(module_directory)/boot-user@/configure/%) -install-service: $(SERVICE_TARGET:service/%=$(DESTDIR)$(service_directory)/%) -install-service-module: $(MODULE_TARGET:module/boot-user@/service/%=$(DESTDIR)$(module_directory)/boot-user@/service/%) -install-service-instance-module: $(MODULE_INSTANCE_TARGET:module/boot-user@/service@/%=$(DESTDIR)$(module_directory)/boot-user@/service@/%) -install-configure: $(MODULE_CONFIGURE_TARGET:module/boot-user@/configure/configure=$(DESTDIR)$(module_directory)/boot-user@/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)/boot-user@/configure/%: module/boot-user@/configure/% - exec $(INSTALL) -D -m 755 $< $@ - sed -i -e 's,@BINDIR@,$(bindir),' $@ - -$(DESTDIR)$(module_directory)/boot-user@/configure/configure: module/boot-user@/configure/configure - exec $(INSTALL) -D -m 755 $< $@ - sed -i -e 's,@BINDIR@,$(bindir),' $@ - -$(DESTDIR)$(module_directory)/boot-user@/service/%: module/boot-user@/service/% - exec $(INSTALL) -D -m 644 $< $@ - -$(DESTDIR)$(module_directory)/boot-user@/service@/%: module/boot-user@/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,@DISPLAY_MANAGER@,$(DISPLAY_MANAGER)," \ @@ -47,6 +28,10 @@ $(DESTDIR)$(service_directory)/%: service/% -e "s,@XDG_RUNTIME@,$(XDG_RUNTIME)," \ -e "s,@DESKTOP_CMDLINE@,$(DESKTOP_CMDLINE)," $@ +$(DESTDIR)$(service_directory)/$(package)/configure/%: module/configure/% + exec $(INSTALL) -D -m 755 $< $@ + sed -i -e 's,@BINDIR@,$(bindir),' $@ + version: @echo $(version) diff --git a/configure b/configure index 9ebc14883caf6dff61e7e2d146a132cfa1465a32..5c22f619056f371dac0c36896a016025ec21daeb 100755 --- a/configure +++ b/configure @@ -16,16 +16,15 @@ 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] - + Fine tunning of boot-user configuration: --DISPLAY_MANAGER=VALUE display manager to use [] --CONSOLE_TRACKER=VALUE console tracker to use [] --XDG_RUNTIME=BOOLEAN create and mount the XDG_RUNTIME directory [!yes] --DESKTOP_CMDLINE=VALUE commandline to use in the .xinitrc file [!jwm] - + 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 @@ -89,7 +88,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' DISPLAY_MANAGER= CONSOLE_TRACKER= XDG_RUNTIME='!yes' @@ -103,7 +101,6 @@ for arg ; do --bindir=*) bindir=${arg#*=} ;; --datarootdir=*) datarootdir=${arg#*=} ;; --with-system-service=*) service_directory=${arg#*=} ;; - --with-system-module=*) module_directory=${arg#*=} ;; --DISPLAY_MANAGER=*) DISPLAY_MANAGER=${arg#*=} ;; --CONSOLE_TRACKER=*) CONSOLE_TRACKER=${arg#*=} ;; --XDG_RUNTIME=*) XDG_RUNTIME=${arg#*=} ;; @@ -124,14 +121,14 @@ fi # Expand installation directories stripdir prefix for i in exec_prefix bindir datarootdir \ - service_directory module_directory ; do + 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 $DISPLAY_MANAGER $CONSOLE_TRACKER diff --git a/service/boot-user@ b/module/boot-user@ similarity index 80% rename from service/boot-user@ rename to module/boot-user@ index 5848dff41adf65770ecbb435102534426d220fc0..d447d19f0f33981713907f384d4126f7533827e1 100644 --- a/service/boot-user@ +++ b/module/boot-user@ @@ -5,15 +5,16 @@ @user = ( root ) @options = ( env ) @depends = ( scandir@@I ) +@intree = session [regex] @configure = "@I" @infiles = ( ::@version@=@VERSION@ ) [environment] -## Uncomment it to use a display manager. +## Uncomment it to use a display manager. ## Can be any display manager as long as the -## corresponding frontend file exist on your system +## corresponding frontend file exist on your system ## e.g sddm,lightdm,... ## It also prepare the .xsession file. @@ -21,7 +22,7 @@ ## Uncomment it to use a console tracker. ## Can be any console tracker as long as the -## corresponding frontend file exist on your system +## corresponding frontend file exist on your system ## e.g consolekit,elogind,... @CONSOLE_TRACKER@ @@ -35,4 +36,4 @@ ## to launch your desktop e.g.: openbox-session. ## If commented the .xinitrc file is not configured. -@DESKTOP_CMDLINE@ +@DESKTOP_CMDLINE@ diff --git a/module/boot-user@/configure/.xinitrc b/module/configure/.xinitrc similarity index 97% rename from module/boot-user@/configure/.xinitrc rename to module/configure/.xinitrc index 95fd77875909b22cace6085c2a8fd7209207ffc0..1b4872ca8720d198af327d42407b087acebf76e9 100755 --- a/module/boot-user@/configure/.xinitrc +++ b/module/configure/.xinitrc @@ -15,7 +15,7 @@ for i in ${list[@]};do done done -66-all up +66 tree start ## Try consolekit if 66-which -q ck-launch-session; then diff --git a/module/boot-user@/configure/.xsession b/module/configure/.xsession similarity index 93% rename from module/boot-user@/configure/.xsession rename to module/configure/.xsession index 0ad28d2c31524eac2e20b29d388fa2007ac6f84c..0a6b1532afd460bb257fc8f7ffcc04e942883502 100755 --- a/module/boot-user@/configure/.xsession +++ b/module/configure/.xsession @@ -8,5 +8,5 @@ for i in ${list[@]};do done done -66-all up +66 tree start diff --git a/module/boot-user@/configure/configure b/module/configure/configure similarity index 83% rename from module/boot-user@/configure/configure rename to module/configure/configure index 97cc33d16ba6318659ba37b84fbca22195c5f063..b0b861c5cb76eaf9f9325641e8a2fe27e677e838 100755 --- a/module/boot-user@/configure/configure +++ b/module/configure/configure @@ -6,6 +6,11 @@ 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" +DEPENDS_PATH="${ACTIVATED_PATH}/depends" + owner="${1}" home=$(homeof "${owner}") uid=$(id -u "${owner}") @@ -25,16 +30,22 @@ check_empty_var(){ fi } +depends(){ + name="${1}" + 66-yeller %badd%n dependency: "${consolekit}" + touch "${DEPENDS_PATH}/${name}" || die "unable to add dependency ${MOD_MODULE_DIR}/service/${name}" +} + enable(){ name="${1}" 66-yeller %benable%n service: "${name}" - touch "${MOD_MODULE_DIR}/service/${name}" || die "unable to enable ${MOD_MODULE_DIR}/service/${1}" + touch "${ACTIVATED_PATH}/${name}" || die "unable to enable ${MOD_MODULE_DIR}/service/${1}" } disable(){ name="${1}" 66-yeller %rdisable%n service: "${name}" - rm -f "${MOD_MODULE_DIR}/service/${name}" || die "disable to enable ${MOD_MODULE_DIR}/service/${1}" + rm -f "${ACTIVATED_PATH}/${name}" || die "disable to enable ${MOD_MODULE_DIR}/service/${1}" } if execl-toc -X -V DISPLAY_MANAGER; then @@ -45,7 +56,7 @@ if execl-toc -X -V DISPLAY_MANAGER; then die "the ${DISPLAY_MANAGER} frontend service file do not exist on your system -- please install it and try again" fi - enable "display-manager@${DISPLAY_MANAGER}" + depends "${DISPLAY_MANAGER}" 66-yeller set environment at .xsession file to: %b"${home_env}"%n sed -i "s:@PATH_ENVIRONMENT@:${home_env}:g" ".xsession" || die "unable to set environment directory at .xsession file" @@ -67,7 +78,7 @@ if execl-toc -X -V CONSOLE_TRACKER; then if ! [ -e "${MOD_SERVICE_ADMDIR}${CONSOLE_TRACKER}" ] && ! [ -e "${MOD_SERVICE_SYSDIR}${CONSOLE_TRACKER}" ]; then die "the ${CONSOLE_TRACKER} frontend service file do not exist on your system -- please install it and try again" fi - enable "console-tracker@${CONSOLE_TRACKER}" + depends "${CONSOLE_TRACKER}" fi if [ "${XDG_RUNTIME}" = "yes" ]; then diff --git a/module/boot-user@/service@/mount-run@ b/module/frontend/mount-run@ similarity index 91% rename from module/boot-user@/service@/mount-run@ rename to module/frontend/mount-run@ index 85825131d69151a5938d760ef90d664045474d80..af526a1661e1c1b72911c6f78c56aeb9f10f603a 100644 --- a/module/boot-user@/service@/mount-run@ +++ b/module/frontend/mount-run@ @@ -3,14 +3,14 @@ @version = @version@ @description = "Mount /run/user directory of user @I" @user = ( root ) -@options = ( log ) + [start] -@execute = +@execute = ( if { 66-yeller -p mount-run@@I starts... } if -nt { - + execl-subuidgid -o @I execl-toc -X -m /run/user/${UID} -o noatime,nodev,nosuid,gid=${GID},uid=${UID},mode=0700,size=64M -t tmpfs -d user } diff --git a/package/info b/package/info index 2b814bde3c935b5acbfaceb1a3f9194b690c5c1b..5a9f8e4cd9faf173ed3bdce062e34fcc6c553174 100644 --- a/package/info +++ b/package/info @@ -1,3 +1,3 @@ -package=boot-user-66serv +package=boot-user version=0.4.3 package_macro_dir=66 diff --git a/package/modes b/package/modes index e67454a858bdb191e68dc33faf79af4c2b3fcbdd..4a830fd41163fa1b031166ac9cc7204a8fac595c 100644 --- a/package/modes +++ b/package/modes @@ -1 +1,3 @@ configure 0755 +.xsession 0755 +.xinitrc 0755 diff --git a/package/targets.mak b/package/targets.mak index e62c5070a6dfc8e8f40ec2e4dfe446b03201fb27..3273c2555a6ae58c26a6390de741376f78b8ab80 100644 --- a/package/targets.mak +++ b/package/targets.mak @@ -1,9 +1,7 @@ SCRIPT_TARGET := \ -module/boot-user@/configure/.xinitrc \ -module/boot-user@/configure/.xsession +module/configure/configure \ +module/configure/.xinitrc \ +module/configure/.xsession +MODULE_TARGET := $(shell find module/ -type f) -SERVICE_TARGET := service/boot-user@ -MODULE_TARGET := $(shell find module/boot-user@/service -type f) -MODULE_INSTANCE_TARGET := $(shell find module/boot-user@/service@ -type f) -MODULE_CONFIGURE_TARGET := module/boot-user@/configure/configure