Make-initrd development discussion
 help / color / mirror / Atom feed
From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] broken patches? (Re: [PATCH v4 0/4] split pipeline into 4 features)
Date: Wed, 13 Oct 2021 21:14:12 +0200
Message-ID: <20211013191412.5ca6es7kfjhhecof@example.org> (raw)
In-Reply-To: <YWcqcsq/22AFpqC5@cello>

On Wed, Oct 13, 2021 at 09:50:26PM +0300, Arseny Maslennikov wrote:
> On Wed, Oct 13, 2021 at 08:20:53PM +0300, Leonid Krivoshein wrote:
> > Привет!
> > 
> > 
> > Пробный шар -- не чтобы апстримить, а чтобы оценить самую сложную часть.
> > Если всё хорошо, за ней будут ещё коммиты, которые разделяются довольно
> > просто. Но первые четыре коммита -- это разделение pipeline на четыре части,
> > нет смысл такое апстримить как форк ради форка, в таком виде не добавляется
> > дополнительная функциональность.
> > 
> 
> Патчи почему-то получаются битые; не знаю, как они у Алексея
> прикладываются.

Я не пробовал их прикладывать потому что "не чтобы апстримить". Но патчи
битые, да. Такое ощущение, что MTA linewrap сделал. Это хорошо видно на
README.

