···642642 };
643643644644 scriptArgs = "%i";
645645- path = [ pkgs.gawk cfgZfs.package ];
645645+ path = [ cfgZfs.package ];
646646647647- # ZFS has no way of enumerating just devices in a pool in a way
648648- # that 'zpool online -e' supports. Thus, we've implemented a
649649- # bit of a strange approach of highlighting just devices.
650650- # See: https://github.com/openzfs/zfs/issues/12505
651651- script = let
652652- # This UUID has been chosen at random and is to provide a
653653- # collision-proof, predictable token to search for
654654- magicIdentifier = "NIXOS-ZFS-ZPOOL-DEVICE-IDENTIFIER-37108bec-aff6-4b58-9e5e-53c7c9766f05";
655655- zpoolScripts = pkgs.writeShellScriptBin "device-highlighter" ''
656656- echo "${magicIdentifier}"
657657- '';
658658- in ''
647647+ script = ''
659648 pool=$1
660649661650 echo "Expanding all devices for $pool."
662651663663- # Put our device-highlighter script it to the PATH
664664- export ZPOOL_SCRIPTS_PATH=${zpoolScripts}/bin
665665-666666- # Enable running our precisely specified zpool script as root
667667- export ZPOOL_SCRIPTS_AS_ROOT=1
668668-669669- devices() (
670670- zpool status -c device-highlighter "$pool" \
671671- | awk '($2 == "ONLINE" && $6 == "${magicIdentifier}") { print $1; }'
672672- )
673673-674674- for device in $(devices); do
675675- echo "Attempting to expand $device of $pool..."
676676- if ! zpool online -e "$pool" "$device"; then
677677- echo "Failed to expand '$device' of '$pool'."
678678- fi
679679- done
652652+ ${pkgs.zpool-auto-expand-partitions}/bin/zpool_part_disks --automatically-grow "$pool"
680653 '';
681654 };
682655···700673 Type = "oneshot";
701674 RemainAfterExit = true;
702675 };
703703-704704- path = [ pkgs.gawk cfgZfs.package ];
705676706677 script = ''
707678 for pool in ${poolListProvider}; do
···181181 # some files, like Pipfile, pyproject.toml, requirements.txt and setup.cfg
182182 # are generated by the bootstrap script using m4. these can fetch data from
183183 # build/pkgs, either directly or via sage-get-system-packages.
184184- sed -i 's/==2.1.0rc1/>=2.1.1/' ../gmpy2/install-requires.txt
185185- sed -i 's/, <3.4//' ../rpy2/install-requires.txt
186186- sed -i 's/, <4.3//' ../sphinx/install-requires.txt
187184 sed -i '/sage_conf/d' src/setup.cfg.m4
188185 sed -i '/sage_conf/d' src/requirements.txt.m4
186186+187187+ # version lower bounds are useful, but upper bounds are a hassle because
188188+ # Sage tests already catch any relevant API breakage.
189189+ # according to the discussion at https://trac.sagemath.org/ticket/33520,
190190+ # upper bounds will be less noisy starting from Sage 9.6.
191191+ sed -i 's/==2.1.0rc1/>=2.1.1/' ../gmpy2/install-requires.txt
192192+ sed -i 's/, <[^, ]*//' ../*/install-requires.txt
193193+189194 for infile in src/*.m4; do
190195 if [ -f "$infile" ]; then
191196 outfile="src/$(basename $infile .m4)"