Commit Graph

2039 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
029d207311
rpm: rename qubes-core-vm to qubes-core-agent
Rename it to match repository name and the same package in Debian.

QubesOS/qubes-issues#2771
2017-06-07 10:15:21 +02:00
Marek Marczykowski-Górecki
4514500ee6
Fix detection of PCI passthrough
Do not enable meminfo-writer (and in consequence qmemman) for the VM if
any real PCI device is present. Do not count qemu-emulated devices.
2017-05-26 05:25:30 +02:00
Marek Marczykowski-Górecki
8694931665
Implement qubes.PostInstall service
This is meant to notify dom0 about features supported by just-installed
template. This service is called by dom0 just after template
installation.

Fixes QubesOS/qubes-issues#1637
Documentation pending: QubesOS/qubes-issues#2829
2017-05-26 05:25:30 +02:00
Marek Marczykowski-Górecki
b49ae50ad5
Implement qrexec-based connection to updates proxy
Configure package manager to use 127.0.0.1:8082 as proxy instead of
"magic" IP intercepted later. The listen on this port and whenever
new connection arrives, spawn qubes.UpdatesProxy service call (to
default target domain - subject to configuration in dom0) and connect
its stdin/out to the local TCP connection. This part use systemd.socket
unit in case of systemd, and ncat --exec otherwise.

On the other end - in target domain - simply pass stdin/out to updates
proxy (tinyproxy) running locally.

It's important to _not_ configure the same VM to both be updates proxy and
use it. In practice such configuration makes little sense - if VM can
access network (which is required to run updates proxy), package manager
can use it directly. Even if this network access is through some
VPN/Tor. If a single VM would be configured as both proxy provider and
proxy user, connection would loop back to itself. Because of this, proxy
connection redirection (to qrexec service) is disabled when the same VM
also run updates proxy.

Fixes QubesOS/qubes-issues#1854
2017-05-26 05:25:29 +02:00
unman
b445ebce50
Enable build for Zesty 2017-05-23 23:59:41 +01:00
Marek Marczykowski-Górecki
f9d6ff89bc
Rename qvm-run to qvm-run-vm
Avoid conflict with qvm-run from qubes-core-admin-client package.
2017-05-23 02:55:31 +02:00
Marek Marczykowski-Górecki
34fa6e7ced
debian: make haveged.service patch less intrusive...
...but installed on all Debian versions. This is mostly required by
vebose file list in debian/qubes-core-agent.install. But also make it
use new options when upstream will set them.

QubesOS/qubes-issues#2161
2017-05-22 17:30:06 +02:00
Marek Marczykowski-Górecki
8e505c5b0e
debian: add missing Build-Depends: python-setuptools 2017-05-22 17:06:02 +02:00
Marek Marczykowski-Górecki
42bc93d8fd
Revert "fedora,debian: update python3-daemon dependency"
This reverts commit 7d8218a1d4.
Follow revert "firewall: switch to python 3"
2017-05-21 02:01:59 +02:00
Marek Marczykowski-Górecki
33da315e17
Revert "firewall: switch to python 3"
This reverts commit 5dfcf06ef4.

python3-daemon isn't widespread enough yet - for Debian jessie available
only in packports.

In addition to the revert itself, adjust packaging for this change
(mostly for Debian).
2017-05-21 02:01:47 +02:00
Marek Marczykowski-Górecki
5047fd9288
debian,fedora: split nautilus integration into separate package
This will allow to avoid a lot of dependencies on minimal template.

QubesOS/qubes-issues#2816
QubesOS/qubes-issues#2771
2017-05-21 01:52:23 +02:00
Marek Marczykowski-Górecki
36fa978a0e
debian: fix qubes-firewall python packaging, make it more verbose
Add --install-layout=deb option to setup.py, so files will not land in
/usr/local.
Also, explicitly list packaged files - make it easier to split the
package later.
2017-05-21 01:47:59 +02:00
Marek Marczykowski-Górecki
6de6a3dff6
travis: update to Qubes 4.0 repositories 2017-05-20 16:04:35 +02:00
Marek Marczykowski-Górecki
89183e9944
Ask for target VM for file-copy in dom0
This way:
 - VM prompt do know VM list, the list may be filtered based on policy
 - source VM don't learn name of target VM

Fixes QubesOS/qubes-issues#910
2017-05-20 15:53:03 +02:00
Marek Marczykowski-Górecki
2b76373abc
Remove duplicated 'close' button from titlebar of gnome applications
Dom0 enforce decorations which already contain close button.