>   % git am < split-pipeline-into-4-features.mbox
>   warning: Patch sent with format=flowed; space at the end of lines might be lost.
>   Applying: Separate new feature of bootchain-core from pipeline
>   error: corrupt patch at line 181
>   Patch failed at 0001 Separate new feature of bootchain-core from pipeline
>   hint: Use 'git am --show-current-patch=diff' to see the failed patch
>   When you have resolved this problem, run "git am --continue".
>   If you prefer to skip this patch, run "git am --skip" instead.
>   To restore the original branch and stop patching, run "git am --abort".
>   [128] %
> 
> Например:
> 
>   index 89d9de5..1e95e7d 100755
>   --- a/features/pipeline/data/etc/rc.d/init.d/pipeline
>   +++ b/features/bootchain-core/data/etc/rc.d/init.d/bootchain
>   @@ -1,6 +1,6 @@
>     #!/bin/bash
>     ### BEGIN INIT INFO
>   -# Provides:            pipeline
>   +# Provides:            bootchain
>     # Required-Start:      uevent udev
>     # Should-Start:
>     # Required-Stop:
> 
> Здесь написано, что строки контекста в файле `f/p/d/etc/rc.d/init.d/p`
> начинаются с пробела и потом #, а подменяемая строка, где Provides,
> начинается с самого #. В самом том инит-скрипте вся преамбула начинается
> с первого символа #.
> 
>   @@ -13,14 +13,14 @@
>     . /.initrd/initenv
>     . /etc/init.d/template
>     -NAME=pipelined
>   +NAME=bootchained
>     PIDFILE="/var/run/$NAME.pid"
>     ARGS="--lockfile $LOCKFILE --pidfile $PIDFILE --name $NAME 
>   --displayname $NAME"
> 
> Вот тут кто-то съел пробельные символы в начале строки, и
> patch(1)/git-am(1) видят эту строчку как подлежащую удалению строчку с
> содержанием `-displayname $NAME"`. Первый `-` оказывается служебным.
> 
>      prepare() {
>     	local dir i n
>     -	dir=/.initrd/pipeline/waitdev
>   +	dir=/.initrd/bootchain/waitdev
> 
> Вот тут кто-то сдвинул минус с первой позиции на третью.
> Чуть выше, где NAME=pipelined переименовывается в bootchained, тоже - и
> + не ровно стоят.
> 
>     	mkdir -p -- "$dir"
>      	i=0
>   @@ -32,7 +32,7 @@ prepare() {
>      start() {
>     	RETVAL=0
>   -	if [ "${ROOT-}" = pipeline ]; then
>   +	if [ "${ROOT-}" = bootchain ] || [ "${ROOT-}" = pipeline ]; then
>     		prepare
>     		start_daemon --background $ARGS "$NAME"
>     		RETVAL=$?
> 
> Здесь идёт "кусок"/"фрагмент" (hunk, устоявшегося русского термина нет),
> в заголовке которого заявлено, что 7 строк превращаются в 7 строк, но он
> содержит всего 6: 2 строки контекста перед -+, одна строка подменяется,
> 3 строки контекста после. Кто-то украл одну строку контекста.
> Если посмотреть в подвергаемый переименованию/запатчиванию файл,
> окажется, что эта строка пуста, и её представление в файле с патчем —
> это единственный пробел-маркер строки контекста и всё, перенос строки.
> 
> Таких повреждений патча там и в других коммитах больше.
> Человек может напрячься, потратить время, провести расследование и
> попробовать догадаться, что имелось в виду; программа patch этого делать
> не будет (а git am — и подавно). Возможно, Thunderbird ломает патчи при
> отправке.
> 
> Почта для переписки, почта для офиса/рекламы (аутлук-подобная) и почта
> для патчей — это три разные почты, которые, как чудесным образом
> получилось, используют некоторые общие сетевые протоколы для доступа в
> ящик и для пересылки. На мой скромный взгляд, не стоит пытаться
> инструменты для одной из этих почт использовать для работы с другими
> двумя.
> В очередной раз порекомендую пользоваться git-send-email, а если его
> тяжело заставить посылать письма с GMail-ящика — можно попросить у
> ldv@/glebfm@ доступ к серверу @altlinux.org по SMTP и посылать с адреса,
> который в том же changelog пакетов используется.
> Письма в гуглоящике тоже появятся, если их туда пришлёт рассылка или
> если они будут проставлены в Cc, будь то явно или автоматически.
> 
> P.S. Очень приветствую это направление и благодарен за развитие
> pipeline/bootchain! Очень пригодится. Надо догонять и обгонять дебиан
> ;).
> 
> > 
> > 
> > Leonid Krivoshein (4):
> >   Separate new feature of bootchain-core from pipeline
> >   kickstart: fix feature to work with bootchain-core
> >   bootchain-core: move bootchain-sh-function to /bin
> >   bootchain: separate getimage and waitdev features
> > 
> >  features/bootchain-core/README.md             | 81 +++++++++++++++++++
> >  features/bootchain-core/config.mk             |  5 ++
> >  .../data/bin/bootchain-sh-functions}          | 12 +--
> >  .../data/etc/initrd/cmdline.d/bootchain-core  |  4 +
> >  .../data/etc/rc.d/init.d/bootchain}           | 22 +----
> >  .../data/lib/bootchain}/mountfs               |  2 +-
> >  .../data/lib/bootchain}/overlayfs             |  2 +-
> >  .../data/lib/bootchain}/rootfs                |  2 +-
> >  .../data/lib/initrd/cmdline.d/bootchain       |  6 ++
> >  .../data/lib/initrd/cmdline.d/pipeline        |  2 +-
> >  .../data/sbin/bootchained}                    | 22 ++---
> >  features/bootchain-core/rules.mk              |  3 +
> >  features/bootchain-getimage/README.md         | 24 ++++++
> >  features/bootchain-getimage/config.mk         |  5 ++
> >  .../etc/initrd/cmdline.d/bootchain-getimage   |  1 +
> >  .../data/lib/bootchain}/getimage              |  2 +-
> >  features/bootchain-getimage/rules.mk          |  2 +
> >  features/bootchain-waitdev/README.md          | 22 +++++
> >  features/bootchain-waitdev/config.mk          |  6 ++
> >  .../etc/initrd/cmdline.d/bootchain-waitdev    |  1 +
> >  .../udev/rules.d/50-bootchain-waitdev.rules}  |  2 +-
> >  .../data/lib/bootchain}/waitdev               |  4 +-
> >  .../data/lib/initrd/pre/bootchain/300-waitdev | 12 +++
> >  .../lib/uevent/filters/bootchain-waitdev}     |  4 +-
> >  features/bootchain-waitdev/rules.mk           |  2 +
> >  .../lib/{pipeline => bootchain}/kickstart     |  2 +-
> >  features/pipeline/config.mk                   |  9 +--
> >  .../data/etc/initrd/cmdline.d/pipeline        |  5 --
> >  features/pipeline/rules.mk                    |  6 --
> >  29 files changed, 207 insertions(+), 65 deletions(-)
> >  create mode 100644 features/bootchain-core/README.md
> >  create mode 100644 features/bootchain-core/config.mk
> >  rename features/{pipeline/data/sbin/pipeline-sh-functions =>
> > bootchain-core/data/bin/bootchain-sh-functions} (70%)
> >  create mode 100644
> > features/bootchain-core/data/etc/initrd/cmdline.d/bootchain-core
> >  rename features/{pipeline/data/etc/rc.d/init.d/pipeline =>
> > bootchain-core/data/etc/rc.d/init.d/bootchain} (63%)
> >  rename features/{pipeline/data/lib/pipeline =>
> > bootchain-core/data/lib/bootchain}/mountfs (91%)
> >  rename features/{pipeline/data/lib/pipeline =>
> > bootchain-core/data/lib/bootchain}/overlayfs (95%)
> >  rename features/{pipeline/data/lib/pipeline =>
> > bootchain-core/data/lib/bootchain}/rootfs (86%)
> >  create mode 100755
> > features/bootchain-core/data/lib/initrd/cmdline.d/bootchain
> >  rename features/{pipeline =>
> > bootchain-core}/data/lib/initrd/cmdline.d/pipeline (64%)
> >  rename features/{pipeline/data/sbin/pipelined =>
> > bootchain-core/data/sbin/bootchained} (78%)
> >  create mode 100644 features/bootchain-core/rules.mk
> >  create mode 100644 features/bootchain-getimage/README.md
> >  create mode 100644 features/bootchain-getimage/config.mk
> >  create mode 100644
> > features/bootchain-getimage/data/etc/initrd/cmdline.d/bootchain-getimage
> >  rename features/{pipeline/data/lib/pipeline =>
> > bootchain-getimage/data/lib/bootchain}/getimage (93%)
> >  create mode 100644 features/bootchain-getimage/rules.mk
> >  create mode 100644 features/bootchain-waitdev/README.md
> >  create mode 100644 features/bootchain-waitdev/config.mk
> >  create mode 100644
> > features/bootchain-waitdev/data/etc/initrd/cmdline.d/bootchain-waitdev
> >  rename features/{pipeline/data/etc/udev/rules.d/50-pipeline-waitdev.rules
> > => bootchain-waitdev/data/etc/udev/rules.d/50-bootchain-waitdev.rules} (77%)
> >  rename features/{pipeline/data/lib/pipeline =>
> > bootchain-waitdev/data/lib/bootchain}/waitdev (83%)
> >  create mode 100755
> > features/bootchain-waitdev/data/lib/initrd/pre/bootchain/300-waitdev
> >  rename features/{pipeline/data/lib/uevent/filters/pipeline-waitdev =>
> > bootchain-waitdev/data/lib/uevent/filters/bootchain-waitdev} (77%)
> >  create mode 100644 features/bootchain-waitdev/rules.mk
> >  rename features/kickstart/data/lib/{pipeline => bootchain}/kickstart (93%)
> >  delete mode 100644 features/pipeline/data/etc/initrd/cmdline.d/pipeline
> > 
> > -- 
> > 2.24.1
> > 
> > 
> > _______________________________________________
> > Make-initrd mailing list
> > Make-initrd@lists.altlinux.org
> > https://lists.altlinux.org/mailman/listinfo/make-initrd



