freedomofpress / ansible-role-grsecurity-install

Ansible role for installing grsecurity kernel Debian packages
1 stars 0 forks source link

Fix regex in build with LOCALVERSION #7

Closed msheiny closed 6 years ago

msheiny commented 6 years ago

In a build where LOCALVERSION environment variable was passed in, the current filter logic doesnt properly parse out the kernel version accordingly. Ive modified it a bit to look for everything in between the underscores and extract additional necessary version information. For example, take the following filename linux-image-4.4.115-grsec-digitalocean.201802041022_4.4.115-grsec-digitalocean.201802041022-1_amd64.deb .

The current logic would only extract 4.4.115-grsec where as in the actual grub config it shows up as 4.4.115-grsec-digitalocean.201802041022

I've confirmed the new regex logic works with the new and old logic. See: