Open asabil opened 5 years ago
We need a more generic way to generate a random id then:
relx_gen_id() {
od -t x -N 4 /dev/urandom | head -n1 | awk '{print $2}'
}
What is CONFIG_DESKTOP
?
I just tested with busybox and the od
command works
docker run -ti busybox
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
bdbbaa22dec6: Already exists
Digest: sha256:6915be4043561d64e0ab0f8f098dc2ac48e077fe23f488ac24b665166898115a
Status: Downloaded newer image for busybox:latest
/ # od -t x -N 4 /dev/urandom
0000000 3532a62d
0000004
busybox has a lot of build time configurations, CONFIG_DESKTOP
is one such option: https://git.busybox.net/busybox/tree/Config.in#n14
The Poky distro for Yocto, which is a common embedded "build system", defaults to disabling the DESKTOP
config: https://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-core/busybox/busybox/defconfig#n11
Of course this can and should probably be overridden (which is what we do), but if we can find a fix for this one-liner, it would make a good 1st experience.
Hello @asabil,
Could you check if it is working for your use case now ?
The current relx_gen_id is like this:
# Generate a random id
relx_gen_id() {
dd count=1 bs=4 if=/dev/urandom 2> /dev/null | od -x | head -n1 | awk '{print $2$3}'
}
The following error is printed in our logs when startin relx release on a system running busybox 1.29.3
This is when busybox is built without CONFIG_DESKTOP, which is quite common on embedded systems.