Kernel flags for apparmor #275

Open
dashaub wants to merge 3 commits from dashaub/apparmor into master
dashaub commented 2021-01-08 04:25:51 +01:00 (Migrated from github.com)

#274

Kernel 5.10.4 builds fine, but installing the deb fails. Issue might be unrelated.

Setting up prawnos-linux-image-armhf (5.10.4-1-2) ...
/etc/prawnos/kernel/FlashKernelPartition.sh: line 39: syntax error near unexpect
ed token `;;'
/etc/prawnos/kernel/FlashKernelPartition.sh: line 39: `        echo "Unknown dev
ice! can't determine emmc devname. Please file an issue with the output of fdisk
 -l if you get this on a supported device"; exit 1;;'
dpkg: error processing package prawnos-linux-image-armhf (--configure):
 installed prawnos-linux-image-armhf package post-installation script subprocess
 returned error exit status 2
Errors were encountered while processing:
 prawnos-linux-image-armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)

Boot on /dev/mmcblk2 seems fine

Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
The primary GPT table is corrupt, but the backup appears OK, so that will be used.


Disk /dev/mmcblk2: 14.68 GiB, 15762194432 bytes, 30785536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 97D882F4-50AD-11EB-A78A-4723418FC9BD

Device         Start      End  Sectors  Size Type
/dev/mmcblk2p1 20480    86015    65536   32M ChromeOS kernel
/dev/mmcblk2p2 86016 30785501 30699486 14.6G Microsoft basic data


Disk /dev/mapper/luksroot: 14.62 GiB, 15701359616 bytes, 30666718 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

#274 Kernel 5.10.4 builds fine, but installing the deb fails. Issue might be unrelated. ``` Setting up prawnos-linux-image-armhf (5.10.4-1-2) ... /etc/prawnos/kernel/FlashKernelPartition.sh: line 39: syntax error near unexpect ed token `;;' /etc/prawnos/kernel/FlashKernelPartition.sh: line 39: ` echo "Unknown dev ice! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"; exit 1;;' dpkg: error processing package prawnos-linux-image-armhf (--configure): installed prawnos-linux-image-armhf package post-installation script subprocess returned error exit status 2 Errors were encountered while processing: prawnos-linux-image-armhf E: Sub-process /usr/bin/dpkg returned an error code (1) ``` Boot on `/dev/mmcblk2` seems fine ``` Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes The primary GPT table is corrupt, but the backup appears OK, so that will be used. Disk /dev/mmcblk2: 14.68 GiB, 15762194432 bytes, 30785536 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 97D882F4-50AD-11EB-A78A-4723418FC9BD Device Start End Sectors Size Type /dev/mmcblk2p1 20480 86015 65536 32M ChromeOS kernel /dev/mmcblk2p2 86016 30785501 30699486 14.6G Microsoft basic data Disk /dev/mapper/luksroot: 14.62 GiB, 15701359616 bytes, 30666718 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes ```
dashaub commented 2021-01-08 05:28:30 +01:00 (Migrated from github.com)

Shellcheck doesn't like this. Same occurrences in other script locations that I'm changing for now. DRY principle suggests these functions could be pulled out in a refactor.

$ shellcheck scripts/InstallScripts/InstallPackages.sh 

In scripts/InstallScripts/InstallPackages.sh line 36:
get_emmc_devname() {
                   ^-- SC1009: The mentioned syntax error was in this brace group.


In scripts/InstallScripts/InstallPackages.sh line 38:
    if [ -z "$devname" ]
    ^-- SC1046: Couldn't find 'fi' for this 'if'.
    ^-- SC1073: Couldn't parse this if expression. Fix to allow more checks.


In scripts/InstallScripts/InstallPackages.sh line 40:
        echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"; exit 1;;
                                                                                                                                                           ^-- SC1047: Expected 'fi' matching previously mentioned 'if'.
                                                                                                                                                             ^-- SC1072: Unexpected . Fix any mentioned problems and try again.

Shellcheck doesn't like this. Same occurrences in other script locations that I'm changing for now. DRY principle suggests these functions could be pulled out in a refactor. ``` $ shellcheck scripts/InstallScripts/InstallPackages.sh In scripts/InstallScripts/InstallPackages.sh line 36: get_emmc_devname() { ^-- SC1009: The mentioned syntax error was in this brace group. In scripts/InstallScripts/InstallPackages.sh line 38: if [ -z "$devname" ] ^-- SC1046: Couldn't find 'fi' for this 'if'. ^-- SC1073: Couldn't parse this if expression. Fix to allow more checks. In scripts/InstallScripts/InstallPackages.sh line 40: echo "Unknown device! can't determine emmc devname. Please file an issue with the output of fdisk -l if you get this on a supported device"; exit 1;; ^-- SC1047: Expected 'fi' matching previously mentioned 'if'. ^-- SC1072: Unexpected . Fix any mentioned problems and try again. ```
SolidEva commented 2022-07-26 06:23:14 +02:00 (Migrated from github.com)

@dashaub apologies for getting to this so late, could you clarify the use case for apparmor?

@dashaub apologies for getting to this so late, could you clarify the use case for apparmor?
This pull request has changes conflicting with the target branch.
  • kernel/resources/shared/FlashKernelPartition.sh
  • scripts/InstallScripts/InstallPackages.sh
  • scripts/InstallScripts/InstallPrawnOS.sh
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin dashaub/apparmor:dashaub/apparmor
git switch dashaub/apparmor

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff dashaub/apparmor
git switch dashaub/apparmor
git rebase master
git switch master
git merge --ff-only dashaub/apparmor
git switch dashaub/apparmor
git rebase master
git switch master
git merge --no-ff dashaub/apparmor
git switch master
git merge --squash dashaub/apparmor
git switch master
git merge --ff-only dashaub/apparmor
git switch master
git merge dashaub/apparmor
git push origin master
Sign in to join this conversation.
No description provided.