SolidHal / PrawnOS

Libre Mainline Kernel and Debian for arm laptops
https://www.PrawnOS.com
GNU General Public License v2.0
114 stars 29 forks source link

Kernel flags for apparmor #275

Open dashaub opened 3 years ago

dashaub commented 3 years ago

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 3 years ago

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.
SolidHal commented 2 years ago

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