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

Reduce size of pt-os-lite install #88

Merged
merged 3 commits into from
Nov 2, 2022
Merged

Reduce size of pt-os-lite install #88

merged 3 commits into from
Nov 2, 2022

Conversation

m-roberts
Copy link
Collaborator

@m-roberts m-roberts commented Oct 27, 2022

Status Ticket/Issue
Ready/Hold Ticket

Main changes

Screenshots (feature, test output, profiling, dev tools etc)

[insert screenshots here]

Other notes (e.g. implementation quirks, edge cases, questions / issues)

Manual testing tips

Tag anyone who definitely needs to review or help

@m-roberts
Copy link
Collaborator Author

m-roberts commented Oct 28, 2022

@jcapona , I think that the ideal situation would be where apt install pt-os-lite provides core pi-top functionality to Raspberry Pi Lite for quick-and-dirty embedded pi-top solutions.

Even with this PR as it is, it needs to be run with apt install pt-os-lite --no-install-recommends to get the size down to ~300MB unzipped.

This is mostly due to the 'recommends' of packages, that sometimes cause significant additional size. e.g. pt-web-vnc adds additional X11 packages when installing pt-miniscreen.

Perhaps in these instances we could create a -minimal subpackage (that the main package depends on) that can be required directly by pt-os-lite? e.g. pt-miniscreen depends on pt-miniscreen-minimal, and pt-device-support-lite depends on pt-miniscreen-minimal (instead of pt-miniscreen).

Naming convention could be different, I was thinking of Python with this.

Thoughts?

@m-roberts
Copy link
Collaborator Author

pi@pi-top:~ $ sudo apt install --no-install-recommends ./pt-os-lite_5.5.1-2~4.gbp40e38d_all.deb ./pt-device-support-lite_5.5.1-2~4.gbp40e38d_all.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'pt-os-lite' instead of './pt-os-lite_5.5.1-2~4.gbp40e38d_all.deb'
Note, selecting 'pt-device-support-lite' instead of './pt-device-support-lite_5.5.1-2~4.gbp40e38d_all.deb'
The following additional packages will be installed:
  adwaita-icon-theme arping dbus-user-session dconf-gsettings-backend dconf-service fontconfig fonts-lyx gdal-data glib-networking
  glib-networking-common glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme hostapd i2c-tools
  i2c-tools-extra isc-dhcp-server libaec0 libaom0 libarchive13 libarmadillo10 libarpack2 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data
  libatspi2.0-0 libavahi-client3 libavcodec58 libavformat58 libavutil56 libbluray2 libcairo-gobject2 libcairo2 libcfitsio9 libcharls2
  libchromaprint1 libcodec2-0.9 libcolord2 libcups2 libdap27 libdapclient6v5 libdatrie1 libdav1d4 libdc1394-25 libdconf1 libde265-0
  libepoxy0 libepsilon1 libfreexl1 libfyba0 libgdal28 libgdcm3.0 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-common libgeos-3.9.0
  libgeos-c1v5 libgeotiff5 libgif7 libgme0 libgphoto2-6 libgphoto2-port12 libgraphite2-3 libgsm1 libgtk-3-0 libgtk-3-common
  libharfbuzz0b libhdf4-0-alt libhdf5-103-1 libhdf5-hl-100 libheif1 libi2c0 libilmbase25 libirs-export161 libisccfg-export163
  libjs-jquery libjs-jquery-ui libjson-glib-1.0-0 libjson-glib-1.0-common libkmlbase1 libkmldom1 libkmlengine1 liblept5 libltdl7
  libmariadb3 libminizip1 libmp3lame0 libmpg123-0 libnet1 libnetcdf18 libnorm1 libodbc1 libogdi4.1 libopencv-calib3d4.5
  libopencv-contrib4.5 libopencv-core4.5 libopencv-dnn4.5 libopencv-features2d4.5 libopencv-flann4.5 libopencv-highgui4.5
  libopencv-imgcodecs4.5 libopencv-imgproc4.5 libopencv-ml4.5 libopencv-objdetect4.5 libopencv-photo4.5 libopencv-shape4.5
  libopencv-stitching4.5 libopencv-video4.5 libopencv-videoio4.5 libopenexr25 libopenjp2-7 libopenmpt0 libopus0 libpango-1.0-0
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpgm-5.3-0 libpixman-1-0 libpoppler102 libpq5 libproj19 libprotobuf23 libproxy1v5
  libqhull8.0 librabbitmq4 libraw1394-11 librest-0.7-0 librsvg2-2 librttopo1 libshine3 libsnappy1v5 libsocket++1 libsodium23
  libsoup-gnome2.4-1 libsoup2.4-1 libsoxr0 libspatialite7 libspeex1 libsrt1.4-gnutls libssh-gcrypt-4 libsuperlu5 libswresample3
  libswscale5 libsz2 libtbb2 libtesseract4 libthai-data libthai0 libtheora0 libtwolame0 libudfread0 liburiparser1 libva-drm2
  libva-x11-2 libva2 libvdpau1 libvorbisenc2 libvorbisfile3 libvpx6 libwavpack1 libwayland-client0 libwayland-cursor0 libwayland-egl1
  libx264-160 libx265-192 libxcb-render0 libxcb-shm0 libxcomposite1 libxcursor1 libxdamage1 libxerces-c3.2 libxfixes3 libxi6
  libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxvidcore4 libzmq5 libzvbi-common libzvbi0 mariadb-common mysql-common
  ocl-icd-libopencl1 odbcinst odbcinst1debian2 pi-topd proj-data pt-display-port pt-display-port-dhcp-cfg pt-miniscreen pt-os-net-mods
  pt-os-networking pt-os-sys-mods pt-os-version python-matplotlib-data python3-click python3-click-logging python3-colorama
  python3-cycler python3-dateutil python3-isc-dhcp-leases python3-kiwisolver python3-matplotlib python3-monotonic python3-netifaces
  python3-opencv python3-pitop-battery python3-pitop-common python3-pitop-core python3-pitop-system python3-psutil python3-pyee
  python3-pyparsing python3-smbus python3-systemd python3-zmq shared-mime-info ttf-bitstream-vera usb-eth-gadget wifi-ap-sta
