difftreelog
feat better logs
in: trunk
18 files changed
Cargo.lockdiffbeforeafterboth177 packageslockfile v3
Might be heavy and slow!
aead
0.3.2crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331depends onused byaes
0.6.0crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561depends onused byaes-ctr
0.6.0crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7729c3cde54d67063be556aeac75a81330d802f0259500ca40cb52967f975763used byaes-soft
0.6.4crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbe14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072depends onused byaesni
0.10.0crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0cedepends onused byage
0.6.0crates.io↘ 28↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum16d68559c3ef40bc0fd7c3d2b156743e9387d477a68733b61dff0f6a5004ad58depends on- aes
0.6.0 - aes-ctr
0.6.0 - age-core
0.6.0 - base64
0.13.0 - bcrypt-pbkdf
0.6.2 - bech32
0.8.1 - block-modes
0.7.0 - c2-chacha
0.3.1 - chacha20poly1305
0.7.1 - cookie-factory
0.3.2 - curve25519-dalek
3.2.0 - hkdf
0.11.0 - hmac
0.11.0 - i18n-embed
0.12.1 - i18n-embed-fl
0.5.0 - lazy_static
1.4.0 - nom
6.2.1 - num-traits
0.2.14 - pin-project
1.0.8 - rand
0.7.3 - rsa
0.3.0 - rust-embed
5.9.0 - scrypt
0.7.0 - secrecy
0.7.0 - sha2
0.9.5 - subtle
2.4.0 - x25519-dalek
1.2.0 - zeroize
1.3.0
- aes
age-core
0.6.0crates.io↘ 9↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumad65fc4325804de2e915f5a50dda38218ed49f97e1270750acef9ff8bb67ac36depends onused byaho-corasick
0.7.14crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb476ce7103678b0c6d3d395dbbae31d48ff910bd28be979ba5d48c6351131d0ddepends onused byansi_term
0.11.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979bdepends onused byanyhow
1.0.44crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1atty
0.2.14crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8depends onused byautocfg
0.1.7crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2used byautocfg
1.0.1crates.io↘ 0↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464abase64
0.13.0crates.io↘ 0↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fdbcrypt-pbkdf
0.6.2crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7c38c03b9506bd92bf1ef50665a81eda156f615438f7654bffba58907e6149d7used bybitflags
1.2.1crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693bitvec
0.19.5crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321depends onused byblock-buffer
0.9.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4depends onused byblock-modes
0.7.0crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0depends onused byblock-padding
0.2.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2caeused byblowfish
0.8.0crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfe3ff3fc1de48c1ac2e3341c4df38b0d1bfb8fdf04632a187c8b75aaa319a7abused bybumpalo
3.7.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631used bybyteorder
1.4.3crates.io↘ 0↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610c2-chacha
0.3.1crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7e6002dbb7c65a76e516625443949a8b7bb0d0845fe6a3dc39e2dd7ae39dcb9cdepends onused bycfg-if
1.0.0crates.io↘ 0↖ 9sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbaf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fdchacha20poly1305
0.7.1crates.io↘ 4↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumaf1fc18e6d90c40164bf6c317476f2a98f04661e310e79830366b7e914c58a8eused bychrono
0.4.19crates.io↘ 6↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73used bycipher
0.2.5crates.io↘ 1↖ 8sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801depends oncipher
0.3.0crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7depends onused byclap
2.33.3crates.io↘ 7↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002depends onused bycookie-factory
0.3.2crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum396de984970346b0d9e93d1415082923c679e5ae5c3ee3dcbd104f5610af126bused bycpufeatures
0.1.5crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71efdepends onused bycpuid-bool
0.2.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffbaused bycrypto-mac
0.11.0crates.io↘ 2↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103edepends onctr
0.6.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7fdepends onused bycurve25519-dalek
3.2.0crates.io↘ 5↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61used bydashmap
4.0.2crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39cdepends onused bydigest
0.9.0crates.io↘ 1↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066depends ondprint-core
0.46.2crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume591a70ef877cc01110ed3e28318fe98e6175fa4aaccc293857af8491c8e4f3edepends onused byenv_logger
0.9.0crates.io↘ 5↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3find-crate
0.6.3crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum59a98bbaacea1c0eb6a0876280051b892eb73594fd90cf3b20e9c817029c57d2depends onfleet-install-secrets
0.1.0workspace↘ 10↖ 0fluent
0.15.0crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbc4d7142005e2066e4844caf9f271b93fc79836ee96ec85057b8c109687e629adepends onfluent-bundle
0.15.1crates.io↘ 8↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8acf044eeb4872d9dbf2667541fbf461f5965c57e343878ad0fb24b5793fa007depends onused byfluent-langneg
0.13.0crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2c4ad0989667548f06ccd0e306ed56b61bd4d35458d54df5ec7587c0e8ed5e94depends onfluent-syntax
0.11.0crates.io↘ 1↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc0abed97648395c902868fee9026de96483933faa54ea3b40d652f7dfe61ca78depends onfnv
1.0.7crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1used byfunty
1.1.0crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7used bygeneric-array
0.14.4crates.io↘ 2↖ 7sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817depends ongetrandom
0.1.16crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fceused bygetrandom
0.2.2crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8used byheck
0.3.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205depends onused byhermit-abi
0.1.17crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8depends onused byhkdf
0.11.0crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886bdepends onused byhmac
0.11.0crates.io↘ 2↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69bdepends onhostname
0.3.1crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867depends onused byhumantime
2.0.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7aused byi18n-config
0.4.2crates.io↘ 6↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb62affcd43abfb51f3cbd8736f9407908dc5b44fc558a9be07460bbfd104d983i18n-embed
0.12.1crates.io↘ 12↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3794c3d7fea43e076281c9213cfaaa7a53c3f18b1613f12514b9f575a2908457depends onused byi18n-embed-fl
0.5.0crates.io↘ 13↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4d91f4951bd0bc19624a06781bf8cd05bdd59057622e5d4240823b42a5f102d2depends onused byi18n-embed-impl
0.7.0crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2757ae6d1dd47fba009e86795350186fc4740a6e53a1b4f336a8a6725d20eb53used byInflector
0.11.4crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3used byinstant
0.1.10crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474ddepends onintl_pluralrules
7.0.1crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb18f988384267d7066cc2be425e6faf352900652c046b6971d2e228d3b1c5ecfdepends onused byintl-memoizer
0.5.1crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc310433e4a310918d6ed9243542a6b83ec1183df95dff8f23f87bb88a264a66fdepends onitoa
0.4.6crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6used bylazy_static
1.4.0crates.io↘ 1↖ 6sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646depends onlibc
0.2.102crates.io↘ 0↖ 15sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma2a5ac8f984bfcf3a823267e5fde638acc3325f6496633a5da6bb6eb2171e103libm
0.2.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702aused bylinked-hash-map
0.5.4crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3used bylock_api
0.4.5crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109depends onused bylog
0.4.14crates.io↘ 1↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710depends onmatch_cfg
0.1.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4used bymemchr
2.3.3crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400memoffset
0.6.4crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9depends onused bynix
0.22.1crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume7555d6c7164cc913be1ce7f95cbecdabda61eb2ccd89008524af306fb7f5031used bynixlike
0.1.0workspace↘ 5↖ 1nom
6.2.1crates.io↘ 4↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6used bynum_cpus
1.13.0crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3depends onused bynum-bigint
0.2.6crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304used bynum-bigint-dig
0.6.1crates.io↘ 11↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5d51546d704f52ef14b3c962b5776e53d5b862e5790e40a350d366c209bd7f7adepends onused bynum-integer
0.1.44crates.io↘ 2↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801dbdepends onnum-iter
0.1.42crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59used bynum-traits
0.2.14crates.io↘ 1↖ 8sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290depends ononce_cell
1.5.2crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0used byopaque-debug
0.3.0crates.io↘ 0↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5ouroboros
0.9.5crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfbeff60e3e37407a80ead3e9458145b456e978c4068cddbfea6afb48572962caused byouroboros_macro
0.9.5crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum03f2cb802b5bdfdf52f1ffa0b54ce105e4d346e91990dd571f86c91321ad49e2used byparking_lot
0.11.2crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99used byparking_lot_core
0.8.5crates.io↘ 6↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216used bypbkdf2
0.8.0crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffadepends onused bypeg
0.7.0crates.io↘ 2↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166adepends onused bypeg-macros
0.7.0crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844cused bypeg-runtime
0.7.0crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088used bypem
0.8.3crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13ebdepends onused bypin-project
1.0.8crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08depends onused bypin-project-internal
1.0.8crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389depends onused bypoly1305
0.6.2crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8depends onused byppv-lite86
0.2.9crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumc36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20proc-macro-error
1.0.4crates.io↘ 5↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumda25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38cproc-macro-error-attr
1.0.4crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869used byproc-macro2
1.0.24crates.io↘ 1↖ 15sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71depends onquote
1.0.7crates.io↘ 1↖ 14sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumaa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37depends onradium
0.5.3crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8used byrand
0.7.3crates.io↘ 5↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03rand
0.8.4crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8used byrand_chacha
0.2.2crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402depends onused byrand_chacha
0.3.0crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0ddepends onused byrand_core
0.5.1crates.io↘ 1↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19depends onrand_core
0.6.2crates.io↘ 1↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7depends onrand_hc
0.2.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613cdepends onused byrand_hc
0.3.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73depends onused byredox_syscall
0.2.10crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ffdepends onregex
1.4.6crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759used byregex-syntax
0.6.25crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89bused byremove_dir_all
0.5.3crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7depends onused byrsa
0.3.0crates.io↘ 14↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3648b669b10afeab18972c105e284a7b953a669b0be3514c27f9b17acab2f9cddepends onused byrust-embed
5.9.0crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2fe1fe6aac5d6bb9e1ffd81002340363272a7648234ec7bdfac5ee202cb65523used byrust-embed-impl
5.9.0crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum3ed91c41c42ef7bf687384439c312e75e0da9c149b0390889b94de3c7d9d9e66used byrust-embed-utils
5.1.0crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2a512219132473ab0a77b52077059f1c47ce4af7fbdc94503e9862a34422876ddepends onrustc-hash
1.1.0crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2ryu
1.0.5crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86eused bysalsa20
0.8.1crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0depends onused bysame-file
1.0.6crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502depends onused byscopeguard
1.1.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cdused byscrypt
0.7.0crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518used bysecrecy
0.7.0crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0depends onused byserde
1.0.130crates.io↘ 1↖ 11sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913depends onserde_derive
1.0.130crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508bdepends onused byserde_json
1.0.68crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8depends onsha2
0.9.5crates.io↘ 5↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12simple_asn1
0.4.1crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum692ca13de57ce0613a363c8c2f1de925adebc81b04c923ac60c5488bb44abe4bused bysmallvec
1.6.1crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604espin
0.5.2crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042dused bystable_deref_trait
1.2.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3used bystrsim
0.8.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6aused bystrsim
0.10.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623used bystructopt
0.3.23crates.io↘ 3↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbf9d950ef167e25e0bdb073cf1d68e9ad2795ac826f2f3f59647817cf23c0bfastructopt-derive
0.4.16crates.io↘ 5↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum134d838a2c9943ac3125cf6df165eda53493451b719f3255b2a26b85f772d0baused bysubtle
2.4.0crates.io↘ 0↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2syn
1.0.67crates.io↘ 3↖ 11sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum6498a9efc342871f91cc2d0d694c674368b4ceb40f62b65a7a08c3792935e702synstructure
0.12.5crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4faused bytap
1.0.1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369used bytempfile
3.2.0crates.io↘ 6↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumdac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22termcolor
1.1.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75fdepends onused bytextwrap
0.11.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumd326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060depends onused bythiserror
1.0.29crates.io↘ 1↖ 5sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88depends onthiserror-impl
1.0.29crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumbad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494cdepends onused bytime
0.1.43crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438depends onused bytime
0.3.3crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcde1cf55178e0293453ba2cca0d5f8392a922e52aa958aee9c28ed02becc6d03depends onused bytinystr
0.3.4crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum29738eedb4388d9ea620eeab9384884fc3f06f586a2eddb56bedc5885126c7c1toml
0.5.7crates.io↘ 1↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645depends ontype-map
0.4.0crates.io↘ 1↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb6d3364c5e96cb2ad1603037ab253ddd34d7fb72a58bdddf4b7350760fc69a46depends onused bytypenum
1.13.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06used byunic-langid
0.9.0crates.io↘ 1↖ 8sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum73328fcd730a030bdb19ddf23e192187a6b01cd98be6d3140622a89129459ce5depends onunic-langid-impl
0.9.0crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum1a4a8eeaf0494862c1404c95ec2f4c33a2acff5076f64314b465e3ddae1b934ddepends onused byunicode-segmentation
1.6.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksume83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0used byunicode-width
0.1.8crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3used byunicode-xid
0.2.1crates.io↘ 0↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564universal-hash
0.4.0crates.io↘ 2↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402depends onused byvec_map
0.8.2crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumf1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191used byversion_check
0.9.2crates.io↘ 0↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumb5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aedwalkdir
2.3.2crates.io↘ 3↖ 4sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56wasi
0.9.0+wasi-snapshot-preview1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumcccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519used bywasi
0.10.2+wasi-snapshot-preview1crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumfd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6used bywinapi
0.3.9crates.io↘ 2↖ 10sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419winapi-i686-pc-windows-gnu
0.4.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksumac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6used bywinapi-util
0.1.5crates.io↘ 1↖ 3sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178depends onwinapi-x86_64-pc-windows-gnu
0.4.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183fused bywyz
0.2.0crates.io↘ 0↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214used byx25519-dalek
1.2.0crates.io↘ 3↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum2392b6b94a576b4e2bf3c5b2757d63f10ada8020a2e4d08ac849ebcf6ea8e077used byz85
3.0.3crates.io↘ 0↖ 2sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum5ac8b56e4f9906a4ef5412875e9ce448364023335cec645fd457ecf51d4f2781zeroize
1.3.0crates.io↘ 1↖ 8sourceregistry+https://github.com/rust-lang/crates.io-indexchecksum4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efddepends onzeroize_derive
1.1.0crates.io↘ 4↖ 1sourceregistry+https://github.com/rust-lang/crates.io-indexchecksuma2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1used by
cmds/fleet/Cargo.tomldiffbeforeafterboth--- a/cmds/fleet/Cargo.toml
+++ b/cmds/fleet/Cargo.toml
@@ -7,19 +7,24 @@
[dependencies]
anyhow = "1.0"
-log = "0.4.14"
-env_logger = "0.9.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
time = { version = "0.3.2", features = ["serde"] }
tempfile = "3.2"
once_cell = "1.5"
hostname = "0.3.1"
-age-core = "0.6.0"
+age-core = "0.7.0"
peg = "0.7.0"
nixlike = {path = "../../crates/nixlike"}
-age = { version = "0.6.0", features = ["ssh", "armor"] }
+age = { version = "0.7.0", features = ["ssh", "armor"] }
base64 = "0.13.0"
chrono = { version = "0.4.19", features = ["serde"] }
z85 = "3.0.3"
+base58 = "*"
structopt = "0.3.23"
+tokio = { version = "1.14.0", features = ["full"] }
+tracing = "0.1.29"
+tracing-subscriber = { version = "0.3.3", features = ["fmt", "env-filter"] }
+tokio-util = { version = "0.6.9", features = ["codec"] }
+async-trait = "0.1.52"
+futures = "0.3.17"
cmds/fleet/src/cmds/build_systems.rsdiffbeforeafterboth--- a/cmds/fleet/src/cmds/build_systems.rs
+++ b/cmds/fleet/src/cmds/build_systems.rs
@@ -1,11 +1,12 @@
-use std::{env::current_dir, process::Command};
+use std::{env::current_dir, time::Duration};
use crate::{command::CommandExt, host::Config, nix::SYSTEMS_ATTRIBUTE};
use anyhow::Result;
-use log::info;
use structopt::StructOpt;
+use tokio::{process::Command, task::LocalSet, time::sleep};
+use tracing::{error, field, info, info_span, warn, Instrument};
-#[derive(StructOpt)]
+#[derive(StructOpt, Clone)]
pub struct BuildSystems {
/// --builders arg for nix
#[structopt(long)]
@@ -78,117 +79,158 @@
}
impl BuildSystems {
- pub fn run(self, config: &Config) -> Result<()> {
- let hosts = config.list_hosts()?;
-
+ pub async fn run(self, config: &Config) -> Result<()> {
+ let hosts = config.list_hosts().await?;
+ let set = LocalSet::new();
+ let this = &self;
for host in hosts.iter() {
if config.should_skip(host) {
continue;
}
- info!("Building host {}", host);
- let built = {
- let dir = tempfile::tempdir()?;
- dir.path().to_owned()
- };
+ let config = config.clone();
+ let host = host.clone();
+ let this = this.clone();
+ let span = info_span!("deployment", host = field::display(&host));
+ set.spawn_local(
+ (async move {
+ let res: Result<()> = try {
+ info!("building");
+ let built = {
+ let dir = tempfile::tempdir()?;
+ dir.path().to_owned()
+ };
- let mut nix_build = if self.privileged_build {
- let mut out = Command::new("sudo");
- out.arg("nix");
- out
- } else {
- Command::new("nix")
- };
- nix_build
- .args(&["build", "--impure", "--no-link", "--out-link"])
- .arg(&built)
- .arg(format!(
- "{}.{}.config.system.build.toplevel",
- SYSTEMS_ATTRIBUTE, host,
- ));
+ let mut nix_build = if this.privileged_build {
+ let mut out = Command::new("sudo");
+ out.arg("nix");
+ out
+ } else {
+ Command::new("nix")
+ };
+ nix_build
+ .args(&[
+ "build",
+ "--impure",
+ "--json",
+ // "--show-trace",
+ "--no-link",
+ "--out-link",
+ ])
+ .arg(&built)
+ .arg(format!(
+ "{}.{}.config.system.build.toplevel",
+ SYSTEMS_ATTRIBUTE, host,
+ ));
+
+ if let Some(builders) = &this.builders {
+ nix_build.arg("--builders").arg(builders);
+ }
+ if let Some(jobs) = &this.jobs {
+ nix_build.arg("--max-jobs");
+ nix_build.arg(format!("{}", jobs));
+ }
+ if !this.fail_fast {
+ nix_build.arg("--keep-going");
+ }
- if let Some(builders) = &self.builders {
- nix_build.arg("--builders").arg(builders);
- }
- if let Some(jobs) = &self.jobs {
- nix_build.arg("--max-jobs");
- nix_build.arg(format!("{}", jobs));
- }
- if !self.fail_fast {
- nix_build.arg("--keep-going");
- }
+ nix_build.run_nix().await?;
+ let built = std::fs::canonicalize(built)?;
- nix_build.inherit_stdio().run()?;
- let built = std::fs::canonicalize(built)?;
- info!("Built closure: {:?}", built);
+ let action = Action::from(this.subcommand.clone());
- let action = Action::from(self.subcommand.clone());
+ match action {
+ Action::Upload(action) => {
+ if !config.is_local(&host) {
+ info!("uploading system closure");
+ let mut tries = 0;
+ loop {
+ match Command::new("nix")
+ .args(&["copy", "--to"])
+ .arg(format!("ssh://root@{}", host))
+ .arg(&built)
+ .inherit_stdio()
+ .run_nix()
+ .await
+ {
+ Ok(()) => break,
+ Err(e) if tries < 3 => {
+ tries += 1;
+ warn!("Copy failure ({}/3): {}", tries, e);
+ sleep(Duration::from_millis(5000)).await;
+ }
+ Err(e) => return Err(e),
+ }
+ }
+ }
+ if let Some(action) = action {
+ if action.should_switch_profile() {
+ info!("switching generation");
+ config
+ .command_on(&host, "nix-env", true)
+ .args(&["-p", "/nix/var/nix/profiles/system", "--set"])
+ .arg(&built)
+ .inherit_stdio()
+ .run()
+ .await?;
+ }
+ info!("executing activation script");
+ let mut switch_script = built.clone();
+ switch_script.push("bin");
+ switch_script.push("switch-to-configuration");
+ config
+ .command_on(&host, switch_script, true)
+ .arg(action.name())
+ .inherit_stdio()
+ .run()
+ .await?;
+ }
+ }
+ Action::Package(PackageAction::SdImage) => {
+ let mut out = current_dir()?;
+ out.push(format!("sd-image-{}", host));
- match action {
- Action::Upload(action) => {
- if !config.is_local(host) {
- info!("Uploading system closure");
- Command::new("nix")
- .args(&["copy", "--to"])
- .arg(format!("ssh://root@{}", host))
- .arg(&built)
- .inherit_stdio()
- .run()?;
- }
- if let Some(action) = action {
- if action.should_switch_profile() {
- info!("Switching generation");
- config
- .command_on(host, "nix-env", true)
- .args(&["-p", "/nix/var/nix/profiles/system", "--set"])
- .arg(&built)
- .inherit_stdio()
- .run()?;
- }
- info!("Executing activation script");
- let mut switch_script = built.clone();
- switch_script.push("bin");
- switch_script.push("switch-to-configuration");
- config
- .command_on(host, switch_script, true)
- .arg(action.name())
- .inherit_stdio()
- .run()?;
- }
- }
- Action::Package(PackageAction::SdImage) => {
- let mut out = current_dir()?;
- out.push(format!("sd-image-{}", host));
+ info!("building sd image to {:?}", out);
+ let mut nix_build = if this.privileged_build {
+ let mut out = Command::new("sudo");
+ out.arg("nix");
+ out
+ } else {
+ Command::new("nix")
+ };
+ nix_build
+ .args(&["build", "--impure", "--no-link", "--out-link"])
+ .arg(&out)
+ .arg(format!(
+ "{}.{}.config.system.build.sdImage",
+ SYSTEMS_ATTRIBUTE, host,
+ ));
+ if let Some(builders) = &this.builders {
+ nix_build.arg("--builders").arg(builders);
+ }
+ if let Some(jobs) = &this.jobs {
+ nix_build.arg("--max-jobs");
+ nix_build.arg(format!("{}", jobs));
+ }
+ if !this.fail_fast {
+ nix_build.arg("--keep-going");
+ }
- info!("Building sd image to {:?}", out);
- let mut nix_build = if self.privileged_build {
- let mut out = Command::new("sudo");
- out.arg("nix");
- out
- } else {
- Command::new("nix")
+ nix_build.inherit_stdio().run_nix().await?;
+ }
+ };
};
- nix_build
- .args(&["build", "--impure", "--no-link", "--out-link"])
- .arg(&out)
- .arg(format!(
- "{}.{}.config.system.build.sdImage",
- SYSTEMS_ATTRIBUTE, host,
- ));
- if let Some(builders) = &self.builders {
- nix_build.arg("--builders").arg(builders);
+ match res {
+ Ok(_) => {}
+ Err(e) => {
+ error!("failed to deploy host: {}", e)
+ }
}
- if let Some(jobs) = &self.jobs {
- nix_build.arg("--max-jobs");
- nix_build.arg(format!("{}", jobs));
- }
- if !self.fail_fast {
- nix_build.arg("--keep-going");
- }
-
- nix_build.inherit_stdio().run()?;
- }
- };
+ Ok(())
+ })
+ .instrument(span),
+ );
}
+ set.await;
Ok(())
}
}
cmds/fleet/src/cmds/info.rsdiffbeforeafterboth--- a/cmds/fleet/src/cmds/info.rs
+++ b/cmds/fleet/src/cmds/info.rs
@@ -30,13 +30,13 @@
}
impl Info {
- pub fn run(self, config: &Config) -> Result<()> {
+ pub async fn run(self, config: &Config) -> Result<()> {
let mut data = Vec::new();
match self.cmd {
InfoCmd::ListHosts { ref tagged } => {
- 'host: for host in config.list_hosts()? {
+ 'host: for host in config.list_hosts().await? {
if !tagged.is_empty() {
- let tags: Vec<String> = config.config_attr(&host, "tags")?;
+ let tags: Vec<String> = config.config_attr(&host, "tags").await?;
for tag in tagged {
if !tags.contains(&tag) {
continue 'host;
@@ -57,10 +57,18 @@
);
let mut out = <BTreeSet<String>>::new();
if external {
- out.extend(config.config_attr::<Vec<String>>(&host, "network.externalIps")?);
+ out.extend(
+ config
+ .config_attr::<Vec<String>>(&host, "network.externalIps")
+ .await?,
+ );
}
if internal {
- out.extend(config.config_attr::<Vec<String>>(&host, "network.internalIps")?);
+ out.extend(
+ config
+ .config_attr::<Vec<String>>(&host, "network.internalIps")
+ .await?,
+ );
}
for ip in out {
data.push(ip);
cmds/fleet/src/cmds/secrets/mod.rsdiffbeforeafterboth--- a/cmds/fleet/src/cmds/secrets/mod.rs
+++ b/cmds/fleet/src/cmds/secrets/mod.rs
@@ -3,6 +3,7 @@
host::Config,
};
use anyhow::{bail, Result};
+use futures::{StreamExt, TryStreamExt};
use std::{
io::{self, Cursor, Read},
path::PathBuf,
@@ -44,14 +45,14 @@
}
impl Secrets {
- pub fn run(self, config: &Config) -> Result<()> {
+ pub async fn run(self, config: &Config) -> Result<()> {
match self {
Secrets::ForceKeys => {
- for host in config.list_hosts()? {
+ for host in config.list_hosts().await? {
if config.should_skip(&host) {
continue;
}
- config.key(&host)?;
+ config.key(&host).await?;
}
}
Secrets::AddShared {
@@ -61,10 +62,10 @@
public,
public_file,
} => {
- let recipients = machines
- .iter()
- .map(|m| config.recipient(m))
- .collect::<Result<Vec<_>>>()?;
+ let recipients = futures::stream::iter(machines.iter())
+ .then(|m| config.recipient(m))
+ .try_collect::<Vec<_>>()
+ .await?;
let secret = {
let mut input = vec![];
@@ -117,7 +118,7 @@
public,
public_file,
} => {
- let recipient = config.recipient(&machine)?;
+ let recipient = config.recipient(&machine).await?;
let secret = {
let mut input = vec![];
cmds/fleet/src/command.rsdiffbeforeafterboth--- a/cmds/fleet/src/command.rs
+++ b/cmds/fleet/src/command.rs
@@ -1,42 +1,204 @@
-use std::{
- ffi::OsStr,
- process::{Command, Stdio},
-};
+use std::{ffi::OsStr, process::Stdio};
use anyhow::{Context, Result};
-use serde::de::DeserializeOwned;
+use async_trait::async_trait;
+use futures::StreamExt;
+use serde::{
+ de::{DeserializeOwned, Visitor},
+ Deserialize,
+};
+use tokio::{process::Command, select};
+use tokio_util::codec::{BytesCodec, FramedRead, LinesCodec};
+use tracing::{info, warn};
+#[async_trait]
pub trait CommandExt {
- fn run(&mut self) -> Result<()>;
- fn run_json<T: DeserializeOwned>(&mut self) -> Result<T>;
- fn run_string(&mut self) -> Result<String>;
+ async fn run_nix(&mut self) -> Result<()>;
+ async fn run_nix_json<T: DeserializeOwned>(&mut self) -> Result<T>;
+ async fn run_nix_string(&mut self) -> Result<String>;
+ async fn run(&mut self) -> Result<()>;
+ async fn run_json<T: DeserializeOwned>(&mut self) -> Result<T>;
+ async fn run_string(&mut self) -> Result<String>;
fn inherit_stdio(&mut self) -> &mut Self;
fn ssh_on(host: impl AsRef<OsStr>, command: impl AsRef<OsStr>) -> Self;
}
+#[derive(Debug)]
+enum LogField {
+ String(String),
+ Num(u64),
+}
+
+impl<'de> Deserialize<'de> for LogField {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: serde::Deserializer<'de>,
+ {
+ struct StringOrNum;
+ impl<'de> Visitor<'de> for StringOrNum {
+ type Value = LogField;
+
+ fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ write!(f, "string or unsigned")
+ }
+
+ fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
+ where
+ E: serde::de::Error,
+ {
+ Ok(LogField::String(v.to_owned()))
+ }
+
+ fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E>
+ where
+ E: serde::de::Error,
+ {
+ Ok(LogField::Num(v))
+ }
+ }
+
+ deserializer.deserialize_any(StringOrNum)
+ }
+}
+
+#[derive(Deserialize, Debug)]
+#[serde(rename_all = "camelCase", tag = "action")]
+enum NixLog {
+ Msg {
+ level: u32,
+ msg: String,
+ raw_msg: Option<String>,
+ },
+ Start {
+ id: u64,
+ level: u32,
+ #[serde(default)]
+ fields: Vec<LogField>,
+ text: String,
+ #[serde(rename = "type")]
+ typ: u32,
+ },
+ Stop {
+ id: u64,
+ },
+ Result {
+ id: u64,
+ #[serde(rename = "type")]
+ typ: u32,
+ },
+}
+
+#[async_trait]
impl CommandExt for Command {
+ async fn run_nix(&mut self) -> Result<()> {
+ self.run_nix_string().await.map(|_| ())
+ }
+ async fn run_nix_json<T: DeserializeOwned>(&mut self) -> Result<T> {
+ let str = self.run_nix_string().await?;
+ serde_json::from_str(&str).with_context(|| format!("{:?}", str))
+ }
+
+ async fn run_nix_string(&mut self) -> Result<String> {
+ self.arg("--log-format").arg("internal-json");
+ self.stderr(Stdio::piped());
+ self.stdout(Stdio::piped());
+ let mut child = self.spawn()?;
+ let mut stderr = child.stderr.take().unwrap();
+ let mut stdout = child.stdout.take().unwrap();
+ let mut err = FramedRead::new(&mut stderr, LinesCodec::new());
+ let mut out = FramedRead::new(&mut stdout, BytesCodec::new());
+
+ // while let Some(line) = read.next().await? {}
+
+ let mut out_buf = vec![];
+ loop {
+ select! {
+ e = err.next() => {
+ if let Some(e) = e {
+ let e = e?;
+ if let Some(e) = e.strip_prefix("@nix ") {
+
+ let log: NixLog = match serde_json::from_str(e) {
+ Ok(l) => l,
+ Err(err) => {
+ warn!("failed to parse nix log line {:?}: {}", e, err);
+ continue;
+ },
+ };
+ match log {
+ NixLog::Msg { msg, raw_msg, .. } => {
+ if !(msg.ends_with(" is dirty") && msg.contains("warning:") && msg.contains(" Git tree ")) {
+ info!(target: "nix", "{}", raw_msg.unwrap_or(msg))
+ }
+ },
+ NixLog::Start { ref fields, typ, .. } if typ == 105 && fields.len() >= 1 => {
+ if let [LogField::String(drv), ..] = &fields[..] {
+ info!(target: "nix","building {}", drv)
+ } else {
+ warn!("bad build log: {:?}", log)
+ }
+ },
+ NixLog::Start { ref fields, typ, .. } if typ == 100 && fields.len() >= 3 => {
+ if let [LogField::String(drv), LogField::String(from), LogField::String(to), ..] = &fields[..] {
+ info!(target: "nix","copying {} {} -> {}", drv, from, to)
+ } else {
+ warn!("bad copy log: {:?}", log)
+ }
+ },
+ NixLog::Start { text, typ, .. } if typ == 0 || typ == 102 || typ == 103 || typ == 104 => {
+ if !text.is_empty() && text != "querying info about missing paths" && text != "copying 0 paths" {
+ info!(target: "nix", "{}", text)
+ }
+ },
+ NixLog::Stop { .. } => {},
+ NixLog::Result { .. } => {},
+ _ => warn!("unknown log: {:?}", log)
+ };
+ } else {
+ warn!(target="nix","unknown: {}", e)
+ }
+ }
+ },
+ o = out.next() => {
+ if let Some(o) = o {
+ out_buf.extend_from_slice(&o?);
+ }
+ },
+ code = child.wait() => {
+ let code = code?;
+ if !code.success() {
+ anyhow::bail!("command ({:?}) failed with status {}", self, code);
+ }
+ break;
+ }
+ }
+ }
+
+ Ok(String::from_utf8(out_buf)?)
+ }
+
fn inherit_stdio(&mut self) -> &mut Self {
self.stderr(Stdio::inherit());
self
}
- fn run(&mut self) -> Result<()> {
+ async fn run(&mut self) -> Result<()> {
self.inherit_stdio();
- let out = self.output()?;
+ let out = self.output().await?;
if !out.status.success() {
anyhow::bail!("command ({:?}) failed with status {}", self, out.status);
}
Ok(())
}
- fn run_json<T: DeserializeOwned>(&mut self) -> Result<T> {
- let str = self.run_string()?;
+ async fn run_json<T: DeserializeOwned>(&mut self) -> Result<T> {
+ let str = self.run_string().await?;
serde_json::from_str(&str).with_context(|| format!("{:?}", str))
}
- fn run_string(&mut self) -> Result<String> {
+ async fn run_string(&mut self) -> Result<String> {
self.inherit_stdio();
- let out = self.output()?;
+ let out = self.output().await?;
if !out.status.success() {
anyhow::bail!("command ({:?}) failed with status {}", self, out.status);
}
cmds/fleet/src/host.rsdiffbeforeafterboth--- a/cmds/fleet/src/host.rs
+++ b/cmds/fleet/src/host.rs
@@ -4,7 +4,6 @@
ffi::{OsStr, OsString},
ops::Deref,
path::PathBuf,
- process::Command,
sync::Arc,
};
@@ -12,6 +11,7 @@
use serde::de::DeserializeOwned;
use structopt::clap::ArgGroup;
use structopt::StructOpt;
+use tokio::process::Command;
use crate::{command::CommandExt, fleetdata::FleetData};
@@ -73,15 +73,15 @@
str
}
- pub fn list_hosts(&self) -> Result<Vec<String>> {
+ pub async fn list_hosts(&self) -> Result<Vec<String>> {
Command::new("nix")
.arg("eval")
.arg(self.full_attr_name("fleetConfigurations.default.configuredHosts"))
.args(&["--apply", "builtins.attrNames", "--json", "--show-trace"])
- .inherit_stdio()
- .run_json()
+ .run_nix_json()
+ .await
}
- pub fn config_attr<T: DeserializeOwned>(&self, host: &str, attr: &str) -> Result<T> {
+ pub async fn config_attr<T: DeserializeOwned>(&self, host: &str, attr: &str) -> Result<T> {
Command::new("nix")
.arg("eval")
.arg(self.full_attr_name(&format!(
@@ -89,8 +89,8 @@
host, attr
)))
.args(&["--json", "--show-trace"])
- .inherit_stdio()
- .run_json()
+ .run_nix_json()
+ .await
}
pub fn data(&self) -> Ref<FleetData> {
cmds/fleet/src/keys.rsdiffbeforeafterboth--- a/cmds/fleet/src/keys.rs
+++ b/cmds/fleet/src/keys.rs
@@ -2,7 +2,7 @@
use crate::{command::CommandExt, host::Config};
use anyhow::{anyhow, Result};
-use log::warn;
+use tracing::warn;
impl Config {
pub fn cached_key(&self, host: &str) -> Option<String> {
@@ -21,7 +21,7 @@
host.encryption_key = key.trim().to_string();
}
- pub fn key(&self, host: &str) -> anyhow::Result<String> {
+ pub async fn key(&self, host: &str) -> anyhow::Result<String> {
if let Some(key) = self.cached_key(host) {
Ok(key)
} else {
@@ -29,19 +29,20 @@
let key = self
.command_on(host, "cat", false)
.arg("/etc/ssh/ssh_host_ed25519_key.pub")
- .run_string()?;
+ .run_string()
+ .await?;
self.update_key(host, key.clone());
Ok(key)
}
}
- pub fn recipient(&self, host: &str) -> anyhow::Result<age::ssh::Recipient> {
- let key = self.key(host)?;
+ pub async fn recipient(&self, host: &str) -> anyhow::Result<age::ssh::Recipient> {
+ let key = self.key(host).await?;
age::ssh::Recipient::from_str(&key).map_err(|e| anyhow!("parse recipient error: {:?}", e))
}
- pub fn orphaned_data(&self) -> Result<Vec<String>> {
+ pub async fn orphaned_data(&self) -> Result<Vec<String>> {
let mut out = Vec::new();
- let host_names = self.list_hosts()?;
+ let host_names = self.list_hosts().await?;
for hostname in self
.data()
.hosts
cmds/fleet/src/main.rsdiffbeforeafterboth--- a/cmds/fleet/src/main.rs
+++ b/cmds/fleet/src/main.rs
@@ -1,3 +1,5 @@
+#![feature(try_blocks)]
+
pub mod command;
pub mod host;
pub mod keys;
@@ -7,12 +9,16 @@
mod fleetdata;
-use anyhow::Result;
+use std::io;
+
+use anyhow::{anyhow, Result};
use structopt::clap::AppSettings::*;
use structopt::StructOpt;
use cmds::{build_systems::BuildSystems, info::Info, secrets::Secrets};
use host::{Config, FleetOpts};
+use tracing::{info, metadata::LevelFilter};
+use tracing_subscriber::EnvFilter;
#[derive(StructOpt)]
enum Opts {
@@ -38,23 +44,34 @@
command: Opts,
}
-fn run_command(config: &Config, command: Opts) -> Result<()> {
+async fn run_command(config: &Config, command: Opts) -> Result<()> {
match command {
- Opts::BuildSystems(c) => c.run(config)?,
- Opts::Secrets(s) => s.run(config)?,
- Opts::Info(i) => i.run(config)?,
+ Opts::BuildSystems(c) => c.run(config).await?,
+ Opts::Secrets(s) => s.run(config).await?,
+ Opts::Info(i) => i.run(config).await?,
};
Ok(())
}
-fn main() -> Result<()> {
- env_logger::Builder::new()
- .filter_level(log::LevelFilter::Info)
- .init();
+#[tokio::main]
+async fn main() -> Result<()> {
+ let filter = EnvFilter::from_default_env().add_directive(LevelFilter::INFO.into());
+ tracing_subscriber::FmtSubscriber::builder()
+ .with_env_filter(filter)
+ .without_time()
+ .with_target(false)
+ .with_writer(|| {
+ // eprintln!("Line");
+ io::stderr()
+ })
+ .try_init()
+ .map_err(|e| anyhow!("Failed to initialize logger: {}", e))?;
+
+ info!("Starting");
let opts = RootOpts::from_args();
let config = opts.fleet_opts.build()?;
- match run_command(&config, opts.command) {
+ match run_command(&config, opts.command).await {
Ok(()) => {
config.save()?;
Ok(())
modules/fleet/meta.nixdiffbeforeafterboth--- a/modules/fleet/meta.nix
+++ b/modules/fleet/meta.nix
@@ -45,6 +45,6 @@
hosts = fleet.hostsToAttrs (host: {
modules = config.globalModules;
});
- globalModules = import ../nixos/_modules.nix;
+ globalModules = import ../../nixos/modules/module-list.nix;
};
}
modules/nixos/_modules.nixdiffbeforeafterboth--- a/modules/nixos/_modules.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-[
- ./fleetPkgs.nix
- ./meta.nix
- ./secrets.nix
-]
modules/nixos/fleetPkgs.nixdiffbeforeafterboth--- a/modules/nixos/fleetPkgs.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{ ... }: {
- nixpkgs.overlays = [ (import ../../pkgs) ];
-}
modules/nixos/meta.nixdiffbeforeafterboth--- a/modules/nixos/meta.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{ lib, ... }:
-with lib;
-{
- options = with types; {
- tags = mkOption {
- type = listOf str;
- description = "Host tags";
- default = [ ];
- };
- network = mkOption {
- type = submodule {
- options = {
- internalIps = mkOption {
- type = listOf str;
- description = "Internal ips";
- default = [ ];
- };
- externalIps = mkOption {
- type = listOf str;
- description = "External ips";
- default = [ ];
- };
- };
- };
- description = "Network definition of host";
- };
- };
- config = {
- tags = [ "all" ];
- network = { };
- };
-}
modules/nixos/secrets.nixdiffbeforeafterboth--- a/modules/nixos/secrets.nix
+++ /dev/null
@@ -1,68 +0,0 @@
-{ lib, config, pkgs, ... }:
-
-with lib;
-
-let
- sysConfig = config;
- secretType = types.submodule ({ config, ... }: {
- config = {
- path = mkOptionDefault "/run/secrets/${config._module.args.name}";
- publicPath = mkOptionDefault (pkgs.writeText "pub-${config._module.args.name}" config.public);
- };
- options = {
- public = mkOption {
- type = types.nullOr types.str;
- description = "Secret public data";
- default = null;
- };
- secret = mkOption {
- type = types.nullOr types.str;
- description = "Encrypted secret data";
- default = null;
- };
- mode = mkOption {
- type = types.str;
- description = "Secret mode";
- default = "0440";
- };
- owner = mkOption {
- type = types.str;
- description = "Owner of the secret";
- default = "root";
- };
- group = mkOption {
- type = types.str;
- description = "Group of the secret";
- default = sysConfig.users.users.${config.owner}.group;
- };
-
- path = mkOption {
- type = types.str;
- description = "Path to the decrypted secret";
- };
- publicPath = mkOption {
- type = types.package;
- description = "Path to the public part of secret";
- };
- };
- });
- secretsFile = pkgs.writeTextFile {
- name = "secrets.json";
- text = builtins.toJSON config.secrets;
- };
-in
-{
- options = {
- secrets = mkOption {
- type = types.attrsOf secretType;
- default = { };
- description = "Host-local secrets";
- };
- };
- config = {
- system.activationScripts.decryptSecrets = stringAfter [ "users" "groups" "specialfs" ] ''
- 1>&2 echo "setting up secrets"
- ${pkgs.fleet-install-secrets}/bin/fleet-install-secrets ${secretsFile}
- '';
- };
-}
nixos/fleetPkgs.nixdiffbeforeafterboth--- /dev/null
+++ b/nixos/fleetPkgs.nix
@@ -0,0 +1,3 @@
+{ ... }: {
+ nixpkgs.overlays = [ (import ../pkgs) ];
+}
nixos/meta.nixdiffbeforeafterboth--- /dev/null
+++ b/nixos/meta.nix
@@ -0,0 +1,32 @@
+{ lib, ... }:
+with lib;
+{
+ options = with types; {
+ tags = mkOption {
+ type = listOf str;
+ description = "Host tags";
+ default = [ ];
+ };
+ network = mkOption {
+ type = submodule {
+ options = {
+ internalIps = mkOption {
+ type = listOf str;
+ description = "Internal ips";
+ default = [ ];
+ };
+ externalIps = mkOption {
+ type = listOf str;
+ description = "External ips";
+ default = [ ];
+ };
+ };
+ };
+ description = "Network definition of host";
+ };
+ };
+ config = {
+ tags = [ "all" ];
+ network = { };
+ };
+}
nixos/modules/module-list.nixdiffbeforeafterboth--- /dev/null
+++ b/nixos/modules/module-list.nix
@@ -0,0 +1,5 @@
+[
+ ../fleetPkgs.nix
+ ../meta.nix
+ ../secrets.nix
+]
nixos/secrets.nixdiffbeforeafterboth--- /dev/null
+++ b/nixos/secrets.nix
@@ -0,0 +1,68 @@
+{ lib, config, pkgs, ... }:
+
+with lib;
+
+let
+ sysConfig = config;
+ secretType = types.submodule ({ config, ... }: {
+ config = {
+ path = mkOptionDefault "/run/secrets/${config._module.args.name}";
+ publicPath = mkOptionDefault (pkgs.writeText "pub-${config._module.args.name}" config.public);
+ };
+ options = {
+ public = mkOption {
+ type = types.nullOr types.str;
+ description = "Secret public data";
+ default = null;
+ };
+ secret = mkOption {
+ type = types.nullOr types.str;
+ description = "Encrypted secret data";
+ default = null;
+ };
+ mode = mkOption {
+ type = types.str;
+ description = "Secret mode";
+ default = "0440";
+ };
+ owner = mkOption {
+ type = types.str;
+ description = "Owner of the secret";
+ default = "root";
+ };
+ group = mkOption {
+ type = types.str;
+ description = "Group of the secret";
+ default = sysConfig.users.users.${config.owner}.group;
+ };
+
+ path = mkOption {
+ type = types.str;
+ description = "Path to the decrypted secret";
+ };
+ publicPath = mkOption {
+ type = types.package;
+ description = "Path to the public part of secret";
+ };
+ };
+ });
+ secretsFile = pkgs.writeTextFile {
+ name = "secrets.json";
+ text = builtins.toJSON config.secrets;
+ };
+in
+{
+ options = {
+ secrets = mkOption {
+ type = types.attrsOf secretType;
+ default = { };
+ description = "Host-local secrets";
+ };
+ };
+ config = {
+ system.activationScripts.decryptSecrets = stringAfter [ "users" "groups" "specialfs" ] ''
+ 1>&2 echo "setting up secrets"
+ ${pkgs.fleet-install-secrets}/bin/fleet-install-secrets ${secretsFile}
+ '';
+ };
+}