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
Build system refactoring phase 3 #213
Conversation
|
Why are there these whitespace errors? |
|
I cannot build rpms |
|
Build works for me, error was on my side |
|
Works for me I read commits, it makes sense, works for me, but I'm not an autotools expert so I might miss something. I'm curious about one commit: Build: cleanup unused LDIFs from install/share
|
ecc26a5
to
acb1929
Compare
|
|
commit |
|
The patch has some minor creases but works. Let's merge it to master and iron out the remaining small issues with PRs. |
|
memo for me:
|
Version information is now in VERSION.m4 instead of VERSION. Makefile target version-update was minimized and configure can be run before make. Makefile temporarily contains hardcoded version which has to match the one specified in VERSION.m4. This is preparatory step which will allow us to replace hand-made Makefile with one generated by Automake. https://fedorahosted.org/freeipa/ticket/6418
The neither build nor dist targets work completely. This is temporary breakage enabling further work. https://fedorahosted.org/freeipa/ticket/6418
The name in setup.py should match real name of the module. It will be used by the build system later on. https://fedorahosted.org/freeipa/ticket/6418
This version builds only one version of Python packages. If you want to build for Python 2 & 3 call configure twice using different --with-python or specify PYTHON variable when calling make. dist-hook is using SOURCES.txt file from egg-info. According to Petr Viktorin this should be enough for our purposes and avoids need to create plugins for setuptools. Currently VPATH builds do not work for various reasons. This should be fixed later on. Most credit goes to these guys: Christian Heimes <cheimes@redhat.com> Petr Viktorin <pviktori@redhat.com> Kevin Brown <kevin@kevin-brown.com> https://fedorahosted.org/freeipa/ticket/6418
Most of the logic was unnecessary and wrong. This caused make install to fail. This commit removes unnecessary declarations and creates static library which is not installed. make install in asn1 subdirectory is now passing (and doing nothing). https://fedorahosted.org/freeipa/ticket/6418
This makes easier to use --prefix with make install. https://fedorahosted.org/freeipa/ticket/6418
This is step forward working VPATH builds which cleanly separate sources and build artifacts. It makes the system cleaner and easier to understand. Python and web UI likely require more work to make VPATH builds working. https://fedorahosted.org/freeipa/ticket/6418
Some Makefile.am files were apparently created by copy-pasting other files. As a result, some Makefiles require non-existing README files. Remove this to fix dist target. https://fedorahosted.org/freeipa/ticket/6418
The name from configure.ac is used when generating tarball. https://fedorahosted.org/freeipa/ticket/6418
It now distributes po, pot, Makefile.in, and associated text files. https://fedorahosted.org/freeipa/ticket/6418
By default automake does not distribute man pages. This marks then with dist_ prefix to force their distribution in tarball. https://fedorahosted.org/freeipa/ticket/6418
… directory Static files from Git which are not touched by the build system have to be explicitly listed in Makefile.am so they get into tarball. ipa script was missing on installed systems for the same reason. https://fedorahosted.org/freeipa/ticket/6418
Static files from Git which are not touched by the build system have to be explicitly listed in Makefile.am so they get into tarball. EXTRA_DIST lists whole sub-directories with static files. This is not ideal but we do not have enough time to fix it properly. Dojo builder patch files were renames to shorten their name. The original names were exceeding autotools length limit. https://fedorahosted.org/freeipa/ticket/6418
The offline version does not work for some time already. I'm removing it right now to get rid of garbage which clutters build system. https://fedorahosted.org/freeipa/ticket/6447
BASH completion is now installed by make install. https://fedorahosted.org/freeipa/ticket/6418
FreeIPA has hard dependency on systemd for a long time already. SystemV directory was just polluting the tarball (while being useless). https://fedorahosted.org/freeipa/ticket/6418
At the same time, I've renamed tmpfilesd config file to static name "ipa.conf" instead of using package-specific name. It had no purpose and just complicated build and packaging. Variable substitution into configuration has to be done in Makefile and not in Autoconf as documented in: Autoconf v2.69 manual chapter 4.8.2 Installation Directory Variables: ... Most of these variables have values that rely on prefix or exec_prefix. ... Similarly, you should not rely on AC_CONFIG_FILES to replace bindir and friends in your shell scripts and other files; instead, let make manage their replacement. https://fedorahosted.org/freeipa/ticket/6418
Directory creating was moved from SPEC file to install-data-hook. At the same time, it is using systemd-tmpfiles to create the directories so we do not risk any inconsistency between SPEC file and tmpfilesd configuration. systemd-tmpfiles call is non-critical on purpose: The build would fail when run under unprivileged user because systemd-tmpfiles tries to change ownership. Luckily it creates all the files and just do not change ownership so it works even under unprivileged user. Interestingly, systemd-tmpfiles continues if user does not have sufficient permissions to change ownership but fails if target username does not exist at all. For this reason there is BuildRequires on httpd. https://fedorahosted.org/freeipa/ticket/6418
Makefile in doc subdirectory should be integrated into the main build system but I do not have time to do it now. For now it is enough to distribute everything. https://fedorahosted.org/freeipa/ticket/6418
At the time of this writting https://fedoraproject.org/wiki/Packaging:Guidelines#Manpages says this: When installing man pages, note that they should be installed uncompressed as the build system will compress them as needed. The compression method may change, so it is important to reference the pages in the %files section with a pattern that takes this into account: %{_mandir}/man1/foo.1* Removing the compression also allows to remove several install-data-hook targets from Makefile.am files. https://fedorahosted.org/freeipa/ticket/6418
… SPEC These directories were not used at all. https://fedorahosted.org/freeipa/ticket/6418
The only useful file is /etc/ipa/kdcproxy/kdcproxy.conf so I've removed the other copy of the file in /usr. https://fedorahosted.org/freeipa/ticket/6418
make rpms and ./makerpms.sh will produce the same RPM packages. The advantage of makerpms.sh is that it will take care of initial autoreconf & configure phases as needed. rpm-build-4.13.0-1.fc24.x86_64 broke parallel build of RPMs. If you get error INTERNAL: Exiting with 1 jobserver tokens available; should be 8! undefine the MAKEFLAGS variable and do not specify neither -j nor -l. https://fedorahosted.org/freeipa/ticket/6418
|
I've fixed cases where make generated some build artifacts but make clean did not remove them. These were distinct from Christian comments, I will fix these later on. |
|
|
@tiran |
|
ACK |
make lint and make dist were generating files which were not removed by make clean. https://fedorahosted.org/freeipa/ticket/6418
According to Automake manual section 13 What Gets Cleaned we must not remove files necessary for As far as I can tell from testing, make distclean + PR #220 leaves behind only files generated by |
This monster patch-set refactors most of build system and moves most of the logic from SPEC file to build system.
It is not yet complete, missing parts are:
These will be sorted out later on but the review of the patch set can begin.