Thanks @dzklaim for the solution.
Fixes QubesOS/qubes-issues#2813
2017-05-20 14:44:04 +02:00
Marek Marczykowski-Górecki
7d8218a1d4
fedora,debian: update python3-daemon dependency
qubes-firewall script now use python3.
2017-05-20 14:44:04 +02:00
Marek Marczykowski-Górecki
ce70887a57
Merge branch 'core3-devel' 2017-05-20 14:43:53 +02:00
Marek Marczykowski-Górecki
abf9a5aa43
Apply gschema overrides also to debian, rename according to guidelines
glib-compile-schemas recommend naming override files with nn_ prefix,
where nn is a number. Lets use 20, to allow both higher and lower
priority files.

QubesOS/qubes-issues#1108
2017-05-20 13:47:05 +02:00
Marek Marczykowski-Górecki
07be216a0d
tests: add run-tests script, plug it into travis
Also, replace subproces.call with a mockup, as notify-send is not
available on travis.
2017-05-20 13:20:08 +02:00
Marek Marczykowski-Górecki
5dfcf06ef4
firewall: switch to python 3 2017-05-20 13:20:08 +02:00
Marek Marczykowski-Górecki
87efe51be0
tests: make firewall tests working regardless of python version
Don't depend on set ordering...
2017-05-20 12:56:23 +02:00
Marek Marczykowski-Górecki
dc8047c3bb
dom0-updates: restructure the script to not update metadata twice
When `qubes-dom0-update --refresh` was called, the script checked
metadata twice - once to check updates availability, then to actually
download them. This two stage approach is needed only on Debian, when
--downloadonly option is not supported. Rearrange code accordingly.

Also, drop --doit option (ignore it), as the same (but more readable)
can be achieved with --check-only.
2017-05-20 03:49:13 +02:00
Marek Marczykowski-Górecki
22e261f909
Add qubes.StartApp service
A simple service to start application described in .desktop file.
This way, dom0 can completely ignore VM-originated Exec= entry.
2017-05-20 03:48:02 +02:00
Marek Marczykowski-Górecki
eef6bbe360
qvm-copy-to-vm: fix handling empty target VM
This means "default" in Qubes 4.0.

QubesOS/qubes-issues#910
2017-05-17 14:22:10 +02:00
Marek Marczykowski-Górecki
d73221ba3b
version 3.2.18 2017-05-16 00:54:18 +02:00
Marek Marczykowski-Górecki
d6f305106c
rpm: don't "append" to not existing /etc/yum.conf
When /etc/yum.conf is not present (yum-deprecated not installed), don't
try to append to it. It would result in invalid configuration file -
without any section header, and break yum when installed later.
2017-05-15 03:09:45 +02:00
Marek Marczykowski-Górecki
9a7dee5b46
dispvm: don't use perl to decode base64-encoded script
This looks like an overkill. And more importantly - required modules are
not installed by default, making it impossible to use in default minimal
template.

Fixes QubesOS/qubes-issues#1610
2017-05-14 23:29:52 +02:00
Marek Marczykowski-Górecki
13c99f1f10
systemd: fix race condition between qubes-db and qubes-early-vm-config
qubes-early-vm-config.service depend on qubes-db daemon running, to
retrieve various configuration parameters. But the startup ordering
declaration was missing

