[LU-7228] lustre rpm should provide lustre-client Created: 29/Sep/15  Updated: 08/Jun/16  Resolved: 07/Oct/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.8.0

Type: Task Priority: Minor
Reporter: Frank Zago (Inactive) Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-5834 Lustre installation fails if lustre c... Resolved
is related to LU-3957 Create separate server and client bin... Open
is related to LU-3953 lustre build system improvments Closed
is related to LU-8230 Remove "Provides: lustre-client" Closed
Rank (Obsolete): 9223372036854775807

 Description   

An application packaged in an rpm has to depend on either lustre or lustre-client. Since the lustre rpm also includes everything the lustre-client does, it should also provides lustre-client.

That way an application rpm only has to require lustre-client and not juggle between a lustre or lustre-client dependency.



 Comments   
Comment by James A Simmons [ 29/Sep/15 ]

Is this a duplicate of LU-3957?

Comment by Frank Zago (Inactive) [ 29/Sep/15 ]

No it's not. Sometimes our supports wants it for when lustre rpm is installed, and sometimes lustre-client is installed. With the fix I'll push, the lustre rpm will also provide lustre-client (as shown with rpm -q --provides ...) thus I won't need to have 2 different robinhood packages. This problem has aggravated me for a long time, and it's time to fix fit.

I also support LU-3957, which would be nice to have too.

Comment by Gerrit Updater [ 29/Sep/15 ]

frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/16673
Subject: LU-7228 build: make lustre rpm also provide lustre-client
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a22c43faf3c7db826fd7701d6bbef4a32561d59f

Comment by Frank Zago (Inactive) [ 29/Sep/15 ]

After this patch, the lustre-client "provides" are still unchanged:

# rpm -qp --provides lustre-client-2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f.x86_64.rpm
config(lustre-client) = 2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f
liblnetconfig.so()(64bit)  
liblustreapi.so()(64bit)  
lustre-lite = 2.7.60
lustre-lite-utils = 2.7.60
lustre-client = 2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f
lustre-client(x86-64) = 2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f

The "provides" for the lustre (server) rpm now has lustre-client:

# rpm -qp --provides lustre-2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f.x86_64.rpm 
config(lustre) = 2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f
liblnetconfig.so()(64bit)  
liblustreapi.so()(64bit)  
lustre-client = 2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f
lustre-lite = 2.7.60
lustre-lite-utils = 2.7.60
lustre = 2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f
lustre(x86-64) = 2.7.60-2.6.32_431.20.3.el6_lustre.x86_64_ga22c43f

After a tiny change to the robinhood specfile to look for lustre-client, I can build it against either lustre or lustre-client rpm, and install it against the other one.

diff --git a/autotools/m4/lustre.m4 b/autotools/m4/lustre.m4
index 545e72e..d37eb05 100644
--- a/autotools/m4/lustre.m4
+++ b/autotools/m4/lustre.m4
@@ -7,8 +7,8 @@ AC_DEFUN([AX_LUSTRE_VERSION],
         # special m4 sequences to get square brackets in output:
         # @<:@ => [
         # @:>@ => ]
-        LVERSION=`rpm -qa "lustre@<:@-_@:>@*modules*" --qf "%{Version}\n" 2>/dev/null | tail -1 | cut -d "." -f 1-2`
-        LPACKAGE=`rpm -qa "lustre@<:@-_@:>@*modules*" --qf "%{Name}\n"  2>/dev/null | tail -1`
+        LVERSION=`rpm -qa "lustre(-client)?" --qf "%{Version}\n" 2>/dev/null | tail -1 | cut -d "." -f 1-2`
+        LPACKAGE="lustre-client"
 
         if test -z "$LVERSION"; then
             AC_MSG_RESULT(none installed)

The robinhood "requires" is now:

# rpm -q --requires robinhood-tmpfs
...
lustre-client >= 2.7
...
Comment by Frank Zago (Inactive) [ 29/Sep/15 ]

Note that the proposed change doesn't break any existing specfile.

The only case where it might not work is when the lustre_name is passed as a parameter to rpmbuild, which the regular Lustre makefile doesn't do.

Comment by Frank Zago (Inactive) [ 29/Sep/15 ]

This change should also be compatible when LU-3957 is completed, and both a lustre-client lustre-server rpms are created.

Comment by Gerrit Updater [ 07/Oct/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16673/
Subject: LU-7228 build: make lustre rpm also provide lustre-client
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: adce06a1c31cfd39f11353f5bbf691dbc72d8783

Comment by Joseph Gmitter (Inactive) [ 07/Oct/15 ]

Landed for 2.8

Generated at Sat Feb 10 02:07:05 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.