The Underscores Revolution: filenames

This commit is contained in:
Marek Marczykowski 2013-03-14 15:06:19 +01:00
parent e1472df9dd
commit 341f202a26
31 changed files with 81 additions and 81 deletions

View File

@ -38,11 +38,11 @@ mkdir -p $APPSDIR
if [ "$SRCDIR" != "none" ]; then
echo "--> Converting Appmenu Templates..."
if [ -r "$VMDIR/whitelisted-appmenus.list" ]; then
cat $VMDIR/whitelisted-appmenus.list | xargs -I{} /usr/lib/qubes/convert_apptemplate2vm.sh $SRCDIR/{} $APPSDIR $VMNAME $VMDIR
cat $VMDIR/whitelisted-appmenus.list | xargs -I{} /usr/lib/qubes/convert-apptemplate2vm.sh $SRCDIR/{} $APPSDIR $VMNAME $VMDIR
else
find $SRCDIR -name "*.desktop" $CHECK_WHITELISTED -exec /usr/lib/qubes/convert_apptemplate2vm.sh {} $APPSDIR $VMNAME $VMDIR \;
find $SRCDIR -name "*.desktop" $CHECK_WHITELISTED -exec /usr/lib/qubes/convert-apptemplate2vm.sh {} $APPSDIR $VMNAME $VMDIR \;
fi
/usr/lib/qubes/convert_apptemplate2vm.sh /usr/share/qubes/qubes-appmenu-select.desktop $APPSDIR $VMNAME $VMDIR
/usr/lib/qubes/convert-apptemplate2vm.sh /usr/share/qubes/qubes-appmenu-select.desktop $APPSDIR $VMNAME $VMDIR
if [ "$VMTYPE" = "vm-templates" ]; then
DIR_TEMPLATE=/usr/share/qubes/qubes-templatevm.directory.template
@ -51,7 +51,7 @@ if [ "$SRCDIR" != "none" ]; then
else
DIR_TEMPLATE=/usr/share/qubes/qubes-vm.directory.template
fi
/usr/lib/qubes/convert_dirtemplate2vm.sh $DIR_TEMPLATE $APPSDIR/$VMNAME-vm.directory $VMNAME $VMDIR
/usr/lib/qubes/convert-dirtemplate2vm.sh $DIR_TEMPLATE $APPSDIR/$VMNAME-vm.directory $VMNAME $VMDIR
fi
echo "--> Adding Apps to the Menu..."

View File

@ -2,7 +2,7 @@
# Misc dom0 startup setup
/usr/lib/qubes/fix_dir_perms.sh
/usr/lib/qubes/fix-dir-perms.sh
xenstore-write /local/domain/0/name dom0
DOM0_MAXMEM=`/usr/sbin/xl info | grep total_memory | awk '{ print $3 }'`
xenstore-write /local/domain/0/memory/static-max $[ $DOM0_MAXMEM * 1024 ]
@ -10,12 +10,12 @@ xenstore-write /local/domain/0/memory/static-max $[ $DOM0_MAXMEM * 1024 ]
xl sched-credit -d 0 -w 512
cp /var/lib/qubes/qubes.xml /var/lib/qubes/backup/qubes-$(date +%F-%T).xml
/usr/lib/qubes/cleanup_dispvms
/usr/lib/qubes/cleanup-dispvms
# Hide mounted devices from qubes-block list (at first udev run, only / is mounted)
for dev in `xenstore-list /local/domain/0/qubes-block-devices 2> /dev/null`; do
( eval `udevadm info -q property -n $dev|sed -e 's/\([^=]*\)=\(.*\)/export \1="\2"/'`;
/usr/lib/qubes/block_add_change > /dev/null
/usr/lib/qubes/udev-block-add-change > /dev/null
)
done

View File

@ -8,7 +8,7 @@
## running in dom0.
##
# FIXME: Ignore USB hubs and other wierd devices (see also in usb_remove).
# FIXME: Ignore USB hubs and other wierd devices (see also in udev-usb-remove).
[ "`echo $TYPE | cut -f1 -d/`" = "9" ] && exit 0
[ "$DEVTYPE" != "usb_device" ] && exit 0

View File

