Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer able to find local packages (for dependencies) #71

Closed
Bronek opened this issue Apr 22, 2021 · 15 comments
Closed

No longer able to find local packages (for dependencies) #71

Bronek opened this issue Apr 22, 2021 · 15 comments

Comments

@Bronek
Copy link

Bronek commented Apr 22, 2021

I use ccm to build a series of packages which depend on each other. These are my own version zfs-utils and zfs-linux (and also my own kernel packages). The way it used to work I would do:

cd zfs-utils; sudo ccm s; cd ../zfs-linux; sudo ccm s

where cd gets me, via symlinks, to appropriate directories with PKGBUILD files. Since zfs-linux has a dependency on zfs-utils which is not a standard package, the latter ccm relies on zfs-utils saved to chroot_local (and produced by the former ccm). And this used to work, but now latter ccm s fails:

==> Making package: zfs-linux 2.0.4_5.11.16.1-1 (Wed Apr 21 22:47:16 2021)
==> Retrieving sources...
  -> Found zfs-2.0.4.tar.gz
==> Validating source files with sha256sums...
    zfs-2.0.4.tar.gz ... Passed
==> Making package: zfs-linux 2.0.4_5.11.16.1-1 (Wed 21 Apr 2021 10:47:20 PM BST)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: zfs-utils=2.0.4
error: target not found: linux=5.11.16-1
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> kmod
  -> zfs-utils=2.0.4
  -> linux=5.11.16-1

I am sure the zfs-utils package is stored in the chroot_local; I confirmed it with:

% sudo repo-add chroot_local.db.tar.gz zfs-utils-2.0.4-1-x86_64.pkg.tar.zst
==> Extracting chroot_local.db.tar.gz to a temporary location...
==> Extracting chroot_local.files.tar.gz to a temporary location...
==> Adding package 'zfs-utils-2.0.4-1-x86_64.pkg.tar.zst'
==> WARNING: An entry for 'zfs-utils-2.0.4-1' already existed
  -> Computing checksums...
  -> Removing existing entry 'zfs-utils-2.0.4-1'...
  -> Creating 'desc' db entry...
  -> Creating 'files' db entry...
==> Creating updated database file 'chroot_local.db.tar.gz'

The most recent upgrades on my system (before this problem started) were:

[2021-04-17T10:01:25+0100] [ALPM] transaction started
[2021-04-17T10:01:25+0100] [ALPM] upgraded aom (3.0.0-1 -> 3.0.0-2)
[2021-04-17T10:01:25+0100] [ALPM] upgraded systemd-libs (248-4 -> 248-5)
[2021-04-17T10:01:25+0100] [ALPM] upgraded ca-certificates-mozilla (3.63-1 -> 3.64-1)
[2021-04-17T10:01:25+0100] [ALPM] upgraded fio (3.25-1 -> 3.26-1)
[2021-04-17T10:01:26+0100] [ALPM] upgraded systemd (248-4 -> 248-5)
[2021-04-17T10:01:31+0100] [ALPM] upgraded linux (5.11.14-1 -> 5.11.15-1)
[2021-04-17T10:01:38+0100] [ALPM] upgraded linux-lts (5.10.30-1 -> 5.10.31-1)
[2021-04-17T10:01:38+0100] [ALPM] upgraded nss (3.63-1 -> 3.64-1)
[2021-04-17T10:01:38+0100] [ALPM] upgraded systemd-sysvcompat (248-4 -> 248-5)
[2021-04-17T10:01:38+0100] [ALPM] upgraded vulkan-icd-loader (1.2.172-1 -> 1.2.174-2)
[2021-04-17T10:01:38+0100] [ALPM] upgraded zfs-linux (2.0.4_5.11.14.1-1 -> 2.0.4_5.11.15.1-1)
[2021-04-17T10:01:38+0100] [ALPM] upgraded zfs-linux-lts (2.0.4_5.10.30.1-1 -> 2.0.4_5.10.31.1-1)
[2021-04-17T10:01:38+0100] [ALPM] transaction completed

