You are not logged in.

#1 2018-08-07 19:33:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,578
Website

Arch-specific patches for the linux package by inspecting git repo?

Under the old scheme for the linux PKGBUILD, Arch specific patches were including with the source tarball and applied in the prepare step one-at-a-time.  Under the new PKGBUILD scheme, these patches are pre-applied.  Is there an easy way I can determine what (if any) Arch specific patches are included by inspecting the github repo?

My goal is to create a PKGBUILD that mirrors the old scheme where I pull the upstream tarball, and apply any Arch specific patches discretely in the prepare step.  Thanks!


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2018-08-07 19:49:35

loqs
Member
Registered: 2014-03-06
Posts: 6,375

Re: Arch-specific patches for the linux package by inspecting git repo?

Something like `git log v4.17.13..v4.17.13-arch1`?  Although I would suggest you switch to a git repo then either merging ck ontop of arch or the reverse then sign your release.

Offline

#3 2018-08-07 19:56:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,578
Website

Re: Arch-specific patches for the linux package by inspecting git repo?

@loqs - I tried that but got errors:

% git log v4.17.13..v4.17.13-arch1
fatal: ambiguous argument 'v4.17.13..v4.17.13-arch1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

It is behaving as if it is only reading the tags heftig committed...  if I tab complete:

% git log FETCH_HEAD v4.17.11-arch1..
completing commit tag
v4.17.11-arch1  v4.17.12-arch1  v4.17.13-arch1
completing tree file
virt

Last edited by graysky (2018-08-07 20:01:31)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2018-08-07 20:16:01

progandy
Member
Registered: 2012-05-17
Posts: 3,195

Re: Arch-specific patches for the linux package by inspecting git repo?

I think you might have to add linux-stable as a remote to get the stable tags.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#5 2018-08-07 20:50:03

loqs
Member
Registered: 2014-03-06
Posts: 6,375

Re: Arch-specific patches for the linux package by inspecting git repo?

this worked

git clone https://github.com/archlinux/linux.git
cd linux
git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
git fetch --tags stable
git log v4.17.13..v4.17.13-arch1
git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
cd linux
git remote add arch https://github.com/archlinux/linux.git
git fetch --tags arch
git log v4.17.13..v4.17.13-arch1

Offline

#6 2018-08-08 00:02:25

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,578
Website

Re: Arch-specific patches for the linux package by inspecting git repo?

Thanks loqs!  Github has a web method of comparing diffs but I can't seem to get the syntax right... perhaps because linus doesn't have those stable tags?

https://github.com/archlinux/linux/comp … s:v4.17.13

Last edited by graysky (2018-08-08 00:29:17)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2018-08-08 00:45:00

progandy
Member
Registered: 2012-05-17
Posts: 3,195

Re: Arch-specific patches for the linux package by inspecting git repo?

That's right. You can scrape the commit id and use that.

tag=v4.17.13
archtag=v4.17.13-arch1
tagged="$(curl "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tag/?h=$tag" | sed -n 's#.*/linux.git.commit.*id=\(\w*\).*#\1#p')"
xdg-open "https://github.com/archlinux/linux/compare/$tagged...$archtag"

If you want a json result instead of the webpage, you can use the API: https://api.github.com/repos/archlinux/ … ..$archtag


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#8 2018-08-08 18:55:17

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,578
Website

Re: Arch-specific patches for the linux package by inspecting git repo?

@progandy - Gold star.  Thank you!


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2018-08-12 11:18:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,578
Website

Re: Arch-specific patches for the linux package by inspecting git repo?

@progandy - Looks like heftig transitioned away from github.  I don't think Arch's git offers the same online patch creation functionality.  I believe loqs solution is best now swapping out the `log`  option for the `format-patch` option:

% git clone https://git.archlinux.org/linux.git
% git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
% git fetch --tags stable
% git format-patch v4.17.14..v4.17.14-arch1

0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
0002-Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch
0003-ACPI-watchdog-Prefer-iTCO_wdt-always-when-WDAT-table.patch
0004-mac80211-disable-BHs-preemption-in-ieee80211_tx_cont.patch
0005-Arch-Linux-kernel-v4.17.14-arch1.patch

Last edited by graysky (2018-08-12 11:19:05)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2018-08-12 22:50:58

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,535

Re: Arch-specific patches for the linux package by inspecting git repo?

graysky wrote:

@progandy - Looks like heftig transitioned away from github.  I don't think Arch's git offers the same online patch creation functionality.

What is "Arch's git", exactly? We use like bog-standard cgit.

*performs a magic trick*

s/commit/patch/ or follow the link which says:

the common cgit interface wrote:

On top of which I think the github version will continue to be a mirror.

Last edited by eschwartz (2018-08-12 22:51:34)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#11 2018-08-12 23:25:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,578
Website

Re: Arch-specific patches for the linux package by inspecting git repo?

@Eschwartz - The magic the github URL provides shows the 5 patches applied on top of a given upstream release.  I don't think the Arch git servers (web interface anyway) can do that.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2018-08-12 23:30:03

progandy
Member
Registered: 2012-05-17
Posts: 3,195

Re: Arch-specific patches for the linux package by inspecting git repo?

cgit can show the git log for a range of commits.
https://git.archlinux.org/linux.git/log … 7.14-arch1

With some sed or awk magic you could even create the patch urls and download them.

Last edited by progandy (2018-08-12 23:32:04)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#13 2018-08-12 23:37:27

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,535

Re: Arch-specific patches for the linux package by inspecting git repo?

graysky wrote:

@Eschwartz - The magic the github URL provides shows the 5 patches applied on top of a given upstream release.  I don't think the Arch git servers (web interface anyway) can do that.

The sky is not falling. Github is not the only web-based interface to git. Don't approach everything with the *default* mindset of "I don't think it's possible, how can we work around this".


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#14 2018-10-17 22:49:12

figue
Member
Registered: 2007-12-16
Posts: 49

Re: Arch-specific patches for the linux package by inspecting git repo?

graysky wrote:

@progandy - Looks like heftig transitioned away from github.  I don't think Arch's git offers the same online patch creation functionality.  I believe loqs solution is best now swapping out the `log`  option for the `format-patch` option:

% git clone https://git.archlinux.org/linux.git
% git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
% git fetch --tags stable
% git format-patch v4.17.14..v4.17.14-arch1

0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
0002-Revert-drm-i915-edp-Allow-alternate-fixed-mode-for-e.patch
0003-ACPI-watchdog-Prefer-iTCO_wdt-always-when-WDAT-table.patch
0004-mac80211-disable-BHs-preemption-in-ieee80211_tx_cont.patch
0005-Arch-Linux-kernel-v4.17.14-arch1.patch

Sorry to bump this thread, but in my case (linux-bld), I'm using directly snapshots from Archlinux git:

...
pkgver=4.18.14
archlinux_linux_version=$pkgver-arch1
...
source=("https://git.archlinux.org/linux.git/snapshot/linux-${archlinux_linux_version}.tar.xz"

[

Offline

#15 2018-11-07 13:18:12

heftig
Developer
From: Germany
Registered: 2010-04-19
Posts: 142

Re: Arch-specific patches for the linux package by inspecting git repo?

graysky wrote:

@progandy - Looks like heftig transitioned away from github

FTR, I intend to keep the github mirror in sync for the foreseeable future.

Offline

Board footer

Powered by FluxBB