[gnomint/f19] fix build

Tom Callaway spot at fedoraproject.org
Thu Apr 25 18:18:00 UTC 2013


commit 16c5f3b7109831392a344af56cde08ae9db005a3
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Thu Apr 25 14:17:24 2013 -0400

    fix build

 gnomint-1.2.1-compilefixes.patch |   82 ++++++++++++++++++++++++++++++++++++++
 gnomint.spec                     |    9 +++-
 2 files changed, 89 insertions(+), 2 deletions(-)
---
diff --git a/gnomint-1.2.1-compilefixes.patch b/gnomint-1.2.1-compilefixes.patch
new file mode 100644
index 0000000..9743a62
--- /dev/null
+++ b/gnomint-1.2.1-compilefixes.patch
@@ -0,0 +1,82 @@
+diff -up gnomint-1.2.1/src/ca_file.c.fix gnomint-1.2.1/src/ca_file.c
+--- gnomint-1.2.1/src/ca_file.c.fix	2013-04-25 14:09:10.004811236 -0400
++++ gnomint-1.2.1/src/ca_file.c	2013-04-25 14:14:27.243815996 -0400
+@@ -1082,12 +1082,12 @@ gboolean ca_file_save_as (gchar *new_fil
+ 				   g_mapped_file_get_contents (map),
+ 				   g_mapped_file_get_length (map),
+ 				   NULL)) {
+-		g_mapped_file_free (map);
++		g_mapped_file_unref (map);
+                 ca_file_open (gnomint_current_opened_file, FALSE);
+ 		return FALSE;
+ 	}
+ 
+-	g_mapped_file_free (map);
++	g_mapped_file_unref (map);
+ 
+ 	g_free (initial_file);
+ 
+diff -up gnomint-1.2.1/src/import.c.fix gnomint-1.2.1/src/import.c
+--- gnomint-1.2.1/src/import.c.fix	2013-04-25 14:03:13.265805883 -0400
++++ gnomint-1.2.1/src/import.c	2013-04-25 14:08:53.861810994 -0400
+@@ -695,13 +695,13 @@ gint import_pkcs12 (guchar *file_content
+ 
+                 // After having all the parts unencrypted, we import all certificates first.
+                 for (i=0; i<n_bags; i++) {
+-                        gnutls_pkcs12_bag * pkcs12_bag = g_array_index (pkcs_bag_array, gnutls_pkcs12_bag_t *, i);
++                        gnutls_pkcs12_bag_t * pkcs12_bag = g_array_index (pkcs_bag_array, gnutls_pkcs12_bag_t *, i);
+                         guint num_elements_in_bag = gnutls_pkcs12_bag_get_count (*pkcs12_bag);
+                         
+                         for (i=0; i < num_elements_in_bag; i++) {
+-                                gnutls_datum data;
++                                gnutls_datum_t data;
+                                 if (gnutls_pkcs12_bag_get_type (*pkcs12_bag, i) == GNUTLS_BAG_CERTIFICATE) {
+-                                        gnutls_x509_crt cert;
++                                        gnutls_x509_crt_t cert;
+                                         
+                                         gnutls_x509_crt_init (&cert);
+                                         if (gnutls_pkcs12_bag_get_data(*pkcs12_bag, i, &data) < 0) {
+@@ -722,14 +722,14 @@ gint import_pkcs12 (guchar *file_content
+                 
+                 // Then, we import all PKCS8 private keys.
+                 for (i=0; i<n_bags; i++) {
+-                        gnutls_pkcs12_bag * pkcs12_bag = g_array_index (pkcs_bag_array, gnutls_pkcs12_bag_t *, i);
++                        gnutls_pkcs12_bag_t * pkcs12_bag = g_array_index (pkcs_bag_array, gnutls_pkcs12_bag_t *, i);
+                         guint num_elements_in_bag = gnutls_pkcs12_bag_get_count (*pkcs12_bag);
+                         
+                         for (i=0; i < num_elements_in_bag; i++) {
+-                                gnutls_datum data;
++                                gnutls_datum_t data;
+                                 if (gnutls_pkcs12_bag_get_type (*pkcs12_bag, i) == GNUTLS_BAG_PKCS8_KEY ||
+                                     gnutls_pkcs12_bag_get_type (*pkcs12_bag, i) == GNUTLS_BAG_PKCS8_ENCRYPTED_KEY) {
+-                                        gnutls_x509_privkey pkey;
++                                        gnutls_x509_privkey_t pkey;
+                                         gint result_decryption;
+                                         
+                                         gnutls_x509_privkey_init (&pkey);
+@@ -796,13 +796,13 @@ gint import_pkcs12 (guchar *file_content
+                 // Then we import the CRLs
+ 
+                 for (i=0; i<n_bags; i++) {
+-                        gnutls_pkcs12_bag * pkcs12_bag = g_array_index (pkcs_bag_array, gnutls_pkcs12_bag_t *, i);
++                        gnutls_pkcs12_bag_t * pkcs12_bag = g_array_index (pkcs_bag_array, gnutls_pkcs12_bag_t *, i);
+                         guint num_elements_in_bag = gnutls_pkcs12_bag_get_count (*pkcs12_bag);
+                         
+                         for (i=0; i < num_elements_in_bag; i++) {
+-                                gnutls_datum data;
++                                gnutls_datum_t data;
+                                 if (gnutls_pkcs12_bag_get_type (*pkcs12_bag, i) == GNUTLS_BAG_CRL) {
+-                                        gnutls_x509_crl crl;
++                                        gnutls_x509_crl_t crl;
+                                         
+                                         gnutls_x509_crl_init (&crl);
+                                         if (gnutls_pkcs12_bag_get_data(*pkcs12_bag, i, &data) < 0) {
+@@ -852,7 +852,7 @@ gboolean import_single_file (gchar *file
+ 	file_contents = g_new0 (guchar, file_contents_size);
+ 	memcpy (file_contents, g_mapped_file_get_contents (mapped_file), file_contents_size);
+ 	
+-	g_mapped_file_free (mapped_file);
++	g_mapped_file_unref (mapped_file);
+ 
+ 
+ 	// We start to check each type of file, in PEM and DER
diff --git a/gnomint.spec b/gnomint.spec
index b25bcdc..5ab2b64 100644
--- a/gnomint.spec
+++ b/gnomint.spec
@@ -1,6 +1,6 @@
 Name:		gnomint
 Version:	1.2.1
-Release:	7%{?dist}
+Release:	8%{?dist}
 Summary:	Graphical x509 Certification Authority management tool
 
 Group:		Applications/System
@@ -8,6 +8,7 @@ License:	GPLv3+
 URL:		http://gnomint.sourceforge.net/
 Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Patch0:		%{name}-%{version}-DSO-libgcrypt.patch
+Patch1:		gnomint-1.2.1-compilefixes.patch
 
 BuildRequires:	gnutls-devel >= 2
 BuildRequires:	libgnomeui-devel
@@ -31,10 +32,11 @@ GTK/Gnome environments.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1 -b .fix
 
 %build
 %configure --disable-dependency-tracking --disable-schemas-install
-make %{?_smp_mflags} CFLAGS="%{optflags}"
+make %{?_smp_mflags} CFLAGS="%{optflags} -Wno-unused-but-set-variable"
 
 
 %install
@@ -87,6 +89,9 @@ update-desktop-database %{_datadir}/applications || :
 %{_datadir}/%{name}/*.ui
 
 %changelog
+* Thu Apr 25 2013 Tom Callaway <spot at fedoraproject.org> - 1.2.1-8
+- get this building again
+
 * Sun Mar 24 2013 Peter Robinson <pbrobinson at fedoraproject.org> 1.2.1-7
 - rebuild (gnutls)
 


More information about the scm-commits mailing list