[2021-04-18T12:14:40+0100] [ALPM] transaction started
[2021-04-18T12:14:40+0100] [ALPM] upgraded icu (68.2-1 -> 69.1-1)
[2021-04-18T12:14:40+0100] [ALPM] upgraded boost-libs (1.75.0-2 -> 1.75.0-3)
[2021-04-18T12:14:41+0100] [ALPM] upgraded certbot (1.14.0-1 -> 1.14.0-2)
[2021-04-18T12:14:41+0100] [ALPM] upgraded harfbuzz (2.8.0-1 -> 2.8.0-3)
[2021-04-18T12:14:41+0100] [ALPM] upgraded libxml2 (2.9.10-8 -> 2.9.10-9)
[2021-04-18T12:14:41+0100] [ALPM] upgraded mtools (4.0.26-1 -> 4.0.27-1)
[2021-04-18T12:14:41+0100] [ALPM] upgraded oath-toolkit (2.6.6-1 -> 2.6.6-2)
[2021-04-18T12:14:41+0100] [ALPM] upgraded smbclient (4.14.2-1 -> 4.14.2-2)
[2021-04-18T12:14:41+0100] [ALPM] upgraded samba (4.14.2-1 -> 4.14.2-2)
[2021-04-18T12:14:41+0100] [ALPM] upgraded xfsprogs (5.11.0-1 -> 5.11.0-2)
[2021-04-18T12:14:41+0100] [ALPM] transaction completed

[2021-04-21T09:05:21+0100] [ALPM] transaction started
[2021-04-21T09:05:21+0100] [ALPM] upgraded libcups (1:2.3.3op2-2 -> 1:2.3.3op2-3)
[2021-04-21T09:05:22+0100] [ALPM] upgraded smbclient (4.14.2-2 -> 4.14.3-1)
[2021-04-21T09:05:22+0100] [ALPM] upgraded cifs-utils (6.13-1 -> 6.13-2)
[2021-04-21T09:05:22+0100] [ALPM] upgraded js78 (78.9.0-1 -> 78.10.0-1)
[2021-04-21T09:05:22+0100] [ALPM] upgraded libglvnd (1.3.2-1 -> 1.3.2-2)
[2021-04-21T09:05:22+0100] [ALPM] warning: /etc/nginx/nginx.conf installed as /etc/nginx/nginx.conf.pacnew
[2021-04-21T09:05:22+0100] [ALPM] upgraded nginx (1.18.0-2 -> 1.20.0-1)
[2021-04-21T09:05:22+0100] [ALPM] upgraded openssh (8.5p1-1 -> 8.6p1-1)
[2021-04-21T09:05:24+0100] [ALPM] upgraded plex-media-server-plexpass (1.22.2.4282-1 -> 1.22.3.4392-1)
[2021-04-21T09:05:24+0100] [ALPM] upgraded protobuf (3.15.7-1 -> 3.15.8-1)
[2021-04-21T09:05:24+0100] [ALPM] upgraded python-mock (3.0.5-5 -> 3.0.5-6)
[2021-04-21T09:05:24+0100] [ALPM] upgraded samba (4.14.2-2 -> 4.14.3-1)
[2021-04-21T09:05:25+0100] [ALPM] transaction completed

Of the above, my own builds are:

  • plex-media-server-plexpass
  • samba/smbclient
  • linux
  • linux-lts
  • zfs-utils
  • zfs-linux
  • zfs-linux-lts

