You are not logged in.

#1 2017-07-01 16:06:42

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Can I use a local copy of a git repo as source in a PKGBUILD?

Hello community,

I need to git bisect a bug in the kernel. The algorithm is like this: You check out the linux git repo, then run git bisect telling the last known good version (where the bug is not yet introduced) and the first known bad version (where the bug is for sure introduced). Then git bisect takes the commit between these two points and sets the local git repo to this commit. The process looks like this:

[photon@Thinkpad-X200T linux]$ git bisect start
[photon@Thinkpad-X200T linux]$ git bisect good v4.9
[photon@Thinkpad-X200T linux]$ git bisect bad v4.10
binäre Suche: danach noch 7099 Commits zum Testen übrig (ungefähr 13 Schritte)
[f4000cd99750065d5177555c0a805c97174d1b9f] Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Here I know that kernel 4.9 was good but kernel 4.10 is buggy and git bisect tells me that there are 7099 commits in between which corresponds to 13 bisections steps. The first step would be to build commit f4000cd99750065d5177555c0a805c97174d1b9f and test if it is good or bad.

However, to not install stuff in my working machine without using package management, I'd like to make a PKGBUILD which builds a package of the kernel commit which I need to test. However, I don't really know how to do it. The easiest way would be to put the folder with my local git copy as a source item of the PKGBUILD instead of the remote kernel git server. But I don't know how exactly to do it and if it is possible at all.

Thanks for any hints on how to build test kernels using makepkg!
PhotonX

Last edited by PhotonX (2017-07-03 20:48:15)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#2 2017-07-01 16:52:28

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,395
Website

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Use 'git+file:///path/to/your/repo' in your sources array.

e.g.

source=("git+file:///home/wormzy/git/linux")

Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2017-07-01 16:54:44

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Perfect, thanks! I will try and report back if it worked.


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#4 2017-07-01 17:03:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,404

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

It's far easier than that.  If you manually edit the source array, you'll have to re-edit it for every step in the bisect which will lead to a new checkout.

Just use an existing linux-git PKGBUILD and `makepkg -o` to obtain the sources, then 1) cd into the source directory, 2) git bisect, 3) cd back to the PKGBUILD and `makepkg -ef`.  Repeat just steps 1-3 as needed.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2017-07-01 18:31:21

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Thanks for the hint, I'm trying it out!


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#6 2017-07-01 18:53:00

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

For some reason I get config prompts:

==> Beginne build()...
scripts/kconfig/conf  --silentoldconfig Kconfig
*
* Restart config...
*
*
* General setup
*
Cross-compiler tool prefix (CROSS_COMPILE) [] 
Compile also drivers which will not load (COMPILE_TEST) [N/y/?] n
Local version - append to kernel release (LOCALVERSION) [-g41f1830f5a7a] -g41f1830f5a7a
Automatically append version information to the version string (LOCALVERSION_AUTO) [N/y/?] n
Kernel compression mode
> 1. Gzip (KERNEL_GZIP)
  2. Bzip2 (KERNEL_BZIP2)
  3. LZMA (KERNEL_LZMA)
  4. XZ (KERNEL_XZ)
  5. LZO (KERNEL_LZO)
  6. LZ4 (KERNEL_LZ4)
choice[1-6?]: 1
Default hostname (DEFAULT_HOSTNAME) [(none)] (none)
Support for paging of anonymous memory (swap) (SWAP) [Y/n/?] y
System V IPC (SYSVIPC) [Y/n/?] y
POSIX Message Queues (POSIX_MQUEUE) [Y/n/?] y
Enable process_vm_readv/writev syscalls (CROSS_MEMORY_ATTACH) [Y/n/?] y
uselib syscall (USELIB) [N/y/?] n
Auditing support (AUDIT) [N/y/?] n
Kernel .config support (IKCONFIG) [Y/n/m/?] y
  Enable access to .config through /proc/config.gz (IKCONFIG_PROC) [Y/n/?] y
Kernel log buffer size (16 => 64KB, 17 => 128KB) (LOG_BUF_SHIFT) [19] 19
CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB) (LOG_CPU_MAX_BUF_SHIFT) [12] 12
Temporary per-CPU NMI log buffer size (12 => 4KB, 13 => 8KB) (NMI_LOG_BUF_SHIFT) [13] (NEW) 