Suggested packages:
  libi2c-dev python-smbus isc-dhcp-server-ldap lrzip libbluray-bdj colord cups-common geotiff-bin gdal-bin libgeotiff-epsg gphoto2
  gvfs libhdf4-doc libhdf4-alt-dev hdf4-tools libjs-jquery-ui-docs libmyodbc odbc-postgresql tdsodbc unixodbc-bin ogdi-bin opus-tools
  proj-bin libraw1394-doc librsvg2-bin speex opencl-icd pi-topd-extra python-cycler-doc dvipng ffmpeg ghostscript gir1.2-gtk-3.0
  inkscape ipython3 librsvg2-common python-matplotlib-doc python3-cairocffi python3-gi python3-gi-cairo python3-gobject python3-nose
  python3-pyqt5 python3-scipy python3-sip python3-tornado texlive-extra-utils texlive-latex-extra ttf-staypuft notify-send-ng
  python-psutil-doc python-pyparsing-doc
Recommended packages:
  librsvg2-common read-edid policycoreutils at-spi2-core libaacs0 proj-bin libgdk-pixbuf2.0-bin libgphoto2-l10n libgtk-3-bin
  javascript-common poppler-data va-driver-all | va-driver vdpau-driver-all | vdpau-driver autorandr further-link pt-web-vnc wmctrl
  x11-xserver-utils pt-os-onboarding neofetch python3-tk
