Commit Graph

2480 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
3fb258db47
network: order qubes-firewall service before enabling IP forwarding
Start qubes-firewall (which will add "DROP by default" rule) before
enabling IP forwarding, to not leave a time slot where some connection
could go around configured firewall.

QubesOS/qubes-issues#3269
2017-11-20 02:42:39 +01:00
Marek Marczykowski-Górecki
6b0013503b
Merge remote-tracking branch 'qubesos/pr/74'
* qubesos/pr/74:
  Add iptables dep to qubes-core-agent-networking RPM spec
2017-11-20 01:56:38 +01:00
Marek Marczykowski-Górecki
9293da7329
Merge remote-tracking branch 'qubesos/pr/69'
* qubesos/pr/69:
  Fix the Archlinux template update proxy to work for HTTPS URLs as well
2017-11-20 01:56:35 +01:00
Marek Marczykowski-Górecki
c0e5501f55
Enable qubes-firewall also in "NetVM"
In some cases it may make sense to enfoce outgoing firewall also on
sys-net. If the service is disabled, firewall settings will be
(silently) ignored, so better be on the safe side and enable.

QubesOS/qubes-issues#3290
2017-11-20 01:56:15 +01:00
Marek Marczykowski-Górecki
e53db1386d
Dumb down meminfo-writer enabling logic
Let dom0 decide whether it should be enabled or not, regardless of PCI
devices or any other factor.

Fixes QubesOS/qubes-issues#3207
2017-11-20 01:56:15 +01:00
Marek Marczykowski-Górecki
57a3c2d67e
network: have safe fallback in case of qubes-firewall crash/error
When qubes-firewall service is started, modify firewall to have "DROP"
policy, so if something goes wrong, no data got leaked.
But keep default action "ACCEPT" in case of legitimate service stop, or
not starting it at all - because one may choose to not use this service
at all.
Achieve this by adding "DROP" rule at the end of QBS-FIREWALL chain and
keep it there while qubes-firewall service is running.

Fixes QubesOS/qubes-issues#3269
2017-11-20 01:56:14 +01:00
Rusty Bird
c3b2aeb289
Add iptables dep to qubes-core-agent-networking RPM spec
Only the Debian package had declared the dependecy. And apparently,
fedora-26-minimal does not include the iptables package by default
anymore.
2017-11-19 15:48:32 +00:00
Olivier MEDOC
5b45cf1808 archlinux: add recently splitted packages as optional dependencies of qubes-vm-core
Also improve package description and comments.
2017-11-19 08:57:31 +01:00
Frédéric Pierret
82656bb5df
Disable Thunar thumbnails 2017-11-18 13:19:41 +01:00
Frédéric Pierret
0fd109b8f1
Add support for Thunar Qubes VM tools 2017-11-18 13:19:40 +01:00
Marek Marczykowski-Górecki
589c32b1e3
Merge remote-tracking branch 'qubesos/pr/71'
* qubesos/pr/71:
  Fix Ubuntu template builds