Everything else coming from the official Arch repos. So far I tried, with no success:

  • sudo ccm S
  • sudo ccm n
  • pacman -U clean-chroot-manager-2.212-1-any.pkg.tar.zst (then upgraded back to 2.215-1 since the downgrade did not help)
  • manually adding [chroot_local] entry in chroot/root/etc/pacman.conf (but I do not know how to do it right, since Server=file:///repo isn't working)

This ticket is also in https://bbs.archlinux.org/viewtopic.php?pid=1968961#p1968961

@graysky2
Copy link
Owner

graysky2 commented Apr 22, 2021

Can you try v2.211? This was before I introduced the external repo feature. Remember to make sure your config file is in sync with /usr/share/clean-chroot-manager/ccm.skel

EDIT: I am assuming you did not define an external repo, yes?

@Bronek
Copy link
Author

Bronek commented Apr 22, 2021

Thank you, nope that did not work

% sudo ccm s 
----> Attempting to build package...
==> Synchronizing chroot copy [/pkgs/chroot/root] -> [bronekk]...done
:: Synchronizing package databases...         
 core                                                                                                                        131.5 KiB  3.21 MiB/s 00:00 [##############################################################################################] 100%
 extra                                                                                                                      1607.4 KiB  8.26 MiB/s 00:00 [##############################################################################################] 100%
 community                                                                                                                     5.5 MiB  8.30 MiB/s 00:01 [##############################################################################################] 100%
:: Starting full system upgrade...    
resolving dependencies...               
looking for conflicting packages...     
                                                               
Packages (1) libgcrypt-1.9.3-1
                                                               
Total Installed Size:  1.45 MiB
Net Upgrade Size:      0.04 MiB
                                                               
:: Proceed with installation? [Y/n]   
(1/1) checking keys in keyring                                                                                                                           [##############################################################################################] 100%
(1/1) checking package integrity                                                                                                                         [##############################################################################################] 100%
(1/1) loading package files                                                                                                                              [##############################################################################################] 100%
(1/1) checking for file conflicts                                                                                                                        [##############################################################################################] 100%
(1/1) checking available disk space                                                                                                                      [##############################################################################################] 100%
:: Processing package changes...                         
(1/1) upgrading libgcrypt                                                                                                                                [##############################################################################################] 100%
:: Running post-transaction hooks...                                                                                                                                                                                                                          
(1/1) Updating the info directory file...
==> Making package: zfs-linux 2.0.4_5.11.16.1-1 (Thu Apr 22 09:38:31 2021)
==> Retrieving sources...
  -> Found zfs-2.0.4.tar.gz
==> Validating source files with sha256sums...
    zfs-2.0.4.tar.gz ... Passed
==> Making package: zfs-linux 2.0.4_5.11.16.1-1 (Thu 22 Apr 2021 09:38:34 AM BST)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: zfs-utils=2.0.4
error: target not found: linux=5.11.16-1
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> kmod
  -> zfs-utils=2.0.4
  -> linux=5.11.16-1
==> Checking buildtime dependencies...
==> Installing missing dependencies...
error: target not found: linux-headers=5.11.16-1
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> linux-headers=5.11.16-1
==> ERROR: Could not resolve all dependencies.
==> ERROR: Build failed, check /pkgs/chroot/bronekk/build
sudo ccm s  7.75s user 1.73s system 96% cpu 9.836 total

% pacman -Qi clean-chroot-manager
Name            : clean-chroot-manager
Version         : 2.211-2
Description     : Wrapper for managing clean chroot builds with local repo therein.
Architecture    : any
URL             : https://github.com/graysky2/clean-chroot-manager
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : devtools>=20190821-1  rsync  libarchive>=3.3.3  pacman>=5.2
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : clean_chroot_manager
Replaces        : clean_chroot_manager
Installed Size  : 28.41 KiB
Packager        : Bronek Kozicki <[email protected]>
Build Date      : Thu 22 Apr 2021 09:37:25 BST
Install Date    : Thu 22 Apr 2021 09:37:50 BST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : None

% sudo ccm l 
==> Listing out packages in buildroot repo...
total 291M
-rw-r--r-- 1 root root  16K Apr 22 09:37 clean-chroot-manager-2.211-2-any.pkg.tar.zst
-rw-r--r-- 1 root root  16K Apr 22 09:37 clean-chroot-manager-2.215-1-any.pkg.tar.zst
-rw-r--r-- 1 root root  95M Apr 21 20:49 linux-5.11.16-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root  29M Apr 21 20:49 linux-docs-5.11.16-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root  30M Apr 21 20:49 linux-headers-5.11.16-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root  73M Apr 21 22:01 linux-lts-5.10.32-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root  29M Apr 21 22:01 linux-lts-docs-5.10.32-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root  30M Apr 21 22:01 linux-lts-headers-5.10.32-1-x86_64.pkg.tar.zst
-rw-r--r-- 1 root root 8.3M Apr 21 22:27 zfs-utils-2.0.4-1-x86_64.pkg.tar.zst

I think my .config/clean-chroot-manager.conf is sane:

% grep -Ev '^#' /home/bronekk/.config/clean-chroot-manager.conf
CHROOTPATH64=/pkgs/chroot
THREADS=6
PACKAGER="Bronek Kozicki <[email protected]>"
CFLAGS="-march=core2 -mtune=intel -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fdiagnostics-color"
RUNNAMCAP=

I can see it being applied in etc/makepkg.conf under chroot:

% tail makepkg.conf
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'
BUILDDIR=/build
PKGDEST=/pkgdest
SRCPKGDEST=/srcpkgdest
SRCDEST=/srcdest
LOGDEST=/logdest
MAKEFLAGS='-j6'
PACKAGER='Bronek Kozicki <[email protected]>'

The pacman.log under chroot ends with:

[2021-04-22T09:38:28+0100] [PACMAN] Running 'pacman -Syuu --noconfirm'
[2021-04-22T09:38:28+0100] [PACMAN] synchronizing package lists
[2021-04-22T09:38:29+0100] [PACMAN] starting full system upgrade
[2021-04-22T09:38:29+0100] [ALPM] transaction started
[2021-04-22T09:38:29+0100] [ALPM] upgraded libgcrypt (1.9.2-1 -> 1.9.3-1)
[2021-04-22T09:38:29+0100] [ALPM] transaction completed
[2021-04-22T09:38:29+0100] [ALPM] running 'texinfo-install.hook'...
[2021-04-22T09:38:35+0100] [PACMAN] Running '/usr/bin/pacman --noconfirm -S --asdeps kmod zfs-utils=2.0.4 linux=5.11.16-1'
[2021-04-22T09:38:35+0100] [PACMAN] Running '/usr/bin/pacman --noconfirm -S --asdeps linux-headers=5.11.16-1'

@Bronek
Copy link
Author

Bronek commented Apr 22, 2021

I am not using ccm external repo feature (didn't know about it).

@Bronek
Copy link
Author

Bronek commented Apr 24, 2021

I have reproduced this on a second system.

  1. build zfs-utils package and verify
bronekk@czersk ~/pkgs/archzfs/packages/_utils/zfs-utils (git)-[master] % sudo ccm s
. . .
==> Finished making: zfs-utils 2.0.4-1 (Sat 24 Apr 2021 11:48:50 AM BST)                                                                                                                                                                                      
----> Adding all packages in current dir to buildroot repo...                                                                                                                                                                                                 
==> Adding package '/home/bronekk/pkgs/.buildroot/root/repo/zfs-utils-2.0.4-1-x86_64.pkg.tar.zst'                                                                                                                                                             
  -> Computing checksums...                                                                                                                                                                                                                                   
  -> Creating 'desc' db entry...                                                                                                                                                                                                                              
  -> Creating 'files' db entry...                                                                                                                                                                                                                             
==> Creating updated database file '/home/bronekk/pkgs/.buildroot/root/repo/chroot_local.db.tar.gz'                                                                                                                                                           
sudo ccm s  822.97s user 91.09s system 136% cpu 11:10.88 total                                                                                                                                                                                                
bronekk@czersk ~/pkgs/archzfs/packages/_utils/zfs-utils (git)-[master] % cd ../../                                                                                                                                                                            
bronekk@czersk ~/pkgs/archzfs/packages (git)-[master] % sudo ccm l                                                                                                                                                                                            
==> Listing out packages in buildroot repo...                                                                                                                                                                                                                 
total 8.3M                                                                                                                                                                                                                                                    
-rw-r--r-- 1 root root 8.3M Apr 24 11:48 zfs-utils-2.0.4-1-x86_64.pkg.tar.zst    
  1. try to build zfs-linux which depends on zfs-utils as created above
bronekk@czersk ~/pkgs/archzfs/packages (git)-[master] % cd linux/zfs-linux
bronekk@czersk ~/pkgs/archzfs/packages/linux/zfs-linux (git)-[master] % sudo ccm s
----> Attempting to build package...
==> Synchronizing chroot copy [/home/bronekk/pkgs/.buildroot/root] -> [bronekk]...done
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community                                                                                                                     5.5 MiB  6.67 MiB/s 00:01 [##############################################################################################] 100%
:: Starting full system upgrade...
 there is nothing to do
==> Making package: zfs-linux 2.0.4_5.11.16.arch1.1-1 (Sat Apr 24 11:57:49 2021)
==> Retrieving sources...
  -> Downloading zfs-2.0.4.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   141  100   141    0     0    629      0 --:--:-- --:--:-- --:--:--   632
100   618  100   618    0     0   1568      0 --:--:-- --:--:-- --:--:--  1568
100 12.5M  100 12.5M    0     0  5648k      0  0:00:02  0:00:02 --:--:-- 7212k
==> Validating source files with sha256sums...
    zfs-2.0.4.tar.gz ... Passed
==> Making package: zfs-linux 2.0.4_5.11.16.arch1.1-1 (Sat 24 Apr 2021 11:58:01 AM BST)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: zfs-utils=2.0.4
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> kmod
  -> zfs-utils=2.0.4
  -> linux=5.11.16.arch1-1
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (4) libnsl-1.3.0-2  pahole-1.21-1  python-3.9.3-1  linux-headers-5.11.16.arch1-1

Total Download Size:    23.34 MiB
Total Installed Size:  208.89 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 linux-headers-5.11.16.arch1-1-x86_64                                                                                         23.1 MiB  3.91 MiB/s 00:06 [##############################################################################################] 100%
 pahole-1.21-1-x86_64                                                                                                        256.7 KiB   676 KiB/s 00:00 [##############################################################################################] 100%
(4/4) checking keys in keyring                                                                                                                           [##############################################################################################] 100%
(4/4) checking package integrity                                                                                                                         [##############################################################################################] 100%
(4/4) loading package files                                                                                                                              [##############################################################################################] 100%
(4/4) checking for file conflicts                                                                                                                        [##############################################################################################] 100%
(4/4) checking available disk space                                                                                                                      [##############################################################################################] 100%
:: Processing package changes...
(1/4) installing libnsl                                                                                                                                  [##############################################################################################] 100%
(2/4) installing python                                                                                                                                  [##############################################################################################] 100%
Optional dependencies for python
    python-setuptools
    python-pip
    sqlite [installed]
    mpdecimal: for decimal
    xz: for lzma [installed]
    tk: for tkinter
(3/4) installing pahole                                                                                                                                  [##############################################################################################] 100%
(4/4) installing linux-headers                                                                                                                           [##############################################################################################] 100%
==> ERROR: Could not resolve all dependencies.
==> ERROR: Build failed, check /home/bronekk/pkgs/.buildroot/bronekk/build

The pacman.log in the chroot is showing

% tail -12 pacman.log
[2021-04-24T11:38:11+0100] [ALPM] running 'texinfo-install.hook'...
[2021-04-24T11:57:45+0100] [PACMAN] Running 'pacman -Syuu --noconfirm'
[2021-04-24T11:57:45+0100] [PACMAN] synchronizing package lists
[2021-04-24T11:57:46+0100] [PACMAN] starting full system upgrade
[2021-04-24T11:58:01+0100] [PACMAN] Running '/usr/bin/pacman --noconfirm -S --asdeps kmod zfs-utils=2.0.4 linux=5.11.16.arch1-1'
[2021-04-24T11:58:02+0100] [PACMAN] Running '/usr/bin/pacman --noconfirm -S --asdeps linux-headers=5.11.16.arch1-1'
[2021-04-24T11:58:10+0100] [ALPM] transaction started
[2021-04-24T11:58:10+0100] [ALPM] installed libnsl (1.3.0-2)
[2021-04-24T11:58:11+0100] [ALPM] installed python (3.9.3-1)
[2021-04-24T11:58:11+0100] [ALPM] installed pahole (1.21-1)
[2021-04-24T11:58:16+0100] [ALPM] installed linux-headers (5.11.16.arch1-1)
[2021-04-24T11:58:16+0100] [ALPM] transaction completed

@Bronek
Copy link
Author

Bronek commented Apr 24, 2021

I am starting to think this is not a ccm bug. I downgraded to version 2.103 and still see the same error

% sudo ccm s
----> Attempting to build package...  
==> Synchronizing chroot copy [/home/bronekk/pkgs/.buildroot/root] -> [bronekk]...done
:: Synchronizing package databases...                                                                                                                                                                                                                         
 core is up to date                                                                                                                                                                                                                                           
 extra                                                                                                                      1601.3 KiB  7.11 MiB/s 00:00 [##############################################################################################] 100%
 community                                                                                                                     5.5 MiB  3.82 MiB/s 00:01 [##############################################################################################] 100%
:: Starting full system upgrade...                                                                                                                                                                                                                            
 there is nothing to do               
==> Making package: zfs-linux 2.0.4_5.11.16.arch1.1-1 (Sat Apr 24 17:17:50 2021)                                                                                                                                                                              
==> Retrieving sources...                                                                                                                                                                                                                                     
  -> Found zfs-2.0.4.tar.gz        
==> Validating source files with sha256sums...                 
    zfs-2.0.4.tar.gz ... Passed                                                                                                
==> Making package: zfs-linux 2.0.4_5.11.16.arch1.1-1 (Sat 24 Apr 2021 05:18:01 PM BST)
==> Checking runtime dependencies...
==> Installing missing dependencies...                         
error: target not found: zfs-utils=2.0.4
==> ERROR: 'pacman' failed to install missing dependencies.                                                                                                                                                                                                   
==> Missing dependencies:                                                                                                                                                                                                                                     
  -> kmod                                                                                                                                                                                                                                                     
  -> zfs-utils=2.0.4                                                                                                                                                                                                                                          
  -> linux=5.11.16.arch1-1                                                                                                                                                                                                                                    
==> Checking buildtime dependencies...                                                                                                                                                                                                                        
==> Installing missing dependencies...                                                                                                                                                                                                                        
resolving dependencies...                                                                                                                                                                                                                                     
looking for conflicting packages...                                                                                                                                                                                                                           
                                                               
Packages (4) libnsl-1.3.0-2  pahole-1.21-1  python-3.9.3-1  linux-headers-5.11.16.arch1-1
                                                                                                                               
Total Installed Size:  208.89 MiB
                                                                                                                               
:: Proceed with installation? [Y/n] 
(4/4) checking keys in keyring                                                                                                                           [##############################################################################################] 100%
(4/4) checking package integrity                                                                                                                         [##############################################################################################] 100%
(4/4) loading package files                                                                                                                              [##############################################################################################] 100%
(4/4) checking for file conflicts                                                                                                                        [##############################################################################################] 100%
(4/4) checking available disk space                                                                                                                      [##############################################################################################] 100%
:: Processing package changes...                                                                                                                                                                                                                              
(1/4) installing libnsl                                                                                                                                  [##############################################################################################] 100%
(2/4) installing python                                                                                                                                  [##############################################################################################] 100%
Optional dependencies for python                                                                                                                                                                                                                              
    python-setuptools                              
    python-pip                                
    sqlite [installed]                                                                                                         
    mpdecimal: for decimal            
    xz: for lzma [installed]                                                                                                   
    tk: for tkinter   
(3/4) installing pahole                                                                                                                                  [##############################################################################################] 100%
(4/4) installing linux-headers                                                                                                                           [##############################################################################################] 100%
==> ERROR: Could not resolve all dependencies.                                                                                 
==> ERROR: Build failed, check /home/bronekk/pkgs/.buildroot/bronekk/build                                                     
sudo ccm s  23.82s user 7.13s system 98% cpu 31.437 total

% pacman -Qo `which ccm`
/usr/bin/ccm is owned by clean-chroot-manager 2.103-1

@graysky2
Copy link
Owner

No, it's broken.

Here is foo and here is bar.

@Bronek
Copy link
Author

Bronek commented Apr 24, 2021

Yes, and I just found how. Commit 0a2b6e2 , lines 254-258 in common/clean-chroot-manager64.in

@graysky2
Copy link
Owner

@Bronek - Do you mind trying the latest commit and reporting back?

@Bronek
Copy link
Author

Bronek commented Apr 24, 2021

The build ran fine, but at the very end it failed with:

. . .
==> Tidying install...                                                                                                                                                                                                                                        
  -> Removing libtool files...                                                                                                                                                                                                                                
  -> Purging unwanted files...                                                                                                                                                                                                                                
  -> Removing static library files...                                                                                                                                                                                                                         
  -> Stripping unneeded symbols from binaries and libraries...                                                                                                                                                                                                
  -> Compressing man and info pages...                                                                                         
==> Checking for packaging issues...                                                                                           
==> Creating package "zfs-utils"...                                                                                            
  -> Generating .PKGINFO file...                                                                                               
  -> Generating .BUILDINFO file...                                                                                             
  -> Adding install file...                                                                                                    
  -> Generating .MTREE file...                                                                                                 
  -> Compressing package...                                                                                                                                                                                                                                   
==> Leaving fakeroot environment.                                                                                              
==> Finished making: zfs-utils 2.0.4-1 (Sat 24 Apr 2021 08:37:43 PM BST)                                                       
==> ERROR: User bronekk has no write permissions on /home/bronekk/pkgs/.buildroot/bronekk/repo                                 

@graysky2
Copy link
Owner

graysky2 commented Apr 24, 2021

I cannot reproduce this (using the foo and bar PKGBUILDs I linked above). What is the output of

stat /home/bronekk/pkgs/.buildroot/bronekk/repo

@Bronek
Copy link
Author

Bronek commented Apr 24, 2021

Tried building again (without sudo ccm n) and this time it's fine. Not sure how I broke that.

@Bronek
Copy link
Author

Bronek commented Apr 24, 2021

Ok so I did sudo ccm n , added -x to top line in /usr/bin/ccm , then sudo ccm s again and here is that error:

==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "zfs-utils"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Adding install file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: zfs-utils 2.0.4-1 (Sat 24 Apr 2021 09:02:06 PM BST)
++ find . -maxdepth 1 -type f -name '*.pkg.tar*'
+ [[ -n ./zfs-utils-2.0.4-1-x86_64.pkg.tar.zst ]]
+ check_external
+ [[ -n /home/bronekk/pkgs/.buildroot/bronekk/repo ]]
+ REPO=/home/bronekk/pkgs/.buildroot/bronekk/repo
+ sudo -u bronekk -H sh -c '[ ! -w "/home/bronekk/pkgs/.buildroot/bronekk/repo" ]'
+ local 'mesg=User bronekk has no write permissions on /home/bronekk/pkgs/.buildroot/bronekk/repo'
+ echo -e '==> ERROR: User bronekk has no write permissions on /home/bronekk/pkgs/.buildroot/bronekk/repo'
==> ERROR: User bronekk has no write permissions on /home/bronekk/pkgs/.buildroot/bronekk/repo
+ exit 1
sudo ccm s  823.36s user 91.74s system 139% cpu 10:55.57 total
bronekk@czersk ~/pkgs/archzfs/packages/_utils/zfs-utils (git)-[master] % ls -l /home/bronekk/pkgs/.buildroot/bronekk/repo
ls: cannot access '/home/bronekk/pkgs/.buildroot/bronekk/repo': No such file or directory
bronekk@czersk ~/pkgs/archzfs/packages/_utils/zfs-utils (git)-[master] % ls -l /home/bronekk/pkgs/.buildroot/bronekk
total 84
lrwxrwxrwx  1 root    root       7 Jan 19 01:32 bin -> usr/bin
drwxr-xr-x  2 root    root    4096 Jan 19 01:32 boot
drwxr-xr-x  3 bronekk bronekk 4096 Apr 24 20:52 build
-rwxr-xr-x  1 root    root     335 Apr 24 20:52 chrootbuild
drwxr-xr-x  2 root    root    4096 Apr 24 20:51 dev
drwxr-xr-x 19 root    root    4096 Apr 24 20:52 etc
drwxr-xr-x  2 root    root    4096 Jan 19 01:32 home
lrwxrwxrwx  1 root    root       7 Jan 19 01:32 lib -> usr/lib
lrwxrwxrwx  1 root    root       7 Jan 19 01:32 lib64 -> usr/lib
drwxr-xr-x  2 bronekk bronekk 4096 Apr 24 21:02 logdest
drwxr-xr-x  2 root    root    4096 Jan 19 01:32 mnt
drwxr-xr-x  2 root    root    4096 Jan 19 01:32 opt
drwxr-xr-x  2 bronekk bronekk 4096 Apr 24 21:02 pkgdest
dr-xr-xr-x  2 root    root    4096 Apr 24 20:51 proc
drwxr-x---  3 root    root    4096 Apr 24 20:51 root
drwxr-xr-x  2 root    root    4096 Apr 24 20:51 run
lrwxrwxrwx  1 root    root       7 Jan 19 01:32 sbin -> usr/bin
drwxr-xr-x  2 bronekk bronekk 4096 Apr 24 20:52 srcdest
drwxr-xr-x  2 bronekk bronekk 4096 Apr 24 20:52 srcpkgdest
drwxr-xr-x  4 root    root    4096 Apr 24 20:51 srv
drwxr-xr-x  2 bronekk bronekk 4096 Apr 24 20:52 startdir
dr-xr-xr-x  2 root    root    4096 Apr 24 20:51 sys
drwxrwxrwt  2 root    root    4096 Apr 24 20:51 tmp
drwxr-xr-x  9 root    root    4096 Apr 24 20:51 usr
drwxr-xr-x 12 root    root    4096 Apr 24 20:51 var

@Bronek
Copy link
Author

Bronek commented Apr 24, 2021

In contrast, equivalent part in a successful build (i.e. in old chroot) ends like this:

==> Finished making: zfs-utils 2.0.4-1 (Sat 24 Apr 2021 08:48:32 PM BST)
++ find . -maxdepth 1 -type f -name '*.pkg.tar*'
+ [[ -n ./zfs-utils-2.0.4-1-x86_64.pkg.tar.zst ]]
+ check_external
+ [[ -n '' ]]
+ REPO=/home/bronekk/pkgs/.buildroot/bronekk/repo
+ [[ -z '' ]]
+ REPO_NAME=chroot_local
+ indexit
+ [[ ! -d /home/bronekk/pkgs/.buildroot/bronekk/repo ]]
+ mkdir /home/bronekk/pkgs/.buildroot/bronekk/repo
+ local 'mesg=Adding all packages in current dir to buildroot repo...'
+ echo -e '----> Adding all packages in current dir to buildroot repo...'
----> Adding all packages in current dir to buildroot repo...
+ GLOBIGNORE='*namcap.log'
+ for i in *.pkg.tar*
+ cp zfs-utils-2.0.4-1-x86_64.pkg.tar.zst /home/bronekk/pkgs/.buildroot/bronekk/repo
+ repo-add /home/bronekk/pkgs/.buildroot/bronekk/repo/chroot_local.db.tar.gz /home/bronekk/pkgs/.buildroot/bronekk/repo/zfs-utils-2.0.4-1-x86_64.pkg.tar.zst
==> Adding package '/home/bronekk/pkgs/.buildroot/bronekk/repo/zfs-utils-2.0.4-1-x86_64.pkg.tar.zst'
  -> Computing checksums...
  -> Creating 'desc' db entry...
  -> Creating 'files' db entry...
==> Creating updated database file '/home/bronekk/pkgs/.buildroot/bronekk/repo/chroot_local.db.tar.gz'
+ unset GLOBIGNORE
+ return 0
+ syncup
+ grep -q chroot_local /home/bronekk/pkgs/.buildroot/bronekk/etc/pacman.conf
+ sed -i '/\[testing\]/i       # Added by clean-chroot-manager\n[chroot_local]\nSigLevel = Never\nServer = file:///home/bronekk/pkgs/.buildroot/bronekk/repo\n' /home/bronekk/pkgs/.buildroot/bronekk/etc/pacman.conf
+ cp /home/bronekk/pkgs/.buildroot/bronekk/etc/pacman.conf /home/bronekk/pkgs/.buildroot/root/etc/pacman.conf
+ REPO=/home/bronekk/pkgs/.buildroot/bronekk/repo
+ [[ -d /home/bronekk/pkgs/.buildroot/bronekk/repo ]]
+ rsync -ax /home/bronekk/pkgs/.buildroot/bronekk/repo/ /home/bronekk/pkgs/.buildroot/root/repo/

@graysky2
Copy link
Owner

graysky2 commented Apr 24, 2021

++ find . -maxdepth 1 -type f -name '.pkg.tar'

  • [[ -n ./zfs-utils-2.0.4-1-x86_64.pkg.tar.zst ]]
  • check_external

You're not using the latest commit. I just tagged it as v2.216, please try it with that.

https://github.com/graysky2/clean-chroot-manager/archive/refs/tags/v2.216.tar.gz

@Bronek
Copy link
Author

Bronek commented Apr 24, 2021

@graysky2 thank you - this version is working well. Thank you for prompt fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants