ndctl icon indicating copy to clipboard operation
ndctl copied to clipboard

Meson build - rpmbuild fails

Open jchu314atgithub opened this issue 3 years ago • 7 comments

It appears that none of the steps described in README generates rhel/ndctl.spec, hence running ./rpmbuild.sh gave this error - Written /home/yuchu/rpmbuild/SOURCES/ndctl-72.22.g351badd.dirty.tar.gz error: failed to stat /home2/workspace/ndctl-repos/ndctl.meson/./rhel/ndctl.spec): No such file or directory

jchu314atgithub avatar Jan 18 '22 20:01 jchu314atgithub

Ah, sorry, yes this should be added to the README. The procedure to build the RPM from scratch is now:

    meson setup build
    meson compile -C build rhel/ndctl.spec
    ./rpmbuild.sh build/rhel/ndctl.spec

djbw avatar Jan 18 '22 20:01 djbw

Thanks Dan for the prompt response. There seems to be another issue. build/rhel/ndctl.spec has Version: 72.22.g351badd+ but $ git describe v72-22-g351badd and $ ./git-version 72.22.g351badd.dirty so, "./rpmbuild.sh build/rhel/ndctl.spec" complains error: Bad source: /home/yuchu/rpmbuild/SOURCES/ndctl-72.22.g351badd+.tar.gz: No such file or directory because the source was tar'ed to /home/yuchu/rpmbuild/SOURCES/ndctl-72.22.g351badd.dirty.tar.gz

Where did the extra '+' come from?

jchu314atgithub avatar Jan 18 '22 21:01 jchu314atgithub

I guess 'dirty' means '+', it's just a matter of consistency.

jchu314atgithub avatar Jan 18 '22 21:01 jchu314atgithub

I have not got dirty (changes pending in the source tree) rpm builds to work yet, so you currently need to build from an unmodified git tree.

djbw avatar Jan 18 '22 21:01 djbw

Oh, I see. I changed the meson_option file to elect 'asciidoc' instead of the default 'asciidoctor', guess I could do that via meson configure. Thanks!

jchu314atgithub avatar Jan 18 '22 21:01 jchu314atgithub

Dan, ./rpmbuild.sh build/rhel/ndctl.spec complains RPM build errors: File not found: /root/rpmbuild/BUILDROOT/ndctl-72.22.g351badd-1.el8.x86_64/usr/lib/systemd/system/ndctl-monitor.service

It appears that the $(repo_dir)/ndctl/ndctl-monitor.service was not copied over to $(repo_dir)/build/, and so isn't installed by sudo meson install -C build. What should I do next? thanks!

jchu314atgithub avatar Jan 19 '22 20:01 jchu314atgithub

@jchu314atgithub looking at ndctl/meson.build, ndctl-monitor.service is installed, but depends on systemd being enabled. In your build log, so you see:

  1. Dependency systemd found: YES 249 (cached)
  2. Installing /root/ndctl/ndctl/ndctl-monitor.service to /usr/lib/systemd/system

stellarhopper avatar Feb 10 '22 22:02 stellarhopper