Discussion:
[Drbd-dev] DRBD 9 on Fedora 28
Digimer
2018-07-24 04:40:45 UTC
Permalink
Hi all,

I'm trying to get DRBD 9 on Fedora 28 (which I'm using as a dev
platform ahead of RHEL 8 beta). The DRBD that ships with the kernel is
8.4.10.

I've been struggling to build the 9.0.15rc1 RPM without luck. I've
made a few progressions (ie: added kernel-rpm-macros, kernel-devel and
elfutils-devel to BuildRequires).

Has anyone managed to build DRBD9 on Fedora 27+? If so, would you mind
sharing the src.rpm or .spec?

Thanks!

digimer
--
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
Digimer
2018-07-24 15:23:07 UTC
Permalink
Post by Digimer
Hi all,
I'm trying to get DRBD 9 on Fedora 28 (which I'm using as a dev
platform ahead of RHEL 8 beta). The DRBD that ships with the kernel is
8.4.10.
I've been struggling to build the 9.0.15rc1 RPM without luck. I've
made a few progressions (ie: added kernel-rpm-macros, kernel-devel and
elfutils-devel to BuildRequires).
Has anyone managed to build DRBD9 on Fedora 27+? If so, would you mind
sharing the src.rpm or .spec?
Thanks!
digimer
Following up with additional info;

The problem is in this loop;

https://github.com/LINBIT/drbd-9.0/blob/master/drbd-kernel.spec#L84

It causes the arch to be appended twice;

====
+ for flavor in default
++ '[' default = default ']'
+ make -C /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64 modules_install
M=/home/digimer/rpmbuild/BUILD/drbd-9.0.15rc1/obj/default
make: *** /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64: No such file
or directory. Stop.
====

I've been trying to figure out how to fix it, but it seems my ignorance
of RPM .spec is getting the better of me...
--
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
Digimer
2018-07-24 15:31:31 UTC
Permalink
Post by Digimer
Post by Digimer
Hi all,
I'm trying to get DRBD 9 on Fedora 28 (which I'm using as a dev
platform ahead of RHEL 8 beta). The DRBD that ships with the kernel is
8.4.10.
I've been struggling to build the 9.0.15rc1 RPM without luck. I've
made a few progressions (ie: added kernel-rpm-macros, kernel-devel and
elfutils-devel to BuildRequires).
Has anyone managed to build DRBD9 on Fedora 27+? If so, would you mind
sharing the src.rpm or .spec?
Thanks!
digimer
Following up with additional info;
The problem is in this loop;
https://github.com/LINBIT/drbd-9.0/blob/master/drbd-kernel.spec#L84
It causes the arch to be appended twice;
====
+ for flavor in default
++ '[' default = default ']'
+ make -C /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64 modules_install
M=/home/digimer/rpmbuild/BUILD/drbd-9.0.15rc1/obj/default
make: *** /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64: No such file
or directory. Stop.
====
I've been trying to figure out how to fix it, but it seems my ignorance
of RPM .spec is getting the better of me...
I should mention; This same src.rpm builds fine on RHEL 7.5. So it seems
to be specifically a Fedora issue (tried on 27 and 28).
--
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
Digimer
2018-07-24 15:55:23 UTC
Permalink
Post by Digimer
Post by Digimer
Post by Digimer
Hi all,
I'm trying to get DRBD 9 on Fedora 28 (which I'm using as a dev
platform ahead of RHEL 8 beta). The DRBD that ships with the kernel is
8.4.10.
I've been struggling to build the 9.0.15rc1 RPM without luck. I've
made a few progressions (ie: added kernel-rpm-macros, kernel-devel and
elfutils-devel to BuildRequires).
Has anyone managed to build DRBD9 on Fedora 27+? If so, would you mind
sharing the src.rpm or .spec?
Thanks!
digimer
Following up with additional info;
The problem is in this loop;
https://github.com/LINBIT/drbd-9.0/blob/master/drbd-kernel.spec#L84
It causes the arch to be appended twice;
====
+ for flavor in default
++ '[' default = default ']'
+ make -C /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64 modules_install
M=/home/digimer/rpmbuild/BUILD/drbd-9.0.15rc1/obj/default
make: *** /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64: No such file
or directory. Stop.
====
I've been trying to figure out how to fix it, but it seems my ignorance
of RPM .spec is getting the better of me...
I should mention; This same src.rpm builds fine on RHEL 7.5. So it seems
to be specifically a Fedora issue (tried on 27 and 28).
Adding again; When I created a symlink (4.17.7-200.fc28.x86_64.x86_64 ->
4.17.7-200.fc28.x86_64) to test, the build got further but still failed.
I'm attaching the spec I am currently using. It's modified somewhat from
the spec generated by building from git (mainly to remove suse checks
and simplify things).

====
Finding Recommends:
Finding Suggests:
Finding Supplements:
Finding Enhances:
Provides: drbd-kernel = 9.0.15rc1-0.fc28 drbd-kernel(x86-64) =
9.0.15rc1-0.fc28
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Processing files: kmod-drbd-9.0.15rc1-0.fc28.x86_64
Processing files: drbd-kernel-debugsource-9.0.15rc1-0.fc28.x86_64
error: Empty %files file
/home/digimer/rpmbuild/BUILD/drbd-9.0.15rc1/debugsourcefiles.list


