Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix qvm-copy behavior with symlinks #548

Merged

Conversation

zaz
Copy link
Contributor

@zaz zaz commented Jan 16, 2025

Previously, qvm-copy had a couple of issues with symlinks:

  1. A trailing slash on the source could cause errors:
$ qvm-copy-to-vm untrusted dir/
qubes-fs-tree-check: Refusing to copy unsafe symbolic link "dir//my-symlink"

but qvm-copy-to-vm untrusted dir worked fine.

  1. qvm-copy --ignore-symlinks could still throw qubes-fs-tree-check: Refusing to copy unsafe symbolic link . If we are ignoring symlinks, qubes-fs-tree-check should not check for them.

Notes

Running qubes-fs-tree-check --ignore-symlinks --allow-symlinks does not seem to cause an issue.

zaz added 3 commits January 16, 2025 13:22
FIXES `qubes-fs-tree-check: Refusing to copy unsafe symbolic link "dir//link"` when you run `qvm-copy dir/`
Previously, `qvm-copy --ignore-symlinks` could result in `qubes-fs-tree-check: Refusing to copy unsafe symbolic link`
@zaz zaz changed the title Fix behavior with symlinks Fix qvm-copy behavior with symlinks Jan 16, 2025
qubes-rpc/qvm-copy Outdated Show resolved Hide resolved
fixes bug introduced in previous commit
@zaz zaz requested a review from marmarek January 17, 2025 17:36
@zaz
Copy link
Contributor Author

zaz commented Jan 17, 2025

@marmarek Thanks for catching that! How does it look now?

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.14%. Comparing base (74d07bb) to head (397b8c1).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
- Coverage   70.57%   70.14%   -0.43%     
==========================================
  Files           3        3              
  Lines         469      469              
==========================================
- Hits          331      329       -2     
- Misses        138      140       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qubesos-bot
Copy link

qubesos-bot commented Jan 18, 2025

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025012002-4.3&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024111705-4.3&flavor=update

  • system_tests_basic_vm_qrexec_gui

  • system_tests_pvgrub_salt_storage

    • TC_10_VMSalt_archlinux: test_000_simple_sls (failure)
      AssertionError: Salt command '['qubesctl', '--skip-dom0', '--show-o...

    • TC_10_VMSalt_archlinux: test_001_multi_state_highstate (failure)
      AssertionError: Salt command '['qubesctl', '--skip-dom0', '--show-o...

    • TC_10_VMSalt_archlinux: test_003_update (failure)
      AssertionError: Salt command '['qubesctl', '--skip-dom0', '--show-o...

    • TC_10_VMSalt_archlinux: test_004_user_sls (failure)
      AssertionError: Salt command '['qubesctl', '--skip-dom0', '--show-o...

  • system_tests_extra

    • TC_00_PDFConverter_archlinux: test_000_one_page (failure)
      AssertionError: 127 != 0 : qvm-convert-pdf failed: b'bash: qvm-conv...

    • TC_00_PDFConverter_archlinux: test_001_two_pages (failure)
      AssertionError: 127 != 0 : qvm-convert-pdf failed: b'bash: qvm-conv...

    • TC_00_PDFConverter_archlinux: test_002_500_pages (failure)
      AssertionError: 127 != 0 : qvm-convert-pdf failed: b'bash: line 1: ...

    • TC_00_PDFConverter_archlinux: test_003_filename_with_spaces (failure)
      AssertionError: 127 != 0 : qvm-convert-pdf failed: b'bash: qvm-conv...

  • system_tests_guivm_gui_interactive

    • update_post_templates: Failed (test died)
      # Test died: command '(set -o pipefail; qubesctl --skip-dom0 --show...
  • system_tests_network_updates

    • TC_10_QvmTemplate_archlinux: test_000_template_list (failure)
      AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • TC_10_QvmTemplate_archlinux: test_010_template_install (failure)
      AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

  • system_tests_backupdispvm

    • TC_10_RestoreInDispVM_archlinux: test_000_basic_backup (error)
      qubesadmin.exc.QubesException: qvm-backup-restore tool missing in a...
  • system_tests_dispvm

    • TC_20_DispVM_archlinux: test_030_edit_file (failure + cleanup)
      AssertionError: Timeout waiting for editor window

    • TC_20_DispVM_archlinux: test_100_open_in_dispvm (error)
      subprocess.CalledProcessError: Command 'cat > /etc/thunderbird/pref...

  • system_tests_kde_gui_interactive

    • clipboard_and_web: unnamed test (unknown)
    • clipboard_and_web: Failed (test died)
      # Test died: no candidate needle with tag(s) 'clipboard-copy-notifi...
  • system_tests_guivm_vnc_gui_interactive

    • update_post_templates: Failed (test died)
      # Test died: command '(set -o pipefail; qubesctl --skip-dom0 --show...
  • system_tests_audio

  • system_tests_basic_vm_qrexec_gui_btrfs

  • system_tests_basic_vm_qrexec_gui_ext4

  • system_tests_basic_vm_qrexec_gui_xfs

  • system_tests_audio@hw1

  • system_tests_basic_vm_qrexec_gui@hw7

