[med-svn] [Git][med-team/gnumed-server][master] 5 commits: routine-update: New upstream version

Andreas Tille (@tille) gitlab at salsa.debian.org
Wed Dec 27 12:06:10 GMT 2023



Andreas Tille pushed to branch master at Debian Med / gnumed-server


Commits:
ebc2d955 by Andreas Tille at 2023-12-27T12:22:26+01:00
routine-update: New upstream version

- - - - -
d8066ef4 by Andreas Tille at 2023-12-27T12:22:27+01:00
New upstream version 22.27
- - - - -
59a789f1 by Andreas Tille at 2023-12-27T12:22:55+01:00
Update upstream source from tag 'upstream/22.27'

Update to upstream version '22.27'
with Debian dir ec56c572cd0584b5c34d77aee11c5007ea32022d
- - - - -
45c04f80 by Andreas Tille at 2023-12-27T12:35:02+01:00
Install systemd files

- - - - -
0fcddc79 by Andreas Tille at 2023-12-27T12:36:39+01:00
Upload to unstable

- - - - -


9 changed files:

- debian/changelog
- debian/install
- server/doc/schema/gnumed-entire_schema.html
- + server/gm-backup_and_zip_database
- + server/gm-backup_and_zip_database.service
- + server/gm-backup_and_zip_database.timer
- server/pycommon/gmCfg.py
- server/pycommon/gmLog2.py
- server/sql/v21-v22/fixups/v22-release_notes-fixup.sql


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+gnumed-server (22.27-1) unstable; urgency=medium
+
+  * New upstream version
+  * Install systemd files
+
+ -- Andreas Tille <tille at debian.org>  Wed, 27 Dec 2023 12:29:46 +0100
+
 gnumed-server (22.26-1) unstable; urgency=medium
 
   * New upstream version


