diff --git a/appvm/qubes.rules b/appvm/qubes.rules index e3fc50e..5b3a502 100644 --- a/appvm/qubes.rules +++ b/appvm/qubes.rules @@ -1 +1 @@ -SUBSYSTEM=="block", KERNEL=="xvdh", ACTION=="add", RUN+="/usr/bin/qubes_add_pendrive_script" +SUBSYSTEM=="block", KERNEL=="xvdh", ACTION=="add", RUN+="/usr/lib/qubes/qubes_add_pendrive_script" diff --git a/appvm/qubes_add_pendrive_script.c b/appvm/qubes_add_pendrive_script.c index 41823ae..bb70861 100644 --- a/appvm/qubes_add_pendrive_script.c +++ b/appvm/qubes_add_pendrive_script.c @@ -189,7 +189,7 @@ void dvm_transaction_request(char *seq, struct xs_handle *xs) if (stat_pre.st_mtime == stat_post.st_mtime) suicide(xs); xs_daemon_close(xs); - execl("/usr/bin/qvm-dvm-transfer", "qvm-dvm-transfer", src_vm, + execl("/usr/lib/qubes/qvm-dvm-transfer", "qvm-dvm-transfer", src_vm, filename, seq, NULL); syslog(LOG_DAEMON | LOG_ERR, "execl qvm-dvm-transfer"); suicide(xs); diff --git a/appvm/qvm-copy-to-vm b/appvm/qvm-copy-to-vm index def32d7..1af03ec 100755 --- a/appvm/qvm-copy-to-vm +++ b/appvm/qvm-copy-to-vm @@ -24,7 +24,7 @@ if [ $# -lt 2 ] ; then echo usage: $0 'vmname file [file]*' exit 1 fi -qubes_penctl new || exit 1 +/usr/lib/qubes/qubes_penctl new || exit 1 echo -n Waiting for the Qubes virtual pendrive while ! [ -e /dev/xvdg ] ; do echo -n . @@ -37,4 +37,4 @@ shift cp -v -a "$@" /mnt/outgoing #sometimes Dolphin lags a bit umount /mnt/outgoing || (sleep 1; umount /mnt/outgoing) || exit 1 -qubes_penctl send $VMNAME || exit 1 +/usr/lib/qubes/qubes_penctl send $VMNAME || exit 1 diff --git a/appvm/qvm-copy.desktop b/appvm/qvm-copy.desktop index 6d7ebc6..5795eb6 100644 --- a/appvm/qvm-copy.desktop +++ b/appvm/qvm-copy.desktop @@ -4,7 +4,7 @@ Type=Service X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory,all/allfiles [Desktop Action QvmCopy] -Exec=/usr/bin/qvm-copy-to-vm.kde %U +Exec=/usr/lib/qubes/qvm-copy-to-vm.kde %U Icon=kget Name=Send To VM diff --git a/common/qubes_nmhook b/common/qubes_nmhook index d06cd57..b9028de 100755 --- a/common/qubes_nmhook +++ b/common/qubes_nmhook @@ -1,2 +1,2 @@ #!/bin/sh -/usr/bin/qubes_setup_dnat_to_ns +/usr/lib/qubes/qubes_setup_dnat_to_ns diff --git a/common/qubes_setup_dnat_to_ns b/common/qubes_setup_dnat_to_ns index e484191..67a1b90 100755 --- a/common/qubes_setup_dnat_to_ns +++ b/common/qubes_setup_dnat_to_ns @@ -10,7 +10,7 @@ addrule() fi } export PATH=$PATH:/sbin:/bin -source /var/run/qubes_ns +source /var/run/qubes/qubes_ns if [ "X"$NS1 = "X" ] ; then exit ; fi iptables -t nat -F PREROUTING FIRSTONE=yes diff --git a/netvm/qubes_core b/netvm/qubes_core index 4be4f4c..aebf4d7 100755 --- a/netvm/qubes_core +++ b/netvm/qubes_core @@ -28,9 +28,9 @@ start() secondary_dns=$(/usr/bin/xenstore-read qubes_netvm_secondary_dns) ifconfig br0 $gateway netmask $netmask up ifconfig br0:1 $secondary_dns netmask $netmask - echo "NS1=$gateway" > /var/run/qubes_ns - echo "NS2=$secondary_dns" >> /var/run/qubes_ns - qubes_setup_dnat_to_ns + echo "NS1=$gateway" > /var/run/qubes/qubes_ns + echo "NS2=$secondary_dns" >> /var/run/qubes/qubes_ns + /usr/lib/qubes/qubes_setup_dnat_to_ns echo "1" > /proc/sys/net/ipv4/ip_forward #now no need for dnsmasq # dnsmasq --listen-address $gateway --bind-interfaces diff --git a/rpm_spec/core-appvm.spec b/rpm_spec/core-appvm.spec index 143aa3d..a4444f0 100644 --- a/rpm_spec/core-appvm.spec +++ b/rpm_spec/core-appvm.spec @@ -61,10 +61,10 @@ mkdir -p $RPM_BUILD_ROOT/etc/init.d cp qubes_core $RPM_BUILD_ROOT/etc/init.d/ mkdir -p $RPM_BUILD_ROOT/var/lib/qubes mkdir -p $RPM_BUILD_ROOT/usr/bin -cp qubes_timestamp qubes_add_pendrive_script qubes_penctl \ - qvm-copy-to-vm qvm-copy-to-vm.kde \ - qvm-open-in-dvm $RPM_BUILD_ROOT/usr/bin -ln -s qvm-open-in-dvm $RPM_BUILD_ROOT/usr/bin/qvm-dvm-transfer +cp qubes_timestamp qvm-copy-to-vm qvm-open-in-dvm $RPM_BUILD_ROOT/usr/bin +mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes +cp qubes_add_pendrive_script qubes_penctl qvm-copy-to-vm.kde $RPM_BUILD_ROOT/usr/lib/qubes +ln -s /usr/bin/qvm-open-in-dvm $RPM_BUILD_ROOT/usr/lib/qubes/qvm-dvm-transfer mkdir -p $RPM_BUILD_ROOT/%{kde_service_dir} cp qvm-copy.desktop qvm-dvm.desktop $RPM_BUILD_ROOT/%{kde_service_dir} mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d @@ -184,13 +184,13 @@ rm -rf $RPM_BUILD_ROOT /etc/fstab /etc/init.d/qubes_core /usr/bin/qvm-copy-to-vm -/usr/bin/qvm-copy-to-vm.kde +/usr/lib/qubes/qvm-copy-to-vm.kde %attr(4755,root,root) /usr/bin/qvm-open-in-dvm -/usr/bin/qvm-dvm-transfer +/usr/lib/qubes/qvm-dvm-transfer %{kde_service_dir}/qvm-copy.desktop %{kde_service_dir}/qvm-dvm.desktop -%attr(4755,root,root) /usr/bin/qubes_penctl -/usr/bin/qubes_add_pendrive_script +%attr(4755,root,root) /usr/lib/qubes/qubes_penctl +/usr/lib/qubes/qubes_add_pendrive_script /etc/udev/rules.d/qubes.rules /etc/sysconfig/iptables /var/lib/qubes diff --git a/rpm_spec/core-netvm.spec b/rpm_spec/core-netvm.spec index 4081dbb..5d130e1 100644 --- a/rpm_spec/core-netvm.spec +++ b/rpm_spec/core-netvm.spec @@ -59,10 +59,10 @@ cp fstab $RPM_BUILD_ROOT/etc/fstab mkdir -p $RPM_BUILD_ROOT/etc/init.d cp qubes_core $RPM_BUILD_ROOT/etc/init.d/ mkdir -p $RPM_BUILD_ROOT/var/lib/qubes -mkdir -p $RPM_BUILD_ROOT/usr/bin -cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/bin +mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes +cp ../common/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/usr/lib/qubes mkdir -p $RPM_BUILD_ROOT/etc/dhclient.d -ln -s /usr/bin/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes_setup_dnat_to_ns.sh +ln -s /usr/lib/qubes/qubes_setup_dnat_to_ns $RPM_BUILD_ROOT/etc/dhclient.d/qubes_setup_dnat_to_ns.sh mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/ cp ../common/qubes_nmhook $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/ mkdir -p $RPM_BUILD_ROOT/etc/yum.repos.d @@ -71,6 +71,7 @@ mkdir -p $RPM_BUILD_ROOT/sbin cp ../common/qubes_serial_login $RPM_BUILD_ROOT/sbin mkdir -p $RPM_BUILD_ROOT/etc cp ../common/serial.conf $RPM_BUILD_ROOT/var/lib/qubes/ +mkdir -p $RPM_BUILD_ROOT/var/run/qubes %triggerin -- initscripts cp /var/lib/qubes/serial.conf /etc/init/serial.conf @@ -168,8 +169,9 @@ rm -rf $RPM_BUILD_ROOT /etc/sysconfig/iptables /etc/init.d/qubes_core /var/lib/qubes -/usr/bin/qubes_setup_dnat_to_ns +/usr/lib/qubes/qubes_setup_dnat_to_ns /etc/dhclient.d/qubes_setup_dnat_to_ns.sh /etc/NetworkManager/dispatcher.d/qubes_nmhook /etc/yum.repos.d/qubes.repo /sbin/qubes_serial_login +%dir /var/run/qubes