selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Interests in usability enhancements to .../scripts.py?
@ 2020-05-28 20:22 Peter Whittaker
  0 siblings, 0 replies; only message in thread
From: Peter Whittaker @ 2020-05-28 20:22 UTC (permalink / raw)
  To: SElinux list

Folks, before generating and submitting a patch, I wanted to gauge
interest in usability improvements to

    .../python/sepolicy/sepolicy/templates/script.py

I've added these changes to the "myPolicy.sh" generated for the policy
I'm working on and have found them useful for knowing why things fail
and stopping further processing when things fail. For example, the
default template has the line

    make -f /usr/share/selinux/devel/Makefile TEMPLATEFILE.pp || exit

I've changed this to (line split in email for clarity)

    make -f /usr/share/selinux/devel/Makefile TEMPLATEFILE.pp || \
    { echo "Make failed, exiting."; exit 1; }

and have added similar errors checks after other commands, e.g., after semodule:

    /usr/sbin/semodule -i CDTml.pp || { echo "semodule failed,
exiting."; exit 1; }

and so on: I don't see any point in building the RPM, e.g., if
creating the man pages fails, and the error messages give me a much
clearer indication of what has gone wrong (less verbiage to wade
through).

I've also added command line options to specifically make the PP, RPM,
manpages, etc., so that if I determine that the problem was something
other than a policy error, I can skip directly to just building the
next bits.

One reason for not just generating and submitting a patch is that I
will have to pull out other personal usability changes I've made that
I do not believe will be of general interest, so rather than doing
that work I wanted to gauge interest first.

Thoughts?

Thanks,

P

Peter Whittaker
EdgeKeep Inc.
www.edgekeep.com
+1 613 864 5337
+1 613 864 KEEP

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-28 20:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 20:22 Interests in usability enhancements to .../scripts.py? Peter Whittaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).