summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-20 17:42:34 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2016-11-25 01:49:36 +0100
commitb0f23d1e562e753cb78a473fdade956a25cc337b (patch)
treefe4a5908d1e39e24ec6df66052e866ed72421a79 /package
parent49a817b44be5695a87f6b4c8eadef3bb0f9419f9 (diff)
finalize systemd as alternative init system
Most important is the fix in patch-src_journal_journald-server_c, which breaks startup of systemd-journald when code is compiled with -DNDEBUG. A lot of base-files reorganizing to only install required files on sysv systems.
Diffstat (limited to 'package')
-rw-r--r--package/Config.in.options4
-rw-r--r--package/audit/Makefile36
-rw-r--r--package/base-files/Makefile106
-rw-r--r--package/base-files/files/fstab (renamed from package/base-files/src/etc/fstab)1
-rw-r--r--package/base-files/files/init.d/cifs (renamed from package/base-files/src/etc/init.d/cifs)0
-rwxr-xr-xpackage/base-files/files/init.d/done (renamed from package/base-files/src/etc/init.d/done)0
-rwxr-xr-xpackage/base-files/files/init.d/fs (renamed from package/base-files/src/etc/init.d/fs)0
-rwxr-xr-xpackage/base-files/files/init.d/kmod (renamed from package/base-files/src/etc/init.d/kmod)0
-rw-r--r--package/base-files/files/init.d/nfs (renamed from package/base-files/src/etc/init.d/nfs)0
-rwxr-xr-xpackage/base-files/files/init.d/rcK (renamed from package/base-files/src/etc/init.d/rcK)0
-rwxr-xr-xpackage/base-files/files/init.d/rcS (renamed from package/base-files/src/etc/init.d/rcS)0
-rw-r--r--package/base-files/files/inittab.sysv14
-rw-r--r--package/base-files/files/inittab.sysvinit4
-rw-r--r--package/base-files/files/mdev.conf (renamed from package/base-files/src/etc/mdev.conf)0
-rwxr-xr-xpackage/base-files/files/mdev/fs (renamed from package/base-files/src/etc/mdev/fs)0
-rw-r--r--package/base-files/src/etc/inittab10
-rw-r--r--package/busybox/Makefile2
-rw-r--r--package/dbus/Makefile45
-rw-r--r--package/dbus/files/dbus.postinst10
-rw-r--r--package/dbus/patches/patch-configure_ac26
-rw-r--r--package/expat/Makefile1
-rw-r--r--package/libcap/Makefile7
-rw-r--r--package/libcap/patches/patch-Make_Rules11
-rw-r--r--package/strace/Makefile4
-rw-r--r--package/systemd/Makefile40
-rw-r--r--package/systemd/files/systemd.postinst27
-rw-r--r--package/systemd/files/wired.network5
-rw-r--r--package/systemd/patches/patch-Makefile_am30
-rw-r--r--package/systemd/patches/patch-configure_ac11
-rw-r--r--package/systemd/patches/patch-src_journal_journald-server_c11
-rw-r--r--package/systemd/patches/patch-units_console-getty_service_m4_in11
-rw-r--r--package/systemd/patches/patch-units_serial-getty@_service_m411
-rw-r--r--package/xz/patches/patch-src_liblzma_liblzma_pc_in15
33 files changed, 346 insertions, 96 deletions
diff --git a/package/Config.in.options b/package/Config.in.options
index a806da895..39e6a0b96 100644
--- a/package/Config.in.options
+++ b/package/Config.in.options
@@ -47,7 +47,7 @@ config ADK_LEAVE_ETC_ALONE
config ADK_INSTALL_PACKAGE_INIT_SCRIPTS
bool "ship custom init-scripts along with packages"
- default y
+ default y if !ADK_RUNTIME_INIT_SYSTEMD
depends on !ADK_LEAVE_ETC_ALONE
help
Turning this option to false will prevent the ADK from
@@ -59,7 +59,7 @@ config ADK_INSTALL_PACKAGE_INIT_SCRIPTS
config ADK_INSTALL_PACKAGE_NETWORK_SCRIPTS
bool "ship custom network-scripts along with packages"
- default y
+ default y if !ADK_RUNTIME_INIT_SYSTEMD
depends on !ADK_LEAVE_ETC_ALONE
help
Turning this option to false will prevent the ADK from
diff --git a/package/audit/Makefile b/package/audit/Makefile
new file mode 100644
index 000000000..8f6eea1a0
--- /dev/null
+++ b/package/audit/Makefile
@@ -0,0 +1,36 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= audit
+PKG_VERSION:= 2.6.7
+PKG_RELEASE:= 1
+PKG_HASH:= 8923917332daa7833bbc0c1d9eb012167093fbad000da4a9630fb3356aff8cdc
+PKG_DESCR:= audit library
+PKG_SECTION:= libs/misc
+PKG_URL:= http://people.redhat.com/sgrubb/audit
+PKG_SITES:= http://people.redhat.com/sgrubb/audit/
+PKG_OPTS:= dev
+
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,AUDIT,audit,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
+
+ifeq ($(OS_FOR_BUILD),Darwin)
+HOST_CFLAGS+= -I$(STAGING_TARGET_DIR)/usr/include
+endif
+
+CONFIGURE_ARGS+= --without-python \
+ --without-python3 \
+ --without-libcap-ng \
+ --disable-zos-remote
+
+audit-install:
+ $(INSTALL_DIR) $(IDIR_AUDIT)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libaudit*.so* \
+ $(IDIR_AUDIT)/usr/lib
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 4a8b4c5f2..9c9ef9395 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -6,7 +6,7 @@ include $(ADK_TOPDIR)/mk/rootfs.mk
PKG_NAME:= base-files
PKG_VERSION:= 1.1
-PKG_RELEASE:= 22
+PKG_RELEASE:= 23
PKG_SECTION:= base/apps
PKG_DESCR:= basic files and scripts
@@ -23,48 +23,20 @@ INSTALL_STYLE:= manual
do-install:
$(CP) ./src/* $(IDIR_BASE_FILES)
-ifeq ($(ADK_RUNTIME_DEV_MDEV),y)
- $(CP) ./files/rcdev.mdev $(IDIR_BASE_FILES)/etc/init.d/rcdev
-else ifeq ($(ADK_RUNTIME_DEV_UDEV),y)
- $(CP) ./files/rcdev.udev $(IDIR_BASE_FILES)/etc/init.d/rcdev
-endif
-ifeq (${ADK_TARGET_PACKAGE_IPKG},y)
- $(CP) ./files/ipkg.conf $(IDIR_BASE_FILES)/etc/
- $(SED) 's,@ARCH@,$(ADK_TARGET_CPU_ARCH),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- $(SED) 's,@SYSTEM@,$(ADK_TARGET_SYSTEM),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- $(SED) 's,@LIBC@,$(ADK_TARGET_LIBC),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- $(SED) 's,@HOST@,$(ADK_HOST),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- $(SED) 's,@VENDOR@,$(ADK_VENDOR),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- mkdir -p $(IDIR_BASE_FILES)/usr/lib/ipkg/lists
-endif
-ifeq (${ADK_TARGET_PACKAGE_OPKG},y)
- $(CP) ./files/ipkg.conf $(IDIR_BASE_FILES)/etc/
- $(SED) 's,@ARCH@,$(ADK_TARGET_CPU_ARCH),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- $(SED) 's,@SYSTEM@,$(ADK_TARGET_SYSTEM),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- $(SED) 's,@LIBC@,$(ADK_TARGET_LIBC),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- $(SED) 's,@HOST@,$(ADK_HOST),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- $(SED) 's,@VENDOR@,$(ADK_VENDOR),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
- mkdir -p $(IDIR_BASE_FILES)/usr/lib/opkg/lists
-endif
- echo /bin/sh >${IDIR_BASE_FILES}/etc/shells
- echo /bin/mksh >>${IDIR_BASE_FILES}/etc/shells
-ifneq (${ADK_PACKAGE_ASH},)
- echo /bin/ash >>${IDIR_BASE_FILES}/etc/shells
-endif
-ifneq (${ADK_PACKAGE_HUSH},)
- echo /bin/hush >>${IDIR_BASE_FILES}/etc/shells
-endif
-ifneq (${ADK_PACKAGE_BASH},)
- echo /bin/bash >>${IDIR_BASE_FILES}/etc/shells
-endif
-ifneq (${ADK_PACKAGE_ZSH},)
- echo /bin/zsh >>${IDIR_BASE_FILES}/etc/shells
-endif
- mkdir -p $(IDIR_BASE_FILES)/etc/crontabs
- mkdir -p $(IDIR_BASE_FILES)/{dev,boot,root,sys,proc,tmp,mnt,media}
- mkdir -p $(IDIR_BASE_FILES)/etc/network/{if-pre-up.d,if-up.d,if-down.d,if-post-down.d}
- mkdir -p $(IDIR_BASE_FILES)/usr/{lib,bin}
+ mkdir -p $(IDIR_BASE_FILES)/{etc,dev,boot,root,sys,proc,tmp,run,mnt,media}
+ mkdir -p $(IDIR_BASE_FILES)/usr/{lib,bin,sbin}
+ mkdir -p $(IDIR_BASE_FILES)/var/{log,lib}
+ ln -sf ../run $(IDIR_BASE_FILES)/var/run
chmod 600 $(IDIR_BASE_FILES)/etc/shadow
+ chmod 1777 ${IDIR_BASE_FILES}/tmp
+ifeq ($(ADK_RUNTIME_INIT_SYSTEMD),)
+ mkdir -p $(IDIR_BASE_FILES)/etc/init.d
+ cp ./files/init.d/* $(IDIR_BASE_FILES)/etc/init.d
+ mkdir -p $(IDIR_BASE_FILES)/etc/network/{if-pre-up.d,if-up.d,if-down.d,if-post-down.d}
+ ln -sf ../tmp $(IDIR_BASE_FILES)/var/tmp
+ echo $(ADK_RUNTIME_TMPFS_SIZE) > $(IDIR_BASE_FILES)/etc/tmpfs
+ cp ./files/fstab $(IDIR_BASE_FILES)/etc
+ ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab
ifeq ($(ADK_TARGET_WITH_NETDEVICE),y)
cp ./files/interfaces-dhcp $(IDIR_BASE_FILES)/etc/network/interfaces
cp ./files/rc.netinfo $(IDIR_BASE_FILES)/etc/
@@ -78,12 +50,17 @@ ifeq (${ADK_TARGET_ROOTFS_NFSROOT},y)
else
(cd $(IDIR_BASE_FILES)/etc; ln -sf ../tmp/resolv.conf .)
endif
- chmod 1777 ${IDIR_BASE_FILES}/tmp
- ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab
- rm -rf $(IDIR_BASE_FILES)/var
- ln -sf tmp $(IDIR_BASE_FILES)/var
- ln -sf var/run $(IDIR_BASE_FILES)/run
+endif
+ifeq ($(ADK_RUNTIME_DEV_MDEV),y)
+ $(CP) ./files/rcdev.mdev $(IDIR_BASE_FILES)/etc/init.d/rcdev
+ $(CP) ./files/mdev.conf $(IDIR_BASE_FILES)/etc
+ $(CP) ./files/mdev $(IDIR_BASE_FILES)/etc
+endif
+ifeq ($(ADK_RUNTIME_DEV_UDEV),y)
+ $(CP) ./files/rcdev.udev $(IDIR_BASE_FILES)/etc/init.d/rcdev
+endif
ifeq ($(ADK_RUNTIME_INIT_SYSV),y)
+ cp ./files/inittab.sysv $(IDIR_BASE_FILES)/etc/inittab
test -z $(ADK_RUNTIME_SHELL) || \
cat ./files/inittab.shell >> $(IDIR_BASE_FILES)/etc/inittab
ifeq ($(ADK_TARGET_WITH_VGA),y)
@@ -98,7 +75,7 @@ endif
$(SED) 's#@SPEED@#$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)#' $(IDIR_BASE_FILES)/etc/inittab
endif
ifeq ($(ADK_RUNTIME_INIT_SYSVINIT),y)
- cp ./files/inittab.sysv $(IDIR_BASE_FILES)/etc/inittab
+ cp ./files/inittab.sysvinit $(IDIR_BASE_FILES)/etc/inittab
endif
test -z $(ADK_RUNTIME_HOSTNAME) || \
echo $(ADK_RUNTIME_HOSTNAME) > $(IDIR_BASE_FILES)/etc/hostname; \
@@ -113,7 +90,20 @@ endif
test -z '$(ADK_RUNTIME_PASSWORD)' || \
$(SED) 's,\*NP\*,'"$$(awk -F\= '/^ADK_RUNTIME_PASSWORD/ { print $$2 }' $(ADK_TOPDIR)/.config|sed -e 's^\"^^g'),g" \
$(IDIR_BASE_FILES)/etc/shadow
- echo $(ADK_RUNTIME_TMPFS_SIZE) > $(IDIR_BASE_FILES)/etc/tmpfs
+ echo /bin/sh >${IDIR_BASE_FILES}/etc/shells
+ echo /bin/mksh >>${IDIR_BASE_FILES}/etc/shells
+ifneq (${ADK_PACKAGE_ASH},)
+ echo /bin/ash >>${IDIR_BASE_FILES}/etc/shells
+endif
+ifneq (${ADK_PACKAGE_HUSH},)
+ echo /bin/hush >>${IDIR_BASE_FILES}/etc/shells
+endif
+ifneq (${ADK_PACKAGE_BASH},)
+ echo /bin/bash >>${IDIR_BASE_FILES}/etc/shells
+endif
+ifneq (${ADK_PACKAGE_ZSH},)
+ echo /bin/zsh >>${IDIR_BASE_FILES}/etc/shells
+endif
ifeq ($(ADK_PACKAGE_MKSH),y)
$(CP) ./files/profile $(IDIR_BASE_FILES)/etc/profile
ifeq ($(ADK_TARGET_WITH_ROOT_RW),y)
@@ -125,6 +115,24 @@ ifeq ($(ADK_TARGET_BOARD_BCM28XX),y)
echo 'export LD_LIBRARY_PATH=/opt/vc/lib' >> $(IDIR_BASE_FILES)/etc/profile
endif
endif
+ifeq (${ADK_TARGET_PACKAGE_IPKG},y)
+ $(CP) ./files/ipkg.conf $(IDIR_BASE_FILES)/etc/
+ $(SED) 's,@ARCH@,$(ADK_TARGET_CPU_ARCH),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ $(SED) 's,@SYSTEM@,$(ADK_TARGET_SYSTEM),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ $(SED) 's,@LIBC@,$(ADK_TARGET_LIBC),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ $(SED) 's,@HOST@,$(ADK_HOST),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ $(SED) 's,@VENDOR@,$(ADK_VENDOR),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ mkdir -p $(IDIR_BASE_FILES)/usr/lib/ipkg/lists
+endif
+ifeq (${ADK_TARGET_PACKAGE_OPKG},y)
+ $(CP) ./files/ipkg.conf $(IDIR_BASE_FILES)/etc/
+ $(SED) 's,@ARCH@,$(ADK_TARGET_CPU_ARCH),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ $(SED) 's,@SYSTEM@,$(ADK_TARGET_SYSTEM),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ $(SED) 's,@LIBC@,$(ADK_TARGET_LIBC),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ $(SED) 's,@HOST@,$(ADK_HOST),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ $(SED) 's,@VENDOR@,$(ADK_VENDOR),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
+ mkdir -p $(IDIR_BASE_FILES)/usr/lib/opkg/lists
+endif
# simple network configuration
ifneq (${ADK_SIMPLE_NETWORK_CONFIG},)
diff --git a/package/base-files/src/etc/fstab b/package/base-files/files/fstab
index 16fc0357b..06f19d9b6 100644
--- a/package/base-files/src/etc/fstab
+++ b/package/base-files/files/fstab
@@ -4,6 +4,7 @@ proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
+tmpfs /run tmpfs mode=777 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /media tmpfs defaults 0 0
# example for cifs
diff --git a/package/base-files/src/etc/init.d/cifs b/package/base-files/files/init.d/cifs
index b3ca9c649..b3ca9c649 100644
--- a/package/base-files/src/etc/init.d/cifs
+++ b/package/base-files/files/init.d/cifs
diff --git a/package/base-files/src/etc/init.d/done b/package/base-files/files/init.d/done
index 04950fdc2..04950fdc2 100755
--- a/package/base-files/src/etc/init.d/done
+++ b/package/base-files/files/init.d/done
diff --git a/package/base-files/src/etc/init.d/fs b/package/base-files/files/init.d/fs
index 55e2c3449..55e2c3449 100755
--- a/package/base-files/src/etc/init.d/fs
+++ b/package/base-files/files/init.d/fs
diff --git a/package/base-files/src/etc/init.d/kmod b/package/base-files/files/init.d/kmod
index 509496a9e..509496a9e 100755
--- a/package/base-files/src/etc/init.d/kmod
+++ b/package/base-files/files/init.d/kmod
diff --git a/package/base-files/src/etc/init.d/nfs b/package/base-files/files/init.d/nfs
index 4c3f9ba83..4c3f9ba83 100644
--- a/package/base-files/src/etc/init.d/nfs
+++ b/package/base-files/files/init.d/nfs
diff --git a/package/base-files/src/etc/init.d/rcK b/package/base-files/files/init.d/rcK
index 8bff46cc6..8bff46cc6 100755
--- a/package/base-files/src/etc/init.d/rcK
+++ b/package/base-files/files/init.d/rcK
diff --git a/package/base-files/src/etc/init.d/rcS b/package/base-files/files/init.d/rcS
index bc27ed29c..bc27ed29c 100755
--- a/package/base-files/src/etc/init.d/rcS
+++ b/package/base-files/files/init.d/rcS
diff --git a/package/base-files/files/inittab.sysv b/package/base-files/files/inittab.sysv
index edfe9dc94..f1fd8b126 100644
--- a/package/base-files/files/inittab.sysv
+++ b/package/base-files/files/inittab.sysv
@@ -1,4 +1,10 @@
-id:2:initdefault:
-si::sysinit:/etc/init.d/rcS
-1:234:respawn:/sbin/agetty 115200 tty1
-AMA0:3:respawn:/sbin/agetty -L 9600 ttyAMA0 vt320
+null::sysinit:/bin/mount -t proc proc /proc
+null::sysinit:/bin/mount -t sysfs sys /sys
+null::sysinit:/bin/mkdir -p /dev/pts
+null::sysinit:/bin/mkdir -p /dev/shm
+null::sysinit:/bin/mount -a -t devpts
+null::sysinit:/bin/mount -a -t tmpfs
+::sysinit:/etc/init.d/rcS
+::shutdown:/etc/init.d/rcK
+null::shutdown:/bin/umount -a
+null::shutdown:/sbin/swapoff -a
diff --git a/package/base-files/files/inittab.sysvinit b/package/base-files/files/inittab.sysvinit
new file mode 100644
index 000000000..edfe9dc94
--- /dev/null
+++ b/package/base-files/files/inittab.sysvinit
@@ -0,0 +1,4 @@
+id:2:initdefault:
+si::sysinit:/etc/init.d/rcS
+1:234:respawn:/sbin/agetty 115200 tty1
+AMA0:3:respawn:/sbin/agetty -L 9600 ttyAMA0 vt320
diff --git a/package/base-files/src/etc/mdev.conf b/package/base-files/files/mdev.conf
index 179222221..179222221 100644
--- a/package/base-files/src/etc/mdev.conf
+++ b/package/base-files/files/mdev.conf
diff --git a/package/base-files/src/etc/mdev/fs b/package/base-files/files/mdev/fs
index 86c4cee2f..86c4cee2f 100755
--- a/package/base-files/src/etc/mdev/fs
+++ b/package/base-files/files/mdev/fs
diff --git a/package/base-files/src/etc/inittab b/package/base-files/src/etc/inittab
deleted file mode 100644
index f1fd8b126..000000000
--- a/package/base-files/src/etc/inittab
+++ /dev/null
@@ -1,10 +0,0 @@
-null::sysinit:/bin/mount -t proc proc /proc
-null::sysinit:/bin/mount -t sysfs sys /sys
-null::sysinit:/bin/mkdir -p /dev/pts
-null::sysinit:/bin/mkdir -p /dev/shm
-null::sysinit:/bin/mount -a -t devpts
-null::sysinit:/bin/mount -a -t tmpfs
-::sysinit:/etc/init.d/rcS
-::shutdown:/etc/init.d/rcK
-null::shutdown:/bin/umount -a
-null::shutdown:/sbin/swapoff -a
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index 76e575848..1b74786d4 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -64,6 +64,7 @@ do-build:
do-install:
PATH='$(HOST_PATH)' $(MAKE) ${BB_MAKE_FLAGS} -C ${WRKBUILD} install $(MAKE_TRACE)
$(CP) $(WRKINST)/* $(IDIR_BUSYBOX)/
+ifeq ($(ADK_RUNTIME_INIT_SYSTEMD),)
ifeq ($(BUSYBOX_IFUPDOWN),y)
$(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/init.d
ifeq ($(ADK_RUNTIME_WAIT_FOR_ETHERNET),y)
@@ -72,6 +73,7 @@ else
$(INSTALL_BIN) ./files/network $(IDIR_BUSYBOX)/etc/init.d/network
endif
endif
+endif
ifeq ($(ADK_DEBUG),y)
${INSTALL_BIN} $(WRKBUILD)/busybox_unstripped \
$(IDIR_BUSYBOX)/bin/busybox
diff --git a/package/dbus/Makefile b/package/dbus/Makefile
index 7b17fff5a..d0c5a4ee9 100644
--- a/package/dbus/Makefile
+++ b/package/dbus/Makefile
@@ -4,9 +4,9 @@
include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= dbus
-PKG_VERSION:= 1.10.8
+PKG_VERSION:= 1.10.12
PKG_RELEASE:= 1
-PKG_HASH:= baf3d22baa26d3bdd9edc587736cd5562196ce67996d65b82103bedbe1f0c014
+PKG_HASH:= 210a79430b276eafc6406c71705e9140d25b9956d18068df98a70156dc0e475d
PKG_DESCR:= desktop bus daemon
PKG_SECTION:= sys/misc
PKG_DEPENDS:= libdbus libexpat
@@ -24,23 +24,38 @@ PKGSD_LIBDBUS:= DBUS library
PKGSC_LIBDBUS:= libs/misc
PKGSS_LIBDBUS:= libexpat libuuid
+PKG_FLAVOURS_DBUS:= WITH_SYSTEMD
+PKGFD_WITH_SYSTEMD:= enable systemd support
+PKGFB_WITH_SYSTEMD:= systemd
+
include ${ADK_TOPDIR}/mk/package.mk
$(eval $(call PKG_template,DBUS,dbus,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIBDBUS,libdbus,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBDBUS},${PKGSD_LIBDBUS},${PKGSC_LIBDBUS},${PKG_OPTS}))
TARGET_LDFLAGS+= -luuid
+
+AUTOTOOL_STYLE:= autoreconf
+ifeq ($(ADK_PACKAGE_DBUS_WITH_SYSTEMD),y)
+CONFIGURE_ARGS+= --enable-systemd --with-systemdsystemunitdir=/usr/lib/systemd/system
+TARGET_LDFLAGS+= -lsystemd
+else
+CONFIGURE_ARGS+= --disable-systemd
+endif
+
CONFIGURE_ARGS+= --disable-tests \
- --disable-abstract-sockets \
- --enable-checks \
+ --disable-asserts \
+ --enable-abstract-sockets \
+ --with-dbus-user=dbus \
+ --with-system-socket=/run/dbus/system_bus_socket \
+ --with-system-pid-file=/run/dbus/dbus.pid \
--disable-verbose-mode \
- --with-session-socket-dir=/var/tmp \
--disable-kqueue \
- --disable-systemd \
+ --disable-selinux \
+ --disable-libaudit \
+ --disable-doxygen-docs \
--disable-xml-docs \
- --without-x \
- --disable-doxygen-docs
-CONFIGURE_ENV+= ac_cv_have_abstract_sockets=no
+ --without-x
pre-install:
${INSTALL_DIR} $(STAGING_TARGET_DIR)/usr/include/dbus-1.0/dbus
@@ -54,15 +69,17 @@ libdbus-install:
dbus-install:
${INSTALL_DIR} ${IDIR_DBUS}/etc ${IDIR_DBUS}/usr/share \
${IDIR_DBUS}/usr/bin ${IDIR_DBUS}/usr/libexec
+ ${INSTALL_DIR} ${IDIR_DBUS}/var/lib/dbus ${IDIR_DBUS}/run/dbus
+ (cd ${IDIR_DBUS}/var/lib/dbus; ln -sf ../../../etc/machine-id .)
${INSTALL_BIN} ${WRKINST}/usr/libexec/dbus-daemon-launch-helper \
${IDIR_DBUS}/usr/libexec/
${CP} ${WRKINST}/etc/dbus-1 ${IDIR_DBUS}/etc
${CP} ${WRKINST}/usr/share/dbus-1 ${IDIR_DBUS}/usr/share
- ${INSTALL_BIN} ${WRKINST}/usr/bin/dbus-daemon ${IDIR_DBUS}/usr/bin
- ${INSTALL_BIN} ${WRKINST}/usr/bin/dbus-launch ${IDIR_DBUS}/usr/bin
- ${INSTALL_BIN} ${WRKINST}/usr/bin/dbus-uuidgen ${IDIR_DBUS}/usr/bin
- ${INSTALL_BIN} ${WRKINST}/usr/bin/dbus-send ${IDIR_DBUS}/usr/bin
- ${INSTALL_BIN} ${WRKINST}/usr/bin/dbus-monitor ${IDIR_DBUS}/usr/bin
+ ${CP} ${WRKINST}/usr/bin/dbus-* ${IDIR_DBUS}/usr/bin
+ifeq ($(ADK_PACKAGE_DBUS_WITH_SYSTEMD),y)
+ ${INSTALL_DIR} ${IDIR_DBUS}/usr/lib/systemd
+ ${CP} ${WRKINST}/usr/lib/systemd/* ${IDIR_DBUS}/usr/lib/systemd
+endif
# workaround for dev subpackage
${INSTALL_DIR} $(IDIR_DBUS_DEV)/usr/include/dbus-1.0/dbus
$(CP) $(WRKBUILD)/dbus/dbus-arch-deps.h \
diff --git a/package/dbus/files/dbus.postinst b/package/dbus/files/dbus.postinst
index e92450597..0f3f9c6ae 100644
--- a/package/dbus/files/dbus.postinst
+++ b/package/dbus/files/dbus.postinst
@@ -1,12 +1,10 @@
#!/bin/sh
. $IPKG_INSTROOT/etc/functions.sh
gid=$(get_next_gid)
-add_group messagebus $gid
-add_user messagebus $(get_next_uid) $gid /var/run/dbus
+add_group dbus $gid
+add_user dbus $(get_next_uid) $gid /var/run/dbus
add_rcconf dbus NO
-echo Generating UUID
if [ -z $IPKG_INSTROOT ];then
- mkdir /lib/dbus /var/lib
- ln -sf /lib/dbus /var/lib/dbus
- dbus-uuidgen --ensure
+ echo Generating UUID
+ dbus-uuidgen --ensure
fi
diff --git a/package/dbus/patches/patch-configure_ac b/package/dbus/patches/patch-configure_ac
new file mode 100644
index 000000000..cd50a7b14
--- /dev/null
+++ b/package/dbus/patches/patch-configure_ac
@@ -0,0 +1,26 @@
+--- dbus-1.10.8.orig/configure.ac 2016-03-07 17:06:22.000000000 +0100
++++ dbus-1.10.8/configure.ac 2016-11-21 11:25:39.000000000 +0100
+@@ -1186,23 +1186,9 @@ dnl systemd detection
+ if test x$enable_systemd = xno ; then
+ have_systemd=no;
+ else
+- PKG_CHECK_MODULES([SYSTEMD],
+- [libsystemd >= 209],
+- [have_systemd=yes],
+- [PKG_CHECK_MODULES([SYSTEMD],
+- [libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32],
+- [have_systemd=yes],
+- [have_systemd=no])])
+-fi
+-
+-if test x$have_systemd = xyes; then
+ AC_DEFINE(HAVE_SYSTEMD,1,[Have systemd])
+ fi
+
+-if test x$enable_systemd = xyes -a x$have_systemd != xyes ; then
+- AC_MSG_ERROR([Explicitly requested systemd support, but systemd not found])
+-fi
+-
+ # If not found in $PATH, we might still have systemd and systemctl at runtime
+ # (perhaps dbus is being compiled in a minimal chroot with no systemd).
+ # Assume the upstream-recommended location. Distributors with split /usr
diff --git a/package/expat/Makefile b/package/expat/Makefile
index e00f4559a..bafe5a47a 100644
--- a/package/expat/Makefile
+++ b/package/expat/Makefile
@@ -9,6 +9,7 @@ PKG_RELEASE:= 1
PKG_HASH:= d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff
PKG_DESCR:= xml parsing library
PKG_SECTION:= libs/data
+PKG_NEEDS:= c++
PKG_URL:= http://expat.sourceforge.net
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=expat/}
PKG_LIBNAME:= libexpat
diff --git a/package/libcap/Makefile b/package/libcap/Makefile
index 53587d7f1..294cd2bd8 100644
--- a/package/libcap/Makefile
+++ b/package/libcap/Makefile
@@ -19,10 +19,11 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call HOST_template,LIBCAP,libcap,$(PKG_VERSION)-$(PKG_RELEASE)))
$(eval $(call PKG_template,LIBCAP,libcap,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
-HOST_STYLE:= manual
+ifeq ($(OS_FOR_BUILD),Darwin)
+HOST_CFLAGS+= -I$(STAGING_TARGET_DIR)/usr/include
+endif
-# for Darwin hosts
-CPPFLAGS_FOR_BUILD+= -I$(STAGING_TARGET_DIR)/usr/include
+HOST_STYLE:= manual
CONFIG_STYLE:= manual
host-build:
diff --git a/package/libcap/patches/patch-Make_Rules b/package/libcap/patches/patch-Make_Rules
index 4c909e150..fa587e654 100644
--- a/package/libcap/patches/patch-Make_Rules
+++ b/package/libcap/patches/patch-Make_Rules
@@ -1,5 +1,5 @@
--- libcap-2.25.orig/Make.Rules 2016-01-31 02:14:53.000000000 +0100
-+++ libcap-2.25/Make.Rules 2016-09-26 20:46:02.214228217 +0200
++++ libcap-2.25/Make.Rules 2016-11-21 12:54:45.000000000 +0100
@@ -13,21 +13,14 @@ FAKEROOT=$(DESTDIR)
# administrative operations that could be needed to recover a system.
@@ -39,3 +39,12 @@
AR := ar
RANLIB := ranlib
DEBUG = -g #-DDEBUG
+@@ -68,7 +61,7 @@ INCS=$(topdir)/libcap/include/sys/capabi
+ LDFLAGS += -L$(topdir)/libcap
+ CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
+ PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
+-INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
++#INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
+ DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
+
+ # When installing setcap, set its inheritable bit to be able to place
diff --git a/package/strace/Makefile b/package/strace/Makefile
index eebf68bde..313a3b980 100644
--- a/package/strace/Makefile
+++ b/package/strace/Makefile
@@ -19,7 +19,11 @@ $(eval $(call PKG_template,STRACE,strace,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEP
# fails for x86_64
XAKE_FLAGS+= GCC_HONOUR_COPTS=s
+ifeq ($(OS_FOR_BUILD),Darwin)
+XAKE_FLAGS+= CPPFLAGS_FOR_BUILD="-I$(STAGING_TARGET_DIR)/usr/include -I$(LINUX_DIR)/include/uapi -I$(LINUX_DIR)/arch/$(ADK_TARGET_ARCH)/include/generated"
+else
XAKE_FLAGS+= CPPFLAGS_FOR_BUILD="-I$(LINUX_DIR)/include/uapi -I$(LINUX_DIR)/arch/$(ADK_TARGET_ARCH)/include/generated"
+endif
ifeq ($(ADK_TARGET_LIB_MUSL),y)
TARGET_CPPFLAGS+= -DMSG_EXCEPT=020000 -D_LARGEFILE64_SOURCE=1
diff --git a/package/systemd/Makefile b/package/systemd/Makefile
index 5bb456221..458ba5e88 100644
--- a/package/systemd/Makefile
+++ b/package/systemd/Makefile
@@ -9,11 +9,14 @@ PKG_RELEASE:= 1
PKG_HASH:= 1172c7c7d5d72fbded53186e7599d5272231f04cc8b72f9a0fb2c5c20dfc4880
PKG_DESCR:= system and service manager
PKG_SECTION:= base/apps
-PKG_DEPENDS:= libcap libmount
-PKG_BUILDDEP:= intltool-host gperf-host libcap util-linux gettext-host
+PKG_DEPENDS:= libcap libmount libuuid libblkid libncurses kmod
+PKG_BUILDDEP:= intltool-host gperf-host libcap util-linux gettext-host kmod
+PKG_KDEPENDS:= cgroups namespaces fhandle tmpfs-posix-acl tmpfs-xattr
PKG_URL:= https://wiki.freedesktop.org/www/Software/systemd/
PKG_SITES:= https://github.com/systemd/systemd/archive/
+PKG_CFLINE_SYSTEMD:= select BUSYBOX_SULOGIN
+
PKG_LIBC_DEPENDS:= glibc
DISTFILES:= v$(PKG_VERSION).tar.gz
@@ -22,13 +25,17 @@ include $(ADK_TOPDIR)/mk/package.mk
$(eval $(call PKG_template,SYSTEMD,systemd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+XAKE_FLAGS+= V=1
+
AUTOTOOL_STYLE:= autogen
+CONFIGURE_ENV+= ac_cv_path_SULOGIN=/sbin/sulogin \
+ ac_cv_path_MOUNT_PATH=/bin/mount
CONFIGURE_ARGS+= --disable-static \
--disable-manpages \
--disable-selinux \
+ --enable-split-usr \
--disable-pam \
--disable-ima \
- --disable-libcryptsetup \
--disable-efi \
--disable-gnuefi \
--disable-ldconfig \
@@ -37,12 +44,12 @@ CONFIGURE_ARGS+= --disable-static \
--with-default-dnssec=no \
--without-python \
--disable-acl \
- --disable-audit \
--disable-libidn \
+ --disable-libcryptsetup \
--disable-seccomp \
--disable-xkbcommon \
- --disable-kdbus \
--disable-localed \
+ --disable-coredump \
--disable-polkit \
--disable-bzip2 \
--disable-lz4 \
@@ -53,16 +60,33 @@ CONFIGURE_ARGS+= --disable-static \
--disable-microhttpd \
--disable-qrencode \
--disable-quotacheck \
+ --disable-utmp \
--disable-rfkill \
--disable-smack \
- --disable-hibernate
+ --disable-backlight \
+ --disable-binfmt \
+ --disable-vconsole \
+ --disable-hibernate \
+ --disable-audit \
+ --disable-hwdb \
+ --disable-machined \
+ --disable-importd \
+ --enable-randomseed \
+ --enable-timedated \
+ --enable-timesyncd \
+ --enable-sysusers \
+ --enable-tmpfiles \
+ --enable-firstboot
systemd-install:
$(INSTALL_DIR) $(IDIR_SYSTEMD)/etc
+ touch $(IDIR_SYSTEMD)/etc/machine-id
$(CP) $(WRKINST)/etc/* \
$(IDIR_SYSTEMD)/etc
$(INSTALL_DIR) $(IDIR_SYSTEMD)/usr/lib
- $(CP) $(WRKINST)/usr/lib/* \
+ $(CP) $(WRKINST)/usr/lib/*.so* \
+ $(IDIR_SYSTEMD)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/{systemd,sysusers.d,kernel,udev,sysctl.d,tmpfiles.d} \
$(IDIR_SYSTEMD)/usr/lib
$(INSTALL_DIR) $(IDIR_SYSTEMD)/usr/bin
$(CP) $(WRKINST)/usr/bin/* \
@@ -70,5 +94,7 @@ systemd-install:
$(INSTALL_DIR) $(IDIR_SYSTEMD)/usr/share
$(CP) $(WRKINST)/usr/share/* \
$(IDIR_SYSTEMD)/usr/share
+ $(CP) ./files/*.network \
+ $(IDIR_SYSTEMD)/etc/systemd/network
include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/systemd/files/systemd.postinst b/package/systemd/files/systemd.postinst
new file mode 100644
index 000000000..76e213117
--- /dev/null
+++ b/package/systemd/files/systemd.postinst
@@ -0,0 +1,27 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+gid=$(get_next_gid)
+add_group utmp $gid
+gid=$(get_next_gid)
+add_group systemd-journal $gid
+gid=$(get_next_gid)
+add_group systemd-bus-proxy $gid
+add_user systemd-bus-proxy $(get_next_uid) $gid /
+gid=$(get_next_gid)
+add_group systemd-journal-gateway $gid
+add_user systemd-journal-gateway $(get_next_uid) $gid /
+gid=$(get_next_gid)
+add_group systemd-journal-remote $gid
+add_user systemd-journal-remote $(get_next_uid) $gid /
+gid=$(get_next_gid)
+add_group systemd-journal-upload $gid
+add_user systemd-journal-upload $(get_next_uid) $gid /
+gid=$(get_next_gid)
+add_group systemd-network $gid
+add_user systemd-network $(get_next_uid) $gid /
+gid=$(get_next_gid)
+add_group systemd-resolve $gid
+add_user systemd-resolve $(get_next_uid) $gid /
+gid=$(get_next_gid)
+add_group systemd-timesync $gid
+add_user systemd-timesync $(get_next_uid) $gid /
diff --git a/package/systemd/files/wired.network b/package/systemd/files/wired.network
new file mode 100644
index 000000000..9613cc040
--- /dev/null
+++ b/package/systemd/files/wired.network
@@ -0,0 +1,5 @@
+[Match]
+Name=en*
+
+[Network]
+DHCP=ipv4
diff --git a/package/systemd/patches/patch-Makefile_am b/package/systemd/patches/patch-Makefile_am
new file mode 100644
index 000000000..a41947910
--- /dev/null
+++ b/package/systemd/patches/patch-Makefile_am
@@ -0,0 +1,30 @@
+--- systemd-231.orig/Makefile.am 2016-07-25 21:49:47.000000000 +0200
++++ systemd-231/Makefile.am 2016-11-24 02:37:14.165088827 +0100
+@@ -312,9 +312,9 @@ install-aliases-hook:
+ set -- $(SYSTEM_UNIT_ALIASES) && \
+ dir=$(systemunitdir) && $(install-aliases)
+ set -- $(USER_UNIT_ALIASES) && \
+- dir=$(userunitdir) && $(install-relative-aliases)
++ dir=$(userunitdir) && $(install-aliases)
+ set -- $(GENERAL_ALIASES) && \
+- dir= && $(install-relative-aliases)
++ dir= && $(install-aliases)
+
+ define install-aliases
+ while [ -n "$$1" ]; do \
+@@ -324,15 +324,6 @@ define install-aliases
+ shift 2 || exit $$?; \
+ done
+ endef
+-
+-define install-relative-aliases
+- while [ -n "$$1" ]; do \
+- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
+- rm -f $(DESTDIR)$$dir/$$2 && \
+- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
+- shift 2 || exit $$?; \
+- done
+-endef
+
+ install-touch-usr-hook:
+ touch -c $(DESTDIR)/$(prefix)
diff --git a/package/systemd/patches/patch-configure_ac b/package/systemd/patches/patch-configure_ac
new file mode 100644
index 000000000..8cfc64fa5
--- /dev/null
+++ b/package/systemd/patches/patch-configure_ac
@@ -0,0 +1,11 @@
+--- systemd-231.orig/configure.ac 2016-07-25 21:49:47.000000000 +0200
++++ systemd-231/configure.ac 2016-11-24 02:37:14.165088827 +0100
+@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr
+ AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
+
+-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
+-
+ M4_DEFINES=
+
+ AC_CHECK_TOOL(OBJCOPY, objcopy)
diff --git a/package/systemd/patches/patch-src_journal_journald-server_c b/package/systemd/patches/patch-src_journal_journald-server_c
new file mode 100644
index 000000000..704de9126
--- /dev/null
+++ b/package/systemd/patches/patch-src_journal_journald-server_c
@@ -0,0 +1,11 @@
+--- systemd-231.orig/src/journal/journald-server.c 2016-07-25 21:49:47.000000000 +0200
++++ systemd-231/src/journal/journald-server.c 2016-11-25 00:47:51.392883508 +0100
+@@ -1347,7 +1347,7 @@ static int setup_signals(Server *s) {
+
+ assert(s);
+
+- assert(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, -1) >= 0);
++ assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, -1) >= 0);
+
+ r = sd_event_add_signal(s->event, &s->sigusr1_event_source, SIGUSR1, dispatch_sigusr1, s);
+ if (r < 0)
diff --git a/package/systemd/patches/patch-units_console-getty_service_m4_in b/package/systemd/patches/patch-units_console-getty_service_m4_in
new file mode 100644
index 000000000..3ffd541c6
--- /dev/null
+++ b/package/systemd/patches/patch-units_console-getty_service_m4_in
@@ -0,0 +1,11 @@
+--- systemd-232.orig/units/console-getty.service.m4.in 2016-11-03 18:16:42.000000000 +0100
++++ systemd-232/units/console-getty.service.m4.in 2016-11-19 08:53:54.070304206 +0100
+@@ -16,7 +16,7 @@ After=rc-local.service
+ Before=getty.target
+
+ [Service]
+-ExecStart=-/sbin/agetty --noclear --keep-baud console 115200,38400,9600 $TERM
++ExecStart=-/sbin/getty -L %I 115200 vt100
+ Type=idle
+ Restart=always
+ RestartSec=0
diff --git a/package/systemd/patches/patch-units_serial-getty@_service_m4 b/package/systemd/patches/patch-units_serial-getty@_service_m4
new file mode 100644
index 000000000..3767b53c2
--- /dev/null
+++ b/package/systemd/patches/patch-units_serial-getty@_service_m4
@@ -0,0 +1,11 @@
+--- systemd-232.orig/units/serial-getty@.service.m4 2016-11-03 18:16:42.000000000 +0100
++++ systemd-232/units/serial-getty@.service.m4 2016-11-19 08:53:35.509582664 +0100
+@@ -22,7 +22,7 @@ Before=getty.target
+ IgnoreOnIsolate=yes
+
+ [Service]
+-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
++ExecStart=-/sbin/getty -L %I 115200 vt100
+ Type=idle
+ Restart=always
+ UtmpIdentifier=%I
diff --git a/package/xz/patches/patch-src_liblzma_liblzma_pc_in b/package/xz/patches/patch-src_liblzma_liblzma_pc_in
new file mode 100644
index 000000000..9481466af
--- /dev/null
+++ b/package/xz/patches/patch-src_liblzma_liblzma_pc_in
@@ -0,0 +1,15 @@
+--- xz-5.2.2.orig/src/liblzma/liblzma.pc.in 2015-09-29 12:57:36.000000000 +0200
++++ xz-5.2.2/src/liblzma/liblzma.pc.in 2016-11-23 16:04:15.407184892 +0100
+@@ -6,9 +6,9 @@
+ #
+
+ prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-libdir=@libdir@
+-includedir=@includedir@
++exec_prefix=${prefix}
++libdir=${prefix}/lib
++includedir=${prefix}/include
+
+ Name: liblzma
+ Description: General purpose data compression library