> _______________________________________________
> Make-initrd mailing list
> Make-initrd@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/make-initrd


-- 
Rgrds, legion



  parent reply	other threads:[~2021-10-13 19:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 17:20 [make-initrd] [PATCH v4 0/4] split pipeline into 4 features Leonid Krivoshein
2021-10-13 18:19 ` Alexey Gladkov
2021-10-13 18:50 ` [make-initrd] broken patches? (Re: [PATCH v4 0/4] split pipeline into 4 features) Arseny Maslennikov
2021-10-13 19:04   ` Leonid Krivoshein
2021-10-13 19:17     ` Alexey Gladkov
2021-10-13 19:41       ` Leonid Krivoshein
2021-10-14  0:25         ` Антон Мидюков
2021-10-13 19:14   ` Alexey Gladkov [this message]
2021-10-24 11:13   ` Leonid Krivoshein
2021-10-24 16:38     ` Vladimir D. Seleznev
2021-10-24 16:56       ` Leonid Krivoshein
2021-10-24 17:12         ` Leonid Krivoshein
2021-10-26 21:13 ` [make-initrd] [PATCH v4 0/4] split pipeline into 4 features Vladimir D. Seleznev
2021-10-26 22:09   ` Leonid Krivoshein
2021-10-26 22:18     ` Vladimir D. Seleznev
2021-11-06 13:28     ` Alexey Gladkov
2021-11-06 14:25       ` Leonid Krivoshein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211013191412.5ca6es7kfjhhecof@example.org \
    --to=gladkov.alexey@gmail.com \
    --cc=make-initrd@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Make-initrd development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
		make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
	public-inbox-index make-initrd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.make-initrd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git