Re: [gentoo-user] Advice sought on the use of a VCS (specifically git) to keep track of my Softscroll patch.

2021-09-24 Thread Marco Rebhan
On Friday, 24 September 2021 19:47:24 CEST Alan Mackenzie wrote:
> I may
> not be doing a lot of rebasing, since I'm creating patches for already
> released versions rather than keeping up to date with the head of the
> master branch.

It works the same way there: take the current branch which is some 
commit of Linux with your patch applied, and rebase your changes onto 
whichever release you want to target (might need to use git rebase --
onto).

> I don't envisage any upstream accepting my patch.  The powers that be
> were adamant that the soft scrolling be removed from the official
> kernel, ostensibly due to security reasons.  I may get around to
> posting the patch on the Gentoo wiki, but for now it'll just be on
> the mailing list, plus to any individual Linux user who asks for a
> copy.

I was more thinking about other people pulling from your repo, in which 
case repeated force pushes would cause issues when they try to pull. I 
wasn't sure if you wanted to actually have the repo public or if this 
was just to make updating for you easier.

> > I hope this helps :P
> 
> It did indeed.  Thanks!

Glad to be of help!

-Marco

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Advice sought on the use of a VCS (specifically git) to keep track of my Softscroll patch.

2021-09-24 Thread Alan Mackenzie
Hello, Marco.

On Fri, Sep 24, 2021 at 10:56:39 +0200, Marco Rebhan wrote:
> On Friday, 24 September 2021 10:49:53 CEST Peter Humphrey wrote:
> > This raises the question of which kernel to work with: vanilla source
> > or Gentoo?

> Gentoo's patches are kept minimal so it shouldn't really matter (and I 
> don't think they'd touch this part of the code anyway). Personally I'd 
> make the patches against the vanilla sources.

That's just what I'm doing, for these reasons.  I'm not even sure Gentoo
maintains a git repository with all the gentoo-sources realeases.

> -Marco

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Advice sought on the use of a VCS (specifically git) to keep track of my Softscroll patch.

2021-09-24 Thread Alan Mackenzie
Hello, Ramon.

On Thu, Sep 23, 2021 at 22:56:34 +0200, Ramon Fischer wrote:
> If GitHub is preferred, there is also an official GitHub repository of 
> the Linux Kernel: https://github.com/torvalds/linux

Thanks, but here GitHub is most emphatically _not_ preferred.  ;-)

I've managed to clone a repo from the official site that Marco cited, so
I'm up and running.

> -Ramon

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Advice sought on the use of a VCS (specifically git) to keep track of my Softscroll patch.

2021-09-24 Thread Alan Mackenzie
Hello, Marco.

On Thu, Sep 23, 2021 at 21:27:26 +0200, Marco Rebhan wrote:
> On Thursday, 23 September 2021 20:23:57 CEST Alan Mackenzie wrote:
> > Where would I find a suitable kernel git repository to clone?  An
> > "official" repository, whatever that means?  Ideally, I want one with
> > just the various kernel releases, not one containing gigabytes of
> > intermediate versions.  Where would I even start searching to find
> > this out?

> Hey Alan,

> The official repository I think is
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/.
> What I would do is apply your patch on top of that, and then to update 
> it, rebase the patch onto the new upstream commit you want to update to. 
> This leads to your patches always being at the tip of the commit history 
> and not somewhere buried between commits from upstream.

Thanks, that was a very great deal of help.  Rather than downloading the
/torvalds/ repo, I went for /linux-stable-rc/, which appears to have
release versions going back a long, long way.  It has a tag for every
such version, which is just what I wanted.

So far, I've constructed a clean patch which applies to 5.14.5, for
Jorge Almeida.  Maybe I can clean up the others over the weekend.

I've decided to create a single branch for each kernel version I'm
patching.  So, so far, I've got a branch called scroll-5.14.5.  From
that I have recreated a clean diff file for that version.  I may
not be doing a lot of rebasing, since I'm creating patches for already
released versions rather than keeping up to date with the head of the
master branch.

> However, this rewrites git history so you'd have to force push the 
> branch to whatever remote you're tracking it in, so keep that in mind.

