You are not logged in.

#1 2019-07-08 16:19:44

regid
Member
Registered: 2016-06-06
Posts: 201

linux/src/archlinux: will git pull updates to a newer arch version?

The linux source that makepkg extracts has two git branches:

[linux/src/archlinux-linux]% git branch          
* makepkg
  master
  1. What is the differences between these two branches?

  2. Can one git pull to get arch linux source when there is a new arch version, instead of makepkg --nobuild? If git pull is a replacement for makepkg --nobuild, should one git pull while each of these two is checked out separately? What will happen to ../../archlinux-linux when running git pull like that?

Last edited by regid (2019-07-08 17:07:27)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#2 2019-07-08 16:24:15

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

git branch -v
git remote -v

Offline

#3 2019-07-08 17:15:48

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

% git branch -v
* makepkg b01b05e99dd5 Arch Linux kernel v5.1.16-arch1
  master  0ecfebd2b524 Linux 5.2
% git remote -v
origin	/home/regid/linux/archlinux-linux (fetch)
origin	/home/regid/linux/archlinux-linux (push)

The way I understand this, git pull will not be able to get v5.1.17, or any other future source.

Last edited by regid (2019-07-08 17:16:33)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#4 2019-07-08 19:19:53

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

You would need to git fetch in /home/regid/linux/archlinux-linux then you could git pull in /home/regid/linux/src/archlinux-linux,
however prepare would not be executed so for the linux package that would mean the version stored .scmversion and ../version would not be updated

Offline

#5 2019-07-09 22:01:43

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

If I will git fetch in /home/regid/linux/archlinux-linux, then git pull in /home/regid/linux/src/archlinux-linux:

  1. Will I have an updated makepkg and master branches?

  2. Further, will /home/regid/linux/src/archlinux-linux be in the same state compared to someone that forcibly stopped makepkg --nobuild at the entry point of prepare()?

Last edited by regid (2019-07-09 23:39:13)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#6 2019-07-09 22:35:50

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

regid wrote:

If I will git fetch in /home/regid/linux/archlinux-linux, then git pull in /home/regid/linux/src/archlinux-linux:

  1. Will I have an updated makepkg and master branches?

  2. Further, will /home/regid/linux/src/archlinux-linux be in the same state compared to someone that forcibly topped makepkg --nobuild at the entry point of prepare()?

  1. Yes for master, No for makepkg has that is a locally created branch

  2. No because the makepkg branch is not updated and in the case of the linux package a new signed tag not on any branch is created for each release and the source pointed to that tag.

Offline

#7 2019-07-10 10:28:19

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

loqs wrote:

makepkg is a locally created branch

Since makepkg is a locally created branch, can I git fetch in /home/regid/linux/archlinux-linux and then git pull in /home/regid/linux/src/archlinux-linux in the already exists makepkg branch? Perhaps I can create, or update, it manually, in the same way you say it is created locally, possibly by git branch makepkg.

loqs wrote:

In the case of the linux package a new signed tag not on any branch is created for each release and the source pointed to that tag.

Which tags are you referring to? For v5.1, are there tags other then

% git tag --column -l 'v5.1*' 'v5.2*'
v5.1-arch1     v5.1.14-arch1  v5.1.3-arch2   v5.1.8-arch1
v5.1.1-arch1   v5.1.15-arch1  v5.1.4-arch1   v5.1.9-arch1
v5.1.10-arch1  v5.1.16-arch1  v5.1.5-arch1   v5.2-arch1
v5.1.11-arch1  v5.1.2-arch1   v5.1.6-arch1
v5.1.12-arch1  v5.1.3-arch1   v5.1.7-arch1

?

Last edited by regid (2019-07-10 13:11:11)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#8 2019-07-12 12:17:00

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

Up to now, I had 5.1.16-arch1-1. Now 5.2.arch2-1 released.
In /home/regid/linux/archlinux-linux, I get

% git pull
fatal: this operation must be run in a work tree
% git config --get core.bare                               
true

I am still wondering if, and how, to download only the changes from 5.1.16-arch1-1 to 5.2.arch2-1.

Last edited by regid (2019-07-12 12:20:52)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#9 2019-07-12 12:28:11

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

git fetch
cd ../src/archlinux-linux
git fetch

Edit:

git checkout v5.2-arch2

Last edited by loqs (2019-07-12 12:37:17)

Offline

#10 2019-07-12 12:46:29

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

loqs, I am confused about the order of the commands you suggested.

Last edited by regid (2019-07-12 12:52:37)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#11 2019-07-12 13:05:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: linux/src/archlinux: will git pull updates to a newer arch version?


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

Offline

