• Bug#873001: [debian-policy] get-orig-source documentation should includ

    From Russ Allbery@21:1/5 to roucaries.bastien+debian@gmail.com on Wed Aug 23 19:40:02 2017
    XPost: linux.debian.bugs.dist

    Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com> writes:

    get-orig-source should include an example.

    If you use uscan this is safe and policy compliant (maybe opening a bug against dpkg-dev to get this rule by default)

    cd "$(subst ",\",$(dir $(lastword $(MAKEFILE_LIST))))/.." && uscan --destdir $(subst ",\",$(CURDIR)) #"

    We have a bug report for lintian asking for checking unsafe uscan, so I
    was creating a compliant version

    A footnote is suffisant

    I'm reasonably fluent in shell and make, and I still have absolutely no
    idea what that does.

    Is there any way that we could help people out and have the correct thing
    to do be much, much simpler? Just a single command invocation?

    --
    Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bastien =?UTF-8?Q?ROUCARI=C3=88S?=@21:1/5 to All on Wed Aug 23 17:10:01 2017
    XPost: linux.debian.bugs.dist

    Package: debian-policy
    Version: 4.0.1.0
    Severity: normal

    get-orig-source should include an example.

    If you use uscan this is safe and policy compliant (maybe opening a bug against dpkg-dev to get this rule by default)
    cd "$(subst ",\",$(dir $(lastword $(MAKEFILE_LIST))))/.." && uscan --destdir $(subst ",\",$(CURDIR)) #"

    We have a bug report for lintian asking for checking unsafe uscan, so I was creating a compliant version

    A footnote is suffisant
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEXQGHuUCiRbrXsPVqADoaLapBCF8FAlmdjBQACgkQADoaLapB CF9/nhAAkT84JjPThZ/af+q3yaieRU0z/2Pdsa/ThMzZYmAgHXJ5tJ/P6rAEZ6RC lvtcCf4EEwHdKQH1NONlHLGIOJXqh/4gMxAgKTB98ECWPcpEQpqgyCGLulrf2BmG QAY/m483e/hDkJsZvvcorib9bkWOiEkhdx0GcN48zlGssFOdd8FI1D4JQabryRq2 v/9jSYQ7JkPyv34T822FrCjDL1FseX9xi6D50p7XMZs/4Pwt84SdeFDSqUdood10 aK23GOCTSmEx0YcWL5Mwbn5kbUROFTLY5mhgW48KPAbJFNmZUCrJTTcvtxFOnTde DZfGw/FHAQ/XHKjHt+Zn24L6f7aG/aGzBZgQCn5HWEQrfpX5XpYVSjfPR/PvOBCa 3OoBrvERmAkQ/7QFXstj9oAbJZ2VJxmgLe1y9vwIvuiH5zUs1LbqMRpz6xM9qfZR 5qFer4Nu5O/++9kCFh3X6OP9wEMH4lpS/QL4VGDn4oPuqvdJr8K3EcCtayB7wbs+ RbE3geVPW547SIGssL5hF29nDvpI5+727SE9QXEHXPdJp8+j1esvwC8c1/ABA8fZ A8Sy17H/DWwrXlwJ5LdGjs4CYR9KFx6Pb3k7NM7nAniXcVT7R/d7mSa5/CCmfTGm WOCUkvuJuJc4lBxpUz3VHOTCyeV4cQ/8TcT6z75AnOk0ODxwdoc=
    =QuXO
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Russ Allbery@21:1/5 to roucaries bastien on Thu Aug 24 00:40:02 2017
    XPost: linux.debian.bugs.dist

    roucaries bastien <roucaries.bastien+debian@gmail.com> writes:

    you call the rules with something (using shebang or directly) make -f somepath/package/debian/rules, uscan need to be excuted on
    somepath/package/.

    Oh, I see the edge case this is trying to handle.

    I'll be honest: I'm personally more inclined to just drop get-orig-source entirely than to try to handle special cases like this. I feel like the
    target has outlived its usefulness and it would be better to just enhance
    uscan to support repacking scripts. (And people can still keep the target
    if they want; I'm not saying people need to remove it. I just question
    whether it's useful for Policy to bless it and try to standardize it,
    since I'm dubious it's an important part of the workflow to try to standardize.)

    But that said, I think your feeling that this should go into dpkg-dev's makefile fragment is the right one, and then we can put something much
    simpler in Policy that assumes the dpkg-dev interface. That doesn't solve
    the problem for packages older than that version of dpkg-dev, but we can probably just note that.

    --
    Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From roucaries bastien@21:1/5 to Russ Allbery on Wed Aug 23 23:30:01 2017
    XPost: linux.debian.bugs.dist

    On Wed, Aug 23, 2017 at 6:29 PM, Russ Allbery <rra@debian.org> wrote:
    Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com> writes:

    get-orig-source should include an example.

    If you use uscan this is safe and policy compliant (maybe opening a bug
    against dpkg-dev to get this rule by default)

    cd "$(subst ",\",$(dir $(lastword $(MAKEFILE_LIST))))/.." && uscan --destdir $(subst ",\",$(CURDIR)) #"

    We have a bug report for lintian asking for checking unsafe uscan, so I
    was creating a compliant version

    A footnote is suffisant

    I'm reasonably fluent in shell and make, and I still have absolutely no
    idea what that does.

    you call the rules with something (using shebang or directly) make -f somepath/package/debian/rules, uscan need to be excuted on
    somepath/package/.

    So you need to get the f parameter. Make get it in last entry of $MAKEFILE_LIST, so, $(lastword $(MAKEFILE_LIST)) that return somepath/package/debian/rules,

    now we get the dir using $(dir ) and get one level up by ..
    $(dir $(lastword $(MAKEFILE_LIST)))/..

    Unfortunatly we need to escape, some char so use ' to quote and escape
    it using $(subst ',\', $(dir $(lastword $(MAKEFILE_LIST)))/..)

    now i can cd:
    $(subst ',\', $(dir $(lastword $(MAKEFILE_LIST)))/..)

    and do a uscan with DESTDIR (here the local dir) escaped:

    Finnally:
    cd $(subst ',\', $(dir $(lastword $(MAKEFILE_LIST)))/..) && uscan
    --destdir $(subst ",\",$(CURDIR)) #'

    the #' at end if for emacs syntax highlight

    Bastien



    Is there any way that we could help people out and have the correct thing
    to do be much, much simpler? Just a single command invocation?

    --
    Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>

    * do not expect something with name that include space

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Allombert@21:1/5 to Russ Allbery on Thu Aug 24 23:20:03 2017
    XPost: linux.debian.bugs.dist

    On Wed, Aug 23, 2017 at 02:37:25PM -0700, Russ Allbery wrote:
    roucaries bastien <roucaries.bastien+debian@gmail.com> writes:

    you call the rules with something (using shebang or directly) make -f somepath/package/debian/rules, uscan need to be excuted on somepath/package/.

    Oh, I see the edge case this is trying to handle.

    I'll be honest: I'm personally more inclined to just drop get-orig-source entirely than to try to handle special cases like this. I feel like the target has outlived its usefulness and it would be better to just enhance uscan to support repacking scripts. (And people can still keep the target
    if they want; I'm not saying people need to remove it. I just question whether it's useful for Policy to bless it and try to standardize it,
    since I'm dubious it's an important part of the workflow to try to standardize.)

    How do you plan to instruct uscan how repacking should be done ?
    To me, having a debian/rules target seems the correct think to do.
    (That is what I do with my packages with comple repacking.)
    That said, maybe the shell magic that could be moved inside uscan.

    Cheers,
    --
    Bill. <ballombe@debian.org>

    Imagine a large red swirl here.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gregor herrmann@21:1/5 to Bill Allombert on Thu Aug 24 23:30:01 2017
    XPost: linux.debian.bugs.dist

    On Thu, 24 Aug 2017 22:10:15 +0200, Bill Allombert wrote:

    How do you plan to instruct uscan how repacking should be done ?

    Adding files to be removed to Files-Excluded in d/copyright covers
    about (rough guess) 95% of the cases, without any further changes
    needed.
    And for the remaining cases, uscan honours a parameter in
    d/watch to call a repacking script.

    What I've seen about get-orig-source targets are very rare esoteric
    cases. And I guess using the target is not forbidden, as well as
    converting the makefiles runes from d/rules to a shell script called
    by uscan+d/watch should just do the same.


    Cheers,
    gregor

    --
    .''`. https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
    : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
    `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
    `- NP: Trio: Da da da

    -----BEGIN PGP SIGNATURE-----

    iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAlmfNiRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ qgbgwRAAoTFLrNYDKx4w94Na91sdVNIRBdjBD7m+0iJmbx6k8HAwNUbXj3yD9Cad c/R96PMKlTjnknYEnosSuAu7kvxE6VSSZPUiFoEGhTfs6pVfGXynIGqm8T+MsbOx +5vNIBJYf3Puijb1NEW7Hvn3gDA1h6FcAUJi9tLQv6Z/BCax50N0ks5LeFFRW4gG pQvBXGoaKZFTG7KyRF43HzfmUoCc6kTD22I5CGfobJWMwUIXDS73FIpQhq3RUw8x 9+CxSINKY9V2zqXdhGsTycYY9TR+47ojJDNLkEsmaKUWYbilVrlTKRE80lnbV30f lR+x6ZyTtANV9uwjlmF8FJI7AF/hMP91p/wYnf15Py8BqnIe5Kf5oTq2FJ24vJzH 5JGW0zcYpSTZjlqnC7nT7giVO27yMbR/N4wmpZhvaNUZy3WVjxIcynNuE0oBbSXI gdGU3F2Kh3rybKuDpUnWa2EzTeWFj8KgcD7gU1JQqVZihJJHRzy7cVV2AtYuyNva f0xLts/hqfb/aFqffgiyyTHWAyj0iVcQeY3PyRVPidJ0J0+Chyb74NR727133nsG EE2LZzhHOSGcO07J8yqfn1FchfY8TBazdGZCckwwKH3CHRRWT+4jI6NIeXZ+1GN2 55PXq1B6LQUIhR3zafHkLsjG2on0z4Xl3b1SJiXhlbPlCmEybuM=
    =cMVu
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)