Whamcloud - gitweb
LU-16382 spec: SUSE OBS requires kernel-source requirement. 65/49365/9
authorMr NeilBrown <neilb@suse.de>
Mon, 12 Dec 2022 04:31:16 +0000 (15:31 +1100)
committerOleg Drokin <green@whamcloud.com>
Sat, 22 Apr 2023 17:29:39 +0000 (17:29 +0000)
commit9976de28e0119c59b8557df574959bbf85066cc4
treeeba57e69593ceedd022480f5c9473b2bf7babfe5
parent25fb82eb413389b6023e0e61f7efb71e91d15c01
LU-16382 spec: SUSE OBS requires kernel-source requirement.

The SUSE OBS creates a virtual environment containing
ONLY the stated BuildRequires requirements, and some defaults.
To be able to build ldiskfs we need the kernel source, so we
need "BuildRequires: kernel-source".

However when contrib/lbuild it is used to build lustre, it finds the
source by other means and fails on that BuildRequires.  So it must be
conditional on running under abuild. (the OBS build tool).

When abuild extracts these BuildRequires, it cannot parse %() so
conditions using that all appear to be "false".  But %() is the only
way to detect abuild - but looking in environment.

So a dance is needed to fit with all these odd requirements.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I2fe9ecaf857ecbd5fda7e857b661b5b756501190
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49365
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre.spec.in