mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-07 02:11:33 +01:00
systemd: sync with upstream, dropping python use flag
Upstream moved the python stuff to its own package which we don't need
anyway. Cleans up dependencies a bit but all the changes are in use
flags we don't enable so nothing impacts us. Our delta is now:
```patch
--- gentoo-x86/sys-apps/systemd/systemd-9999.ebuild 2015-07-11 12:19:02.628603502 -0700
+++ coreos-overlay/sys-apps/systemd/systemd-9999.ebuild 2015-07-11 12:33:19.136880252 -0700
@@ -7,16 +7,23 @@
AUTOTOOLS_AUTORECONF=yes
AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+CROS_WORKON_PROJECT="coreos/systemd"
+CROS_WORKON_REPO="git://github.com"
if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/systemd/systemd.git"
- inherit git-r3
+ # Use ~arch instead of empty keywords for compatibility with cros-workon
+ KEYWORDS="~amd64 ~arm64 ~arm ~x86"
else
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~ia64 ~x86"
+ CROS_WORKON_COMMIT="015325350548732458e61c193f5fab6f139f47fc"
+ KEYWORDS="amd64 arm64 ~arm ~x86"
fi
UNIFONT=unifont-8.0.01
-SRC_URI+=" terminal? ( http://unifoundry.com/pub/${UNIFONT}/font-builds/${UNIFONT}.hex.gz )"
+SRC_URI="terminal? ( http://unifoundry.com/pub/${UNIFONT}/font-builds/${UNIFONT}.hex.gz )"
+
+# cros-workon must be imported first, in cases where cros-workon and
+# another eclass exports the same function (say src_compile) we want
+# the later eclass's version to win. Only need src_unpack from workon.
+inherit cros-workon
inherit autotools-utils bash-completion-r1 linux-info multilib \
multilib-minimal pam python-any-r1 systemd toolchain-funcs udev \
@@ -31,6 +38,9 @@
idn importd +kdbus +kmod +lz4 lzma nat pam policykit
qrcode +seccomp selinux ssl sysv-utils terminal test vanilla xkb"
+# CoreOS specific use flags
+IUSE+=" man symlink-usr"
+
REQUIRED_USE="importd? ( curl gcrypt lzma )"
MINKV="3.8"
@@ -82,7 +92,6 @@
# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
PDEPEND=">=sys-apps/dbus-1.6.8-r1:0[systemd]
>=sys-apps/hwids-20130717-r1[udev]
- >=sys-fs/udev-init-scripts-25
policykit? ( sys-auth/polkit )
!vanilla? ( sys-apps/gentoo-systemd-integration )"
@@ -101,14 +110,13 @@
terminal? ( ${PYTHON_DEPS} )
test? ( >=sys-apps/dbus-1.6.8-r1:0 )"
-if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
- DEPEND+="
- app-text/docbook-xml-dtd:4.2
+# Not required when building from unpatched tarballs, but we build from git.
+DEPEND+="
+ man? ( app-text/docbook-xml-dtd:4.2
app-text/docbook-xml-dtd:4.5
app-text/docbook-xsl-stylesheets
- dev-libs/libxslt:0
- >=dev-libs/libgcrypt-1.4.5:0"
-fi
+ dev-libs/libxslt:0 )
+ >=dev-libs/libgcrypt-1.4.5:0"
pkg_pretend() {
local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
@@ -154,7 +162,7 @@
src_unpack() {
default
- [[ ${PV} != 9999 ]] || git-r3_src_unpack
+ cros-workon_src_unpack
}
src_prepare() {
@@ -179,9 +187,7 @@
multilib_src_configure() {
local myeconfargs=(
- # disable -flto since it is an optimization flag
- # and makes distcc less effective
- cc_cv_CFLAGS__flto=no
+ --with-pamconfdir=/usr/share/pam.d
# Workaround for gcc-4.7, bug 554454.
cc_cv_CFLAGS__Werror_shadow=no
@@ -228,6 +234,7 @@
$(multilib_native_use_enable kmod)
$(use_enable lz4)
$(use_enable lzma xz)
+ $(multilib_native_use_enable man manpages)
$(multilib_native_use_enable nat libiptc)
$(multilib_native_use_enable pam)
$(multilib_native_use_enable policykit polkit)
@@ -248,11 +255,19 @@
EFI_CC="$(tc-getCC)"
# dbus paths
- --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
+ --with-dbuspolicydir="${EPREFIX}/usr/share/dbus-1/system.d"
--with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
--with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
- --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
+ --with-ntp-servers="0.coreos.pool.ntp.org 1.coreos.pool.ntp.org 2.coreos.pool.ntp.org 3.coreos.pool.ntp.org"
+
+ # The CoreOS epoch, Mon Jul 1 00:00:00 UTC 2013. Used by timesyncd
+ # as a sanity check for the minimum acceptable time. Explicitly set
+ # to avoid using the current build time.
+ --with-time-epoch=1372636800
+
+ # no default name servers
+ --with-dns-servers=
)
if ! multilib_is_native_abi; then
@@ -324,38 +339,81 @@
}
multilib_src_install_all() {
+ local unitdir=$(systemd_get_unitdir)
+
prune_libtool_files --modules
einstalldocs
if use sysv-utils; then
+ local prefix
+ use symlink-usr && prefix=/usr
for app in halt poweroff reboot runlevel shutdown telinit; do
- dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app}
+ dosym "${ROOTPREFIX-/usr}/bin/systemctl" ${prefix}/sbin/${app}
done
- dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init
- else
+ dosym "${ROOTPREFIX-/usr}/lib/systemd/systemd" ${prefix}/sbin/init
+ elif use man; then
# we just keep sysvinit tools, so no need for the mans
rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
|| die
rm "${D}"/usr/share/man/man1/init.1 || die
fi
- # Disable storing coredumps in journald, bug #433457
- mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die
-
- # Preserve empty dirs in /etc & /var, bug #437008
- keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
- /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
- /var/log/journal/remote
-
- # Symlink /etc/sysctl.conf for easy migration.
- dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
-
- # If we install these symlinks, there is no way for the sysadmin to remove them
- # permanently.
- rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
- rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
- rm -r "${D}"/etc/systemd/system/network-online.target.wants || die
- rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die
+ # Ensure journal directory has correct ownership/mode in inital image.
+ # This is fixed by systemd-tmpfiles *but* journald starts before that
+ # and will create the journal if the filesystem is already read-write.
+ # Conveniently the systemd Makefile sets this up completely wrong.
+ dodir /var/log/journal
+ fowners root:systemd-journal /var/log/journal
+ fperms 2755 /var/log/journal
+
+ systemd_dotmpfilesd "${FILESDIR}"/systemd-coreos.conf
+ systemd_dotmpfilesd "${FILESDIR}"/systemd-resolv.conf
+
+ # Don't default to graphical.target
+ rm "${D}${unitdir}"/default.target || die
+ dosym multi-user.target "${unitdir}"/default.target
+
+ # Move a few services enabled in /etc to /usr, delete files individually
+ # so builds fail if systemd adds any new unexpected stuff to /etc
+ local f
+ for f in \
+ getty.target.wants/getty@tty1.service \
+ multi-user.target.wants/remote-fs.target \
+ multi-user.target.wants/systemd-networkd.service \
+ multi-user.target.wants/systemd-resolved.service \
+ network-online.target.wants/systemd-networkd-wait-online.service \
+ sockets.target.wants/systemd-networkd.socket \
+ sysinit.target.wants/systemd-timesyncd.service
+ do
+ local s="${f#*/}" t="${f%/*}"
+ local u="${s/@*.service/@.service}"
+
+ # systemd_enable_service doesn't understand template units
+ einfo "Enabling ${s} via ${t}"
+ dodir "${unitdir}/${t}"
+ dosym "../${u}" "${unitdir}/${t}/${s}"
+
+ rm "${D}/etc/systemd/system/${f}" || die
+ done
+ rmdir "${D}"/etc/systemd/system/*.wants || die
+
+ # Grant networkd access to set the transient host name
+ insinto /usr/share/polkit-1/rules.d
+ doins "${FILESDIR}"/99-org.freedesktop.hostname1.rules
+
+ # Do not enable random services if /etc was detected as empty!!!
+ rm "${D}"/usr/lib/systemd/system-preset/90-systemd.preset
+ insinto /usr/lib/systemd/system-preset
+ doins "${FILESDIR}"/99-default.preset
+
+ # Disable the "First Boot Wizard" by default, it isn't very applicable to CoreOS
+ rm "${D}${unitdir}"/sysinit.target.wants/systemd-firstboot.service
+
+ # Do not ship distro-specific files (nsswitch.conf pam.d)
+ rm -rf "${D}"/usr/share/factory
+ sed -i "${D}"/usr/lib/tmpfiles.d/etc.conf \
+ -e '/^C \/etc\/nsswitch\.conf/d' \
+ -e '/^C \/etc\/pam\.d/d'
}
migrate_locale() {
```
This commit is contained in:
parent
5278dc6ce2
commit
c9e61269d2
1
sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/Manifest
vendored
Normal file
1
sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/Manifest
vendored
Normal file
@ -0,0 +1 @@
|
||||
DIST unifont-8.0.01.hex.gz 938016 SHA256 f67cffeb5e8a0ce5ad2c19a6f289a4e7c8caa0b8c624368adaf8571994c3ec1c SHA512 23aa0228da186b2f6575c1f06101f58713dfb98193ad3772405668d4e3e18d4c1e0fea40639b237dd3a5f4dee6dea90aed85fea3c28165fdfeeace79a2059e6f WHIRLPOOL 23069b019ca1aa9e33df4ce7a728d399090670b85e37029d45f9a0125d13f965039c7e5b9cd6bc633ef259780286f0e6a596b410c1fc144f1f1205e69e36c5cb
|
||||
@ -1,6 +1,6 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.174 2015/06/27 18:00:47 floppym Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.179 2015/07/11 16:39:36 floppym Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
@ -17,6 +17,8 @@ else
|
||||
CROS_WORKON_COMMIT="015325350548732458e61c193f5fab6f139f47fc"
|
||||
KEYWORDS="amd64 arm64 ~arm ~x86"
|
||||
fi
|
||||
UNIFONT=unifont-8.0.01
|
||||
SRC_URI="terminal? ( http://unifoundry.com/pub/${UNIFONT}/font-builds/${UNIFONT}.hex.gz )"
|
||||
|
||||
# cros-workon must be imported first, in cases where cros-workon and
|
||||
# another eclass exports the same function (say src_compile) we want
|
||||
@ -24,7 +26,7 @@ fi
|
||||
inherit cros-workon
|
||||
|
||||
inherit autotools-utils bash-completion-r1 linux-info multilib \
|
||||
multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \
|
||||
multilib-minimal pam python-any-r1 systemd toolchain-funcs udev \
|
||||
user
|
||||
|
||||
DESCRIPTION="System and service manager for Linux"
|
||||
@ -33,14 +35,13 @@ HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
|
||||
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
||||
SLOT="0/2"
|
||||
IUSE="acl apparmor audit cryptsetup curl elfutils gcrypt gnuefi http
|
||||
idn importd +kdbus +kmod +lz4 lzma nat pam policykit python
|
||||
idn importd +kdbus +kmod +lz4 lzma nat pam policykit
|
||||
qrcode +seccomp selinux ssl sysv-utils terminal test vanilla xkb"
|
||||
|
||||
# CoreOS specific use flags
|
||||
IUSE+=" man symlink-usr"
|
||||
|
||||
REQUIRED_USE="importd? ( curl gcrypt lzma )
|
||||
python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
REQUIRED_USE="importd? ( curl gcrypt lzma )"
|
||||
|
||||
MINKV="3.8"
|
||||
|
||||
@ -68,7 +69,6 @@ COMMON_DEPEND=">=sys-apps/util-linux-2.26:0=
|
||||
lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
|
||||
nat? ( net-firewall/iptables:0= )
|
||||
pam? ( virtual/pam:= )
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
qrcode? ( media-gfx/qrencode:0= )
|
||||
seccomp? ( sys-libs/libseccomp:0= )
|
||||
selinux? ( sys-libs/libselinux:0= )
|
||||
@ -107,8 +107,7 @@ DEPEND="${COMMON_DEPEND}
|
||||
ia64? ( >=sys-kernel/linux-headers-3.9 )
|
||||
virtual/pkgconfig
|
||||
gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
|
||||
python? ( dev-python/lxml[${PYTHON_USEDEP}] )
|
||||
terminal? ( media-fonts/unifont[utils(+)] )
|
||||
terminal? ( ${PYTHON_DEPS} )
|
||||
test? ( >=sys-apps/dbus-1.6.8-r1:0 )"
|
||||
|
||||
# Not required when building from unpatched tarballs, but we build from git.
|
||||
@ -117,11 +116,8 @@ DEPEND+="
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxslt:0 )
|
||||
terminal? ( ${PYTHON_DEPS} )
|
||||
>=dev-libs/libgcrypt-1.4.5:0"
|
||||
|
||||
REQUIRED_USE+=" terminal? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
pkg_pretend() {
|
||||
local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
|
||||
~DEVPTS_MULTIPLE_INSTANCES ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE
|
||||
@ -164,6 +160,11 @@ pkg_setup() {
|
||||
:
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
cros-workon_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Bug 463376
|
||||
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
|
||||
@ -177,7 +178,7 @@ src_configure() {
|
||||
# Fix systems broken by bug #509454.
|
||||
[[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
|
||||
|
||||
if use python || use terminal; then
|
||||
if use terminal; then
|
||||
python_setup
|
||||
fi
|
||||
|
||||
@ -188,6 +189,9 @@ multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
--with-pamconfdir=/usr/share/pam.d
|
||||
|
||||
# Workaround for gcc-4.7, bug 554454.
|
||||
cc_cv_CFLAGS__Werror_shadow=no
|
||||
|
||||
# Workaround for bug 516346
|
||||
--enable-dependency-tracking
|
||||
|
||||
@ -207,6 +211,9 @@ multilib_src_configure() {
|
||||
# no deps
|
||||
--enable-efi
|
||||
--enable-ima
|
||||
# Moved to dev-python/python-systemd
|
||||
--disable-python-devel
|
||||
--without-python
|
||||
|
||||
# Optional components/dependencies
|
||||
$(multilib_native_use_enable acl)
|
||||
@ -231,12 +238,11 @@ multilib_src_configure() {
|
||||
$(multilib_native_use_enable nat libiptc)
|
||||
$(multilib_native_use_enable pam)
|
||||
$(multilib_native_use_enable policykit polkit)
|
||||
$(multilib_native_use_with python)
|
||||
$(multilib_native_use_enable python python-devel)
|
||||
$(multilib_native_use_enable qrcode qrencode)
|
||||
$(multilib_native_use_enable seccomp)
|
||||
$(multilib_native_use_enable selinux)
|
||||
$(multilib_native_use_enable terminal)
|
||||
$(multilib_native_use_with terminal unifont "${WORKDIR}/${UNIFONT}.hex")
|
||||
$(multilib_native_use_enable test tests)
|
||||
$(multilib_native_use_enable test dbus)
|
||||
$(multilib_native_use_enable xkb xkbcommon)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user