• Re: quilt patch (hunk ignored)

    From Andrey Rahmatullin@21:1/5 to Bo YU on Thu May 19 13:10:01 2022
    On Thu, May 19, 2022 at 06:57:27PM +0800, Bo YU wrote:
    Hi,

    I followed the instructions[0]&[1] to generate/apply patch. It is ok if i
    the patch file be applied out of debian/*.:

    // for people who if need it
    *quilt push -a
    * quilt new fix-issue.patch
    * quilt add source-code-file(out of the d/*)
    * quilt refresh
    * quilt header -e
    * quilt pop -a

    But if use the same way to apply patch into d/*, sometime it will get:
    Patches shouldn't patch files in debian/. Edit the files directly.

    --
    WBR, wRAR

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

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmKGI08tFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh mf8QAJPhZgTZsmw09sSU+my3K+cenhBZG8c+XU2nyC61gHDgPYcTvwwJHOjn3vu/ XEv0orZlZt+kHpjCapMK8hYiZISiZyZtq2ilLjQCYrhNk7SEAGj0cvtCYLCg1uzA 2iKsxztQ7jg3jFvLXKwFYkbJlejI/qkp2ivpCqsHonyy8g727GcO/plylk7Me7rj 2Vz0DU8ZjcQdGwmjJLrZPV/LZhSayVLN4+wfuWnYc2c9UvUxp49SeVYg6XjgwrDx W7YDoUlpmmJeX9ZAkKIOPC2ux6r16usQcmP0rPYMQxv497Yn38cUWjg3g/gfen69 IUxSkC3y4+x/BAUjeJ83hh8u4GtsgDwac+Mo+xMKCsG40FOZV82d35GcTaj49tF2 +RSLK5sNceHILXQ1IJ/ZxrLISGLEeX9NfxyVvpfmfmBsTa+aXAE/ef1Dv9UomiMp ZqXjd2e1H0bNuLtrLYOz3H6bPY+GrxbRGw0KZO8yKiMQPWmrSejw/cmSg1GNLBQg sE0Q6gt5pkX3TB0mAHrapgNJOSqfch3whwtLJMPc839C5Ws3hstLgnaTPrZZ7Ej2 INuVzpeEstYOGtVkSJg3UaLJjXliEiJJLEh3wBgBGeDB1LnLWuSPhbfaPvQ/01mU jJ5208CF/gInr+JKVMY7c7XooHAY8u3jOEIiBGUuTwqaqYXq
    =lX2z
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bo YU@21:1/5 to All on Thu May 19 13:00:01 2022
    Hi,

    I followed the instructions[0]&[1] to generate/apply patch. It is ok if i
    the patch file be applied out of debian/*.:

    // for people who if need it
    *quilt push -a
    * quilt new fix-issue.patch
    * quilt add source-code-file(out of the d/*)
    * quilt refresh
    * quilt header -e
    * quilt pop -a

    But if use the same way to apply patch into d/*, sometime it will get:
    ```
    vimer@unmatched-local:~/ sudo sbuild -c sid-riscv64-sbuild --no-clean-source dpkg-source: info: using source format '3.0 (quilt)'
    dpkg-source: info: building waypipe using existing ./waypipe_0.8.2.orig.tar.gz dpkg-source: info: using patch list from debian/patches/series
    patching file debian/rules
    Reversed (or previously applied) patch detected! �Skipping patch.
    1 out of 1 hunk ignored
    dpkg-source: info: the patch has fuzz which is not allowed, or is malformed dpkg-source: info: if patch 'fix-ftbfs-riscv64.patch' is correctly applied by quilt, use 'quilt refresh' to update it
    dpkg-source: info: if the file is present in the unpacked source, make sure it is also present in the orig tarball
    dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B .pc/fix-ftbfs-riscv64.patch/ --reject-file=- < waypipe-0.8.2.orig.J2h0OD/debian/patches/fix-ftbfs-riscv64.patch subprocess returned exit status 1
    ```

    I suspect the sbuild has switch can control it but i do not find it.

    I can apply the such patches like:
    ```
    patch -p1 < ~/Fix_ftbfs.patch
    patching file debian/rules
    ```
    But imagine if one patch will contain two files to modfy: one file is d/rules and the other is CMakelist.txt. This is common usage to fix something, how did it?

    Thank you,
    Bo

    [0]: https://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/
    [1]: https://wiki.debian.org/UsingQuilt

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bo YU@21:1/5 to Andrey Rahmatullin on Thu May 19 14:00:01 2022
    On Thu, May 19, 2022 at 04:21:42PM +0500, Andrey Rahmatullin wrote:
    On Thu, May 19, 2022 at 07:17:11PM +0800, Bo YU wrote:
    But if use the same way to apply patch into d/*, sometime it will get: >> > Patches shouldn't patch files in debian/. Edit the files directly.


    Understood it. here is SO[0] to hint it.

    But this is inconvenient:
    *shrug*

    * if to modify many files in d/* or code snip and want to keep a clean status
    to watch different parts on many times modify.�
    Not sure what does this mean but it's possible that a VCS can help here.

    * send these modify to the package's maintainer
    You should send a debdiff, not a patch from debian/patches/.

    Ok, got it. thank you:)

    BR,
    Bo


    --
    WBR, wRAR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bo YU@21:1/5 to Andrey Rahmatullin on Thu May 19 13:20:01 2022
    Hi wRAR,
    On Thu, May 19, 2022 at 04:00:40PM +0500, Andrey Rahmatullin wrote:
    On Thu, May 19, 2022 at 06:57:27PM +0800, Bo YU wrote:
    Hi,

    I followed the instructions[0]&[1] to generate/apply patch. It is ok if i
    the patch file be applied out of debian/*.:

    // for people who if need it
    *quilt push -a
    * quilt new fix-issue.patch
    * quilt add source-code-file(out of the d/*)
    * quilt refresh
    * quilt header -e
    * quilt pop -a

    But if use the same way to apply patch into d/*, sometime it will get: >Patches shouldn't patch files in debian/. Edit the files directly.


    Understood it. here is SO[0] to hint it.

    But this is inconvenient:
    * if to modify many files in d/* or code snip and want to keep a clean status
    to watch different parts on many times modify.�
    * send these modify to the package's maintainer

    Thank you~

    BR,
    Bo

    [0]: https://stackoverflow.com/questions/29634868/adding-a-file-in-a-quilt-dquilt-patch-patch-applies-correctly-by-hand-but-brea


    --
    WBR, wRAR

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rahmatullin@21:1/5 to Bo YU on Thu May 19 13:30:01 2022
    On Thu, May 19, 2022 at 07:17:11PM +0800, Bo YU wrote:
    But if use the same way to apply patch into d/*, sometime it will get:
    Patches shouldn't patch files in debian/. Edit the files directly.


    Understood it. here is SO[0] to hint it.

    But this is inconvenient:
    *shrug*

    * if to modify many files in d/* or code snip and want to keep a clean status
    to watch different parts on many times modify. 
    Not sure what does this mean but it's possible that a VCS can help here.

    * send these modify to the package's maintainer
    You should send a debdiff, not a patch from debian/patches/.

    --
    WBR, wRAR

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

    iQJhBAABCgBLFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmKGKEYtFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3Jnd3JhckBkZWJpYW4ub3JnAAoJEDNi9wMaSZLh bcoP/1F3QOrep08cV0wmjV9hj5RXA6LIhxE7nSQ2IepSvpMGDIgswWVCLxlUBMWF JjkaMA2CDOvx1vEg7JsCuq1yiATRj0cVok2t9HTWr+OHE2EcpWjGabDTd8uI4FAj ru2A55NtVqcp30h4rmYPYyU/y/dOCC1uNs9RHaZ1oNykaX042PJpuW6FUNHysKhi 7s900WcbBj5+2qaCdeKonRq5t+lSAVR7aYieQRktbDBW/4Op4+j/rHsqWrgt1BKl BGPHuqlg8RBSl6BDccsBzuyO+0shoNh1d5uMQt+SU3yPLIUrR7RFMFyVtmA62G1p tnqO7ID8PxBlr27su+FGjk4uDrum9n/NLZlBmupKvmX3ML7WS4ShdrfmtONvK2G3 pgH3TfaRe1P+xhOX2oZCskX4dOOWMMRZs1vlv4yNeL3JynAGe21VKVE5kYo+H6vh WniImZD18PXhdCgjHmbBckzInDL1OjrGZ0FHrfjkQsCLR+WO1HzOxv6febIcLeBu bPnU6DV5uSQxTDlrGWSFzDbLNhfTVAwrFKolmdozAD75rDNJCiKGyuQbenbAQiIo 0x6OvpltrEf93tC5yrrQFHffgjzJ/gqjpStgjmJFbwLXpeRBstRGyPCYmAM23BVP EnX1b+7m7XA9agscCD9d4p3PClJf6IxHwQw4RaUl9GDhcUj9
    =jNXd
    -----END PGP SIGNATURE-----

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