treewide: yank wicd as it is abandoned

This commit is contained in:
Sandro Jäckel 2021-09-11 23:41:19 +02:00
parent 5544ebe5b7
commit 781766e30c
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
16 changed files with 2 additions and 460 deletions

View File

@ -873,7 +873,6 @@
./services/networking/wasabibackend.nix
./services/networking/websockify.nix
./services/networking/wg-quick.nix
./services/networking/wicd.nix
./services/networking/wireguard.nix
./services/networking/wpa_supplicant.nix
./services/networking/xandikos.nix

View File

@ -27,6 +27,7 @@ with lib;
(mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "networking" "vpnc" ] "Use environment.etc.\"vpnc/service.conf\" instead.")
(mkRemovedOptionModule [ "networking" "wicd" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "environment" "blcr" "enable" ] "The BLCR module has been removed")
(mkRemovedOptionModule [ "services" "beegfsEnable" ] "The BeeGFS module has been removed")
(mkRemovedOptionModule [ "services" "beegfs" ] "The BeeGFS module has been removed")

View File

@ -1,40 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
{
###### interface
options = {
networking.wicd.enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to start <command>wicd</command>. Wired and
wireless network configurations can then be managed by
wicd-client.
'';
};
};
###### implementation
config = mkIf config.networking.wicd.enable {
environment.systemPackages = [pkgs.wicd];
systemd.services.wicd = {
after = [ "network-pre.target" ];
before = [ "network.target" ];
wants = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
script = "${pkgs.wicd}/sbin/wicd -f";
};
services.dbus.enable = true;
services.dbus.packages = [pkgs.wicd];
};
}

View File