I will try to use a 4.9 snapshot of linux-git, maybe the config file of the current 4.12rc version is not fitting to revisions between 4.9 and 4.10 any more...

Last edited by PhotonX (2017-07-01 19:15:14)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#7 2017-07-01 19:15:17

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

I aborted the makepkg process and substituted all the files from the AUR archive with the 4.9 snapshot, then started makepkg -ef again. Unfortunately, I get the same output. I think, this shouldn't happen (at some point the 4.9 snapshot was building without user interaction, I assume). Am I mixing stuff of different versions and therefore getting this output?


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#8 2017-07-01 19:38:02

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Actually, the variable it wants to know is set in https://aur.archlinux.org/cgit/aur.git/ … a1f1b#n144 (which I tried using) so I am wondering why it asks for it...


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#9 2017-07-01 20:16:03

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

I did everything cleanly now: Downloaded the 4.9 snapshot of the linux-git AUR package, then ran the makepkg -o, git bisect and makepkg -ef commands, but no luck:

[photon@photon-desktop linux]$ makepkg -o
==> Erstelle Paket: linux-git 4.9.r0.g69973b8-1 (Sa 1. Jul 21:48:35 CEST 2017)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
  -> Klone das linux git Repo...
Klone in Bare-Repository '/home/photon/linux-git/linux' ...
remote: Counting objects: 5404829, done.
remote: Compressing objects: 100% (4761/4761), done.
remote: Total 5404829 (delta 5108), reused 4984 (delta 3408)
Empfange Objekte: 100% (5404829/5404829), 1.01 GiB | 1009.00 KiB/s, Fertig.
Löse Unterschiede auf: 100% (4539317/4539317), Fertig.
  -> config gefunden
  -> config.x86_64 gefunden
  -> linux-git.preset gefunden
==> Überprüfe source Dateien mit sha256sums...
    linux ... Übersprungen
    config ... Durchgelaufen
    config.x86_64 ... Durchgelaufen
    linux-git.preset ... Durchgelaufen
==> Entpacke Quellen...
  -> Erstelle Arbeitskopie des linux git Repos...
Klone nach 'linux' ...
Fertig.
Checke Dateien aus: 100% (59845/59845), Fertig.
==> Beginne prepare()...
  HOSTCC  scripts/basic/fixdep
  SHIPPED scripts/kconfig/zconf.tab.c
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --olddefconfig Kconfig
.config:963:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP
.config:965:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP
.config:966:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
.config:984:warning: symbol value 'm' invalid for NF_NAT_PROTO_DCCP
.config:985:warning: symbol value 'm' invalid for NF_NAT_PROTO_UDPLITE
.config:986:warning: symbol value 'm' invalid for NF_NAT_PROTO_SCTP
.config:5330:warning: symbol value 'm' invalid for SND_DESIGNWARE_PCM
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  SYSTBL  arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
  HOSTCC  scripts/basic/bin2c
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/asm/unistd_32_ia32.h
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/entry/syscalls/../../include/generated/asm/syscalls_64.h
  WRAP    arch/x86/include/generated/asm/clkdev.h
  WRAP    arch/x86/include/generated/asm/dma-contiguous.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
  HYPERCALLS arch/x86/entry/syscalls/../../include/generated/asm/xen-hypercalls.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_x32.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  DESCEND  objtool
  HOSTCC   /home/photon/linux-git/src/linux/tools/objtool/fixdep.o
  HOSTLD   /home/photon/linux-git/src/linux/tools/objtool/fixdep-in.o
  LINK     /home/photon/linux-git/src/linux/tools/objtool/fixdep
  GEN      /home/photon/linux-git/src/linux/tools/objtool/arch/x86/insn/inat-tables.c
  CC       /home/photon/linux-git/src/linux/tools/objtool/exec-cmd.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/arch/x86/decode.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/help.o
  LD       /home/photon/linux-git/src/linux/tools/objtool/arch/x86/objtool-in.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/builtin-check.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/pager.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/parse-options.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/elf.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/run-command.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/special.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/sigchain.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/objtool.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/subcmd-config.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/libstring.o
  LD       /home/photon/linux-git/src/linux/tools/objtool/libsubcmd-in.o
  AR       /home/photon/linux-git/src/linux/tools/objtool/libsubcmd.a
  CC       /home/photon/linux-git/src/linux/tools/objtool/str_error_r.o
  LD       /home/photon/linux-git/src/linux/tools/objtool/objtool-in.o
  LINK     /home/photon/linux-git/src/linux/tools/objtool/objtool
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
  UPD     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  UPD     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  UPD     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
