SA Bugzilla – Bug 1966
MakeMaker 6.05 and the RPM spec file
Last modified: 2003-09-12 10:15:32 UTC
I was looking at the spamassin.spec file the other day in order to transfer that build sequence over to the Gentoo Linux ebuild (to fix a couple bugs), and I noticed that the build sequence specified in the spec file was not working right. I tracked down the root cause to the value of the SITEPREFIX var that MakeMaker 6.05 is putting into the Makefile: In earlier versions (such as 5.45) MakeMaker put the literal value $(PREFIX) into this variable (unexpanded). In MakeMaker 6.05, SITEPREFIX has the expanded value of the PREFIX=$RPM_BUILD_ROOT/%{_prefix} setting stored literally, so the "override" in the next command no longer has any function, and the scripts get the wrong perl-lib dir in them. I fixed the problem by forcing the value of SITEPREFIX to $(PREFIX) in the "perl Makefile.PL" step. I haven't tried this for building an RPM, but it works great for my ebuild, so I figure a change like this is needed in the spec file (I inserted the "SITEPREFIX=..." bit into this line): %{__perl} Makefile.PL INST_PREFIX=%{_prefix} SITEPREFIX=\$(PREFIX) INST_SYSCONFDIR=%{_sysconfdir} PREFIX=$RPM_BUILD_ROOT/%{_prefix} SYSCONFDIR=$RPM_BUILD_ROOT/%{_sysconfdir} < /dev/null While you're at it, if the </dev/null bit is supposed to keep the the build from prompting the user about the RAZOR checks, I'd suggest changing this to add the "RUN_RAZOR1_TESTS=n RUN_RAZOR2_TESTS=n" settings instead.
reassigning to Theo
*** This bug has been marked as a duplicate of 2388 ***