Failed tests

96 failures
  • system_tests_basic_vm_qrexec_gui

  • system_tests_pvgrub_salt_storage

    • TC_10_VMSalt_archlinux: test_000_simple_sls (failure)
      AssertionError: Salt command '['qubesctl', '--skip-dom0', '--show-o...

    • TC_10_VMSalt_archlinux: test_001_multi_state_highstate (failure)
      AssertionError: Salt command '['qubesctl', '--skip-dom0', '--show-o...

    • TC_10_VMSalt_archlinux: test_003_update (failure)
      AssertionError: Salt command '['qubesctl', '--skip-dom0', '--show-o...

    • TC_10_VMSalt_archlinux: test_004_user_sls (failure)
      AssertionError: Salt command '['qubesctl', '--skip-dom0', '--show-o...

  • system_tests_extra

    • TC_00_PDFConverter_archlinux: test_000_one_page (failure)
      AssertionError: 127 != 0 : qvm-convert-pdf failed: b'bash: qvm-conv...

    • TC_00_PDFConverter_archlinux: test_001_two_pages (failure)
      AssertionError: 127 != 0 : qvm-convert-pdf failed: b'bash: qvm-conv...

    • TC_00_PDFConverter_archlinux: test_002_500_pages (failure)
      AssertionError: 127 != 0 : qvm-convert-pdf failed: b'bash: line 1: ...

    • TC_00_PDFConverter_archlinux: test_003_filename_with_spaces (failure)
      AssertionError: 127 != 0 : qvm-convert-pdf failed: b'bash: qvm-conv...

  • system_tests_guivm_gui_interactive

    • update_post_templates: Failed (test died)
      # Test died: command '(set -o pipefail; qubesctl --skip-dom0 --show...
  • system_tests_network_updates

    • TC_10_QvmTemplate_archlinux: test_000_template_list (failure)
      AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • TC_10_QvmTemplate_archlinux: test_010_template_install (failure)
      AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

  • system_tests_backupdispvm

    • TC_10_RestoreInDispVM_archlinux: test_000_basic_backup (error)
      qubesadmin.exc.QubesException: qvm-backup-restore tool missing in a...
  • system_tests_dispvm

    • TC_20_DispVM_archlinux: test_030_edit_file (failure + cleanup)
      AssertionError: Timeout waiting for editor window

    • TC_20_DispVM_archlinux: test_100_open_in_dispvm (error)
      subprocess.CalledProcessError: Command 'cat > /etc/thunderbird/pref...

  • system_tests_kde_gui_interactive

    • clipboard_and_web: unnamed test (unknown)
    • clipboard_and_web: Failed (test died)
      # Test died: no candidate needle with tag(s) 'clipboard-copy-notifi...
  • system_tests_basic_vm_qrexec_gui_zfs

    • switch_pool: Failed (test died)
      # Test died: command 'qubes-dom0-update -y zfs' failed at /usr/lib/...
  • system_tests_guivm_vnc_gui_interactive

    • update_post_templates: Failed (test died)
      # Test died: command '(set -o pipefail; qubesctl --skip-dom0 --show...
  • system_tests_audio

  • system_tests_basic_vm_qrexec_gui_btrfs

  • system_tests_basic_vm_qrexec_gui_ext4

  • system_tests_basic_vm_qrexec_gui_xfs

  • system_tests_audio@hw1

  • system_tests_basic_vm_qrexec_gui@hw7

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/119126#dependencies

3 fixed
  • system_tests_extra

    • TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^... AssertionError: 0 == 0
  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...
  • system_tests_audio@hw1

Unstable tests

@marmarek marmarek merged commit f72a393 into QubesOS:main Jan 20, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants