cea-hpc / robinhood

Robinhood Policy Engine : a versatile tool to monitor filesystem contents and schedule actions on filesystem entries.
http://robinhood.sf.net
Other
177 stars 60 forks source link

Update Robinhood to build on Rocky9 #143

Open dubmarm opened 2 weeks ago

dubmarm commented 2 weeks ago

Robinhod was failing to build with Rocky9.4 for the following reasons

Because spec.in has %post_un macros that were not compliant with the newer version of systemd_macros. Specifically, post_un requires an argument instead of implicits.

Because the src/tests/test_confparam was failing to link resulting in an undefined function error for sm_attr_get.

 /usr/bin/ld: ../common/.libs/libcommontools.a(param_utils.o): in function `build_cmd':
 /tmp/robinhood/rpms/BUILD/robinhood-3.1.7/src/common/param_utils.c:464: undefined reference to `sm_attr_get'
 collect2: error: ld returned 1 exit status

Because newer OSes/newer GCC require gettid() to not be used as a var name so that it doesn't clash with glibc. Therefore gettid() needs to be renamed a new var; such as sys_gettid().

Because with lustre-2.15, IOC_MDC_GETFILEINFO_V1 is already declared in header file. Therefore, it needs to become an optional definition.

Because mailx is not available on Rocky9 and users should use s-nail instead. Therefore, the spec needs logic for mailx vs s-nail that is rpm v4.11 compliant (centos7) as well as rpm v4.13 compliant (rocky9)

With these listed changes, robinhood can build on Rocky9.4 as well as Centos7