The following NEW packages will be installed:
  adwaita-icon-theme arping dbus-user-session dconf-gsettings-backend dconf-service fontconfig fonts-lyx gdal-data glib-networking
  glib-networking-common glib-networking-services gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme hostapd i2c-tools
  i2c-tools-extra isc-dhcp-server libaec0 libaom0 libarchive13 libarmadillo10 libarpack2 libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data
  libatspi2.0-0 libavahi-client3 libavcodec58 libavformat58 libavutil56 libbluray2 libcairo-gobject2 libcairo2 libcfitsio9 libcharls2
  libchromaprint1 libcodec2-0.9 libcolord2 libcups2 libdap27 libdapclient6v5 libdatrie1 libdav1d4 libdc1394-25 libdconf1 libde265-0
  libepoxy0 libepsilon1 libfreexl1 libfyba0 libgdal28 libgdcm3.0 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-common libgeos-3.9.0
  libgeos-c1v5 libgeotiff5 libgif7 libgme0 libgphoto2-6 libgphoto2-port12 libgraphite2-3 libgsm1 libgtk-3-0 libgtk-3-common
  libharfbuzz0b libhdf4-0-alt libhdf5-103-1 libhdf5-hl-100 libheif1 libi2c0 libilmbase25 libirs-export161 libisccfg-export163
  libjs-jquery libjs-jquery-ui libjson-glib-1.0-0 libjson-glib-1.0-common libkmlbase1 libkmldom1 libkmlengine1 liblept5 libltdl7
  libmariadb3 libminizip1 libmp3lame0 libmpg123-0 libnet1 libnetcdf18 libnorm1 libodbc1 libogdi4.1 libopencv-calib3d4.5
  libopencv-contrib4.5 libopencv-core4.5 libopencv-dnn4.5 libopencv-features2d4.5 libopencv-flann4.5 libopencv-highgui4.5
  libopencv-imgcodecs4.5 libopencv-imgproc4.5 libopencv-ml4.5 libopencv-objdetect4.5 libopencv-photo4.5 libopencv-shape4.5
  libopencv-stitching4.5 libopencv-video4.5 libopencv-videoio4.5 libopenexr25 libopenjp2-7 libopenmpt0 libopus0 libpango-1.0-0
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpgm-5.3-0 libpixman-1-0 libpoppler102 libpq5 libproj19 libprotobuf23 libproxy1v5
  libqhull8.0 librabbitmq4 libraw1394-11 librest-0.7-0 librsvg2-2 librttopo1 libshine3 libsnappy1v5 libsocket++1 libsodium23
  libsoup-gnome2.4-1 libsoup2.4-1 libsoxr0 libspatialite7 libspeex1 libsrt1.4-gnutls libssh-gcrypt-4 libsuperlu5 libswresample3
  libswscale5 libsz2 libtbb2 libtesseract4 libthai-data libthai0 libtheora0 libtwolame0 libudfread0 liburiparser1 libva-drm2
  libva-x11-2 libva2 libvdpau1 libvorbisenc2 libvorbisfile3 libvpx6 libwavpack1 libwayland-client0 libwayland-cursor0 libwayland-egl1
  libx264-160 libx265-192 libxcb-render0 libxcb-shm0 libxcomposite1 libxcursor1 libxdamage1 libxerces-c3.2 libxfixes3 libxi6
  libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxvidcore4 libzmq5 libzvbi-common libzvbi0 mariadb-common mysql-common
  ocl-icd-libopencl1 odbcinst odbcinst1debian2 pi-topd proj-data pt-device-support-lite pt-display-port pt-display-port-dhcp-cfg
  pt-miniscreen pt-os-lite pt-os-net-mods pt-os-networking pt-os-sys-mods pt-os-version python-matplotlib-data python3-click
  python3-click-logging python3-colorama python3-cycler python3-dateutil python3-isc-dhcp-leases python3-kiwisolver python3-matplotlib
  python3-monotonic python3-netifaces python3-opencv python3-pitop-battery python3-pitop-common python3-pitop-core
  python3-pitop-system python3-psutil python3-pyee python3-pyparsing python3-smbus python3-systemd python3-zmq shared-mime-info
  ttf-bitstream-vera usb-eth-gadget wifi-ap-sta
0 upgraded, 223 newly installed, 0 to remove and 0 not upgraded.
Need to get 107 MB/107 MB of archives.
After this operation, 345 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

@m-roberts
Copy link
Collaborator Author

m-roberts commented Oct 29, 2022

pt-miniscreen currently needs the CLI to work, due to its systemd service script. However, this adds further install size due to this issue.

As mentioned in the ticket, if the CLI were modified to not have strict dependencies, this wouldn't be much of an issue. Another option would be for pt-miniscreen to drop its CLI dependency in favour of another way of determining if it should run that installs fewer packages.

Check out pt-miniscreen's full debtree for more info.

@m-roberts m-roberts marked this pull request as ready for review October 30, 2022 11:26
@m-roberts m-roberts changed the title Attempt to reduce the size of pt-os-lite install Reduce size of pt-os-lite install Oct 31, 2022
@jcapona jcapona merged commit 631bbd0 into master Nov 2, 2022
@jcapona jcapona deleted the pt-os-lite branch November 2, 2022 23:52
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.

Configure pt-os-lite to install minimum components
2 participants