Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#65450 - [apparmor] make output garbage in apparmor.vim syntax file

Attached to Project: Arch Linux
Opened by Jill (KokaKiwi) - Tuesday, 11 February 2020, 02:03 GMT
Last edited by David Runge (dvzrv) - Thursday, 23 April 2020, 18:24 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No



Seems like the latest build of this package left some `make` output stuff in the apparmor.vim syntax file:

" normal capabilities - really keep this list? syn match sdCap should be enough... (difference: sdCapKey words would loose underlining)
syn keyword sdCapKey make[2]: entering directory '/build/apparmor/src/apparmor-2.13.3/utils/vim'
make[2]: warning: jobserver unavailable: using -j1. add '+' to parent make rule.
audit_control audit_read block_suspend chown dac_override dac_read_search fowner fsetid ipc_lock ipc_owner kill lease linux_immutable mknod net_admin net_bind_service net_broadcast net_raw setfcap setgid setpcap setuid syslog sys_boot sys_chroot sys_nice sys_pacct sys_ptrace sys_resource sys_time sys_tty_config wake_alarm
make[2]: leaving directory '/build/apparmor/src/apparmor-2.13.3/utils/vim'

Additional info:
* package version(s)
- apparmor-2.13.3-4

Steps to reproduce:
1. Open /etc/apparmor.d/nvidia_modprobe file with vim
2. Vim screaming at you because of invalid vim syntax file
This task depends upon

Closed by  David Runge (dvzrv)
Thursday, 23 April 2020, 18:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with apparmor 2.13.4-4
Comment by Eli Schwartz (eschwartz) - Tuesday, 11 February 2020, 02:10 GMT
That's the most amazing bug I've seen all month.
Comment by Eli Schwartz (eschwartz) - Tuesday, 11 February 2020, 02:19 GMT

So, it uses "make" to print out this Makefile rule:

And then they invoke it via python subprocess.Popen and *explicitly* concatenate the Popen resulting stdout and stderr (which again, is used to echo a Makefile variable defined by a very long $(shell cmd | cmd2 | cmd3) shell pipeline), and somehow they expect this to not go wrong?

I'm... I don't have words to describe this. It is just so broken. I'm not sure how we could fix this.
Comment by Eli Schwartz (eschwartz) - Tuesday, 11 February 2020, 02:31 GMT Comment by David Runge (dvzrv) - Tuesday, 11 February 2020, 10:20 GMT
Also, this has happened before:
However, it was not reproducible after a rebuild (which could have been due to all sorts of reasons).

I'm fairly certain, that the vim syntax file creation is flaky enough to depend on the machine the build is running on (or the state of the moon).
Comment by Eli Schwartz (eschwartz) - Sunday, 15 March 2020, 23:51 GMT
So a month later, they haven't even acknowledged the bug, but they have issued a new release. And as per part of the testsuite actually works anymore. Does apparmor itself even work? Why is apparmor just repeated boatloads of everything broken? Can we just remove this heap of pure trash from the repos?