Fix FTBFS on Fedora 26+ Add patch to fix issues with -Werror=format-security Ensure that the python 3 tests use a locale guaranteed to be present
This commit is contained in:
parent
82af1df176
commit
72ea53b800
52
0001-Fix-errors-with-Werror-format-security.patch
Normal file
52
0001-Fix-errors-with-Werror-format-security.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
From 9317afc8bb7eec656444fc2eecfcd1ea3bfdda82 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephen Gallagher <sgallagh@redhat.com>
|
||||||
|
Date: Wed, 15 Mar 2017 12:43:03 -0400
|
||||||
|
Subject: [PATCH] Fix errors with -Werror=format-security
|
||||||
|
|
||||||
|
Recent versions of the Fedora build system treat format-security
|
||||||
|
warnings as errors, resulting in failure to build. This patch
|
||||||
|
ensures that appropriate format strings are present.
|
||||||
|
|
||||||
|
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
|
||||||
|
---
|
||||||
|
modules/files.c | 2 +-
|
||||||
|
modules/ldap.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules/files.c b/modules/files.c
|
||||||
|
index 4ef0a57be9f2aad99d82abfae5204009a93e5572..6a7787e28112ba07e0fc44f2887ce1d1540af29e 100644
|
||||||
|
--- a/modules/files.c
|
||||||
|
+++ b/modules/files.c
|
||||||
|
@@ -532,11 +532,11 @@ parse_field(const struct format_specifier *format, GValue *value,
|
||||||
|
err = NULL;
|
||||||
|
ret = lu_value_init_set_attr_from_string(value, format->attribute,
|
||||||
|
string, &err);
|
||||||
|
if (ret == FALSE) {
|
||||||
|
g_assert(err != NULL);
|
||||||
|
- g_warning(lu_strerror(err));
|
||||||
|
+ g_warning("%s", lu_strerror(err));
|
||||||
|
lu_error_free(&err);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/modules/ldap.c b/modules/ldap.c
|
||||||
|
index ad10f7394c5735f3180cbab5bc7314301fd83ffc..02e9eb6a0cf10595d730e3dc719f2e848a3491d4 100644
|
||||||
|
--- a/modules/ldap.c
|
||||||
|
+++ b/modules/ldap.c
|
||||||
|
@@ -670,11 +670,11 @@ lu_ldap_lookup(struct lu_module *module,
|
||||||
|
error = NULL;
|
||||||
|
ok = lu_value_init_set_attr_from_string
|
||||||
|
(&value, attr, val, &error);
|
||||||
|
if (ok == FALSE) {
|
||||||
|
g_assert(error != NULL);
|
||||||
|
- g_warning(lu_strerror(error));
|
||||||
|
+ g_warning("%s", lu_strerror(error));
|
||||||
|
lu_error_free(&error);
|
||||||
|
} else {
|
||||||
|
lu_ent_add_current(ent, attr,
|
||||||
|
&value);
|
||||||
|
g_value_unset(&value);
|
||||||
|
--
|
||||||
|
2.12.0
|
||||||
|
|
20
libuser.spec
20
libuser.spec
@ -1,6 +1,6 @@
|
|||||||
Name: libuser
|
Name: libuser
|
||||||
Version: 0.62
|
Version: 0.62
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://fedorahosted.org/libuser/
|
URL: https://fedorahosted.org/libuser/
|
||||||
@ -15,6 +15,10 @@ Summary: A user and group account administration library
|
|||||||
|
|
||||||
%global __provides_exclude_from ^(%{_libdir}/%{name}|%{python2_sitearch}|%{python3_sitearch})/.*$
|
%global __provides_exclude_from ^(%{_libdir}/%{name}|%{python2_sitearch}|%{python3_sitearch})/.*$
|
||||||
|
|
||||||
|
# Patch to address format-security.
|
||||||
|
# Submitted upstream at https://pagure.io/libuser/pull-request/17
|
||||||
|
Patch0001: 0001-Fix-errors-with-Werror-format-security.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The libuser library implements a standardized interface for manipulating
|
The libuser library implements a standardized interface for manipulating
|
||||||
and administering user and group accounts. The library uses pluggable
|
and administering user and group accounts. The library uses pluggable
|
||||||
@ -55,6 +59,11 @@ administering user and group accounts.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qc
|
%setup -qc
|
||||||
|
|
||||||
|
pushd libuser-%{version}
|
||||||
|
%patch0001 -p1
|
||||||
|
popd
|
||||||
|
|
||||||
mv libuser-%{version} python2
|
mv libuser-%{version} python2
|
||||||
cp -a python2 python3
|
cp -a python2 python3
|
||||||
|
|
||||||
@ -88,7 +97,7 @@ make -C python2 install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
|
|||||||
|
|
||||||
make -C python2 check || { cat python2/test-suite.log; false; }
|
make -C python2 check || { cat python2/test-suite.log; false; }
|
||||||
# The Python 3 module only supports UTF-8
|
# The Python 3 module only supports UTF-8
|
||||||
LC_ALL=en_US.UTF-8 make -C python3 check \
|
LC_ALL=C.UTF-8 make -C python3 check \
|
||||||
|| { cat python3/test-suite.log; false; }
|
|| { cat python3/test-suite.log; false; }
|
||||||
|
|
||||||
# Verify that all python modules load, just in case.
|
# Verify that all python modules load, just in case.
|
||||||
@ -98,7 +107,7 @@ cd $RPM_BUILD_ROOT/%{python2_sitearch}
|
|||||||
python2 -c "import libuser"
|
python2 -c "import libuser"
|
||||||
cd $RPM_BUILD_ROOT/%{python3_sitearch}
|
cd $RPM_BUILD_ROOT/%{python3_sitearch}
|
||||||
# The Python 3 module only supports UTF-8
|
# The Python 3 module only supports UTF-8
|
||||||
LC_ALL=en_US.UTF-8 python3 -c "import libuser"
|
LC_ALL=C.UTF-8 python3 -c "import libuser"
|
||||||
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
@ -139,6 +148,11 @@ LC_ALL=en_US.UTF-8 python3 -c "import libuser"
|
|||||||
%{_datadir}/gtk-doc/html/*
|
%{_datadir}/gtk-doc/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 15 2017 Stephen Gallagher <sgallagh@redhat.com> - 0.62-7
|
||||||
|
- Fix FTBFS on Fedora 26+
|
||||||
|
- Add patch to fix issues with -Werror=format-security
|
||||||
|
- Ensure that the python 3 tests use a locale guaranteed to be present
|
||||||
|
|
||||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.62-6
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.62-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user