Bug 1030543

Summary: vala-tools package ships vapigen.m4 but not Makefile.vapigen
Product: [Fedora] Fedora Reporter: Allison Karlitskaya <allison.karlitskaya>
Component: valaAssignee: Michel Lind <michel>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: evan, fabian.deutsch, kalevlember, michel, zeenix
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-20 20:44:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Allison Karlitskaya 2013-11-14 16:26:36 UTC
Vala 0.16 introduced autogen support for projects to be able to conveniently generate and install their own .vapi files.  This came in the form of a .m4 file and associated Makefile:

 - /usr/share/aclocal/vapigen.m4
 - /usr/share/vala/Makefile.vapigen

The vala-tools package in F20 ships vapigen.m4 but not Makefile.vapigen.  This leads to the following confusing error message when attempting to build a project that uses these macros (such as libgusb in this case):

Makefile:1337: /usr/share/vala/Makefile.vapigen: No such file or directory



Since vapigen.m4 is useless without Makefile.vapigen, they should both be in the same package.

Comment 1 Kalev Lember 2013-11-14 20:02:17 UTC
Might be easier to just ship vapigen and vapicheck in the -devel subpackage instead of having the -devel and -tools split. From my experience, almost all packages need both -devel and -tools installed to build, so the split doesn't really save much.

Comment 2 Evan Nemerson 2013-11-14 20:35:08 UTC
It's safe, though maybe not very useful, to have vapigen.m4 in a different package--vapigen.m4 is *usually* (but not always) copied to each package so that it's safe to just use the VAPIGEN_CHECK macro.  If vapigen.m4 isn't present then anything which doesn't include a local copy should just assume vapigen isn't available.

The VAPIGEN_CHECK macro from vapigen.m4 will check for the vapigen pkg-config module and, if found, will assume both the vapigen executable and Makefile.vapigen exist.  So what you really need is the vapigen executable and Makefile.vapigen both present whenever vapigen.pc is.

I think the tools and devel split makes sense.  Lots of packages will only need vala and/or vala-tools, but the only packages that should really be requiring vala-devel to build are those which need to parse Vala code (like valadoc and IDE plug-ins).

Comment 3 Allison Karlitskaya 2013-11-14 20:44:44 UTC
I think that it's probably completely backwards then.  If anything, the Makefile should be in -tools since it is required to build any project that uses the .m4.

That said, building out of git is common enough, and even if the .m4 ends up in the tarball, that doesn't mean it will be in git checkouts.

In any case, it should be absolutely impossible to have the .m4 file on your system without also having the Makefile.  I think it's probably best to just have them both in -tools.

Comment 4 Evan Nemerson 2013-11-14 21:05:22 UTC
I agree with Ryan.  Makefile.vapigen should be in -tools, along with vapigen.m4, vapigen, and vapigen.pc/vapigen-0.22.pc.

Not sure what you mean by it being backwards...  the only thing in that list which is in -devel instead of -tools is Makefile.vapigen.

Comment 5 Kalev Lember 2014-02-20 20:44:17 UTC
I've now moved Makefile.vapigen to -tools in http://pkgs.fedoraproject.org/cgit/vala.git/commit/?id=0f85bad3bfef647aea75ce748b195b446495e122