Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-28 Thread Miro Hrončok
Thank you! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/434#issuecomment-392505340___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-28 Thread Florian Festi
Closed #434 via d5e599d6c9b2fc5c98cec1fccc46e2d365a06dbf. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-22 Thread Miro Hrončok
Changed as requested. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/434#issuecomment-390944663___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-14 Thread Miro Hrončok
Passing `%{?__python}` was copied from Fedora. The script seems to expect it. I can pass `""` here instead, as the invocation differs in Fedora anyway. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-14 Thread Florian Festi
Passing %{?__python} at least deserves it's own separate patch. It also deserves some argumentation why it does not change the behaviour (it probably does) or why the change is acceptable/desirabled. -- You are receiving this because you are subscribed to this thread. Reply to this email

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-14 Thread Miro Hrončok
So I set `%_python_bytecompile_extra` to 1 as default. And the opt out is to undefine it, opt in is to set it to 1. Will do. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-14 Thread Panu Matilainen
The new "extra" naming is much better, thanks. Now that I look closer though: the enable/disable "functions" are very unlike anything else in rpm, and there's no obvious default when it's handled that way. Just drop them and use define/undefine of %_python_bytecompile_extra control it

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-10 Thread Miro Hrončok
@hroncok pushed 1 commit. d8a2025 fixup! Provide a way to opt out from automagic Python bytecompilation -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-10 Thread ニール・ゴンパ
@hroncok I'd suggest calling the flag `%disable_extra_pybytecompile`, since this is referring to "extra" byte-compilation outside of the standard Python site-packages path. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-10 Thread Miro Hrončok
We would like to proceed with the Fedora change and this here looks stalled. Should we maintain a downstream patch instead? @pmatilai Do you have a better suggestion for the name of the disable/enable macro? -- You are receiving this because you are subscribed to this thread. Reply to this

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-05-01 Thread Miro Hrončok
> Handing the script to either Python programmers or distro QA engineers is far > likelier to get timely fixes then in an upstream rpm release. Note that we are fine maintaining this inside rpm, as long as you hear our concerns. -- You are receiving this because you are subscribed to this

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-30 Thread Jeff Johnson
@Conan-Kudo: And "Who maintains RPM?" Expecting C programmers to maintain a shell script to make Python packaging easy and uniform in several distro's is an exercise in politics, not engineering. Handing the script to either Python programmers or distro QA engineers is far likelier to get

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-30 Thread Miro Hrončok
And what is the proper fix? The second part being ditched? I worry that's too breaking. That's why we designed the Fedora change the way we did, keeping it backwards compatible while providing a way out. -- You are receiving this because you are subscribed to this thread. Reply to this email

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-30 Thread ニール・ゴンパ
I don't want to see this brp removed from the rpm tree, especially since every single thing that gets unnecessarily split out and maintained independently becomes more difficult to manage and update. This brp script is relied on by several distributions, so I'd rather see this properly fixed

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-30 Thread Miro Hrončok
So, the conclusion is to remove brp-python-bytecompile from rpm and maintain our own? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Miro Hrončok
The task is not "bytecompile it with a Python interpreter that won't fail". It is "bytecompile it with the Python interpreter that will be used to import it". -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Miro Hrončok
> Meanwhile, there is no reason I know of that an ordered list of python > interpreters in PATH (or in /usr/bin if you must) cannot be tested for > existence and use the first found interpreter to byte compile. The reason is that the packager knows what are those py files for. Is it a plugin

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Jeff Johnson
Au contraire: one can write magic pattern rules to match syntactical variants of *.py and emit the interpreter to be used to interpret a file exactly like MIME was designed for. But I digress: writing correct/useful magic pattern rules based on syntax is hugely fragile and a black art.

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Petr Viktorin
> We agree that using MIME type suffices like "*.py" as a selector is > intrinsically flawed. Yes. > Equally flawed is, say, assuming that Python is always installed on prefixed > paths that match the pattern "/usr/lib(64)?/", or in, say, a sub directory > "pythonX.Y" implying that

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Jeff Johnson
We also agree that automagic byte compilation needs to be phased out, and the tsunami change involved with python2 -> python3 is as good a time to rethink ancient rpm practice is as good as any other alernative. Finally, the brp-python-bytecompile script should be moved out of rpm into some

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Jeff Johnson
We agree that using MIME type suffices like "*.py" as a selector is intrinsically flawed. Equally flawed is, say, assuming that Python is always installed on prefixed paths that match the pattern "/usr/lib(64)?/", or in, say, a sub directory "pythonX.Y" implying that /usr/bin/pythonXY should

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Miro Hrončok
> Why not just add an additional test for an executable bit on a \*.py file > instead of attempting detection of within tree compilation? What does this has to do with executable bits? You need to bytecompile files that are imported, not the files that are executed. The problem with current

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Jeff Johnson
(after perusing the Fedora RFE explaining the change) The failure example given has a confusion in the extension *.py (which can also apparently is the country code for Paraguay). Why not just add an additional test for an executable bit on a *.py file instead of attempting detection of within

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Miro Hrončok
This is not disabling python bytecompilation. This makes the packager in charge of what is compiled with what. I can hook in SELinux devs just to make sure. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Jeff Johnson
You should likely coordinate the disabling of automagic byte compilation with SELinux devels because at leas part of the reason why automagic byte compilation was attempted is/was to ensure that excitable files created by package installs would have security attributes attached/created by rpm.

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Miro Hrončok
* `disable_pybytecompile_outside_pythondir` * `disable_pybytecompile_arbitrary_locations` * ...? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Panu Matilainen
NAK, the name disable_automagic_pybytecompile strongly indicates that it disables it *completely* but it does something entirely different. If byte-compilation outside python libdirs is too magic and error-prone, I think it's better to just drop it from the build root policy unconditionally,

Re: [Rpm-maint] [rpm-software-management/rpm] Provide a way to opt out from automagic Python bytecompilation (#434)

2018-04-24 Thread Igor Gnatenko
ignatenkobrain commented on this pull request. > %__brp_strip %{_rpmconfigdir}/brp-strip %{__strip} %__brp_strip_comment_note %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} %__brp_strip_shared %{_rpmconfigdir}/brp-strip-shared %__brp_strip_static_archive