Merge staging-next into staging
This commit is contained in:
@@ -1,21 +1,36 @@
|
||||
{ lib, stdenv, fetchurl, python2Packages }:
|
||||
{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
|
||||
|
||||
python2Packages.buildPythonApplication rec {
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "dstat";
|
||||
format = "other";
|
||||
version = "0.7.3";
|
||||
version = "0.7.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/dagwieers/dstat/archive/${version}.tar.gz";
|
||||
sha256 = "16286z3y2lc9nsq8njzjkv6k2vyxrj9xiixj1k3gnsbvhlhkirj6";
|
||||
src = fetchFromGitHub {
|
||||
owner = "dstat-real";
|
||||
repo = "dstat";
|
||||
rev = "v${version}";
|
||||
sha256 = "1qnmkhqmjd1m3if05jj29dvr5hn6kayq9bkkkh881w472c0zhp8v";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python2Packages; [ python-wifi ];
|
||||
propagatedBuildInputs = with python3Packages; [ six ];
|
||||
|
||||
patches = [ ./fix_pluginpath.patch ];
|
||||
patches = [
|
||||
./fix_pluginpath.patch
|
||||
# this fixes another bug with python3
|
||||
(fetchpatch {
|
||||
url = https://github.com/efexgee/dstat/commit/220a785321b13b6df92a536080aca6ef1cb644ad.patch ;
|
||||
sha256 = "08kcz3yxvl35m55y7g1pr73x3bjcqnv0qlswxqyq8cqxg9zd64cn";
|
||||
})
|
||||
];
|
||||
|
||||
makeFlags = [ "prefix=$(out)" ];
|
||||
|
||||
# remove deprecation warnings
|
||||
preFixup = ''
|
||||
sed -i "s/import collections/import collections.abc/g" $out/share/dstat/dstat.py $out/bin/dstat
|
||||
sed -i "s/collections.Sequence/collections.abc.Sequence/g" "$out"/bin/dstat
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://dag.wieers.com/home-made/dstat/";
|
||||
description = "Versatile resource statistics tool";
|
||||
|
||||
@@ -20,9 +20,6 @@ stdenv.mkDerivation rec {
|
||||
url = "https://git.alpinelinux.org/aports/plain/main/linux-pam/libpam-fix-build-with-eglibc-2.16.patch?id=05a62bda8ec255d7049a2bd4cf0fdc4b32bdb2cc";
|
||||
sha256 = "1ib6shhvgzinjsc603k2x1lxh9dic6qq449fnk110gc359m23j81";
|
||||
})
|
||||
# From adelie's package repo, using local copy since it seems to be currently offline.
|
||||
# (we previously used similar patch from void, but stopped working with update to 1.3.1)
|
||||
./musl-fix-pam_exec.patch
|
||||
];
|
||||
|
||||
outputs = [ "out" "doc" "man" /* "modules" */ ];
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
--- ./modules/pam_exec/pam_exec.c.orig
|
||||
+++ ./modules/pam_exec/pam_exec.c
|
||||
@@ -103,11 +103,14 @@
|
||||
int optargc;
|
||||
const char *logfile = NULL;
|
||||
const char *authtok = NULL;
|
||||
+ char authtok_buf[PAM_MAX_RESP_SIZE+1];
|
||||
+
|
||||
pid_t pid;
|
||||
int fds[2];
|
||||
int stdout_fds[2];
|
||||
FILE *stdout_file = NULL;
|
||||
|
||||
+ memset(authtok_buf, 0, sizeof(authtok_buf));
|
||||
if (argc < 1) {
|
||||
pam_syslog (pamh, LOG_ERR,
|
||||
"This module needs at least one argument");
|
||||
@@ -180,12 +183,12 @@
|
||||
if (resp)
|
||||
{
|
||||
pam_set_item (pamh, PAM_AUTHTOK, resp);
|
||||
- authtok = strndupa (resp, PAM_MAX_RESP_SIZE);
|
||||
+ authtok = strncpy(authtok_buf, resp, sizeof(authtok_buf));
|
||||
_pam_drop (resp);
|
||||
}
|
||||
}
|
||||
else
|
||||
- authtok = strndupa (void_pass, PAM_MAX_RESP_SIZE);
|
||||
+ authtok = strncpy(authtok_buf, void_pass, sizeof(authtok_buf));
|
||||
|
||||
if (pipe(fds) != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user