You are not logged in.

#1 2020-08-28 20:13:06

dbrief
Member
Registered: 2020-01-21
Posts: 8

zfs-linux failing in prepare() despite being able to run it (SOLVED)

Using pacaur to compile and install zfs-linux:

:: zfs-linux build files are up-to-date -- skipping
:: Checking zfs-linux integrity...
==> Making package: zfs-linux 0.8.4_5.8.3.arch1.1-1 (Fri 28 Aug 2020 01:01:26 PM PDT)
==> Retrieving sources...
-> Found zfs-0.8.4.tar.gz
-> Found linux-5.8-compat-__vmalloc.patch
==> Validating source files with sha256sums...
zfs-0.8.4.tar.gz ... Passed
linux-5.8-compat-__vmalloc.patch ... Passed
:: Preparing zfs-linux...
==> Making package: zfs-linux 0.8.4_5.8.3.arch1.1-1 (Fri 28 Aug 2020 01:01:28 PM PDT)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
-> Found zfs-0.8.4.tar.gz
-> Found linux-5.8-compat-__vmalloc.patch
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
-> Extracting zfs-0.8.4.tar.gz with bsdtar
==> Starting prepare()...
The next patch would create the file config/kernel-kmem.m4,
which already exists!  Skipping patch.
1 out of 1 hunk ignored
patching file config/kernel.m4
patching file include/spl/sys/kmem.h
patching file module/spl/spl-kmem-cache.c
patching file module/spl/spl-kmem.c
==> ERROR: A failure occurred in prepare().
Aborting...
:: failed to verify integrity or prepare zfs-linux package

The prepare() function in MAKEPKG looks like:

prepare() {
cd "${srcdir}/zfs-${_zfsver}"
patch -Np1 -i ${srcdir}/linux-5.8-compat-__vmalloc.patch
}

I can run that patch from the directory from command line just fine. Yet it's failing. Where can I get more info on why prepare fails?

Thx in advanced.

Last edited by dbrief (2020-08-29 02:23:48)

Offline

#2 2020-08-28 20:32:26

loqs
Member
Registered: 2014-03-06
Posts: 11,565

Re: zfs-linux failing in prepare() despite being able to run it (SOLVED)

What if you clean the $srcdir before building?

The next patch would create the file config/kernel-kmem.m4,
which already exists!  Skipping patch.
1 out of 1 hunk ignored

patch returns 1,  makepkg exits on the none zero return value.

Last edited by loqs (2020-08-28 20:48:22)

Offline

#3 2020-08-29 02:23:18

dbrief
Member
Registered: 2020-01-21
Posts: 8

Re: zfs-linux failing in prepare() despite being able to run it (SOLVED)

loqs wrote:

What if you clean the $srcdir before building?

The next patch would create the file config/kernel-kmem.m4,
which already exists!  Skipping patch.
1 out of 1 hunk ignored

patch returns 1,  makepkg exits on the none zero return value.

Thanks for responding, I got it. I had upgraded kernels and it didn't have the headers. I ended up installing the git instead to get current headers.

Offline

#4 2020-08-29 03:14:39

loqs
Member
Registered: 2014-03-06
Posts: 11,565

Re: zfs-linux failing in prepare() despite being able to run it (SOLVED)

makepkg -odd
==> Making package: zfs-linux 0.8.4_5.8.3.arch1.1-1 (Sat 29 Aug 2020 05:07:44)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
  -> Downloading zfs-0.8.4.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   141  100   141    0     0    530      0 --:--:-- --:--:-- --:--:--   530
100   636  100   636    0     0   1327      0 --:--:-- --:--:-- --:--:--  1327
100 9068k  100 9068k    0     0  3428k      0  0:00:02  0:00:02 --:--:-- 4202k
  -> Found linux-5.8-compat-__vmalloc.patch
==> Validating source files with sha256sums...
    zfs-0.8.4.tar.gz ... Passed
    linux-5.8-compat-__vmalloc.patch ... Passed
==> Extracting sources...
  -> Extracting zfs-0.8.4.tar.gz with bsdtar
==> Starting prepare()...
patching file config/kernel-kmem.m4
patching file config/kernel.m4
patching file include/spl/sys/kmem.h
patching file module/spl/spl-kmem-cache.c
patching file module/spl/spl-kmem.c
==> Sources are ready.

First run of prepare works as expected

$ makepkg -odd
==> Making package: zfs-linux 0.8.4_5.8.3.arch1.1-1 (Sat 29 Aug 2020 05:07:53)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
  -> Found zfs-0.8.4.tar.gz
  -> Found linux-5.8-compat-__vmalloc.patch
==> Validating source files with sha256sums...
    zfs-0.8.4.tar.gz ... Passed
    linux-5.8-compat-__vmalloc.patch ... Passed
==> Extracting sources...
  -> Extracting zfs-0.8.4.tar.gz with bsdtar
==> Starting prepare()...
The next patch would create the file config/kernel-kmem.m4,
which already exists!  Skipping patch.
1 out of 1 hunk ignored
patching file config/kernel.m4
patching file include/spl/sys/kmem.h
patching file module/spl/spl-kmem-cache.c
patching file module/spl/spl-kmem.c
==> ERROR: A failure occurred in prepare().
    Aborting...

Prepare fails due to file created by previous run of patch

$ makepkg -Codd
==> Making package: zfs-linux 0.8.4_5.8.3.arch1.1-1 (Sat 29 Aug 2020 05:08:00)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
  -> Found zfs-0.8.4.tar.gz
  -> Found linux-5.8-compat-__vmalloc.patch
==> Validating source files with sha256sums...
    zfs-0.8.4.tar.gz ... Passed
    linux-5.8-compat-__vmalloc.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting zfs-0.8.4.tar.gz with bsdtar
==> Starting prepare()...
patching file config/kernel-kmem.m4
patching file config/kernel.m4
patching file include/spl/sys/kmem.h
patching file module/spl/spl-kmem-cache.c
patching file module/spl/spl-kmem.c
==> Sources are ready.

The -C option to makepkg cleans the $srcdir and prepare works,
As the -dd was passed to makepkg no dependencies were installed and linux and linux-headers packages were not installed on the system.

Last edited by loqs (2020-08-29 03:16:18)

Offline

#5 2020-08-30 10:34:24

dbrief
Member
Registered: 2020-01-21
Posts: 8

Re: zfs-linux failing in prepare() despite being able to run it (SOLVED)

The -C option to makepkg cleans the $srcdir and prepare works,
As the -dd was passed to makepkg no dependencies were installed and linux and linux-headers packages were not installed on the system.

Thanks for the tip! Wasn't aware of -C or -dd flags.

Offline

Board footer

Powered by FluxBB