==> Beginne pkgver()...
==> Aktualisierte Version: linux-git 4.12rc7.r108.ge18aca0236a2-1
==> Quellen sind fertig.
[photon@photon-desktop linux-git]$ cd src/linux
[photon@photon-desktop linux]$ git bisect start
[photon@photon-desktop linux]$ git bisect good v4.9
[photon@photon-desktop linux]$ git bisect bad v4.10
binäre Suche: danach noch 7099 Commits zum Testen übrig (ungefähr 13 Schritte)
[f4000cd99750065d5177555c0a805c97174d1b9f] Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[photon@photon-desktop linux]$ cd ../..
[photon@photon-desktop linux-git]$ makepkg -ef
==> Erstelle Paket: linux-git 4.12rc7.r108.ge18aca0236a2-1 (Sa 1. Jul 22:10:32 CEST 2017)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> WARNUNG: Verwende bestehenden $srcdir/ Baum
==> Beginne pkgver()...
==> Aktualisierte Version: linux-git 4.9.r7149.gf4000cd99750-1
==> Beginne build()...
scripts/kconfig/conf  --silentoldconfig Kconfig
*
* Restart config...
*
*
* General setup
*
Cross-compiler tool prefix (CROSS_COMPILE) [] 
Compile also drivers which will not load (COMPILE_TEST) [N/y/?] n
Local version - append to kernel release (LOCALVERSION) [-g69973b8] -g69973b8
Automatically append version information to the version string (LOCALVERSION_AUTO) [N/y/?] n
Kernel compression mode
> 1. Gzip (KERNEL_GZIP)
  2. Bzip2 (KERNEL_BZIP2)
  3. LZMA (KERNEL_LZMA)
  4. XZ (KERNEL_XZ)
  5. LZO (KERNEL_LZO)
  6. LZ4 (KERNEL_LZ4)
choice[1-6?]: 1
Default hostname (DEFAULT_HOSTNAME) [(none)] (none)
Support for paging of anonymous memory (swap) (SWAP) [Y/n/?] y
System V IPC (SYSVIPC) [Y/n/?] y
POSIX Message Queues (POSIX_MQUEUE) [Y/n/?] y
Enable process_vm_readv/writev syscalls (CROSS_MEMORY_ATTACH) [Y/n/?] y
uselib syscall (USELIB) [N/y/?] n
Auditing support (AUDIT) [N/y/?] n
Kernel .config support (IKCONFIG) [Y/n/m/?] y
  Enable access to .config through /proc/config.gz (IKCONFIG_PROC) [Y/n/?] y
Kernel log buffer size (16 => 64KB, 17 => 128KB) (LOG_BUF_SHIFT) [19] 19
CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB) (LOG_CPU_MAX_BUF_SHIFT) [12] 12
Temporary per-CPU NMI log buffer size (12 => 4KB, 13 => 8KB) (NMI_LOG_BUF_SHIFT) [13] (NEW)

I noticed that $src/linux/.config which has been generated by makepkg -o in the git tree is for version 4.12rc7 although I used the 4.9.0 AUR snapshot of linux-git. But this should not matter since the AUR package is at 4.12rc6 (rather than 4.12rc7) so I assume that this .config file is replaced by the one in the AUR snapshot. It doesn't work out though...


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#10 2017-07-01 20:18:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,490
Website

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

1. Learn to use the edit button and stop bumping your thread: https://wiki.archlinux.org/index.php/Co … ct#Bumping

2. Post output in English: https://wiki.archlinux.org/index.php/Co … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2017-07-01 20:47:31

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Sorry for bumping. Here is the English version of the output:

