upstart: remove ancient
This commit is contained in:
parent
df33d1a2fc
commit
8dca9bff66
@ -1,43 +0,0 @@
|
|||||||
# Useful tool to check syntax of a config file. Upstart needs a dbus
|
|
||||||
# session, so this script wraps one up and makes the operation not
|
|
||||||
# require any prior state.
|
|
||||||
#
|
|
||||||
# See: http://mwhiteley.com/scripts/2012/12/11/dbus-init-checkconf.html
|
|
||||||
{stdenv, coreutils, upstart, writeScript, dbus}:
|
|
||||||
|
|
||||||
writeScript "upstart-check-config" ''
|
|
||||||
#!${stdenv.shell}
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
|
|
||||||
export PATH=${stdenv.lib.makeBinPath [dbus.out upstart coreutils]}:$PATH
|
|
||||||
|
|
||||||
if [[ $# -ne 1 ]]
|
|
||||||
then
|
|
||||||
echo "Usage: $0 upstart-conf-file" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
config=$1 && shift
|
|
||||||
|
|
||||||
dbus_pid_file=$(mktemp)
|
|
||||||
exec 4<> $dbus_pid_file
|
|
||||||
|
|
||||||
dbus_add_file=$(mktemp)
|
|
||||||
exec 6<> $dbus_add_file
|
|
||||||
|
|
||||||
dbus-daemon --fork --print-pid 4 --print-address 6 --session
|
|
||||||
|
|
||||||
function clean {
|
|
||||||
dbus_pid=$(cat $dbus_pid_file)
|
|
||||||
if [[ -n $dbus_pid ]]; then
|
|
||||||
kill $dbus_pid
|
|
||||||
fi
|
|
||||||
rm -f $dbus_pid_file $dbus_add_file
|
|
||||||
}
|
|
||||||
trap "{ clean; }" EXIT
|
|
||||||
|
|
||||||
export DBUS_SESSION_BUS_ADDRESS=$(cat $dbus_add_file)
|
|
||||||
|
|
||||||
init-checkconf $config
|
|
||||||
''
|
|
@ -1,58 +0,0 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, dbus, libnih, python, makeWrapper, utillinux
|
|
||||||
, writeScript }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (stdenv.lib) makeBinPath;
|
|
||||||
version = "1.5";
|
|
||||||
|
|
||||||
upstart = stdenv.mkDerivation rec {
|
|
||||||
name = "upstart-${version}";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "http://upstart.ubuntu.com/download/${version}/${name}.tar.gz";
|
|
||||||
sha256 = "01w4ab6nlisz5blb0an1sxjkndwikr7sjp0cmz4lg00g3n7gahmx";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ pkgconfig dbus libnih python makeWrapper];
|
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE =
|
|
||||||
''
|
|
||||||
-DSHELL="${stdenv.shell}"
|
|
||||||
-DCONFFILE="/etc/init.conf"
|
|
||||||
-DCONFDIR="/etc/init"
|
|
||||||
-DPATH="/no-path"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# The interface version prevents NixOS from switching to an
|
|
||||||
# incompatible Upstart at runtime. (Switching across reboots is
|
|
||||||
# fine, of course.) It should be increased whenever Upstart changes
|
|
||||||
# in a backwards-incompatible way. If the interface version of two
|
|
||||||
# Upstart builds is the same, then we can switch between them at
|
|
||||||
# runtime; otherwise we can't and we need to reboot.
|
|
||||||
passthru.interfaceVersion = 2;
|
|
||||||
|
|
||||||
postInstall =
|
|
||||||
''
|
|
||||||
t=$out/etc/bash_completion.d
|
|
||||||
mkdir -p $t
|
|
||||||
cp ${./upstart-bash-completion} $t/upstart
|
|
||||||
|
|
||||||
# Patch some binaries to refer to the correct binary location.
|
|
||||||
sed -i "s,/sbin/init,$out/bin/init,g" $out/bin/init-checkconf
|
|
||||||
sed -i "s,initctl,$out/bin/initctl," $out/bin/initctl2dot
|
|
||||||
|
|
||||||
# Add some missing executable permissions, and wrap binaries.
|
|
||||||
chmod +x $out/bin/init-checkconf $out/bin/init-checkconf
|
|
||||||
wrapProgram $out/bin/init-checkconf \
|
|
||||||
--prefix PATH : $out/bin:${makeBinPath [utillinux dbus]}
|
|
||||||
wrapProgram $out/bin/initctl2dot --prefix PATH : $out/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://upstart.ubuntu.com/;
|
|
||||||
description = "An event-based replacement for the /sbin/init daemon";
|
|
||||||
platforms = stdenv.lib.platforms.linux;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
in upstart
|
|
@ -1,18 +0,0 @@
|
|||||||
_upstart_comp_list(){
|
|
||||||
COMPREPLY=()
|
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
|
||||||
if [ $COMP_CWORD -eq 1 ]; then
|
|
||||||
COMPREPLY=( $(compgen -o filenames -W "$@" $cur) )
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_upstart_complete() { _upstart_comp_list "$(initctl list 2>&1 | grep -E "$1" | cut -f2 -d ' ')"; }
|
|
||||||
|
|
||||||
_waiting(){ _upstart_complete "(waiting|instance)"; }
|
|
||||||
_running(){ _upstart_complete "(running|instance)"; }
|
|
||||||
_jobs(){ _upstart_comp_list "$(ls -1 /etc/event.d 2> /dev/null)"; }
|
|
||||||
|
|
||||||
complete -F _jobs status
|
|
||||||
complete -F _waiting start
|
|
||||||
complete -F _running stop
|
|
||||||
complete -F _running restart
|
|
@ -12754,10 +12754,6 @@ with pkgs;
|
|||||||
|
|
||||||
upower = callPackage ../os-specific/linux/upower { };
|
upower = callPackage ../os-specific/linux/upower { };
|
||||||
|
|
||||||
upstart = callPackage ../os-specific/linux/upstart { };
|
|
||||||
|
|
||||||
upstart-check-config = callPackage ../os-specific/linux/upstart/check-config.nix {};
|
|
||||||
|
|
||||||
usbguard = libsForQt5.callPackage ../os-specific/linux/usbguard {
|
usbguard = libsForQt5.callPackage ../os-specific/linux/usbguard {
|
||||||
libgcrypt = null;
|
libgcrypt = null;
|
||||||
};
|
};
|
||||||
|
@ -159,7 +159,6 @@ with import ./release-lib.nix { inherit supportedSystems; };
|
|||||||
udev = linux;
|
udev = linux;
|
||||||
unar = linux;
|
unar = linux;
|
||||||
unzip = all;
|
unzip = all;
|
||||||
upstart = linux;
|
|
||||||
usbutils = linux;
|
usbutils = linux;
|
||||||
utillinux = linux;
|
utillinux = linux;
|
||||||
utillinuxMinimal = linux;
|
utillinuxMinimal = linux;
|
||||||
|
Loading…
Reference in New Issue
Block a user