All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Remove ustr library dependency
@ 2016-12-19 13:03 Nicolas Iooss
  2016-12-19 13:03 ` [PATCH 1/7] libsemanage/tests: make "make test" fail when a CUnit test fails Nicolas Iooss
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Nicolas Iooss @ 2016-12-19 13:03 UTC (permalink / raw)
  To: selinux

Hello,

ustr library uses old (pre-C99) "extern inline" semantic. This makes it
incompatible with recent versions of gcc and clang, which default to
C99 standard. Distributions have shipped patched versions of this
library to fix issues [1] but there is no upstream solution to make ustr
compatible with C99 standard. Moreover the git tree of ustr
(http://www.and.org/ustr/ustr.git) has not been updated since 2008 and
the developer of this project did not reply to emails.

This patchset aims at removing ustr from SELinux userland libraries and
tools. The library is currenlty only used by genhomedircon functions in
libsemanage. Here is how the patches are organised:

* patches 1 and 2 make libsemanage test infrastructure work properly,
* patch 3 expands some test cases in order to better check the
  modifications of the next patch,
* patch 4 reimplements functions in libsemanage/src/utilities.c without
  ustr,
* patches 5 and 6 remove ustr from libsemanage/src/genhomedircon.c (I
  introduced a new function, semanage_str_replace(), to replace
  ustr_replace_cstr()),
* patch 7 removes references to ustr in Makefile, README and pkg-config
  files.

Thanks,
Nicolas

[1] for example Gentoo package uses this patch:
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/ustr/files/ustr-1.0.4-gcc_5-check.patch?id=7dea6f8820f36bf389e6315044bea7507553bed0

Nicolas Iooss (7):
  libsemanage/tests: make "make test" fail when a CUnit test fails
  libsemanage/tests: make tests standalone
  libsemanage/tests: test more cases of semanage_split*()
  libsemanage: simplify string utilities functions
  libsemanage: add semanage_str_replace() utility function
  libsemanage: genhomedircon: drop ustr dependency
  libsemanage: remove ustr library from Makefiles and pkg-config

 README                                |   2 +-
 libsemanage/src/Makefile              |   2 +-
 libsemanage/src/genhomedircon.c       | 137 ++++++++++++++++------------------
 libsemanage/src/libsemanage.pc.in     |   2 +-
 libsemanage/src/utilities.c           | 119 +++++++++++++++++------------
 libsemanage/src/utilities.h           |  10 +++
 libsemanage/tests/Makefile            |  14 ++--
 libsemanage/tests/libsemanage-tests.c |   9 ++-
 libsemanage/tests/test_utilities.c    |  85 ++++++++++++++++-----
 9 files changed, 232 insertions(+), 148 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-12-21 15:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 13:03 [PATCH 0/7] Remove ustr library dependency Nicolas Iooss
2016-12-19 13:03 ` [PATCH 1/7] libsemanage/tests: make "make test" fail when a CUnit test fails Nicolas Iooss
2016-12-19 13:03 ` [PATCH 2/7] libsemanage/tests: make tests standalone Nicolas Iooss
2016-12-19 13:04 ` [PATCH 3/7] libsemanage/tests: test more cases of semanage_split*() Nicolas Iooss
2016-12-19 13:04 ` [PATCH 4/7] libsemanage: simplify string utilities functions Nicolas Iooss
2016-12-19 15:46   ` Stephen Smalley
2016-12-21 15:23     ` Nicolas Iooss
2016-12-19 13:04 ` [PATCH 5/7] libsemanage: add semanage_str_replace() utility function Nicolas Iooss
2016-12-19 18:02   ` Stephen Smalley
2016-12-19 13:04 ` [PATCH 6/7] libsemanage: genhomedircon: drop ustr dependency Nicolas Iooss
2016-12-19 18:32   ` Stephen Smalley
2016-12-21 15:15     ` Nicolas Iooss
2016-12-21 15:42       ` Stephen Smalley
2016-12-19 18:43   ` Stephen Smalley
2016-12-19 13:04 ` [PATCH 7/7] libsemanage: remove ustr library from Makefiles, README and pkg-config Nicolas Iooss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.