# rpm built not fully installed

**URL:** <https://forums.suse.com/t/rpm-built-not-fully-installed/35519>\
**Category:** SLES Configure-Administer\
**Created:** [March 18, 2021, 4:02pm UTC](https://forums.suse.com/t/rpm-built-not-fully-installed/35519 "2021-03-18T16:02:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://forums.suse.com/u/Frederic)\
**Post date:** [March 18, 2021, 4:02pm UTC](https://forums.suse.com/t/rpm-built-not-fully-installed/35519/1 "2021-03-18T16:02:46Z")

</div>

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:

1. On my “production server”, download sources from Linbit (drbd-9.0.24-1 and utils 9.0.3).
2. deploy the tar.gz files under /usr/src/package/SOURCES
3. 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
> 
> ```

1. make a rpmbuild -ba drbd-kernel.spec =\> no issue displayed, 2 rpms were created
2. for utils : go to the directory, launch ./autogen and ./configure --enable-spec
3. 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…

---

<div class="post-metadata">

**Author:** ![Andreas1](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Andreas1](https://forums.suse.com/u/Andreas1)\
**Post date:** [March 18, 2021, 7:11pm UTC](https://forums.suse.com/t/rpm-built-not-fully-installed/35519/2 "2021-03-18T19:11:48Z")

</div>

There is a small rpmbuild howto:  
[https://forums.suse.com/discussion/comment/59158/#Comment\_59158](https://forums.suse.com/discussion/comment/59158/#Comment_59158 "https://forums.suse.com/discussion/comment/59158/#Comment\_59158")  
Remove step 5). =\> You can easily destroy your system!  
Be aware of tainted kernel:  
[https://forums.suse.com/discussion/comment/59486](https://forums.suse.com/discussion/comment/59486)  
And you should not mix kernel modules from different kernel (sources).  
Check your rpm installation(s):

# rpm -qa |grep -i drbd

# rpm -ql drbd

# rpm -V drbd

# rpm -Va

---

<div class="post-metadata">

**Author:** ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://forums.suse.com/u/Frederic)\
**Post date:** [March 19, 2021, 2:39pm UTC](https://forums.suse.com/t/rpm-built-not-fully-installed/35519/3 "2021-03-19T14:39:16Z")

</div>

Thanks Andreas  
Not sure to understand why you suggest to remove the step 5 : without making the couple autogen/configure --enable-specs, I won’t have the drbd.spec file to build the rpm.

However, I will search a version for my current kernel to go on.

I have another solution : compile and install directly from source for each deployment, it’s less “pretty” but it works.
