Commit Graph

1931 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
259c807b06
debian: fix shellcheck warnings in debian packaging
(cherry picked from commit f16753c67b)
2017-12-15 02:28:54 +01:00
Marek Marczykowski-Górecki
9577eedfe9
Merge remote-tracking branch 'qubesos/pr/78' into release3.2
* qubesos/pr/78:
  Disable wpa_supplicant@.service
2017-12-15 02:27:01 +01:00
unman
51f80d39a1
Disable wpa_supplicant@.service 2017-12-14 20:40:04 +00:00
Marek Marczykowski-Górecki
c557c095e5
version 3.2.21 2017-12-13 19:44:07 +01:00
Marek Marczykowski-Górecki
eede2a9df4
Merge remote-tracking branch 'qubesos/pr/73' into release3.2
* qubesos/pr/73:
  Add iptables dep to qubes-core-vm RPM spec
2017-12-13 03:43:00 +01:00
Marek Marczykowski-Górecki
2effdca232
Disable cups-browsed service together with cups
It tries to connect to cups every second and doesn't do anything else
when cups is disabled. So disable (or enable) both of them at the same
time.

(cherry picked from commit 414f944cf9)
2017-12-13 03:42:28 +01:00
Marek Marczykowski-Górecki
ee16e5cecb
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

(cherry picked from commit 3fb258db47)
2017-12-13 03:40:43 +01:00
Nedyalko Andreev
78c1a22bbf
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.

(cherry picked from commit 5438e43ff6)
2017-12-13 03:37:53 +01:00
Marek Marczykowski-Górecki
a067452c64
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

(cherry picked from commit e2789ca2d7)
2017-12-13 03:37:19 +01:00
Marek Marczykowski-Górecki
e706e54f26
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

(cherry picked from commit 2068299126)
2017-12-13 03:36:56 +01:00
Marek Marczykowski-Górecki
364fd3687f
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

(cherry picked from commit 128af0d191)
2017-12-13 03:36:28 +01:00
Marek Marczykowski-Górecki
5e3efc23d7
qrexec: code style fix - use spaces for indentation
(cherry picked from commit 1497b3b05b)
2017-12-13 03:17:00 +01:00
Rusty Bird
d082479dc3
Add iptables dep to qubes-core-vm 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:40 +00:00
Nedyalko Andreev
8c06c1eabd
Fix the previous shellcheck-related "fixes" again 2017-10-02 14:49:40 +03:00
Nedyalko Andreev
6d28d4dfaf
Fix the install script after the shellcheck "fixes" 2017-10-02 01:22:40 +03:00
Nedyalko Andreev
60ee036f04
Fix indentation and shellcheck issues for archlinux 2017-10-01 21:48:13 +03:00
Nedyalko Andreev
5662d7e5fe
Disable Oliver's binary pacman repo by default
Currently building the package fails with an error 'qubes-r3.2: key "2043E7ACC1833B9C" is unknown'.
This also harmonizes the code with the current documentation: https://www.qubes-os.org/doc/templates/archlinux/#binary-packages-activation
2017-10-01 21:05:04 +03:00
Nedyalko Andreev
4f26267796
Fix the archlinux package, use correct DROPIN dirs
Without this change the package builds successfully but there is a
file conflict error when installing it.
2017-09-30 01:27:15 +03:00
Marek Marczykowski-Górecki
f7bf46f780
version 3.2.20 2017-09-24 23:14:38 +02:00
Frédéric Pierret
60b6f13f8e
dnf-qubes-hooks: handle newer DNF >= 2.x
(cherry picked from commit cb2448f1ab)
2017-09-24 23:14:27 +02:00
Marek Marczykowski-Górecki
a272b54219
version 3.2.19 2017-09-24 22:24:36 +02:00
Marek Marczykowski-Górecki
61abcdfc93
travis: add fc25 and fc26 targets 2017-09-24 22:13:44 +02:00
Frederic Pierret (Epitre)
0f56bc904e
Handle fallthrough with attribute(noreturn) for consistancy and compatiblity with older GCC
(cherry picked from commit 11f86ca4e4)
2017-09-24 17:22:27 +02:00
Frederic Pierret (Epitre)
162d5b1e59
Add CENTOS/RHEL support (drop fedora-release dependancy as template builder will install it anyway and here it only make harder to support non-fedora builds)
(cherry picked from commit 08bfc8bbac)
2017-09-24 17:22:27 +02:00
Vincent Penquerc'h
26e70123aa
core-agent-linux: misc const fixups
(cherry picked from commit 475421b2e2)
Apparently some of this commit got reverted during cleanup before
Qubes 3.0 release.

(cherry picked from commit f49042211b)
2017-09-24 17:22:26 +02:00
Marek Marczykowski-Górecki
a0f386fb03
qrexec: do not shutdown stdout socket inherited from parent
When qrexec-client-vm is started with socket on its stdout and no local
process requested, it will try to shutdown(SHUT_WR) this socket when
remote process exists. This is wrong, because this socket may be still
needed by other processes (for example shell from where qrexec-client-vm
was called).
In such a case, simple close() should be used.

(cherry picked from commit 6bddcfcb52)
2017-09-24 17:22:26 +02:00
Marek Marczykowski-Górecki
7592e913c5
qrexec: fix reporting exit code in qrexec-client-vm
1. If local process is started, report its exit code, instaed of remote
one. To get remote exit code, simply start qrexec-client-vm without
third argument (and connect its stdin/stdout with the other process some
other way).

2. Report process terminated by signal.
Don't pretend that process terminated by signal finished successfuly.
Copy shell behaviour of reporting it as 128+signum.

3. Do not wait() for any child process, just the one we expect. In case
of qrexec-client-vm the child process is started differently and
wait()ing on it inside main loop would break its exit code reporting.

Fixes QubesOS/qubes-issues#2861

(cherry picked from commit ea0cd0fdc3)
2017-09-24 17:22:26 +02:00
Marek Marczykowski-Górecki
ef80574002
qrexec: exit with code 126 when service request was refused
Exit code 1 is very common in all kind of programs, including qrexec
services, so it is hard to distinguish remote failure from service call
refusal. Use something from top of the range here (but not 127, as it is
commonly used to report "Command not found")

QubesOS/qubes-issues#2861

(cherry picked from commit d2aa21625c)
2017-09-24 17:22:26 +02:00
Marek Marczykowski-Górecki
60fc91aedd
Add qrexec-client-vm man page
This clarifies and also defines some corner cases like exit code
reporting.

QubesOS/qubes-issues#2861

(cherry picked from commit ff26dcfe53)
Man page stripped from Qubes 4.0 features.
2017-09-24 17:22:25 +02:00
Marek Marczykowski-Górecki
066be57f2c
Make all scripts in qubes-rpc executable
Don't rely on legacy feature of interpreting non-executable files as
scripts there.

(cherry picked from commit ce63d31a2e)
2017-09-24 17:12:14 +02:00
Marek Marczykowski-Górecki
5a28912a8c
Do not report spurious failure of qubes.WaitForSession service
It is expected to be killed by a signal. Exit with returncode 0 anyway.
While at it, adjust it for current service format (executable, with
proper shebang).

(cherry picked from commit 22002a34f3)
2017-09-24 17:11:41 +02:00
unman
b445ebce50
Enable build for Zesty 2017-05-23 23:59:41 +01: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