[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#728200: debian-policy: force build tools to ensure source trees are build-ready



On 29/10/13 13:15, Bill Allombert wrote:
> On Tue, Oct 29, 2013 at 12:41:45PM +0000, Ximin Luo wrote:
>> Package: debian-policy
>> Severity: important
>>
>> I was recently hit by this bug [1] which stems from inconsistent assumptions
>> that various build tools have about the state of the build tree. I filed [2]
>> to devscripts to suggest a fix.
> 
> I agree that debclean should be fixed, but your use of question marks suggests
> that you are seriously confused about the policy.
> The reason of bugs in devscripts is due to the introduction of the new source
> format rather than misunderstanding the policy.
> 
>> However, policy wording could be better in this area, and it is especially not
>> helpful for Section 4.14 [3] to effectively give free reign to the maintainer
>> to make arbitrary instructions on how to take the source tree from an unpacked
>> state to a build-ready state. (How does this even work with buildd??? Did you
>> guys solve NLP???)
> 
> You are misreading 4.14 [3]. README.source documents how to edit the source
> package and how to use new upstream tarball.
> 
>> I would suggest policy make explicit definitions for the terms "unpacked" state
>> vs "build-ready" state, and force build tools to detect and reject performing
>> `debian/rules` actions on source trees that are not "build-ready". It just
>> doesn't make sense for this to happen, no good result can come out of it.
> 
> As far as policy is concerned, freshly unpacked source package are build ready.
> 

The wording of 4.14 is not consistent with that interpretation:

"If running dpkg-source -x on a source package doesn't [..] allow one to [..] run dpkg-buildpackage to produce a modified package [..], creating a debian/README.source documentation file is recommended."

implying that it's valid to for "dpkg-source -x" to produce a package that is not build-ready.

Anyway, this is a separate issue from fixing those tools, but I thought making policy more strict and explicit would help prevent such bugs in any future tools.

>> Or probably better, the build-tool can simply make the source tree build-ready
>> by running `dpkg-source --before-build` or `debian/rules patch` before running
>> other debian/rules actions. (This also requires "patch" to be idempotent.)
> 
> 'debian/rules patch' is deprecated by the new source format "3.0 (quilt)"
> 

Not having to support "patch" greatly simplifies things, but "deprecation" is not mentioned anywhere in Section 4... Do you know how many existing packages still use "patch"?

X

-- 
GPG: 4096R/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: