All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <stephen.smalley.work@gmail.com>
To: Petr Lautrbach <plautrba@redhat.com>
Cc: SElinux list <selinux@vger.kernel.org>,
	Laurent Bigonville <bigon@debian.org>,
	Russell Coker <russell@coker.com.au>,
	William Roberts <bill.c.roberts@gmail.com>,
	Ondrej Mosnacek <omosnace@redhat.com>,
	Paul Moore <paul@paul-moore.com>
Subject: Re: [PATCH] selinux-testsuite: update to work on Debian
Date: Thu, 7 May 2020 09:32:53 -0400	[thread overview]
Message-ID: <CAEjxPJ7_Gb=9kFpizkRoEn9f27qVkXZPxd8KJnezjg9G4T1VbA@mail.gmail.com> (raw)
In-Reply-To: <20200507131322.GA69292@workstation>

On Thu, May 7, 2020 at 9:13 AM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> On Thu, May 07, 2020 at 08:51:59AM -0400, Stephen Smalley wrote:
> > On Thu, May 7, 2020 at 4:46 AM Laurent Bigonville <bigon@debian.org> wrote:
> > >
> > > Le 6/05/20 à 18:37, Russell Coker a écrit :
> > > > On Thursday, 7 May 2020 1:50:46 AM AEST Stephen Smalley wrote:
> > > >> on that running instance, but not to specify custom kernel parameters
> > > >> initially or to reboot the system before proceeding with further
> > > >> commands (if anyone knows differently, speak up). We'd have to get to
> > > >> the point where enabling SELinux in Debian is possible without
> > > >> requiring a reboot at all.  And then we'd have to wait for that
> > > >> support to find its way into one of the Ubuntu images supported by
> > > >> travis-ci.  Might be easier to just get travis-ci to support Fedora or
> > > >> CentOS images in the first place. Regardless, allowing the testsuite
> > > >> to be run by users of other distributions is worthwhile IMHO.
> > > > In the past there hasn't been much demand for a smoother installation process.
> > > > If you are setting up a traditional Unix server system the Debian SE Linux
> > > > installation thing doesn't make things much more difficult.  Past complaints
> > > > about it have been more about an imagined difficulty of using SE Linux and have
> > > > ended when I showed and wrote about how to do it (one time I showed
> > > > screenshots of the process in an LCA lightning talk and didn't have problems
> > > > with time).
> > > >
> > > > I don't think that the people who maintain the Debian installation related
> > > > packages would have a great objection to adding SE Linux features, although it
> > > > might take a bit of time for it to migrate from Debian to Ubuntu.
> > > >
> > > > We can make this a priority.
> > > >
> > > If people are using preseed installations (kickstart equivalent), I
> > > think that enabling SELinux in the installer shouldn't be too difficult
> > > (installing the needed packages, modifying the files and relabeling with
> > > fixfiles). It's obviously not user friendly, but the question is what's
> > > the target here.
> >
> > The visionary end state goal would be to allow one to specify some
> > kind of option in a travis-ci configuration and get a SELinux-enabled
> > image on which we could perform travis-ci validation of
> > selinux-testsuite, selinux userspace, and maybe even the kernel.  I
> > don't think that is possible in the near term though and will require
> > changes to travis-ci itself.  At the moment our travis-ci validation
> > of the testsuite and userspace is limited to building and in the
> > latter case running some limited tests that do not depend on having
> > SELinux on the host.
> >
> > The nearer term goal is to minimize obstacles to using SELinux in
> > Debian, one of which is the need to install Debian and then install
> > SELinux as a separate step (with two reboots along the way) rather
> > than an installer option.  We can't use that approach in travis-ci
> > AFAICT because we cannot reboot the instance and then proceed with
> > testing.  If we can tell the installer to include the necessary grub
> > and pam configurations up front and to label the filesystems during
> > installation (which can happen even while SELinux is disabled in the
> > kernel; only requires filesystem xattr support), then we can avoid the
> > need for any extra reboots post install.
> >
>
> I'm experimenting with using Fedora CI for this, see https://src.fedoraproject.org/rpms/policycoreutils/pull-request/15
>
> It uses Fedora Rawhide images and runs
> https://src.fedoraproject.org/fork/plautrba/rpms/policycoreutils/blob/a9622b610a0f7cfb968d4cb216c9c5c42e87b6dd/f/tests/upstream/runtest.sh
> script which is part of this PR
>
>
> You can see a failure in Fedora CI:
> https://jenkins-continuous-infra.apps.ci.centos.org/blue/organizations/jenkins/fedora-rawhide-pr-pipeline/detail/fedora-rawhide-pr-pipeline/3441/pipeline/
> -> Artifacts -> package-tests/logs/FAIL-upstream.log -
> https://jenkins-continuous-infra.apps.ci.centos.org/job/fedora-rawhide-pr-pipeline/3441/artifact/package-tests/logs/FAIL-upstream.log
>
> So far there's only userspace build and tests but it can be used for
> selinux-testsuite and (Fedora) kernel.
>
> It has one downside, it can be triggered only by a pull request on https://src.fedoraproject.org/rpms/policycoreutils