@ -1,121 +0,0 @@
{ lib, stdenv, fetchurl, python2Packages
, wpa_supplicant, dhcp, dhcpcd, wirelesstools
, nettools, openresolv, iproute2, iputils }:
let
inherit (python2Packages) python pygobject2 dbus-python pyGtkGlade pycairo;
in stdenv.mkDerivation rec {
pname = "wicd";
version = "1.7.2.4";
src = fetchurl {
url = "https://launchpad.net/wicd/1.7/${version}/+download/${pname}-${version}.tar.gz";
sha256 = "15ywgh60xzmp5z8l1kzics7yi95isrjg1paz42dvp7dlpdfzpzfw";
};
buildInputs = with python2Packages; [
python Babel urwid notify
];
patches = [
./no-var-install.patch
./pygtk.patch
./no-optimization.patch
./dhclient.patch
./fix-app-icon.patch
./fix-gtk-issues.patch
./urwid-api-update.patch
./fix-curses.patch
];
# Should I be using pygtk's propagated build inputs?
# !!! Should use makeWrapper.
postPatch = ''
# We don't have "python2".
substituteInPlace wicd/wicd-daemon.py --replace 'misc.find_path("python2")' "'${python.interpreter}'"
substituteInPlace in/scripts=wicd.in --subst-var-by TEMPLATE-DEFAULT $out/share/other/dhclient.conf.template.default
sed -i "2iexport PATH=${lib.makeBinPath [ python wpa_supplicant dhcpcd dhcp wirelesstools nettools nettools iputils openresolv iproute2 ]}\$\{PATH:+:\}\$PATH" in/scripts=wicd.in
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pygobject2}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd.in
sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-client.in
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pygobject2})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-client.in
sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-gtk.in
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pygobject2})/gtk-2.0:$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${python2Packages.notify})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-gtk.in
sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-cli.in
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-cli.in
sed -i "2iexport PATH=${python}/bin\$\{PATH:+:\}\$PATH" in/scripts=wicd-curses.in
sed -i "3iexport PYTHONPATH=$(toPythonPath $out):$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pygobject2}):$(toPythonPath ${pycairo}):$(toPythonPath ${dbus-python}):$(toPythonPath ${python2Packages.urwid})\$\{PYTHONPATH:+:\}\$PYTHONPATH" in/scripts=wicd-curses.in
rm po/ast.po
'';
configurePhase = ''
python setup.py configure \
--lib=$out/lib/ \
--share=$out/share/ \
--etc=/var/lib/wicd/ \
--scripts=$out/etc/scripts/ \
--pixmaps=$out/share/pixmaps/ \
--images=$out/share/pixmaps/wicd/ \
--encryption=$out/etc/encryption/templates/ \
--bin=$out/bin/ \
--sbin=$out/sbin/ \
--backends=$out/share/backends/ \
--daemon=$out/share/daemon/ \
--curses=$out/share/curses/ \
--gtk=$out/share/gtk/ \
--cli=$out/share/cli/ \
--networks=/var/lib/wicd/configurations/ \
--resume=$out/etc/acpi/resume.d/ \
--suspend=$out/etc/acpi/suspend.d/ \
--pmutils=$out/lib/pm-utils/sleep.d/ \
--dbus=$out/etc/dbus-1/system.d/ \
--dbus-service=$out/etc/dbus-1/system-services/ \
--systemd=$out/lib/systemd/ \
--logrotate=$out/etc/logrotate.d/ \
--desktop=$out/share/applications/ \
--icons=$out/share/icons/hicolor/ \
--translations=$out/share/locale/ \
--autostart=$out/etc/xdg/autostart/ \
--varlib=$out/var/lib/ \
--docdir=$out/share/doc/ \
--mandir=$out/share/man/ \
--kdedir=$out/share/autostart/ \
--python=${python}/bin/python \
--distro=nix \
--wicdgroup=users \
--no-install-init \
--no-install-kde \
--no-install-acpi \
--no-install-pmutils \
'';
installPhase = ''
python setup.py install --prefix=$out --install-lib=$out/${python.sitePackages}
mkdir -p $out/share/other
cp other/dhclient.conf.template.default $out/share/other/dhclient.conf.template.default
# Add a template for "WPA2 Enterprise" encryption as used, e.g., by the
# Eduroam network. Taken and adapted from
# <http://wicd.net/punbb/viewtopic.php?id=87>.
cp -v "${./wpa2-ttls}" "$out/etc/encryption/templates/wpa2-ttls"
echo "wpa2-ttls" >> "$out/etc/encryption/templates/active"
'';
meta = with lib; {
homepage = "http://wicd.net/";
description = "A wiredless and wired network manager";
longDescription=''
A complete network connection manager
Wicd supports wired and wireless networks, and capable of
creating and tracking profiles for both. It has a
template-based wireless encryption system, which allows the user
to easily add encryption methods used. It ships with some common
encryption types, such as WPA and WEP. Wicd will automatically
connect at startup to any preferred network within range.
'';
maintainers = [ maintainers.roconnor ];
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View File

@ -1,120 +0,0 @@
diff -ruN wicd-1.7.2.4.orig/wicd/wicd-daemon.py wicd-1.7.2.4/wicd/wicd-daemon.py
--- wicd-1.7.2.4.orig/wicd/wicd-daemon.py 2013-06-22 18:55:02.641242947 +0000
+++ wicd-1.7.2.4/wicd/wicd-daemon.py 2013-06-22 18:58:33.990244153 +0000
@@ -69,6 +69,7 @@
wireless_conf = os.path.join(wpath.etc, "wireless-settings.conf")
wired_conf = os.path.join(wpath.etc, "wired-settings.conf")
dhclient_conf = os.path.join(wpath.etc, "dhclient.conf.template")
+dhclient_conf_default = os.path.join(wpath.share, "other", "dhclient.conf.template.default")
class WicdDaemon(dbus.service.Object):
""" The main wicd daemon class.
@@ -910,7 +911,7 @@
if not os.path.isfile(dhclient_conf):
print "dhclient.conf.template not found, copying..."
- shutil.copy(dhclient_conf + ".default", dhclient_conf)
+ shutil.copy(dhclient_conf_default, dhclient_conf)
# Hide the files, so the keys aren't exposed.
print "chmoding configuration files 0600..."
os.chmod(app_conf.get_config(), 0600)diff -ruN wicd-1.7.2.4.orig/wicd/wnettools.py wicd-1.7.2.4/wicd/wnettools.py
--- wicd-1.7.2.4.orig/wicd/wnettools.py 2013-03-30 21:47:19.804907552 +0000
+++ wicd-1.7.2.4/wicd/wnettools.py 2013-03-31 08:44:37.572792110 +0000
@@ -37,6 +37,7 @@
import time
from string import maketrans, translate
+import tempfile
import wpath
import misc
from misc import find_path
@@ -216,6 +217,7 @@
self.flush_tool = None
self.link_detect = None
self.dhcp_object = None
+ self.dhclient_conf_path = None;
def SetDebugMode(self, value):
""" If True, verbose output is enabled. """
@@ -277,12 +279,6 @@
cmd = ""
return (client, cmd)
- # probably /var/lib/wicd/dhclient.conf with defaults
- dhclient_conf_path = os.path.join(
- wpath.varlib,
- 'dhclient.conf'
- )
-
client_dict = {
"dhclient" :
{'connect' : r"%(cmd)s -cf %(dhclientconf)s %(iface)s",
@@ -307,41 +303,44 @@
}
(client_name, cmd) = get_client_name(self.DHCP_CLIENT)
- # cause dhclient doesn't have a handy dandy argument
- # for specifing the hostname to be sent
- if client_name == "dhclient" and flavor:
- if hostname == None:
- # <hostname> will use the system hostname
- # we'll use that if there is hostname passed
- # that shouldn't happen, though
- hostname = '<hostname>'
- print 'attempting to set hostname with dhclient'
- print 'using dhcpcd or another supported client may work better'
- dhclient_template = \
- open(os.path.join(wpath.etc, 'dhclient.conf.template'), 'r')
-
- output_conf = open(dhclient_conf_path, 'w')
-
- for line in dhclient_template.readlines():
- line = line.replace('$_HOSTNAME', hostname)
- output_conf.write(line)
-
- output_conf.close()
- dhclient_template.close()
- os.chmod(dhclient_conf_path, 0644)
-
if not client_name or not cmd:
print "WARNING: Failed to find a valid dhcp client!"
return ""
if flavor == "connect":
+ # cause dhclient doesn't have a handy dandy argument
+ # for specifing the hostname to be sent
+ if client_name == "dhclient" and flavor:
+ if hostname == None:
+ # <hostname> will use the system hostname
+ # we'll use that if there is hostname passed
+ # that shouldn't happen, though
+ hostname = '<hostname>'
+ print 'attempting to set hostname with dhclient'
+ print 'using dhcpcd or another supported client may work better'
+ if not self.dhclient_conf_path:
+ _,self.dhclient_conf_path = tempfile.mkstemp()
+ print 'New dhclient conf path: %s ' % self.dhclient_conf_path
+ dhclient_template = \
+ open(os.path.join(wpath.etc, 'dhclient.conf.template'), 'r')
+
+ output_conf = open(self.dhclient_conf_path, 'w')
+
+ for line in dhclient_template.readlines():
+ line = line.replace('$_HOSTNAME', hostname)
+ output_conf.write(line)
+
+ output_conf.close()
+ dhclient_template.close()
+ os.chmod(self.dhclient_conf_path, 0644)
+
if not hostname:
hostname = os.uname()[1]
return client_dict[client_name]['connect'] % \
{ "cmd" : cmd,
"iface" : self.iface,
"hostname" : hostname,
- 'dhclientconf' : dhclient_conf_path }
+ 'dhclientconf' : self.dhclient_conf_path }
elif flavor == "release":
return client_dict[client_name]['release'] % {"cmd":cmd, "iface":self.iface}
else:

View File

@ -1,19 +0,0 @@
Someone forgot to pack wicd.png icon. We will replace it with existing one.
diff -ruN wicd-1.7.2.4.orig/gtk/gui.py wicd-1.7.2.4/gtk/gui.py
--- wicd-1.7.2.4.orig/gtk/gui.py 2013-03-30 21:47:19.802907553 +0000
+++ wicd-1.7.2.4/gtk/gui.py 2013-03-31 08:13:32.876871673 +0000
@@ -205,8 +205,10 @@
self.status_area.hide_all()
- if os.path.exists(os.path.join(wpath.images, "wicd.png")):
- self.window.set_icon_from_file(os.path.join(wpath.images, "wicd.png"))
+ if os.path.exists(os.path.join(wpath.images, "../../icons/hicolour/128x128/apps/wicd-gtk.png")):
+ self.window.set_icon_from_file(os.path.join(wpath.images, "../../icons/hicolor/128x128/apps/wicd-gtk.png"))
+ else:
+ print 'icon doesn\'t exist %s' % os.path.join(wpath.images, "../../icons/hicolor/128x128/apps/wicd-gtk.png")
self.statusID = None
self.first_dialog_load = True
self.is_visible = True

View File

@ -1,15 +0,0 @@
--- a/curses/wicd-curses.py 2015-01-27 22:35:25.414781192 -0300
+++ b/curses/wicd-curses.py 2015-01-28 01:13:48.078904587 -0300
@@ -1153,9 +1153,10 @@
if not ui._started:
return False
- input_data = ui.get_input_nonblocking()
+ ui.set_input_timeouts(max_wait=0)
+ input_data = ui.get_input()
# Resolve any "alarms" in the waiting
- self.handle_keys(input_data[1])
+ self.handle_keys(input_data)
# Update the screen
canvas = self.frame.render((self.size), True)

View File

@ -1,47 +0,0 @@
diff -ruN wicd-1.7.2.4.orig/gtk/gui.py wicd-1.7.2.4/gtk/gui.py
--- wicd-1.7.2.4.orig/gtk/gui.py 2013-03-31 17:01:29.367001288 +0000
+++ wicd-1.7.2.4/gtk/gui.py 2013-03-31 17:55:20.826028396 +0000
@@ -35,7 +35,7 @@
from wicd import misc
from wicd import wpath
from wicd import dbusmanager
-from wicd.misc import noneToString
+from wicd.misc import noneToString, _status_dict
from wicd.translations import _, language
import prefs
from prefs import PreferencesDialog
@@ -250,7 +250,7 @@
def handle_connection_results(self, results):
if results not in ['success', 'aborted'] and self.is_visible:
- error(self.window, language[results], block=False)
+ error(self.window, misc._status_dict[results], block=False)
def create_adhoc_network(self, widget=None):
""" Shows a dialog that creates a new adhoc network. """
diff -ruN wicd-1.7.2.4.orig/po/ru.po wicd-1.7.2.4/po/ru.po
--- wicd-1.7.2.4.orig/po/ru.po 2013-03-31 17:01:29.362001288 +0000
+++ wicd-1.7.2.4/po/ru.po 2013-03-31 17:43:37.909022515 +0000
@@ -173,7 +173,7 @@
#: wicd/misc.py:79
msgid "Connection Failed: Bad password"
-msgstr "Ошибка соединения: Неверный пароль:"
+msgstr "Ошибка соединения: Неверный пароль"
#: wicd/misc.py:89
msgid "Connection Failed: No DHCP offers received."
diff -ruN wicd-1.7.2.4.orig/wicd/misc.py wicd-1.7.2.4/wicd/misc.py
--- wicd-1.7.2.4.orig/wicd/misc.py 2013-03-31 17:01:29.369001288 +0000
+++ wicd-1.7.2.4/wicd/misc.py 2013-03-31 17:23:56.822012593 +0000
@@ -430,7 +430,9 @@
""" Sanitize property names to be used in config-files. """
allowed = string.ascii_letters + '_' + string.digits
table = string.maketrans(allowed, ' ' * len(allowed))
- return s.translate(None, table)
+ #return s.translate(None, table)
+ #return s.translate(table)
+ return s
def sanitize_escaped(s):
""" Sanitize double-escaped unicode strings. """

View File

@ -1,21 +0,0 @@
With optimizations on, python will overwrite the nix store.
--- wicd-1.7.0/in/scripts=wicd.in 2011-04-05 14:31:09.733096865 -0400
+++ wicd-1.7.0/in/scripts=wicd.in 2011-04-05 14:31:16.397096864 -0400
@@ -1,3 +1,3 @@
#!/bin/bash
-exec %PYTHON% -O %SHARE%daemon/wicd-daemon.py $@
+exec %PYTHON% -B %SHARE%daemon/wicd-daemon.py $@
--- wicd-1.7.2.4/wicd/wicd-daemon.py 2012-04-30 21:19:45.000000000 +0200
+++ wicd-1.7.2.4/wicd/wicd-daemon.pynew 2013-03-14 21:35:23.250306592 +0100
@@ -1812,7 +1812,7 @@
daemon = WicdDaemon(wicd_bus, auto_connect=auto_connect)
child_pid = None
if not no_poll:
- child_pid = Popen([wpath.python, "-O",
+ child_pid = Popen([wpath.python, "-B",
os.path.join(wpath.daemon, "monitor.py")],
shell=False, close_fds=True).pid
atexit.register(on_exit, child_pid)

View File

@ -1,17 +0,0 @@
The install tries to create files in /var. This patch removes those steps.
--- wicd-1.7.2.4/setup.py 2013-03-14 21:28:21.360580941 +0100
+++ wicd-1.7.2.4/setup.py 2013-03-14 21:22:50.125721943 +0100
@@ -505,11 +505,8 @@
(wpath.dbus_service, ['other/org.wicd.daemon.service']),
(wpath.systemd, ['other/wicd.service']),
(wpath.logrotate, ['other/wicd.logrotate']),
- (wpath.log, [empty_file]),
- (wpath.etc, ['other/dhclient.conf.template.default']),
(wpath.encryption, [('encryption/templates/' + b) for b in
os.listdir('encryption/templates') if not b.startswith('.')]),
- (wpath.networks, [empty_file]),
(wpath.sbin, ['scripts/wicd']),
(wpath.daemon, ['wicd/monitor.py', 'wicd/wicd-daemon.py',
'wicd/suspend.py', 'wicd/autoconnect.py']),

View File

@ -1,15 +0,0 @@
For some reason nix's pygtk doesn't have a pygtk module so we remove the version check.
If this ever changes we could remove this patch.
--- wicd-1.7.0/gtk/wicd-client.py 2009-09-01 11:05:31.000000000 -0400
+++ wicd-1.7.0/gtk/wicd-client.py 2009-12-28 00:22:57.000000000 -0500
@@ -43,9 +43,6 @@
import atexit
from dbus import DBusException
-import pygtk
-pygtk.require('2.0')
-
HAS_NOTIFY = True
try:
import pynotify

View File

@ -1,21 +0,0 @@
--- a/curses/curses_misc.py
+++ a/curses/curses_misc.py
@@ -358,6 +358,19 @@ class ComboBox(urwid.WidgetWrap):
self.parent = None
self.ui = None
self.row = None
+
+ @property
+ def focus(self):
+ return self._focus
+
+ @focus.setter
+ def focus(self, index):
+ self._focus = index
+
+ @focus.deleter
+ def focus(self):
+ del self._focus
+
def set_list(self,list):
self.list = list

View File

@ -1,20 +0,0 @@
name = WPA2-TTLS
author = various contributors
version = 1
require identity *Identity anonymous_identity *Anonymous_identity password *Password ca_cert *Path_to_CA_Cert
protected password *Password
-----
ctrl_interface=/run/wpa_supplicant
network={
ssid="$_ESSID"
scan_ssid=$_SCAN
proto=WPA2
key_mgmt=WPA-EAP
group=CCMP TKIP
eap=TTLS
identity="$_IDENTITY"
password="$_PASSWORD"
anonymous_identity="$_ANONYMOUS_IDENTITY"
ca_cert="$_CA_CERT"
phase2="auth=PAP"
}

View File

@ -947,6 +947,7 @@ mapAliases ({
webkitgtk24x-gtk3 = throw "webkitgtk24x-gtk3 has been removed because it's insecure. Please use webkitgtk."; # added 2019-12-05
webkitgtk24x-gtk2 = throw "webkitgtk24x-gtk2 has been removed because it's insecure. Please use webkitgtk."; # added 2019-12-05
weechat-matrix-bridge = weechatScripts.weechat-matrix-bridge; # added 2018-09-06
wicd = throw "wicd has been removed as it is abandoned."; # added 2021-09-11
wineStaging = wine-staging; # added 2018-01-08
winusb = woeusb; # added 2017-12-22
winstone = throw "winstone is not supported anymore. Alternatives are Jetty or Tomcat."; # added 2019-05-14

View File

@ -10340,8 +10340,6 @@ with pkgs;
chase = callPackage ../tools/system/chase { };
wicd = callPackage ../tools/networking/wicd { };
wimlib = callPackage ../tools/archivers/wimlib { };
wipe = callPackage ../tools/security/wipe { };

View File

@ -166,7 +166,6 @@ with import ./release-lib.nix { inherit supportedSystems nixpkgsArgs; };
webkitgtk = linux;
wget = all;
which = all;
wicd = linux;
wireshark = linux;
wirelesstools = linux;
wpa_supplicant = linux;