All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] recipes-core: move hwclock.sh to util-linux
@ 2018-01-12 13:06 Alex Stewart
  2018-01-13  3:45 ` Christopher Larson
  2018-01-13 11:48 ` Otavio Salvador
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Stewart @ 2018-01-12 13:06 UTC (permalink / raw)
  To: openembedded-core

* Move the hwclock.sh initscript from the busybox recipe to util-linux.
  This script is generally useful for distros that get their hwclock
  implementation from sources other than busybox and we follow debian's
  example by providing it in util-linux.

:busybox/*
* Remove the busybox-hwclock package, as it no longer has a purpose.
* If busybox is configured to include hwclock, the busybox package will
  RDEPEND on util-linux-hwclock-init.

:util-linux/*
* Provide the hwclock.sh script in util-linux-hwclock-init, which can be
  pulled by any packages that depend on its functionality.
* util-linux-hwclock RDEPENDS on util-linux-hwclock-init for its
  initscript.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Acked-by: Haris Okanovic <haris.okanovic@ni.com>
Acked-by: Adrian Ratiu <adrian.ratiu@ni.com>
Acked-by: Ken Sharp <ken.sharp@ni.com>
Natinst-ReviewBoard-ID: 214983, 215755
---
 meta/recipes-core/busybox/busybox.inc              | 16 +++--
 meta/recipes-core/busybox/busybox_1.27.2.bb        |  1 -
 meta/recipes-core/busybox/files/hwclock.sh         | 83 ----------------------
 meta/recipes-core/util-linux/util-linux.inc        | 14 +++-
 meta/recipes-core/util-linux/util-linux/hwclock.sh | 83 ++++++++++++++++++++++
 meta/recipes-core/util-linux/util-linux_2.31.bb    |  1 +
 6 files changed, 105 insertions(+), 93 deletions(-)
 delete mode 100644 meta/recipes-core/busybox/files/hwclock.sh
 create mode 100644 meta/recipes-core/util-linux/util-linux/hwclock.sh

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 4012f921c6..d9c3c2793b 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -20,19 +20,17 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"
 
 EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'"
 
-PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
+PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev"
 
 FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
 FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"
 FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*"
 FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
 FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
-FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh"
 
-INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock"
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev"
 
 INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
-INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh"
 INITSCRIPT_NAME_${PN}-mdev = "mdev"
 INITSCRIPT_PARAMS_${PN}-mdev = "start 04 S ."
 INITSCRIPT_NAME_${PN}-syslog = "syslog"
@@ -276,9 +274,6 @@ do_install () {
 	if grep "CONFIG_UDHCPD=y" ${B}/.config; then
 		install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
 	fi
-	if grep "CONFIG_HWCLOCK=y" ${B}/.config; then
-		install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
-	fi
 	if grep "CONFIG_UDHCPC=y" ${B}/.config; then
 		install -d ${D}${sysconfdir}/udhcpc.d
 		install -d ${D}${datadir}/udhcpc
@@ -377,6 +372,13 @@ python do_package_prepend () {
     else:
         set_alternative_vars("${sysconfdir}/busybox.links.nosuid", "${base_bindir}/busybox.nosuid")
         set_alternative_vars("${sysconfdir}/busybox.links.suid", "${base_bindir}/busybox.suid")
+
+    # If busybox is configured to provide a hwclock implementation, add a
+    # package dependency on util-linux-hwclock-init for the
+    # /etc/init.d/hwclock.sh initscript.
+    with open(d.getVar('B', expand=True) + '/.config', 'r') as fp_conf:
+        if 'CONFIG_HWCLOCK=y' in fp_conf.read():
+            d.appendVar('RDEPENDS_busybox', ' util-linux-hwclock-init ')
 }
 
 pkg_postinst_${PN} () {
diff --git a/meta/recipes-core/busybox/busybox_1.27.2.bb b/meta/recipes-core/busybox/busybox_1.27.2.bb
index 6c1f4888cf..af2abadc5e 100644
--- a/meta/recipes-core/busybox/busybox_1.27.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.27.2.bb
@@ -8,7 +8,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://busybox-udhcpd \
            file://default.script \
            file://simple.script \
-           file://hwclock.sh \
            file://mount.busybox \
            file://syslog \
            file://syslog-startup.conf \
diff --git a/meta/recipes-core/busybox/files/hwclock.sh b/meta/recipes-core/busybox/files/hwclock.sh
deleted file mode 100644
index be5f94d86c..0000000000
--- a/meta/recipes-core/busybox/files/hwclock.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          hwclock
-# Required-Start:    
-# Required-Stop:     $local_fs
-# Default-Start:     S
-# Default-Stop:      0 6
-# Short-Description: Set system clock
-# Description:       Set system clock to hardware clock, according to the UTC
-#                    setting in /etc/default/rcS (see also rcS(5)).
-### END INIT INFO
-#
-# WARNING:      If your hardware clock is not in UTC/GMT, this script
-#               must know the local time zone. This information is
-#               stored in /etc/localtime. This might be a problem if
-#               your /etc/localtime is a symlink to something in
-#               /usr/share/zoneinfo AND /usr isn't in the root
-#               partition! The workaround is to define TZ either
-#               in /etc/default/rcS, or in the proper place below.
-
-[ ! -x /sbin/hwclock ] && exit 0
-
-[ -f /etc/default/rcS ] && . /etc/default/rcS
-
-[ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
-case "$1" in
-        start)
-                if [ "$VERBOSE" != no ]
-                then
-                        echo "System time was `date`."
-                        echo "Setting the System Clock using the Hardware Clock as reference..."
-                fi
-
-		if [ "$HWCLOCKACCESS" != no ]
-		then
-			if [ -z "$TZ" ]
-			then
-	                   hwclock $tz --hctosys
-			else
-			   TZ="$TZ" hwclock $tz --hctosys
-			fi
-		fi
-
-                if [ "$VERBOSE" != no ]
-                then
-                        echo "System Clock set. System local time is now `date`."
-                fi
-                ;;
-        stop|restart|reload|force-reload)
-		#
-		# Updates the Hardware Clock with the System Clock time.
-		# This will *override* any changes made to the Hardware Clock.
-		#
-		# WARNING: If you disable this, any changes to the system
-		#          clock will not be carried across reboots.
-		#
-		if [ "$VERBOSE" != no ]
-		then
-			echo "Saving the System Clock time to the Hardware Clock..."
-		fi
-		if [ "$HWCLOCKACCESS" != no ]
-		then
-			hwclock $tz --systohc
-		fi
-		if [ "$VERBOSE" != no ]
-		then
-			echo "Hardware Clock updated to `date`."
-		fi
-                exit 0
-                ;;
-	show)
-		if [ "$HWCLOCKACCESS" != no ]
-		then
-			hwclock $tz --show
-		fi
-		;;
-        *)
-                echo "Usage: hwclock.sh {start|stop|show|reload|restart}" >&2
-		echo "       start sets kernel (system) clock from hardware (RTC) clock" >&2
-		echo "       stop and reload set hardware (RTC) clock from kernel (system) clock" >&2
-                exit 1
-                ;;
-esac
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 248e8bee95..7f86227811 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -19,13 +19,16 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
                     file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
 
 #gtk-doc is not enabled as it requires xmlto which requires util-linux
-inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest
+inherit autotools gettext pkgconfig systemd update-alternatives update-rc.d python3-dir bash-completion ptest
 DEPENDS = "zlib ncurses"
 DEPENDS_append_class-native = " lzo-native"
 DEPENDS_append_class-nativesdk = " lzo-native"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \
            "
+INITSCRIPT_PACKAGES = "${PN}-hwclock-init"
+
+INITSCRIPT_NAME_${PN}-hwclock-init = "hwclock.sh"
 
 PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \
              util-linux-swaponoff util-linux-losetup util-linux-umount \
@@ -35,7 +38,9 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
              util-linux-partx util-linux-hwclock util-linux-mountpoint \
              util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit \
-             util-linux-ionice util-linux-switch-root"
+             util-linux-ionice util-linux-switch-root \
+             util-linux-hwclock-init \
+"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
 PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser util-linux-su', '', d)}"
 
@@ -89,6 +94,7 @@ FILES_util-linux-uuidd = "${sbindir}/uuidd"
 FILES_util-linux-rfkill = "${base_bindir}/rfkill*"
 FILES_util-linux-partx = "${sbindir}/partx"
 FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
+FILES_util-linux-hwclock-init = "${sysconfdir}/init.d/hwclock.sh"
 FILES_util-linux-findfs = "${sbindir}/findfs"
 FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
 FILES_util-linux-runuser = "${sbindir}/runuser"
@@ -193,6 +199,9 @@ do_install () {
 		# and thus prevents the operation.
 		ln -s su ${D}${sysconfdir}/pam.d/su-l
 	fi
+
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
 }
 
 # nologin causes a conflict with shadow-native
@@ -300,6 +309,7 @@ python populate_packages_prepend() {
 }
 
 RDEPENDS_${PN}-bash-completion += "util-linux-lsblk"
+RDEPENDS_${PN}-hwclock += "util-linux-hwclock-init"
 RDEPENDS_${PN}-ptest = "bash grep coreutils which util-linux-blkid util-linux-fsck btrfs-tools"
 
 do_compile_ptest() {
diff --git a/meta/recipes-core/util-linux/util-linux/hwclock.sh b/meta/recipes-core/util-linux/util-linux/hwclock.sh
new file mode 100644
index 0000000000..be5f94d86c
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/hwclock.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          hwclock
+# Required-Start:    
+# Required-Stop:     $local_fs
+# Default-Start:     S
+# Default-Stop:      0 6
+# Short-Description: Set system clock
+# Description:       Set system clock to hardware clock, according to the UTC
+#                    setting in /etc/default/rcS (see also rcS(5)).
+### END INIT INFO
+#
+# WARNING:      If your hardware clock is not in UTC/GMT, this script
+#               must know the local time zone. This information is
+#               stored in /etc/localtime. This might be a problem if
+#               your /etc/localtime is a symlink to something in
+#               /usr/share/zoneinfo AND /usr isn't in the root
+#               partition! The workaround is to define TZ either
+#               in /etc/default/rcS, or in the proper place below.
+
+[ ! -x /sbin/hwclock ] && exit 0
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+[ "$UTC" = "yes" ] && tz="--utc" || tz="--localtime"
+case "$1" in
+        start)
+                if [ "$VERBOSE" != no ]
+                then
+                        echo "System time was `date`."
+                        echo "Setting the System Clock using the Hardware Clock as reference..."
+                fi
+
+		if [ "$HWCLOCKACCESS" != no ]
+		then
+			if [ -z "$TZ" ]
+			then
+	                   hwclock $tz --hctosys
+			else
+			   TZ="$TZ" hwclock $tz --hctosys
+			fi
+		fi
+
+                if [ "$VERBOSE" != no ]
+                then
+                        echo "System Clock set. System local time is now `date`."
+                fi
+                ;;
+        stop|restart|reload|force-reload)
+		#
+		# Updates the Hardware Clock with the System Clock time.
+		# This will *override* any changes made to the Hardware Clock.
+		#
+		# WARNING: If you disable this, any changes to the system
+		#          clock will not be carried across reboots.
+		#
+		if [ "$VERBOSE" != no ]
+		then
+			echo "Saving the System Clock time to the Hardware Clock..."
+		fi
+		if [ "$HWCLOCKACCESS" != no ]
+		then
+			hwclock $tz --systohc
+		fi
+		if [ "$VERBOSE" != no ]
+		then
+			echo "Hardware Clock updated to `date`."
+		fi
+                exit 0
+                ;;
+	show)
+		if [ "$HWCLOCKACCESS" != no ]
+		then
+			hwclock $tz --show
+		fi
+		;;
+        *)
+                echo "Usage: hwclock.sh {start|stop|show|reload|restart}" >&2
+		echo "       start sets kernel (system) clock from hardware (RTC) clock" >&2
+		echo "       stop and reload set hardware (RTC) clock from kernel (system) clock" >&2
+                exit 1
+                ;;
+esac
diff --git a/meta/recipes-core/util-linux/util-linux_2.31.bb b/meta/recipes-core/util-linux/util-linux_2.31.bb
index a83919b5ac..9d754de719 100644
--- a/meta/recipes-core/util-linux/util-linux_2.31.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.31.bb
@@ -7,6 +7,7 @@ OLDHOST = ""
 OLDHOST_class-native = "file://util-linux-native-qsort.patch"
 
 SRC_URI += "file://configure-sbindir.patch \
+            file://hwclock.sh \
             file://runuser.pamd \
             file://runuser-l.pamd \
             ${OLDHOST} \
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] recipes-core: move hwclock.sh to util-linux
  2018-01-12 13:06 [PATCH v2] recipes-core: move hwclock.sh to util-linux Alex Stewart
@ 2018-01-13  3:45 ` Christopher Larson
  2018-01-25 18:43   ` Khem Raj
  2018-01-13 11:48 ` Otavio Salvador
  1 sibling, 1 reply; 7+ messages in thread
From: Christopher Larson @ 2018-01-13  3:45 UTC (permalink / raw)
  To: Alex Stewart; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

On Fri, Jan 12, 2018 at 6:06 AM, Alex Stewart <alex.stewart@ni.com> wrote:

> * Move the hwclock.sh initscript from the busybox recipe to util-linux.
>   This script is generally useful for distros that get their hwclock
>   implementation from sources other than busybox and we follow debian's
>   example by providing it in util-linux.
>
> :busybox/*
> * Remove the busybox-hwclock package, as it no longer has a purpose.
> * If busybox is configured to include hwclock, the busybox package will
>   RDEPEND on util-linux-hwclock-init.
>
> :util-linux/*
> * Provide the hwclock.sh script in util-linux-hwclock-init, which can be
>   pulled by any packages that depend on its functionality.
> * util-linux-hwclock RDEPENDS on util-linux-hwclock-init for its
>   initscript.
>
> Signed-off-by: Alex Stewart <alex.stewart@ni.com>
> Acked-by: Haris Okanovic <haris.okanovic@ni.com>
> Acked-by: Adrian Ratiu <adrian.ratiu@ni.com>
> Acked-by: Ken Sharp <ken.sharp@ni.com>
> Natinst-ReviewBoard-ID: 214983, 215755
>

Just a note that this will slow down the build for targets that wouldn’t
otherwise build the util-linux recipe.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1965 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] recipes-core: move hwclock.sh to util-linux
  2018-01-12 13:06 [PATCH v2] recipes-core: move hwclock.sh to util-linux Alex Stewart
  2018-01-13  3:45 ` Christopher Larson
@ 2018-01-13 11:48 ` Otavio Salvador
  2018-01-15 15:59   ` Alex Stewart
  1 sibling, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2018-01-13 11:48 UTC (permalink / raw)
  To: Alex Stewart; +Cc: Patches and discussions about the oe-core layer

On Fri, Jan 12, 2018 at 11:06 AM, Alex Stewart <alex.stewart@ni.com> wrote:
> * Move the hwclock.sh initscript from the busybox recipe to util-linux.
>   This script is generally useful for distros that get their hwclock
>   implementation from sources other than busybox and we follow debian's
>   example by providing it in util-linux.
>
> :busybox/*
> * Remove the busybox-hwclock package, as it no longer has a purpose.
> * If busybox is configured to include hwclock, the busybox package will
>   RDEPEND on util-linux-hwclock-init.
>
> :util-linux/*
> * Provide the hwclock.sh script in util-linux-hwclock-init, which can be
>   pulled by any packages that depend on its functionality.
> * util-linux-hwclock RDEPENDS on util-linux-hwclock-init for its
>   initscript.
>
> Signed-off-by: Alex Stewart <alex.stewart@ni.com>
> Acked-by: Haris Okanovic <haris.okanovic@ni.com>
> Acked-by: Adrian Ratiu <adrian.ratiu@ni.com>
> Acked-by: Ken Sharp <ken.sharp@ni.com>
> Natinst-ReviewBoard-ID: 214983, 215755

As mentioned by Christopher, it will increase the build time for
everyone and there is real gain in this this change. If you want to
disable the busybox dependency then move hwclock.sh to a hwclock-init
package that has no standard dependencies and is allarch and make
busybox and util-linux to depends on it.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] recipes-core: move hwclock.sh to util-linux
  2018-01-13 11:48 ` Otavio Salvador
@ 2018-01-15 15:59   ` Alex Stewart
  2018-01-15 16:02     ` Otavio Salvador
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Stewart @ 2018-01-15 15:59 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On 01/13/2018 05:48 AM, Otavio Salvador wrote:

> On Fri, Jan 12, 2018 at 11:06 AM, Alex Stewart <alex.stewart@ni.com> wrote:
>> * Move the hwclock.sh initscript from the busybox recipe to util-linux.
>>    This script is generally useful for distros that get their hwclock
>>    implementation from sources other than busybox and we follow debian's
>>    example by providing it in util-linux.
>>
>> :busybox/*
>> * Remove the busybox-hwclock package, as it no longer has a purpose.
>> * If busybox is configured to include hwclock, the busybox package will
>>    RDEPEND on util-linux-hwclock-init.
>>
>> :util-linux/*
>> * Provide the hwclock.sh script in util-linux-hwclock-init, which can be
>>    pulled by any packages that depend on its functionality.
>> * util-linux-hwclock RDEPENDS on util-linux-hwclock-init for its
>>    initscript.
>>
>> Signed-off-by: Alex Stewart <alex.stewart@ni.com>
>> Acked-by: Haris Okanovic <haris.okanovic@ni.com>
>> Acked-by: Adrian Ratiu <adrian.ratiu@ni.com>
>> Acked-by: Ken Sharp <ken.sharp@ni.com>
>> Natinst-ReviewBoard-ID: 214983, 215755
> As mentioned by Christopher, it will increase the build time for
> everyone and there is real gain in this this change. If you want to
> disable the busybox dependency then move hwclock.sh to a hwclock-init
> package that has no standard dependencies and is allarch and make
> busybox and util-linux to depends on it.
>
Either solution works for my purposes, so I'm fine breaking hwclock.sh 
out as its own recipe. It seems degenerative to break such a small piece 
of common-code into its own recipe, but I suppose there isn't a better 
solution if util-linux isn't commonly built.

-- 
Alex Stewart
Software Engineer - LabVIEW Real-Time
National Instruments

alex.stewart@ni.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] recipes-core: move hwclock.sh to util-linux
  2018-01-15 15:59   ` Alex Stewart
@ 2018-01-15 16:02     ` Otavio Salvador
  0 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2018-01-15 16:02 UTC (permalink / raw)
  To: Alex Stewart; +Cc: Patches and discussions about the oe-core layer

On Mon, Jan 15, 2018 at 1:59 PM, Alex Stewart <alex.stewart@ni.com> wrote:
> On 01/13/2018 05:48 AM, Otavio Salvador wrote:
>
>> On Fri, Jan 12, 2018 at 11:06 AM, Alex Stewart <alex.stewart@ni.com>
>> wrote:
>> As mentioned by Christopher, it will increase the build time for
>> everyone and there is real gain in this this change. If you want to
>> disable the busybox dependency then move hwclock.sh to a hwclock-init
>> package that has no standard dependencies and is allarch and make
>> busybox and util-linux to depends on it.
>
> Either solution works for my purposes, so I'm fine breaking hwclock.sh out
> as its own recipe. It seems degenerative to break such a small piece of
> common-code into its own recipe, but I suppose there isn't a better solution
> if util-linux isn't commonly built.

Leaving it on busybox seems to be the commonly built package; moving
to a specific package works too.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] recipes-core: move hwclock.sh to util-linux
  2018-01-13  3:45 ` Christopher Larson
@ 2018-01-25 18:43   ` Khem Raj
  2018-01-26 20:08     ` Alex Stewart
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2018-01-25 18:43 UTC (permalink / raw)
  To: openembedded-core

On 1/12/18 7:45 PM, Christopher Larson wrote:
> On Fri, Jan 12, 2018 at 6:06 AM, Alex Stewart <alex.stewart@ni.com
> <mailto:alex.stewart@ni.com>> wrote:
> 
>     * Move the hwclock.sh initscript from the busybox recipe to util-linux.
>       This script is generally useful for distros that get their hwclock
>       implementation from sources other than busybox and we follow debian's
>       example by providing it in util-linux.
> 
>     :busybox/*
>     * Remove the busybox-hwclock package, as it no longer has a purpose.
>     * If busybox is configured to include hwclock, the busybox package will
>       RDEPEND on util-linux-hwclock-init.
> 
>     :util-linux/*
>     * Provide the hwclock.sh script in util-linux-hwclock-init, which can be
>       pulled by any packages that depend on its functionality.
>     * util-linux-hwclock RDEPENDS on util-linux-hwclock-init for its
>       initscript.
> 
>     Signed-off-by: Alex Stewart <alex.stewart@ni.com
>     <mailto:alex.stewart@ni.com>>
>     Acked-by: Haris Okanovic <haris.okanovic@ni.com
>     <mailto:haris.okanovic@ni.com>>
>     Acked-by: Adrian Ratiu <adrian.ratiu@ni.com
>     <mailto:adrian.ratiu@ni.com>>
>     Acked-by: Ken Sharp <ken.sharp@ni.com <mailto:ken.sharp@ni.com>>
>     Natinst-ReviewBoard-ID: 214983, 215755
> 
> 
> Just a note that this will slow down the build for targets that wouldn’t
> otherwise build the util-linux recipe.

there is initscripts recipes, perhaps thats a better place for this.

> -- 
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics
> 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] recipes-core: move hwclock.sh to util-linux
  2018-01-25 18:43   ` Khem Raj
@ 2018-01-26 20:08     ` Alex Stewart
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Stewart @ 2018-01-26 20:08 UTC (permalink / raw)
  To: openembedded-core

On 01/25/2018 12:43 PM, Khem Raj wrote:
> On 1/12/18 7:45 PM, Christopher Larson wrote:
>> On Fri, Jan 12, 2018 at 6:06 AM, Alex Stewart <alex.stewart@ni.com
>> <mailto:alex.stewart@ni.com>> wrote:
>>
>>      * Move the hwclock.sh initscript from the busybox recipe to util-linux.
>>        This script is generally useful for distros that get their hwclock
>>        implementation from sources other than busybox and we follow debian's
>>        example by providing it in util-linux.
>>
>>      :busybox/*
>>      * Remove the busybox-hwclock package, as it no longer has a purpose.
>>      * If busybox is configured to include hwclock, the busybox package will
>>        RDEPEND on util-linux-hwclock-init.
>>
>>      :util-linux/*
>>      * Provide the hwclock.sh script in util-linux-hwclock-init, which can be
>>        pulled by any packages that depend on its functionality.
>>      * util-linux-hwclock RDEPENDS on util-linux-hwclock-init for its
>>        initscript.
>>
>>      Signed-off-by: Alex Stewart <alex.stewart@ni.com
>>      <mailto:alex.stewart@ni.com>>
>>      Acked-by: Haris Okanovic <haris.okanovic@ni.com
>>      <mailto:haris.okanovic@ni.com>>
>>      Acked-by: Adrian Ratiu <adrian.ratiu@ni.com
>>      <mailto:adrian.ratiu@ni.com>>
>>      Acked-by: Ken Sharp <ken.sharp@ni.com <mailto:ken.sharp@ni.com>>
>>      Natinst-ReviewBoard-ID: 214983, 215755
>>
>>
>> Just a note that this will slow down the build for targets that wouldn’t
>> otherwise build the util-linux recipe.
> there is initscripts recipes, perhaps thats a better place for this.

I guess that depends on our rationale for what belongs in `initscripts`. 
Other distros seem to assert that `initscripts` is a minimum set of 
scripts to bring up a system (especially a sysvinit system) and they 
generally don't include the equivalent of our `hwclock.sh`. Including it 
in `initscripts` for us would mean that embedded devices without an RTC 
(but which use initscripts) and which otherwise have no use for hwclock 
implementations either get a broken script or end up building a package 
that they can't use.

That being said, this patch is actually deprecated in favor of

[OE-core][PATCH] recipes-core: breakout hwclock.sh from busybox (18-01-23)

which moves hwclock.sh into it's own hwclock-init recipe and package, 
that is DEPENDED by busybox (conditionally, if built with hwclock 
capability) and util-linux. So further discussion should be attached to 
that patch. Sorry for the confusion.

>> -- 
>> Christopher Larson
>> kergoth at gmail dot com
>> Founder - BitBake, OpenEmbedded, OpenZaurus
>> Senior Software Engineer, Mentor Graphics
>>

-- 
Alex Stewart
Software Engineer - LabVIEW Real-Time
National Instruments

alex.stewart@ni.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-26 20:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12 13:06 [PATCH v2] recipes-core: move hwclock.sh to util-linux Alex Stewart
2018-01-13  3:45 ` Christopher Larson
2018-01-25 18:43   ` Khem Raj
2018-01-26 20:08     ` Alex Stewart
2018-01-13 11:48 ` Otavio Salvador
2018-01-15 15:59   ` Alex Stewart
2018-01-15 16:02     ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.