Minor patches from Adam Bishop to fix build issues from commit 1bc4bf5.
authorJennifer Richards <jennifer@painless-security.com>
Tue, 21 Jun 2016 15:25:18 +0000 (11:25 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Tue, 21 Jun 2016 15:25:18 +0000 (11:25 -0400)
  1. Make sure that the spec file only includes systemd on el7 builds to fix an el6 build break.
  2. Fix a build break on 32 bit systems - Jansson provides a macro which I should have used.

common/tr_config.c
trust_router.spec

index 587a47c..433f726 100644 (file)
@@ -953,8 +953,8 @@ TR_CFG_RC tr_parse_config (TR_INSTANCE *tr, const char *config_dir, int n, struc
     // Look for serial number and log it if it exists
     if (NULL != (jser = json_object_get(jcfg, "serial_number"))) {
       if (json_is_number(jser)) {
-        tr_notice("tr_read_config: Attempting to load revision %i of %s.",
-                  (int *) json_integer_value(jser),
+        tr_notice("tr_read_config: Attempting to load revision %" JSON_INTEGER_FORMAT " of '%s'.",
+                  json_integer_value(jser),
                   cfg_files[n]->d_name);
       }
     }
index 8a0cef3..098779d 100644 (file)
@@ -13,7 +13,7 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  krb5-devel, glib2-devel
 BuildRequires: jansson-devel >= 2.4
 BuildRequires: sqlite-devel, openssl-devel, libtalloc-devel
-BuildRequires: systemd
+%{?el7:BuildRequires: systemd}
 Requires:       moonshot-gss-eap >= 0.9.3, sqlite
 
 %description
@@ -119,7 +119,7 @@ chmod 770 /var/log/trust_router
 %{_initrddir}/tids
 %{_initrddir}/trust_router
 
-%{_unitdir}/tids.service
+%{?el7:%{_unitdir}/tids.service}
 
 %config(noreplace) %{_sysconfdir}/sysconfig/tids
 %config(noreplace) %{_sysconfdir}/sysconfig/trust_router