Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saper gnupg 2.4.0 update (reduces size some more) #1422

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Jun 26, 2023

Extends #1350 from @saper.

Adds 2 commits to disable things furthermore, reducing gnupg toolstack upgrade cost.

See last two commits.
@saper: reused your commits as-is. Let me know if you have a problem with it.
@JonathonHall-Purism those are combined under #1398.


Tested oem-factory-reset under #1398 for x230-maximized and x230-legacy without issue.

Note: gnupg 2.4.1 fixes a copy to card issue with yubikeys.

@tlaurion
Copy link
Collaborator Author

Testing request under #1398.

@tlaurion tlaurion force-pushed the saper_gnupg-2.4.0-update_reduce_size_some_more branch from a5e62ef to 58d5a29 Compare June 27, 2023 15:41
@tlaurion
Copy link
Collaborator Author

tlaurion commented Jun 27, 2023

Ok time for comparisons!!!!

Master last commit includes sizes.txt report. We will use t520-hotp-maximized sizes output step to compare cost of PR addition here. The raw output is available here. which we will use with diff to see what changed.

user@heads-tests-deb12:~/heads$ wget "https://circleci.com/api/v1.1/project/gh/osresearch/heads/10347/output/105/0?file=true&allocation-id=649b06dff63182304a39a9bb-0-build%2F9ED89B0" -O master -q
user@heads-tests-deb12:~/heads$ wget "https://circleci.com/api/v1.1/project/github/tlaurion/heads/25431/output/105/0?file=true&allocation-id=649b0f38e3b5000512608fc7-0-build%2F7E8B8B59" -O 1422 -q
user@heads-tests-deb12:~/heads$ diff -u master 1422
--- master	2023-06-27 12:55:46.987000000 -0400
+++ 1422	2023-06-27 12:55:49.483000000 -0400
@@ -1,4 +1,4 @@
-2023-06-27 11:59:09-04:00 91f65bed793c0165203b1cbb9ac4f390f15ffa0e clean
+2023-06-27 12:37:10-04:00 58d5a295a1a080518ef752a2a94b576c20fc264b clean
  3039696:/root/project/build/x86/t520-hotp-maximized/bzImage
   684032:/root/project/build/x86/t520-hotp-maximized/modules.cpio
 -----
@@ -9,15 +9,15 @@
    10568:./lib/modules/xhci-pci.ko
   132360:./lib/modules/usb-storage.ko
 -----
-10793984:/root/project/build/x86/t520-hotp-maximized/tools.cpio
+10746880:/root/project/build/x86/t520-hotp-maximized/tools.cpio
 -----
   596544:./lib/libc.so
   491024:./lib/libcairo.so.2
   138520:./lib/libcryptsetup.so.4
    64448:./lib/libassuan.so.0
- 1054216:./lib/libgcrypt.so.20
-  109520:./lib/libgpg-error.so.0
-  199016:./lib/libksba.so.8
+  776328:./lib/libgcrypt.so.20
+  121704:./lib/libgpg-error.so.0
+  207216:./lib/libksba.so.8
   171032:./lib/libpng16.so.16
    84584:./lib/libusb-1.0.so.0
    18440:./lib/libusb-0.1.so.4
@@ -44,9 +44,9 @@
    50952:./bin/cryptsetup
    58200:./bin/cryptsetup-reencrypt
    28432:./bin/veritysetup
-  751456:./bin/gpg
-  314584:./bin/gpg-agent
-  346376:./bin/scdaemon
+  828136:./bin/gpg
+  343984:./bin/gpg-agent
+  450792:./bin/scdaemon
    44008:./bin/pinentry-tty
   121080:./bin/dmsetup
  1414928:./bin/lvm
@@ -98,7 +98,7 @@
     2511:./bin/media-scan
     2662:./bin/mount-usb
     1639:./bin/network-init-recovery
-   25179:./bin/oem-factory-reset
+   25034:./bin/oem-factory-reset
     2345:./bin/oem-system-info-xx30
      324:./bin/poweroff
      597:./bin/qubes-measure-luks
@@ -115,6 +115,7 @@
      380:./bin/wget-measure.sh
      639:./bin/xx30-flash.init
     3166:./etc/ash_functions
+      17:./etc/distro/gpg-agent.conf
     1725:./etc/distro/keys/archlinux.key
     1629:./etc/distro/keys/qubes-4.key
     3139:./etc/distro/keys/qubes-r4.1-weekly-builds-signing-key.asc
@@ -135,5 +136,5 @@
      924:./sbin/config-dhcp.sh
     1064:./sbin/insmod
 -----
- 3977216:build/x86/t520-hotp-maximized/initrd.cpio.xz
- 8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1577-g91f65be.rom
+ 4049920:build/x86/t520-hotp-maximized/initrd.cpio.xz
+ 8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1588-g58d5a29.rom

@tlaurion
Copy link
Collaborator Author

Some analysis on above data.

  • Interesting enough, size of stipped+cpio packed bins and libs (tools.cpio) have decreased here as opposed to gnupg toolstack on master:
-10793984:/root/project/build/x86/t520-hotp-maximized/tools.cpio
+10746880:/root/project/build/x86/t520-hotp-maximized/tools.cpio
  • But those are less compressible, resulting in higher size of initrd.cpio.xz:
- 3977216:build/x86/t520-hotp-maximized/initrd.cpio.xz
- 8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1577-g91f65be.rom
+ 4049920:build/x86/t520-hotp-maximized/initrd.cpio.xz
+ 8388608:/root/project/build/x86/t520-hotp-maximized/heads-t520-hotp-maximized-v0.2.0-1588-g58d5a29.rom

Consequently, the difference between those two initrd.cpio.xz directly results in lost space under CBFS free space under coreboot:
4049920-3977216=72704(compressed) bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants