Skip to content

linuxPackages.drbd: 9.2.8 -> 9.2.9#312011

Closed
birkb wants to merge 2 commits intoNixOS:masterfrom
birkb:drbd-kernel-module
Closed

linuxPackages.drbd: 9.2.8 -> 9.2.9#312011
birkb wants to merge 2 commits intoNixOS:masterfrom
birkb:drbd-kernel-module

Conversation

@birkb
Copy link
Contributor

@birkb birkb commented May 15, 2024

Description of changes

  • 6.8 kernel support added
  • aligned to Nix standard build environment
  • test added
  • redundant installPhase and postFixup definitions removed

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

- 6.8 kernel support added
- aligned to Nix standard build environment
- test added
- redundant installPhase and postFixup definitions removed

Signed-off-by: birkb <[email protected]>
@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label May 15, 2024
@birkb birkb requested review from SuperSandro2000, Thesola10 and astro and removed request for astro May 15, 2024 18:17
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels May 15, 2024
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label May 16, 2024
src = fetchurl {
url = "https://pkg.linbit.com//downloads/drbd/9/drbd-${version}.tar.gz";
hash = "sha256-LqK1lPucab7wKvcB4VKGdvBIq+K9XtuO2m0DP5XtK3M=";
url = "https://pkg.linbit.com//downloads/drbd/9/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = "https://pkg.linbit.com//downloads/drbd/9/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
url = "https://pkg.linbit.com//downloads/drbd/9/drbd-${finalAttrs.version}.tar.gz";

finalAttrs.pname is in many usecases wrong, as when we would append something like headless to pname, then the download URL would be broken

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint. What would be the correct variable and do you maybe have a link to the related documentation?

Copy link
Contributor

@eclairevoyant eclairevoyant Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use pname in URLs, just use the string literal.

@@ -0,0 +1,19 @@
import ./make-test-python.nix ({ lib, pkgs, ... }: {
name = "drbd-driver";
meta.maintainers = with pkgs.lib.maintainers; [ birkb ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta.maintainers = with pkgs.lib.maintainers; [ birkb ];
meta.maintainers = with lib.maintainers; [ birkb ];

Copy link
Contributor

@eclairevoyant eclairevoyant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as mentioned earlier - we should never use finalAttrs.pname in a url

Copy link
Member

@JohnRTitor JohnRTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could fetch from the GitHub repo instead?

diff --git a/pkgs/os-specific/linux/drbd/driver.nix b/pkgs/os-specific/linux/drbd/driver.nix
index c2e222ad2f1f..8f4b84800f72 100644
--- a/pkgs/os-specific/linux/drbd/driver.nix
+++ b/pkgs/os-specific/linux/drbd/driver.nix
@@ -1,12 +1,14 @@
-{ stdenv, lib, fetchurl, kernel, nixosTests, flex, coccinelle, python3 }:
+{ stdenv, lib, fetchFromGitHub, kernel, nixosTests, flex, coccinelle, python3 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "drbd";
-  version = "9.2.9";
+  version = "9.2.10";
 
-  src = fetchurl {
-    url = "https://pkg.linbit.com//downloads/drbd/9/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
-    hash = "sha256-MLG0hGvAjjkNxhszbpnb8fkzWUQC1zPhkeOaU0V5x3g=";
+  src = fetchFromGitHub {
+    owner = "LINBIT";
+    repo = "drbd";
+    rev = "drbd-${finalAttrs.version}";
+    hash = "sha256-O77nVnbk0rSS2vI/+jG1jgDIiFmttGFNUgnw3x6WqPk=";
   };
 
   hardeningDisable = [ "pic" ];

@birkb
Copy link
Contributor Author

birkb commented Jul 31, 2024

Perhaps we could fetch from the GitHub repo instead?

diff --git a/pkgs/os-specific/linux/drbd/driver.nix b/pkgs/os-specific/linux/drbd/driver.nix
index c2e222ad2f1f..8f4b84800f72 100644
--- a/pkgs/os-specific/linux/drbd/driver.nix
+++ b/pkgs/os-specific/linux/drbd/driver.nix
@@ -1,12 +1,14 @@
-{ stdenv, lib, fetchurl, kernel, nixosTests, flex, coccinelle, python3 }:
+{ stdenv, lib, fetchFromGitHub, kernel, nixosTests, flex, coccinelle, python3 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "drbd";
-  version = "9.2.9";
+  version = "9.2.10";
 
-  src = fetchurl {
-    url = "https://pkg.linbit.com//downloads/drbd/9/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
-    hash = "sha256-MLG0hGvAjjkNxhszbpnb8fkzWUQC1zPhkeOaU0V5x3g=";
+  src = fetchFromGitHub {
+    owner = "LINBIT";
+    repo = "drbd";
+    rev = "drbd-${finalAttrs.version}";
+    hash = "sha256-O77nVnbk0rSS2vI/+jG1jgDIiFmttGFNUgnw3x6WqPk=";
   };
 
   hardeningDisable = [ "pic" ];

pkg.linbit.com contains the cleaned up version of the code that can directly be used. It is the official LinBIT source.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 10, 2024
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 1, 2024
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 2, 2024
@SuperSandro2000
Copy link
Member

closed in favor of the PR that updates straight to 9.2.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants