[slurm-users] slurm-20.02.1-1 failed rpmbuild with error File not found
Ole Holm Nielsen
Ole.H.Nielsen at fysik.dtu.dk
Thu Apr 23 06:05:03 UTC 2020
Hi Michael,
Thanks for your insightful explanation of the Slurm RPM build process!
This clarified the topic a lot for me. I have updated my Slurm
installation Wiki page based upon your information:
https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#build-slurm-rpms
/Ole
On 21-04-2020 22:27, Michael Jennings wrote:
> They do something even better: They allow the user/customer to make
> the choice in the spec file! :-) And to be clear, they don't expect
> users to be experts in building packages; that's why their Quick-Start
> Guide (https://slurm.schedmd.com/quickstart_admin.html) is as thorough
> as it is; it even has instructions for building RPMs with
> conditionals! :-)
>
> Look at https://github.com/SchedMD/slurm/blob/master/slurm.spec#L31
> for the gory details. By passing `--with mysql` to `rpmbuild`, you
> are making the choice "I want Slurm to require MySQL or MariaDB." By
> passing `--without mysql` instead, you're making the choice "I don't
> want Slurm's MySQL/MariaDB support." And specifying neither means you
> don't care. That's how RPM build conditionals work.
>
> Ole is 100% correct; if you want to deviate from the default
> "auto-detect" behavior, you need to pass arguments to the build.
>
> Slurm is a product that has to build on an enormous variety of
> hardware and software platforms, and the SchedMD folks do a
> spectacular job of keeping that support functional while still
> maintaining flexibility and reliability.
>
> It's not possible for SchedMD to "[make] a choice for the db" that
> will work for all cases, nor can they make the choice that works for
> your particular use case without breaking all the other ones. It's
> not just tricky, as Ole said; it's *impossible*.
>
> But they did the best *possible* thing: they kept the default that
> works in the majority of situations but did the work to give users,
> admins, and customers the flexibility to customize the build to their
> particular needs if the defaults *don't* happen to work for them. For
> the record, it's not easy to write a truly portable, clean,
> high-quality spec file. SchedMD is one of the best anywhere. And
> I've been doing RPM packaging and development for 20 years...so I
> don't say that lightly! :-)
>
> Michael
>
>
>
> On Monday, 20 April 2020, at 22:21:11 (+0200),
> Christian Anthon wrote:
>
>> That makes sense. Though I would prefer that they made a choice for the db
>> in the spec file. Just makes it easier for people who aren't experts in
>> building packages. And slurmdbd will work with both mysql and mariadb
>> regardless of what it was built against.
>>
>> Thanks for the update,
>>
>> Christian.
>>
>> On 20/04/2020 17.57, Ole Holm Nielsen wrote:
>>> For the record: The Slurm developers has found it tricky to write a
>>> slurm.spec file which requires the mysql-devel package and still works
>>> in all environments, see https://bugs.schedmd.com/show_bug.cgi?id=6488
>>>
>>> My recommendation[1] is therefore to explicitly require mysql when
>>> building Slurm RPMs:
>>>
>>> export VER=20.02.1-1
>>> rpmbuild -ta slurm-$VER.tar.bz2 --with mysql
>>>
>>> This will catch the case where you forgot to install
>>> mysql-devel/mariadb-devel.
>>>
>>> /Ole
>>>
>>> [1]
>>> https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#build-slurm-packages
More information about the slurm-users
mailing list