@ -102,10 +102,10 @@ dom0_min_memory = 700*1024*1024
# must be able to ask Dom0 VM about how much memory it currently has...
dom0_vm = None
qubes_appmenu_create_cmd = "/usr/lib/qubes/create_apps_for_appvm.sh"
qubes_appmenu_remove_cmd = "/usr/lib/qubes/remove_appvm_appmenus.sh"
qubes_pciback_cmd = '/usr/lib/qubes/unbind_pci_device.sh'
prepare_volatile_img_cmd = '/usr/lib/qubes/prepare_volatile_img.sh'
qubes_appmenu_create_cmd = "/usr/lib/qubes/create-apps-for-appvm.sh"
qubes_appmenu_remove_cmd = "/usr/lib/qubes/remove-appvm-appmenus.sh"
qubes_pciback_cmd = '/usr/lib/qubes/unbind-pci-device.sh'
prepare_volatile_img_cmd = '/usr/lib/qubes/prepare-volatile-img.sh'
yum_proxy_ip = '10.137.255.254'
yum_proxy_port = '8082'
@ -717,7 +717,7 @@ class QubesVm(object):
xid = self.get_xid()
if xid < 0:
return False
if not os.path.exists('/var/run/qubes/guid_running.%d' % xid):
if not os.path.exists('/var/run/qubes/guid-running.%d' % xid):
return False
return True
@ -2600,7 +2600,7 @@ class QubesHVm(QubesVm):
xid = self.stubdom_xid
if xid < 0:
return False
if not os.path.exists('/var/run/qubes/guid_running.%d' % xid):
if not os.path.exists('/var/run/qubes/guid-running.%d' % xid):
return False
return True

View File

@ -1,12 +1,12 @@
CC=gcc
CFLAGS=-Wall
all: qubes_restore xenstore-watch
qubes_restore: qubes_restore.o
$(CC) -o qubes_restore qubes_restore.o -lxenstore
all: qubes-restore xenstore-watch
qubes-restore: qubes-restore.o
$(CC) -o qubes-restore qubes-restore.o -lxenstore
xenstore-watch: xenstore-watch.o
$(CC) -o xenstore-watch xenstore-watch.o -lxenstore
clean:
rm -f *.o *~ qubes_restore xenstore-watch xenfreepages
rm -f *.o *~ qubes-restore xenstore-watch xenfreepages

View File

