Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

atop: 2.8.1 -> 2.10.0

+68 -47
+9 -3
pkgs/os-specific/linux/atop/atop.service.patch
··· 1 + diff --git a/atop.service b/atop.service 2 + index 6b11dea..f90935f 100644 1 3 --- a/atop.service 2 4 +++ b/atop.service 3 - @@ -9,5 +9,6 @@ 4 - Environment=LOGPATH=/var/log/atop 5 + @@ -8,10 +8,10 @@ Environment="LOGOPTS=" 6 + Environment="LOGINTERVAL=600" 7 + Environment="LOGGENERATIONS=28" 8 + Environment="LOGPATH=/var/log/atop" 5 9 -EnvironmentFile=/etc/default/atop 6 10 +EnvironmentFile=-/etc/default/atop 11 + ExecStartPre=/bin/sh -c 'test -d "${LOGPATH}" || mkdir -p "${LOGPATH}"' 7 12 ExecStartPre=/bin/sh -c 'test -n "$LOGINTERVAL" -a "$LOGINTERVAL" -eq "$LOGINTERVAL"' 8 13 ExecStartPre=/bin/sh -c 'test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS"' 9 - +ExecStartPre=/bin/sh -c 'mkdir -p "${LOGPATH}"' 10 14 ExecStart=/bin/sh -c 'exec @out@/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}' 15 + ExecStartPost=@findutils@/bin/find "${LOGPATH}" -name "atop_*" -mtime +${LOGGENERATIONS} -exec rm -v {} \; 16 + KillSignal=SIGUSR2
-7
pkgs/os-specific/linux/atop/atopacct.service.patch
··· 1 - --- a/atopacct.service 2 - +++ b/atopacct.service 3 - @@ -9,3 +9,3 @@ 4 - Type=forking 5 - -PIDFile=/var/run/atopacctd.pid 6 - +PIDFile=/run/atopacctd.pid 7 - ExecStart=@out@/bin/atopacctd
+6 -4
pkgs/os-specific/linux/atop/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , fetchurl 4 + , glib 4 5 , zlib 5 6 , ncurses 7 + , pkg-config 6 8 , findutils 7 9 , systemd 8 10 , python3 ··· 12 14 13 15 stdenv.mkDerivation rec { 14 16 pname = "atop"; 15 - version = "2.8.1"; 17 + version = "2.10.0"; 16 18 17 19 src = fetchurl { 18 20 url = "https://www.atoptool.nl/download/atop-${version}.tar.gz"; 19 - sha256 = "sha256-lwBYoZt5w0RPlx+FRXKg5jiR3C1fcDf/g3VwhUzg2h4="; 21 + hash = "sha256-56ZzzyyCV4592C7LDeyD/Z7LMIKLJWHCip+lqvddX5M="; 20 22 }; 21 23 22 24 nativeBuildInputs = lib.optionals withAtopgpu [ ··· 24 26 ]; 25 27 26 28 buildInputs = [ 29 + glib 27 30 zlib 28 31 ncurses 32 + pkg-config 29 33 ] ++ lib.optionals withAtopgpu [ 30 34 python3 31 35 ]; ··· 51 55 ./fix-paths.patch 52 56 # Don't fail on missing /etc/default/atop, make sure /var/log/atop exists pre-start 53 57 ./atop.service.patch 54 - # Specify PIDFile in /run, not /var/run to silence systemd warning 55 - ./atopacct.service.patch 56 58 ]; 57 59 58 60 preConfigure = ''
+53 -33
pkgs/os-specific/linux/atop/fix-paths.patch
··· 1 + diff --git a/atop-pm.sh b/atop-pm.sh 2 + index 3ff4ab5..c433b1a 100755 3 + --- a/atop-pm.sh 4 + +++ b/atop-pm.sh 5 + @@ -1,10 +1,10 @@ 6 + #!/bin/sh 7 + 8 + case "$1" in 9 + - pre) /usr/bin/systemctl stop atop 10 + + pre) @systemd@/bin/systemctl stop atop 11 + exit 0 12 + ;; 13 + - post) /usr/bin/systemctl start atop 14 + + post) @systemd@/bin/systemctl start atop 15 + exit 0 16 + ;; 17 + *) exit 1 18 + diff --git a/atop-rotate.service b/atop-rotate.service 19 + index dbe8e0f..4eaa84d 100644 20 + --- a/atop-rotate.service 21 + +++ b/atop-rotate.service 22 + @@ -4,4 +4,4 @@ Documentation=man:atop(1) 23 + 24 + [Service] 25 + Type=oneshot 26 + -ExecStart=/usr/bin/systemctl restart atop.service 27 + +ExecStart=@systemd@/bin/systemctl restart atop.service 28 + diff --git a/atop.service b/atop.service 29 + index 3e5bafd..6b11dea 100644 1 30 --- a/atop.service 2 31 +++ b/atop.service 3 - @@ -12,4 +12,4 @@ 32 + @@ -12,8 +12,8 @@ EnvironmentFile=/etc/default/atop 33 + ExecStartPre=/bin/sh -c 'test -d "${LOGPATH}" || mkdir -p "${LOGPATH}"' 34 + ExecStartPre=/bin/sh -c 'test -n "$LOGINTERVAL" -a "$LOGINTERVAL" -eq "$LOGINTERVAL"' 4 35 ExecStartPre=/bin/sh -c 'test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS"' 5 36 -ExecStart=/bin/sh -c 'exec /usr/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}' 6 37 -ExecStartPost=/usr/bin/find "${LOGPATH}" -name "atop_*" -mtime +${LOGGENERATIONS} -exec rm -v {} \; 7 38 +ExecStart=/bin/sh -c 'exec @out@/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}' 8 39 +ExecStartPost=@findutils@/bin/find "${LOGPATH}" -name "atop_*" -mtime +${LOGGENERATIONS} -exec rm -v {} \; 9 40 KillSignal=SIGUSR2 10 - 11 - --- a/atop-rotate.service 12 - +++ b/atop-rotate.service 13 - @@ -4,3 +4,3 @@ 14 - [Service] 15 - Type=oneshot 16 - -ExecStart=/usr/bin/systemctl try-restart atop.service 17 - +ExecStart=@systemd@/bin/systemctl try-restart atop.service 18 - 41 + 42 + [Install] 43 + diff --git a/atopacct.service b/atopacct.service 44 + index 3aa529d..b95db43 100644 45 + --- a/atopacct.service 46 + +++ b/atopacct.service 47 + @@ -7,7 +7,7 @@ Before=atop.service 48 + Type=forking 49 + PIDFile=/run/atopacctd.pid 50 + ExecStartPre=/bin/sh -c 'if systemctl -q is-active acct psacct; then echo "Process accounting already in use by (ps)acct"; exit 1; fi' 51 + -ExecStart=/usr/sbin/atopacctd 52 + +ExecStart=@out@/bin/atopacctd 53 + 54 + [Install] 55 + WantedBy=multi-user.target 56 + diff --git a/atopgpu.service b/atopgpu.service 57 + index 4839235..8aae1c5 100644 19 58 --- a/atopgpu.service 20 59 +++ b/atopgpu.service 21 - @@ -6,5 +6,5 @@ 22 - 60 + @@ -4,7 +4,7 @@ Documentation=man:atopgpud(8) 61 + Before=atop.service 62 + 23 63 [Service] 24 64 -ExecStart=/usr/sbin/atopgpud 25 65 +ExecStart=@out@/bin/atopgpud 26 66 Type=oneshot 27 67 RemainAfterExit=yes 28 - 29 - --- a/atopacct.service 30 - +++ b/atopacct.service 31 - @@ -10,3 +10,3 @@ 32 - PIDFile=/var/run/atopacctd.pid 33 - -ExecStart=/usr/sbin/atopacctd 34 - +ExecStart=@out@/bin/atopacctd 35 - 36 - --- a/atop-pm.sh 37 - +++ b/atop-pm.sh 38 - @@ -2,8 +2,8 @@ 39 - 40 - case "$1" in 41 - - pre) /usr/bin/systemctl stop atop 42 - + pre) @systemd@/bin/systemctl stop atop 43 - exit 0 44 - ;; 45 - - post) /usr/bin/systemctl start atop 46 - + post) @systemd@/bin/systemctl start atop 47 - exit 0 48 - ;; 68 +