On 11.10.2016 09:36, Petr Spacek wrote:
On 11.10.2016 09:00, Jan Cholasta wrote:
Hi,

On 7.10.2016 11:56, Petr Spacek wrote:
Dear FreeIPA developers and packagers,

you can find first version of the Build system refactoring design document on:
http://www.freeipa.org/page/V4/Build_system_refactoring

If you do not care about implementation details, please be so kind and quickly
scan through chapter
http://www.freeipa.org/page/V4/Build_system_refactoring#Feature_Management

I'm not an FreeIPA packager so I might miss some important thing which needs
to be configurable.

1) There should be a --with-python switch to select the version of Python to
use in our command line tools and/or during build. The default would be
"python", i.e. the default Python interpreter found in the path.

Okay. Can we pick some descriptive name?

--with-default-python
or
--with-<something-else>-python?

I think that it would be confusing if we had just
--with-python
--with-python2
--with-python3

If the default values are "python", "python2", "python3" respectively, I don't think it would be confusing, since most of the time you only need to specify --with-python, if anything.

Do we even need --with-python2 and --with-python3? I think they would only make sense if you had multiple Python minor versions installed and wanted to make packages for all of them.



Besides that, I would make --with-default-python to accept either "2" or "3"
(and thus use path specified by --with-python? option).



2) There is --with-pylint, --with-jslint, but no --with-po-validate.

Let me clarify: I plan to use --with for things which have paths or other
parameters, --enable for booleans.

I see, that was not clear to me, I confused the two.


Where po-validate belongs? AFAIK target validate-po in install/po/Makefile is
calling script ../../ipatests/i18n.py which is in IPA source tree anyway.

Do you want to have a --enable/--disable switch for these PO checks?

Not really.



3) I would prefer that if pylint (or jslint or python-polib) is not installed
the build would fail instead of silently skipping the lint. Let it be a wilful
decision of the packager whether to run the lint or not.

Yes, that is my intent. It will not skip anything automatically.

Right.




4) It is explicitly stated that I can turn off features using
--without-feature. But how do I disable building server components?

I've added explicit mention of --disable-feature:
http://www.freeipa.org/index.php?title=V4%2FBuild_system_refactoring&type=revision&diff=14311&oldid=14310

Thanks.



Also, I would appreciate ideas how to handle build versioning:
http://www.freeipa.org/page/V4/Build_system_refactoring#Versioning

My main questions are:
* What is triggering IPA upgrade?
* Would it be sufficient to bump release in RPM? (I mean - theoretically.
Could the code be modified to detect this?)

Here I'm trying to avoid unnecessary rebuilds caused by changes to
IPA_VENDOR_VERSION during each build.

How exactly is IPA_VENDOR_VERSION causing unnecessary rebuilds? I can see it
is written only to ipapython/version.py:

$ git grep -E '\bIPA_VENDOR_VERSION\b'
Makefile:IPA_VENDOR_VERSION=$(IPA_VERSION)$(IPA_VENDOR_VERSION_SUFFIX)
Makefile:       sed -i -e "s:__VENDOR_VERSION__:$(IPA_VENDOR_VERSION):"
ipapython/version.py

My bad, I should write 'IPA*VERSION*'.

Especially unconditional write to version.m4 is problematic but unconditional
writes to other files slows things as well, just not that much.

Could this be worked around by writing into a temporary file, comparing it with the real file and mv'ing the temporary file over the real file only if the differ?

--
Jan Cholasta

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to