[photon@photon-desktop linux-git]$ makepkg -o
==> Making package: linux-git 4.9.r0.g69973b8-1 (Sat Jul  1 22:24:58 CEST 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning linux git repo...
Cloning into bare repository '/home/photon/linux-git/linux'...
remote: Counting objects: 5404829, done.
remote: Compressing objects: 100% (4761/4761), done.
Receiving objects: 100% (5404829/5404829), 1.01 GiB | 838.00 KiB/s, done.
remote: Total 5404829 (delta 5107), reused 4984 (delta 3408)
Resolving deltas: 100% (4539316/4539316), done.
  -> Found config
  -> Found config.x86_64
  -> Found linux-git.preset
==> Validating source files with sha256sums...
    linux ... Skipped
    config ... Passed
    config.x86_64 ... Passed
    linux-git.preset ... Passed
==> Extracting sources...
  -> Creating working copy of linux git repo...
Cloning into 'linux'...
done.
Checking out files: 100% (59845/59845), done.
==> Starting prepare()...
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --olddefconfig Kconfig
.config:963:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP
.config:965:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP
.config:966:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
.config:984:warning: symbol value 'm' invalid for NF_NAT_PROTO_DCCP
.config:985:warning: symbol value 'm' invalid for NF_NAT_PROTO_UDPLITE
.config:986:warning: symbol value 'm' invalid for NF_NAT_PROTO_SCTP
.config:5330:warning: symbol value 'm' invalid for SND_DESIGNWARE_PCM
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  SYSTBL  arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
  HOSTCC  scripts/basic/bin2c
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/asm/unistd_64_x32.h
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  SYSTBL  arch/x86/entry/syscalls/../../include/generated/asm/syscalls_64.h
  HYPERCALLS arch/x86/entry/syscalls/../../include/generated/asm/xen-hypercalls.h
  WRAP    arch/x86/include/generated/asm/clkdev.h
  WRAP    arch/x86/include/generated/asm/dma-contiguous.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_32.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_x32.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  DESCEND  objtool
  HOSTCC   /home/photon/linux-git/src/linux/tools/objtool/fixdep.o
  HOSTLD   /home/photon/linux-git/src/linux/tools/objtool/fixdep-in.o
  LINK     /home/photon/linux-git/src/linux/tools/objtool/fixdep
  GEN      /home/photon/linux-git/src/linux/tools/objtool/arch/x86/insn/inat-tables.c
  CC       /home/photon/linux-git/src/linux/tools/objtool/exec-cmd.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/arch/x86/decode.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/help.o
  LD       /home/photon/linux-git/src/linux/tools/objtool/arch/x86/objtool-in.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/builtin-check.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/pager.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/parse-options.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/elf.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/run-command.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/sigchain.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/special.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/subcmd-config.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/objtool.o
  LD       /home/photon/linux-git/src/linux/tools/objtool/libsubcmd-in.o
  AR       /home/photon/linux-git/src/linux/tools/objtool/libsubcmd.a
  CC       /home/photon/linux-git/src/linux/tools/objtool/libstring.o
  CC       /home/photon/linux-git/src/linux/tools/objtool/str_error_r.o
  LD       /home/photon/linux-git/src/linux/tools/objtool/objtool-in.o
  LINK     /home/photon/linux-git/src/linux/tools/objtool/objtool
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
  UPD     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  UPD     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  UPD     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
==> Starting pkgver()...
==> Updated version: linux-git 4.12rc7.r108.ge18aca0236a2-1
==> Sources are ready.
[photon@photon-desktop linux-git]$ cd src/linux
[photon@photon-desktop linux]$ git bisect start
[photon@photon-desktop linux]$ git bisect good v4.9
[photon@photon-desktop linux]$ git bisect bad v4.10
Bisecting: 7099 revisions left to test after this (roughly 13 steps)
[f4000cd99750065d5177555c0a805c97174d1b9f] Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[photon@photon-desktop linux]$ cd ../..
[photon@photon-desktop linux-git]$ makepkg -ef
==> Making package: linux-git 4.12rc7.r108.ge18aca0236a2-1 (Sat Jul  1 22:45:18 CEST 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Updated version: linux-git 4.9.r7149.gf4000cd99750-1
==> Starting build()...
scripts/kconfig/conf  --silentoldconfig Kconfig
*
* Restart config...
*
*
* General setup
*
Cross-compiler tool prefix (CROSS_COMPILE) [] 
Compile also drivers which will not load (COMPILE_TEST) [N/y/?] n
Local version - append to kernel release (LOCALVERSION) [-g69973b8] -g69973b8
Automatically append version information to the version string (LOCALVERSION_AUTO) [N/y/?] n
Kernel compression mode
> 1. Gzip (KERNEL_GZIP)
  2. Bzip2 (KERNEL_BZIP2)
  3. LZMA (KERNEL_LZMA)
  4. XZ (KERNEL_XZ)
  5. LZO (KERNEL_LZO)
  6. LZ4 (KERNEL_LZ4)
choice[1-6?]: 1
Default hostname (DEFAULT_HOSTNAME) [(none)] (none)
Support for paging of anonymous memory (swap) (SWAP) [Y/n/?] y
System V IPC (SYSVIPC) [Y/n/?] y
POSIX Message Queues (POSIX_MQUEUE) [Y/n/?] y
Enable process_vm_readv/writev syscalls (CROSS_MEMORY_ATTACH) [Y/n/?] y
uselib syscall (USELIB) [N/y/?] n
Auditing support (AUDIT) [N/y/?] n
Kernel .config support (IKCONFIG) [Y/n/m/?] y
  Enable access to .config through /proc/config.gz (IKCONFIG_PROC) [Y/n/?] y
Kernel log buffer size (16 => 64KB, 17 => 128KB) (LOG_BUF_SHIFT) [19] 19
CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB) (LOG_CPU_MAX_BUF_SHIFT) [12] 12
Temporary per-CPU NMI log buffer size (12 => 4KB, 13 => 8KB) (NMI_LOG_BUF_SHIFT) [13] (NEW) 

Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#12 2017-07-01 20:52:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,490
Website

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

So, what is your issue? Your output ends where the terminal is waiting for input from you.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#13 2017-07-02 04:55:48

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

My issue is that this shouldn't happen. When I build the linux-git AUR package without doing git bisect in the sources, there is no input required either. The variable which it wants me to input is set in the config file which is supplied with the PKGBUILD so it shouldn't be asked. When I answer this query, there are many more such questions, so, effectively, I would need to do most of the configuration by hand. But I'm not an expert in kernel building and don't know which options to choose. Also, I need to choose the same options which are chosen in the Arch kernel because I need to find out the cause of a bug and different options might or might not let it appear. So I would like it to just use the given config file where all the options are set and not ask unnecessary question. wink

Last edited by PhotonX (2017-07-02 04:58:43)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#14 2017-07-02 07:13:33

severach
Member
Registered: 2015-05-23
Posts: 192

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Most PKGBUILD are not made to be makepkg -e compatible. They are easy to fix if you know how.

You can bisect manually. Use tig to pick out a commit and add #commit=... at the end of the git line. Bisecting a large package like the linux kernel this way will be slow.

Offline

#15 2017-07-02 07:30:15

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Hmm, I maintain some PKGBUILDs, but easier ones than a kernel PKGBUILD. So if you could point me a description on the Wiki on how to make a PKGBUILD makepkg -e compatible, I'll most likely be able to read and implement it. makepkg -e sounds comfortable since I don't have to check out the tree at each step.

Concerning the manual way (if makepkg -e refuses to work): I never worked with tig but I can find out the commit using git bisect (f4000cd99750065d5177555c0a805c97174d1b9f for my first step as in the initial post), right?

Last edited by PhotonX (2017-07-02 07:31:46)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#16 2017-07-02 08:28:38

loqs
Member
Registered: 2014-03-06
Posts: 13,693

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Bisecting_bugs covers makepkg -e.
Suggested changes to the PKGBUILD to make it more compatible with git bisect

# don't run depmod on 'make install'. We'll do this ourselves in packaging
#  git tracks scripts/depmod.sh so do not change it when using the existing source dir for bisection
#  sed -i '2iexit 0' scripts/depmod.sh
#  git tracks the contents of the Documentation dir so do not change it when using the existing source dir for bisection
#  it will be changed by the following chmod commands in conjuction with using hardlinks
#  cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"
  cp -a Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"

Edit:
grammar changes not changed

Last edited by loqs (2017-07-02 08:29:56)

Offline

#17 2017-07-02 09:58:08

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Thanks! As far as I understand, the lines

sed -i '2iexit 0' scripts/depmod.sh

and

cp -a Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"

shouldn't appear in the PKGBUILD, right?


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#18 2017-07-02 10:39:46

loqs
Member
Registered: 2014-03-06
Posts: 13,693

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Yes and no the first line

sed -i '2iexit 0' scripts/depmod.sh

I just commented out as in the first code block I posted
In the second code block

cp -a Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"

This is a replacement for the line above in my second code block

cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"

Removing the l option causes cp to actually copy the files instead of using hardlinks the comment in my second block explains why
Edit:
https://bbs.archlinux.org/viewtopic.php?pid=1700245 more complete example of kernel bisection

Last edited by loqs (2017-07-02 10:45:34)

Offline

#19 2017-07-02 11:25:03

progandy
Member
Registered: 2012-05-17
Posts: 4,444

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

I'm not sure, but maybe the kernel requires you to update the configuration after each bisection step, and menuconfig is the default I think. In that case, try to add "make prepare" and "make olddefconfig" to the build() function. These commands are part of prepare() which will be skipped with -e as well.

Last edited by progandy (2017-07-02 11:27:34)


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

Online

#20 2017-07-02 11:47:10

loqs
Member
Registered: 2014-03-06
Posts: 13,693

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

The kernel prompts for config option choices every time a bisect step introduces an option not configured in the current config.
Yes running makeolddefconfig or similar would avoid that but the result of changing the config on every build step would mean every build step would need a full rebuild as the updated config would be detected.

Offline

#21 2017-07-02 12:43:00

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

All that sounds a bit complicated. smile

@loqs: Am I right assuming that the PKGBUILD of linux-git you posted in post #12 of the thread you linked is working with makepkg -e so I can just follow the steps you posted there?

Last edited by PhotonX (2017-07-02 12:43:32)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#22 2017-07-02 17:15:22

loqs
Member
Registered: 2014-03-06
Posts: 13,693

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Yes that works with makepkg -e but it is designed for a bisect between 4.9 and 4.10 so in the sources section the tag for the initial checkout is set to v4.9,  config and config.x84_64 are set to the configs arch used in its last 4.9 lease.
The ${pkgbase}.preset is also changed to that used by the arch linux package but that change is version independant.

source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=v4.9'
        # the main kernel config files
        'config::https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux&id=6ca83a0709f2c49fe12db446d21867630b8ae4bd' 
        'config.x86_64::https://git.archlinux.org/svntogit/packages.git/plain/trunk/config.x86_64?h=packages/linux&id=6ca83a0709f2c49fe12db446d21867630b8ae4bd'
        '90-linux.hook::https://git.archlinux.org/svntogit/packages.git/plain/trunk/90-linux.hook?h=packages/linux'
        # standard config files for mkinitcpio ramdisk
        "${pkgbase}.preset::https://git.archlinux.org/svntogit/packages.git/plain/trunk/linux.preset?h=packages/linux")

