Meson build - rpmbuild fails
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
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
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?
I guess 'dirty' means '+', it's just a matter of consistency.
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.
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!
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 looking at ndctl/meson.build, ndctl-monitor.service is installed, but depends on systemd being enabled. In your build log, so you see:
Dependency systemd found: YES 249 (cached)Installing /root/ndctl/ndctl/ndctl-monitor.service to /usr/lib/systemd/system