Fixes QubesOS/qubes-issues#2750
2017-05-14 23:13:26 +02:00
Marek Marczykowski-Górecki
ee0255b385
debian,fedora: drop gnome-packagekit from dependencies
We don't use it currently - xterm with console updater is used by
default.
2017-04-24 00:17:34 +02:00
Marek Marczykowski-Górecki
03b0b2e481
version 3.2.17 2017-04-01 21:45:29 +02:00
Marek Marczykowski-Górecki
a6031ca33c
Merge remote-tracking branch 'qubesos/pr/45'
* qubesos/pr/45:
  network: Properly handle comments in NetworkManager.conf (#2584)
2017-04-01 11:58:13 +02:00
Marek Marczykowski-Górecki
aaed44e7d2
Merge remote-tracking branch 'qubesos/pr/44'
* qubesos/pr/44:
  If there is only 1 DNS server make both DNAT rules point to it
2017-04-01 11:56:18 +02:00
Daniel Moerner
93dd8112da
network: Properly handle comments in NetworkManager.conf (#2584)
Qubes-specific options must be added in NetworkManager.conf, even if
those lines are commented out by default. The problem is solved by using
extended regular expressions.
2017-03-28 17:19:12 -04:00
unman
982babb6a2
If there is only 1 DNS server make both DNAT rules point to it 2017-03-19 21:56:34 +00:00
Marek Marczykowski-Górecki
d177e73bba
Merge remote-tracking branch 'qubesos/pr/43'
* qubesos/pr/43:
  Fix more shellcheck warnings
  Fix handling of binds containing spaces
2017-03-17 11:56:22 +01:00
Marek Marczykowski-Górecki
203386af62
Merge remote-tracking branch 'qubesos/pr/42'
* qubesos/pr/42:
  bind-dirs: Create ro if bind target exists
2017-03-17 11:55:23 +01:00
Robin Schneider
e0814b481f
bind-dirs: Create ro if bind target exists
Before, the script skipped none existing ro paths even if the path
existed below /rw. This would require someone who wants to use bind-dirs
only in TemplateBasedVM to ensure that the paths exist before the
bind-dirs script gets called.

This patch changes this behavior so that if the path exists below /rw, it
is ensured that an (empty) file/directory is present in ro (where the
corresponding path from /rw is then bind mounted over).

Requires: Docs update. I can open a PR when this PRs looks good.
Fixes limitation: "Does not work if the file / folder in question does
  not already exist in the root image. I.e. a file that does not exist in
  the root image cannot be bind mounted in the TemplateBasedVM."
Example use case: https://github.com/debops/ansible-persistent_paths
Tested on: Qubes OS 3.2; Debian 8 TemplateBasedVM (and Template)
Related to: https://github.com/QubesOS/qubes-issues/issues/2661
2017-03-16 12:56:54 +01:00
Jean-Philippe Ouellet
9acc305887
Remove dates from man pages
Counterpart to https://github.com/QubesOS/qubes-core-admin/pull/94
2017-03-16 05:47:11 -04:00
Robin Schneider
a205c86bfe
Fix more shellcheck warnings 2017-03-14 20:13:23 +01:00
Robin Schneider
0facff3a01
Fix handling of binds containing spaces
```bash
binds+=( '/etc/tmp/s s' )
```

was handled incorrectly before.
2017-03-14 20:10:26 +01:00
Marek Marczykowski-Górecki
bd6ea489e3
version 3.2.16 2017-03-07 23:04:47 +01:00
Marek Marczykowski-Górecki
9f9c3c56fc
Use online resize2fs, and run filesystem check only when needed
When trying offline resize2fs, it require running fsck first, which
takes time, especially on large volumes. And in most cases, resize2fs
will notice that no action is needed - after wasting some time on fsck.
To remedy this, use resize2fs in online mode (on mounted filesystem).
And drop fsck call if it fails (filesystem is already mounted
read-write, running fsck isn't good idea).

But do not remove fsck call completely - still call it, but without '-f'
flag, so it run actual check only when really needed (unclean shutdown,
last check far in the past etc).

Fixes QubesOS/qubes-issues#979
Fixes QubesOS/qubes-issues#2583
2017-02-27 04:21:59 +01:00
Marek Marczykowski-Górecki
d8e568fa13
systemd: place user dropins in /usr/lib instead of /lib
On non-Fedora those are not equivalent. On Debian, user units in /lib
are not supported

Reported by @adrelanos
Fixes QubesOS/qubes-issues#2644
2017-02-21 01:37:24 +01:00
Marek Marczykowski-Górecki
cf97f4f8e7
Merge remote-tracking branch 'qubesos/pr/40'
* qubesos/pr/40:
  Stop unnecessary services in Debian
2017-02-20 23:27:07 +01:00
Marek Marczykowski-Górecki
d9cacf66dd
debian: don't fail the upgrade if glib-compile-schemas fails
Thanks @adrelanos
2017-02-20 23:25:39 +01:00
Marek Marczykowski-Górecki
7d97fd3a82
debian: fix lintian warning - command-with-path-in-maintainer-script
Reported by @adrelanos
https://github.com/QubesOS/qubes-core-agent-linux/pull/39#issuecomment-280951206
2017-02-19 22:43:06 +01:00
unman
1ed2954f91
Stop unnecessary services in Debian 2017-02-16 22:41:14 +00:00
Marek Marczykowski-Górecki
dcbd20f08c
Merge remote-tracking branch 'qubesos/pr/39'
* qubesos/pr/39:
  Apply gschema override preventing previews in nautilus in Debian
2017-02-16 16:51:56 +01:00
Marek Marczykowski-Górecki
8ae5101057
Merge remote-tracking branch 'qubesos/pr/37'
* qubesos/pr/37:
  Move trusty check and locales-all fix inside source-debian-quilt-copy-in
  Fix build for trusty - locales-all not available
2017-02-16 16:51:39 +01:00
unman
38f44417d6
Move trusty check and locales-all fix inside source-debian-quilt-copy-in 2017-02-13 22:25:47 +00:00