If you need to bisect between different versions I can suggest the appropriate changes if you provide the version numbers.

Offline

#23 2017-07-02 20:20:51

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

No, that's exactly perfect for me, I need to bisect between 4.9 and 4.10 as well. Thanks for your help, I will try if it works and report back!

Last edited by PhotonX (2017-07-02 20:27:12)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

#24 2017-07-02 20:33:15

loqs
Member
Registered: 2014-03-06
Posts: 13,693

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

One issue with bisecting 4.9 to 4.10 covered here If you have not started yet I would recomend changing
CONFIG_MODVERSIONS=y to CONFIG_MODVERSIONS=N in config.x86_64 and config then run updpkgsums in the pkgbuild directory to update the checksums
otherwise a large number of commits between 4.9 and 4.10 will not boot.

Offline

#25 2017-07-02 21:02:01

PhotonX
Member
From: Munich
Registered: 2008-08-10
Posts: 523

Re: Can I use a local copy of a git repo as source in a PKGBUILD?

Can I do this after the first run has finished or should I rather start from scratch?

edit: The first run actually aborted with

  LD      init/built-in.o
kernel/built-in.o: In function `update_wall_time':
(.text+0x7f067): undefined reference to `____ilog2_NaN'
make: *** [Makefile:969: vmlinux] Error 1

Is that what you meant? smile

Last edited by PhotonX (2017-07-02 21:09:22)


Desktop: http://www.sysprofile.de/id15562, Arch Linux    |    Notebook: Thinkpad X200 Tablet, Manjaro

The very worst thing you can do with free software is to download it, see that it doesn't work for some reason, leave it, and tell your friends that it doesn't work.  -  Tuomas Lukka

Offline

Board footer

Powered by FluxBB