Archive:PackagingDrafts/Ada Guidelines Changes

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(about flags)
(headings)
Line 1: Line 1:
 +
=Discussion=
 +
 
This is a draft proposal to make some changes to the [[Packaging:Ada|Ada packaging guidelines]]. The changes are not yet ready for review by the Packaging Committee.
 
This is a draft proposal to make some changes to the [[Packaging:Ada|Ada packaging guidelines]]. The changes are not yet ready for review by the Packaging Committee.
  
There is currently a rule that a -devel package must not contain all the source files of the library, only those that are necessary for compilation of code that uses the library. I think that this rule costs more than it's worth. It's very difficult for a reviewer to know which files are needed and which ones aren't. The GNAT tools know of course, and will install only the needed files, but not all Ada projects use the GNAT tools to do the installation. Manually keeping track of which body files are needed for recompilation can be error-prone even for upstream developers, so Make-based build systems are likely to just install the complete sources, and it's a lot of work for a packager to rework makefiles to make them follow the rule.
+
==Source code in -devel packages==
 +
 
 +
There is currently a rule that a -devel package must not contain all the source files of the library, only those that are necessary for compilation of code that uses the library. I think that this rule costs more than it's worth. It's very difficult for a reviewer to know which files are needed and which ones aren't. The GNAT tools know of course, and will install only the needed files, but not all Ada projects use the GNAT tools to do the installation. Manually keeping track of which body files are needed for recompilation can be error-prone even for upstream developers, so Make-based build systems are likely to just install the complete sources, and it would be a lot of work for a packager to rework makefiles to make them follow the rule.
  
 
The code is free so we have no reason to hide it, and disk space won't be an issue on developers' workstations or on build servers. The rule should be removed, or at least weakened back to "should not".
 
The code is free so we have no reason to hide it, and disk space won't be an issue on developers' workstations or on build servers. The rule should be removed, or at least weakened back to "should not".
 +
 +
==Macros with compiler and linker flags==
  
 
The sentences "The RPM macro %{GNAT_optflags} MUST be used in the compilation. It contains the standard Fedora optimization flags adapted to GNAT." should be replaced with the following paragraph:
 
The sentences "The RPM macro %{GNAT_optflags} MUST be used in the compilation. It contains the standard Fedora optimization flags adapted to GNAT." should be replaced with the following paragraph:
  
 
The RPM macros Gnatmake_optflags and GPRbuild_optflags expand to Fedora's standard compiler and linker flags adapted for Gnatmake and GPRbuild respectively. They '''MUST''' be used in packages that are built with Gnatmake or GPRbuild. In case the package's build system invokes the underlying GNAT tools without using Gnatmake or GPRbuild, then the appropriate macro for each tool '''MUST''' be used. If for example Gnatlink is invoked directly for some reason, then the expansion of Gnatlink_flags shall be passed to it.
 
The RPM macros Gnatmake_optflags and GPRbuild_optflags expand to Fedora's standard compiler and linker flags adapted for Gnatmake and GPRbuild respectively. They '''MUST''' be used in packages that are built with Gnatmake or GPRbuild. In case the package's build system invokes the underlying GNAT tools without using Gnatmake or GPRbuild, then the appropriate macro for each tool '''MUST''' be used. If for example Gnatlink is invoked directly for some reason, then the expansion of Gnatlink_flags shall be passed to it.
 +
 +
==GNAT_arches==
  
 
I propose to add the following paragraph to the Compilation section:
 
I propose to add the following paragraph to the Compilation section:
 
   
 
   
 
The macro GNAT_arches expands to a list of architectures where GNAT packages are available in Fedora. When there is a need to prevent attempts to build a package on secondary architectures where GNAT has not been bootstrapped, this '''MUST''' be done with "ExclusiveArch: %{GNAT_arches}".
 
The macro GNAT_arches expands to a list of architectures where GNAT packages are available in Fedora. When there is a need to prevent attempts to build a package on secondary architectures where GNAT has not been bootstrapped, this '''MUST''' be done with "ExclusiveArch: %{GNAT_arches}".
 +
 +
==Category==
  
 
Although the current Ada guidelines were approved on the 23rd of February 2011, the page is still in the Packaging guidelines drafts category. If I understand the process right it should be moved to the Packaging guidelines category.
 
Although the current Ada guidelines were approved on the 23rd of February 2011, the page is still in the Packaging guidelines drafts category. If I understand the process right it should be moved to the Packaging guidelines category.
  
 
[[Category:Packaging guidelines drafts]]
 
[[Category:Packaging guidelines drafts]]

Revision as of 16:53, 12 February 2012

Contents

Discussion

This is a draft proposal to make some changes to the Ada packaging guidelines. The changes are not yet ready for review by the Packaging Committee.

Source code in -devel packages

There is currently a rule that a -devel package must not contain all the source files of the library, only those that are necessary for compilation of code that uses the library. I think that this rule costs more than it's worth. It's very difficult for a reviewer to know which files are needed and which ones aren't. The GNAT tools know of course, and will install only the needed files, but not all Ada projects use the GNAT tools to do the installation. Manually keeping track of which body files are needed for recompilation can be error-prone even for upstream developers, so Make-based build systems are likely to just install the complete sources, and it would be a lot of work for a packager to rework makefiles to make them follow the rule.

The code is free so we have no reason to hide it, and disk space won't be an issue on developers' workstations or on build servers. The rule should be removed, or at least weakened back to "should not".

Macros with compiler and linker flags

The sentences "The RPM macro %{GNAT_optflags} MUST be used in the compilation. It contains the standard Fedora optimization flags adapted to GNAT." should be replaced with the following paragraph:

The RPM macros Gnatmake_optflags and GPRbuild_optflags expand to Fedora's standard compiler and linker flags adapted for Gnatmake and GPRbuild respectively. They MUST be used in packages that are built with Gnatmake or GPRbuild. In case the package's build system invokes the underlying GNAT tools without using Gnatmake or GPRbuild, then the appropriate macro for each tool MUST be used. If for example Gnatlink is invoked directly for some reason, then the expansion of Gnatlink_flags shall be passed to it.

GNAT_arches

I propose to add the following paragraph to the Compilation section:

The macro GNAT_arches expands to a list of architectures where GNAT packages are available in Fedora. When there is a need to prevent attempts to build a package on secondary architectures where GNAT has not been bootstrapped, this MUST be done with "ExclusiveArch: %{GNAT_arches}".

Category

Although the current Ada guidelines were approved on the 23rd of February 2011, the page is still in the Packaging guidelines drafts category. If I understand the process right it should be moved to the Packaging guidelines category.