diff options
author | Katharina Fey <kookie@spacekookie.de> | 2019-10-05 12:43:18 +0000 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2019-10-05 12:44:52 +0000 |
commit | cf85056ba64caf3267d43255ef4a1243e9c8ee3b (patch) | |
tree | 3051519e9c8275b870aac43f80af875715c9d124 /nixpkgs/pkgs/misc/screensavers/vlock | |
parent | 1148b1d122bc03e9a3665856c9b7bb96bd4e3994 (diff) | |
parent | 2436c27541b2f52deea3a4c1691216a02152e729 (diff) |
Add 'nixpkgs/' from commit '2436c27541b2f52deea3a4c1691216a02152e729'
git-subtree-dir: nixpkgs
git-subtree-mainline: 1148b1d122bc03e9a3665856c9b7bb96bd4e3994
git-subtree-split: 2436c27541b2f52deea3a4c1691216a02152e729
Diffstat (limited to 'nixpkgs/pkgs/misc/screensavers/vlock')
-rw-r--r-- | nixpkgs/pkgs/misc/screensavers/vlock/default.nix | 29 | ||||
-rw-r--r-- | nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch | 34 |
2 files changed, 63 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/misc/screensavers/vlock/default.nix b/nixpkgs/pkgs/misc/screensavers/vlock/default.nix new file mode 100644 index 00000000000..ae89bbd53cc --- /dev/null +++ b/nixpkgs/pkgs/misc/screensavers/vlock/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pam }: + +stdenv.mkDerivation { + name = "vlock-2.2.2"; + src = fetchurl + { + url = mirror://debian/pool/main/v/vlock/vlock_2.2.2.orig.tar.gz; + sha256 = "1b9gv7hmlb8swda5bn40lp1yki8b8wv29vdnhcjqfl6ir98551za"; + }; + + prePatch = '' + sed -i -e '/INSTALL/ { + s/-[og] [^ ]*//g; s/4711/755/ + }' Makefile modules/Makefile + ''; + + patches = [ ./eintr.patch ]; + + configureFlags = [ "VLOCK_GROUP=root" "ROOT_GROUP=root" ]; + + buildInputs = [ pam ]; + + meta = with stdenv.lib; { + description = "Virtual console locking program"; + license = licenses.gpl2; + maintainers = [ maintainers.lethalman ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch b/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch new file mode 100644 index 00000000000..64f43243432 --- /dev/null +++ b/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch @@ -0,0 +1,34 @@ +In systemd I have seen this error, using it as a service: + +vlock-start[14567]: vlock-new: could not activate new terminal: Interrupted system call + +I think this should fix that. + +Also on github: https://github.com/viric/vlock/commit/781a26087f83c7247601b6f82f784cca9266694e + +diff --git a/modules/new.c b/modules/new.c +index e9b15fb..7aed640 100644 +--- a/modules/new.c ++++ b/modules/new.c +@@ -103,9 +103,19 @@ static char *get_console_name(int n) + * file descriptor. */ + static int activate_console(int consfd, int vtno) + { +- int c = ioctl(consfd, VT_ACTIVATE, vtno); ++ int c; ++ do { ++ c = ioctl(consfd, VT_ACTIVATE, vtno); ++ } while(c != 0 && errno == EINTR); + +- return c < 0 ? c : ioctl(consfd, VT_WAITACTIVE, vtno); ++ if (c < 0) ++ return c; ++ ++ do { ++ c = ioctl(consfd, VT_WAITACTIVE, vtno); ++ } while(c != 0 && errno == EINTR); ++ ++ return c; + } + + struct new_console_context { |