#12 2019-07-12 15:32:00

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

cd /home/regid/linux/archlinux-linux
git fetch #fetch the changes from remote https://git.archlinux.org/linux.git
cd ../src/archlinux-linux
git fetch #fetch the changes from remote home/regid/linux/archlinux-linux which the first fetch just updated,  could do a git pull here
git checkout v5.2-arch2

Note the pkgver .scmversion and ../version will still use the old version.

Offline

#13 2019-07-14 21:28:59

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

For upgrading from 5.1.16-arch1-1 to 5.2.0-arch2-1 I deleted the whole 5.1.16 related stuff, and downloaded a fresh 5.2.0 tree with makepkg.
I will get back to asking git to download only the deltas when https://git.archlinux.org/linux.git/ will have something new.
For the record, currently:

[~/linux/archlinux-linux]% git branch -av
* master 0ecfebd2b524 Linux 5.2
[~/linux/archlinux-linux]% git remote -v
origin	https://git.archlinux.org/linux.git (fetch)
origin	https://git.archlinux.org/linux.git (push)
[~/linux/archlinux-linux]% git tag -l 'v5.2*'            
v5.2-arch1
v5.2-arch2
[~/linux/archlinux-linux]% git log --oneline --since=2019-07-05
0ecfebd2b524 (HEAD -> master) Linux 5.2
46713c3d2f8d Merge tag 'for-linus-20190706' of git://git.kernel.dk/linux-block
bcc0e65f47de Merge tag 'mips_fixes_5.2_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
2692982b0800 Merge tag 'dmaengine-fix-5.2' of git://git.infradead.org/users/vkoul/slave-dma
4f8b49092c37 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
ceacbc0e145e Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
7e41c3c9b6ce blk-mq: fix up placement of debugfs directory of queue files
69bf4b6b54fb Revert "mm: page cache: store only head pages in i_pages"
9fdb86c8cf9a Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
0e63665a1bfd Merge tag 'mtd/fixes-for-5.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
881ed91f7db5 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
a8f46b5afe1c Merge tag 'nfsd-5.2-2' of git://linux-nfs.org/~bfields/linux

This looks to me consistent with Screenshot_2019-07-14 linux git - Arch Linux kernel sources, with patches.

Last edited by regid (2019-07-14 22:55:45)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#14 2019-07-15 21:45:27

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

https://git.archlinux.org/linux.git/ was updated since my last post. Before trying loqs suggestion for git fetch, I thought I would examine things manually. The latest commits I can see for arch's linux.git as of this time are in this screenshot. Looked for the commits I have at the head of the local bare repository created by makepkg, and found them here. The marked rectangles are an attempt to show some of the similarities to the repository as I have it. The repository as I have it can be seen at this image.

  1. Due to the differences of the repositories, will git fetch be able to update the local repository at all?

  2. I wonder what someone that run makepkg now will get. In particular, doesn't his local built of linux-5.2.arch2-1-x86_64.pkg.tar.xz be substantially different from the official one?


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#15 2019-07-15 22:03:46

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

1 It should unless the remotes history changes but I am not sure what your are trying to achieve by tracking it.
2 the source in makepkg points to a signed tag not master so it should not change.

Offline

#16 2019-07-16 10:34:04

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

[linux/archlinux-linux]% git fetch     
remote: Enumerating objects: 147450, done.
remote: Counting objects: 100% (82029/82029), done.
remote: Compressing objects: 100% (9780/9780), done.
remote: Total 68630 (delta 58563), reused 68614 (delta 58547)
Receiving objects: 100% (68630/68630), 14.05 MiB | 1.70 MiB/s, done.
Resolving deltas: 100% (58563/58563), completed with 8462 local objects.
From https://git.archlinux.org/linux
   0ecfebd2b524..192f0f8e9db7  master       -> master
 * [new tag]                   v5.2.1-arch1 -> v5.2.1-arch1
[linux/archlinux-linux]%
[linux/archlinux-linux]% git log --oneline --since 2019-07-13
192f0f8e9db7 (HEAD -> master) Merge tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
ec9249752465 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
d12109291ccb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
1fa91854dcdf Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
3f06962273e7 Merge tag 'mtd/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
2260840592fb Merge tag 'for-5.3/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
92adeb616c91 Merge tag 'for-linus-5.3' of git://github.com/cminyard/linux-ipmi
43c95d3694cc Merge tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
073c916bc005 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
a2d79c7174ae Merge tag 'for-5.3/io_uring-20190711' of git://git.kernel.dk/linux-block

