CyberShadow / aconfmgr

A configuration manager for Arch Linux
1.14k stars 41 forks source link

[Bug]: Inconsistent ownership of /usr/lib/node_modules #139

Closed Kyuuhachi closed 2 years ago

Kyuuhachi commented 2 years ago

General description of the problem:

After adding vscode-langservers-extracted, aconfmgr started exhibiting strange behavior where every run toggles ownership of /usr/lib/node_modules between root and my user. This is possibly due to v-l-e being an AUR package, though other AUR packages don't have that behavior, so it's kinda weird.

Steps to reproduce the problem:

I don't know the full steps, but for me it started when I added

AddPackage --foreign vscode-langservers-extracted

Run aconfmgr apply several times to see the results.

Configuration:

AddPackage --foreign vscode-langservers-extracted

Expected result:

Ownership of /usr/lib/node_modules should be root:root.

Actual result:

Ownership of /usr/lib/node_modules toggles between root:root and me:me each time I run aconfmgr apply.

Log:

...
::: Searching for modified files...
...
:::: nodejs: /usr/lib/node_modules
:::: vscode-langservers-extracted: /usr/bin
...
:: Examining file properties...
::: Loading data...
:::: Done.
::: Comparing file properties...
:::: Done.
::: Done (2 only in system, 0 changed, 0 only in config).
...
:::: Found 0 new, 0 changed, and 2 extra files properties.
::::: Proceed? [Y/n/d] y
::::: Setting owner of /usr/lib/node_modules to root (default value)
::::: Setting group of /usr/lib/node_modules to root (default value)
::::: Done.:::: Done.
::: Done.
:: Done (system state changed).
::: Searching for modified files...
...
:::: vscode-langservers-extracted: /usr/bin
:::: vscode-langservers-extracted: /usr/lib/node_modules
...
:: Examining file properties...
::: Loading data...
:::: Done.
::: Comparing file properties...
:::: Done.
::: Done (2 only in system, 0 changed, 0 only in config).
:: Done.
...
:::: Found 0 new, 0 changed, and 2 extra files properties.
::::: Proceed? [Y/n/d] y
::::: Setting owner of /usr/lib/node_modules to me (default value)
::::: Setting group of /usr/lib/node_modules to me (default value)
::::: Done.
:::: Done.
::: Done.
:: Done (system state changed).

Additional context:

Using Yay for AUR, in case it matters.

CyberShadow commented 2 years ago

It's a bug in the package. /usr/lib/node_modules should be owned by root in the package file (.pkg.tar.zst).

Some discussion here: https://github.com/CyberShadow/aconfmgr/issues/115#issuecomment-945081813

CyberShadow commented 2 years ago

I see someone already reported the package bug: https://aur.archlinux.org/packages/vscode-langservers-extracted#comment-853074

Kyuuhachi commented 2 years ago

Oh, okay. Only noticed symptoms when using it with ACM, so I figured that's where the problem was.