Re: project goals

2016-05-05 Thread Hauke Mehrtens
On 05/05/2016 10:03 PM, Bert Vermeulen wrote:
> On 05/05/2016 04:09 PM, Hauke Mehrtens wrote:
>> I think we should encourage everyone to upstream the patches, I think in
>> one of the statics I saw that OpenWrt ranked 3. or 4. in contribution to
>> the kernel among the Linux distributions before Canonical. ;-)
> 
> Encourage is just a word. Nobody in OpenWrt ever discouraged
> upstreaming, I should think. But without a "no non-upstreamable patches"
> policy, you will inevitably build up a technical debt.
> 
> I had a look at the OpenWrt repo over the last two years. Here's what
> the lack of such a policy did for openWrt:
> 
> - versioned kernel patches: between 1426 and 2807
> - versioned kernel patches, top kernel only: 1204 -> 977
> - non-versioned kernel patches: 177 -> 316
> - non-kernel package patches: 381 -> 514
> - tools patches: 95 -> 114
> - toolchain: 142 -> 79 (halved two weeks ago)

How did you measure these values? When you look at kernel patches it
probably only makes sense to look at the most recent kernel version
supported to not count the same patch double only because it is applied
to different kernel versions. Also this contains some backports for more
recent versions like the musl support for gcc was added in gcc and we
wanted to use it before.

> The conclusion is equally obvious and terrible: this is not going to
> resolve itself.
> 
> The number of patches being upstreamed from OpenWrt to the mainline
> kernel is in NO WAY making a dent in the patches carried along in this
> repo. Making things considerably worse is the fact that many patches are
> in no shape to be accepted by mainline -- using outdated or non-existent
> APIs, or just of shoddy quality. Upstreaming such things often means
> rewriting them completely, as I've had the misfortune to notice.

This also depends on the developer. When you look at the Broadcom
brcm47xx and bcm53xx target for example most of the mainline kernel code
was done by OpenWrt developers and first added to OpenWrt and then
upstreamed.

> Think about that for a minute: stale internal API, shoddy code, stuck in
> internal repo because used in shipping product. That is the definition
> of technical debt.
> 
> How can you possible defend this status quo?
> 
> 
>> Only allowing upstream patches also conflicts with the goal to be more
>> stable and not always use the most recent kernel which introduces new
>> problems again.
>>
>> Some kernel patches are also directly extracted from some other
>> repositories or from some vendors. The raspberry pi patches for example
>> are exported from some other repository.
> 
> Those are both very poor excuses. This project does not use the most
> recent mainline kernel because it has a thousand patches that need
> porting, not because it "introduces new problems". The problem is right
> here, nowhere else.

Makeing a target compile and boot with a more recent kernel is normally
not a big problem, but there are then some new bugs introduced by the
new kernel version and that causes some problems.

Hauke

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: project goals

2016-05-05 Thread Hauke Mehrtens
On 05/04/2016 11:49 PM, Vittorio G (VittGam) wrote:
> Hi,
> 
> On 04/05/2016 22:30:40 CEST, Bert Vermeulen wrote:
>> Hi all,
>>
>> Very happy to see this project reboot happening. An acknowledgement of
>> the issues facing OpenWRT was long overdue. I'd like some clarity on
>> some things that aren't explicitly mentioned in the stated goals,
>> however.
>>
>> First off, is the SVN nonsense definitely gone now? Will the LEDE
>> project be all-git? I assume yes, but would really like to see this
>> confirmed.

LEDE does not use svn.

>> Secondly, the major technical problem OpenWRT faces IMHO has always
>> been the ever-increasing technical debt. In this case this is carried
>> in the form of a *gigantic* number of patches. There are patches for
>> lots of packages, and even the kernel and U-boot. I count over 4700 of
>> them in OpenWRT, 3842 in LEDE right now.
>>
>> This is the sort of thing you expect to see in the internal repo of a
>> company not yet convinced of the benefits of upstreaming; to see this
>> carried in an open source project is downright shocking.

They are probably worse. ;-)

>> I propose to make it an official goal to carry no patches at all;
>> everything should be upstreamed or dropped. That is the only policy
>> that makes any sense at all.
>>
>> Comments, opinions?
> 
> I personally don't think "upstream or drop" would be a good thing to do.
> 
> Regarding package patches, I think that some are just specific to make
> the package work in an embedded system, and maybe upstream can possibly
> just not be interested in this sometimes.
> 
> Regarding U-Boot patches I don't think it's not OpenWrt's fault. For
> example, many Atheros devices use an ancient trunk of U-Boot (1.1.4)
> with many patches from Atheros or router vendors applied to it. Upstream
> might simply not be interested in these patches.
> 
> Regarding kernel patches instead, the OpenWrt trunk is/was usually used
> also as a test-bed for some changes that will eventually go upstream at
> some point, and many actually went in the mainline kernel.
> 
> Upstreaming kernel patches is usually a long process, and is usually
> meant for finished and polished things, at least to some extent. So you
> can't really experiment with things anymore once it's upstreamed. You
> want to make sure that every rough edge is solved before upstreaming
> something.
> 
> Also, upstreaming patches requires some effort/time, and maybe that was
> not always present in OpenWrt, I don't know.
> 
> By the way I'm not saying either that trunk is or should be the far-west
> of wild patches... ;)
> 
> So, yes, when something is stable enough, and upstream is interested or
> otherwise upstreaming is feasible, then it should be upstreamed. But I
> believe this is already what was happening with OpenWrt...
> 
> But, no, when something still needs to be fully tested I think it should
> not be upstreamed yet, and that the OpenWrt/LEDE trunk might just the
> right place for it.

I think we should encourage everyone to upstream the patches, I think in
one of the statics I saw that OpenWrt ranked 3. or 4. in contribution to
the kernel among the Linux distributions before Canonical. ;-)

Only allowing upstream patches also conflicts with the goal to be more
stable and not always use the most recent kernel which introduces new
problems again.

Some kernel patches are also directly extracted from some other
repositories or from some vendors. The raspberry pi patches for example
are exported from some other repository.

Hauke

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev