[med-svn] [Git][med-team/fis-gtm][master] Upstream fixes to address deprecation of icu-config in favor of
Amul Shah
gitlab at salsa.debian.org
Mon Feb 11 22:11:47 GMT 2019
Amul Shah pushed to branch master at Debian Med / fis-gtm
Commits:
55590e96 by Amul Shah at 2019-02-11T21:48:47Z
Upstream fixes to address deprecation of icu-config in favor of
pkg-config; Address compiler warnings;
- - - - -
5 changed files:
- debian/changelog
- debian/patches/series
- debian/patches/upstream_disable_autorelink
- + debian/patches/upstream_fix_compiler_warnings.patch
- debian/patches/fis-gtm_icu.patch → debian/patches/upstream_icu_pkg_config.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+fis-gtm (6.3-005-2ubuntu1) UNRELEASED; urgency=medium
+
+ * Replace László Böszörményi's patch, thanks for stepping in!
+ * Address compiler warnings
+
+ -- Amul Shah <Amul.Shah at fisglobal.com> Mon, 11 Feb 2019 16:00:01 -0500
+
fis-gtm (6.3-005-2) unstable; urgency=medium
* Do not seek for icu-config which is removed from libicu-dev (Thanks
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+upstream_fix_compiler_warnings.patch
+upstream_icu_pkg_config.patch
upstream_disable_autorelink
upstream_donot_deploy_all_encryption_libs
-fis-gtm_icu.patch
=====================================
debian/patches/upstream_disable_autorelink
=====================================
@@ -10,7 +10,7 @@ Last-Update: 2015-01-14
--- a/sr_unix/gtmprofile.gtc
+++ b/sr_unix/gtmprofile.gtc
-@@ -156,12 +156,12 @@
+@@ -165,12 +165,12 @@
if [ -d $gtm_dist/plugin/o/utf8 ] ; then
gtmroutines=`$gtm_dist/mumps -run %XCMD 'set x=$ztrnlnm("gtm_dist")_"/plugin/o/utf8/*."_$ztrnlnm("tmp_gtm_shlib") for set y=$zsearch(x) quit:""=y write y," "'`"$gtm_dist/plugin/o/utf8($gtm_dist/plugin/r) $gtmroutines"
fi
=====================================
debian/patches/upstream_fix_compiler_warnings.patch
=====================================
@@ -0,0 +1,100 @@
+--- a/sr_unix/gtmcrypt_dbk_ref.c
++++ b/sr_unix/gtmcrypt_dbk_ref.c
+@@ -204,7 +204,7 @@
+ errorlen = STRLEN(gtmcrypt_err_string);
+ if (MAX_GTMCRYPT_ERR_STRLEN < errorlen)
+ errorlen = MAX_GTMCRYPT_ERR_STRLEN;
+- strncpy(save_err, gtmcrypt_err_string, errorlen);
++ memcpy(save_err, gtmcrypt_err_string, errorlen);
+ save_err[errorlen] = '\0';
+ UPDATE_ERROR_STRING("Expected hash - " STR_ARG " - %s. %s",
+ ELLIPSIZE(hex_buff), save_err, alert_msg);
+@@ -318,6 +318,8 @@
+ assert(keyname);
+ /* Strip off EXT_NEW from autodb paths so that the key lookup works correctly */
+ keynamelen = strlen(keyname);
++ if (GTM_PATH_MAX < keynamelen);
++ keynamelen = GTM_PATH_MAX;
+ ynew_ext = keyname + keynamelen - STRLEN(EXT_NEW);
+ if ((ynew_ext >= keyname) && (0 == strcmp(ynew_ext, EXT_NEW)))
+ { /* This is an autodb, fixup the path */
+@@ -390,13 +392,15 @@
+ if (database && (NULL == search_field2))
+ { /* Newly created AutoDBs have EXT_NEW appended to them, but the crypt cfg doesn't have those keys */
+ search_field_len = strlen(search_field1);
++ if (GTM_PATH_MAX < search_field_len)
++ search_field_len = GTM_PATH_MAX;
+ ynew_ext = search_field1 + search_field_len - STRLEN(EXT_NEW);
+ if (0 == strcmp(ynew_ext, EXT_NEW))
+ { /* Strip EXT_NEW off the path string for comparison later. Note that this path, minus EXT_NEW,
+ * is a fully resolved path.
+ */
+ isautodb = TRUE;
+- strncpy(name_search_field_buff, search_field1, search_field_len - STRLEN(EXT_NEW));
++ memcpy(name_search_field_buff, search_field1, search_field_len - STRLEN(EXT_NEW));
+ name_search_field_buff[search_field_len - STRLEN(EXT_NEW)] = '\0';
+ name_search_field_ptr = name_search_field_buff;
+ }
+@@ -419,8 +423,7 @@
+ {
+ if (isautodb)
+ { /* Append EXT_NEW to see if this a matching AutoDB */
+- strncpy(lcl_key_name_buff, curr->key_name, GTM_PATH_MAX);
+- strcat(lcl_key_name_buff, EXT_NEW);
++ SNPRINTF(lcl_key_name_buff, GTM_PATH_MAX, "%s" EXT_NEW, curr->key_name);
+ lcl_key_name = lcl_key_name_buff;
+ } else
+ lcl_key_name = curr->key_name;
+--- a/sr_unix/gtmcrypt_util.c
++++ b/sr_unix/gtmcrypt_util.c
+@@ -225,7 +225,7 @@
+ int gc_mask_unmask_passwd(int nparm, gtm_string_t *in, gtm_string_t *out)
+ {
+ char tmp[GTM_PASSPHRASE_MAX], mumps_exe[GTM_PATH_MAX], hash_in[GTM_PASSPHRASE_MAX], hash[GTMCRYPT_HASH_LEN];
+- char *ptr, *mmap_addrs;
++ char *ptr, *distptr, *mmap_addrs;
+ int passwd_len, len, i, save_errno, fd, have_hash, status;
+ struct stat stat_info;
+
+@@ -253,32 +253,24 @@
+ }
+ if (!have_hash)
+ {
+- if (!(ptr = getenv(USER_ENV)))
+- {
+- UPDATE_ERROR_STRING(ENV_UNDEF_ERROR, USER_ENV);
+- return -1;
+- }
+- strncpy(hash_in, ptr, passwd_len);
+- if (!(ptr = getenv(GTM_DIST_ENV)))
++ if (!(distptr = getenv(GTM_DIST_ENV)))
+ {
+ UPDATE_ERROR_STRING(ENV_UNDEF_ERROR, GTM_DIST_ENV);
+ return -1;
+ }
+- SNPRINTF(mumps_exe, GTM_PATH_MAX, "%s/%s", ptr, "mumps");
+- if (0 == stat(mumps_exe, &stat_info))
+- {
+- SNPRINTF(tmp, GTM_PASSPHRASE_MAX, "%ld", (long) stat_info.st_ino);
+- len = (int)STRLEN(tmp);
+- if (len < passwd_len)
+- strncpy(hash_in + (passwd_len - len), tmp, len);
+- else
+- strncpy(hash_in, tmp, passwd_len);
+- } else
++ SNPRINTF(mumps_exe, GTM_PATH_MAX, "%s/%s", distptr, "mumps");
++ if (0 != stat(mumps_exe, &stat_info))
+ {
+ save_errno = errno;
+ UPDATE_ERROR_STRING("Cannot find MUMPS executable in %s - %s", ptr, strerror(save_errno));
+ return -1;
+ }
++ if (!(ptr = getenv(USER_ENV)))
++ {
++ UPDATE_ERROR_STRING(ENV_UNDEF_ERROR, USER_ENV);
++ return -1;
++ }
++ SNPRINTF(hash_in, passwd_len, "%s%ld", ptr, (long)stat_info.st_ino);
+ SHA512(hash_in, passwd_len, hash, status);
+ if (0 != status)
+ return -1;
=====================================
debian/patches/fis-gtm_icu.patch → debian/patches/upstream_icu_pkg_config.patch
=====================================
@@ -1,54 +1,41 @@
-Date: Sat, 9 Feb 2019 10:31:23 +0100
-Author: "László Böszörményi (GCS)" <gcs at debian.org>
-Description: icu-config is deprecated upstream and was removed from the
- Debian package since it breaks multi-arch (see bugs #898820 and #920900)
- This is an attempt to get rid of icu-config and replace it by pkg-config
-Bug-Debian: https://bugs.debian.org/921781
-
---- fis-gtm-6.3-005.orig/CMakeLists.txt
-+++ fis-gtm-6.3-005/CMakeLists.txt
-@@ -737,24 +737,9 @@ install(FILES ${scripts}
- PERMISSIONS ${install_permissions_script}
- )
-
--find_program(ICUCONFIG NAMES icu-config)
--if(ICUCONFIG)
-- execute_process(
-- COMMAND ${ICUCONFIG} --version
-- OUTPUT_VARIABLE icu_version
-- RESULT_VARIABLE icu_failed
-- OUTPUT_STRIP_TRAILING_WHITESPACE
-- )
-- if(icu_failed)
-- message(FATAL_ERROR "Command\n ${ICUCONFIG} --version\nfailed (${icu_failed}).")
-- elseif("x${icu_version}" MATCHES "^x([0-9]+\\.[0-9]+)")
-- set(gtm_icu_version "${CMAKE_MATCH_1}")
-- else()
-- message(FATAL_ERROR "Command\n ${ICUCONFIG} --version\nproduced unrecognized output:\n ${icu_version}")
-- endif()
--else()
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -753,7 +753,9 @@
+ message(FATAL_ERROR "Command\n ${ICUCONFIG} --version\nproduced unrecognized output:\n ${icu_version}")
+ endif()
+ else()
- message(FATAL_ERROR "Unable to find 'icu-config'. Set ICUCONFIG in CMake cache.")
--endif()
-+find_package(PkgConfig REQUIRED)
-+PKG_CHECK_MODULES(ICU REQUIRED icu-io)
-+set(gtm_icu_version "${ICU_VERSION}")
++ find_package(PkgConfig REQUIRED)
++ PKG_CHECK_MODULES(ICU REQUIRED icu-io)
++ set(gtm_icu_version "${ICU_VERSION}")
+ endif()
find_program(LOCALECFG NAMES locale)
- if(LOCALECFG)
---- fis-gtm-6.3-005.orig/sr_unix/gtmprofile.gtc
-+++ fis-gtm-6.3-005/sr_unix/gtmprofile.gtc
-@@ -75,11 +75,11 @@ if [ $gtm_dist != "$old_gtm_dist" ] ; th
+--- a/sr_unix/gtmprofile.gtc
++++ b/sr_unix/gtmprofile.gtc
+@@ -74,12 +74,21 @@
+ if [ -f "$gtm_dist/libgtmutil.$tmp_gtm_shlib" ] ; then gtmroutines="$gtm_dist/libgtmutil.$tmp_gtm_shlib $gtm_dist"
else gtmroutines=$gtm_dist ; fi
export gtmroutines
- # Set $gtm_icu_version if icu-config is available - should be set before checking for UTF-8 mode
+- # Set $gtm_icu_version if icu-config is available - should be set before checking for UTF-8 mode
- if [ -z "$gtm_icu_version" -a -n "`which icu-config`" ] ; then
- gtm_icu_version=`icu-config --version | gtm_chset=M $gtm_dist/mumps -run %XCMD 'Read x Write $FNumber(x*$Select(+x>5:.1,1:1),"",1)'`
-+ if [ -z "$gtm_icu_version" -a -n "`which pkg-config`" ] ; then
-+ gtm_icu_version=`pkg-config --modversion icu-io | gtm_chset=M $gtm_dist/mumps -run %XCMD 'Read x Write $FNumber(x*$Select(+x>5:.1,1:1),"",1)'`
++ # Set $gtm_icu_version with pkg-config/icu-config where available - should be set before checking for UTF-8 mode
++ if [ -z "$gtm_icu_version" ] ; then
++ if [ -n "`which icu-config`" ] ; then
++ gtm_check_icu_version='icu-config --version'
++ gtm_check_icu_libpath='icu-config --libdir'
++ elif [ -n "`which pkg-config`" ] ; then
++ gtm_check_icu_version='pkg-config --modversion icu-io'
++ gtm_check_icu_libpath='pkg-config --libs-only-L icu-io'
++ fi
++ fi
++ if [ ! -z "$gtm_check_icu_version" ] ; then
++ gtm_icu_version=`$gtm_check_icu_version | gtm_chset=M $gtm_dist/mumps -run %XCMD 'Read x Write $FNumber(x*$Select(+x>5:.1,1:1),"",1)'`
export gtm_icu_version
# Add library path to LD_LIBRARY_PATH
- extendlibpath=`icu-config --libdir`
-+ extendlibpath=`pkg-config --libs-only-L icu-io`
++ extendlibpath=`$gtm_check_icu_libpath`
if [ "" = "$LD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="$extendlibpath"; else LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$extendlibpath";fi; export LD_LIBRARY_PATH
if [ "ibm" = "$arch" ]; then
if [ "" = "$LIBPATH" ]; then LIBPATH="$extendlibpath"; else LIBPATH="$LIBPATH:$extendlibpath";fi; export LIBPATH;
View it on GitLab: https://salsa.debian.org/med-team/fis-gtm/commit/55590e96dba31cdbb96b9449749d5868b69446e9
--
View it on GitLab: https://salsa.debian.org/med-team/fis-gtm/commit/55590e96dba31cdbb96b9449749d5868b69446e9
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/20190211/8a4c7cb8/attachment-0001.html>
More information about the debian-med-commit
mailing list