Interesting, thanks.  Regrettably the make test cases in the userspace
tree are fairly limited (and can't be too extensive if they are going
to keep working on travis-ci since they cannot presume SELinux in the
host).  In practice, I usually also test changes to the userspace by
running the selinux-testsuite, which exercises rebuilding policy and
confirms various runtime behaviors that are not exercised by the
userspace make test, and by rebuilding refpolicy (or Fedora policy
would also work) and comparing against what the previous version
yielded.  We also likely ought to be re-testing setools upon changes
to the userspace and vice versa.  They are all rather intertwined.

  reply	other threads:[~2020-05-07 13:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06  0:53 [PATCH] selinux-testsuite: update to work on Debian Stephen Smalley
2020-05-06 13:44 ` Stephen Smalley
2020-05-06 14:57   ` William Roberts
2020-05-06 15:50     ` Stephen Smalley
2020-05-06 15:54       ` William Roberts
2020-05-06 16:37       ` Russell Coker
2020-05-07  8:35         ` Laurent Bigonville
2020-05-07 12:51           ` Stephen Smalley
2020-05-07 13:13             ` Petr Lautrbach
2020-05-07 13:32               ` Stephen Smalley [this message]
2020-05-07 13:41             ` Laurent Bigonville
2020-05-08  3:03             ` Paul Moore
2020-05-13 15:51               ` Stephen Smalley
2020-05-15 16:27                 ` William Roberts
2020-05-15 16:41                   ` Ondrej Mosnacek
2020-05-15 16:46                     ` William Roberts
2020-05-15 17:18                       ` Ondrej Mosnacek
2020-05-15 17:24                         ` William Roberts
2020-05-07 14:49           ` Russell Coker
2020-05-07 14:54             ` Stephen Smalley
2020-05-07 15:01               ` William Roberts
2020-05-07 15:12                 ` Stephen Smalley
2020-05-07 15:22                   ` William Roberts
2020-05-12 11:19                     ` Petr Lautrbach
     [not found]       ` <CAJVWAV07O-cQ5EzqYpodjeVRjdtD7ga=bUwEiTm00BaKRMiyFQ@mail.gmail.com>
2020-05-06 19:17         ` Fwd: " Dac Override
2020-05-06 20:07           ` Stephen Smalley
2020-05-06 19:37 ` Ondrej Mosnacek
2020-05-06 19:57   ` Stephen Smalley
2020-05-06 20:26     ` Stephen Smalley
2020-05-07  8:24       ` Ondrej Mosnacek

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='CAEjxPJ7_Gb=9kFpizkRoEn9f27qVkXZPxd8KJnezjg9G4T1VbA@mail.gmail.com' \
    --to=stephen.smalley.work@gmail.com \
    --cc=bigon@debian.org \
    --cc=bill.c.roberts@gmail.com \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=plautrba@redhat.com \
    --cc=russell@coker.com.au \
    --cc=selinux@vger.kernel.org \
    /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.