Commit Graph

389 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
473985c94d
version 3.2.18 2018-09-17 15:01:12 +02:00
Marek Marczykowski-Górecki
ce2193d85b
kernel-install: fix initramfs copying scripts
Fix current EFI boot dir discovery script.

Also, adjust scripts order:
50-dracut generates initramfs in /boot/(efi/)?/$MACHINE_ID/.../initrd
80-grub2 copies it to /boot/initramfs-....img
90-xen-efi copies it to /boot/efi/EFI/qubes/initramfs-....img

Make the above order explicit, rather than relying on xen sorted later
than grub2.

QubesOS/qubes-issues#3234

(cherry picked from commit 9eefe23f4c)
2018-09-17 05:30:05 +02:00
Marek Marczykowski-Górecki
cc8bffb664
kernel-install: remove EFI variant of BLS dirs too
Remove also EFI version of BootLoader Specification dirs. This will:
- really force to re-generate initramfs during installation, after all
relevant configs are updated; previously, dracut (called by anaconda
through kernel-install) refuse to update already existing
/boot/efi/.../initrd file.
- save some precious space in /boot/efi

Fixes QubesOS/qubes-issues#3234

(cherry picked from commit 53730c4ba2)
2018-09-17 05:30:05 +02:00
Marek Marczykowski-Górecki
06e260e92d
kernel-install: cleanup old kernel binary on remove
Don't let kernel images accumulate on EFI partition.

(cherry picked from commit 861ddc9ce0)
2018-09-17 05:30:05 +02:00
Marek Marczykowski-Górecki
306330e042
kernel-install: use up to date initramfs
During installation, /usr/lib/kernel/install.d/50-dracut.install
generate initramfs in $BOOT_DIR_ABS. It is important to use that one,
even if there is one in /boot/initramfs-*.img already, because it was
generated later and contains all required config files (including
keyboard layout for entering LUKS passphrase).

This fixes d1f3be0eed "kernel-install:
avoid creating initramfs multiple times".

Fixes QubesOS/qubes-issues#3234

(cherry picked from commit bcf7c9e978)
2018-09-17 05:30:05 +02:00
Marek Marczykowski-Górecki
72c2a30eab
kernel-install: avoid creating initramfs multiple times
There are multiple places where initramfs can be created:
 - /boot/iniramfs-*.img
 - /boot/$MACHINE_ID/.../initrd (unused on Qubes, but created by Fedora
   scripts)
 - /boot/efi/EFI/.../initramfs-*.img

Do not generate all of those from scratch, but try to reuse existing
image (if exists). Since one dracut call may last even 5 minutes, this
change should greatly reduce installation time.

Fixes QubesOS/qubes-issues#3637

(cherry picked from commit d1f3be0eed)
2018-09-17 05:30:05 +02:00
Marek Marczykowski-Górecki
58f0af9d80
rpm: add missing BR: python
It isn't implied by buildsys-build group anymore.
2018-09-01 13:32:34 +02:00
Marek Marczykowski-Górecki
9f18e6d742
Drop salsa20-x86_64 module from dracut image
It isn't really used by default and x86_64 specific variant was recently
dropped (4.14.47 at least).

Fixes QubesOS/qubes-issues#4181
2018-09-01 13:19:20 +02:00
Marek Marczykowski-Górecki
61f83e888f
Merge remote-tracking branch 'qubesos/pr/39' into release3.2
* qubesos/pr/39:
  Added -p to mkdir for skip error if dir exists
  Make dir dom0-updates if not exists on UpdateVM

Fixes QubesOS/qubes-issues#3620
2018-02-25 21:27:54 +01:00
donoban
e2ff40c188
Added -p to mkdir for skip error if dir exists 2018-02-25 12:12:06 +01:00
donoban
facf84a4e6
Make dir dom0-updates if not exists on UpdateVM 2018-02-23 10:31:12 +01:00
Marek Marczykowski-Górecki
86efd7e287
version 3.2.17 2018-02-20 01:17:23 +01:00
Marek Marczykowski-Górecki
a29580572e
rpm: adjust dependencies 2018-02-20 01:14:58 +01:00
Marek Marczykowski-Górecki
1a01417994
qubespolicy: unify calling qrexec service
Rely on qrexec-client resolving QUBESRPC keyword, same as in case of VM
call. This will allow applying special treatment to such calls, like
calling qubes-rpc-multiplexer directly (avoiding shell), because we have
defined protocol what can be used here.
2018-02-19 02:27:32 +01:00
Marek Marczykowski-Górecki
fe271c5672
qubespolicy: use '@' instead of '$' for policy keywords
Using '$' is easy to misuse in shell scripts, shell commands etc. After
all this years, lets abandon this dangerous character and move to
something safer: '@'. The choice was made after reviewing specifications
of various shells on different operating systems and this is the
character that have no special meaning in none of them.

