#1514 Policy for autogenerated code
Closed None Opened 8 years ago by tibbs.

Recently https://fedorahosted.org/fpc/ticket/580 was submitted to FPC, asking us for guidelines on handling autogenerated code. There is a part of that ticket which FPC feels is a bit out of its purview, regarding how we define freedom as it pertains to "source code" which is machine generated.

Essentially, it comes down to the following:

  • Where code is machine-generated, do we require that the tools used to generate the code be free software (according to our usual definitions)?
  • Do we require that the tools used to generate the code be packaged in Fedora?
  • Do we require the actual "master source" used to generate the machine readable source be present in the SRPM? Or downloadable somewhere? Or available at all?

Our concern is the situation where you have to patch code and yet can't actually patch the "real" code because there are no tools which you are permitted to use, or that you can't actually get the "real" code at all. However, I know there have been some issues with things like fonts, which might be considered "code" but which were generated with some proprietary product.

There may also be a legal issue here regarding the GPL and the phrase "the preferred form of the work for making modifications to it", but I'd rather not go into that. (It may also be moot depending on what FESCo decides.)


Thanks for reporting this issue, I feel that Fedora Legal needs to examine this too before giving an answer.

Did anyone actually ask legal here?

Adding to cc.

The orig FPC ticket has been already finished and closed. Is this ticket still valid?

There were multiple questions posed. Some of them were decided by FPC and some were punted to FESCo. We made a decision about one of them, but two questions posed in this ticket remain unanswered:

  • Do we require that the tools used to generate the code be packaged in Fedora?
  • Do we require the actual "master source" used to generate the machine readable source be present in the SRPM? Or downloadable somewhere? Or available at all?

Currently, the packaging guidelines merely suggest that machine-generated code be regenerated at package build time. The legal question remaining (I believe) is whether software can be considered sufficiently free for Fedora if the tools needed to regenerate it are not free, or are not available (in Fedora, or otherwise).

My gut feeling is that at least for GPL software these questions interact with the "preferred form of the work for making modifications" clause, but of course I'm no lawyer. And even for permissive licenses like MIT, there have been questions of freeness of things like the the old Nvidia X driver, which was at some point precompiled/obfuscated to some degree.

That isn't completely coherent due to me figuring things out mid stream. I will edit the comment, but in effect you can ignore the first four sentences.

This kind of fell off the radar. Putting it back on the meeting agenda for this week.

As far as the first question, that's more interesting.

Replying to [comment:5 tibbs]:

There were multiple questions posed. Some of them were decided by FPC and some were punted to FESCo. We made a decision about one of them, but two questions posed in this ticket remain unanswered:

  • Do we require that the tools used to generate the code be packaged in Fedora?

I'm going to mark my vote as "Preferred but not required". There are plenty of examples I can think of offhand where such regeneration might not even be possible. (For example, libtool scripts might not work when regenerated on an different version of libtool from the one upstream used in their release script).

  • Do we require the actual "master source" used to generate the machine readable source be present in the SRPM? Or downloadable somewhere? Or available at all?

I think that https://fedoraproject.org/wiki/Packaging:Guidelines#Use_of_pregenerated_code pretty much covers the second question with the line "Generally these files are part of the source archive supplied by upstream, but it may be necessary to fetch those files from an upstream source repository and include them in the srpm as separate Source: entries."

So I'd say yes, the SRPM must contain the master sources.

agree with sgallagh's answers in https://fedorahosted.org/fesco/ticket/1514#comment:7 (+5,0,0)

So, I think that answers everything? Or was there some questions still pending?

and where should this be written up and recorded?

I'll write this into the packaging guidelines.

Written up and announced.

Login to comment on this ticket.

Metadata