Rollback nixpkgs: Difference between revisions
m typos |
m rewording |
||
Line 1: | Line 1: | ||
It is possible some software you depend on breaks in an updated nixpkgs release. If you need to roll back to a previous version of nixpkgs here an example method of using | It is possible some software you depend on breaks in an updated nixpkgs release. If you need to roll back to a previous version of nixpkgs here an example method of using Hydra to get the last tested release of nixpkgs that contains it. | ||
This specific example is where an update to Linux 6.6.57 breaks netfilter and we need to roll back to 6.6.56. | This specific example is where an update to Linux 6.6.57 breaks netfilter and we need to roll back to 6.6.56. | ||
We go to https://hydra.nixos.org and are presented with the Projects page. | We go to [https://hydra.nixos.org https://Hydra.nixos.org] and are presented with the Projects page. | ||
[[File:1-hydra-projects.png|center|frameless|663x663px]] | [[File:1-hydra-projects.png|center|frameless|663x663px]] | ||
In this example we want to roll back in the nixos-unstable branch we select the nixos Project. | In this example we want to roll back in the nixos-unstable branch so we select the nixos Project. | ||
[[File:2-hydria-jobsets.png|center|frameless|653x653px]] | [[File:2-hydria-jobsets.png|center|frameless|653x653px]] | ||
Highlighted are the release-24.05 jobset for NixOS stable release and the trunk-combined jobset which will be relevant to most. trunk-combined is | Highlighted are the release-24.05 <code>jobset</code> for NixOS stable release and the trunk-combined <code>jobset</code> which will be relevant to most. trunk-combined is Hydra <code>jobset</code> that builds nixos-unstable. | ||
[[File:3-hdrya-jobset-jobs-tab.png|center|frameless|637x637px]] | [[File:3-hdrya-jobset-jobs-tab.png|center|frameless|637x637px]] | ||
Line 26: | Line 26: | ||
[[File:6-hydra-build-summary.png|651x651px|center|frameless]] | [[File:6-hydra-build-summary.png|651x651px|center|frameless]] | ||
This | This build of the Linux 6.6.56 kernel is the first time it was built. We can see it is part of 2 other evaluations. We want to see which nixpkgs-unstable evaluations contained this build, so we click on the "2 others". | ||
[[File:7-hydra-build-evals.png|709x709px|center|frameless]] | [[File:7-hydra-build-evals.png|709x709px|center|frameless]] | ||
Here we have the git commit hashes for nixpkgs that were used to | Here we have the git commit hashes for nixpkgs that were used to generate the 3 nixpkgs-unstable evals that contained the kernel we want. | ||
We do not want just any eval that had this kernel build in it. It could have been | We do not want just any eval that had this kernel build in it. It could have been incomplete or failed. So we want to ensure that the build ran through the "tested" <code>job</code> that is part of the trunk-combined <code>jobset</code>. The tested <code>job</code> runs the various tests that must pass for the NixOS channels to progress. | ||
[[File:8-hydra-jobset-overview.png|734x734px|center|frameless]] | [[File:8-hydra-jobset-overview.png|734x734px|center|frameless]] | ||
Select the Jobset dropdown. Notice that | Select the Jobset dropdown. Notice that <code>trunk-combined</code> <code>jobset</code> is highligted. We select overview. But we want to open this in another windows or tab, so we have access to compare the git commit hashes we found before. | ||
[[File:9-hydra-jobset-jobs-tested.png|753x753px|center|frameless]] | [[File:9-hydra-jobset-jobs-tested.png|753x753px|center|frameless]] | ||
First select the jobs tab to search for jobs. In the search field we are searching for the | First select the jobs tab to search for <code>jobs</code>. In the search field we are searching for the <code>tested</code> job. After pressing enter you see similar to the above image. Select the <code>tested</code> job. There is also a <code>tested</code> job if you are using the stable release. | ||
[[File:10-hydra-jobset-jobs-tested-last-successful.png|698x698px|center|frameless]] | [[File:10-hydra-jobset-jobs-tested-last-successful.png|698x698px|center|frameless]] | ||
Here we notice we are on the | Here we notice we are on the<code>tested</code>job of the <code>trunk-combined</code> jobset. We compare the git commit hashes of the nixpkgs evals we got from the previous step to find the tested jobs that contain the kernel we want. | ||
In this example we see that build 275414986 successfully passed the<code>tested</code> job with the green check mark displayed. | |||
We also see that the first eval that had the 6.6.56 kernel failed to pass. Good thing we took this extra step to verify! | So it is the latest nixos-unstable evaluation that has the kernel we want. We can then know that we can use <code>5785b6bb5eaa</code> git commit hash in our flake for nixpkgs to build our system and utilise the NixOS cache. (<code>nixpkgs.url = "github:NixOS/nixpkgs/5785b6bb5eaa";</code>) | ||
We also see that the first eval that had the 6.6.56 kernel failed to pass the tested job. Good thing we took this extra step to verify! | |||
[[File:11-hydra-jobset-jobs-tested-last-success.png|657x657px|center|frameless]] | [[File:11-hydra-jobset-jobs-tested-last-success.png|657x657px|center|frameless]] | ||
Here is the summary page of the | Here is the summary page of the tested build we want showing it as successful with the git commit hash. |