Help diagnosing problems with scl build

Bohuslav Kabrda bkabrda at redhat.com
Tue Apr 23 08:26:10 UTC 2013


----- Original Message -----
> I've run into some odd problems building a "scl-ified" package and I'm hoping
> other list subscribers who are smarter and/or more experienced with package
> builds than me can shed some insight on what's going on here.
> 
> I'm building a software package called Freeside, which is a billing system
> written primarily in Perl. The package website is <http://www.freeside.biz/>
> and I'm building their 3.0 version.
> 
> To do this, I used the freeside.spec file they include in their tarball. It
> hadn't been updated since version 2.1, so I updated it and made some changes
> to it to get it to build. Once I got a successful build, I ran spec2scl on
> the
> modified spec file.
> 

What version of spec2scl did you use?

> This created some interesting issues. Most notably, there were some lines in
> the spec file which invoked Perl to make some inline changes to makefiles.
> Stuff
> like this:
> 
> 	perl -pi -e 's|/usr/local/bin|%{_bindir}|g' fs_selfservice/FS-
> SelfService/Makefile.PL
> 
> spec2scl modified lines like this with:
> 
> 	%{?scl:scl enable %{scl} "}
> 	perl -pi -e 's|/usr/local/bin|%{_bindir}|g' fs_selfservice/FS-
> SelfService/Makefile.PL
> 	%{?scl:"}
> 
> This doesn't work.
> 

Why doesn't it work, what's the error?

> As I thought about it, I came to the conclusion I didn't really need these
> simple text file manipulations to be done by the Perl interpretter provided
> by
> the perl514 collection. It would be just fine if these commands were done by
> the system Perl interpretter (5.8 or 5.10). So, I stripped all these commands
> out of the 'scl enable' wrappers in the scl-ified spec file.
> 

Yep, you can do that.

> I'm building this package with mock and the mock build of the scl-modified
> spec
> file seems to go fine until the %install phase. The spec file has a
> %makeinstall
> macro and that issues a long 'make install' line using the root Makefile for
> the Freeside package. The Makefile has a target called install-perl-modules
> that looks like this:
> 
> install-perl-modules: perl-modules install-rt-initialdata
> 	[ -L ${PERL_INC_DEV_KLUDGE}/FS ] \
> 	  && rm ${PERL_INC_DEV_KLUDGE}/FS \
> 	  && mv ${PERL_INC_DEV_KLUDGE}/FS.old ${PERL_INC_DEV_KLUDGE}/FS \
> 	  || true
> 	cd FS; \
> 	make install UNINST=1
> 	#install this for freeside-setup
> 	install -d $(DIST_CONF)
> 	#install conf/[a-z]* $(DEFAULT_CONF)
> 	#CVS is not [a-z]
> 	install `ls -d conf/[a-z]* | grep -v CVS | grep -v '^conf/registries'`
> $(DIST_CONF)
> 
> When it reaches the 'install -d $(DIST_CONF)' line, it doesn't prepend any
> DESTDIR or PREFIX and ends up trying to create the directory
> /usr/local/etc/freeside, which as a non-privileged user, it can not.
> 

Could you also attach your mock buildlog? Or at least the "make install" execution line? I'd like to see how it was executed. From the first glance, I cannot tell where the problem is, but it seems that some paths/macros are defined badly.

> I've attached the spec files (before and after the spec2scl) if anyone wants
> to
> inspect them to see if there's anything obvious I've done to mess things up.
> Otherwise, I'm wondering if I've tripped over some weird makefile bug.
> 

The specfile looks sane, I see no immediate problems there. Mock buildlog will say the most here.

Thanks,
Slavek.

> 
> --
> Doran L. Barton <doran at bluehost.com> - Senior Developer, Bluehost, RHCE
>  "Let's enjoy your life. Sometimes you can do it only with lovely color."
>     -- Japanese stationary packaging
> 
> _______________________________________________
> softwarecollections mailing list
> softwarecollections at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/softwarecollections
> 

-- 
Regards,
Bohuslav "Slavek" Kabrda.


More information about the softwarecollections mailing list