Bugfix: browsedb.pl didn't parse file "bii_scripts.config" correctly. --> to head
Warning, cannot access the index:
_darcs/index: opening of '_darcs/index' failed: permission denied (Permission denied)
diff -rN -u old-bii_scripts/Makefile new-bii_scripts/Makefile
--- old-bii_scripts/Makefile 2022-11-28 22:20:29.904624173 +0100
+++ new-bii_scripts/Makefile 2022-11-28 22:20:29.908624271 +0100
@@ -707,6 +707,7 @@
echo "PYTHON2LIB_INSTALL_DIR=$(PYTHON2LIB_INSTALL_DIR)" >> $@
echo "PYTHON3LIB_INSTALL_DIR=$(PYTHON3LIB_INSTALL_DIR)" >> $@
echo "HTML_INSTALL_DIR=$(HTML_INSTALL_DIR)" >> $@
+ echo "IDDB_SOURCE=$(IDDB_SOURCE)" >> $@
$(SCRIPT_BUILD_DIR)/%: $(SCRIPT_SRC_DIR)/% | $(SCRIPT_BUILD_DIR)
cp $< $(@D)
diff -rN -u old-bii_scripts/bin/browsedb.pl new-bii_scripts/bin/browsedb.pl
--- old-bii_scripts/bin/browsedb.pl 2022-11-28 22:20:29.908624271 +0100
+++ new-bii_scripts/bin/browsedb.pl 2022-11-28 22:20:29.912624370 +0100
@@ -7354,15 +7354,18 @@
}
open(my $fh, '<:encoding(UTF-8)', $filename)
or die "Could not open file '$filename' $!";
- my $TOP= dirname("$FindBin::RealBin");
while (my $line = <$fh>)
{
chomp $line;
+ if ($Line=~/^\s*#/)
+ { next; }
if ($line!~/([^=]+)=(.*)/)
{ next; }
my $name= $1;
my $val= $2;
- $val=~ s/\$TOP\b/$TOP/g;
+ # recipe for environment replacement from:
+ # https://unix.stackexchange.com/questions/294835/replace-environment-variables-in-a-file-with-their-actual-values
+ $val=~ s{\$(\{)?(\w+)(?(1)\})}{$ENV{$2} // $&}ge;
$bii_config{$name}= $val;
}
close $fh;
diff -rN -u old-bii_scripts/bin/console-get new-bii_scripts/bin/console-get
--- old-bii_scripts/bin/console-get 2022-11-28 22:20:29.908624271 +0100
+++ new-bii_scripts/bin/console-get 2022-11-28 22:20:29.912624370 +0100
@@ -38,27 +38,27 @@
# version of the program:
my_version= "1.1"
-CONSERVER_URL= "http://conserver.acc.bessy.de/conserver/"
+CONSERVER_URL= "https://conserver.trs.bessy.de/"
areas= { \
"blc" : { "description": "(also via ssh)",
"directory" : "blc",
- "ssh" : "conservr@conserver.acc.bessy.de:/var/log/conserver/blc/",
+ "ssh" : "iocadm@conserver.acc.bessy.de:/var/log/conserver/blc/",
},
"id" : { "description": "insertion devices (also via ssh)",
"directory" : "id",
- "ssh" : "conservr@conserver.acc.bessy.de:/var/log/conserver/id/",
+ "ssh" : "iocadm@conserver.acc.bessy.de:/var/log/conserver/id/",
},
"il" : { "directory" : "il" },
"mono" : { "description": "monochromators (also via ssh)",
"directory" : "mono",
- "ssh" : "conservr@conserver.acc.bessy.de:/var/log/conserver/mono/",
+ "ssh" : "iocadm@conserver.acc.bessy.de:/var/log/conserver/mono/",
},
"net" : { "directory" : "net" },
"psd" : { "directory" : "psd" },
"tsc" : { "description": "control system (also via ssh)",
"directory" : "tsc",
- "ssh" : "conservr@conserver.acc.bessy.de:/var/log/conserver/tsc/",
+ "ssh" : "iocadm@conserver.acc.bessy.de:/var/log/conserver/tsc/",
},
"tsc-mls" :{ "description": "mls control system (also via ssh)",
"directory" : "conserver-mls/tsc",
@@ -129,7 +129,8 @@
if not ssh_opt:
# @@@@ subprocess.run doesn't exist on older python (elbe) !!!
for p in glob_patterns:
- syscall(["wget", "--quiet", "-r", "-l1", "--no-parent", "-nd",
+ syscall(["wget", "--no-check-certificate", "--quiet", "-r",
+ "-l1", "--no-parent", "-nd",
CONSERVER_URL + areas[area]["directory"],
"-A", p],
verbose, dry_run)
@@ -217,7 +218,8 @@
else:
mask= glob2rx(pattern) + r"\.log "
syscall(["bash", "-c",
- (r"wget %s -O - --quiet | sed -e 's/<[^>]*>/ /g' | "
+ (r"wget %s -O --no-check-certificate - --quiet | "
+ r"sed -e 's/<[^>]*>/ /g' | "
r"grep '%s' | "
r"sed -e 's/^ *\([^ ]\+\).*/\1/' | sort") % \
(CONSERVER_URL + areas[area]["directory"], mask)],
@@ -246,7 +248,7 @@
extra= "grep "+glob2rx(pattern)+" |"
# pylint: disable=line-too-long
syscall(["bash", "-c",
- (r"wget %s -O - --quiet | "
+ (r"wget %s -O --no-check-certificate - --quiet | "
r"sed -e 's/<[^>]*>/ /g;s/^ *\([^ ]\+\) \+\([^ ]\+\) \+\([^ ]\+\).*/\1 \2 \3/g' | "
r"grep : | %s"
r"column -t" ) % \
@@ -275,16 +277,16 @@
sys.exit("error: unknown area %s. Run '%s -h' for help" % \
(repr(area),script_shortname()))
if options.list:
- list_files(area, pattern, options.ssh,
+ list_files(area, pattern, not options.http,
options.verbose, options.dry_run)
elif options.list_all:
- list_all_files(area, pattern, options.ssh,
+ list_all_files(area, pattern, not options.http,
options.verbose, options.dry_run)
else:
if len(args)>2:
sys.stderr.write("warning: extra arguments ignored: %s" % \
repr(args[2:]))
- get_log_files(area, pattern, options.ssh, options.force,
+ get_log_files(area, pattern, not options.http, options.force,
options.verbose, options.dry_run, options.restrict)
def script_shortname():
@@ -340,10 +342,9 @@
"the output by providing a PATTERN. With --ssh "
"this also displays the file sizes."
)
- parser.add_option("--ssh",
+ parser.add_option("--http",
action="store_true",
- help="Use ssh instead of http. Not available "
- "for all areas.",
+ help="Use http instead of ssh.",
)
parser.add_option("--force",
action="store_true",
diff -rN -u old-bii_scripts/bin/iddb new-bii_scripts/bin/iddb
--- old-bii_scripts/bin/iddb 2022-11-28 22:20:29.908624271 +0100
+++ new-bii_scripts/bin/iddb 2022-11-28 22:20:29.912624370 +0100
@@ -10,20 +10,23 @@
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
-#
+#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
-#
+#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
+# pylint: disable= too-many-lines, consider-using-f-string
+
import sys
import os
import argparse
import re
import pydoc
+import configparser
import socket
import http
@@ -41,14 +44,20 @@
_pyver= (sys.version_info[0], sys.version_info[1])
-if _pyver <= (3,2):
+if _pyver <= (3,4):
HTTPEXCEPTION= http.client.HTTPException
else:
HTTPEXCEPTION= http.client.RemoteDisconnected
DBNAME="id_db"
-HOST="gwc1c.acc.bessy.de"
-PORT=7643
+
+# environment variable IDDB_SOURCE:
+# server:gwc1c.acc.bessy.de:7643
+# file:/opt/OPI/idcp/id_db.SDCyml
+ENV_VAR_NAME="IDDB_SOURCE"
+
+#HOST="gwc1c.acc.bessy.de"
+#PORT=7643
TIMEOUT=5.0 # timeout for XMLRPC
@@ -61,6 +70,175 @@
COLUMNS_STR= " ".join(sorted(COLUMNS))
# -----------------------------------------------
+# read configuration file
+
+BII_SCRIPTS_CONFIG= os.path.join(os.path.dirname(os.path.abspath(__file__)),
+ "bii_scripts.config")
+
+CONFIG_FILE= "iddb.config"
+
+rx_def=re.compile(r'([^=]+)=(.*)')
+rx_comment=re.compile(r'^\s*#')
+
+def read_config(filename):
+ """read config file."""
+ if not os.path.exists(filename):
+ raise IOError("Error, file %s not found" % filename)
+ result= {}
+ with open(filename) as fp: # pylint: disable= unspecified-encoding
+ for line in fp:
+ line= line.strip()
+ if rx_comment.match(line):
+ continue
+ m= rx_def.match(line)
+ if not m:
+ continue
+ name= m.group(1)
+ val= m.group(2).strip()
+ val= os.path.expandvars(val)
+ result[name]= val
+ return result
+
+def read_biiscripts_config():
+ """read bii_scripts.config."""
+ if not os.path.exists(BII_SCRIPTS_CONFIG):
+ sys.stderr.write("Warning: File %s not found\n" % BII_SCRIPTS_CONFIG)
+ return {}
+ return read_config(BII_SCRIPTS_CONFIG)
+
+def get_share_dir():
+ """get SHARE_INSTALL_DIR."""
+ d= read_biiscripts_config()
+ if not d:
+ return None
+ return d["SHARE_INSTALL_DIR"]
+
+# -----------------------------------------------
+# read iddb config file
+
+def iddb_config():
+ """read iddb configuration."""
+ share_dir= get_share_dir()
+ if not share_dir:
+ return None
+ filename= os.path.join(share_dir, "bii_scripts", CONFIG_FILE)
+ if not os.path.exists(filename):
+ sys.stderr.write("Warning: File '%s' not found\n" % filename)
+ return None
+ config = configparser.ConfigParser()
+ config.read(filename)
+ return config
+
+# -----------------------------------------------
+# find sourcespec from hostname
+
+def sourcespec_by_hostname():
+ """get sourcespec by current hostname."""
+ def cget(config,section,key):
+ """read something from configuration data."""
+ if key not in config[section]:
+ return None
+ v= config[section][key].strip()
+ if not v:
+ return None
+ return v
+ # get configuration data from SHARE_INSTALL_DIR/bii_scripts/iddb.config:
+ config_data= iddb_config()
+ if not config_data:
+ return None
+ # get full qualified hostname:
+ fullhostname= socket.getfqdn()
+ # try to find it in the "HOSTS" section of the configuration:
+ if "HOSTS" in config_data:
+ spec= cget(config_data, "HOSTS", fullhostname)
+ if spec:
+ return spec
+ # examine the domain:
+ if "DOMAINS" in config_data:
+ domain= fullhostname
+ while "." in domain:
+ domain= domain.split(".", 1)[1]
+ spec= cget(config_data, "DOMAINS", domain)
+ if spec:
+ return spec
+ # finally examine if there is a default "*" in HOSTS section:
+ if "HOSTS" in config_data:
+ spec= cget(config_data, "HOSTS", "*")
+ if spec:
+ return spec
+ return None
+
+# -----------------------------------------------
+# parse server specification
+
+def parse_server(spec):
+ """parse a server-spec.
+
+ returns:
+ (host, port) # port: an integer
+ raises ValueError on error.
+ """
+ errmsg= "%s has not the form 'HOST:PORT'" % spec
+ l= spec.split(":")
+ if not l:
+ raise ValueError(errmsg)
+ if len(l)!=2:
+ raise ValueError(errmsg)
+ try:
+ l[1]= int(l[1])
+ except ValueError as e:
+ raise ValueError(errmsg) from e
+ return l
+
+def parse_spec(spec):
+ """parse source spec.
+
+ spec: source specification, one of:
+ server:HOST:PORT
+ file:FILENAME
+
+ returns one of:
+ { "host": HOST, "port": PORT}
+ { "filename": FILENAME}
+
+ or raises a ValueError exception
+ """
+ l= spec.split(":", 1)
+ while True:
+ if not l:
+ break
+ if l[0] == "server":
+ try:
+ (host, port)= parse_server(l[1])
+ return {"host": host, "port": port }
+ except ValueError:
+ break
+ if l[0] == "file":
+ if len(l)==2:
+ return { "filename": l[1] }
+ break
+ break
+ raise ValueError("Error, cannot parse source spec '%s'" % spec)
+
+def parse_env():
+ """parse environment variable IDDB_SOURCE.
+
+ returns one of:
+ { "host": HOST, "port": PORT}
+ { "filename": FILENAME}
+ None
+ """
+ var= os.environ.get(ENV_VAR_NAME)
+ if var is None:
+ return None
+ try:
+ return parse_spec(var)
+ except ValueError as e:
+ st= str(e).replace("Error", "Warning")
+ sys.stderr.write(st)
+ return None
+
+# -----------------------------------------------
# Database access by file loading and StructuredData libraries
class DbFile:
@@ -89,6 +267,9 @@
def db_txt_find(self,pattern,paths=""):
"""execute StructuredData "txt.find" command."""
return self.txt.find(pattern,"aligned",paths,self.SDC)
+ def db_txt_rxfind(self,pattern,paths=""):
+ """execute StructuredData "txt.rxfind" command."""
+ return self.txt.rxfind(pattern,"aligned",paths,self.SDC)
def db_paths(self,pattern,paths=""):
"""execute StructuredData "paths" command."""
return self.fun.paths(pattern,paths,self.SDC)
@@ -127,6 +308,13 @@
except (http.client.RemoteDisconnected,
socket.gaierror, socket.timeout) as e:
sys.exit(self.errmsg(str(e)))
+ def db_txt_rxfind(self,pattern,paths=""):
+ """execute StructuredData "txt.rxfind" command."""
+ try:
+ return self.XML_OBJ.txt.rxfind(pattern,"aligned",paths,DBNAME)
+ except (http.client.RemoteDisconnected,
+ socket.gaierror, socket.timeout) as e:
+ sys.exit(self.errmsg(str(e)))
def db_paths(self,pattern,paths=""):
"""execute StructuredData "paths" command."""
try:
@@ -144,7 +332,7 @@
except xmlrpc.client.Fault as e:
if "cannot marshal None" in str(e):
# XMLRPC returned None
- # Note: Using "allow_none= True" in
+ # Note: Using "allow_none= True" in
# xmlrpc.client.ServerProxy(self.URL) doesn't seem to avoid
# raising the xmlrpc.client.Fault exception, so we have to
# handle this in a bit more complicated way.
@@ -538,6 +726,7 @@
raise AssertionError("internal error")
# calc sort keys:
+ # pylint: disable=consider-using-dict-items
for k in result:
sk= result[k][sort_column]
if sk==0:
@@ -599,6 +788,23 @@
#print("\n".join(db_txt_find(pattern, paths)))
#console_print_table(t, heading=None)
+def cmd_rxfind(db_obj, dbquery, args, rest):
+ """perform "rxfind" command."""
+ if not rest:
+ pattern=".*"
+ else:
+ pattern= rest[0]
+ paths=""
+ if len(rest)>1:
+ paths= rest[1:]
+ if args.id:
+ id_key= dbquery.find_sd_key(args.id)
+ pattern= r"id-data\.%s\.%s" % (id_key, pattern)
+
+ print(db_obj.db_txt_rxfind(pattern, paths))
+ #print("\n".join(db_txt_rxfind(pattern, paths)))
+ #console_print_table(t, heading=None)
+
def cmd_get(db_obj, dbquery, args, rest):
"""perform "find" command."""
if not rest:
@@ -626,7 +832,7 @@
#print("rest:",rest)
# pylint: disable= global-statement, too-many-return-statements
# pylint: disable= too-many-branches, too-many-statements
- global HOST, PORT
+ # pylint: disable= too-many-locals
if args.summary:
print_summary()
sys.exit(0)
@@ -635,23 +841,50 @@
pydoc.pager(helptext)
sys.exit(0)
- dbobj= None
+ source_spec= None
+
if args.file:
- dbobj= DbFile(args.file)
- else:
- if args.server:
- errmsg= "%s has not the form 'HOST:PORT'" % args.server
- if not ":" in args.server:
- sys.exit(errmsg)
- l= args.server.split(":")
- if len(l)!=2:
- sys.exit(errmsg)
- HOST= l[0]
+ source_spec= {"filename": args.file }
+ if args.server:
+ if args.file:
+ sys.exit("contradicting options: -f --server")
+ try:
+ (host, port)= parse_server(args.server)
+ except ValueError as e:
+ sys.exit(str(e)+" (option --server)")
+ source_spec= { "host": host, "port": port }
+
+ # Try to parse data source from environment variable. parse_env() may
+ # return None:
+ if not source_spec:
+ source_spec= parse_env()
+
+ if not source_spec:
+ # reads iddb configuration file:
+ sp= sourcespec_by_hostname()
+ if sp:
try:
- PORT= int(l[1])
- except ValueError:
- sys.exit(errmsg)
- dbobj= DbXML(HOST, PORT)
+ source_spec= parse_spec(sp)
+ except ValueError as e:
+ sys.exit(str(e)+" (configuration file)")
+
+ if not source_spec:
+ sys.exit(("Error, no source specified.\n"
+ "You must either:\n"
+ "- set environment variable '%s'\n"
+ "- provide a StructuredData file with option '-f'\n"
+ "- provide a server with option --server\n"
+ "- define %s in file:\n"
+ " %s") % \
+ (ENV_VAR_NAME, ENV_VAR_NAME, CONFIG_FILE))
+
+ dbobj= None
+ if "filename" in source_spec:
+ dbobj= DbFile(source_spec["filename"])
+ elif "host" in source_spec:
+ dbobj= DbXML(source_spec["host"], source_spec["port"])
+ else:
+ raise AssertionError("unexpected sourcespec: %s" % repr(source_spec))
dbquery= Query(dbobj)
@@ -705,6 +938,9 @@
if rest[0]== "find":
cmd_find(dbobj, dbquery, args, rest[1:])
return
+ if rest[0]== "rxfind":
+ cmd_rxfind(dbobj, dbquery, args, rest[1:])
+ return
if rest[0]== "get":
cmd_get(dbobj, dbquery, args, rest[1:])
return
@@ -725,7 +961,14 @@
DESC= '''
Show insertion device properties by querying the StructuredData database.
-Known commands:
+If no command is given, the program performs the "list" command.
+
+Commands
+--------
+
+Commands for undulator properties
++++++++++++++++++++++++++++++++++
+
name NAME [NAME ...]
Get the StructuredData name for the given insertion device. NAME may be
any common name that specifes an insertion device like: U49ID4R u49id4r
@@ -757,11 +1000,13 @@
%(all_columns)s
Unless option --sort-by is used, sort the results by the first column.
-Raw StructuredData access (note: most options except "--id" are ignore
-for these commands).
+Commands for raw StructuredData access
+++++++++++++++++++++++++++++++++++++++
-Option -i IDNAME causes "id_data.NAME." to be prepended to PATTERN, where
-"NAME" is the StructuredData undulator name
+Note: most options except "--id" are ignore for these commands.
+
+Note: Option -i IDNAME causes "id_data.NAME." to be prepended to PATTERN, where
+ "NAME" is the StructuredData undulator name
paths PATTERN [PATHS]
Execute StructuredData "paths" command.
@@ -769,17 +1014,54 @@
find PATTERN [PATHS]
Execute StructuredData "find" command.
Example: iddb --id ue112 find 'names.*'
+ rxfind PATTERN [PATHS]
+ Execute StructuredData "rxfind" command. PATTERN is a regular
+ expression here. Usually your pattern should start with '.*'.
+ Example: iddb --id ue112 find '.*device'
get PATTERN [PATHS]
Execute StructuredData "get" command.
Example: iddb --id ue112 get 'names.*'
+Specification of the data source
+--------------------------------
+
+The data source is specified by order of precedence by these methods:
+
+ - options '-f' or '--server'
+ - environment variable 'IDDB_SOURCE'
+ - configuration file $SHARE_INSTALL_DIR/bii_scripts/iddb.config
+
+Environment variable 'IDDB_SOURCE'
+++++++++++++++++++++++++++++++++++
+
+ One of the strings:
+ - server:HOST:PORT
+ - file:FILENAME
+
+Configuration file
+++++++++++++++++++
+
+The configuration file is located at $SHARE_INSTALL_DIR/bii_scripts/iddb.config.
+$SHARE_INSTALL_DIR is the location of the 'share' directory.
+
+This is a file in windows-ini format. Source specifications have that same
+format as for the environment variable 'IDDB_SOURCE' (see above).
+
+Section [HOSTS] contains source specifications specific host names,
+ '*' is a default for all hosts.
+Section [DOMAINS] contains source specifications specific domains. Partial
+ matches of domains are supported, e.g. 'mycompany.com' matches
+ 'subnet1.mycompany.com'
+
+Further documentation
+---------------------
+
StructuredData paths in general are described here:
https://yaml-structureddata.sourceforge.io/reference.html#paths
The Insertion device database is described here:
http://wiki.trs.bessy.de/bin/view/Controls/IdcpDb
-If no command is given, the program performs the "list" command.
''' % {"all_columns": COLUMNS_STR, "def_columns": DEFAULT_COLUMNS_STR}
def script_shortname():
@@ -844,10 +1126,8 @@
metavar="STATUS"
)
parser.add_argument("--server",
- help=("specify the StructuredData XML-RPC "
- "server in the form 'HOST:PORT'. The "
- "default is %s:%s") % \
- (HOST, PORT),
+ help="specify the StructuredData XML-RPC "
+ "server in the form 'HOST:PORT'",
metavar="SERVER"
)
parser.add_argument("-r", "--raw",
@@ -857,9 +1137,9 @@
)
parser.add_argument("-f", "--file",
help="Load STRUCTUREDDATAFILE instead of contacting "
- "the XMLRPC server. Note: For this the "
+ "an XMLRPC server. Note: For this the "
"StructuredData python modules must be "
- "installed.",
+ "installed on your system.",
metavar="STRUCTUREDDATAFILE"
)
diff -rN -u old-bii_scripts/bin/makeDocTxt.pl new-bii_scripts/bin/makeDocTxt.pl
--- old-bii_scripts/bin/makeDocTxt.pl 2022-11-28 22:20:29.908624271 +0100
+++ new-bii_scripts/bin/makeDocTxt.pl 2022-11-28 22:20:29.912624370 +0100
@@ -47,7 +47,7 @@
my $usage = "makeDocTxt.pl [OPTIONS] infile.txt [outfile.html]\n".
" Create an html-document from a .txt-file with special format style\n".
- " for details see http://www-old.bessy.de/~kuner/makeDocs/makeDocEn.html\n".
+ " for details see http://help.bessy.de/~kuner/makeDocs/makeDocEn.html\n".
"OPTIONS: \n";
diff -rN -u old-bii_scripts/config.bullseye.acc.bessy.de new-bii_scripts/config.bullseye.acc.bessy.de
--- old-bii_scripts/config.bullseye.acc.bessy.de 2022-11-28 22:20:29.904624173 +0100
+++ new-bii_scripts/config.bullseye.acc.bessy.de 2022-11-28 22:20:29.908624271 +0100
@@ -9,9 +9,9 @@
# do not use ssh for rsync:
INSTALL_RSYNC_HOST=
# Rsync options, you usually don't have to change these:
-INSTALL_RSYNC_OPTS=-crlEogC --chmod=Fa+r --groupmap=*:scrptdev
+INSTALL_RSYNC_OPTS=-crlEogC --chmod=Fa+r --groupmap=*:coredev
# Directory creation command. A make function, $(1) is the directory list:
-INSTALL_MKDIR=sg scrptdev -c "mkdir -m 775 -p $(1)"
+INSTALL_MKDIR=sg coredev -c "mkdir -m 775 -p $(1)"
# Rsync configuration HTML file installation:
# Rsync destination, may be "localhost", HOST or USER@HOST. If left empty
diff -rN -u old-bii_scripts/lib/python/bii_scripts3/parse_subst.py new-bii_scripts/lib/python/bii_scripts3/parse_subst.py
--- old-bii_scripts/lib/python/bii_scripts3/parse_subst.py 2022-11-28 22:20:29.908624271 +0100
+++ new-bii_scripts/lib/python/bii_scripts3/parse_subst.py 2022-11-28 22:20:29.912624370 +0100
@@ -591,7 +591,6 @@
pos= m.end()
#curr_file_list_defs= dict(global_defs)
pattern_name_list= []
- pattern_value_list= []
state.append("pattern")
continue
m= rx_bracket1.match(all_, pos)
@@ -627,6 +626,8 @@
state.append("pattern names")
else:
state.append("pattern vars")
+ # initialize list of values with an empty list:
+ pattern_value_list= []
continue
m= rx_bracket2.match(all_, pos)
if m:
diff -rN -u old-bii_scripts/share/bii_scripts/iddb.config new-bii_scripts/share/bii_scripts/iddb.config
--- old-bii_scripts/share/bii_scripts/iddb.config 1970-01-01 01:00:00.000000000 +0100
+++ new-bii_scripts/share/bii_scripts/iddb.config 2022-11-28 22:20:29.912624370 +0100
@@ -0,0 +1,16 @@
+# iddb source specifications for specific hosts or
+# domains.
+
+[HOSTS]
+# source specifications for hosts
+# '*' is a default when no other match is found
+
+* =
+orange = server:gwc2c.acc.bessy.de:7643
+
+[DOMAINS]
+# source specifications for domains
+# these may also be partial domains, e.g.
+# "mycompany.com" matches "subnet1.mycompany.com"
+
+bessy.de = server:gwc2c.acc.bessy.de:7643
patch 682779c9a37cc864496afa2e750235567398e635
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Tue Oct 18 10:40:59 CEST 2022
* iddb now supports the StructuredData "rxfind" command.
patch f8b4bdf4c80242a1776980473024f34f3335a4cc
Author: Bernhard.Kuner@bessy.de
Date: Wed Sep 28 11:53:20 CEST 2022
* bin/makeDocTxt.pl: Fix help link www-old.bessy.de
patch 6eefab602cfbc332d4472b6254e382d0da5a7baa
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Fri Sep 23 09:01:23 CEST 2022
* Bugfix in parse_subst.py: The "pattern" statement wasn't parsed correctly.
patch e41a0b29e5d713617e944781cb2a53c8b26c4a01
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Wed Aug 31 12:35:59 CEST 2022
* console-get: Fix http access and ssh access, make ssh access the default.
patch e61af60a04f53aaa0de7733d0ce97277c93a56ea
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Thu Jun 30 09:39:05 CEST 2022
* iddb: gwc2c.acc.bessy.de is now the XMLRPC server.
patch 94f4dbfb9805126be56ac12fb77c2b0698a73860
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Mon Jun 27 18:12:39 CEST 2022
* Bugfix in iddb: This wasn't compatible with Python 3.4.
patch ecdfdbe813212235750f236fcff9821cac9e70ad
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Mon Jun 27 09:36:00 CEST 2022
* Install with group "coredev" instead of group "scrptdev" on host bullseye.
patch 057cbb7fa1fc1d67087f767dc4b0275b9e391975
Author: Goetz.Pfeiffer@helmholtz-berlin.de
Date: Mon Jun 27 09:29:32 CEST 2022
* iddb: Change for compatibility with python 3.2.3 (host elbe).
patch 1b457e1b596f50c1601c267966359ae9a119e4d1
Author: Goetz Pfeiffer <Goetz.Pfeiffer@helmholtz-berlin.de>
Date: Mon Jun 27 09:25:01 CEST 2022
* iddb now has a more generic source specification.
The data source is no longer hard-coded in the progrem but can be set by
command line options, an environment variable and a configuration file in the
"share" directory.
The configuration file allows specification of the data source dependent on the
hostname or the domain name.
patch c531b66332997fbefc0b81dc7f35e3994a920b7a
Author: Goetz Pfeiffer <Goetz.Pfeiffer@helmholtz-berlin.de>
Date: Mon Jun 27 09:25:00 CEST 2022
* Bugfix: browsedb.pl didn't parse file "bii_scripts.config" correctly.
Now all environment variables in bii_scripts.config are replaced, not just
variable '$TOP'