From cb9fe28c997cf4515b8b3cf3f0e7f1274ce73758 Mon Sep 17 00:00:00 2001 From: FeRD (Frank Dana) Date: Nov 18 2025 11:34:58 +0000 Subject: Remove Drupal 7 guidelines without replacement Fixes #1213 --- diff --git a/guidelines/modules/ROOT/nav.adoc b/guidelines/modules/ROOT/nav.adoc index e6ad7e8..7c0c68a 100644 --- a/guidelines/modules/ROOT/nav.adoc +++ b/guidelines/modules/ROOT/nav.adoc @@ -72,7 +72,6 @@ ** xref:Ansible_collections.adoc[Ansible Collections] ** xref:BLAS_LAPACK.adoc[BLAS/LAPACK] ** xref:CronFiles.adoc[CronFiles] -** xref:Drupal7.adoc[Drupal7] ** xref:Emacs.adoc[Emacs] ** xref:EnvironmentModules.adoc[EnvironmentModules] ** xref:FontsPolicy.adoc[Fonts] diff --git a/guidelines/modules/ROOT/pages/Drupal7.adoc b/guidelines/modules/ROOT/pages/Drupal7.adoc deleted file mode 100644 index 5717fa2..0000000 --- a/guidelines/modules/ROOT/pages/Drupal7.adoc +++ /dev/null @@ -1,244 +0,0 @@ -== Different Kinds of Packages - -* *https://drupal.org/project/modules[Modules]*: Modules extend and customize Drupal functionality. -* *https://drupal.org/project/themes[Themes]*: Themes allow users to change the look and feel of their Drupal site. - -== Naming Scheme - -Every package *MUST* be named `+drupal7-+`__`++`. Drupal itself enforces unique machine names for each of its projects and there is a single namespace for all modules, themes, and distributions/profiles. The __`++` *MUST* match the drupal.org project name (i.e. drupal.org/project/__`++`). - -== Macros and Scriptlets - -Macros provided by the `+drupal7-rpmbuild+` package: - -[cols=",,",options="header",] -|========================================================================================== -|Macro |Value |Description -|`+%drupal7+` |`+%{_datadir}/drupal7+` |Drupal 7 base directory -|`+%drupal7_modules+` |`+%{drupal7}/modules+` |Drupal 7 modules directory -|`+%drupal7_themes+` |`+%{drupal7}/themes+` |Drupal 7 themes directory -|`+%drupal7_libraries+` |`+%{_sysconfdir}/drupal7/all/libraries+` |Drupal 7 libraries directory -|`+%drupal7_find_provides_and_requires+` |_Fedora:_ -`+%{nil}+` + - + -_EPEL 5/6:_ + -`+%{expand: \+` + -`+%global _use_internal_dependency_generator 0+` + -`+%global __find_provides %{_rpmconfigdir}/drupal7.prov %{version}+` + -`+%global __find_requires %{_rpmconfigdir}/drupal7.req+` + -`+}+` |_Fedora_: -No-op macro to allow spec compatibility with RPM < 4.9 (no fileattrs) + - + -_EPEL 5/6_: + -Macro to allow spec compatibility with RPM < 4.9 (no fileattrs) -|========================================================================================== - -== File Placement - -* *Modules*: A module package *MUST* be placed in the `+%drupal7_modules+` directory -* *Themes*: A theme package *MUST* be placed in the `+%drupal7_themes+` directory -* *Libraries*: A library package *MUST* be placed in the `+%drupal7_libraries+` directory - -== Requires and Provides - -* Every package *MUST* require "`+drupal7(+``+)+`" virtual resources instead of "`+drupal7-+`" packages. -* Every package *MUST* include the following in its' spec: -** The `+drupal7-rpmbuild+` package automatically requires `+drupal7(core)+` and scans files for provides (from *.info files) and automatically adds them to the package during build time as "`+drupal7(+``+)+`" virtual resources. https://drupal.org/node/542202#hidden[Hidden projects] are ignored. The use of virtual provides and requires helps alleviate the confusion of sub-modules and which modules actually provide those sub-modules. -+ -.... -BuildRequires: drupal7-rpmbuild >= 7.23-3 -.... -** For compatibility with RPM < 4.9 (i.e. EPEL 5/6): -+ -.... -%{?drupal7_find_provides_and_requires} -.... -* Every package *MUST NOT*: -** explicitly require "`+drupal7+`" or "`+drupal7(core)+`" (*unless* a specific core version is required) because `+drupal7-rpmbuild+` auro-requires "`+drupal7(core)+`" -** explicitly provide "`+drupal7(+``+)+`" virtual resources because `+drupal7-rpmbuild+` auto-provides these - -=== Other Packages - -See xref:PHP.adoc#Other_Packages[PHP packaging guidelines]. - -=== PHP Extensions - -See xref:PHP.adoc#Extensions_Requires[PHP packaging guidelines]. - -To get a list of required PHP extensions, use https://github.com/llaville/php-compat-info[PHP_CompatInfo (phpcompatinfo)]: - -.... -phpcompatinfo print --recursive --report=extension unpacked_package_source_directory -.... - -To install https://github.com/llaville/php-compat-info[PHP_CompatInfo (phpcompatinfo)], run "`+yum install php-bartlett-PHP-CompatInfo+`". - -=== Requiring a Minimum PHP Version - -See xref:PHP.adoc#Requiring_a_Minimum_PHP_version[PHP packaging guidelines] but note that this should not normally be required by most packages (see https://drupal.org/node/542202#php[1]). - -=== Common Issues - -* On RHEL 5/6 there is an issue with the standard auto-requires script (`+/usr/lib/rpm/find-requires+`). When there is no "`+#!+`" (she-bang) line at the beginning of an executable PHP file, the script tries to add an invalid " -+ -+ -" as a dependency. Rpmbuild then errors out with something similar to the following: -+ -.... -RPM build errors: - line 53: Dependency tokens must begin with alpha-numeric, '_' or '/': - -.... -+ -To fix this issue, find the files that incorrectly have their executable bit set and remove the executable bit in the spec's `+%prep+` section. If there should be no executable files in the package then the following could be added to the spec's `+%prep+` section: -+ -.... -find . -type f -executable -print0 | xargs -0 chmod -x -.... -+ - -== Additional Hints - -* Every module package *SHOULD* list the Drupal modules it provides in its description: -+ -.... - This package provides the following Drupal module(s): - * %{module} -.... -+ -For example, the `+drupal7-domain+` package contains the following in its description: -+ -.... -This package provides the following Drupal modules: -* %{module} -* %{module}_alias -* %{module}_conf -* %{module}_content -* %{module}_nav -* %{module}_settings -* %{module}_source -* %{module}_strict -* %{module}_theme -.... -+ - -== Templates - -=== RPM README - -.... -After installation, you must enable this module from the Drupal administration -page. - -If upgrading this module separately from the core Drupal package, be sure to -run the https://hostname/drupal7/upgrade.php script after this RPM is upgraded. -.... - -=== Module - -.... -%{?drupal7_find_provides_and_requires} - -%global module __MODULE__ - -Name: drupal7-%{module} -Version: __VERSION__ -Release: 1%{?dist} -Summary: __SUMMARY__ - -Group: Applications/Publishing -License: GPL-2.0-or-later -URL: https://drupal.org/project/%{module} -Source: https://ftp.drupal.org/files/projects/%{module}-7.x-%{version}.tar.gz -Source1: %{name}-RPM-README.txt - -BuildArch: noarch -BuildRequires: drupal7-rpmbuild >= 7.23-3 - -# phpcompatinfo (computed from version __VERSION__) -#Requires: php- - -%description -__DESCRIPTION__ - -This package provides the following Drupal module(s): -* %{module} - - -%prep -%setup -qn %{module} -cp -p %{SOURCE1} . - - -%build -# Empty build section, nothing to build - - -%install -mkdir -pm 0755 %{buildroot}%{drupal7_modules}/%{module} -cp -pr * %{buildroot}%{drupal7_modules}/%{module}/ - - -%files -%doc *.txt -%{drupal7_modules}/%{module} -%exclude %{drupal7_modules}/%{module}/*.txt - - -%changelog -* ddd MMM DD YYYY __NAME__ <__EMAIL__> __VERSION__-1 -- Initial package -.... - -=== Theme - -.... -%{?drupal7_find_provides_and_requires} - -%global theme __THEME__ - -Name: drupal7-%{theme} -Version: __VERSION__ -Release: 1%{?dist} -Summary: __SUMMARY__ - -Group: Applications/Publishing -License: GPL-2.0-or-later -URL: https://drupal.org/project/%{theme} -Source: https://ftp.drupal.org/files/projects/%{theme}-7.x-%{version}.tar.gz -Source1: %{name}-RPM-README.txt - -BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: drupal7-rpmbuild >= 7.23-3 - -# phpcompatinfo (computed from version __VERSION__) -#Requires: php- - -%description -__DESCRIPTION__ - - -%prep -%setup -qn %{theme} -cp -p %{SOURCE1} . - - -%build -# Empty build section, nothing to build - - -%install -mkdir -pm 0755 %{buildroot}%{drupal7_themes}/%{theme} -cp -pr * %{buildroot}%{drupal7_themes}/%{theme}/ - - -%files -%doc *.txt -%{drupal7_themes}/%{theme} -%exclude %{drupal7_themes}/%{theme}/*.txt - - -%changelog -* ddd MMM DD YYYY __NAME__ <__EMAIL__> __VERSION__-1 -- Initial package -.... diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index ed3f58e..07f0e6a 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -3270,7 +3270,6 @@ have specific guidelines written for them, located on their own pages: * xref:C_and_C++.adoc[C and {cpp}] * xref:CMake.adoc[CMake] * xref:D.adoc[D] -* xref:Drupal7.adoc[Drupal7] * xref:Emacs.adoc[Emacs] * xref:FontsPolicy.adoc[Fonts] * xref:Fortran.adoc[Fortran]