=====================================
debian/install
=====================================
@@ -6,3 +6,6 @@ server/gm-set_gm-dbo_password		usr/sbin
 debian/conf/*				etc/gnumed
 server/gm-pg_upgradecluster-helper	etc/postgresql-common/pg_upgradecluster.d/
 server/etc/gnumed/gnumed-restore.conf	etc/gnumed
+server/gm-backup_and_zip_database.service	usr/lib/systemd/system/
+server/gm-backup_and_zip_database.timer		usr/lib/systemd/system/
+server/gm-backup_and_zip_database		usr/sbin


=====================================
server/doc/schema/gnumed-entire_schema.html
=====================================
@@ -112,7 +112,7 @@
 <body>
 
 <!-- Primary Index -->
-<p><br><br>Dumped on 2023-11-18</p>
+<p><br><br>Dumped on 2023-12-25</p>
 <h1><a name="index">Index of database - gnumed_v22</a></h1>
 <ul>
   


=====================================
server/gm-backup_and_zip_database
=====================================
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# take care of daily backup of GNUmed database
+# to be run by cron/anacron/systemd.timer/...
+#
+# install into /usr/sbin/
+
+# backup data
+DOBACKUP=/usr/sbin/gm-backup
+
+# compress and sign backup(s)
+ZIPSIGN=/usr/sbin/gm-zip+sign_backups
+
+if [ -x "$DOBACKUP" ] ; then
+    $DOBACKUP
+fi
+
+if [ -x "$ZIPSIGN" ] ; then
+    $ZIPSIGN
+fi


=====================================
server/gm-backup_and_zip_database.service
=====================================
@@ -0,0 +1,7 @@
+[Unit]
+Description="GNUmed database backup service"
+Requires=gm-backup_and_zip_database.timer
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/gm-backup_and_zip_database


=====================================
server/gm-backup_and_zip_database.timer
=====================================
@@ -0,0 +1,12 @@
+[Unit]
+Description="GNUmed database backup timer"
+
+[Timer]
+Unit=gm-backup_and_zip_database.service
+# once daily
+OnCalendar=*-*-* 00:00:01
+# fire once immediately upon timer activation if would have fired during power down
+Persistent=yes
+
+[Install]
+WantedBy=timers.target


=====================================
server/pycommon/gmCfg.py
=====================================
@@ -314,6 +314,7 @@ limit 1""" % where_clause
 			_log.warning('option definition for [%s] not in config database' % alias)
 			return None
 		return rows[0][0]
+
 	#----------------------------
 	def set(self, workplace = None, cookie = None, option = None, value = None):
 		"""Set (insert or update) option value in database.
@@ -361,7 +362,7 @@ limit 1""" % where_clause
 			rows, idx = gmPG2.run_rw_queries(link_obj=rw_conn, queries=[{'cmd': cmd, 'args': args}], return_data=True)
 			result = rows[0][0]
 		except Exception:
-			_log.exception('cannot set option')
+			_log.exception('cannot set option: [%s] = <%s>::<%s>' % (option, opt_value, sql_type_cast))
 			result = False
 
 		rw_conn.commit()		# will rollback if transaction failed


=====================================
server/pycommon/gmLog2.py
=====================================
@@ -68,6 +68,7 @@ import calendar
 
 _logfile_name = None
 _logfile = None
+_logfile_name_printed = False
 
 
 # table used for cooking non-printables
@@ -240,6 +241,15 @@ def log_step(level:int=logging.DEBUG, message:str=None, restart:bool=False):
 		logger.log(level, '%s', __current_log_step)
 	__current_log_step += 1
 
+#---------------------------------------------------------------
+def print_logfile_name():
+	global _logfile_name_printed
+	if _logfile_name_printed:
+		return
+
+	print('Log file:', _logfile_name)
+	_logfile_name_printed = True
+
 #===============================================================
 # internal API
 #===============================================================
@@ -359,7 +369,7 @@ if __name__ == '__main__':
 
 	#-----------------------------------------------------------
 	def test():
-		print(_logfile_name)
+		print_logfile_name()
 		log_step(message = 'testing')
 		logger = logging.getLogger('gmLog2.test')
 		log_step()


=====================================
server/sql/v21-v22/fixups/v22-release_notes-fixup.sql
=====================================
@@ -17,17 +17,24 @@ INSERT INTO dem.message_inbox (
 ) VALUES (
 	(select pk from dem.staff where db_user = 'any-doc'),
 	(select pk_type from dem.v_inbox_item_type where type = 'memo' and category = 'administrative'),
-	'Release Notes for GNUmed 1.8.16 (database v22.26)',
-	'GNUmed 1.8.16 Release Notes:
+	'Release Notes for GNUmed 1.8.17 (database v22.27)',
+	'GNUmed 1.8.17 Release Notes:
 
-	1.8.16
+	1.8.17
 
-FIX: SQL plugin: exception on faulty query
-FIX: meds plugin: grid selection constant names
-FIX: gtk: do not abort on sizer flags inconsistencies in production code
+FIX: patient search exception
+FIX: OOo startup exception
+FIX: placeholders today/date_of_birth/name parsing if no format given
+FIX: logging of invalid form templates
+FIX: logging of invalid address data
 
-IMPROVED: plugin PACS: layout
+IMPROVED: EMR browser: link document review dlg from document nodes
+IMPROVED: configuration: logging of set-option failures
+
+	22.27
+
+NEW: add systemd .timer/.service files for scheduling database backup
 ');
 
 -- --------------------------------------------------------------
-select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.26 at 1.8.16');
+select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.27 at 1.8.17');



View it on GitLab: https://salsa.debian.org/med-team/gnumed-server/-/compare/3036920b9324d9ce6fe766b021996786cca3fb92...0fcddc7979d66fe8c2205e7edfbd5c80d1f7db5a

-- 
View it on GitLab: https://salsa.debian.org/med-team/gnumed-server/-/compare/3036920b9324d9ce6fe766b021996786cca3fb92...0fcddc7979d66fe8c2205e7edfbd5c80d1f7db5a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231227/8a4c3b00/attachment-0001.htm>


More information about the debian-med-commit mailing list