From 485f519a518b065a6a511c6b89bb6a9f7f039e39 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 29 Nov 2013 19:54:23 -0800 Subject: [PATCH 1/3] fix(coreos-base/coreos-base): Remove nsswitch.conf Provided by glibc now that it is being installed properly. --- ...-0-r69.ebuild => coreos-base-0-r70.ebuild} | 0 .../coreos-base/coreos-base-0.ebuild | 3 --- .../coreos-base/files/nsswitch.conf | 24 ------------------- 3 files changed, 27 deletions(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/{coreos-base-0-r69.ebuild => coreos-base-0-r70.ebuild} (100%) delete mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/files/nsswitch.conf diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/coreos-base-0-r69.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/coreos-base-0-r70.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/coreos-base-0-r69.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/coreos-base-0-r70.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/coreos-base-0.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/coreos-base-0.ebuild index c8d3a6d94e..da6aa9933a 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/coreos-base-0.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/coreos-base-0.ebuild @@ -122,9 +122,6 @@ src_install() { # Insert empty fstab doins "${FILESDIR}"/fstab - # Insert glibc's nsswitch.conf since that is installed weirdly - doins "${FILESDIR}"/nsswitch.conf - # Insert a mini vimrc to avoid driving everyone insane insinto /etc/vim doins "${FILESDIR}"/vimrc diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/files/nsswitch.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/files/nsswitch.conf deleted file mode 100644 index 4259b8a468..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-base/files/nsswitch.conf +++ /dev/null @@ -1,24 +0,0 @@ -# /etc/nsswitch.conf: -# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/nsswitch.conf,v 1.1 2006/09/29 23:52:23 vapier Exp $ - -passwd: compat -shadow: compat -group: compat - -# passwd: db files nis -# shadow: db files nis -# group: db files nis - -hosts: files dns -networks: files dns - -services: db files -protocols: db files -rpc: db files -ethers: db files -netmasks: files -netgroup: files -bootparams: files - -automount: files -aliases: files From da1f605863ff8b2921e01bd80b069cbf8710fe3a Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 29 Nov 2013 21:11:52 -0800 Subject: [PATCH 2/3] fix(profiles): Move default INSTALL_MASK to profiles. The INSTALL_MASK is altered all over the place, clean it up by moving all of it to profiles. Add /usr/share/{i18n,locales} to exclude those installed by glibc since it doesn't have a nls use flag to disable them. --- .../coreos/config/make.conf.amd64-host | 10 ---------- .../coreos/config/make.conf.common-target | 17 ----------------- .../profiles/coreos/base/make.defaults | 13 +++++++++++++ .../coreos/targets/generic/make.defaults | 10 ++++++++++ 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/make.conf.amd64-host b/sdk_container/src/third_party/coreos-overlay/coreos/config/make.conf.amd64-host index 35d393e34b..bc461ccdd2 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos/config/make.conf.amd64-host +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/make.conf.amd64-host @@ -37,16 +37,6 @@ PORTAGE_BINHOST=" http://storage.core-os.net/coreos/sdk/${ARCH}/${COREOS_SDK_VERSION}/toolchain/ " -# Remove all .la files for non-plugin libraries. -# Remove Gentoo init files since we use upstart. -# Remove logrotate.d files since we don't use logrotate. -INSTALL_MASK=" - /usr/lib*/*.la - /etc/init.d /etc/conf.d - /etc/logrotate.d -" -PKG_INSTALL_MASK="${INSTALL_MASK}" - # This is used by profiles/base/profile.bashrc to figure out that we # are targeting the cros-sdk (in all its various modes). It should # be utilized nowhere else! diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/make.conf.common-target b/sdk_container/src/third_party/coreos-overlay/coreos/config/make.conf.common-target index f2c1de0d34..d1f36d9f64 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos/config/make.conf.common-target +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/make.conf.common-target @@ -60,20 +60,3 @@ ac_cv_func_wait3_rusage=yes # When building packages for the target, we need to search the target's # sysroot for additional m4 files. The autotools.eclass uses this. AT_SYS_M4DIR="\${SYSROOT}/usr/share/aclocal" - -# Native language support is handled inside Chrome itself. -LINGUAS="en" - -# Remove all .la files for non-plugin libraries. -# Remove Gentoo init files since we use upstart. -# Remove logrotate.d files since we don't use logrotate. -# Remove sandbox files since we don't use that in the sysroot. -# Remove bash-completion files as we don't install bash-completion. -INSTALL_MASK=" - /usr/lib*/*.la - /etc/init.d /etc/conf.d - /etc/logrotate.d - /etc/sandbox.d - /usr/share/bash-completion -" -PKG_INSTALL_MASK="${INSTALL_MASK}" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults index 7532a8418d..f320cecba3 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/make.defaults @@ -47,6 +47,19 @@ CONFIG_PROTECT=" /etc/make.conf " +# Remove libtool .la files for non-plugin libraries. +# Remove Gentoo init files since we use systemd. +# Remove logrotate.d files since we don't use logrotate. +INSTALL_MASK=" + /usr/lib*/*.la + /etc/init.d /etc/conf.d + /etc/logrotate.d +" + +# Keep the default languages small. +# (not many things respect this though) +LINGUAS="en" + # Use parallel bzip2 for binary packages PORTAGE_BZIP2_COMMAND="lbzip2" PORTAGE_BUNZIP2_COMMAND="lbunzip2" diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults index 2e714394f0..303236e1f0 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults @@ -8,3 +8,13 @@ USE="${USE} -fortran -abiword -perl -cups -poppler-data -nls" # Exclude documentation FEATURES="nodoc noinfo noman" + +# Remove sandbox files since we don't use that in the sysroot. +# Remove bash-completion files as we don't install bash-completion. +# Remove alternate locales, we only need the standard LANG=C +INSTALL_MASK="${INSTALL_MASK} + /etc/sandbox.d + /usr/share/bash-completion + /usr/share/i18n + /usr/share/locale +" From e0244428fbde79dcbb9b3b1bd59f441e37c7ddc9 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 29 Nov 2013 22:18:23 -0800 Subject: [PATCH 3/3] fix(profiles): Move INSTALL_MASK from common.sh to profiles. This one isn't used by default, only when building final images like so: export INSTALL_MASK=$(portageq-$BOARD envvar PROD_INSTALL_MASK) --- .../coreos/targets/generic/make.defaults | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults index 303236e1f0..ebc8533f3d 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/make.defaults @@ -18,3 +18,21 @@ INSTALL_MASK="${INSTALL_MASK} /usr/share/i18n /usr/share/locale " + +# Restrictive mask for production images. +# TODO(marineam): Perhaps later move this to a generic/production profile. +PROD_INSTALL_MASK="${INSTALL_MASK} + *.a *.la *.h *.hpp + /usr/lib/debug + /usr/lib*/pkgconfig + /usr/share/aclocal* + /usr/share/awk + /usr/share/doc + /usr/share/gdb + /usr/share/gettext + /usr/share/gobject-introspection-1.0 + /usr/share/gtk-doc + /usr/share/pkgconfig + /usr/share/readline + /usr/src +"