mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-05 12:37:54 +00:00
0a476e1279
buildrpms.pl is what actually builds xcat-core now: every core CD pipeline calls
it (ci/{el,suse,ubuntu}/Jenkinsfile.core-*), and it reaches none of these
scripts. What is left of them is a second, diverging build path that nothing
runs -- buildcore.sh has no caller at all (its one mention in
Jenkinsfile.core-el-stable is a comment), makerpm's only caller is
buildlocal.sh, and buildlocal.sh has no caller.
That divergence broke master. #7774 added a source-only mode to these scripts
rather than to buildrpms.pl, giving makerpm an unguarded
. "$(dirname "$0")/build-utils/source-only.sh"
at line 13, used on every build path (xcat_configure_rpm_build_mode,
xcat_announce_build), not only under SRCONLY. apache_config_sources.t stages
makerpm into a fixture that creates build-utils/ but copies only
sync-xcat-apache-configs into it, so makerpm died at line 13 and nothing reached
SOURCES/. Because prove -r xCAT-test/unit runs the whole suite, that reddened
xcat_pr_test on every open PR. It merged on a green run from 2026-08-27;
apache_config_sources.t landed 2026-08-30, and nothing rebuilt it in between.
Removed: makerpm, buildcore.sh, buildlocal.sh, build-utils/source-only.sh,
build-utils/buildcore-source-only.sh, and the tests that covered only them
(makerpm_source_only.t, buildcore_source_only.t). The makerpm half of
apache_config_sources.t goes with makerpm; its sync-xcat-apache-configs half
stays, because buildrpms.pl invokes that helper directly. The source-only
capability is preserved as buildrpms.pl --source-only, in the preceding commit.
build-ubunturepo is deliberately NOT touched. It is not a legacy script: both
Ubuntu core CD pipelines invoke it, github_action_xcat_test.pl:325 invokes it on
every PR, and it was last fixed this week. buildrpms.pl is RPM-only -- mock and
createrepo_c, no dpkg path -- so there is nothing to migrate it to. Giving
Debian builds an equivalent modern builder is separate work.
Verified: prove -r xCAT-test/unit before and after differs by exactly one file
-- apache_config_sources.t fails on upstream/master (4a0d9e0bb, tests 64-65) and
passes here. The other six failures are identical on both and are missing DB
modules on the machine that ran it. No remaining reference to any removed file
except the one comment in buildrpms.pl naming where its templates came from.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
86 lines
3.2 KiB
ReStructuredText
86 lines
3.2 KiB
ReStructuredText
Building Source Code
|
|
====================
|
|
|
|
xcat-core
|
|
---------
|
|
|
|
Clone the xCAT project from `GitHub <https://github.com/xcat2/xcat-core>`_ and
|
|
build the rpms with ``buildrpms.pl``::
|
|
|
|
cd xcat-core
|
|
./buildrpms.pl --target alma+epel-9-x86_64
|
|
|
|
Each package is built in its own ``mock`` chroot, so the build does not depend on
|
|
what happens to be installed on the build host. Pass ``--target`` once per target
|
|
to build several; the default is every supported EL target. ``./buildrpms.pl
|
|
--help`` lists the rest.
|
|
|
|
To build the source rpms and no binary rpms, pass ``--source-only``::
|
|
|
|
cd xcat-core
|
|
./buildrpms.pl --target alma+epel-9-x86_64 --source-only
|
|
|
|
A source rpm is the input that a build service such as mock, koji, COPR or OBS
|
|
takes, and it lets one machine make the source rpms while another makes the
|
|
binary rpms for each architecture. ``rpmbuild`` does not need the packages named
|
|
in ``BuildRequires`` to make a source rpm, so this also builds on a machine that
|
|
cannot complete a full build.
|
|
|
|
The source rpms land in ``dist/<target>/rpms/SRPMS/``. The binary repository
|
|
metadata is left as the last full build wrote it, and no ``.repo`` file is
|
|
emitted, because a source-only run has no binary packages to advertise.
|
|
|
|
.. note::
|
|
|
|
``buildcore.sh``, ``makerpm`` and ``buildlocal.sh`` were removed in 2.19.
|
|
``buildrpms.pl`` replaces all three, and its ``--source-only`` replaces the
|
|
old ``SRCONLY=1``. Debian and Ubuntu packages are still built by
|
|
``./build-ubunturepo``.
|
|
|
|
xcat-deps
|
|
---------
|
|
|
|
The ``xcat-deps`` package is currently owned and maintained by the core development on our internal servers. Use the packages created at: http://xcat.org/download.html#xcat-dep
|
|
|
|
|
|
man pages
|
|
---------
|
|
|
|
The xCAT man pages are written in Perl POD files and automatically get built into the xCAT rpms. The content in the .pod files are always the master.
|
|
|
|
In the past, the man pages were converted into html files and uploaded to SourceForge. In moving to `ReadTheDocs <http://xcat-docs.readthedocs.org>`_ we want to also provide the man pages as references in the documentation. To convert the ``pods`` to ``rst``, we are using The Perl module: `pod2rst <http://search.cpan.org/~dowens/Pod-POM-View-Restructured-0.02/bin/pod2rst>`_.
|
|
|
|
The following steps will help configure ``pod2rst`` and be able to generate the changes .rst files to push to GitHub.
|
|
|
|
#. Download the following Perl modules:
|
|
|
|
- `Pod-POM-View-Restructured-0.02 <http://search.cpan.org/~dowens/Pod-POM-View-Restructured-0.02/lib/Pod/POM/View/Restructured.pm>`_
|
|
- `Pod-POM-2.00 <http://search.cpan.org/~neilb/Pod-POM-2.00/lib/Pod/POM.pm>`_
|
|
|
|
#. For each of the above Perl modules:
|
|
|
|
* **[as root]** Extract and build the Perl module ::
|
|
|
|
perl Makefile.PL
|
|
make
|
|
make install
|
|
|
|
* **[as non-root]** Extract and build the Perl module using PREFIX to specify a directory that you have write permission ::
|
|
|
|
mkdir ~/perllib
|
|
perl Makefile.PL PREFIX=~/perllib
|
|
make
|
|
make install
|
|
|
|
#. Execute the script ``create_man_pages.py`` to generate the .rst files into ``xcat-core/docs`` :
|
|
|
|
* **[as root]** ::
|
|
|
|
cd xcat-core
|
|
./create_man_pages.py
|
|
|
|
* **[as non root]** ::
|
|
|
|
cd xcat-core
|
|
./create_man_pages.py --prefix=~/perllib
|