Re: what this would look like if the system is with templates.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 06/10/2015 01:06 AM, Ken Dreyer wrote:
> On 06/09/2015 11:19 AM, Owen Synge wrote:
>>
>>> we can be remove many hard coded values replaced with variable and that
>>> probably will only grow in number for example
>>>
>>> 	%if 0%{?rhel} || 0%{?fedora}
>>> 		--with-systemd-libexec-dir=/usr/libexec/ceph \
>>> 	%endif
>>> 	%if 0%{?opensuse} || 0%{?suse_version}
>>> 		--with-systemd-libexec-dir=/usr/lib/ceph/ \
>>> 	%endif
>>
>> 	--with-systemd-libexec-dir=@systemd_libexec_dir@ \
>>
>> No OS distribution specific rubbish needed :)
> 
> Passing an autoconf variable (@systemd_libexec_dir@) to an autoconf
> argument (--with-systemd-libexec-dir) seems really over-complicated to me.

It makes separating things like version info from function hard.

The %else function is a minefield.

The %if statements around nearly every line in configure give you a hint
of the problem.

Autotools is not the last word in pretty language but it does warn when
you do platform specific stuff very well, and its a lot more flexible
than rpm.

> I don't see the issues with putting os-specific things in the .spec
> file; that's how many other (non-Ceph) projects do it.

These conditionals do not occur just done once if used in the spec.in
file though its worse, you need the same conditionals on each of

	configure
	files
	install

Admittedly if we follow the current process of deprecating direct
platform based installs we can get the conditionals down to two places
in the spec.in file rather than 3.

I think having the conditionals set in one place is superior to 2 or 3
places. To do this you would template the rpm spec file.

Best regards

Owen
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux