* [Buildroot] [PATCH] package/dt-utils: install barebox-state lock file
@ 2020-11-17 10:25 Bartosz Bilas
2020-12-05 14:46 ` Marcin Niestrój
0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Bilas @ 2020-11-17 10:25 UTC (permalink / raw)
To: buildroot
By default there is no /var/lock/barebox-state file what causes
the following error when we try to execute barebox-state command:
# barebox-state
Failed to open lock-file /var/lock/barebox-state
Fix it by adding an empty file in post install hook.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
---
package/dt-utils/dt-utils.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/dt-utils/dt-utils.mk b/package/dt-utils/dt-utils.mk
index 25c287d434..454b00e3d6 100644
--- a/package/dt-utils/dt-utils.mk
+++ b/package/dt-utils/dt-utils.mk
@@ -12,4 +12,11 @@ DT_UTILS_LICENSE_FILES = COPYING
DT_UTILS_DEPENDENCIES = udev
DT_UTILS_AUTORECONF = YES
+define DT_UTILS_INSTALL_LOCK_FILE
+ rm -f $(TARGET_DIR)/var/lock/barebox-state
+ mkdir -p $(TARGET_DIR)/var/lock
+ touch $(TARGET_DIR)/var/lock/barebox-state
+endef
+DT_UTILS_POST_INSTALL_TARGET_HOOKS += DT_UTILS_INSTALL_LOCK_FILE
+
$(eval $(autotools-package))
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/dt-utils: install barebox-state lock file
2020-11-17 10:25 [Buildroot] [PATCH] package/dt-utils: install barebox-state lock file Bartosz Bilas
@ 2020-12-05 14:46 ` Marcin Niestrój
2020-12-10 20:28 ` Bartosz Bilas
0 siblings, 1 reply; 3+ messages in thread
From: Marcin Niestrój @ 2020-12-05 14:46 UTC (permalink / raw)
To: buildroot
Hi Bartosz,
Bartosz Bilas <b.bilas@grinn-global.com> writes:
> By default there is no /var/lock/barebox-state file what causes
> the following error when we try to execute barebox-state command:
>
> # barebox-state
> Failed to open lock-file /var/lock/barebox-state
>
> Fix it by adding an empty file in post install hook.
>
> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
> ---
> package/dt-utils/dt-utils.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/package/dt-utils/dt-utils.mk b/package/dt-utils/dt-utils.mk
> index 25c287d434..454b00e3d6 100644
> --- a/package/dt-utils/dt-utils.mk
> +++ b/package/dt-utils/dt-utils.mk
> @@ -12,4 +12,11 @@ DT_UTILS_LICENSE_FILES = COPYING
> DT_UTILS_DEPENDENCIES = udev
> DT_UTILS_AUTORECONF = YES
>
> +define DT_UTILS_INSTALL_LOCK_FILE
> + rm -f $(TARGET_DIR)/var/lock/barebox-state
> + mkdir -p $(TARGET_DIR)/var/lock
> + touch $(TARGET_DIR)/var/lock/barebox-state
> +endef
> +DT_UTILS_POST_INSTALL_TARGET_HOOKS += DT_UTILS_INSTALL_LOCK_FILE
I'm afraid this won't help for minimal rootfs images, where /var/lock is
a symlink at /tmp. What is the type of rootfs skeleton that you tested
your changes with?
> +
> $(eval $(autotools-package))
--
Regards,
Marcin
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/dt-utils: install barebox-state lock file
2020-12-05 14:46 ` Marcin Niestrój
@ 2020-12-10 20:28 ` Bartosz Bilas
0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Bilas @ 2020-12-10 20:28 UTC (permalink / raw)
To: buildroot
Hello Marcin,
On 05.12.2020 15:46, Marcin Niestr?j wrote:
> Hi Bartosz,
>
> Bartosz Bilas <b.bilas@grinn-global.com> writes:
>
>> By default there is no /var/lock/barebox-state file what causes
>> the following error when we try to execute barebox-state command:
>>
>> # barebox-state
>> Failed to open lock-file /var/lock/barebox-state
>>
>> Fix it by adding an empty file in post install hook.
>>
>> Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
>> ---
>> package/dt-utils/dt-utils.mk | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/package/dt-utils/dt-utils.mk b/package/dt-utils/dt-utils.mk
>> index 25c287d434..454b00e3d6 100644
>> --- a/package/dt-utils/dt-utils.mk
>> +++ b/package/dt-utils/dt-utils.mk
>> @@ -12,4 +12,11 @@ DT_UTILS_LICENSE_FILES = COPYING
>> DT_UTILS_DEPENDENCIES = udev
>> DT_UTILS_AUTORECONF = YES
>>
>> +define DT_UTILS_INSTALL_LOCK_FILE
>> + rm -f $(TARGET_DIR)/var/lock/barebox-state
>> + mkdir -p $(TARGET_DIR)/var/lock
>> + touch $(TARGET_DIR)/var/lock/barebox-state
>> +endef
>> +DT_UTILS_POST_INSTALL_TARGET_HOOKS += DT_UTILS_INSTALL_LOCK_FILE
> I'm afraid this won't help for minimal rootfs images, where /var/lock is
> a symlink at /tmp. What is the type of rootfs skeleton that you tested
> your changes with?
I've been testing this patch using skeleton-init-systemd.
>
>> +
>> $(eval $(autotools-package))
Best
Bartek
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-10 20:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 10:25 [Buildroot] [PATCH] package/dt-utils: install barebox-state lock file Bartosz Bilas
2020-12-05 14:46 ` Marcin Niestrój
2020-12-10 20:28 ` Bartosz Bilas
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.