To preserve compatibility, automatically translate '$' to '@' when
loading policy files.
2018-02-19 02:26:02 +01:00
Marek Marczykowski-Górecki
6b0fef6dba
qrexec: automatically translate '$' to '@' in target name specification
After the change of target keywords, apply transparen translation from
old names. This will avoid breaking calls from not updated VMs. Apply
this change only in stable branch.
2018-02-19 02:18:32 +01:00
Marek Marczykowski-Górecki
f481671782
qrexec: forbid '$' in target and service name
Those parameters eventually may eventually be passed to a shell script
(at least /usr/lib/qubes/qubes-rpc-multiplexer). While it is possible to
properly escape shell special characters, lets do safer and less fragile
thing: forbid such characters entirely.
In case of target name, qrexec policy keywords are allowed, and after
recent change, those contains '@', so allow this char.

(cherry picked from commit cf28dad1943bd424b2ed23000cdcfd32d8e3190c)
2018-02-19 02:17:42 +01:00
Marek Marczykowski-Górecki
e6d8b52197
qrexec: use exec_qubes_rpc_if_requested() from qubes-utils
This avoids duplicating service call parsing in multiple places. For
dom0 part it was in qrexec-policy tool.
Also, add execl() error handling.

(cherry picked from commit 32b0c659a1)
2018-02-19 02:17:08 +01:00
Simon Gaiser
e7f4fa9a5d pm-utils: Fix handling of HVM domains
`xl list` reports the PCI devies for the stub domain. But we want to
call qubes.SuspendPre inside the domain itself.
2018-01-09 03:21:53 +01:00
Marek Marczykowski-Górecki
d67af4bfd9
version 3.2.16 2017-09-27 02:58:32 +02:00
Marek Marczykowski-Górecki
e4469c7fde
qrexec: fix domain autostart on qrexec call with 'target=' in policy
When policy specify 'target=' option, update 'vm' variable too (used to
start appropriate domain), not only 'target' variable (used to
make the actual call. Otherwise wrong domain is started (original one,
not the one overriden by target= option), and the call fails - since
the right domain is not running.
2017-09-27 02:55:51 +02:00
Marek Marczykowski-Górecki
012ca712d2
version 3.2.15 2017-06-13 12:53:19 +02:00
Christopher Laprise
3bd5c13996
Fix root.img handling bug
Per issue https://github.com/QubesOS/qubes-issues/issues/2848

(cherry picked from commit 6d251d5c58)
Notes from origin:
    Fixes QubesOS/qubes-issues#2848
2017-06-07 10:11:03 +02:00
Marek Marczykowski-Górecki
63e023883b
version 3.2.14 2017-05-29 21:07:27 +02:00
Marek Marczykowski-Górecki
bb88d74689
qrexec: fix pending requests cleanup code (cont)
There was a second place with exactly the same bug. See
dad208a "qrexec: fix pending requests cleanup code" for details.

Fixes QubesOS/qubes-issues#2699

(cherry picked from commit 8719e5d74c)
2017-05-29 21:00:16 +02:00
Marek Marczykowski-Górecki
a94102c940
Really disable lesspipe
Only files with .sh suffix are loaded.

Fixes QubesOS/qubes-issues#2808

(cherry picked from commit e62acf815a)
2017-05-26 05:48:34 +02:00
Marek Marczykowski-Górecki
5e79b88adc
version 3.2.13 2017-04-21 18:43:51 +02:00
Marek Marczykowski-Górecki
b629cbfe9e
Merge remote-tracking branch 'qubesos/pr/24'
* qubesos/pr/24:
  Prompt to create policy file for qubes-rpc if not present.
2017-04-21 16:19:50 +02:00
Marek Marczykowski-Górecki
a86c36ceb1
Merge remote-tracking branch 'qubesos/pr/23'
* qubesos/pr/23:
  Flush dnf configuration on updateVM before starting dom0 update
2017-04-21 16:18:18 +02:00
unman
194e0bc3cc
Prompt to create policy file for qubes-rpc if not present. 2017-04-20 22:27:36 +01:00
unman
fa72d66d5d
Flush dnf configuration on updateVM before starting dom0 update 2017-04-20 14:41:19 +01:00
Jean-Philippe Ouellet
5e0df3d2cc
Remove dates from man pages
Counterpart to https://github.com/QubesOS/qubes-core-admin/pull/94
2017-03-16 05:44:58 -04:00
Marek Marczykowski-Górecki
9ea58a2ce2
Merge remote-tracking branch 'qubesos/pr/20'
* qubesos/pr/20:
  Fixes
  Starting mods for template upgrade support
2017-03-15 17:43:22 +01:00
Christopher Laprise
25f1801061
Fixes 2017-03-15 10:10:36 -04:00
M. Vefa Bicakci
e6e2404d24
dracut: Do not fail if Xen components are built into the kernel
Prior to this commit, if the Linux kernel's Xen-related components were
built into the kernel (as opposed to the use of kernel modules), then
the dracut module initialization would fail during the generation of the
initial ramdisk image.

This commit corrects this issue by using an if/then block.

Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
2017-03-14 17:20:05 +03:00
Christopher Laprise
ad404bfbe6
Starting mods for template upgrade support 2017-03-12 23:15:45 -04:00
Marek Marczykowski-Górecki
eb12a8cfc6
version 3.2.12 2017-03-13 03:32:25 +01:00
Marek Marczykowski-Górecki
dad208a0d5
qrexec: fix pending requests cleanup code
There was a logic error in pending requests cleanup code, causing
policy_pending_max being set to 0, even if there were more pending
requests. This effectively limited maximum pending requests to 1, after
some system uptime, because policy_pending_max set to 0 makes the code
looks only at the first pending request slot.

While at it, remove outdated FIXME comment, actually this bug is in the
code implementing this FIXME.

Fixes QubesOS/qubes-issues#2699
2017-03-13 03:17:27 +01:00
tasket
05b57f4960 Merge pull request #4 from QubesOS/master
Update from original
2017-03-07 02:15:00 -05:00
Marek Marczykowski-Górecki
4f0878ccbf
version 3.2.11 2016-12-06 01:55:11 +01:00
Marek Marczykowski-Górecki
97c13e15f0
travis: remove debootstrap workaround
Moved to qubes-builder
2016-12-06 01:55:06 +01:00
Rusty Bird
4d18800bc0
v2: (dom0) qvm-move-to-vm: don't "rm -rf" vm name argument
Fixes QubesOS/qubes-issues#2472 from commit
bc29af7c0c
2016-12-04 16:52:18 +00:00
Jean-Philippe Ouellet
c6e1f0536c
Move qvm-xkill to new tools/ dir 2016-11-28 03:56:45 -05:00
Jean-Philippe Ouellet
e59c863c23
Fix a typo
Thanks rustybird for catching it.
2016-11-26 23:50:47 -05:00
Jean-Philippe Ouellet
be1d984364
Mitigate GUI DoS (part 2: qvm-xkill)
Can close windows of a VM while it's paused, and can not accidentally
harm dom0 by errant clicking.

Discussion in https://github.com/QubesOS/qubes-issues/issues/881

Thanks to rustybird for suggested implementation.
2016-11-26 21:59:16 -05:00
Marek Marczykowski-Górecki
73ba5f805b
version 3.2.10 2016-11-18 03:17:29 +01:00
Marek Marczykowski-Górecki
981a11cee1
qrexec: really do not match 'dom0' at '$anyvm', as documented
Design documentation says:
'note string dom0 does not match the $anyvm pattern; all other names do'

This behaviour was broken, because 'is not' in python isn't the same as
string comparison. In theory this could result in some service
erroneously allowed to execute in dom0, but in practice such services are
not installed in dom0 at all, so the only impact was misleading error
message.

Fixes QubesOS/qubes-issues#2031
Reported by @Jeeppler
2016-11-18 02:51:25 +01:00
Jean-Philippe Ouellet
9b7667c3a5
Ignore EFI boot args when parsing for filename
I need to set some flags in order to boot as described here:
https://www.qubes-os.org/doc/uefi-troubleshooting/

My settings look like this:
    $ efibootmgr -v
    BootCurrent: 0000
    Boot0000* Qubes HD(...)/File(\EFI\qubes\xen.efi)p.l.a.c.e.h.o...

which causes awk to get confused and think my $EFI_DIR should be:
    /EFI/qubesp.l.a.c.e.h.o.l.d.e.r. ./.m.a.p.b.s. ./.n.o.e.x.i.t.b.o.o.t.

This causes the script to later bail:
    if [ ! -d "$EFI_DIR" ]; then
        # non-EFI system
        exit 0;
    fi

So my xen.cfg did not get new entries when installing dom0 kernel packages.
2016-11-11 16:22:23 -05:00
Marek Marczykowski-Górecki
c73dcd2786
Merge remote-tracking branch 'qubesos/pr/12'
* qubesos/pr/12:
  Keep Makefile DRY
2016-11-11 14:24:48 +01:00
Jean-Philippe Ouellet
e24f3535ff
Keep Makefile DRY 2016-11-10 06:42:39 -05:00