@@ -651,17 +651,6 @@ jobs:
651651 *-pc-windows-msvc) STRIP="" ;;
652652 esac;
653653 outputs STRIP
654- - name : Install/setup prerequisites
655- shell : bash
656- run : |
657- ## Install/setup prerequisites
658- case '${{ matrix.job.target }}' in
659- arm-unknown-linux-gnueabihf) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
660- aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
661- esac
662- case '${{ matrix.job.os }}' in
663- macos-latest) brew install coreutils ;; # needed for testing
664- esac
665654 - name : Create all needed build/work directories
666655 shell : bash
667656 run : |
@@ -680,6 +669,21 @@ jobs:
680669 case '${{ matrix.job.os }}' in
681670 macos-latest) brew install coreutils ;; # needed for testing
682671 esac
672+ case '${{ matrix.job.os }}' in
673+ ubuntu-*)
674+ # pinky is a tool to show logged-in users from utmp, and gecos fields from /etc/passwd.
675+ # In GitHub Action *nix VMs, no accounts log in, even the "runner" account that runs the commands. The account also has empty gecos fields.
676+ # To work around this for pinky tests, we create a fake login entry for the GH runner account...
677+ FAKE_UTMP='[7] [999999] [tty2] [runner] [tty2] [] [0.0.0.0] [2022-02-22T22:22:22,222222+00:00]'
678+ # ... by dumping the login records, adding our fake line, then reverse dumping ...
679+ (utmpdump /var/run/utmp ; echo $FAKE_UTMP) | sudo utmpdump -r -o /var/run/utmp
680+ # ... and add a full name to each account with a gecos field but no full name.
681+ sudo sed -i 's/:,/:runner name,/' /etc/passwd
682+ # We also create a couple optional files pinky looks for
683+ touch /home/runner/.project
684+ echo "foo" > /home/runner/.plan
685+ ;;
686+ esac
683687 - name : rust toolchain ~ install
684688 uses : actions-rs/toolchain@v1
685689 with :
@@ -949,6 +953,21 @@ jobs:
949953 case '${{ matrix.job.os }}' in
950954 macos-latest) brew install coreutils ;; # needed for testing
951955 esac
956+ case '${{ matrix.job.os }}' in
957+ ubuntu-latest)
958+ # pinky is a tool to show logged-in users from utmp, and gecos fields from /etc/passwd.
959+ # In GitHub Action *nix VMs, no accounts log in, even the "runner" account that runs the commands. The account also has empty gecos fields.
960+ # To work around this for pinky tests, we create a fake login entry for the GH runner account...
961+ FAKE_UTMP='[7] [999999] [tty2] [runner] [tty2] [] [0.0.0.0] [2022-02-22T22:22:22,222222+00:00]'
962+ # ... by dumping the login records, adding our fake line, then reverse dumping ...
963+ (utmpdump /var/run/utmp ; echo $FAKE_UTMP) | sudo utmpdump -r -o /var/run/utmp
964+ # ... and add a full name to each account with a gecos field but no full name.
965+ sudo sed -i 's/:,/:runner name,/' /etc/passwd
966+ # We also create a couple optional files pinky looks for
967+ touch /home/runner/.project
968+ echo "foo" > /home/runner/.plan
969+ ;;
970+ esac
952971 - name : rust toolchain ~ install
953972 uses : actions-rs/toolchain@v1
954973 with :
0 commit comments