remove networkmanager098 (#162904)

This commit is contained in:
Atemu
2022-03-05 22:19:36 +02:00
committed by GitHub
parent 389e6ad504
commit b4e2df2e10
6 changed files with 0 additions and 207 deletions
-1
View File
@@ -123,7 +123,6 @@ rec {
atk
at-spi2-atk
libudev0-shim
networkmanager098
xorg.libXt
xorg.libXmu
-1
View File
@@ -167,7 +167,6 @@ in buildFHSUserEnv rec {
ffmpeg
# Only libraries are needed from those two
libudev0-shim
networkmanager098
# Verified games requirements
xorg.libXt
@@ -1,64 +0,0 @@
{ lib, stdenv, fetchurl, intltool, pkg-config, dbus-glib
, udev, libnl, libuuid, gnutls, dhcp
, libgcrypt, perl, libgudev, avahi, ppp, kmod }:
stdenv.mkDerivation rec {
pname = "networkmanager";
version = "0.9.8.10";
src = fetchurl {
url = "mirror://gnome/sources/NetworkManager/0.9/NetworkManager-${version}.tar.xz";
sha256 = "0wn9qh8r56r8l19dqr68pdl1rv3zg1dv47rfy6fqa91q7li2fk86";
};
preConfigure = ''
substituteInPlace tools/glib-mkenums --replace /usr/bin/perl ${perl}/bin/perl
substituteInPlace src/nm-device.c \
--replace @avahi@ ${avahi} \
--replace @kmod@ ${kmod}
substituteInPlace src/ppp-manager/nm-ppp-manager.c \
--replace @ppp@ ${ppp} \
--replace @kmod@ ${kmod}
'';
# Right now we hardcode quite a few paths at build time. Probably we should
# patch networkmanager to allow passing these path in config file. This will
# remove unneeded build-time dependencies.
configureFlags = [
"--with-distro=exherbo"
"--with-dhclient=${dhcp}/sbin/dhclient"
"--with-dhcpcd=no"
"--with-iptables=no"
"--with-udev-dir=\${out}/lib/udev"
"--with-resolvconf=no"
"--sysconfdir=/etc" "--localstatedir=/var"
"--with-dbus-sys-dir=\${out}/etc/dbus-1/system.d"
"--with-crypto=gnutls" "--disable-more-warnings"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--with-kernel-firmware-dir=/run/current-system/firmware"
"--disable-ppp"
];
buildInputs = [ udev libnl libuuid gnutls libgcrypt libgudev ];
propagatedBuildInputs = [ dbus-glib ];
nativeBuildInputs = [ intltool pkg-config ];
patches =
[ ./libnl-3.2.25.patch
./nixos-purity.patch
];
preInstall =
''
installFlagsArray=( "sysconfdir=$out/etc" "localstatedir=$out/var" )
'';
meta = with lib; {
homepage = "http://projects.gnome.org/NetworkManager/";
description = "Network configuration and management tool";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}
@@ -1,61 +0,0 @@
diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c
index ba8053e..5ac39d3 100644
--- a/src/nm-netlink-monitor.c
+++ b/src/nm-netlink-monitor.c
@@ -177,40 +177,15 @@ link_msg_handler (struct nl_object *obj, void *arg)
static int
event_msg_recv (struct nl_msg *msg, void *arg)
{
- struct nl_sock *nlh = arg;
- struct nlmsghdr *hdr = nlmsg_hdr (msg);
struct ucred *creds = nlmsg_get_creds (msg);
- const struct sockaddr_nl *snl;
- guint32 local_port;
- gboolean accept_msg = FALSE;
-
- /* Only messages sent from the kernel */
- if (!creds || creds->uid != 0) {
- nm_log_dbg (LOGD_HW, "ignoring netlink message from UID %d",
- creds ? creds->uid : -1);
- return NL_SKIP;
- }
-
- snl = nlmsg_get_src (msg);
- g_assert (snl);
-
- /* Accept any messages from the kernel */
- if (hdr->nlmsg_pid == 0 || snl->nl_pid == 0)
- accept_msg = TRUE;
- /* And any multicast message directed to our netlink PID, since multicast
- * currently requires CAP_ADMIN to use.
- */
- local_port = nl_socket_get_local_port (nlh);
- if ((hdr->nlmsg_pid == local_port) && snl->nl_groups)
- accept_msg = TRUE;
-
- if (accept_msg == FALSE) {
- nm_log_dbg (LOGD_HW, "ignoring netlink message from PID %d (local PID %d, multicast %d)",
- hdr->nlmsg_pid,
- local_port,
- (hdr->nlmsg_flags & NLM_F_MULTI));
- return NL_SKIP;
+ if (!creds || creds->pid || creds->uid || creds->gid) {
+ if (creds)
+ nm_log_dbg (LOGD_HW, "netlink: received non-kernel message (pid %d uid %d gid %d)",
+ creds->pid, creds->uid, creds->gid);
+ else
+ nm_log_dbg (LOGD_HW, "netlink: received message without credentials");
+ return NL_STOP;
}
return NL_OK;
@@ -285,7 +260,7 @@ nlh_setup (struct nl_sock *nlh,
{
int err;
- nl_socket_modify_cb (nlh, NL_CB_MSG_IN, NL_CB_CUSTOM, event_msg_recv, cb_data);
+ nl_socket_modify_cb (nlh, NL_CB_MSG_IN, NL_CB_CUSTOM, event_msg_recv, NULL);
if (valid_func)
nl_socket_modify_cb (nlh, NL_CB_VALID, NL_CB_CUSTOM, valid_func, cb_data);
@@ -1,77 +0,0 @@
diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c
index 0932139..5b5aee8 100644
--- a/src/dhcp-manager/nm-dhcp-dhclient.c
+++ b/src/dhcp-manager/nm-dhcp-dhclient.c
@@ -68,10 +68,6 @@ const char *
nm_dhcp_dhclient_get_path (const char *try_first)
{
static const char *dhclient_paths[] = {
- "/sbin/dhclient",
- "/usr/sbin/dhclient",
- "/usr/pkg/sbin/dhclient",
- "/usr/local/sbin/dhclient",
NULL
};
const char **path = dhclient_paths;
diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c
index 237661f..48bc33f 100644
--- a/src/dhcp-manager/nm-dhcp-dhcpcd.c
+++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c
@@ -51,10 +51,6 @@ const char *
nm_dhcp_dhcpcd_get_path (const char *try_first)
{
static const char *dhcpcd_paths[] = {
- "/sbin/dhcpcd",
- "/usr/sbin/dhcpcd",
- "/usr/pkg/sbin/dhcpcd",
- "/usr/local/sbin/dhcpcd",
NULL
};
const char **path = dhcpcd_paths;
diff --git a/src/nm-device.c b/src/nm-device.c
index 1dc94ee..e60f3c8 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -1321,8 +1321,7 @@ aipd_start (NMDevice *self, NMDeviceStateReason *reason)
char *argv[6], *cmdline;
const char **aipd_binary = NULL;
static const char *aipd_paths[] = {
- "/usr/sbin/avahi-autoipd",
- "/usr/local/sbin/avahi-autoipd",
+ "@avahi@/sbin/avahi-autoipd",
NULL
};
int i = 0;
@@ -2555,7 +2554,7 @@ share_init (void)
}
for (iter = modules; *iter; iter++) {
- char *argv[3] = { "/sbin/modprobe", *iter, NULL };
+ char *argv[3] = { "@kmod@/bin/modprobe", *iter, NULL };
char *envp[1] = { NULL };
GError *error = NULL;
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 59698c3..7dba0f7 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -661,9 +661,7 @@ static inline const char *
nm_find_pppd (void)
{
static const char *pppd_binary_paths[] = {
- "/usr/local/sbin/pppd",
- "/usr/sbin/pppd",
- "/sbin/pppd",
+ "@ppp@/sbin/pppd",
NULL
};
@@ -988,7 +986,7 @@ nm_ppp_manager_start (NMPPPManager *manager,
/* Make sure /dev/ppp exists (bgo #533064) */
if (stat ("/dev/ppp", &st) || !S_ISCHR (st.st_mode))
- ignored = system ("/sbin/modprobe ppp_generic");
+ ignored = system ("@kmod@/bin/modprobe ppp_generic");
connection = nm_act_request_get_connection (req);
g_assert (connection);
-3
View File
@@ -8160,9 +8160,6 @@ with pkgs;
inherit (skawarePackages) cleanPackaging;
};
# stripped down, needed by steam
networkmanager098 = callPackage ../tools/networking/networkmanager/0.9.8 { };
networkmanager = callPackage ../tools/networking/networkmanager { };
networkmanager-iodine = callPackage ../tools/networking/networkmanager/iodine { };