I don't envisage any upstream accepting my patch.  The powers that be
were adamant that the soft scrolling be removed from the official
kernel, ostensibly due to security reasons.  I may get around to posting
the patch on the Gentoo wiki, but for now it'll just be on the mailing
list, plus to any individual Linux user who asks for a copy.

> You could do this though and additionally have another branch where you 
> track the patch files themselves that are rebased onto a certain kernel 
> commit (you can export them with "git format-patch upstream/master" if 
> upstream/master is whatever branch the patch is currently rebased on). 
> That of course you don't have to then force push.

I'll probably have a more static system than that, doing a git pull when
after a new gentoo-sources is released.

> I hope this helps :P

It did indeed.  Thanks!

> -Marco

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Advice sought on the use of a VCS (specifically git) to keep track of my Softscroll patch.

2021-09-24 Thread Marco Rebhan
On Friday, 24 September 2021 10:49:53 CEST Peter Humphrey wrote:
> This raises the question of which kernel to work with: vanilla source
> or Gentoo?

Gentoo's patches are kept minimal so it shouldn't really matter (and I 
don't think they'd touch this part of the code anyway). Personally I'd 
make the patches against the vanilla sources.

-Marco

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Advice sought on the use of a VCS (specifically git) to keep track of my Softscroll patch.

2021-09-24 Thread Peter Humphrey
On Thursday, 23 September 2021 21:56:34 BST Ramon Fischer wrote:
> If GitHub is preferred, there is also an official GitHub repository of
> the Linux Kernel: https://github.com/torvalds/linux

This raises the question of which kernel to work with: vanilla source or 
Gentoo?

Sorry to be difficult.  :(

-- 
Regards,
Peter.






Re: [gentoo-user] Advice sought on the use of a VCS (specifically git) to keep track of my Softscroll patch.

2021-09-23 Thread Marco Rebhan
On Thursday, 23 September 2021 20:23:57 CEST Alan Mackenzie wrote:
> Where would I find a suitable kernel git repository to clone?  An
> "official" repository, whatever that means?  Ideally, I want one with
> just the various kernel releases, not one containing gigabytes of
> intermediate versions.  Where would I even start searching to find
> this out?

Hey Alan,

The official repository I think is
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/.
What I would do is apply your patch on top of that, and then to update 
it, rebase the patch onto the new upstream commit you want to update to. 
This leads to your patches always being at the tip of the commit history 
and not somewhere buried between commits from upstream.

However, this rewrites git history so you'd have to force push the 
branch to whatever remote you're tracking it in, so keep that in mind.

You could do this though and additionally have another branch where you 
track the patch files themselves that are rebased onto a certain kernel 
commit (you can export them with "git format-patch upstream/master" if 
upstream/master is whatever branch the patch is currently rebased on). 
That of course you don't have to then force push.

I hope this helps :P

-Marco

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Advice sought on the use of a VCS (specifically git) to keep track of my Softscroll patch.

2021-09-23 Thread Ramon Fischer
If GitHub is preferred, there is also an official GitHub repository of 
the Linux Kernel: https://github.com/torvalds/linux


-Ramon

On 23/09/2021 21:27, Marco Rebhan wrote:

On Thursday, 23 September 2021 20:23:57 CEST Alan Mackenzie wrote:

Where would I find a suitable kernel git repository to clone?  An
"official" repository, whatever that means?  Ideally, I want one with
just the various kernel releases, not one containing gigabytes of
intermediate versions.  Where would I even start searching to find
this out?

Hey Alan,

The official repository I think is
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/.
What I would do is apply your patch on top of that, and then to update
it, rebase the patch onto the new upstream commit you want to update to.
This leads to your patches always being at the tip of the commit history
and not somewhere buried between commits from upstream.

However, this rewrites git history so you'd have to force push the
branch to whatever remote you're tracking it in, so keep that in mind.

You could do this though and additionally have another branch where you
track the patch files themselves that are rebased onto a certain kernel
commit (you can export them with "git format-patch upstream/master" if
upstream/master is whatever branch the patch is currently rebased on).
That of course you don't have to then force push.

I hope this helps :P

-Marco


--
GPG public key: 5983 98DA 5F4D A464 38FD CF87 155B E264 13E6 99BF




OpenPGP_signature
Description: OpenPGP digital signature