Page MenuHomeVyOS Platform

pmacct package contains unwanted data
Closed, ResolvedPublicBUG

Description

The package created from https://github.com/vyos/vyos-build/tree/ad214dba3ec08a2fa8c9fb37f22db367ff663e8a/packages/pmacct contains unwanted ./home folder, which seems to be a part of build container. It should be removed.

The problem breaks the ability to use the admin user name in VyOS.

Details

Difficulty level
Normal (likely a few hours)
Version
1.4, 1.5
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

What is the exact path within the chroot directory?

If its a matter of removing that from the created filesystem.squashfs then the excludes-file can be used:

https://github.com/vyos/vyos-build/blob/current/data/live-build-config/rootfs/excludes

Example (assuming its "/home/admin" thats incorrectly included and should be removed):

# T5663: Remove unwanted data from the pmacct package.
home/admin

Out of the blue it looks like some compile thats gone wrong?

Below from VyOS 1.5-rolling-202310170806:

vyos@vyos:~$ ls -latR /home/admin/
/home/admin/:
total 4
drwxr-xr-x 1 root root 4096 Oct 17 19:02 ..
drwxr-xr-x 3 root root   32 Oct 17 11:32 .
drwxr-xr-x 3 root root   48 Oct 17 11:32 workspace

/home/admin/workspace:
total 0
drwxr-xr-x 3 root root 48 Oct 17 11:32 .
drwxr-xr-x 3 root root 32 Oct 17 11:32 ..
drwxr-xr-x 3 root root 34 Oct 17 11:32 vyos-build-pmacct_current

/home/admin/workspace/vyos-build-pmacct_current:
total 0
drwxr-xr-x 3 root root 34 Oct 17 11:32 .
drwxr-xr-x 3 root root 48 Oct 17 11:32 ..
drwxr-xr-x 3 root root 31 Oct 17 11:32 build-amd64

/home/admin/workspace/vyos-build-pmacct_current/build-amd64:
total 0
drwxr-xr-x 3 root root 31 Oct 17 11:32 .
drwxr-xr-x 3 root root 34 Oct 17 11:32 ..
drwxr-xr-x 3 root root 29 Oct 17 11:32 packages

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages:
total 0
drwxr-xr-x 3 root root 29 Oct 17 11:32 .
drwxr-xr-x 3 root root 31 Oct 17 11:32 ..
drwxr-xr-x 3 root root 29 Oct 17 11:32 pmacct

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct:
total 0
drwxr-xr-x 3 root root 29 Oct 17 11:32 .
drwxr-xr-x 3 root root 29 Oct 17 11:32 ..
drwxr-xr-x 3 root root 26 Oct 17 11:32 pmacct

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct:
total 0
drwxr-xr-x 3 root root 26 Oct 17 11:32 .
drwxr-xr-x 3 root root 29 Oct 17 11:32 ..
drwxr-xr-x 3 root root 36 Oct 17 11:32 src

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src:
total 0
drwxr-xr-x 3 root root 36 Oct 17 11:32 .
drwxr-xr-x 3 root root 26 Oct 17 11:32 ..
drwxr-xr-x 3 root root 29 Oct 17 11:32 external_libs

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src/external_libs:
total 0
drwxr-xr-x 3 root root 29 Oct 17 11:32 .
drwxr-xr-x 3 root root 36 Oct 17 11:32 ..
drwxr-xr-x 5 root root 52 Oct 17 11:32 rootfs

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src/external_libs/rootfs:
total 0
drwxr-xr-x 5 root root 52 Oct 17 11:32 .
drwxr-xr-x 3 root root 29 Oct 17 11:32 ..
drwxr-xr-x 2 root root 32 Oct 17 11:32 bin
drwxr-xr-x 3 root root 43 Oct 17 11:32 include
drwxr-xr-x 2 root root 52 Oct 17 11:32 lib

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src/external_libs/rootfs/bin:
total 22
drwxr-xr-x 2 root root    32 Oct 17 11:32 .
drwxr-xr-x 5 root root    52 Oct 17 11:32 ..
-rwxr-xr-x 1 root root 21538 Oct 13  2022 cdada-gen

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src/external_libs/rootfs/include:
total 2
drwxr-xr-x 3 root root   43 Oct 17 11:32 .
drwxr-xr-x 5 root root   52 Oct 17 11:32 ..
drwxr-xr-x 2 root root  419 Oct 17 11:32 cdada
-rw-r--r-- 1 root root 1800 Oct 13  2022 cdada.h

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src/external_libs/rootfs/include/cdada:
total 142
drwxr-xr-x 2 root root   419 Oct 17 11:32 .
drwxr-xr-x 3 root root    43 Oct 17 11:32 ..
-rw-r--r-- 1 root root  4805 Oct 13  2022 bbitmap.h
-rw-r--r-- 1 root root  7545 Oct 13  2022 __common_internal.h
-rw-r--r-- 1 root root  9885 Oct 13  2022 list_custom_cc.h
-rw-r--r-- 1 root root 12045 Oct 13  2022 list.h
-rw-r--r-- 1 root root  7906 Oct 13  2022 __list_internal.h
-rw-r--r-- 1 root root  7362 Oct 13  2022 map_custom_cc.h
-rw-r--r-- 1 root root  9120 Oct 13  2022 map.h
-rw-r--r-- 1 root root  7113 Oct 13  2022 __map_internal.h
-rw-r--r-- 1 root root  6054 Oct 13  2022 queue_custom_cc.h
-rw-r--r-- 1 root root  7898 Oct 13  2022 queue.h
-rw-r--r-- 1 root root  5070 Oct 13  2022 __queue_internal.h
-rw-r--r-- 1 root root  7278 Oct 13  2022 set_custom_cc.h
-rw-r--r-- 1 root root  8375 Oct 13  2022 set.h
-rw-r--r-- 1 root root  6444 Oct 13  2022 __set_internal.h
-rw-r--r-- 1 root root  5614 Oct 13  2022 stack_custom_cc.h
-rw-r--r-- 1 root root  7421 Oct 13  2022 stack.h
-rw-r--r-- 1 root root  4590 Oct 13  2022 __stack_internal.h
-rw-r--r-- 1 root root 11912 Oct 13  2022 str.h
-rw-r--r-- 1 root root  2145 Oct 13  2022 utils.h
-rw-r--r-- 1 root root  2051 Oct 13  2022 version.h

/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src/external_libs/rootfs/lib:
total 777
drwxr-xr-x 2 root root     52 Oct 17 11:32 .
drwxr-xr-x 5 root root     52 Oct 17 11:32 ..
-rw-r--r-- 1 root root 793484 Oct 13  2022 libcdada.a
-rw-r--r-- 1 root root   1093 Oct 13  2022 libcdada.la

The binary doesnt seem to exist in /bin:

vyos@vyos:~$ sudo find / -iname "cdada-gen"
/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src/external_libs/rootfs/bin/cdada-gen
find: File system loop detected; ‘/sys/kernel/debug/pinctrl’ is part of the same file system loop as ‘/sys/kernel/debug’.
/usr/lib/live/mount/rootfs/1.5-rolling-202310170806.squashfs/home/admin/workspace/vyos-build-pmacct_current/build-amd64/packages/pmacct/pmacct/src/external_libs/rootfs/bin/cdada-gen

So Im thinking that just excluding "/home/admin" through excludes-file perhaps isnt the correct solution to this problem?

unity changed the task status from Open to In progress.Oct 27 2023, 11:47 AM
unity added a subscriber: unity.