I quickly compared that with the current state of the remote repository, as can be seen in screenshot 2019-07-16. By the lines on the top, it looks similar.

  1. Did git knew how to sort the branch for me even though my remote history changed? If not, how did it worked for my remote with its remote?

  2. Do I now have a linux/archlinux-linux that is exactly the same as if I would have it if I let makepkg create it for v5.2.1-arch1? If not, is there a way to have it without downloading the entire branch?

Last edited by regid (2019-07-16 10:51:26)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#17 2019-07-16 16:29:32

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

regid wrote:

If not, is there a way to have it without downloading the entire branch?

What do you mean downloading the entire branch?

Offline

#18 2019-07-16 18:53:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: linux/src/archlinux: will git pull updates to a newer arch version?

I think he means:

% du -sh arch-git 
3.5G	arch-git

If that is true, recommend you just download the source tarball and patch like linux-ck does.

_srcver=5.1.18-arch1
pkgver=${_srcver%-*}
source=(
  "https://www.kernel.org/pub/linux/kernel/v5.x/linux-$pkgver.tar".{xz,sign}
   ...
  0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
  0002-ZEN-Add-CONFIG-for-unprivileged_userns_clone.patch
  0003-iwlwifi-mvm-disable-TX-AMSDU-on-older-NICs.patch
)

The script I shared is what I use to diff against upstream and match the Arch kernel as much as I can so you can always depend on those unless they break the ck patchset.

Last edited by graysky (2019-07-16 18:57:02)


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

Offline

#19 2019-07-16 18:57:17

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

@graysky but the tarballs are no longer signed and the git repo does not need to be downloaded in its entirety on every update.

Offline

#20 2019-07-17 13:21:00

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

I did meant downloading the entire git repo on every update. Which is several GBs. I can't see how large the tarball is without downloading it. Which I reluctant to do. Isn't it larger then 1GB?

Am I right the arch's git repository is changing the history? I think I show that in the images. If I am right, and assuming git fetch is following the sequence of the commits in arch's repo and fetches only what is newer than my local HEAD, how can git fetch reliably track arch's git repository?

Last edited by regid (2019-07-17 18:25:27)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#21 2019-07-18 19:00:30

mxfm
Member
Registered: 2015-10-23
Posts: 163

Re: linux/src/archlinux: will git pull updates to a newer arch version?

I also tried to use archlinux package (tracking git repo but with local modifications) and did not have any solution except downloading entire repo at each update which is not longterm solution. Perhaps the Linux package was made deliberately this way for the goal that others could NOT reuse official repo.

Offline

#22 2019-07-31 07:53:06

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

loqs wrote:
cd /home/regid/linux/archlinux-linux
git fetch #fetch the changes from remote https://git.archlinux.org/linux.git
cd ../src/archlinux-linux
git fetch #fetch the changes from remote home/regid/linux/archlinux-linux which the first fetch just updated,  could do a git pull here
git checkout v5.2-arch2

Note the pkgver .scmversion and ../version will still use the old version.

I have tried following these commands to upgrade 5.2.3.arch1 source to 5.2.4.arch1. With

% cd /home/regid/linux/archlinux-linux
% git fetch
% cd /home/regid/linux/src/archlinux-linux
% git checkout master
% git fetch
% git tag -l 'v5.2*'

, I didn't have the newest 5.2.4.arch1 tag. Am I right this is in contrast to what man git fetch states about obtaining new tags for a fetch?

What am I supposed to do next? git merge followed by git checkout 5.2.4.arch1?


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#23 2019-07-31 13:01:31

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

If you retry the two fetch calls with the -t option does that fetch the tag?

Offline

#24 2019-07-31 13:59:56

regid
Member
Registered: 2016-06-06
Posts: 201

Re: linux/src/archlinux: will git pull updates to a newer arch version?

loqs wrote:

If you retry the two fetch calls with the -t option does that fetch the tag?

% cd /home/regid/linux/archlinux-linux
% git fetch

Up to here, the tag got updated as expected. That is, at linux/archlinux-linux I could see v5.2.4.arch1 after git fetch, without doing anything else.

The problem is at /home/regid/linux/src/archlinux-linux. git fetch -t did get the tag, but I issued that command only after git merge (which I issued after git fetch). I did all that prior to seeing your message, and writing here from memory. My understanding of the man page is that git fetch should have fetch the new tag without git fetch -t. I will check again when v5.2.5.arch1 is released.

As an aside, in general, is it expected that git merge will do more then a fast forward update?

Last edited by regid (2019-07-31 14:01:51)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#25 2019-07-31 14:18:09

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: linux/src/archlinux: will git pull updates to a newer arch version?

I thought the objects to the fetch were controlled by the refspec list in the fetch entry of the matching remote section in git config.

Offline

Board footer

Powered by FluxBB