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

[BUG] salt-common deb package 3006.10 creates unexpected broken symlinks in filesystem root #67915

Open
tdobes opened this issue Mar 24, 2025 · 3 comments
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE

Comments

@tdobes
Copy link

tdobes commented Mar 24, 2025

Description
The 3006.10 deb package for salt-common creates two unexpected symlinks in the root of the filesystem:

# dpkg-query -W salt-common
salt-common     3006.10
# ls -l / | grep salt-common
lrwxrwxrwx    1 root root   13 Mar 19 04:33 manpage-has-errors-from-man -> /salt-common:
lrwxrwxrwx    1 root root   13 Mar 19 04:33 non-standard-dir-perm -> /salt-common:
# dpkg-query -L salt-common | grep 'manpage-has-errors-from-man\|non-standard-dir-perm'
/manpage-has-errors-from-man
/non-standard-dir-perm

It appears that these symlinks might have been included accidentally during the package creation process. These files do not exist in the previous 3006.9 version, nor do they exist in 3007.1.

Setup
Tested with Debian Bookworm and Ubuntu 22.04 LTS.

Steps to Reproduce the behavior

  • Add Broadcom Salt repo and keys.
  • apt-get install -y salt-common=3006.10
  • ls -l / | grep salt-common # to observe unexpected symlinks

Expected behavior
salt-common package should not include spurious symlinks in root of filesystem.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
# /opt/saltstack/salt/salt --versions-report
Salt Version:
          Salt: 3006.10
 
Python Version:
        Python: 3.10.16 (main, Mar  6 2025, 02:23:15) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
  cryptography: 42.0.5
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.6
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 23.2.0
        relenv: 0.18.1
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: ubuntu 22.04.4 jammy
        locale: utf-8
       machine: x86_64
       release: 5.15.0-102-generic
        system: Linux
       version: Ubuntu 22.04.4 jammy
@tdobes tdobes added Bug broken, incorrect, or confusing behavior needs-triage labels Mar 24, 2025
Copy link

welcome bot commented Mar 24, 2025

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@dmurphy18 dmurphy18 added Confirmed Salt engineer has confirmed bug/feature - often including a MCVE and removed needs-triage labels Mar 24, 2025
@dmurphy18
Copy link
Contributor

Can confirm this on a clean Ubuntu 22.04, see

root@tu2204:/home/david# apt install salt-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  ifupdown
The following NEW packages will be installed:
  salt-common
0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
Need to get 82.6 MB of archives.
After this operation, 207 MB of additional disk space will be used.
Get:1 https://packages.broadcom.com/artifactory/saltproject-deb stable/main amd64 salt-common amd64 3006.10 [82.6 MB]
Fetched 82.6 MB in 1min 43s (805 kB/s)                                                                                                                                                                                                        
Selecting previously unselected package salt-common.
(Reading database ... 204075 files and directories currently installed.)
Preparing to unpack .../salt-common_3006.10_amd64.deb ...
Adding group salt....done
Adding system user salt....done
Unpacking salt-common (3006.10) ...
Setting up salt-common (3006.10) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.9) ...
root@tu2204:/home/david# find / -name salt-common
find: ‘/run/user/1000/doc’: Permission denied
find: ‘/run/user/1000/gvfs’: Permission denied
/etc/logrotate.d/salt-common
/usr/share/doc/salt-common
/usr/share/bash-completion/completions/salt-common
root@tu2204:/home/david# ls -l/ grep salt-common
ls: invalid option -- '/'
Try 'ls --help' for more information.
root@tu2204:/home/david# ls -l / grep salt-common
ls: cannot access 'grep': No such file or directory
ls: cannot access 'salt-common': No such file or directory
/:
total 2097232
lrwxrwxrwx   1 root root          7 Aug 25  2024 bin -> usr/bin
drwxr-xr-x   4 root root       4096 Mar  5 08:45 boot
drwxrwxr-x   2 root root       4096 Aug 25  2024 cdrom
drwxr-xr-x  19 root root       4200 Mar 24 11:31 dev
drwxr-xr-x 131 root root      12288 Mar 24 11:37 etc
drwxr-xr-x   3 root root       4096 Aug 25  2024 home
lrwxrwxrwx   1 root root          7 Aug 25  2024 lib -> usr/lib
lrwxrwxrwx   1 root root          9 Aug 25  2024 lib32 -> usr/lib32
lrwxrwxrwx   1 root root          9 Aug 25  2024 lib64 -> usr/lib64
lrwxrwxrwx   1 root root         10 Aug 25  2024 libx32 -> usr/libx32
drwx------   2 root root      16384 Aug 25  2024 lost+found
lrwxrwxrwx   1 root root         13 Mar 18 22:33 manpage-has-errors-from-man -> /salt-common:
drwxr-xr-x   2 root root       4096 Apr 19  2022 media
drwxr-xr-x   2 root root       4096 Apr 19  2022 mnt
lrwxrwxrwx   1 root root         13 Mar 18 22:33 non-standard-dir-perm -> /salt-common:
drwxr-xr-x   3 root root       4096 Mar 24 11:36 opt
dr-xr-xr-x 263 root root          0 Mar 24 11:31 proc
drwx------   5 root root       4096 Mar 24 11:32 root
drwxr-xr-x  36 root root        960 Mar 24 11:36 run
lrwxrwxrwx   1 root root          8 Aug 25  2024 sbin -> usr/sbin
drwxr-xr-x  13 root root       4096 Mar  4 20:22 snap
drwxr-xr-x   2 root root       4096 Apr 19  2022 srv
-rw-------   1 root root 2147483648 Aug 25  2024 swapfile
dr-xr-xr-x  13 root root          0 Mar 24 11:31 sys
drwxrwxrwt  18 root root       4096 Mar 24 11:36 tmp
drwxr-xr-x  14 root root       4096 Apr 19  2022 usr 
drwxr-xr-x  14 root root       4096 Apr 19  2022 var
root@tu2204:/home/david# 

Same applies if install the salt-minion. Need to investigate where the manpage-has-errors-from-man and non-standard-dir-perm errors are being generated from but have suspicions about bash.completion scripts

@dmurphy18
Copy link
Contributor

Problem was introduced by PR #66852, and now I wonder what was I doing ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE
Projects
None yet
Development

No branches or pull requests

2 participants