Re: Bug#250202: Standardizing make target for 'patch' and 'upstream-source'
On Wednesday 30 March 2005 07:47, Brendan O'Dea wrote:
> In the absence of details, or an even partial implementation I can only
> see the current (ab)usage of build systems continue.
>
> Shoot, I might just write a "dpkg-source -b" replacement myself to
> replace my current manual process of patch management.
If one consideres the proliferation of build-systems as a sign for the need of
different people to handle patch-management differently (compare to the
various build systems besides debhelper) then a simple dpkg-source -b
probably won't make the cut for everyone.
Debians build system always had the nice property that it specified a very
rigid, rich and reliable interface whithout presuming anything about the
implementation.
As a minimalistic approach in this tradition, we should identify what is
needed(1) by the users of a source package and how this can be interfaced(2)
on a very high level. Implementation(3) can then be done in the individual
patch management systems as appropriate.
(1) Needs
---------
Users of a source package need the unpacked source not ready for compilation,
but ready for inspection and modification. The two major use cases are
application of (minor) local modifications (security fixes, compile time
options) and manual or automated inspection of the sourcecode (auditing,
searching).
This should be possible without installing additional packages besides
dpkg-dev.
(2) Interface
-------------
To prepare the sourcecode for inspection and/or minor modifications an
additional argument for debian/rules would fit well into the current model.
Calling "debian/rules prepare" should leave the tree in a state where the
source is unpacked, all patches are applied and any change to the tree would
affect the final binaries.
This target should execute without any Build-Depends installed. Though - as a
intermediate step - it would be appropriate to error out with a appropriate
message explaining the needed packages and steps to manually prepare the
source.
(3) Implementation
------------------
For most patch systems the prepare target can be easily implemented by
depending on the appropriate patch targets. Some care has to be taken to
supply the needed code to be independant of the Build-Depends.
"dpkg-source -x" should not default to "prepare"-ing the source since this is
automatically done for building anyways and would be bad security practice.
Regards, David
Reply to: