Hello
First time that I have to build a rpm so, maybe the following error will be easy to fix …
I tried to build drbd rpms for a SLES 12 SP5 (I don’t have access to the HA repo with official delivery), here is what I’ve done:
- On my “production server”, download sources from Linbit (drbd-9.0.24-1 and utils 9.0.3).
- deploy the tar.gz files under /usr/src/package/SOURCES
- for drbd-9.0.24-1 : go to the directory, add some lines in drbd-kernel.spec
%files %defattr(-,root,root,-) /lib/modules/4.12.14-122.63-default/updates/drbd.ko /lib/modules/4.12.14-122.63-default/updates/drbd_transport_tcp.ko
- make a rpmbuild -ba drbd-kernel.spec => no issue displayed, 2 rpms were created
- for utils : go to the directory, launch ./autogen and ./configure --enable-spec
- make a rpmbuild -ba drbd.spec => no issue, 8 rpms created
Here is the list of created RPMs:
drbd-9.3.0-1.x86_64.rpm drbd-man-ja-9.3.0-1.x86_64.rpm
drbd-bash-completion-9.3.0-1.x86_64.rpm drbd-pacemaker-9.3.0-1.x86_64.rpm
drbd-heartbeat-9.3.0-1.x86_64.rpm drbd-udev-9.3.0-1.x86_64.rpm
drbd-kernel-9.0.24-1.x86_64.rpm drbd-utils-9.3.0-1.x86_64.rpm
drbd-kmp-default-9.0.24_k4.12.14_122.63-1.x86_64.rpm drbd-xen-9.3.0-1.x86_64.rpm
So, I uploaded these rpms on my test server, created a repo for zypper and tried a zypper in drbd-kernel and zypper in drbd
During the second command, I had warning messages :
> (2/6) Installing: drbd-kmp-default-9.0.24_k4.12.14_122.63-1.x86_64 […done]
Additional rpm output: WARNING: drbd-kmp-default-9.0.24_k4.12.14_122.63-1 does not contain any kernel modules cat: /var/tmp/weak-modules2.veGkOx/krel-drbd-kmp-default-9.0.24_k4.12.14_122.63-1: No such file or directory /usr/lib/module-init-tools/weak-modules2: line 89: /var/tmp/weak-modules2.veGkOx/modules-drbd-kmp-default-9.0.24_k4.12.14_122.63-1: No such file or directory /usr/lib/module-init-tools/weak-modules2: line 488: /var/tmp/weak-modules2.veGkOx/basenames-drbd-kmp-default-9.0.24_k4.12.14_122.63-1: No such file or directory warning: %post(drbd-kmp-default-9.0.24_k4.12.14_122.63-1.x86_64) scriptlet failed, exit status 1
If I look at lsmod, drbd is not here, if I try a drbdadm status, I have the error :
> modinfo: ERROR: Module drbd not found.
modprobe: FATAL: Module drbd not found in directory /lib/modules/**4.12.14-122.60-default** Failed to modprobe drbd (No such file or directory)
When I search for drbd.ko, I found it but under another kernel :
/lib/modules/4.12.14-122.63-default/updates/drbd.ko
If I try : insmod /lib/modules/4.12.14-122.63-default/updates/drbd.ko, I have an error :
> insmod: ERROR: could not insert module /lib/modules/4.12.14-122.63-default/updates/drbd.ko: Unknown symbol in module
in dmesg, I saw the error drbd: Unknown symbol crc32c (err 0)
So, I miss something…