@ -70,7 +70,7 @@ class QfileDaemonDvm:
assert sys.argv[4] in QubesDispVmLabels.keys(), "Invalid label"
label = QubesDispVmLabels[sys.argv[4]]
print >>sys.stderr, "time=%s, starting qubes_restore" % (str(time.time()))
retcode = subprocess.call(['/usr/lib/qubes/qubes_restore',
retcode = subprocess.call(['/usr/lib/qubes/qubes-restore',
current_savefile,
current_dvm_conf,
'-u', str(vm.default_user),
@ -80,9 +80,9 @@ class QfileDaemonDvm:
qmemman_client.close()
if retcode != 0:
if os.path.exists('/usr/bin/kdialog'):
subprocess.call(['/usr/bin/kdialog', '--sorry', 'DisposableVM creation failed, see qubes_restore.log'])
subprocess.call(['/usr/bin/kdialog', '--sorry', 'DisposableVM creation failed, see qubes-restore.log'])
else:
subprocess.call(['/usr/bin/zenity', '--warning', 'DisposableVM creation failed, see qubes_restore.log'])
subprocess.call(['/usr/bin/zenity', '--warning', 'DisposableVM creation failed, see qubes-restore.log'])
qvm_collection.unlock_db()
return None
f = open('/var/run/qubes/dispVM_xid', 'r');
@ -136,7 +136,7 @@ class QfileDaemonDvm:
def get_dvm(self):
if not self.dvm_setup_ok():
if os.system("/usr/lib/qubes/qubes_update_dispvm_savefile_with_progress.sh >/dev/null </dev/null" ) != 0:
if os.system("/usr/lib/qubes/qubes-update-dispvm-savefile-with-progress.sh >/dev/null </dev/null" ) != 0:
self.tray_notify_error("DVM savefile creation failed")
return None
return self.do_get_dvm()

View File

@ -41,7 +41,7 @@ if ! [ -d "$DVMTMPLDIR" ] ; then
qvm-prefs --force-root -s $DVMTMPL maxmem 4000
fi
fi
if ! /usr/lib/qubes/qubes_prepare_saved_domain.sh \
if ! /usr/lib/qubes/qubes-prepare-saved-domain.sh \
"$DVMTMPL" "/var/lib/qubes/appvms/$DVMTMPL/dvm-savefile" $SCRIPTNAME ; then
exit 1
fi

View File

@ -1,10 +0,0 @@
# Expose all USB devices (except block) via xenstore
# Handle only USB devices
SUBSYSTEM!="usb", GOTO="qubes_usb_end"
ACTION=="add", IMPORT{program}="/usr/lib/qubes/usb_add_change"
ACTION=="change", IMPORT{program}="/usr/lib/qubes/usb_add_change"
ACTION=="remove", RUN+="/usr/lib/qubes/usb_remove"
LABEL="qubes_usb_end"

View File

@ -10,11 +10,11 @@ ENV{MAJOR}=="202", GOTO="qubes_block_end"
ENV{MAJOR}=="253", GOTO="qubes_block_end"
IMPORT{db}="QUBES_EXPOSED"
ACTION=="add", IMPORT{program}="/usr/lib/qubes/block_add_change"
ACTION=="change", IMPORT{program}="/usr/lib/qubes/block_add_change"
ACTION=="remove", RUN+="/usr/lib/qubes/block_remove"
ACTION=="add", IMPORT{program}="/usr/lib/qubes/udev-block-add-change"
ACTION=="change", IMPORT{program}="/usr/lib/qubes/udev-block-add-change"
ACTION=="remove", RUN+="/usr/lib/qubes/udev-block-remove"
LABEL="qubes_block_end"
# Cleanup disconnected frontend from xenstore
ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/block_cleanup"
ACTION=="remove", SUBSYSTEM=="block", ENV{MAJOR}=="202", RUN+="/usr/lib/qubes/udev-block-cleanup"

View File

@ -0,0 +1,10 @@
# Expose all USB devices (except block) via xenstore
# Handle only USB devices
SUBSYSTEM!="usb", GOTO="qubes_usb_end"
ACTION=="add", IMPORT{program}="/usr/lib/qubes/udev-usb-add-change"
ACTION=="change", IMPORT{program}="/usr/lib/qubes/udev-usb-add-change"
ACTION=="remove", RUN+="/usr/lib/qubes/udev-usb-remove"
LABEL="qubes_usb_end"

View File

@ -3,7 +3,7 @@ Description=Qubes block device cleaner (xen front/back)
After=qubes-core.service
[Service]
ExecStart=/usr/lib/qubes/block_cleaner_daemon.py
ExecStart=/usr/lib/qubes/block-cleaner-daemon.py
StandardOutput=syslog
[Install]

View File

@ -21,10 +21,10 @@ suspend/resume.
%install
mkdir -p $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d
cp vaio_fixes/00sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/
cp vaio_fixes/99sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/
cp vaio-fixes/00sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/
cp vaio-fixes/99sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d/
cp vaio_fixes/snd-hda-intel-sony-vaio.conf $RPM_BUILD_ROOT/etc/modprobe.d/
cp vaio-fixes/snd-hda-intel-sony-vaio.conf $RPM_BUILD_ROOT/etc/modprobe.d/
%files
/usr/lib64/pm-utils/sleep.d/00sony-vaio-audio

View File

@ -104,8 +104,8 @@ cp system-config/block-snapshot $RPM_BUILD_ROOT/etc/xen/scripts
ln -s block-snapshot $RPM_BUILD_ROOT/etc/xen/scripts/block-origin
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
cp system-config/qubes_block.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes_block.rules
cp system-config/qubes_usb.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes_usb.rules
cp system-config/udev-qubes-block.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes-block.rules
cp system-config/udev-qubes-usb.rules $RPM_BUILD_ROOT/etc/udev/rules.d/99-qubes-usb.rules
mkdir -p $RPM_BUILD_ROOT%{python_sitearch}/qubes
cp core/qubes.py $RPM_BUILD_ROOT%{python_sitearch}/qubes
@ -123,31 +123,31 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/qubes
cp qmemman/qmemman.conf $RPM_BUILD_ROOT%{_sysconfdir}/qubes/
mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/unbind_pci_device.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/convert_apptemplate2vm.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/convert_dirtemplate2vm.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/create_apps_for_appvm.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/remove_appvm_appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/cleanup_dispvms $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/unbind-pci-device.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/convert-apptemplate2vm.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/convert-dirtemplate2vm.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/create-apps-for-appvm.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/remove-appvm-appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/cleanup-dispvms $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/startup-dvm.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/startup-misc.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/prepare_volatile_img.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp aux-tools/prepare-volatile-img.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp qmemman/server.py $RPM_BUILD_ROOT/usr/lib/qubes/qmemman_daemon.py
cp qmemman/meminfo-writer $RPM_BUILD_ROOT/usr/lib/qubes/
cp qubes-rpc/qfile-dom0-unpacker $RPM_BUILD_ROOT/usr/lib/qubes/
cp qubes-rpc/qubes-notify-updates $RPM_BUILD_ROOT/usr/lib/qubes/
cp qubes-rpc/qubes-receive-appmenus $RPM_BUILD_ROOT/usr/lib/qubes/
cp qubes-rpc/qubes-receive-updates $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/block_add_change $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/block_remove $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/block_cleanup $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/usb_add_change $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/usb_remove $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/udev-block-add-change $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/udev-block-remove $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/udev-block-cleanup $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/udev-usb-add-change $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/udev-usb-remove $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/vusb-ctl.py $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/xl-qvm-usb-attach.py $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/xl-qvm-usb-detach.py $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/block_cleaner_daemon.py $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/fix_dir_perms.sh $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/block-cleaner-daemon.py $RPM_BUILD_ROOT/usr/lib/qubes/
cp aux-tools/fix-dir-perms.sh $RPM_BUILD_ROOT/usr/lib/qubes/
mkdir -p $RPM_BUILD_ROOT/etc/qubes-rpc/policy
cp qubes-rpc-policy/qubes.Filecopy.policy $RPM_BUILD_ROOT/etc/qubes-rpc/policy/qubes.Filecopy
@ -164,9 +164,9 @@ install -D aux-tools/qubes-dom0-updates.cron $RPM_BUILD_ROOT/etc/cron.daily/qube
install -D aux-tools/qubes-sync-clock.cron $RPM_BUILD_ROOT/etc/cron.d/qubes-sync-clock.cron
cp dispvm/xenstore-watch $RPM_BUILD_ROOT/usr/bin/xenstore-watch-qubes
cp dispvm/qubes_restore $RPM_BUILD_ROOT/usr/lib/qubes
cp dispvm/qubes_prepare_saved_domain.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp dispvm/qubes_update_dispvm_savefile_with_progress.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp dispvm/qubes-restore $RPM_BUILD_ROOT/usr/lib/qubes
cp dispvm/qubes-prepare-saved-domain.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp dispvm/qubes-update-dispvm-savefile-with-progress.sh $RPM_BUILD_ROOT/usr/lib/qubes
cp dispvm/qfile-daemon-dvm $RPM_BUILD_ROOT/usr/lib/qubes
mkdir -p $RPM_BUILD_ROOT/etc/yum.real.repos.d
@ -235,7 +235,7 @@ echo '[main]' > /etc/NetworkManager/NetworkManager.conf
echo 'plugins = keyfile' >> /etc/NetworkManager/NetworkManager.conf
echo '[keyfile]' >> /etc/NetworkManager/NetworkManager.conf
fi
/usr/lib/qubes/qubes_fix_nm_conf.sh
/usr/lib/qubes/qubes-fix-nm-conf.sh
sed 's/^net.ipv4.ip_forward.*/net.ipv4.ip_forward = 1/' -i /etc/sysctl.conf
@ -312,7 +312,7 @@ fi
%triggerin -- xen-runtime
sed -i 's/\/block /\/block.qubes /' /etc/udev/rules.d/xen-backend.rules
/usr/lib/qubes/fix_dir_perms.sh
/usr/lib/qubes/fix-dir-perms.sh
%triggerin -- xorg-x11-drv-vmmouse
mv -f /lib/udev/rules.d/69-xorg-vmmouse.rules /var/lib/qubes/removed-udev-scripts/ 2> /dev/null || :
@ -362,31 +362,31 @@ fi
%{python_sitearch}/qubes/__init__.pyc
%{python_sitearch}/qubes/__init__.pyo
%{python_sitearch}/qubes/qmemman*.py*
/usr/lib/qubes/unbind_pci_device.sh
/usr/lib/qubes/cleanup_dispvms
/usr/lib/qubes/convert_apptemplate2vm.sh
/usr/lib/qubes/convert_dirtemplate2vm.sh
/usr/lib/qubes/create_apps_for_appvm.sh
/usr/lib/qubes/remove_appvm_appmenus.sh
/usr/lib/qubes/unbind-pci-device.sh
/usr/lib/qubes/cleanup-dispvms
/usr/lib/qubes/convert-apptemplate2vm.sh
/usr/lib/qubes/convert-dirtemplate2vm.sh
/usr/lib/qubes/create-apps-for-appvm.sh
/usr/lib/qubes/remove-appvm-appmenus.sh
/usr/lib/qubes/qmemman_daemon.py*
/usr/lib/qubes/meminfo-writer
/usr/lib/qubes/qfile-daemon-dvm*
/usr/lib/qubes/qubes-notify-updates
/usr/lib/qubes/qubes-receive-appmenus
/usr/lib/qubes/qubes-receive-updates
/usr/lib/qubes/block_add_change
/usr/lib/qubes/block_remove
/usr/lib/qubes/block_cleanup
/usr/lib/qubes/block_cleaner_daemon.py*
/usr/lib/qubes/usb_add_change
/usr/lib/qubes/usb_remove
/usr/lib/qubes/udev-block-add-change
/usr/lib/qubes/udev-block-remove
/usr/lib/qubes/udev-block-cleanup
/usr/lib/qubes/block-cleaner-daemon.py*
/usr/lib/qubes/udev-usb-add-change
/usr/lib/qubes/udev-usb-remove
/usr/lib/qubes/vusb-ctl.py*
/usr/lib/qubes/xl-qvm-usb-attach.py*
/usr/lib/qubes/xl-qvm-usb-detach.py*
/usr/lib/qubes/fix_dir_perms.sh
/usr/lib/qubes/fix-dir-perms.sh
/usr/lib/qubes/startup-dvm.sh
/usr/lib/qubes/startup-misc.sh
/usr/lib/qubes/prepare_volatile_img.sh
/usr/lib/qubes/prepare-volatile-img.sh
%attr(4750,root,qubes) /usr/lib/qubes/qfile-dom0-unpacker
%{_unitdir}/qubes-block-cleaner.service
%{_unitdir}/qubes-core.service
@ -420,9 +420,9 @@ fi
/usr/lib64/pm-utils/sleep.d/51qubes-suspend-netvm
/usr/lib64/pm-utils/sleep.d/52qubes-pause-vms
/usr/bin/xenstore-watch-qubes
/usr/lib/qubes/qubes_restore
/usr/lib/qubes/qubes_prepare_saved_domain.sh
/usr/lib/qubes/qubes_update_dispvm_savefile_with_progress.sh
/usr/lib/qubes/qubes-restore
/usr/lib/qubes/qubes-prepare-saved-domain.sh
/usr/lib/qubes/qubes-update-dispvm-savefile-with-progress.sh
/etc/xen/scripts/block.qubes
/etc/xen/scripts/block-snapshot
/etc/xen/scripts/block-origin
@ -443,8 +443,8 @@ fi
/etc/polkit-1/rules.d/00-qubes-allow-all.rules
/etc/xdg/autostart/qubes-guid.desktop
/etc/security/limits.d/99-qubes.conf
/etc/udev/rules.d/99-qubes_block.rules
/etc/udev/rules.d/99-qubes_usb.rules
/etc/udev/rules.d/99-qubes-block.rules
/etc/udev/rules.d/99-qubes-usb.rules
%attr(0644,root,root) /etc/cron.daily/qubes-dom0-updates.cron
%attr(0644,root,root) /etc/cron.d/qubes-sync-clock.cron
/etc/dracut.conf.d/*