All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] patch version support
@ 2021-06-08  9:19 Andrey Nechypurenko
  2021-06-08 16:17 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Nechypurenko @ 2021-06-08  9:19 UTC (permalink / raw)
  To: buildroot

Hi Buildrooters,

I am currently trying to add support for L-876e.A1 STM32MP1 board from Phytec.

https://www.phytec.de/en/produkte/single-board-computer/phyboard-sargas-stm32mp1/
https://www.phytec.de/cdocuments/?doc=d4PmEQ

There is Yocto-based BSP with a bunch of patches and required
configuration options. So I am trying to dig them out of Yocto and
pack them into Buildroot. One of the problems I've got is in the
Buildroot's support/scripts/apply-patches.sh script which actively
rejects patches in newer format ("Error: patch contains some renames,
not supported by old patch versions").

I found some old discussions about this decision and understand the
motivation (enterprises stuck with old distributions, etc.). However,
there has been quite some time since this discussion. If I am not
mistaken, this "newer" patch format is about 10 years old for now. So
my question is if it would make sense to remove this restriction?

My temporary solution is just to comment out corresponding lines in
the shell script as following:

diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 9fb488c570..c3fad41189 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -113,11 +113,11 @@ function apply_patch {
         echo "  to be applied  : ${path}/${patch}"
         exit 1
     fi
-    if ${uncomp} "${path}/$patch" | grep -q "^rename from" && \
-       ${uncomp} "${path}/$patch" | grep -q "^rename to" ; then
-        echo "Error: patch contains some renames, not supported by
old patch versions"
-        exit 1
-    fi
+#    if ${uncomp} "${path}/$patch" | grep -q "^rename from" && \
+#       ${uncomp} "${path}/$patch" | grep -q "^rename to" ; then
+#        echo "Error: patch contains some renames, not supported by
old patch versions"
+#        exit 1
+#    fi
     echo "${path}/${patch}" >> ${builddir}/.applied_patches_list
     ${uncomp} "${path}/$patch" | patch -g0 -p1 -E
--no-backup-if-mismatch -d "${builddir}" -t -N $silent
     if [ $? != 0 ] ; then

Maybe it could be removed from mainline Buildroot as obsolete?

Regards,
Andrey.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] patch version support
  2021-06-08  9:19 [Buildroot] patch version support Andrey Nechypurenko
@ 2021-06-08 16:17 ` Yann E. MORIN
  2021-06-08 17:10   ` Andrey Nechypurenko
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2021-06-08 16:17 UTC (permalink / raw)
  To: buildroot

Andrey, All,

On 2021-06-08 11:19 +0200, Andrey Nechypurenko spake thusly:
> There is Yocto-based BSP with a bunch of patches and required
> configuration options. So I am trying to dig them out of Yocto and
> pack them into Buildroot. One of the problems I've got is in the
> Buildroot's support/scripts/apply-patches.sh script which actively
> rejects patches in newer format ("Error: patch contains some renames,
> not supported by old patch versions").
> 
> I found some old discussions about this decision and understand the
> motivation (enterprises stuck with old distributions, etc.). However,
> there has been quite some time since this discussion. If I am not
> mistaken, this "newer" patch format is about 10 years old for now. So
> my question is if it would make sense to remove this restriction?

This has already been done as of commit f46e13f05fa0 (support/dependencies,
scripts: accept patches with renames).

This commit is however not part of any released version; it is for the
moment only on the master branch of the repository.

So, if you are about to submit support for some new board based on
existing patches, you will benefit from this change when you rebase on
master. ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] patch version support
  2021-06-08 16:17 ` Yann E. MORIN
@ 2021-06-08 17:10   ` Andrey Nechypurenko
  2021-06-08 17:15     ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Nechypurenko @ 2021-06-08 17:10 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Thanks for the quick response!

> This has already been done as of commit f46e13f05fa0 (support/dependencies,
> scripts: accept patches with renames).

Great! Did not see that. This completely answers my question :-)

Regards,
Andrey.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] patch version support
  2021-06-08 17:10   ` Andrey Nechypurenko
@ 2021-06-08 17:15     ` Yann E. MORIN
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-06-08 17:15 UTC (permalink / raw)
  To: buildroot

Andrey, All,

On 2021-06-08 19:10 +0200, Andrey Nechypurenko spake thusly:
> > This has already been done as of commit f46e13f05fa0 (support/dependencies,
> > scripts: accept patches with renames).
> Great! Did not see that. This completely answers my question :-)

Yeah, it was on the next branch until yesterday, when next was merged
back into master after the 2021.05 release.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-08 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08  9:19 [Buildroot] patch version support Andrey Nechypurenko
2021-06-08 16:17 ` Yann E. MORIN
2021-06-08 17:10   ` Andrey Nechypurenko
2021-06-08 17:15     ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.