2017-11-14 15:07:41 +01:00
Paul Holcomb
80b5c94206
Fix Ubuntu template builds
4.0 template builds use `<package>.install` files with dh_install.  The
differences between Debian and Ubuntu packages also need to be represented
in these files.
2017-11-14 00:04:40 -06:00
unman
54867b6eab
Allow build for Xenial in 4.0 2017-11-14 01:35:36 +00:00
Nedyalko Andreev
9da86cf8c5
Fix the Archlinux template update proxy to work for HTTPS URLs as well 2017-11-13 14:16:10 +02:00
Olivier MEDOC
0999d3b78f archlinux: fix incorrect keyring being populated
Fix one of the issue described in the following commit:
https://github.com/QubesOS/qubes-issues/issues/3185
2017-11-06 23:23:18 +01:00
Olivier MEDOC
cf4fdb8b77 Makefile: remove invalid reference to network dropins install target
Fix redundant presence of NetworkManager dropins both
in qubes-vm-core and qubes-vm-networking
(https://github.com/QubesOS/qubes-issues/issues/3185)
2017-11-06 22:54:38 +01:00
Marek Marczykowski-Górecki
28be709238
Merge remote-tracking branch 'qubesos/pr/63'
* qubesos/pr/63:
  archlinux: restore setup of pam.d/su-l
  archlinux: remove python3 dependency
  archlinux: ensure [options] section is present in all pacman drop-ins
  archlinux: enforce usage of python2 in all scripts
  Makefile: avoid using python interpreter as a static name
  archlinux: create user 'user' using bash by default instead of zsh
  archlinux: ship pam.d/qrexec as a replacement of using su
  archlinux: do not mess with locales in post-install script
  archlinux: remove pam configuration for su and su-l
  archlinux: remove deprecated setup of pam since v4.0.3
  Add the 4.0 repo to the PKGBUILD sources list
  Restore the binary pacman repo and update it for QubesOS 4.0
  Fix the makefile for archlinux - SBINDIR is already /usr/bin
  Update the arch PKGBUILD script for QubesOS 4.0
2017-11-03 22:43:34 +01:00
Marek Marczykowski-Górecki
c6f53d7a58
Merge remote-tracking branch 'qubesos/pr/64'
* qubesos/pr/64:
  Disable dnf plugins when downloading dom0 updates in sys-firewall
2017-11-03 22:42:49 +01:00
Marek Marczykowski-Górecki
2006b8494e
Fix starting time synchronization service
systemd-timesyncd.service isn't enough, for various reasons:
 - it is started too early in the boot process - files in
   /var/run/qubes-services are not yet there
 - by default it does only one shot synchronization, and there is no
   network at that early boot time yet
 - by default use-ntp is set to "no"

So, in addition, enable actual ntp client.

Fixes QubesOS/qubes-issues#3210
2017-11-03 03:12:55 +01:00
Olivier MEDOC
d0b2a8b4b0 archlinux: fix shellcheck issues 2017-10-31 15:12:04 +01:00
Olivier MEDOC
7ee8c9c672 archlinux: create a keyring package to install binary repository automatically 2017-10-30 16:31:05 +01:00
Olivier MEDOC
6ddb8e8034 Makefile: add network install targets to install-deb 2017-10-29 22:02:01 +01:00
Olivier MEDOC
7ce29040ef Makefile: fix typo created when spliting the install targets 2017-10-29 21:22:11 +01:00
Olivier MEDOC
636722ccb5 Makefile: add basic networking to the new install-corevm target 2017-10-29 16:40:21 +01:00
Olivier Médoc
6e723dca64 archlinux: split core-agent from netvm-agent 2017-10-29 03:24:51 -04:00
Olivier Médoc
83e3dd08b9 Makefile: ensure that everything is installed by default for rh based agents 2017-10-29 03:20:51 -04:00
Olivier Médoc
9c14656ed8 Makefile: split network install target from core agent install target 2017-10-29 03:19:36 -04:00
Nedyalko Andreev
5438e43ff6
Disable dnf plugins when downloading dom0 updates in sys-firewall
Since the qubes-download-dom0-updates script executes dnf with fakeroot, some dnf plugins like etckeeper break the update with "Permission denied" errors.
2017-10-28 06:34:51 +03:00
Olivier MEDOC
5971cdd5bc archlinux: restore setup of pam.d/su-l
qubes-gui agent calls su-l instead of initializing its own pam
session such as qrexec.
pam.d/su-l qubes specific configuration must be restored to ensure
that the user login session is properly initialized:
https://github.com/QubesOS/qubes-issues/issues/3185
2017-10-25 15:03:16 +02:00
Olivier MEDOC
0f3084ff2a archlinux: remove python3 dependency 2017-10-23 20:23:51 +02:00
Olivier MEDOC
26659d4e51 archlinux: ensure [options] section is present in all pacman drop-ins
Create an empty [options] dropin by default or pacman will fail
when no dropin is present
2017-10-23 20:22:04 +02:00
Olivier MEDOC
5fdcb19685 archlinux: enforce usage of python2 in all scripts 2017-10-23 20:16:27 +02:00
Olivier MEDOC
a9898d576e Makefile: avoid using python interpreter as a static name 2017-10-23 19:53:25 +02:00
Olivier MEDOC
5e4ca2ac74 archlinux: create user 'user' using bash by default instead of zsh
The bash/zsh bug should not be present anymore in Qubes 4.0
as discussed in the issue 2888.
(https://github.com/QubesOS/qubes-issues/issues/2888)
2017-10-23 09:35:24 +02:00
Olivier MEDOC
0b15761d69 archlinux: ship pam.d/qrexec as a replacement of using su 2017-10-23 08:09:34 +02:00
Olivier MEDOC
0bf69ebc24 archlinux: do not mess with locales in post-install script
Locales must be setup properly in the template.
2017-10-23 07:53:23 +02:00
Olivier MEDOC
6b68397f6f archlinux: remove pam configuration for su and su-l
The related bug should have been fixed in issue #2903
(https://github.com/QubesOS/qubes-issues/issues/2903)
2017-10-23 07:49:10 +02:00
Olivier MEDOC
f65ab12c46 archlinux: remove deprecated setup of pam since v4.0.3
PAM is now used directly instead of calling su
2017-10-22 21:43:47 +02:00
Nedyalko Andreev
2a006b6c09 Add the 4.0 repo to the PKGBUILD sources list 2017-10-22 21:35:50 +02:00
Nedyalko Andreev
7770a69030 Restore the binary pacman repo and update it for QubesOS 4.0 2017-10-22 21:35:43 +02:00
Nedyalko Andreev
607096eed6 Fix the makefile for archlinux - SBINDIR is already /usr/bin 2017-10-22 21:35:01 +02:00
Nedyalko Andreev
ed15bc157e Update the arch PKGBUILD script for QubesOS 4.0 2017-10-22 21:34:55 +02:00
Marek Marczykowski-Górecki
92682903ad
version 4.0.12 2017-10-19 17:28:27 +02:00
Marek Marczykowski-Górecki
5edd3b3f75
Merge branch 'fixes-20171019'
* fixes-20171019:
  debian: cleanup after splitting qubes-core-agent
  Fix removing temporary file after editing in (Disp)VM
  network: fix rules for network setup on new udev
  debian: disable timer-based apt-get
2017-10-19 16:51:12 +02:00
Marek Marczykowski-Górecki
e327da019d
debian: cleanup after splitting qubes-core-agent
Displacement of /etc/pam.d/su was moved to
qubes-core-agent-passwordless-root, fix upgrade path.
2017-10-19 16:18:23 +02:00
Marek Marczykowski-Górecki
e2789ca2d7
Fix removing temporary file after editing in (Disp)VM
Fix removing the file - do not free its filename just before unlink call
(scheduled with atexit function).
At the same time, place the temporary file in a unique directory,
making it possible to edit multiple files with the same name at once.
Remove that directory at exit too.

Fixes QubesOS/qubes-issues#3112
2017-10-19 16:18:01 +02:00
Marek Marczykowski-Górecki
2068299126
network: fix rules for network setup on new udev
New udev have `DRIVERS` matcher, instead of `ENV{ID_NET_DRIVER}`. Add
appropriate rule to the file. Without it, network was working
incidentally, because there is a fallback in qubes-misc-post.service,
but dynamic network change was broken.

This applies at least to Debian stretch.

Fixes QubesOS/qubes-issues#3192
2017-10-19 15:10:31 +02:00
Marek Marczykowski-Górecki
128af0d191
debian: disable timer-based apt-get
Debian stretch in default configuration calls apt-get update every 24h.
And additionally, have automatic unattended security updates enabled.
Generally it would be good thing on standalone system, but in AppVM
which loose its rootfs changes after restart it is a waste of resources.
Especially when it kicks in on multiple VMs simultaneously, while on
battery (apt-daily.service have ConditionACPower=true, but VM don't have
that information...).

It would make some sense on TemplateVM/StandaloneVM, but then it kicks
in just at VM startup. Which conflicts with starting the update manually
then (by clicking "update VM" button in manager for example, or using
salt).

So, disable this feature completely.

The actual solution is based on pkg-manager-no-autoupdate by @adrelanos.

Fixes QubesOS/qubes-issues#2621
2017-10-19 15:03:06 +02:00
Marek Marczykowski-Górecki
1ed6e614ab
Resize root filesystem at VM startup if needed
Check if root device was enlarged while domain was powered off and
resize the filesystem in such a case.

QubesOS/qubes-issues#3173
QubesOS/qubes-issues#3143
2017-10-18 21:02:15 +02:00
Marek Marczykowski-Górecki
d8a2b8c375
Add support for new root volume partition layout to qubes.ResizeDisk
If root filesystem is the last partition (new layout), resize it
in-place. Use 'parted' tool because it can resize just one partition,
without need to specify the whole new partition table. Since the
partition is mounted, parted is unhappy to modify it. Force it by
answering to its interactive prompts, and add (apparently not
documented) ---pretend-input-tty to use those answers even
though stdin is not a tty. Split the operation into multiple parted
calls, for more reliable interactive prompts handling.

Qubes 3.x disk layout (no partition table) is also supported, but the
one that was used in Qubes 4.0 rc1 (root filesystem as the first
partition) is not.

Fixes QubesOS/qubes-issues#3173
QubesOS/qubes-issues#3143
2017-10-18 19:53:48 +02:00