All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] PyXML requirement for refpolicy
Date: Tue, 4 Nov 2014 07:59:13 -0500	[thread overview]
Message-ID: <5458CDA1.3060308@tresys.com> (raw)
In-Reply-To: <5457E226.5080303@m4x.org>

On 11/3/2014 3:14 PM, Nicolas Iooss wrote:
> 2014-10-31 15:21 GMT+01:00 Christopher J. PeBenito:
>> On 10/30/2014 6:05 PM, Nicolas Iooss wrote:
>>> Refpolicy INSTALL file says that PyXML is required for building [1].
>>> However I haven't got this library on my system and things are working
>>> well so I'm wondering what I am missing. A simple "git grep import"
>>> shows "from xml.dom.minidom import parse, parseString" in
>>> support/sedoctool.py [2] but the xml module has been part of Python
>>> since Python 2.0 (according to 2.6 doc [3]) so this is not PyXML.
>>> Moreover PyXML main page says this library is no longer maintained [4].
>>>
>>> Is PyXML still a requirement of refpolicy and if not, is it possible to
>>> remove it from the INSTALL file?
>>
>> I believe you are correct that it can be removed.  These things should
>> work, to verify:
>>
>> * 'make conf' will yield doc/policy.xml, which will validate against
>> doc/policy.dtd. The makefile already validates, so this checks out.
>> * doc/policy.xml should have all of the xml docs from throughout the policy
>> * 'make html' should get all the html interface docs
>>
>> If that all works, then we can update the INSTALL and other
>> documentation to replace PyXML with Python 2.0 in the dependency list.
> 
> As I got a new computer a few days ago with a clean Arch Linux
> installation, I've been able to test things while being sure PyXML has
> never been installed on this system.  Here are my results:
> 
> * "make conf && make" works fine, with python 3.4.2, the latest release
> of SELinux userspace tools & librairies (2.3) and setools 3.3.8.
> 
> * "xmllint --noout --dtdvalid doc/policy.dtd doc/policy.xml" succeeds
> and "doc/policy.xml" seems to be a valid XML when opened in a text
> editor (i.e. it is not almost empty).
> 
> * "make html" produces HTML pages in docs/html and Firefox renders them
> correctly (and the links work fine).  While speaking about
> documentation, there is a small typo in corenet_raw_bind_generic_node
> summary: "genric" is written instead of "generic" [1].
> 
> * "make validate" prints "Success", after 740s.

This wasn't necessary for checking XML, as all it does is link all the
.pp files to make sure there's no dependency issue.

> It should be OK to drop PyXML from the INSTALL and the doc and document
> the supported Python versions.  Python 2.0 might lack some features
> which are used in the support scripts (like "from __future__ import
> print_function"?).  I haven't got this version on my systems but I've
> tested the build with both Python 2.7.8 and 3.4.2 and it succeeded.  As
> Arch Linux is probably not the best distro to establish the lower limit
> of supported version numbers, it probably makes more sense to see what
> Python version Debian, Fedora and Gentoo currently support.

I think Python 2.6 should be a reasonable minimum.  It's the first to
support the print_function import you mention above.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

      reply	other threads:[~2014-11-04 12:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 22:05 [refpolicy] PyXML requirement for refpolicy Nicolas Iooss
2014-10-31 14:21 ` Christopher J. PeBenito
2014-11-03 20:14   ` Nicolas Iooss
2014-11-04 12:59     ` Christopher J. PeBenito [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5458CDA1.3060308@tresys.com \
    --to=cpebenito@tresys.com \
    --cc=refpolicy@oss.tresys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.