diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-01-22 23:23:53 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-01-22 23:23:53 +0100 |
commit | 0a47a28f1df3bdf7b2cf074af84a432aa48cbba7 (patch) | |
tree | 6c953c0d58cf6d178795383fefe9babddaa7da4e /pkgs/os-specific | |
parent | 3e2e62ca31311dd7e5237aa97a815458a44a3a3e (diff) | |
parent | 296cd6600943d5a349cda55a36137331f8c3eec8 (diff) | |
download | nixpkgs-0a47a28f1df3bdf7b2cf074af84a432aa48cbba7.tar nixpkgs-0a47a28f1df3bdf7b2cf074af84a432aa48cbba7.tar.gz nixpkgs-0a47a28f1df3bdf7b2cf074af84a432aa48cbba7.tar.bz2 nixpkgs-0a47a28f1df3bdf7b2cf074af84a432aa48cbba7.tar.lz nixpkgs-0a47a28f1df3bdf7b2cf074af84a432aa48cbba7.tar.xz nixpkgs-0a47a28f1df3bdf7b2cf074af84a432aa48cbba7.tar.zst nixpkgs-0a47a28f1df3bdf7b2cf074af84a432aa48cbba7.zip |
Merge remote-tracking branch 'origin/master' into stdenv-updates
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/mcelog/default.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/udev/173.nix | 58 | ||||
-rw-r--r-- | pkgs/os-specific/linux/udev/custom-rules.patch | 91 | ||||
-rw-r--r-- | pkgs/os-specific/linux/udev/pre-accept4-kernel.patch | 43 | ||||
-rw-r--r-- | pkgs/os-specific/linux/udisks/default.nix | 7 | ||||
-rw-r--r-- | pkgs/os-specific/linux/udisks/no-pci-db.patch | 13 | ||||
-rw-r--r-- | pkgs/os-specific/linux/upower/default.nix | 2 |
7 files changed, 20 insertions, 200 deletions
diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix index 82c502ede72..b60b6134fdd 100644 --- a/pkgs/os-specific/linux/mcelog/default.nix +++ b/pkgs/os-specific/linux/mcelog/default.nix @@ -25,9 +25,13 @@ in stdenv.mkDerivation { makeFlags = "prefix=$(out) etcprefix=$(out) DOCDIR=$(out)/share/doc"; + preInstall = '' + ensureDir $out/share/doc + ''; + meta = { description = "Tool to display logged machine check exceptions"; homepage = http://mcelog.org/; license = stdenv.lib.licenses.gpl2; }; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/linux/udev/173.nix b/pkgs/os-specific/linux/udev/173.nix deleted file mode 100644 index 795826cf6bf..00000000000 --- a/pkgs/os-specific/linux/udev/173.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ stdenv, fetchurl, gperf, pkgconfig, glib, acl -, libusb, usbutils, pciutils }: - -assert stdenv ? glibc; - -stdenv.mkDerivation rec { - name = "udev-173"; - - src = fetchurl { - url = "mirror://kernel/linux/utils/kernel/hotplug/${name}.tar.bz2"; - sha256 = "1bxadi4bi11v8ipzj22wknv8hsb0wgdb99bx3w9w33rgl4aq78bh"; - }; - - buildInputs = [ gperf pkgconfig glib acl libusb usbutils ]; - - configureFlags = - '' - --with-pci-ids-path=${pciutils}/share/pci.ids - --enable-udev_acl --enable-edd - --disable-introspection --libexecdir=$(out)/lib/udev - --with-firmware-path=/root/test-firmware:/var/run/current-system/firmware - ''; - - # Workaround for the Linux kernel headers being too old. - NIX_CFLAGS_COMPILE = "-DBTN_TRIGGER_HAPPY=0x2c0"; - - postInstall = - '' - # The path to rule_generator.functions in write_cd_rules and - # write_net_rules is broken. Also, don't store the mutable - # persistant rules in /etc/udev/rules.d but in - # /var/lib/udev/rules.d. - for i in $out/lib/udev/write_cd_rules $out/lib/udev/write_net_rules; do - substituteInPlace $i \ - --replace /lib/udev $out/lib/udev \ - --replace /etc/udev/rules.d /var/lib/udev/rules.d - done - - # Don't set PATH to /bin:/sbin; won't work in NixOS. - sed -e '/PATH=/d' -i $out/lib/udev/rule_generator.functions - - ln -sv $out/lib/ConsoleKit $out/etc/ConsoleKit - - rm -frv $out/share/gtk-doc - ''; - - patches = [ ./custom-rules.patch ] ++ - [(fetchurl { - url = https://bugs.archlinux.org/task/25356?getfile=7281; - sha256 = "01xib1pfdbwacgx8dqxgrf67a0mwkpm4kxy9f9v3df93v0m4pmbm"; - })] ++ - stdenv.lib.optional stdenv.isArm ./pre-accept4-kernel.patch; - - meta = { - homepage = http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html; - description = "Udev manages the /dev filesystem"; - }; -} diff --git a/pkgs/os-specific/linux/udev/custom-rules.patch b/pkgs/os-specific/linux/udev/custom-rules.patch deleted file mode 100644 index 647691acfb1..00000000000 --- a/pkgs/os-specific/linux/udev/custom-rules.patch +++ /dev/null @@ -1,91 +0,0 @@ -commit c49ec33ba0f1a7f11b188913bb4895360ced67f8 -Author: Yury G. Kudryashov <urkud.urkud@gmail.com> -Date: Tue Aug 16 16:28:56 2011 +0400 - - Upstream considers presence of rules_dir=... in udev.conf as a very special case. - In particular, they disable /dev/.udev/*. Re-enable it. - -diff --git a/udev/udev-rules.c b/udev/udev-rules.c -index 6bf2726..c1ae1f3 100644 ---- a/udev/udev-rules.c -+++ b/udev/udev-rules.c -@@ -1812,6 +1812,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) - struct udev_list file_list; - struct udev_list_entry *file_loop; - struct token end_token; -+ char runpathrules[UTIL_PATH_SIZE]; - - rules = calloc(1, sizeof(struct udev_rules)); - if (rules == NULL) -@@ -1854,22 +1855,21 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) - rules->trie_nodes_cur = 1; - - if (udev_get_rules_path(udev) == NULL) { -- char filename[UTIL_PATH_SIZE]; - - /* /lib/udev -- default/package rules */ - add_matching_files(udev, &file_list, LIBEXECDIR "/rules.d", ".rules"); - - /* /etc/udev -- system-specific/user/admin rules */ - add_matching_files(udev, &file_list, SYSCONFDIR "/udev/rules.d", ".rules"); -- -- /* /run/udev -- throw-away/temporary rules */ -- util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL); -- add_matching_files(udev, &file_list, filename, ".rules"); - } else { - /* custom rules files location for testing */ - add_matching_files(udev, &file_list, udev_get_rules_path(udev), ".rules"); - } - -+ /* /run/udev -- throw-away/temporary rules */ -+ util_strscpyl(runpathrules, sizeof(runpathrules), udev_get_run_path(udev), "/rules.d", NULL); -+ add_matching_files(udev, &file_list, runpathrules, ".rules"); -+ - /* add all filenames to the string buffer */ - udev_list_entry_foreach(file_loop, udev_list_get_entry(&file_list)) { - const char *filename = udev_list_entry_get_value(file_loop); -diff --git a/udev/udevd.c b/udev/udevd.c -index f1a31e7..45d10b6 100644 ---- a/udev/udevd.c -+++ b/udev/udevd.c -@@ -1198,6 +1198,8 @@ int main(int argc, char *argv[]) - struct epoll_event ep_ctrl, ep_inotify, ep_signal, ep_netlink, ep_worker; - struct udev_ctrl_connection *ctrl_conn = NULL; - int rc = 1; -+ char filename[UTIL_PATH_SIZE]; -+ struct stat statbuf; - - udev = udev_new(); - if (udev == NULL) -@@ -1480,23 +1482,21 @@ int main(int argc, char *argv[]) - inotify_add_watch(fd_inotify, udev_get_rules_path(udev), - IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); - } else { -- char filename[UTIL_PATH_SIZE]; -- struct stat statbuf; - - inotify_add_watch(fd_inotify, LIBEXECDIR "/rules.d", - IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); - inotify_add_watch(fd_inotify, SYSCONFDIR "/udev/rules.d", - IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); -+ } - -- /* watch dynamic rules directory */ -- util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL); -- if (stat(filename, &statbuf) != 0) { -- util_create_path(udev, filename); -- mkdir(filename, 0755); -- } -- inotify_add_watch(fd_inotify, filename, -- IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); -+ /* watch dynamic rules directory */ -+ util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL); -+ if (stat(filename, &statbuf) != 0) { -+ util_create_path(udev, filename); -+ mkdir(filename, 0755); - } -+ inotify_add_watch(fd_inotify, filename, -+ IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); - udev_watch_restore(udev); - - /* block and listen to all signals on signalfd */ diff --git a/pkgs/os-specific/linux/udev/pre-accept4-kernel.patch b/pkgs/os-specific/linux/udev/pre-accept4-kernel.patch deleted file mode 100644 index 2cf549d99a7..00000000000 --- a/pkgs/os-specific/linux/udev/pre-accept4-kernel.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: -https://github.com/archlinuxarm/PKGBUILDs/blob/master/core/udev-oxnas/pre-accept4-kernel.patch - -diff -urN a/udev/udev-ctrl.c b/udev/udev-ctrl.c ---- a/udev/udev-ctrl.c 2011-10-09 17:10:32.000000000 -0600 -+++ b/udev/udev-ctrl.c 2011-10-25 15:11:09.000000000 -0600 -@@ -15,6 +15,7 @@ - #include <stddef.h> - #include <string.h> - #include <unistd.h> -+#include <fcntl.h> - #include <sys/types.h> - #include <sys/poll.h> - #include <sys/socket.h> -@@ -182,6 +183,7 @@ - struct ucred ucred; - socklen_t slen; - const int on = 1; -+ int flgs; - - conn = calloc(1, sizeof(struct udev_ctrl_connection)); - if (conn == NULL) -@@ -189,13 +191,19 @@ - conn->refcount = 1; - conn->uctrl = uctrl; - -- conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK); -+// conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK); -+ conn->sock = accept(uctrl->sock, NULL, NULL); - if (conn->sock < 0) { - if (errno != EINTR) - err(uctrl->udev, "unable to receive ctrl connection: %m\n"); - goto err; - } - -+// Since we don't have accept4 -+ flgs = fcntl(conn->sock, F_GETFL, NULL); -+ if(flgs >= 0) fcntl(conn->sock, F_SETFL, flgs | O_NONBLOCK); -+ fcntl(conn->sock, F_SETFD, FD_CLOEXEC); -+ - /* check peer credential of connection */ - slen = sizeof(ucred); - if (getsockopt(conn->sock, SOL_SOCKET, SO_PEERCRED, &ucred, &slen) < 0) { diff --git a/pkgs/os-specific/linux/udisks/default.nix b/pkgs/os-specific/linux/udisks/default.nix index ea4fd1ca2cb..b53af52755f 100644 --- a/pkgs/os-specific/linux/udisks/default.nix +++ b/pkgs/os-specific/linux/udisks/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "1xgqifddwaavmjc8c30i0mdffyirsld7c6qhfyjw7f9khwv8jjw5"; }; - patches = [ ./purity.patch ]; + patches = [ ./purity.patch ./no-pci-db.patch ]; postPatch = '' @@ -30,11 +30,6 @@ stdenv.mkDerivation rec { configureFlags = "--localstatedir=/var --enable-lvm2"; - preConfigure = - '' - # Ensure that udisks can find the necessary programs. - ''; - meta = { homepage = http://www.freedesktop.org/wiki/Software/udisks; description = "A daemon and command-line utility for querying and manipulating storage devices"; diff --git a/pkgs/os-specific/linux/udisks/no-pci-db.patch b/pkgs/os-specific/linux/udisks/no-pci-db.patch new file mode 100644 index 00000000000..b323b515c40 --- /dev/null +++ b/pkgs/os-specific/linux/udisks/no-pci-db.patch @@ -0,0 +1,13 @@ +Systemd no longer has the pci-db program. + +diff -ru -x '*~' udisks-1.0.4-orig/data/80-udisks.rules udisks-1.0.4/data/80-udisks.rules +--- udisks-1.0.4-orig/data/80-udisks.rules 2011-08-25 23:31:20.000000000 +0200 ++++ udisks-1.0.4/data/80-udisks.rules 2012-12-13 13:06:52.189650854 +0100 +@@ -3,7 +3,6 @@ + + # import names for PCI storage controllers + # +-SUBSYSTEM=="pci", ACTION=="add|change", ENV{ID_MODEL_FROM_DATABASE}=="", ATTR{class}=="0x01*", IMPORT{program}="pci-db %p" + + # Set eSATA port type for known eSATA CardBus adapters - first we want to ensure + # the device is on a cardbus controller (upper PCI device) - then we check diff --git a/pkgs/os-specific/linux/upower/default.nix b/pkgs/os-specific/linux/upower/default.nix index c31dae1fdfa..cce12f7954a 100644 --- a/pkgs/os-specific/linux/upower/default.nix +++ b/pkgs/os-specific/linux/upower/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, glib, dbus, dbus_glib, dbus_tools, polkit , intltool, libxslt, docbook_xsl, udev, libusb1, pmutils -, useSystemd ? false, systemd ? null +, useSystemd ? true, systemd }: assert stdenv.isLinux; |