#393 New Packaging Guidelines: Drupal 7
Closed: Fixed None Opened 10 years ago by siwinski.

Please review the proposed Drupal 7 packaging guidelines for acceptance: https://fedoraproject.org/wiki/User:Siwinski/Draft:Packaging:Drupal7

Discussed by Drupal 7 packagers here: https://lists.fedoraproject.org/pipermail/drupal-devel/2014-January/thread.html


@shawn can you clarify what is exactly extracted from the .info upstream package manifest ?

Every package SHOULD require "drupal7(<drupal_machine_name>)" virtual resources instead of "drupal7-<drupal_machine_name>" packages.

In which case is this needed ? (why not a MUST instead of a SHOULD)

Drupal modules sometimes contain sub-modules. In the past, packagers just referenced the main package name. Sometimes it got confusing where modules were being provided from so I introduced {{{drupal7()}}} virtual provides (idea taken from the {{{php-pear()}}} and {{{pecl-pecl(*)}}} virtual provides already in use). Each new package (and ones we go back and update) now virtually provide {{{drupal7(main_module)}}} and also virtually provide each {{{drupal(sub_module)}}} that they package.

'''That clause is for the "new" {{{drupal7()}}} virtual provides added to new (or newly updated) drupal7 packages. I made it a SHOULD instead of a MUST because there are quite a few packages that do not have their {{{drupal7()}}} virtual provides added to them (we need to go back and clean those up).''' Perhaps we could change that to a "MUST if the virtual provide exists" or perhaps once we go back and clean up all modules we could change that to a MUST?

Here is an example:

The "{{{drupal7-domain}}}" module has the following virtual provides:
{{{drupal7(domain)}}}
{{{drupal7(domain_alias)}}}
{{{drupal7(domain_conf)}}}
{{{drupal7(domain_content)}}}
{{{drupal7(domain_nav)}}}
{{{drupal7(domain_settings)}}}
{{{drupal7(domain_source)}}}
{{{drupal7(domain_strict)}}}
* {{{drupal7(domain_theme)}}}

Let's say a new module "{{{testmodule}}}" had the following {{{.info}}} file:
{{{
name = Test Module
description = Module to provide a test example
package = Test
dependencies[] = domain_conf
core = 7.x
}}}
In the past, the packager would have just required "{{{drupal7-domain}}}". Now, the packager would require "{{{drupal7(domain_conf)}}}" which more closely matches the module's dependency from its' {{{
.info}}} file.

info Drupal7 guidelines approved with the virtual provides requirement changed to MUST (+1:5, 0:0, -1:0)

Added to guidelines: https://fedoraproject.org/wiki/Packaging:Drupal7 and linked to from the Packaging:Guidelines page Announcement text:

"""

Packaging Guidelines for building modules and themes for Drupal7 have been approved:
https://fedoraproject.org/wiki/Packaging:Drupal7

"""

Login to comment on this ticket.

Metadata