From: Petr Lautrbach <plautrba@redhat.com>
To: "Christian Göttsche" <cgzones@googlemail.com>
Cc: selinux@vger.kernel.org
Subject: Re: [PATCH v2] tree-wide: introduce PYTON_SETUP_ARGS to customize setup.py calls on Debian
Date: Mon, 4 May 2020 15:03:23 +0200 [thread overview]
Message-ID: <20200504130323.GC251987@workstation> (raw)
In-Reply-To: <20200501134604.20070-1-cgzones@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 3335 bytes --]
On Fri, May 01, 2020 at 03:46:04PM +0200, Christian Göttsche wrote:
> On Debian the `distutils` module is patched, so `get_python_lib()` returns by default `/usr/lib/python3/dist-packages` (no minor version).
>
Could you wrap the commit message to 75 chars per line, please?
> But `setuptools` affecting setup.py is not patched to create the library directory at `/usr/lib/python3/dist-packages` by default, rather than a command line argument `--install-layout deb` is added.
>
> Add PYTON_SETUP_ARGS as argument to affected setup.py calls and add a note in the global ReadMe.
Fix the file name - ReadMe -> README.md
>
> See https://www.debian.org/doc/packaging-manuals/python-policy/packaging_tools.html section B.1.
>
> Fixes: https://github.com/SELinuxProject/selinux/issues/187
Please provide Signed-off-by:
Also there's a conflicting patch which changes README.md as well -
https://patchwork.kernel.org/patch/11522349/ which I'm going to merge. Could you
please rebase this patch based on changes from the mentioned patch?
Other than the comments above, I like the patch. Thanks!
> ---
> v2:
> Use env variable PYTON_SETUP_ARGS instead of internal detection logic
>
> README.md | 2 ++
> libselinux/src/Makefile | 2 +-
> python/sepolicy/Makefile | 2 +-
> 3 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/README.md b/README.md
> index 974280f9..3c97a5a3 100644
> --- a/README.md
> +++ b/README.md
> @@ -18,6 +18,8 @@ To build and install everything under a private directory, run:
>
> make DESTDIR=~/obj install install-pywrap
>
> +Note: On Debian `PYTON_SETUP_ARGS=--install-layout=deb` needs to be set in order to create the correct python directory structure.
> +
> To install as the default system libraries and binaries
> (overwriting any previously installed ones - dangerous!),
> on x86_64, run:
> diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
> index 73303c36..bccc852d 100644
> --- a/libselinux/src/Makefile
> +++ b/libselinux/src/Makefile
> @@ -174,7 +174,7 @@ install: all
> ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
>
> install-pywrap: pywrap
> - $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
> + $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` $(PYTON_SETUP_ARGS)
> install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
> ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT)
>
> diff --git a/python/sepolicy/Makefile b/python/sepolicy/Makefile
> index 69f29fa9..4ad0d4dc 100644
> --- a/python/sepolicy/Makefile
> +++ b/python/sepolicy/Makefile
> @@ -27,7 +27,7 @@ test:
> @$(PYTHON) test_sepolicy.py -v
>
> install:
> - $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
> + $(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` $(PYTON_SETUP_ARGS)
> [ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
> install -m 755 sepolicy.py $(DESTDIR)$(BINDIR)/sepolicy
> (cd $(DESTDIR)$(BINDIR); ln -sf sepolicy sepolgen)
> --
> 2.26.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-05-04 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 11:45 [PATCH] tree-wide: install python libraries on Debian with appropriate option Christian Göttsche
2020-04-07 13:38 ` Ondrej Mosnacek
2020-05-01 13:46 ` [PATCH v2] tree-wide: introduce PYTON_SETUP_ARGS to customize setup.py calls on Debian Christian Göttsche
2020-05-04 13:03 ` Petr Lautrbach [this message]
2020-05-04 14:12 ` Ondrej Mosnacek
2020-05-04 17:55 ` [PATCH v3] tree-wide: introduce PYTHON_SETUP_ARGS " Christian Göttsche
2020-05-05 8:41 ` Petr Lautrbach
2020-05-06 14:20 ` Petr Lautrbach
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=20200504130323.GC251987@workstation \
--to=plautrba@redhat.com \
--cc=cgzones@googlemail.com \
--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.