• Re: [gentoo-user] Advice sought on the use of a VCS (specifically git)

    From Marco Rebhan@21:1/5 to All on Thu Sep 23 21:27:26 2021
    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
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEUuA5X09baU5GfLYxyND744GinTYFAmFM1R4ACgkQyND744Gi nTacnhAAgXYK2BCqz4QVH8VDW3g4cRk0r7yqYZIA5XCMYMGiqdnnCp+TQ28IosT1 LNxrvagLKZ/fW228kBQdA+aSs7FYFm9Ixk5n4CaLCueoRj3SNMsDdtZ4aRdEHlqV EJreNwBlUtr+OI30YXq70YgNQcNcAj+qC1dPP7UC6yVv6XXV7cmQwDmGeY7HlF7g NRltBplaH46pab6rwSP6uRJ7hcpxv8pp1u2RlerrvrUHAfAVA0BWG9dZCbFJTd5a XLz/sGWDVMzq++NmabZJcL3k8jCKEDawsumatGYXKGEu15pVHf7wH+EVuU8kngEd usGamejKs9UJlCxOkyUXgKIdlUtDgwtWHkCRrIkOeuGbe/O6hOJMiWhArK0re0h7 ldq8tNcdocVzQ/7EIWVHdXk+iOMEfn8KiyasmsP9vqYdWOtaVBhivhrhho8a9jfp yREPv9+UZSXAZd6iZ84pq+NeWH/UNkU/ocaZhv4eOJDQHktNPN6Bv4ofkV8gDp6j H3a8DfPpkJQydHAnaM4wXVwsTps18ImgPk3RFzq1tYzFfHEKtuew3S1v0M4kbR2S brZdzMFxP1WTQ+sLBVED2tjg4UQahgOeMqvNdUkwPo1HBMWLzP3gHqVu9hB9puh+ NQBvqMVhRgp3pmS+0nlr9Qpn4tJykUbPv+y+6iY9r6ilS6ifcEU=
    =uWsF
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ramon Fischer@21:1/5 to Marco Rebhan on Thu Sep 23 23:00:02 2021
    --CHtZFSMbzf82Dkitxs2NyUgKthDsN88W3
    Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable
    Content-Language: en-US

    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



    --CHtZFSMbzf82Dkitxs2NyUgKthDsN88W3--

    -----BEGIN PGP SIGNATURE-----

    wsF5BAABCAAjFiEEWYOY2l9NpGQ4/c+HFVviZBPmmb8FAmFM6gIFAwAAAAAACgkQFVviZBPmmb8g 6w//TA6rTuecFATsICEKkQMg9ie3AnySkVxZtWIZTN4OX4+mnie6dgMach4ax9RWrt0O2k8VJPgg ODO9+wg7wHyqqvZCzU/MU5nDCFB7kAys8kjiK3RblZxFnXln4CvYSLR1m72wLDIuQ2eC86pqNCDh x0VHnM+rx21l8P31Cwdv3nNQMxXt4QYdIvFPNVtjF2TfXbtXlkWq/xTr+eOlFToFFySokrb2uEB2 XMxl8kA8UMYYNFHCFcRfhDyYQXPAtaGi+cvOTw373OX9upKEduZicN8qKCl4SQur8w86cZfmHwZF Z0nCHPLeqvCd9Grpv74ADuI/88SbHVCVAUhh5PAhMd4pH8GSzWyxrhHF4dwnB3zirMwV5pLbH3M/ cX8x35LBtY8/apY+P8+AtttfeVyqkJ6lMr1zHoB4gRQse9bCDPGmpd+G+hHpBHw9Y39+CRwPY1sW n3S2M7fe6fiUHUY9K9Gz5zDIifM59kqt3f0Hb2g1IQQzeHdWKnjifTiPmemrtMk2HzV0Rs0tjlEn /BC0sR+UX5dw6HOq7ssYT8xLsJdCZb5X5a6wgdS2Xnm6ILn4/TABRC8BSLBW+6JkcGdr1L+hnquZ jUUNGawWobhf/dPGnEumpicmxmXI0RCDHZVx1MX8JQJoXO2uQQQzXN6U41IUgFncTlKlvsGQaxrI tPQ=
    =jScS
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usen
  • From Marco Rebhan@21:1/5 to All on Fri Sep 24 10:56:39 2021
    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
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEUuA5X09baU5GfLYxyND744GinTYFAmFNkscACgkQyND744Gi nTYo9RAArMQTY5ICP+ZeFMzspBp/WiL7I+LTHnBoeGLhKJSvVUZNPm/DspHTpKXX yP3728Dg4S3EYqrWFcNWRczvNQk7qypJdmIay3M2JIGU0LD+ZfygSr+/YmB4le3I mMCe1jTu4YWH4etXqHGBC8xzjDCID1Hl8HnnTzrIRgPTdPeCMj/MZuqUMVKlS7UP qSFoRBbe3HmvSRaLAJ5sjE1z8MpahVdyY5xPiEr+mHRHnqKfyYOEZK+f5fC95pFU qHEfjn4xM7q+tiht0TtaTaGl4pwdrFDJt9pVlL+9lNFbinry8iohZe9FN59mMYzI 1wRxE8DHCSwYstnUatHUsMhyw2pe3TnjHiX5SKVHQHvf4E05hX0lXxeucrUfpjmk ViDazjhyr+GCFgsynkfrX/7iQ8ytWZXEy9eyMhc5JUGhf+Ixwe/vK7YyAv3ZjNWa f2odLNAASlAtTRg+gy1Rf7SelBeA6caVrdUwdM+cfRelUy9/O8iaM2X8OUyYJlzX dUP+mLu7Z3aGGKW8NNIl2Ytf6Y+Mhq0goDVgJGc7muKiZD1oygab2tizqP3JgYtf pd0FTFBR5gCSy29i/A7nZzkJV0HwgIOdIsU+PjTs0dAUUJIN5X25h6uTHuXQWeEm c1t1xt4rgifzKP1fVepNliVcl745wwWZGhhaOHixB0GGk/mmnHQ=
    =w+hT
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Fri Sep 24 11:00:01 2021
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alan Mackenzie@21:1/5 to Marco Rebhan on Fri Sep 24 19:50:02 2021
    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).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alan Mackenzie@21:1/5 to Ramon Fischer on Fri Sep 24 19:50:02 2021
    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).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alan Mackenzie@21:1/5 to Marco Rebhan on Fri Sep 24 20:00:02 2021
    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).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Rebhan@21:1/5 to All on Fri Sep 24 21:17:26 2021
    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
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEUuA5X09baU5GfLYxyND744GinTYFAmFOJEYACgkQyND744Gi nTYrRBAAuvnTgy3oOW8A+x3upt3UWPwuQZqC9FlHwc5+4C0bS4/MpICdYwATt7H4 g0k/YTKW2soC7QlCZW2EAbsmf7/wD6Bjn/Ku+3wy5IBeitNZ2Mt6aCuocAQWED9o lvVaCb+xrDx3VnFaPtRemIdSlm1gm1su9x9Lvo+FiBlEsxxlLjDfuN4RK6OHGQHs pMSZeFGVLrTvBi0K+NjtqqbfDyZb4GY0CFeM+WmLxql/wPKgLxulYMp7vJuArdWs kGmwtsPzT7hDmlhcCtuxLSf3v4lY7M0s9qI1TCKTFEIxykcKZu4RyiFSfeZRopbZ Hi+aJkiQQ12M1FdaiPAr50Jz0HCgy+q05PFpnroeBntfJIDsBeg+VCaUaQYrJwos Eeqk4SbPQh88+uRX4vyyk69JWmv1B5DtGIY959CZIIOyVPWi5UnEg8JCpNKl0jPV cMeB2bXlYMq1KKEwcCmcwUNpDvXlQHHceGv6lCeHGpg9weT4Epfg7/DFOsK3ZJ/n ENunoShUDBQszkunBY6soo+R9sFueANlUsc1c6yEwDfKGJd9V2XVjp8MaJ6sPYlq oUKd3E4kYU41niGbS89BFFet2jh+6WCcmMQM/wO2tDD27zqWol5pLC6DC5nEAW+M xQ4QMe4cFkJuexmx7Jv0vcRKwMDd4ZBPxjk+oMX6EjL99MoEuFU=
    =WLp0
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)