initial commit of file from CVS for e-smith-lib-compspec on Wed 12 Jul 08:59:06 BST 2023
This commit is contained in:
parent
74695379c2
commit
a6c741e33f
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*.rpm
|
||||||
|
*.log
|
||||||
|
*spec-20*
|
||||||
|
*.tar.xz
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Makefile for source rpm: e-smith-lib-compspec
|
||||||
|
# $Id: Makefile,v 1.1 2016/02/05 22:42:01 stephdl Exp $
|
||||||
|
NAME := e-smith-lib-compspec
|
||||||
|
SPECFILE = $(firstword $(wildcard *.spec))
|
||||||
|
|
||||||
|
define find-makefile-common
|
||||||
|
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||||
|
|
||||||
|
ifeq ($(MAKEFILE_COMMON),)
|
||||||
|
# attept a checkout
|
||||||
|
define checkout-makefile-common
|
||||||
|
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(MAKEFILE_COMMON)
|
16
README.md
16
README.md
@ -1,3 +1,17 @@
|
|||||||
# e-smith-lib-compspec
|
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> e-smith-lib-compspec
|
||||||
|
|
||||||
SMEServer Koozali developed git repo for e-smith-lib-compspec smeserver
|
SMEServer Koozali developed git repo for e-smith-lib-compspec smeserver
|
||||||
|
|
||||||
|
## Wiki
|
||||||
|
<br />https://wiki.koozali.org/
|
||||||
|
|
||||||
|
## Bugzilla
|
||||||
|
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-lib-compspec&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||||
|
*Once it has been checked, then this comment will be deleted*
|
||||||
|
<br />
|
||||||
|
|
||||||
|
e-smith-lib-compspec is a software library developed by the e-smith Corporation. It is an open-source library that contains a variety of components used for software development. It can be used to easily create specifications for web applications, databases, scripting and other programming tasks. It allows developers to quickly and easily create specifications for their application by providing a comprehensive set of components with detailed documentation. The library also allows developers to easily and quickly manage and update their specifications as their application evolves. In addition, e-smith-lib-compspec also provides a platform to help developers create and maintain efficient interfaces between their applications and other software components.
|
||||||
|
0
additional/debugfiles.list
Normal file
0
additional/debugfiles.list
Normal file
0
additional/debugsources.list
Normal file
0
additional/debugsources.list
Normal file
93
additional/e-smith-lib-compspec.spec
Normal file
93
additional/e-smith-lib-compspec.spec
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
# $Id: e-smith-lib-compspec.spec,v 1.2 2008/10/07 18:42:14 slords Exp $
|
||||||
|
|
||||||
|
Summary: bash completion specifications for e-smith-lib utilities
|
||||||
|
%define name e-smith-lib-compspec
|
||||||
|
Name: %{name}
|
||||||
|
%define version 2.4.0
|
||||||
|
%define release 1
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}%{?dist}
|
||||||
|
License: GPL
|
||||||
|
Group: Networking/Daemons
|
||||||
|
Source: %{name}-%{version}.tar.xz
|
||||||
|
BuildRoot: /var/tmp/e-smith-buildroot
|
||||||
|
BuildArchitectures: noarch
|
||||||
|
Requires: e-smith-lib
|
||||||
|
BuildRequires: e-smith-devtools
|
||||||
|
AutoReqProv: no
|
||||||
|
|
||||||
|
%description
|
||||||
|
e-smith module containing bash completion specifications for the
|
||||||
|
e-smith-lib command-line utilities (db, config, expand-template, signal-event).
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
||||||
|
rm -f %{name}-%{version}-filelist
|
||||||
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT |
|
||||||
|
grep -v test.pl > %{name}-%{version}-filelist
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files -f %{name}-%{version}-filelist
|
||||||
|
%defattr(-,root,root)
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Jan 25 2013 Shad L. Lords <slords@mail.com> 2.4.0-1.sme
|
||||||
|
- Roll new stream for sme9
|
||||||
|
|
||||||
|
* Tue Oct 7 2008 Shad L. Lords <slords@mail.com> 2.2.0-1.sme
|
||||||
|
- Roll new stream to separate sme7/sme8 trees [SME: 4633]
|
||||||
|
|
||||||
|
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
|
||||||
|
- Clean up spec so package can be built by koji/plague
|
||||||
|
|
||||||
|
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
|
||||||
|
- Update to new release naming. No functional changes.
|
||||||
|
- Make Packager generic
|
||||||
|
|
||||||
|
* Thu Mar 16 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.0-01
|
||||||
|
- Roll stable stream version. [SME: 1016]
|
||||||
|
|
||||||
|
* Wed Nov 30 2005 Gordon Rowell <gordonr@gormand.com.au> 0.3.0-05
|
||||||
|
- Bump release number only
|
||||||
|
|
||||||
|
* Mon Jul 18 2005 Charlie Brady <charlieb@e-smith.com>
|
||||||
|
- [0.3.0-04]
|
||||||
|
- Be prepared for move of dbs to /home/e-smith/db [SF: 1216546]
|
||||||
|
|
||||||
|
* Fri Jul 15 2005 Tony Clayton <apc@e-smith.com>
|
||||||
|
- [0.3.0-03]
|
||||||
|
- Fix db/signal-event completion algorithms
|
||||||
|
- Optimize expand-template completion algorithm
|
||||||
|
|
||||||
|
* Tue Feb 24 2004 Tony Clayton <apc@e-smith.com>
|
||||||
|
- [0.3.0-02]
|
||||||
|
- Streamline completion algorithms for faster execution
|
||||||
|
|
||||||
|
* Tue Feb 24 2004 Tony Clayton <apc@e-smith.com>
|
||||||
|
- [0.3.0-01]
|
||||||
|
- Changing version to development stream number - 0.3.0
|
||||||
|
|
||||||
|
* Thu Jun 26 2003 Charlie Brady <charlieb@e-smith.com>
|
||||||
|
- [0.2.0-01]
|
||||||
|
- Changing version to stable stream number - 0.2.0
|
||||||
|
|
||||||
|
* Wed Jul 24 2002 Tony Clayton <apc@e-smith.com>
|
||||||
|
- [0.1.2-01]
|
||||||
|
- Imported into CVS, fixed description [tonyc 3819]
|
||||||
|
|
||||||
|
* Tue Jun 04 2002 Tony Clayton <tonyc@e-smith.com>
|
||||||
|
- [0.1.1-01]
|
||||||
|
- remove %post and %postun sections
|
||||||
|
|
||||||
|
* Tue May 07 2002 Tony Clayton <tonyc@e-smith.com>
|
||||||
|
- [0.1.0-01]
|
||||||
|
- initial release.
|
1
contriborbase
Normal file
1
contriborbase
Normal file
@ -0,0 +1 @@
|
|||||||
|
sme10
|
115
e-smith-lib-compspec.spec
Normal file
115
e-smith-lib-compspec.spec
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
# $Id: e-smith-lib-compspec.spec,v 1.4 2022/04/06 20:22:27 jpp Exp $
|
||||||
|
|
||||||
|
Summary: bash completion specifications for e-smith-lib utilities
|
||||||
|
%define name e-smith-lib-compspec
|
||||||
|
Name: %{name}
|
||||||
|
%define version 2.6.0
|
||||||
|
%define release 5
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}%{?dist}
|
||||||
|
License: GPL
|
||||||
|
Group: Networking/Daemons
|
||||||
|
Source: %{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
BuildRoot: /var/tmp/e-smith-buildroot
|
||||||
|
BuildArchitectures: noarch
|
||||||
|
Requires: e-smith-lib
|
||||||
|
BuildRequires: e-smith-devtools
|
||||||
|
AutoReqProv: no
|
||||||
|
|
||||||
|
%description
|
||||||
|
e-smith module containing bash completion specifications for the
|
||||||
|
e-smith-lib command-line utilities (db, config, expand-template, signal-event).
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup
|
||||||
|
mkdir -p root/etc/e-smith/events/%{name}-update
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
||||||
|
rm -f %{name}-%{version}-filelist
|
||||||
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT |
|
||||||
|
grep -v test.pl > %{name}-%{version}-filelist
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files -f %{name}-%{version}-filelist
|
||||||
|
%defattr(-,root,root)
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jul 12 2023 cvs2git.sh aka Brian Read <brianr@koozali.org> 2.6.0-5.sme
|
||||||
|
- Roll up patches and move to git repo [SME: 12338]
|
||||||
|
|
||||||
|
* Wed Jul 12 2023 BogusDateBot
|
||||||
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
||||||
|
by assuming the date is correct and changing the weekday.
|
||||||
|
|
||||||
|
* Wed Apr 06 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-4.sme
|
||||||
|
- fix last dot erased on completion [SME: 11368]
|
||||||
|
- error on incorect cmd input [SME: 4661]
|
||||||
|
|
||||||
|
* Sat Feb 20 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-3.sme
|
||||||
|
- allow easy access to templates.metadata to expand desired files [SME: 11312]
|
||||||
|
|
||||||
|
* Wed Jan 06 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-2.sme
|
||||||
|
- add update event [SME: 11142]
|
||||||
|
|
||||||
|
* Fri Feb 05 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme
|
||||||
|
- Initial release to sme10
|
||||||
|
|
||||||
|
* Fri Jan 25 2013 Shad L. Lords <slords@mail.com> 2.4.0-1.sme
|
||||||
|
- Roll new stream for sme9
|
||||||
|
|
||||||
|
* Tue Oct 7 2008 Shad L. Lords <slords@mail.com> 2.2.0-1.sme
|
||||||
|
- Roll new stream to separate sme7/sme8 trees [SME: 4633]
|
||||||
|
|
||||||
|
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
|
||||||
|
- Clean up spec so package can be built by koji/plague
|
||||||
|
|
||||||
|
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
|
||||||
|
- Update to new release naming. No functional changes.
|
||||||
|
- Make Packager generic
|
||||||
|
|
||||||
|
* Thu Mar 16 2006 Gordon Rowell <gordonr@gormand.com.au> 1.2.0-01
|
||||||
|
- Roll stable stream version. [SME: 1016]
|
||||||
|
|
||||||
|
* Wed Nov 30 2005 Gordon Rowell <gordonr@gormand.com.au> 0.3.0-05
|
||||||
|
- Bump release number only
|
||||||
|
|
||||||
|
* Mon Jul 18 2005 Charlie Brady <charlieb@e-smith.com>
|
||||||
|
- [0.3.0-04]
|
||||||
|
- Be prepared for move of dbs to /home/e-smith/db [SF: 1216546]
|
||||||
|
|
||||||
|
* Fri Jul 15 2005 Tony Clayton <apc@e-smith.com>
|
||||||
|
- [0.3.0-03]
|
||||||
|
- Fix db/signal-event completion algorithms
|
||||||
|
- Optimize expand-template completion algorithm
|
||||||
|
|
||||||
|
* Tue Feb 24 2004 Tony Clayton <apc@e-smith.com>
|
||||||
|
- [0.3.0-02]
|
||||||
|
- Streamline completion algorithms for faster execution
|
||||||
|
|
||||||
|
* Tue Feb 24 2004 Tony Clayton <apc@e-smith.com>
|
||||||
|
- [0.3.0-01]
|
||||||
|
- Changing version to development stream number - 0.3.0
|
||||||
|
|
||||||
|
* Thu Jun 26 2003 Charlie Brady <charlieb@e-smith.com>
|
||||||
|
- [0.2.0-01]
|
||||||
|
- Changing version to stable stream number - 0.2.0
|
||||||
|
|
||||||
|
* Wed Jul 24 2002 Tony Clayton <apc@e-smith.com>
|
||||||
|
- [0.1.2-01]
|
||||||
|
- Imported into CVS, fixed description [tonyc 3819]
|
||||||
|
|
||||||
|
* Tue Jun 04 2002 Tony Clayton <tonyc@e-smith.com>
|
||||||
|
- [0.1.1-01]
|
||||||
|
- remove %post and %postun sections
|
||||||
|
|
||||||
|
* Tue May 07 2002 Tony Clayton <tonyc@e-smith.com>
|
||||||
|
- [0.1.0-01]
|
||||||
|
- initial release.
|
0
root/etc/e-smith/events/e-smith-lib-compspec-update/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/e-smith-lib-compspec-update/.gitignore
vendored
Normal file
124
root/etc/profile.d/e-smith-lib_compspec.sh
Normal file
124
root/etc/profile.d/e-smith-lib_compspec.sh
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
_esmith_signal-event ()
|
||||||
|
{
|
||||||
|
if [ ! $(which $1 2>/dev/null) ]; then return 0; fi
|
||||||
|
local cur; cur=${COMP_WORDS[$COMP_CWORD]}
|
||||||
|
|
||||||
|
case $COMP_CWORD in
|
||||||
|
1)
|
||||||
|
COMPREPLY=( $(find /etc/e-smith/events/ -maxdepth 1 -type d \
|
||||||
|
\( -name 'actions' -prune -o \
|
||||||
|
-name "$cur*" -printf "%f\n" \)) )
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
complete -F _esmith_signal-event signal-event
|
||||||
|
|
||||||
|
|
||||||
|
_esmith_expand-template ()
|
||||||
|
{
|
||||||
|
if [ ! $(which $1 2>/dev/null) ]; then return 0; fi
|
||||||
|
local cur; cur=$(echo ${COMP_WORDS[$COMP_CWORD]}| sed 's/\./\\./g')
|
||||||
|
case $COMP_CWORD in
|
||||||
|
1) # need to distinguish between templates and fragments
|
||||||
|
COMPREPLY=( $(find /etc/e-smith/templates \
|
||||||
|
/etc/e-smith/templates-custom \
|
||||||
|
/etc/e-smith/templates.metadata \
|
||||||
|
-regex "/etc/e-smith/templates\(-custom\|.metadata\)?$cur.*" \
|
||||||
|
-printf "[ -f /%P ] && echo /%P\n" \
|
||||||
|
| sh | uniq) )
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
complete -F _esmith_expand-template expand-template
|
||||||
|
|
||||||
|
|
||||||
|
_esmith_db ()
|
||||||
|
{
|
||||||
|
if [ ! $(which $1 2>/dev/null) ]; then return 0; fi
|
||||||
|
local cur; cur=${COMP_WORDS[$COMP_CWORD]}
|
||||||
|
|
||||||
|
local Commands=$(/sbin/e-smith/db 2>&1 | grep "dbfile" | awk '{print $3}')
|
||||||
|
|
||||||
|
case $COMP_CWORD in
|
||||||
|
1) # config file
|
||||||
|
COMPREPLY=( $(find /home/e-smith /home/e-smith/db -maxdepth 1 -type f \
|
||||||
|
\( -name '.*' -prune -o \
|
||||||
|
-name "$cur*" -printf "%f\n" \)) )
|
||||||
|
;;
|
||||||
|
2) # subcommand
|
||||||
|
COMPREPLY=( $(/sbin/e-smith/db 2>&1 | grep "dbfile"|awk '{print $3}' \
|
||||||
|
|grep "^$cur" ) )
|
||||||
|
;;
|
||||||
|
3) # key
|
||||||
|
local file; file=${COMP_WORDS[1]}
|
||||||
|
local cmd; cmd=${COMP_WORDS[2]}
|
||||||
|
local haskey
|
||||||
|
|
||||||
|
echo "$Commands" | grep -q "^$cmd"
|
||||||
|
if [ $? -eq 1 ] ; then
|
||||||
|
COMPREPLY+=("Unknown command '$cmd'" ""); return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
haskey=$(/sbin/e-smith/db 2>&1 | grep "dbfile $cmd" | awk '{print $4}')
|
||||||
|
if [ -n "$haskey" ]; then
|
||||||
|
COMPREPLY=( $(/sbin/e-smith/db $file keys |grep "^$cur") )
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*) # type/prop/val
|
||||||
|
local file; file=${COMP_WORDS[1]}
|
||||||
|
local cmd; cmd=${COMP_WORDS[2]}
|
||||||
|
local key; key=${COMP_WORDS[3]}
|
||||||
|
local i; i=$COMP_CWORD
|
||||||
|
local prev
|
||||||
|
local valtype
|
||||||
|
|
||||||
|
echo "$Commands" | grep -q "^$cmd"
|
||||||
|
if [ $? -eq 1 ] ; then
|
||||||
|
COMPREPLY+=("Unknown command '$cmd'" ""); return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
while [ "$valtype" == "..." ] || [ "$valtype" == "" ]; do
|
||||||
|
prev=${COMP_WORDS[$[i-1]]}
|
||||||
|
PAT='$3'
|
||||||
|
for j in $(seq 4 $[i+1]); do PAT="$PAT,\$$j"; done
|
||||||
|
valtype=$(/sbin/e-smith/db 2>&1 | awk "{print $PAT}" \
|
||||||
|
| grep "^$cmd" | awk "{print \$$[i-1]}")
|
||||||
|
i=$[i-2]
|
||||||
|
done
|
||||||
|
case $(echo "$valtype" |sed -e 's/[][0-9]//g') in
|
||||||
|
"type") COMPREPLY=( $(/sbin/e-smith/db $file gettype $key \
|
||||||
|
| grep "^$cur") )
|
||||||
|
;;
|
||||||
|
"prop")
|
||||||
|
COMPREPLY=( $(/sbin/e-smith/db $file printprop $key \
|
||||||
|
| sed -e 's/=.*//' | grep "^$cur") )
|
||||||
|
;;
|
||||||
|
"val") COMPREPLY=( $(/sbin/e-smith/db $file getprop $key $prev \
|
||||||
|
| grep "^$cur"))
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
complete -F _esmith_db db
|
||||||
|
|
||||||
|
|
||||||
|
_esmith_config ()
|
||||||
|
{
|
||||||
|
cmd=$(echo $1 | sed -e 's/config$/db/')
|
||||||
|
COMP_WORDS=($cmd ${COMP_WORDS[*]})
|
||||||
|
COMP_WORDS[1]=configuration
|
||||||
|
COMP_CWORD=$[ $COMP_CWORD + 1 ]
|
||||||
|
_esmith_db $*
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
complete -F _esmith_config config
|
Loading…
Reference in New Issue
Block a user