New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client-only builds with --disable-server #364
Conversation
|
Could you please extend V4/Build system refactoring to include steps describing how to perform client-only build? Also, is this supposed to build the freeipa-client rpm package? I wasn't able to build the rpm ( Or does it only support make + make install? When I tried to do this it also produced ipaserver and ipatests directories. It was probably a misconfiguration on my side. Please provide instructions on how to do a proper client-only build. |
|
The PR only affects At the moment it is not possible to build FreeIPA without Samba, talloc, tevent, 389 DS, systemd and a couple of more packages. The dependency tree is rather heavy. These dependencies are not relevant for clients, though. I haven't touched RPM builds deliberately. RPM spec can be adjusted in a subsequent PR. It's not relevant for me. |
|
The extra dependencies are indeed not necessary with this change. However, |
|
Nit-pick: A build does not produce any files outside the build environment. Of course make install produces the files -- unless you change the prefix with |
|
I'm not really experienced with autotools, so I do not want to ack this PR without someone else taking a look. I'm also not sure about the best practices in this area. Perhaps @lslebodn could share his opinion on this change? |
|
I think it would be simpler to read the code without to many I checked it very briefly; I might miss something. How do you want to handle python server part? |
|
@lslebodn I like the idea to move the server related header and lib detection to a separate m4 file. In server-less mode, I plan to ignore the Python server part completely. |
|
I fine with ignoring python related parts; but it should be documented. But you might ask other freeIPA developers. (maybe on freeipa-devel) |
|
@lslebodn I think you misunderstood me. The PR adds a new build flavor that ignores and skips the any server-related steps of the build process. The fact that this PR ignores the server part is actually a a feature. :) The last version of the patch now skips |
64ff3f9
to
ea8c35a
Compare
|
Do we care? |
Makefile.am
Outdated
|
|
||
| if ENABLE_SERVER | ||
| SUBDIRS += daemons init install ipaserver | ||
| endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can move ipatests as well because they require server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only some parts of the test suite require ipaserver. I have a branch that can execute just the client tests with tox.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ipatests/test_xmlrpc/ and ipatests/test_integration/ requires them
|
See inline comment and issue above; otherwise LGTM. |
|
@tiran Do you need I'm not aware of any plans to release client-only IPA sources, so I don't think it's needed. |
|
@tomaskrizek @lslebodn Although I don't need |
Makefile.am
Outdated
| IPACLIENT_SUBDIRS = ipaclient ipalib ipapython | ||
| SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests po | ||
| SUBDIRS = asn1 util client contrib $(IPACLIENT_SUBDIRS) ipaplatform ipatests po $(SERVER_SUBDIR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a typo here, missing S at the end of $SERVER_SUBDIR.
configure.ac
Outdated
| install/updates/Makefile | ||
| install/restart_scripts/Makefile | ||
| install/wsgi/Makefile | ||
| install/oddjob/Makefile | ||
| ipaclient/Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change caused me troubles after fixing typo in SERVER_SUBDIR.
Why did you move them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autoreconf -if
./configure --disable-server
make dist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the makefiles because they use autoconf vars that are not available in --disable-server mode. I see two ways to solve the problem:
- still generate all makefiles although some are potentially broken
- set
DIST_SUBDIRS = $(SUBDIRS)
https://www.gnu.org/software/automake/manual/html_node/SUBDIRS-vs-DIST_005fSUBDIRS.html
|
Server build works now, but there's still the |
7dc6685
to
95026f5
Compare
|
I followed @lslebodn advice and changed the PR a bit. I now generate all Makefiles again to fix the |
|
I still think that this use case needs to be documented in http://www.freeipa.org/page/V4/Build_system_refactoring#How_to_Use . IMHO |
|
On (10/02/17 06:11), Petr Vobornik wrote:
I still think that this use case needs to be documented in http://www.freeipa.org/page/V4/Build_system_refactoring#How_to_Use .
IMHO `make dist` can fail with --disable-server. Use case for `make dist` is releasing and there is no point to do release without server bitw. But make sure to document it and test that `make dist` works without it ;) .
Petr FYI: make dist should include all files into tarball
even though configure was invoked with parameter --disable-server.
LS
|
|
I still fail to see why we should care about
Why? |
|
On (17/02/17 01:12), Petr Vobornik wrote:
I still fail to see why we should care about `make dist` with `configure --disable-server` this is not a combination of options which should be used together, there is no point in it except theoretical exercise.
`make dist` works
> then I will need to send PR to fix client-only build and it will not install ipatests with --disable-server.
Why?
The main problem with `client-only` build and `ipatests`
is that there are not test for it.
* all integration test assume that server will be installed first
and not that server is already available somewhere.
* unit test should be run as part of build (e.g. `make check`)
So there is not any reason to install `ipatests` for client only build.
Client only build was tested just in downstream :-(
LS
|
|
It looks like @tiran does not want to move this PR forward.
So here is a link to patch which does not misuse client-only
build and add configure time option to install ipatests.
https://paste.fedoraproject.org/paste/~u7iDljnMTvinxmLFoc25V5M1UNdIGYhyRLivL9gydE=/
As part of this work I found out that 4 dependencies can be simply
moved to server only build: `libuuid`, `DIRSRV`, `libsss_idmap`,
`libsss_nss_idmap`.
Result => Client only build require less C-dependencies.
LS
|
|
Thanks for your contribution. I added your patch to my PR. On my system I ran into a minor issue. Some C99 types like By the way I'm just going to ignore your snidely and snarky comment. |
"dirsrv/slapi-plugin.h" is unnecessary for build of ipa_pwd. This patch allow us to move DIRSRV to daemon only dependencies
Signed-off-by: Christian Heimes <cheimes@redhat.com>
--without-ipatests skips building and installation of the ipatests package. By default the ipatests package is always build and installed by make install. Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
Now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change is not enough; there is still warning:
No problem. I am going to forget that my proposal for compromise was ignored for 12 days. The latest version is a small improvement; but there are still problems/small issues because this PR was created with intention to use tox. I know you are busy. So I wrote client-only implementation from scratch. This PR is superseded by #494 |
|
The PR works and the However, #494 doesn't install extra dependencies with |
|
So this is the reasoning and why I am approving this PR and not #494. When you build all components, including server bits, tests are installed, therefore when we build just client bits tets that are relevant to client bits also need to be installed for consistency. Any switch should default to the same behavior regardless of whether server build is enabled. It is confusing if the --with[out]-[ipa]tests switch changes default based on a different switch passed to configure. As far as I understand this PR maintains the same default for either server or client only builds, so it gets my approval. |
|
On (22/02/17 06:16), Simo Sorce wrote:
So this is the reasoning and why I am approving this PR and not #494.
When you build all components, including server bits, tests are installed, therefore when we build just client bits tets that are relevant to client bits also need to be installed for consistency.
Any switch should default to the same behavior regardless of whether server build is enabled. It is confusing if the --with[out]-[ipa]tests switch changes default based on a different switch passed to configure.
As far as I understand this PR maintains the same default for either server or client only builds, so it gets my approval.
Neither of python packages which I mention in #494 package unit test in fedora.
So there is not a reason to package them by default for client only build.
And integration tests require server therefore must not be installed
by default with client-only build.
Result:
This PR has wrong default for instalation of ipatests with client-only build.
LS
|
|
Also I added section to FreeIPA wiki: http://www.freeipa.org/page/V4/Build_system_refactoring#Packager_-_client_only_build |
https://fedorahosted.org/freeipa/ticket/6517
Simple approach to reduce dependencies for client only builds. I simply wrapped all daemon, init and install dependencies in AM_COND_IF(). I'm open to suggestions. Let the bike shedding begin!