RPM build errors:
Macro %kmp_release defined but not used within scope
Macro %kmp_version defined but not used within scope
Macro %latest_kernel defined but not used within scope
Deprecated external dependency generator is used!
Empty %files file
/home/digimer/rpmbuild/BUILD/drbd-9.0.15rc1/debugsourcefiles.list
====
--
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
Digimer
2018-07-24 18:52:25 UTC
Permalink
Post by Digimer
Post by Digimer
Post by Digimer
Hi all,
I'm trying to get DRBD 9 on Fedora 28 (which I'm using as a dev
platform ahead of RHEL 8 beta). The DRBD that ships with the kernel is
8.4.10.
I've been struggling to build the 9.0.15rc1 RPM without luck. I've
made a few progressions (ie: added kernel-rpm-macros, kernel-devel and
elfutils-devel to BuildRequires).
Has anyone managed to build DRBD9 on Fedora 27+? If so, would you mind
sharing the src.rpm or .spec?
Thanks!
digimer
Following up with additional info;
The problem is in this loop;
https://github.com/LINBIT/drbd-9.0/blob/master/drbd-kernel.spec#L84
It causes the arch to be appended twice;
====
+ for flavor in default
++ '[' default = default ']'
+ make -C /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64 modules_install
M=/home/digimer/rpmbuild/BUILD/drbd-9.0.15rc1/obj/default
make: *** /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64: No such file
or directory. Stop.
====
I've been trying to figure out how to fix it, but it seems my ignorance
of RPM .spec is getting the better of me...
I should mention; This same src.rpm builds fine on RHEL 7.5. So it seems
to be specifically a Fedora issue (tried on 27 and 28).
Digimer, you might be better off asking the Fedora folks rather than the DRBD folks, since they may have had to fix similar issues in other packages.
Nick, since you're a Fedora ambassador do you have any suggestions on where or who to ask? I don't know if
Thanks, Sarah
Thanks Sarah!

I asked on the #fedora IRC channel and a few folks did help (that's
how I narrows it down to that loop), the general feeling was to talk to
LINBIT folks. Personally, I am happy working with either, though I want
to admit straight up that I am fairly new to RPM packaging.

If Nick has advice, I'll be happy to follow it, too. :)

digimer
--
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
Lars Ellenberg
2018-07-26 16:01:59 UTC
Permalink
"making progress" ;-)
Post by Digimer
Post by Digimer
Post by Digimer
Post by Digimer
Hi all,
I'm trying to get DRBD 9 on Fedora 28 (which I'm using as a dev
platform ahead of RHEL 8 beta). The DRBD that ships with the kernel is
8.4.10.
I've been struggling to build the 9.0.15rc1 RPM without luck. I've
made a few progressions (ie: added kernel-rpm-macros, kernel-devel and
elfutils-devel to BuildRequires).
Has anyone managed to build DRBD9 on Fedora 27+? If so, would you mind
sharing the src.rpm or .spec?
Thanks!
digimer
Following up with additional info;
The problem is in this loop;
https://github.com/LINBIT/drbd-9.0/blob/master/drbd-kernel.spec#L84
It causes the arch to be appended twice;
The "kernel_source" macro is the offender here,
and is defined by the "%kernel_module_package" macro.
The "flavors_to_build" macro may play a role as well,
also defined by that same macro, likely just a line before.

the kernel_source macro on rhel used to expect a "default" flavor,
and would "filter that out", but append a .$flavor for any other flavor.

possibly the "verrel" subcommand of the kmodtool script is an other
place to apply a fix, to strip out the first .x86_64 there,
maybe by adding it to the "known variants" list.

or maybe you could just tell rpmbuild or the top level spec
that the kernel source directory is /usr/src/kernels/4.17.7-200.fc28
and have the macro append the .x86_64 just that once.

that would be, or at least used to be in rhel,
usr/lib/rpm/redhat/macros and usr/lib/rpm/redhat/kmodtool

if you really want to dig into it, you could compare
the kernel_module_package macro and kmodtool scripts
between rhel (where it apprently still works?) and current fedora
(where it does not/no longer work).

I had a lot of "fun" in the past fighting those magic scripts and macros
to get them to actually do what they where supposed to do in the first
place, on various occasions, more than I can recount the details on,
but I remember that rhel5, 6, 7, suse, and some other rpm based distros
have all been broken differently at one time or the other
in kernel_module_package and/or kmodtool.
Post by Digimer
Post by Digimer
Post by Digimer
====
+ for flavor in default
++ '[' default = default ']'
+ make -C /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64 modules_install
M=/home/digimer/rpmbuild/BUILD/drbd-9.0.15rc1/obj/default
make: *** /usr/src/kernels/4.17.7-200.fc28.x86_64.x86_64: No such file
or directory. Stop.
====
I've been trying to figure out how to fix it, but it seems my ignorance
of RPM .spec is getting the better of me...
I should mention; This same src.rpm builds fine on RHEL 7.5. So it seems
to be specifically a Fedora issue (tried on 27 and 28).
Digimer, you might be better off asking the Fedora folks rather than
the DRBD folks, since they may have had to fix similar issues in
other packages.
Nick, since you're a Fedora ambassador do you have any suggestions
on where or who to ask? I don't know if
is appropriate unless Digimer is planning on submitting his work to
her.
just saying ;-)
Post by Digimer
Fedora.
Thanks, Sarah
Thanks Sarah!
I asked on the #fedora IRC channel and a few folks did help (that's
how I narrows it down to that loop), the general feeling was to talk to
LINBIT folks. Personally, I am happy working with either, though I want
to admit straight up that I am fairly new to RPM packaging.
If Nick has advice, I'll be happy to follow it, too. :)
digimer
Cheers,

Lars
--
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R&D, Integration, Ops, Consulting, Support

DRBD® and LINBIT® are registered trademarks of LINBIT
Loading...