ben-grande / qusal

Salt Formulas for Qubes OS.
14 stars 6 forks source link

qubes-builder fails at git.config_set because of non-existent directory #76

Closed kennethrrosen closed 1 week ago

kennethrrosen commented 1 week ago

Commitment

I confirm that I have read the following resources:

Software version

R4.2.1

Brief summary

Error occurs in final update of qubes-builder appvm while running sudo qubesctl --targets=tpl-qubes-builder,dvm-qubes-builder,qubes-builder state.apply

Steps to reproduce

sudo qubesctl --targets=tpl-qubes-builder,dvm-qubes-builder,qubes-builder state.apply after latest PR #75

Expected behavior

Install finished without error

Actual behavior

2024-06-24 10:41:05,308 output:           ID: qubes-builder-git-config-gpg.program-for-mirrors
2024-06-24 10:41:05,308 output:     Function: git.config_set
2024-06-24 10:41:05,308 output:         Name: gpg.program
2024-06-24 10:41:05,308 output:       Result: False
2024-06-24 10:41:05,308 output:      Comment: An exception occurred in this state: Traceback (most recent call last):
2024-06-24 10:41:05,308 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/state.py", line 2422, in call
2024-06-24 10:41:05,308 output:                   ret = self.states[cdata["full"]](
2024-06-24 10:41:05,308 output:                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,308 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 159, in __call__
2024-06-24 10:41:05,308 output:                   ret = self.loader.run(run_func, *args, **kwargs)
2024-06-24 10:41:05,308 output:                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,308 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1245, in run
2024-06-24 10:41:05,308 output:                   return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
2024-06-24 10:41:05,308 output:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,308 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1260, in _run_as
2024-06-24 10:41:05,308 output:                   return _func_or_method(*args, **kwargs)
2024-06-24 10:41:05,308 output:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,308 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1293, in wrapper
2024-06-24 10:41:05,308 output:                   return f(*args, **kwargs)
2024-06-24 10:41:05,308 output:                          ^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,308 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/states/git.py", line 3180, in config_set
2024-06-24 10:41:05,308 output:                   pre = __salt__["git.config_get"](
2024-06-24 10:41:05,309 output:                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,309 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 159, in __call__
2024-06-24 10:41:05,309 output:                   ret = self.loader.run(run_func, *args, **kwargs)
2024-06-24 10:41:05,309 output:                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,309 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1245, in run
2024-06-24 10:41:05,309 output:                   return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
2024-06-24 10:41:05,309 output:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,309 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1260, in _run_as
2024-06-24 10:41:05,309 output:                   return _func_or_method(*args, **kwargs)
2024-06-24 10:41:05,309 output:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,309 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/modules/git.py", line 1288, in config_get
2024-06-24 10:41:05,309 output:                   result = _config_getter(
2024-06-24 10:41:05,309 output:                            ^^^^^^^^^^^^^^^
2024-06-24 10:41:05,309 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/modules/git.py", line 96, in _config_getter
2024-06-24 10:41:05,309 output:                   return _git_run(
2024-06-24 10:41:05,309 output:                          ^^^^^^^^^
2024-06-24 10:41:05,309 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/modules/git.py", line 382, in _git_run
2024-06-24 10:41:05,309 output:                   result = __salt__["cmd.run_all"](
2024-06-24 10:41:05,309 output:                            ^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,309 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 159, in __call__
2024-06-24 10:41:05,309 output:                   ret = self.loader.run(run_func, *args, **kwargs)
2024-06-24 10:41:05,309 output:                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,309 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1245, in run
2024-06-24 10:41:05,309 output:                   return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
2024-06-24 10:41:05,309 output:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,310 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/loader/lazy.py", line 1260, in _run_as
2024-06-24 10:41:05,310 output:                   return _func_or_method(*args, **kwargs)
2024-06-24 10:41:05,310 output:                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-24 10:41:05,310 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/modules/cmdmod.py", line 2328, in run_all
2024-06-24 10:41:05,310 output:                   ret = _run(
2024-06-24 10:41:05,310 output:                         ^^^^^
2024-06-24 10:41:05,310 output:                 File "/var/tmp/.root_dd8a91_salt/pyall/salt/modules/cmdmod.py", line 709, in _run
2024-06-24 10:41:05,310 output:                   raise CommandExecutionError(
2024-06-24 10:41:05,310 output:               salt.exceptions.CommandExecutionError: Specified cwd '/home/user/src/qubes-builderv2' either not absolute or does not exist
2024-06-24 10:41:05,310 output:      Started: 10:41:02.290672
2024-06-24 10:41:05,310 output:     Duration: 105.518 ms
2024-06-24 10:41:05,310 output:      Changes:   
2024-06-24 10:41:05,310 output: ----------
2024-06-24 10:41:05,310 output:           ID: qubes-builder-git-verify-HEAD-builderv2
2024-06-24 10:41:05,310 output:     Function: cmd.run
2024-06-24 10:41:05,310 output:         Name: GNUPGHOME="$HOME/.gnupg/qubes-builder" git -c gpg.program=gpg2 verify-tag "$(git describe --tags --abbrev=0)"
2024-06-24 10:41:05,310 output:       Result: False
2024-06-24 10:41:05,310 output:      Comment: Desired working directory "/home/user/src/qubes-builderv2" is not available
2024-06-24 10:41:05,310 output:      Started: 10:41:02.396843
2024-06-24 10:41:05,310 output:     Duration: 0.845 ms

.

ben-grande commented 1 week ago

I am sorry. I will do the full Qubes Builder V2 installation from scratch so you don't face issues with it anymore.

ben-grande commented 1 week ago

I know the error, I was trying to do an authenticated installation, so I cloned to /tmp and planned to do a verification and then planned to move to /home/user/src but this never happened. Git does not verify signatures on clone, which is sad. Anyway, this can't be handled at this moment, as there is no better alternative, git verification is just done after repository is in place...

ben-grande commented 1 week ago
  Summary for disp-dev
  -------------
  Succeeded: 34 (changed=30)
  Failed:     0
  -------------
  Total states run:     34
  Total run time:    7.850 s

I tried on a disposable, you should be good now. Sorry for any inconvenience.

Reminder to self: never commit debugging code...

kennethrrosen commented 1 week ago

Working great now. Thank you for the quick turnaround.

ben-grande commented 1 week ago

Thank you for being interested in Qusal and reporting back that is worked. It is valuable!