Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

kiss aborts during checksum verification when it shouldn't #248

Closed
1 task done
dilyn-corner opened this issue Jul 24, 2021 · 9 comments
Closed
1 task done

kiss aborts during checksum verification when it shouldn't #248

dilyn-corner opened this issue Jul 24, 2021 · 9 comments

Comments

@dilyn-corner
Copy link
Contributor

  • Does this issue occur in master?

Description

Packages which have git+* sources don't have checksums, but kiss will abort during the checksum check. However, this ONLY seems to happen in cases where that package 1) has a dependency that isn't already built or installed, and 2) has a source which requires no checksum.

All of this is done in a fresh chroot, where kiss is latest master.

Error message

~ # kiss b vim
-> Building: explicit: vim, implicit: ncurses 
-> Continue?: Press Enter to continue or Ctrl+C to abort 

-> Checking for pre-built dependencies 
-> ncurses Reading sources
found /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
found /root/repo/extra/ncurses/files/terminfo.src
-> ncurses Verifying sources
- 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
+ 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
- 06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0
+ 06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0
-> vim Reading sources
found git+https://github.com/vim/vim
-> vim Verifying sources
/root/kiss/kiss: line 1048: can't open /root/repo/extra/vim/checksums: no such file

Verbose log

+ main b vim
+ set -ef
+ equ  0
+ return 1
+ '[' -t 2 ]
+ ppwd=/root
+ newline='
'
+ : gz
+ : 25719
+ : root
+ command -v ssu
+ command -v sudo
+ command -v doas
+ command -v su
+ cmd_su=/bin/su
+ command -v readelf
+ cmd_elf=/bin/readelf
+ command -v openssl
+ cmd_sha=/bin/openssl
+ command -v aria2c
+ command -v axel
+ command -v curl
+ cmd_get=/bin/curl
+ date '+%Y-%m-%d-%H:%M'
+ time=2021-07-24-17:35
+ create_tmp_dirs
+ KISS_ROOT=
+ mkdir -p /
+ sys_db=/var/db/kiss/installed
+ sys_ch=/var/db/kiss/choices
+ cac_dir=/root/.cache
+ cac_dir=/root/.cache/kiss
+ src_dir=/root/.cache/kiss/sources
+ log_dir=/root/.cache/kiss/logs/2021-07-24
+ bin_dir=/root/.cache/kiss/bin
+ proc=/root/.cache/kiss/proc
+ proc=/root/.cache/kiss/proc/25719
+ mak_dir=/root/.cache/kiss/proc/25719/build
+ pkg_dir=/root/.cache/kiss/proc/25719/pkg
+ tar_dir=/root/.cache/kiss/proc/25719/extract
+ tmp_dir=/root/.cache/kiss/proc/25719/tmp
+ mkdir -p /root/.cache/kiss/sources /root/.cache/kiss/logs/2021-07-24 /root/.cache/kiss/bin /root/.cache/kiss/proc/25719/build /root/.cache/kiss/proc/25719/pkg /root/.cache/kiss/proc/25719/extract /root/.cache/kiss/proc/25719/tmp
+ trap pkg_clean EXIT INT
+ args b vim
+ action=b
+ shift 1
+ pkg_order vim
+ unset order redro deps
+ pkg_depends vim raw
+ contains  vim
+ return 1
+ null 
+ return 0
+ _pkg_find vim
+ set -- vim   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community:
+ IFS=:
+ set +f
+ test -d /root/repo/repo/vim
+ set +f
+ test -d /root/repo/extra/vim
+ set -f -- vim   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community: /root/repo/extra/vim
+ set +f
+ test -d /root/repo/wayland/vim
+ set +f
+ test -d /root/community/community/vim
+ set +f
+ test -d /var/db/kiss/installed/vim
+ unset IFS
+ repo_dir=/root/repo/extra/vim repo_name=vim
+ '[' -e /root/repo/extra/vim/depends ]
+ read -r dep dep_type
+ ok ncurses
+ return 0
+ pkg_depends ncurses   ' vim' 
+ contains  ncurses
+ return 1
+ null 
+ return 0
+ _pkg_find ncurses
+ set -- ncurses   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community:
+ IFS=:
+ set +f
+ test -d /root/repo/repo/ncurses
+ set +f
+ test -d /root/repo/extra/ncurses
+ set -f -- ncurses   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community: /root/repo/extra/ncurses
+ set +f
+ test -d /root/repo/wayland/ncurses
+ set +f
+ test -d /root/community/community/ncurses
+ set +f
+ test -d /var/db/kiss/installed/ncurses
+ unset IFS
+ repo_dir=/root/repo/extra/ncurses repo_name=ncurses
+ '[' -e /root/repo/extra/ncurses/depends ]
+ equ  expl
+ return 1
+ deps=' ncurses'
+ read -r dep dep_type
+ ok 
+ return 1
+ equ raw expl
+ return 1
+ deps=' ncurses vim'
+ order=' vim'
+ redro='vim '
+ unset deps
+ set -- vim
+ export '_KISS_LVL=1'
+ pkg_build_all vim
+ pkg_depends vim expl filter
+ contains  vim
+ return 1
+ null filter
+ return 1
+ ok expl
+ return 0
+ _pkg_find vim
+ set -- vim   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community:
+ IFS=:
+ set +f
+ test -d /root/repo/repo/vim
+ set +f
+ test -d /root/repo/extra/vim
+ set -f -- vim   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community: /root/repo/extra/vim
+ set +f
+ test -d /root/repo/wayland/vim
+ set +f
+ test -d /root/community/community/vim
+ set +f
+ test -d /var/db/kiss/installed/vim
+ unset IFS
+ repo_dir=/root/repo/extra/vim repo_name=vim
+ '[' -e /root/repo/extra/vim/depends ]
+ read -r dep dep_type
+ ok ncurses
+ return 0
+ pkg_depends ncurses  filter ' vim' 
+ contains  ncurses
+ return 1
+ null filter
+ return 1
+ ok 
+ return 1
+ contains  ncurses
+ return 1
+ '[' -d /var/db/kiss/installed/ncurses ]
+ _pkg_find ncurses
+ set -- ncurses   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community:
+ IFS=:
+ set +f
+ test -d /root/repo/repo/ncurses
+ set +f
+ test -d /root/repo/extra/ncurses
+ set -f -- ncurses   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community: /root/repo/extra/ncurses
+ set +f
+ test -d /root/repo/wayland/ncurses
+ set +f
+ test -d /root/community/community/ncurses
+ set +f
+ test -d /var/db/kiss/installed/ncurses
+ unset IFS
+ repo_dir=/root/repo/extra/ncurses repo_name=ncurses
+ '[' -e /root/repo/extra/ncurses/depends ]
+ equ  expl
+ return 1
+ deps=' ncurses'
+ read -r dep dep_type
+ ok 
+ return 1
+ equ expl expl
+ return 0
+ equ  make
+ return 1
+ explicit=' vim '
+ ok 
+ return 1
+ explicit_build=' vim '
+ set --
+ contains ' ncurses' vim
+ return 1
+ set -- vim
+ explicit_cnt=1
+ explicit=vim
+ log 'Building: explicit: vim, implicit: ncurses'
+ printf '%b%s %b%s%b %s\n'  '->'  'Building: explicit: vim, implicit: ncurses'  
-> Building: explicit: vim, implicit: ncurses 
+ set -- ncurses vim
+ equ 2 1
+ return 1
+ prompt
+ null 
+ return 0
+ log 'Continue?: Press Enter to continue or Ctrl+C to abort'
+ printf '%b%s %b%s%b %s\n'  '->'  'Continue?: Press Enter to continue or Ctrl+C to abort'  
-> Continue?: Press Enter to continue or Ctrl+C to abort 
+ equ 0 0
+ return 0
+ log 'Checking for pre-built dependencies'
+ printf '%b%s %b%s%b %s\n'  '->'  'Checking for pre-built dependencies'  
-> Checking for pre-built dependencies 
+ contains ' vim ' ncurses
+ return 1
+ pkg_cache ncurses
+ pkg_find_version ncurses
+ ver_pre=
+ rel_pre=
+ pkg_find ncurses
+ _pkg_find ncurses
+ set -- ncurses   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community:
+ IFS=:
+ set +f
+ test -d /root/repo/repo/ncurses
+ set +f
+ test -d /root/repo/extra/ncurses
+ set -f -- ncurses   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community: /root/repo/extra/ncurses
+ set +f
+ test -d /root/repo/wayland/ncurses
+ set +f
+ test -d /root/community/community/ncurses
+ set +f
+ test -d /var/db/kiss/installed/ncurses
+ unset IFS
+ repo_dir=/root/repo/extra/ncurses repo_name=ncurses
+ read -r repo_ver repo_rel
+ ok 5
+ return 0
+ '[' -x /root/repo/extra/ncurses/build ]
+ set +f -- /root/.cache/kiss/bin/ncurses@6.2-5.tar.
+ set -f -- /root/.cache/kiss/bin/ncurses@6.2-5.tar.gz '/root/.cache/kiss/bin/ncurses@6.2-5.tar.*'
+ tar_file=/root/.cache/kiss/bin/ncurses@6.2-5.tar.gz
+ '[' -f /root/.cache/kiss/bin/ncurses@6.2-5.tar.gz ]
+ tar_file='/root/.cache/kiss/bin/ncurses@6.2-5.tar.*'
+ '[' -f '/root/.cache/kiss/bin/ncurses@6.2-5.tar.*' ]
+ set -- ncurses vim ncurses
+ shift
+ contains ' vim ' vim
+ return 0
+ set -- vim ncurses vim
+ shift
+ pkg_source ncurses
+ pkg_find_version_split ncurses
+ pkg_find_version ncurses
+ ver_pre=6.2
+ rel_pre=5
+ pkg_find ncurses
+ _pkg_find ncurses
+ set -- ncurses   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community:
+ IFS=:
+ set +f
+ test -d /root/repo/repo/ncurses
+ set +f
+ test -d /root/repo/extra/ncurses
+ set -f -- ncurses   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community: /root/repo/extra/ncurses
+ set +f
+ test -d /root/repo/wayland/ncurses
+ set +f
+ test -d /root/community/community/ncurses
+ set +f
+ test -d /var/db/kiss/installed/ncurses
+ unset IFS
+ repo_dir=/root/repo/extra/ncurses repo_name=ncurses
+ read -r repo_ver repo_rel
+ ok 5
+ return 0
+ '[' -x /root/repo/extra/ncurses/build ]
+ IFS=.+-_ read -r repo_major repo_minor repo_patch repo_ident
+ '[' -f /root/repo/extra/ncurses/sources ]
+ log ncurses 'Reading sources'
+ printf '%b%s %b%s%b %s\n'  '->'  ncurses  'Reading sources'
-> ncurses Reading sources
+ read -r src dest
+ pkg_source_resolve ncurses https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz  
+ ok https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz
+ return 0
+ unset _des
+ fnr https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz '\VERSION' ' ' VERSION 6.2 ' ' VERSION '\RELEASE' ' ' RELEASE 5 ' ' RELEASE '\MAJOR' ' ' MAJOR 6 ' ' MAJOR '\MINOR' ' ' MINOR 2 ' ' MINOR '\PATCH' ' ' PATCH  ' ' PATCH '\IDENT' ' ' IDENT  ' ' IDENT '\PACKAGE' ' ' PACKAGE ncurses ' ' PACKAGE
+ _fnr=https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz
+ shift 1
+ :
+ shift 2
+ :
+ _fnr=https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ break
+ set -- ncurses https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz  
+ null https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz
+ return 1
+ '[' -f /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz ]
+ _res=/root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
+ ok 
+ return 1
+ printf 'found %s\n' /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
found /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
+ run_hook pre-source ncurses https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz
+ IFS=:
+ unset IFS
+ run_hook post-source ncurses https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
+ IFS=:
+ unset IFS
+ read -r src dest
+ pkg_source_resolve ncurses files/terminfo.src misc 
+ ok files/terminfo.src
+ return 0
+ unset _des
+ fnr files/terminfo.src '\VERSION' ' ' VERSION 6.2 ' ' VERSION '\RELEASE' ' ' RELEASE 5 ' ' RELEASE '\MAJOR' ' ' MAJOR 6 ' ' MAJOR '\MINOR' ' ' MINOR 2 ' ' MINOR '\PATCH' ' ' PATCH  ' ' PATCH '\IDENT' ' ' IDENT  ' ' IDENT '\PACKAGE' ' ' PACKAGE ncurses ' ' PACKAGE
+ _fnr=files/terminfo.src
+ shift 1
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ break
+ set -- ncurses files/terminfo.src misc 
+ null files/terminfo.src
+ return 1
+ '[' -f /root/.cache/kiss/sources/ncurses/misc/terminfo.src ]
+ null files/terminfo.src
+ return 1
+ '[' -d /root/repo/extra/ncurses/files/terminfo.src ]
+ '[' -d /files/terminfo.src ]
+ '[' -f /root/repo/extra/ncurses/files/terminfo.src ]
+ _res=/root/repo/extra/ncurses/files/terminfo.src
+ ok 
+ return 1
+ printf 'found %s\n' /root/repo/extra/ncurses/files/terminfo.src
found /root/repo/extra/ncurses/files/terminfo.src
+ run_hook pre-source ncurses files/terminfo.src files/terminfo.src
+ IFS=:
+ unset IFS
+ run_hook post-source ncurses files/terminfo.src /root/repo/extra/ncurses/files/terminfo.src
+ IFS=:
+ unset IFS
+ read -r src dest
+ ok 
+ return 1
+ '[' -f /root/repo/extra/ncurses/sources ]
+ pkg_verify ncurses
+ log ncurses 'Verifying sources'
+ printf '%b%s %b%s%b %s\n'  '->'  ncurses  'Verifying sources'
-> ncurses Verifying sources
+ pkg_checksums
+ read -r src dest
+ pkg_source_resolve ncurses https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz 
+ ok https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz
+ return 0
+ unset _des
+ fnr https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz '\VERSION' ' ' VERSION 6.2 ' ' VERSION '\RELEASE' ' ' RELEASE 5 ' ' RELEASE '\MAJOR' ' ' MAJOR 6 ' ' MAJOR '\MINOR' ' ' MINOR 2 ' ' MINOR '\PATCH' ' ' PATCH  ' ' PATCH '\IDENT' ' ' IDENT  ' ' IDENT '\PACKAGE' ' ' PACKAGE ncurses ' ' PACKAGE
+ _fnr=https://ftp.gnu.org/gnu/ncurses/ncurses-VERSION.tar.gz
+ shift 1
+ :
+ shift 2
+ :
+ _fnr=https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ break
+ set -- ncurses https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz  
+ null https://ftp.gnu.org/gnu/ncurses/ncurses-6.2.tar.gz
+ return 1
+ '[' -f /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz ]
+ _res=/root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
+ ok 
+ return 1
+ printf 'found %s\n' /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
+ set -- /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
+ read -r src dest
+ pkg_source_resolve ncurses files/terminfo.src misc
+ ok files/terminfo.src
+ return 0
+ unset _des
+ fnr files/terminfo.src '\VERSION' ' ' VERSION 6.2 ' ' VERSION '\RELEASE' ' ' RELEASE 5 ' ' RELEASE '\MAJOR' ' ' MAJOR 6 ' ' MAJOR '\MINOR' ' ' MINOR 2 ' ' MINOR '\PATCH' ' ' PATCH  ' ' PATCH '\IDENT' ' ' IDENT  ' ' IDENT '\PACKAGE' ' ' PACKAGE ncurses ' ' PACKAGE
+ _fnr=files/terminfo.src
+ shift 1
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ break
+ set -- ncurses files/terminfo.src misc 
+ null files/terminfo.src
+ return 1
+ '[' -f /root/.cache/kiss/sources/ncurses/misc/terminfo.src ]
+ null files/terminfo.src
+ return 1
+ '[' -d /root/repo/extra/ncurses/files/terminfo.src ]
+ '[' -d /files/terminfo.src ]
+ '[' -f /root/repo/extra/ncurses/files/terminfo.src ]
+ _res=/root/repo/extra/ncurses/files/terminfo.src
+ ok 
+ return 1
+ printf 'found %s\n' /root/repo/extra/ncurses/files/terminfo.src
+ set -- /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz /root/repo/extra/ncurses/files/terminfo.src
+ read -r src dest
+ ok 
+ return 1
+ _sh256 /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz /root/repo/extra/ncurses/files/terminfo.src
+ unset hash
+ set -- dgst -sha256 -r /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz /root/repo/extra/ncurses/files/terminfo.src
+ IFS='
'
+ /bin/openssl dgst -sha256 -r /root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz /root/repo/extra/ncurses/files/terminfo.src
+ _hash='30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d */root/.cache/kiss/sources/ncurses/ncurses-6.2.tar.gz
06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0 */root/repo/extra/ncurses/files/terminfo.src'
+ hash=30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
+ hash='30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0'
+ printf '%s\n' '30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0'
+ unset IFS
+ return 0
+ set -- 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d 06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0
+ null 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
+ return 1
+ read -r chk _
+ printf '%s\n%s\n' '- 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d' '+ 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d'
- 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
+ 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
+ shift 1
+ read -r chk _
+ printf '%s\n%s\n' '- 06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0' '+ 06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0'
- 06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0
+ 06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0
+ shift 1
+ read -r chk _
+ ok 
+ return 1
+ pkg_source vim
+ pkg_find_version_split vim
+ pkg_find_version vim
+ ver_pre=6.2
+ rel_pre=5
+ pkg_find vim
+ _pkg_find vim
+ set -- vim   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community:
+ IFS=:
+ set +f
+ test -d /root/repo/repo/vim
+ set +f
+ test -d /root/repo/extra/vim
+ set -f -- vim   /root/repo/repo:/root/repo/extra:/root/repo/wayland:/root/community/community: /root/repo/extra/vim
+ set +f
+ test -d /root/repo/wayland/vim
+ set +f
+ test -d /root/community/community/vim
+ set +f
+ test -d /var/db/kiss/installed/vim
+ unset IFS
+ repo_dir=/root/repo/extra/vim repo_name=vim
+ read -r repo_ver repo_rel
+ ok 1
+ return 0
+ '[' -x /root/repo/extra/vim/build ]
+ IFS=.+-_ read -r repo_major repo_minor repo_patch repo_ident
+ '[' -f /root/repo/extra/vim/sources ]
+ log vim 'Reading sources'
+ printf '%b%s %b%s%b %s\n'  '->'  vim  'Reading sources'
-> vim Reading sources
+ read -r src dest
+ pkg_source_resolve vim git+https://github.com/vim/vim  
+ ok git+https://github.com/vim/vim
+ return 0
+ unset _des
+ fnr git+https://github.com/vim/vim '\VERSION' ' ' VERSION git ' ' VERSION '\RELEASE' ' ' RELEASE 1 ' ' RELEASE '\MAJOR' ' ' MAJOR git ' ' MAJOR '\MINOR' ' ' MINOR  ' ' MINOR '\PATCH' ' ' PATCH  ' ' PATCH '\IDENT' ' ' IDENT  ' ' IDENT '\PACKAGE' ' ' PACKAGE vim ' ' PACKAGE
+ _fnr=git+https://github.com/vim/vim
+ shift 1
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ break
+ set -- vim git+https://github.com/vim/vim  
+ null 
+ return 0
+ _res=git+https://github.com/vim/vim
+ ok 
+ return 1
+ printf 'found %s\n' git+https://github.com/vim/vim
found git+https://github.com/vim/vim
+ run_hook pre-source vim git+https://github.com/vim/vim git+https://github.com/vim/vim
+ IFS=:
+ unset IFS
+ run_hook post-source vim git+https://github.com/vim/vim git+https://github.com/vim/vim
+ IFS=:
+ unset IFS
+ read -r src dest
+ ok 
+ return 1
+ '[' -f /root/repo/extra/vim/sources ]
+ pkg_verify vim
+ log vim 'Verifying sources'
+ printf '%b%s %b%s%b %s\n'  '->'  vim  'Verifying sources'
-> vim Verifying sources
+ pkg_checksums
+ read -r src dest
+ pkg_source_resolve vim git+https://github.com/vim/vim 
+ ok git+https://github.com/vim/vim
+ return 0
+ unset _des
+ fnr git+https://github.com/vim/vim '\VERSION' ' ' VERSION git ' ' VERSION '\RELEASE' ' ' RELEASE 1 ' ' RELEASE '\MAJOR' ' ' MAJOR git ' ' MAJOR '\MINOR' ' ' MINOR  ' ' MINOR '\PATCH' ' ' PATCH  ' ' PATCH '\IDENT' ' ' IDENT  ' ' IDENT '\PACKAGE' ' ' PACKAGE vim ' ' PACKAGE
+ _fnr=git+https://github.com/vim/vim
+ shift 1
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ shift 2
+ :
+ break
+ set -- vim git+https://github.com/vim/vim  
+ null 
+ return 0
+ _res=git+https://github.com/vim/vim
+ ok 
+ return 1
+ printf 'found %s\n' git+https://github.com/vim/vim
+ read -r src dest
+ ok 
+ return 1
+ set -- 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d 06cd04c8d309e3a3a3bd2837ad84a262ef8e7e0fdbed6f3a4f6081ca74dc04f0
+ null 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
+ return 1
/root/kiss/kiss: line 1048: can't open /root/repo/extra/vim/checksums: no such file
+ pkg_clean
+ rm -rf /root/.cache/kiss/proc/25719

If I do kiss b ncurses and install ncurses first, the build for vim proceeds as normal.

@dylanaraps
Copy link
Member

I can reproduce. On it.

@dylanaraps
Copy link
Member

Fixed. Thanks for your continued reports.

Let me know if the issue still occurs, I can no longer reproduce.

(Issue was $hash not being reset between invocations of the sh256 functions)

@dilyn-corner
Copy link
Contributor Author

Is indeed resolved now, thank you sir!

@dylanaraps
Copy link
Member

dylanaraps commented Jul 24, 2021

Will push a release shortly.

While I have you, what do you think of this (related to #224)?

  • Update hooks now fire in non-Git repositories so users are able to implement
    custom retrieval methods themselves to support whatever they like.
  • Repositories can provide their own hooks to perform remote retrieval.
    • (rsync, zclone, fossil, wget/untar, etc)
  • When users install the repository they have the choice to enable the repository's hook by adding it to their KISS_HOOK.
    • This gives a chance to inspect the hook and prevents the hook from being executed
      just by its mere existence (like the old method we both ended up removing).
    • Without the hook users can just manually run fossil pull; fossil update or rsync ... for example. It's up to them.
  • The hook runs on pre-update, does a simple test (cmp -s "$0" "${0##*/}") (Is the current hook identical to the current repository's hook?) If they are identical, proceed else exit.
  • Hook then runs its own retrieval code and exits.
  • User runs kiss u and everything just works.

@dylanaraps
Copy link
Member

(This is not really a proposal as the mere change to execute hooks in non-Git repositories makes this possible.) Just letting you know this is now a "feature" I guess? 😆

@dilyn-corner
Copy link
Contributor Author

dilyn-corner commented Jul 24, 2021

Update hooks now fire in non-Git repositories so users are able to implement
custom retrieval methods themselves to support whatever they like.
Repositories can provide their own hooks to perform remote retrieval.
(rsync, zclone, fossil, wget/untar, etc)

I love the idea of this -- part of my interest in this (kiss-community@e04b26d) change was so that kiss wouldn't have to listen to every 'add support for $hypeproject' request and it would instead be on the user (or in this particular case, the maintainer) to be smart about the implementation they choose. It's more in-line with the KISS style IMO.
This does of course bring up the question: what happens to git support embedded in kiss? I don't see a particular reason to privilege one repository retrieval method over another if the possibility of an update-hook setting that for us exists. I'm not opposed to the idea of leaving git support within kiss itself, but it does become slightly redundant.

This gives a chance to inspect the hook and prevents the hook from being executed
just by its mere existence (like the old method we both ended up removing).

Very important. It also means that users aren't forced to stay inline with the repository maintainer just to do updates (though you did allow this in dfd000e which I love).

I think this change is a Good Idea(tm); it's not really burdensome on users - there's... a single extra step for repository maintainers (which they have to do probably just once, if at all), and the requirement for a user is basically equivalent to them checking out the repository in the first place. There's a small amount of friction there, though; perhaps the hook should be enabled by default, or a prompt for users to inspect the hook (print it to stdout?), possibly the prompt is [Y/n] to enable/disable the hook, and whenever the hook is updated the prompt reappears? This removes any friction for users and is... roughly fool-proof? This of course only makes sense if the hook is bundled with the repo itself.

@dylanaraps
Copy link
Member

This does of course bring up the question: what happens to git support embedded in kiss? I don't see a particular reason to privilege one repository retrieval method over another if the possibility of an update-hook setting that for us exists. I'm not opposed to the idea of leaving git support within kiss itself, but it does become slightly redundant.

This is what it looks like: #251

There's a small amount of friction there, though; perhaps the hook should be enabled by default, or a prompt for users to inspect the hook (print it to stdout?), possibly the prompt is [Y/n] to enable/disable the hook, and whenever the hook is updated the prompt reappears?

The idea behind utilizing KISS_HOOK is that the repository maintainer can name it (and store it) wherever they like. The other queries are in a similar vain to showing a prompt to inspect build files (which we don't do: ie, it's up to the user).

The package manager doesn't store any kind of persistent state (only downloaded package sources and built binaries) so there's
no way for it to know between invocations that a hook file has been inspected.

Anyway... will tinker with this and come up with some kind of one-step process (though I quite like the two-step process regardless).

@jedahan
Copy link

jedahan commented Jul 25, 2021

So I made a pull request for my repos repo to use the new hook system, and had a few questions:

  1. Is this kind of thing how you intend it to work?
  2. With the non-sources hooks-style, does the source /etc/profile line in post-install actually do anything, or is there some sort of exec magic I can do to make it so users don't have to open a new shell after kiss install kiss-repo-jedahan to have their KISS_PATH working?
  3. Any other suggestions?

As far as 'one step process' I think this should work, though I need to test it this week.

@jedahan
Copy link

jedahan commented Jul 25, 2021

This does of course bring up the question: what happens to git support embedded in kiss? I don't see a particular reason to privilege one repository retrieval method over another if the possibility of an update-hook setting that for us exists. I'm not opposed to the idea of leaving git support within kiss itself, but it does become slightly redundant.

This is what it looks like: #251

There's a small amount of friction there, though; perhaps the hook should be enabled by default, or a prompt for users to inspect the hook (print it to stdout?), possibly the prompt is [Y/n] to enable/disable the hook, and whenever the hook is updated the prompt reappears?

The idea behind utilizing KISS_HOOK is that the repository maintainer can name it (and store it) wherever they like. The other queries are in a similar vain to showing a prompt to inspect build files (which we don't do: ie, it's up to the user).

The package manager doesn't store any kind of persistent state (only downloaded package sources and built binaries) so there's
no way for it to know between invocations that a hook file has been inspected.

Anyway... will tinker with this and come up with some kind of one-step process (though I quite like the two-step process regardless).

Please correct me if I am misunderstanding, but I don't think the package manager needs to do anything special regarding tracking state for hooks compared to any other package. If we package hooks, then we can use all the facilities we have for managing system state for free.

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

No branches or pull requests

3 participants