[
https://issues.apache.org/jira/browse/MESOS-9605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16777304#comment-16777304
]
Till Toenshoff commented on MESOS-9605:
---------------------------------------
Bit of more background on the complexity of the problem;
When building an RPM package via {{support/packaging/centos/build_rpm.sh}}, the
build process undergoes two configure phases.
The first one triggered immediately by {{build_rpm.sh}};
{noformat}
$MESOS_DIR/configure && make dist
{noformat}
[https://github.com/apache/mesos/blob/68b73928a622be093a720277ec2ae1589c221b88/support/packaging/centos/build_rpm.sh#L29]
And then a second one, defined by {{mesos.spec}};
{noformat}
%configure \
--enable-optimize \
--disable-python-dependency-install \
--enable-install-module-dependencies \
--enable-libevent \
--enable-ssl \
--enable-grpc \
--enable-hardening \
--enable-xfs-disk-isolator=%{_with_xfs}
{noformat}
[https://github.com/apache/mesos/blob/68b73928a622be093a720277ec2ae1589c221b88/support/packaging/centos/mesos.spec#L91-L99]
Only during the first phase, will we see a git repo and be able to extract the
information needed. During the second configuration phase as well as the actual
build, there is no git repo available to the build.
> mesos/mesos-centos nightly docker image has to include the SHA of the build.
> ----------------------------------------------------------------------------
>
> Key: MESOS-9605
> URL: https://issues.apache.org/jira/browse/MESOS-9605
> Project: Mesos
> Issue Type: Bug
> Components: build
> Reporter: Till Toenshoff
> Assignee: Till Toenshoff
> Priority: Minor
> Labels: Mesosphere, Packaging, integration
>
> As a snapshot build, we need to identify the exact HEAD of the branch build.
> Our current snapshot builds lack this information due to the way the build is
> setup.
> The current build identifies e.g. when running the agent like this;
> {noformat}
> $ docker run -it docker.io/mesos/mesos-centos:master-2019-02-15 mesos-slave
> --work_dir=/tmp --master=127.0.0.1:5050
> I0223 02:22:43.317088 1 main.cpp:349] Build: 2019-02-15 22:46:47 by
> I0223 02:22:43.317643 1 main.cpp:350] Version: 1.7.2
> I0223 02:22:43.332036 1 systemd.cpp:240] systemd version `219` detected
> I0223 02:22:43.332067 1 main.cpp:452] Initializing systemd state
> E0223 02:22:43.332135 1 main.cpp:461] EXIT with status 1: Failed to
> initialize systemd: Failed to locate systemd runtime directory:
> /run/systemd/system
> {noformat}
> Note we lack a user in the first output line and the GIT sha altogether. Only
> tagged builds should commonly lack the SHA as it is not needed.
> {noformat}
> I0215 08:28:20.871155 34809 main.cpp:358] Git SHA:
> dff75bb705dca473a5c4019d9ed6e2d3530e3865
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)