Merge branch 'master' of ssh://git.qubes-os.org/var/lib/qubes/git/joanna/core

Conflicts:
	dom0/qvm-core/qubes.py
This commit is contained in:
Marek Marczykowski 2011-04-05 14:39:40 +02:00
commit d367c140c2
12 changed files with 157 additions and 48 deletions

View File

@ -1,8 +1,13 @@
RPMS_DIR=rpm/
VERSION_DOM0 := $(shell cat version_dom0)
VERSION_VM := $(shell cat version_vm)
help:
@echo "make rpms -- generate binary rpm packages"
@echo "make update-repo -- copy newly generated rpms to qubes yum repo"
@echo "make update-repo-testing -- same, but to -testing repo"
@echo "make rpms -- generate binary rpm packages"
@echo "make update-repo-current -- copy newly generated rpms to qubes yum repo"
@echo "make update-repo-unstable -- same, but to -testing repo"
@echo "make clean -- cleanup"
rpms:
rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-commonvm.spec
@ -10,23 +15,19 @@ rpms:
rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-netvm.spec
rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-proxyvm.spec
rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-dom0.spec
rpm --addsign $(RPMS_DIR)/x86_64/*.rpm
update-repo:
ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-*.rpm ../yum/r1/dom0/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-appvm-*.rpm ../yum/r1/appvm/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-commonvm-*.rpm ../yum/r1/netvm/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-netvm-*.rpm ../yum/r1/netvm/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-proxyvm-*.rpm ../yum/r1/netvm/rpm/
update-repo-testing:
ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-*.rpm ../yum/r1-testing/dom0/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-appvm-*.rpm ../yum/r1-testing/appvm/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-commonvm-*.rpm ../yum/r1-testing/netvm/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-netvm-*.rpm ../yum/r1-testing/netvm/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-proxyvm-*.rpm ../yum/r1-testing/netvm/rpm/
rpm --addsign \
$(RPMS_DIR)/x86_64/qubes-core-dom0-*$(VERSION_DOM0)*.rpm \
$(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*.rpm
update-repo-current:
ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-*$(VERSION_DOM0)*.rpm ../yum/current-release/current/dom0/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*.rpm ../yum/current-release/current/vm/rpm/
cd ../yum && ./update_repo.sh
update-repo-unstable:
ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-*$(VERSION_DOM0)*.rpm ../yum/current-release/unstable/dom0/rpm/
ln -f $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*.rpm ../yum/current-release/unstable/vm/rpm/
cd ../yum && ./update_repo.sh
clean:
(cd appvm && make clean)

View File

@ -61,8 +61,14 @@ main()
"HOME=/home/user DISPLAY=:0 /usr/bin/mimeopen -n -M '%s' > /tmp/kde-open.log 2>&1 </dev/null",
filename);
if (system(cmdbuf))
#ifdef USE_KDIALOG
system
("HOME=/home/user DISPLAY=:0 /usr/bin/kdialog --sorry 'Unable to handle mimetype of the requested file!' > /tmp/kdialog.log 2>&1 </dev/null");
#else
system
("HOME=/home/user DISPLAY=:0 /usr/bin/zenity --error --text 'Unable to handle mimetype of the requested file!' > /tmp/kdialog.log 2>&1 </dev/null");
#endif
if (stat(filename, &stat_post)) {
perror("stat post");
exit(1);

View File

@ -1,13 +0,0 @@
[qubes-appvm]
name = Qubes OS Repository for AppVM
baseurl = http://qubes-os.org/yum/r1/appvm/rpm
gpgkey = http://qubes-os.org/keys/qubes-release-1-signing-key.asc
gpgcheck = 1
[qubes-appvm-testing]
name = Qubes OS Repository for AppVM
baseurl = http://qubes-os.org/yum/r1-testing/appvm/rpm
gpgkey = http://qubes-os.org/keys/qubes-release-1-signing-key.asc
gpgcheck = 1
enabled=0

View File

@ -25,14 +25,14 @@ start()
exit 1
fi
type=$(/usr/bin/xenstore-read qubes_vm_type)
if [ "$type" != "AppVM" -a "$type" != "DisposableVM" ]; then
# This script runs only on AppVMs
return 0
fi
type=$(/usr/bin/xenstore-read qubes_vm_type)
if [ "$type" != "AppVM" -a "$type" != "DisposableVM" ]; then
# This script runs only on AppVMs
return 0
fi
# Start AppVM specific services
/sbin/service cups start
# Start AppVM specific services
/sbin/service cups start
echo -n $"Executing Qubes Core scripts for AppVM:"
@ -52,9 +52,9 @@ start()
echo Back to life.
fi
MEM_CHANGE_THRESHOLD_KB=30000
MEMINFO_DELAY_USEC=100000
/usr/lib/qubes/meminfo-writer $MEM_CHANGE_THRESHOLD_KB $MEMINFO_DELAY_USEC &
MEM_CHANGE_THRESHOLD_KB=30000
MEMINFO_DELAY_USEC=100000
/usr/lib/qubes/meminfo-writer $MEM_CHANGE_THRESHOLD_KB $MEMINFO_DELAY_USEC &
success
echo ""

43
appvm/qvm-copy-to-vm2.gnome Executable file
View File

@ -0,0 +1,43 @@
#!/bin/sh
#
# The Qubes OS Project, http://www.qubes-os.org
#
# Copyright (C) 2010 Rafal Wojtczuk <rafal@invisiblethingslab.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
VM=$(zenity --entry --title="File Copy" --text="Enter the destination domain name:")
if [ X$VM = X ] ; then exit 0 ; fi
SIZE=$(du --apparent-size -c "$@" | tail -1 | cut -f 1)
export PROGRESS_FILE=$(mktemp)
/usr/lib/qubes/qvm-trigger-copy-to-vm $VM "$@"
while ! [ -s $PROGRESS_FILE ] ; do
sleep 0.1
done
(while true ; do
read agentpid sentsize agentstatus < $PROGRESS_FILE
if [ "x"$agentstatus = x ] ; then continue ; fi
if ! [ -e /proc/$agentpid ] ; then break ; fi
if [ "x"$agentstatus = xdone ] ; then break ; fi
CURRSIZE=$(($sentsize/1024))
echo $((100*$CURRSIZE/$SIZE))
sleep 0.1
done) | zenity --progress --text="Copying files to domain: $VM..." --auto-close
rm -f $PROGRESS_FILE

View File

@ -0,0 +1,40 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.14 (GNU/Linux)
mQINBE2WRnsBEAC+5Y2Rt/tFqlSiliQcZRKaFb7sOnsa3uuGvNgK2nIuFxQkxoBT
+UJjk5VL+oaCOno63QbwvuxUtBlqBGSN1dOmUJW4vUqVhXVSrNQhzl5GWIC8rfDK
1W0zk5H4esiSfUxvQfRHMg2pHUa3wpFhm6L4RA/kH88QXchhVXrKZd+HJSBNJIaX
F6aYfIv0W6+fs9+oCKVw/S/j+Wu3BS5n7UbPnBkhUHPfjHzAHkRBrSH3UQkgHRFi
bffq8tW9M8KVjI2btXn1RJMDoWp7V4aRVOVSxITv9uoRKJ9vDLkLfDr9uVVZ6hB0
Q8oQGxzTDZeWTKt6JIlR672hwbvm28AT4TK6fnIj2jMYGtDaXB7wQc/w1MuBfOTW
nThYjKSyhlUY+SI8RF2fydVl+1lgQCGjmolyN9xFimKsPT/OkcNjwVAo7q6zFa4F
2gH3mPRruvOEJL0KGuvX11eaycuTb03AWXl6gndiS9QjA2Y6KF4rsAbfctJ/jwDn
tMAhSnR5x6AovAXpcFPu2cPDkNorSYU5A4gC5oU8x18ue8zXi4uiK9A/N75F80RY
qvPlknDXLMrV4qOR039oJMN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MCq95ooq/QIm8XyVZBquYTw0AkZx76hT93VM2M1mTO+sloWmVpovmacOFafMH
SUymuLsnp4JpIcEXRTo49s2sTKV1tpVROogxOXS/4d19MMQhk2s3cxFRj+gHLZ2D
vRqvNVc+9/gbcf2u+49kfgVgiXlHEtLMFW0AGRlwc/eSLR4CWnwxEriIg8Nxbetr
7qJQ1s4oXb/VnuZo/6+WdUIxqizLKYDxQ92G3xEjgBbAM/pB3TzivnE/IsC6I4a0
5L5xlIv68CgNAyi79MsMVAZPs6ZPdZkcXe0uYsC0rOiFmUVdVl/SA+LJsnvzfPcg
VaUt2HNk4lPIoH8YWAtEg0H918LgvBKPQ0frPwdxvmeVRcejpVXyAYgCLwk+9xUT
lZH9ykOtoD1JV3xwLo23gayd8ZmZIZGGJ+a5VhXZHlA5gl3XVmGGmc1OXT5E++VG
snHPXJQr8SC7I0sblBfOa0nnPwYXWMmrDvtzL+T/xtIrX02WhfS7BtQp3XDNvDcK
A07FsuJnC9jILnLgo6YhLcuXG6AsnoHVR6Lpr9N7iXxIZHHHUYOTjfHd1ZCuwK50
=7fth
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -15,18 +15,23 @@ static void fix_display()
static void produce_message(char * type, const char *fmt, va_list args)
{
char *kdialog_msg;
char *dialog_msg;
char buf[1024];
(void) vsnprintf(buf, sizeof(buf), fmt, args);
asprintf(&kdialog_msg, "%s: %s: %s (error type: %s)",
asprintf(&dialog_msg, "%s: %s: %s (error type: %s)",
program_invocation_short_name, type, buf, strerror(errno));
fprintf(stderr, "%s", kdialog_msg);
fprintf(stderr, "%s", dialog_msg);
switch (fork()) {
case -1:
exit(1); //what else
case 0:
fix_display();
execlp("kdialog", "kdialog", "--sorry", kdialog_msg, NULL);
#ifdef USE_KDIALOG
execlp("kdialog", "kdialog", "--sorry", dialog_msg, NULL);
#else
execlp("zenity", "zenity", "--error", "--text", dialog_msg, NULL);
#endif
exit(1);
default:;
}

13
common/qubes.repo Normal file
View File

@ -0,0 +1,13 @@
[qubes-vm-current]
name = Qubes OS Repository for VM (updates)
baseurl = http://yum.qubes-os.org/r1-beta1/current/vm
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-qubes-primary
gpgcheck = 1
[qubes-appvm-testing]
name = Qubes OS Repository for VM (unstable)
baseurl = http://yum.qubes-os.org/r1-beta1/unstable/vm
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-qubes-primary
gpgcheck = 1
enabled=0

View File

@ -57,6 +57,15 @@ start()
/usr/lib/qubes/qrexec_agent 2>/var/log/qubes/qrexec_agent.log &
[ -x /rw/config/rc.local ] && /rw/config/rc.local
if ! [ -f /home/user/.gnome2/nautilus-scripts/.scripts_created ] ; then
echo "Creating symlinks for nautilus actions..."
su user -c 'mkdir -p /home/user/.gnome2/nautilus-scripts'
su user -c 'ln -s /usr/lib/qubes/qvm-copy-to-vm2.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"'
su user -c 'ln -s /usr/bin/qvm-open-in-dvm2 /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"'
su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created'
fi
success
echo ""
return 0

View File

@ -55,7 +55,7 @@ fi
adduser --create-home user
su user -c 'mkdir -p /home/user/.gnome2/nautilus-scripts'
su user -c 'ln -s /usr/lib/qubes/qvm-copy-to-vm2.kde /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"'
su user -c 'ln -s /usr/lib/qubes/qvm-copy-to-vm2.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"'
su user -c 'ln -s /usr/bin/qvm-open-in-dvm2 /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"'
mkdir -p $RPM_BUILD_ROOT/var/lib/qubes
@ -77,6 +77,7 @@ cp qubes_timestamp qvm-open-in-dvm2 $RPM_BUILD_ROOT/usr/bin
cp qvm-copy-to-vm $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/lib/qubes
cp qvm-copy-to-vm2.kde $RPM_BUILD_ROOT/usr/lib/qubes
cp qvm-copy-to-vm2.gnome $RPM_BUILD_ROOT/usr/lib/qubes
cp qvm-trigger-copy-to-vm $RPM_BUILD_ROOT/usr/lib/qubes
cp ../qrexec/qrexec_agent $RPM_BUILD_ROOT/usr/lib/qubes
cp dvm_file_editor qfile-agent qfile-agent-dvm qfile-unpacker $RPM_BUILD_ROOT/usr/lib/qubes
@ -129,6 +130,7 @@ rm -rf $RPM_BUILD_ROOT
/etc/init.d/qubes_core_appvm
/usr/bin/qvm-copy-to-vm
/usr/lib/qubes/qvm-copy-to-vm2.kde
/usr/lib/qubes/qvm-copy-to-vm2.gnome
/usr/bin/qvm-open-in-dvm2
/usr/lib/qubes/meminfo-writer
/usr/lib/qubes/dvm_file_editor

View File

@ -65,7 +65,9 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/qubes
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
cp iptables $RPM_BUILD_ROOT/etc/sysconfig/
mkdir -p $RPM_BUILD_ROOT/etc/yum.repos.d
cp ../appvm/qubes.repo $RPM_BUILD_ROOT/etc/yum.repos.d
cp qubes.repo $RPM_BUILD_ROOT/etc/yum.repos.d
install -d -m 755 $RPM_BUILD_ROOT/etc/pki/rpm-gpg
install -m 644 RPM-GPG-KEY-qubes* $RPM_BUILD_ROOT/etc/pki/rpm-gpg/
mkdir -p $RPM_BUILD_ROOT/sbin
cp qubes_serial_login $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/usr/bin
@ -170,5 +172,6 @@ rm -rf $RPM_BUILD_ROOT
/etc/sysconfig/iptables
/var/lib/qubes
/etc/yum.repos.d/qubes.repo
/etc/pki/rpm-gpg/RPM-GPG-KEY-qubes*
/sbin/qubes_serial_login
/usr/bin/xenstore-watch

View File

@ -1 +1 @@
1.5.4
1.5.8