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

Yet more debloating #197

Merged
merged 18 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions conf/distro/ovlinux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,35 @@ POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
PACKAGECONFIG:remove:pn-glibc = "nscd"
PACKAGECONFIG:remove:pn-systemd = "binfmt hibernate ima localed machined nss-mymachines quotacheck"
PACKAGECONFIG:remove:pn-connman = "wispr"
PACKAGECONFIG:remove:pn-curl = "libidn proxy verbose"
PACKAGECONFIG:remove:pn-libarchive = "libxml2 bz2 lzo"
PACKAGECONFIG:remove:pn-opkg-utils = "python"
PACKAGECONFIG:append:pn-curl = " ssl"
PACKAGECONFIG:remove:pn-curl = "gnutls libidn proxy verbose"
PACKAGECONFIG:append:pn-wpa-supplicant = " openssl"
PACKAGECONFIG:remove:pn-wpa-supplicant = "gnutls"
PACKAGECONFIG:remove:pn-bluez5 = "obex-profiles readline a2dp-profiles avrcp-profiles network-profiles hid-profiles hog-profiles deprecated"
PACKAGECONFIG:remove:pn-openssh = "rng-tools"
PACKAGECONFIG:remove:pn-gnutls = "libidn"
PACKAGECONFIG:remove:pn-glib-2.0 = "libmount"
SHAREDMIMEDEP:pn-glib-2.0 = ""

PACKAGECONFIG:remove:pn-libsndfile1 = "alsa"
DEPENDS:remove:pn-libsndfile1 = "flac libogg libvorbis"
EXTRA_OECONF:append:pn-libsndfile1 = "--disable-external-libs"

PACKAGECONFIG:append:pn-wget = " gnutls"
PACKAGECONFIG:remove:pn-wget = "openssl pcre"
PACKAGECONFIG:remove:pn-libxml2 = "python"
PACKAGECONFIG:remove:pn-libxml2-native = "python"

PACKAGECONFIG:remove:pn-alsa-plugins = "samplerate speexdsp"

PACKAGECONFIG:remove:pn-librsvg = "gdkpixbuf"
PACKAGECONFIG:remove:pn-librsvg-native = "gdkpixbuf"

DEPENDS:remove:pn-libpcre = "bzip2 zlib"

DEPENDS:remove:pn-gdk-pixbuf-native = "shared-mime-info-native"
EXTRA_OEMESON:append:pn-gdk-pixbuf-native = "-Dgio_sniffing=false"
RDEPENDS_gdk-pixbuf-native:remove:pn-gdk-pixbuf-native = "shared-mime-info-native"

# building nano without libmagic omits the large "magic.mgc" file
DEPENDS:remove:pn-nano = "file"

Expand All @@ -61,7 +74,7 @@ DISTRO_EXTRA_RRECOMMENDS += " ${POKY_DEFAULT_EXTRA_RRECOMMENDS}"

DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES:remove = "acl argp pcmcia usbgadget xattr nfs zeroconf pci 3g nfc x11 gobject-introspection-data"
DISTRO_FEATURES:remove = "acl argp pcmcia usbgadget xattr nfs zeroconf pci 3g nfc x11 gobject-introspection-data sysvinit"

VIRTUAL-RUNTIME_init_manager = "systemd"

Expand Down
2 changes: 2 additions & 0 deletions conf/machine/ov-cubieboard.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ MACHINEOVERRIDES .= ":use-mailine-graphics"
# inherit the meta-sunxi "cubieboard" machine
require conf/machine/cubieboard.conf
MACHINEOVERRIDES =. "cubieboard:"

MACHINE_FEATURES_remove = "apm"
2 changes: 2 additions & 0 deletions conf/machine/ov-cubieboard2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ MACHINEOVERRIDES .= ":use-mailine-graphics"
require conf/machine/cubieboard2.conf
MACHINEOVERRIDES =. "cubieboard2:"

MACHINE_FEATURES_remove = "apm"

IMAGE_CLASSES += "sdcard_image-openvario"
IMAGE_FSTYPES = "openvario-sdimg"

Expand Down
2 changes: 1 addition & 1 deletion recipes-apps/ovmenu-ng/ovmenu-ng_0.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SECTION = "base/app"
S = "${WORKDIR}"
PR = "r15"

inherit allarch
PACKAGE_ARCH = "${MACHINE_ARCH}"

RDEPENDS_${PN} = " \
bash \
Expand Down
15 changes: 15 additions & 0 deletions recipes-core/busybox/busybox_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI += " \
file://systemd.cfg \
file://networking.cfg \
file://no_swap.cfg \
file://openssl.cfg \
"

DEPENDS_append = " openssl"

# This works around "do_package" failure "Didn't find service unit
# 'busybox-syslog.service', specified in
# SYSTEMD_SERVICE_busybox-syslog."
SYSTEMD_PACKAGES_remove = "${PN}-syslog"
8 changes: 8 additions & 0 deletions recipes-core/busybox/files/networking.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Disable various networking features which are not useful for OpenVario

# CONFIG_IFUP is not set
# CONFIG_IFDOWN is not set
# CONFIG_TFTP is not set
# CONFIG_TRACEROUTE is not set
# CONFIG_UDHCPD is not set
# CONFIG_DUMPLEASES is not set
3 changes: 3 additions & 0 deletions recipes-core/busybox/files/no_swap.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CONFIG_MKSWAP is not set
# CONFIG_SWAPON is not set
# CONFIG_SWAPOFF is not set
4 changes: 4 additions & 0 deletions recipes-core/busybox/files/openssl.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Use OpenSSL instead of busybox's internal TLS implementation

# CONFIG_FEATURE_WGET_HTTPS is not set
CONFIG_FEATURE_WGET_OPENSSL=y
8 changes: 8 additions & 0 deletions recipes-core/busybox/files/systemd.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Disable various features we don't need because we have systemd.

# CONFIG_START_STOP_DAEMON is not set
# CONFIG_REBOOT is not set
# CONFIG_KLOGD is not set
# CONFIG_LOGGER is not set
# CONFIG_LOGREAD is not set
# CONFIG_SYSLOGD is not set
1 change: 0 additions & 1 deletion recipes-core/images/openvario-base-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ LOCALE_PACKAGES = " \
IMAGE_INSTALL = " \
packagegroup-base \
distro-feed-configs \
wget \
autofs-config \
nano \
openssh-sftp-server \
Expand Down
5 changes: 5 additions & 0 deletions recipes-debloat/bluez5/bluez5_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# eliminate the "python3-dbus" build-dependency
PACKAGES:remove = "${PN}-testtools"
do_install_append () {
rm -rf ${D}${libdir}/bluez
}
8 changes: 8 additions & 0 deletions recipes-debloat/glib-2.0/glib-2.0_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# eliminate the unnecessary "shared-mime-info" dependency
SHAREDMIMEDEP = ""

# eliminate the "python3" build-dependency
PACKAGES:remove = "${PN}-codegen"
do_install_append () {
rm -rf ${D}${datadir}/glib-2.0/codegen
}
5 changes: 5 additions & 0 deletions recipes-debloat/openssl/openssl_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# eliminate the "perl" build-dependency
PACKAGES:remove = "${PN}-misc"
do_install_append () {
rm -rf ${D}${libdir}/ssl-1.1/misc ${D}${bindir}/c_rehash
}
5 changes: 5 additions & 0 deletions recipes-debloat/usbutils/usbutils_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# eliminate the "python3" build-dependency
PACKAGES:remove = "${PN}-python"
do_install_append () {
rm -f ${D}${bindir}/lsusb.py
}