#4 Fix build on s390x
Merged 9 months ago by elmarco. Opened 9 months ago by jjames.
Unknown source rawhide  into  rawhide

@@ -0,0 +1,65 @@

+ From d79ad6d2c89cadb83eeb14321c862e4b4691fb97 Mon Sep 17 00:00:00 2001

+ From: Jerry James <loganjerry@gmail.com>

+ Date: Wed, 23 Aug 2023 12:07:54 -0600

+ Subject: [PATCH] Change GUINT_FROM_LE to GUINT16_FROM_LE

+ 

+ Signed-off-by: Jerry James <loganjerry@gmail.com>

+ ---

+  libmsi/string.c | 14 +++++++-------

+  1 file changed, 7 insertions(+), 7 deletions(-)

+ 

+ diff --git a/libmsi/string.c b/libmsi/string.c

+ index 988d6eb..0b20c0b 100644

+ --- a/libmsi/string.c

+ +++ b/libmsi/string.c

+ @@ -495,14 +495,14 @@ string_table *msi_load_string_table( GsfInfile *stg, unsigned *bytes_per_strref

+      if( r != LIBMSI_RESULT_SUCCESS)

+          goto end;

+  

+ -    if ( (poolsize > 4) && (GUINT_FROM_LE(pool[1]) & 0x8000) )

+ +    if ( (poolsize > 4) && (GUINT16_FROM_LE(pool[1]) & 0x8000) )

+          *bytes_per_strref = LONG_STR_BYTES;

+      else

+          *bytes_per_strref = sizeof(uint16_t);

+  

+      count = poolsize/4;

+      if( poolsize > 4 )

+ -        codepage = GUINT_FROM_LE(pool[0]) | ( (GUINT_FROM_LE(pool[1]) & ~0x8000) << 16 );

+ +        codepage = GUINT16_FROM_LE(pool[0]) | ( (GUINT16_FROM_LE(pool[1]) & ~0x8000) << 16 );

+      else

+          codepage = CP_ACP;

+  

+ @@ -516,10 +516,10 @@ string_table *msi_load_string_table( GsfInfile *stg, unsigned *bytes_per_strref

+      while ( i<count )

+      {

+          /* the string reference count is always the second word */

+ -        refs = GUINT_FROM_LE(pool[i*2+1]);

+ +        refs = GUINT16_FROM_LE(pool[i*2+1]);

+  

+          /* empty entries have two zeros, still have a string id */

+ -        if (GUINT_FROM_LE(pool[i*2]) == 0 && refs == 0)

+ +        if (GUINT16_FROM_LE(pool[i*2]) == 0 && refs == 0)

+          {

+              i++;

+              n++;

+ @@ -531,14 +531,14 @@ string_table *msi_load_string_table( GsfInfile *stg, unsigned *bytes_per_strref

+           * and the high word of the length is inserted in the null string's

+           * reference count field.

+           */

+ -        if (GUINT_FROM_LE(pool[i*2]) == 0)

+ +        if (GUINT16_FROM_LE(pool[i*2]) == 0)

+          {

+ -            len = (GUINT_FROM_LE(pool[i*2+3]) << 16) + GUINT_FROM_LE(pool[i*2+2]);

+ +            len = (GUINT16_FROM_LE(pool[i*2+3]) << 16) + GUINT16_FROM_LE(pool[i*2+2]);

+              i += 2;

+          }

+          else

+          {

+ -            len = GUINT_FROM_LE(pool[i*2]);

+ +            len = GUINT16_FROM_LE(pool[i*2]);

+              i += 1;

+          }

+  

+ -- 

+ 2.41.0

+ 

file modified
+26 -7
@@ -12,14 +12,32 @@

  

  Name:           msitools

  Version:        0.102

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        Windows Installer tools

  

- License:        GPL-2.0-or-later

+ # LGPL-2.1-or-later: the project as a whole

+ # blessing:

+ # - libmsi/tokenize.c (libmsi1)

+ # - tools/sqldelim.* (not in any binary RPM)

+ # GPL-2.0-or-later:

+ # - tools/msidiff.in (main package)

+ # - tools/msidump.in (main package)

+ # - tools/msibuild.c (main package)

+ # - tools/msiinfo.c (main package)

+ # - data/wxi-validate.pl (not in any binary RPM)

+ # GPL-3.0-or-later:

+ # - build-aux/git-version-gen (not in any binary RPM)

+ # MS-RL:

+ # - data/ext/ui/* (main package)

+ # MIT:

+ # - subprojects/bats-core/* (not in any binary RPM)

+ License:        LGPL-2.1-or-later AND GPL-2.0-or-later AND MS-RL

  URL:            http://ftp.gnome.org/pub/GNOME/sources/%{name}

  Source0:        http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{version}/%{name}-%{version}%{?_version_suffix}.tar.xz

  # https://gitlab.gnome.org/GNOME/msitools/-/issues/55

  Patch0:         0001-Update-data-wixl.patch

+ # https://gitlab.gnome.org/GNOME/msitools/-/merge_requests/66

+ Patch1:         0002-Change-GUINT_FROM_LE-to-GUINT16_FROM_LE.patch

  

  Requires:       libgsf >= 1.14.24-2

  
@@ -206,9 +224,6 @@

  %endif

  %endif

  

- # https://bugzilla.redhat.com/show_bug.cgi?id=1924216

- ExcludeArch: s390x

- 

  %description

  msitools is a collection of utilities to inspect and create Windows

  Installer files.  It is useful in a cross-compilation environment such
@@ -216,7 +231,7 @@

  

  %package -n libmsi1

  Summary:        A library to manipulate Windows .MSI files

- License:        LGPLv2+

+ License:        LGPL-2.1-or-later AND blessing

  

  %description -n libmsi1

  libmsi is a GObject library to work with Windows Installer files.  It is
@@ -224,7 +239,7 @@

  

  %package -n libmsi1-devel

  Summary:        A library to manipulate Windows .MSI files

- License:        LGPLv2+

+ License:        LGPL-2.1-or-later

  Requires:       libmsi1%{?_isa} = %{version}-%{release}

  

  %description -n libmsi1-devel
@@ -277,6 +292,10 @@

  

  

  %changelog

+ * Thu Sep 14 2023 Jerry James <loganjerry@gmail.com> - 0.102-3

+ - Fix build on s390x

+ - More SPDX migration

+ 

  * Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.102-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

  

As described in the upstream MR, the code currently uses a 32-bit byte swapping function, but should use a 16-bit byte swapping function. I now maintain a noarch package (makemusic-finale-fonts) that uses msitools to unpack the upstream archive. That doesn't work out so well when an s390x builder is assigned to build the package. :-)

I added a second commit to complete the transition to SPDX. The current License field is incomplete, and the libmsi1 and libmsi1-devel packages had not been migrated.

Pull-Request has been merged by elmarco

9 months ago