Re: Bash patches format

2018-06-02 Thread Matt Housh
On 5/30/2018 02:04, Marty E. Plummer wrote:
> On Wed, May 30, 2018 at 10:42:27AM +0800, Clark Wang wrote:
>> On Wed, May 30, 2018 at 8:25 AM, Marty E. Plummer 
>> wrote:
>>
 If people are willing to do the conversion between patch formats for
>>> their
 own purposes, more power to them. I don't see any compelling reason to
 change the format I use.

>>> Could I at least convince you to start doing -p1, if not unified?
>>>
>>
>> I think the cost is too high. All bash package maintainers on different
>> *nix systems will have to change accordingly.
>>
>> -clark
> Well how about this; we ask the downstreams. List taken from repology,
> hopefully these are still all active and accurate. So, to reiterate the
> original premise of this thread for the newly added, I suggest the
> following:
> 
> 1. Change the official upstream bash patch format to be -p1 applicable,
> as a number of major linux distros either convert the patches in their
> own source repo to -p1 (debian and its children, fedora and its children),
> or have to take an explicit deviation from their default patch
> application method (gentoo) in order to apply -p0 patches.
> 
> Optional:
> 2. Change the format of the patch from a context diff to a unified diff,
> for the following reasons:
> a. unified diffs are generally smaller than an equivalent context
> diff, while encoding the same information.
> *** a/lib/readline/history.c2015-12-28 13:50:31.0 -0500
> --- b/lib/readline/history.c2016-09-30 14:28:40.0 -0400
> ***
> *** 308,312 
>   {
> if (history_stifled && history_max_entries > 0)
> !   history_size = history_max_entries + 2;
> else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> --- 310,316 
>   {
> if (history_stifled && history_max_entries > 0)
> !   history_size = (history_max_entries > 
> MAX_HISTORY_INITIAL_SIZE)
> !   ? MAX_HISTORY_INITIAL_SIZE
> !   : history_max_entries + 2;
> else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> 
> --- a/lib/readline/history.c2015-12-28 13:50:31.0 -0500
> +++ b/lib/readline/history.c2016-09-30 14:28:40.0 -0400
> @@ -308,5 +310,7 @@
>   {
> if (history_stifled && history_max_entries > 0)
> -   history_size = history_max_entries + 2;
> +   history_size = (history_max_entries > 
> MAX_HISTORY_INITIAL_SIZE)
> +   ? MAX_HISTORY_INITIAL_SIZE
> +   : history_max_entries + 2;
> else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> 
> b.  unified diffs are easier to size up at a glance than
> context diffs.
> 
> c.  unified diffs are the
> standard for a host of foss projects, especially those using git as a
> vcs solution as it produces context diffs by default and you have to
> purposely change it to do otherwise.
> 
> Maintainers, I'd really like to hear your thoughts on this matter. If
> the diffs are produced as -p1 unified diffs, then downstreams who do
> convert from -p0 context won't have to, and distros who work around it
> won't either.
> 
> Regards,
> 
> Marty
> 

Greetings,

Speaking for the CRUX maintainers, we don't have a preference. Whatever
works best for upstream.

Regards,
Matt


pEpkey.asc
Description: application/pgp-keys
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-31 Thread Natanael Copa

"Marty E. Plummer"  wrote:

> Maintainers, I'd really like to hear your thoughts on this matter. If
> the diffs are produced as -p1 unified diffs, then downstreams who do
> convert from -p0 context won't have to, and distros who work around it
> won't either.  

Alpine Linux uses -p1 and unified diffs for almost everything. I
personally find unified diffs easier to read, but I don't have any
strong opinion what bash should use. It is trivial for us to adapt.

I vote for whatever makes Chet's work easier.

-nc


pgpkYiCzZoKUD.pgp
Description: OpenPGP digital signature
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-31 Thread Rainer Müller
On 2018-05-30 09:04, Marty E. Plummer wrote:
> Maintainers, I'd really like to hear your thoughts on this matter. If
> the diffs are produced as -p1 unified diffs, then downstreams who do
> convert from -p0 context won't have to, and distros who work around it
> won't either.

Speaking as maintainer of bash in MacPorts, I never had problems with
the format of the bash patches. I have no preference whether patches
need -p0 or -p1, as long as all patches are published with the same level.

I think unified diffs are more common than context diffs these days.
However, as long as the bash patches can be applied cleanly with
patch(1), I see no reason to change anything.

Rainer

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-31 Thread Bartłomiej Piotrowski
On 2018-05-30 09:04, Marty E. Plummer wrote:
> Maintainers, I'd really like to hear your thoughts on this matter. If
> the diffs are produced as -p1 unified diffs, then downstreams who do
> convert from -p0 context won't have to, and distros who work around it
> won't either.
> 
> Regards,
> 
> Marty
> 

From the perspective of Arch Linux maintainer, it does not make any
difference whether patches are unified or -p1. Whatever works for Chet.

Bartłomiej

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-30 Thread Marty E. Plummer
On Wed, May 30, 2018 at 04:59:15PM +0200, Christian Weisgerber wrote:
> Marty E. Plummer:
> 
> > Maintainers, I'd really like to hear your thoughts on this matter. If
> > the diffs are produced as -p1 unified diffs, then downstreams who do
> > convert from -p0 context won't have to, and distros who work around it
> > won't either.
> 
> Speaking in my capacity as the OpenBSD packager for bash, either
> way is fine.  We use the upstream patches as provided ("distribution
> patches").  These are applied with -p0 by default, but it's utterly
> trivial to specify -p1 if necessary.  The choice of context vs.
> unified diffs is immaterial; patch(1) handles both formats.
> 
Are they -p0 by default for all packages, or just for bash?
> -- 
> Christian "naddy" Weisgerber  na...@mips.inka.de

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-30 Thread Marty E. Plummer
On Wed, May 30, 2018 at 10:30:10AM +0200, Emanuel Haupt wrote:
> "Marty E. Plummer"  wrote:
> > On Wed, May 30, 2018 at 10:42:27AM +0800, Clark Wang wrote:
> > > On Wed, May 30, 2018 at 8:25 AM, Marty E. Plummer
> > >  wrote:
> > > 
> > > > > If people are willing to do the conversion between patch
> > > > > formats for
> > > > their
> > > > > own purposes, more power to them. I don't see any compelling
> > > > > reason to change the format I use.
> > > > >
> > > > Could I at least convince you to start doing -p1, if not unified?
> > > >
> > > 
> > > I think the cost is too high. All bash package maintainers on
> > > different *nix systems will have to change accordingly.
> > > 
> > > -clark
> > Well how about this; we ask the downstreams. List taken from repology,
> > hopefully these are still all active and accurate. So, to reiterate
> > the original premise of this thread for the newly added, I suggest the
> > following:
> > 
> > 1. Change the official upstream bash patch format to be -p1
> > applicable, as a number of major linux distros either convert the
> > patches in their own source repo to -p1 (debian and its children,
> > fedora and its children), or have to take an explicit deviation from
> > their default patch application method (gentoo) in order to apply -p0
> > patches.
> > 
> > Optional:
> > 2. Change the format of the patch from a context diff to a unified
> > diff, for the following reasons:
> > a. unified diffs are generally smaller than an equivalent context
> > diff, while encoding the same information.
> > *** a/lib/readline/history.c2015-12-28 13:50:31.0
> > -0500
> > --- b/lib/readline/history.c2016-09-30 14:28:40.0
> > -0400 ***
> > *** 308,312 
> > {
> >   if (history_stifled && history_max_entries > 0)
> > !   history_size = history_max_entries + 2;
> >   else
> > history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> > --- 310,316 
> > {
> >   if (history_stifled && history_max_entries > 0)
> > !   history_size = (history_max_entries >
> > MAX_HISTORY_INITIAL_SIZE) !   ?
> > MAX_HISTORY_INITIAL_SIZE !   :
> > history_max_entries + 2; else
> > history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> > 
> > --- a/lib/readline/history.c2015-12-28 13:50:31.0
> > -0500 +++ b/lib/readline/history.c2016-09-30 14:28:40.0
> > -0400 @@ -308,5 +310,7 @@
> > {
> >   if (history_stifled && history_max_entries > 0)
> > -   history_size = history_max_entries + 2;
> > +   history_size = (history_max_entries >
> > MAX_HISTORY_INITIAL_SIZE)
> > +   ? MAX_HISTORY_INITIAL_SIZE
> > +   : history_max_entries + 2;
> >   else
> > history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> > 
> > b.  unified diffs are easier to size up at a glance than
> > context diffs.
> > 
> > c.  unified diffs are
> > the standard for a host of foss projects, especially those using git
> > as a vcs solution as it produces context diffs by default and you
> > have to purposely change it to do otherwise.
> > 
> > Maintainers, I'd really like to hear your thoughts on this matter. If
> > the diffs are produced as -p1 unified diffs, then downstreams who do
> > convert from -p0 context won't have to, and distros who work around it
> > won't either.
> 
> FreeBSD ports/package maintainer here.
> 
> The FreeBSD ports framework uses -p0 by default:
> 
> # make -VPATCH_STRIP -C /usr/ports/shells/bash
> -p0
> 
> As long as all patches come with the same patch strip level I could
> simply change the PATCH_STRIP variable.
> 
> Our porters handbook advertises unified diffs:
> 
> https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/slow-patch.html
Interesting, but this document seems to be about makign patches yourself
and not official upstream patches; unless I'm missing something.
> 
> Personally I find unified diffs easier to read. From a FreeBSD
> viewpoint I don't see a need to switch from -p0 to -p1.
> 
> Then again I have no strong feelings one way or the other.
> 
> Emanuel



-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-30 Thread Christian Weisgerber
Marty E. Plummer:

> Maintainers, I'd really like to hear your thoughts on this matter. If
> the diffs are produced as -p1 unified diffs, then downstreams who do
> convert from -p0 context won't have to, and distros who work around it
> won't either.

Speaking in my capacity as the OpenBSD packager for bash, either
way is fine.  We use the upstream patches as provided ("distribution
patches").  These are applied with -p0 by default, but it's utterly
trivial to specify -p1 if necessary.  The choice of context vs.
unified diffs is immaterial; patch(1) handles both formats.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-30 Thread Marty E. Plummer
On Wed, May 30, 2018 at 10:42:27AM +0800, Clark Wang wrote:
> On Wed, May 30, 2018 at 8:25 AM, Marty E. Plummer 
> wrote:
> 
> > > If people are willing to do the conversion between patch formats for
> > their
> > > own purposes, more power to them. I don't see any compelling reason to
> > > change the format I use.
> > >
> > Could I at least convince you to start doing -p1, if not unified?
> >
> 
> I think the cost is too high. All bash package maintainers on different
> *nix systems will have to change accordingly.
> 
> -clark
Well how about this; we ask the downstreams. List taken from repology,
hopefully these are still all active and accurate. So, to reiterate the
original premise of this thread for the newly added, I suggest the
following:

1. Change the official upstream bash patch format to be -p1 applicable,
as a number of major linux distros either convert the patches in their
own source repo to -p1 (debian and its children, fedora and its children),
or have to take an explicit deviation from their default patch
application method (gentoo) in order to apply -p0 patches.

Optional:
2. Change the format of the patch from a context diff to a unified diff,
for the following reasons:
a. unified diffs are generally smaller than an equivalent context
diff, while encoding the same information.
*** a/lib/readline/history.c2015-12-28 13:50:31.0 -0500
--- b/lib/readline/history.c2016-09-30 14:28:40.0 -0400
***
*** 308,312 
{
  if (history_stifled && history_max_entries > 0)
!   history_size = history_max_entries + 2;
  else
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
--- 310,316 
{
  if (history_stifled && history_max_entries > 0)
!   history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
!   ? MAX_HISTORY_INITIAL_SIZE
!   : history_max_entries + 2;
  else
history_size = DEFAULT_HISTORY_INITIAL_SIZE;

--- a/lib/readline/history.c2015-12-28 13:50:31.0 -0500
+++ b/lib/readline/history.c2016-09-30 14:28:40.0 -0400
@@ -308,5 +310,7 @@
{
  if (history_stifled && history_max_entries > 0)
-   history_size = history_max_entries + 2;
+   history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
+   ? MAX_HISTORY_INITIAL_SIZE
+   : history_max_entries + 2;
  else
history_size = DEFAULT_HISTORY_INITIAL_SIZE;

b.  unified diffs are easier to size up at a glance than
context diffs.

c.  unified diffs are the
standard for a host of foss projects, especially those using git as a
vcs solution as it produces context diffs by default and you have to
purposely change it to do otherwise.

Maintainers, I'd really like to hear your thoughts on this matter. If
the diffs are produced as -p1 unified diffs, then downstreams who do
convert from -p0 context won't have to, and distros who work around it
won't either.

Regards,

Marty

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-30 Thread Vladimir Marek
> > > > If people are willing to do the conversion between patch formats for
> > > their
> > > > own purposes, more power to them. I don't see any compelling reason to
> > > > change the format I use.
> > > >
> > > Could I at least convince you to start doing -p1, if not unified?
> > >
> > 
> > I think the cost is too high. All bash package maintainers on different
> > *nix systems will have to change accordingly.
> > 
> Well how about this; we ask the downstreams. List taken from repology,
> hopefully these are still all active and accurate. So, to reiterate the
> original premise of this thread for the newly added, I suggest the
> following:

Speaking for myself, as a bash maintainer in Solaris, I'm glad for
Chet's work in any shape or form. And I vote for anything which makes
his work easier.

The rest can be scripted

Thank you
-- 
Vlad

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Bash patches format

2018-05-30 Thread Emanuel Haupt
"Marty E. Plummer"  wrote:
> On Wed, May 30, 2018 at 10:42:27AM +0800, Clark Wang wrote:
> > On Wed, May 30, 2018 at 8:25 AM, Marty E. Plummer
> >  wrote:
> > 
> > > > If people are willing to do the conversion between patch
> > > > formats for
> > > their
> > > > own purposes, more power to them. I don't see any compelling
> > > > reason to change the format I use.
> > > >
> > > Could I at least convince you to start doing -p1, if not unified?
> > >
> > 
> > I think the cost is too high. All bash package maintainers on
> > different *nix systems will have to change accordingly.
> > 
> > -clark
> Well how about this; we ask the downstreams. List taken from repology,
> hopefully these are still all active and accurate. So, to reiterate
> the original premise of this thread for the newly added, I suggest the
> following:
> 
> 1. Change the official upstream bash patch format to be -p1
> applicable, as a number of major linux distros either convert the
> patches in their own source repo to -p1 (debian and its children,
> fedora and its children), or have to take an explicit deviation from
> their default patch application method (gentoo) in order to apply -p0
> patches.
> 
> Optional:
> 2. Change the format of the patch from a context diff to a unified
> diff, for the following reasons:
> a. unified diffs are generally smaller than an equivalent context
> diff, while encoding the same information.
> *** a/lib/readline/history.c2015-12-28 13:50:31.0
> -0500
> --- b/lib/readline/history.c2016-09-30 14:28:40.0
> -0400 ***
> *** 308,312 
>   {
> if (history_stifled && history_max_entries > 0)
> !   history_size = history_max_entries + 2;
> else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> --- 310,316 
>   {
> if (history_stifled && history_max_entries > 0)
> !   history_size = (history_max_entries >
> MAX_HISTORY_INITIAL_SIZE) !   ?
> MAX_HISTORY_INITIAL_SIZE !   :
> history_max_entries + 2; else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> 
> --- a/lib/readline/history.c2015-12-28 13:50:31.0
> -0500 +++ b/lib/readline/history.c2016-09-30 14:28:40.0
> -0400 @@ -308,5 +310,7 @@
>   {
> if (history_stifled && history_max_entries > 0)
> -   history_size = history_max_entries + 2;
> +   history_size = (history_max_entries >
> MAX_HISTORY_INITIAL_SIZE)
> +   ? MAX_HISTORY_INITIAL_SIZE
> +   : history_max_entries + 2;
> else
>   history_size = DEFAULT_HISTORY_INITIAL_SIZE;
> 
> b.  unified diffs are easier to size up at a glance than
> context diffs.
> 
> c.  unified diffs are
> the standard for a host of foss projects, especially those using git
> as a vcs solution as it produces context diffs by default and you
> have to purposely change it to do otherwise.
> 
> Maintainers, I'd really like to hear your thoughts on this matter. If
> the diffs are produced as -p1 unified diffs, then downstreams who do
> convert from -p0 context won't have to, and distros who work around it
> won't either.

FreeBSD ports/package maintainer here.

The FreeBSD ports framework uses -p0 by default:

# make -VPATCH_STRIP -C /usr/ports/shells/bash
-p0

As long as all patches come with the same patch strip level I could
simply change the PATCH_STRIP variable.

Our porters handbook advertises unified diffs:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/slow-patch.html

Personally I find unified diffs easier to read. From a FreeBSD
viewpoint I don't see a need to switch from -p0 to -p1.

Then again I have no strong feelings one way or the other.

Emanuel


pgpA3k4br1Rs1.pgp
Description: PGP signature
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss