Skip to content

vyos-1x-vmware: T3681: Fix Python bytecompile exclusion - #4525

Merged
dmbaturin merged 1 commit into
vyos:currentfrom
yunzheng:T3681-exclusion
May 26, 2025
Merged

vyos-1x-vmware: T3681: Fix Python bytecompile exclusion#4525
dmbaturin merged 1 commit into
vyos:currentfrom
yunzheng:T3681-exclusion

Conversation

@yunzheng

@yunzheng yunzheng commented May 22, 2025

Copy link
Copy Markdown
Contributor

Change summary

VMware resuming was broken again due to a change in the Makefile in the following commit: 64c9fde. That change added an exclusion to the python -m compileall regex, however the updated exclusion regex did not work and resulted in byte compiling and creating a __pycache__ directory again which open-vm-tools tries to execute on resume.

Although a fix landed upstream in open-vm-tools to prevent executing __pycache__ directories here There is no new version in Debian that has this fix yet.

This PR fixes the Python byte compile exclusion regex by specifying it as two separate regexes, I'm not sure why the second exclusion was added initially, as there is no /ppp/ directory that python tries to compile but I have left it in there just in case.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

https://vyos.dev/T3681

Related PR(s)

How to test / Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@github-actions

github-actions Bot commented May 22, 2025

Copy link
Copy Markdown

👍
No issues in PR Title / Commit Title

@github-actions

Copy link
Copy Markdown

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) ❌ failed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@c-po c-po left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, also the change in architecture mimucs Debians support for amd64, i386 and arm64 for the required open-vm-tools package

@c-po c-po added bp/sagitta Create automatic backport for sagitta LTS version bp/circinus Create automatic backport for circinus labels May 24, 2025

@dmbaturin dmbaturin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The syntax was is incorrect here indeed. I honestly have no idea what's the deal with ppp. I think we can just remove that part later.

@dmbaturin
dmbaturin merged commit 1dc6a82 into vyos:current May 26, 2025
@github-actions github-actions Bot added the mirror-initiated This PR initiated for mirror sync workflow label May 26, 2025
@vyosbot vyosbot added mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels May 26, 2025
yunzheng added a commit to yunzheng/vyos-arm64-iso that referenced this pull request May 30, 2025
@yunzheng

yunzheng commented May 30, 2025

Copy link
Copy Markdown
Contributor Author

The syntax was is incorrect here indeed. I honestly have no idea what's the deal with ppp. I think we can just remove that part later.

Hi dmbaturin, it seems there can be only one -x defined, so -x /ppp/ overrides the first -x /vmware-tools/scripts/ :(

This PR didn't actually fix the issue so to say, can we amend this PR by removing -x /ppp/? Or should I create a new PR to just remove that?

With the -x /ppp/ removed I can confirm the __pycache__ is not there in the package:

$ dpkg -c vyos-1x-vmware_1.5dev0-3109-g08dc2e56b+dirty_all.deb
drwxr-xr-x root/root         0 2023-09-10 13:42 ./
drwxr-xr-x root/root         0 2023-09-10 13:42 ./etc/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./etc/vmware-tools/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./etc/vmware-tools/scripts/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./etc/vmware-tools/scripts/resume-vm-default.d/
-rwxr-xr-x root/root      2079 2023-09-10 13:42 ./etc/vmware-tools/scripts/resume-vm-default.d/ether-resume.py
-rw-r--r-- root/root        33 2023-09-10 13:42 ./etc/vmware-tools/tools.conf
drwxr-xr-x root/root         0 2023-09-10 13:42 ./usr/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./usr/share/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./usr/share/doc/
drwxr-xr-x root/root         0 2023-09-10 13:42 ./usr/share/doc/vyos-1x-vmware/
-rw-r--r-- root/root       322 2023-09-10 13:42 ./usr/share/doc/vyos-1x-vmware/changelog.gz
-rw-r--r-- root/root      1261 2023-09-10 13:42 ./usr/share/doc/vyos-1x-vmware/copyright

@andamasov andamasov removed bp/sagitta Create automatic backport for sagitta LTS version bp/circinus Create automatic backport for circinus labels May 9, 2026
@github-actions github-actions Bot added the rebase label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants