[ptxdist] [PATCH v2] ptxd_lib_template: image-fit: Fix nested replacement

2024-10-22 Thread Alexander Dahl
The @PACKAGE@ inside of $CODE_SIGNING_VARS was not replaced before,
leading to output in the make rule like this:

  IMAGE_@PACKAGE@_SIGN_ROLE   := # TODO: role name of the code signing 
provider, passed to cs_get_uri
  IMAGE_@PACKAGE@_KEY_NAME_HINT   := # TODO: key-name-hint property in the 
signature node of the FIT image

Using shell variables before assignement, it looks
like this now (for image fit package named 'foo'):

  IMAGE_FOO_SIGN_ROLE := # TODO: role name of the code signing provider, 
passed to cs_get_uri
  IMAGE_FOO_KEY_NAME_HINT := # TODO: key-name-hint property in the signature 
node of the FIT image

Fixes: c9659e6c318f ("templates: add template for custom FIT images")
Signed-off-by: Alexander Dahl 
---

Notes:
v2:
- use shell variables to set $CODE_SIGNING_VARS to avoid second
  replacement run
- reword commit message accordingly

v1:
- Link: 
https://lore.ptxdist.org/ptxdist/20241022082730.133421-1-...@thorsis.com/T/#u

 scripts/lib/ptxd_lib_template.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh
index cc512faa1..ce20ae705 100644
--- a/scripts/lib/ptxd_lib_template.sh
+++ b/scripts/lib/ptxd_lib_template.sh
@@ -615,8 +615,8 @@ ptxd_template_new_image_fit() {
export select_CODE_SIGNING="select CODE_SIGNING
"
export CODE_SIGNING_VARS="
-IMAGE_@PACKAGE@_SIGN_ROLE  := # TODO: role name of the code signing 
provider, passed to cs_get_uri
-IMAGE_@PACKAGE@_KEY_NAME_HINT  := # TODO: key-name-hint property in the 
signature node of the FIT image
+IMAGE_${PACKAGE}_SIGN_ROLE := # TODO: role name of the code signing 
provider, passed to cs_get_uri
+IMAGE_${PACKAGE}_KEY_NAME_HINT := # TODO: key-name-hint property in the 
signature node of the FIT image
 "
;;
*)

base-commit: 49049c01b0a932c74c77b64f1b42c85141fec8e4
-- 
2.39.5




[ptxdist] [PATCH] ptxd_lib_template: image-fit: Add second replacement run

2024-10-22 Thread Alexander Dahl
The @PACKAGE@ inside of $CODE_SIGNING_VARS was not replaced before,
leading to output in the make rule like this:

  IMAGE_@PACKAGE@_SIGN_ROLE   := # TODO: role name of the code signing 
provider, passed to cs_get_uri
  IMAGE_@PACKAGE@_KEY_NAME_HINT   := # TODO: key-name-hint property in the 
signature node of the FIT image

After a second replacement run on the already created rule, it looks
like this now (for image fit package named 'foo'):

  IMAGE_FOO_SIGN_ROLE := # TODO: role name of the code signing provider, 
passed to cs_get_uri
  IMAGE_FOO_KEY_NAME_HINT := # TODO: key-name-hint property in the signature 
node of the FIT image

Fixes: c9659e6c318f ("templates: add template for custom FIT images")
Signed-off-by: Alexander Dahl 
---
 scripts/lib/ptxd_lib_template.sh | 4 
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh
index cc512faa1..163f4c828 100644
--- a/scripts/lib/ptxd_lib_template.sh
+++ b/scripts/lib/ptxd_lib_template.sh
@@ -625,6 +625,10 @@ IMAGE_@PACKAGE@_KEY_NAME_HINT  := # TODO: 
key-name-hint property in the signature
;;
 esac
 ptxd_template_write_platform_rules
+# second replacement run for @PACKAGE@ nested in CODE_SIGNING_VARS
+
filename="${PTXDIST_PLATFORMCONFIGDIR}/rules/${class}${package_filename}.make"
+tmpfile="$(mktemp "${PTXDIST_TEMPDIR}/template_new_image_fit.")"
+ptxd_replace_magic "${filename}" > "${tmpfile}" && mv "${tmpfile}" 
"${filename}"
 }
 export -f ptxd_template_new_image_fit
 ptxd_template_help_list[${#ptxd_template_help_list[@]}]="image-fit"

base-commit: 49049c01b0a932c74c77b64f1b42c85141fec8e4
-- 
2.39.5




Re: [ptxdist] util-linux build error with meson and older glibc

2024-09-10 Thread Alexander Dahl
Hello,

Am Tue, Sep 10, 2024 at 12:00:26PM +0200 schrieb Michael Olbrich:
> On Tue, Sep 10, 2024 at 09:07:01AM +0200, Alexander Dahl wrote:
> > Hello everyone,
> > 
> > building util-linux with ptxdist [1] here.  After switching to meson
> > build [2], compiling util-linux fails with OSELAS.Toolchain-2020.08.0
> > which contains gcc-10.2.1 and glibc-2.32.  Building for architecture
> > arm-v5te-linux-gnueabi here, console output below.
> > 
> > Autotools build was fine.  Build with a more recent toolchain
> > (OSELAS.Toolchain-2023.07, gcc 13.2.1, glibc 2.37) is successful.
> > 
> > From looking at the linker options I suspect -lutil missing?
> > According to manpage that's a BSD function present in glibc.
> > I suspect a change in glibc 2.34 integrating libutil in core glibc,
> > which makes it work with recent version 2.37.  So this is probably a
> > flaw in meson build not setting the necessary linker options for glibc
> > up to 2.33?  Could anyone point me how to fix this or does anyone by
> > chance already have a patch for this?  (Disclaimer: I have zero
> > experience with meson.)
> 
> 
> There is a -Dlibutil=disabled in rules/util-linux.make. Maybe try to
> enable that?

This did it.  Sent a patch already:

Link: 
https://lore.ptxdist.org/ptxdist/20240910105459.3468520-1-...@thorsis.com/T/#u

Thanks and Greets
Alex

> 
> Michael
> 
> > % p -v -j1 compile util-linux
> > 
> > --
> > target: util-linux.compile
> > --
> > 
> > ptxdist: executing: 
> > PATH=/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/lib/wrapper:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.05.0/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.04.0/bin:/home/adahl/bin:/home/adahl/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
> >  HTTPS_PROXY=PTXDIST-UNALLOWED-DOWNLOAD 
> > HTTP_PROXY=PTXDIST-UNALLOWED-DOWNLOAD 
> > https_proxy=PTXDIST-UNALLOWED-DOWNLOAD 
> > http_proxy=PTXDIST-UNALLOWED-DOWNLOAD PKGCONFIG_WHITELIST_HOST='' 
> > PKGCONFIG_WHITELIST_TARGET='' PKGCONFIG_WHITELIST_SRC='util-linux' 
> > SYSROOT='/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-target' 
> > V=1 VERBOSE=1 LC_ALL='C.utf8' 
> > KBUILD_BUILD_TIMESTAMP=2020-08-01T00:00:00+00:00 KBUILD_BUILD_USER=ptxdist 
> > KBUILD_BUILD_HOST=ptxdist  ninja -C 
> > /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build
> >  -v  -j1 
> > 
> > ninja: Entering directory 
> > `/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build'
> > [1/75] arm-v5te-linux-gnueabi-gcc  -o test_pty 
> > test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed 
> > -Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt 
> > -Wl,--end-group
> > FAILED: test_pty 
> > arm-v5te-linux-gnueabi-gcc  -o test_pty test_pty.p/lib_pty-session.c.o 
> > test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined 
> > -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
> > 
> > /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld:
> >  test_pty.p/lib_pty-session.c.o: in function `ul_pty_setup':
> > 
> > platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:198:
> >  undefined reference to `openpty'
> > 
> > /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld:
> >  
> > platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:188:
> >  undefined reference to `openpty'
> > collect2: error: ld returned 1 exit status
> > ninja: build stopped: subcommand failed.
> > make: *** 
> > [/usr/local/lib/ptxdist-2024.05.0/rules/post/ptxd_make_world_compile

[ptxdist] [PATCH] util-linux: Enable libutil for pre glibc 2.34 toolchains

2024-09-10 Thread Alexander Dahl
Otherwise we get linker errors like this (e.g. with
OSELAS.Toolchain-2020.08 coming with glibc 2.32):

% p -v -j1 compile util-linux

--
target: util-linux.compile
--

ptxdist: executing: 
PATH=/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/lib/wrapper:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.05.0/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.04.0/bin:/home/adahl/bin:/home/adahl/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
 HTTPS_PROXY=PTXDIST-UNALLOWED-DOWNLOAD HTTP_PROXY=PTXDIST-UNALLOWED-DOWNLOAD 
https_proxy=PTXDIST-UNALLOWED-DOWNLOAD http_proxy=PTXDIST-UNALLOWED-DOWNLOAD 
PKGCONFIG_WHITELIST_HOST='' PKGCONFIG_WHITELIST_TARGET='' 
PKGCONFIG_WHITELIST_SRC='util-linux' 
SYSROOT='/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-target' V=1 
VERBOSE=1 LC_ALL='C.utf8' KBUILD_BUILD_TIMESTAMP=2020-08-01T00:00:00+00:00 
KBUILD_BUILD_USER=ptxdist KBUILD_BUILD_HOST=ptxdist  ninja -C 
/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build
 -v  -j1

ninja: Entering directory 
`/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build'
[1/75] arm-v5te-linux-gnueabi-gcc  -o test_pty 
test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed 
-Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
FAILED: test_pty
arm-v5te-linux-gnueabi-gcc  -o test_pty test_pty.p/lib_pty-session.c.o 
test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined 
-Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group

/opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld:
 test_pty.p/lib_pty-session.c.o: in function `ul_pty_setup':

platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:198:
 undefined reference to `openpty'

/opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld:
 
platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:188:
 undefined reference to `openpty'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** 
[/usr/local/lib/ptxdist-2024.05.0/rules/post/ptxd_make_world_compile.make:20: 
/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/state/util-linux.compile] 
Error 1

Suggested-by: Michael Olbrich 
Fixes: 18c9c0f89c41 ("util-linux: switch to meson")
Link: https://lore.ptxdist.org/ptxdist/zuayutgovwik5...@pengutronix.de/T/#u
Signed-off-by: Alexander Dahl 
---
 rules/util-linux.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/util-linux.make b/rules/util-linux.make
index 62cd995a0..8cf82bd83 100644
--- a/rules/util-linux.make
+++ b/rules/util-linux.make
@@ -155,7 +155,7 @@ UTIL_LINUX_CONF_OPT := \
-Dlibpcre2-posix=disabled \
-Dlibuser=disabled \
-Dlibutempter=disabled \
-   -Dlibutil=disabled \
+   -Dlibutil=$(call ptx/disen, PTXCONF_GLIBC_2_34)d \
-Dmagic=disabled \
-Dncurses=$(call ptx/endis, UTIL_LINUX_USES_NCURSES)d \
-Dncursesw=$(call ptx/endis, PTXCONF_UTIL_LINUX_USES_NCURSESW)d \

base-commit: e16ba2b3690107c5b42109f6808c49912049be22
-- 
2.39.2




Re: [ptxdist] [PATCH] host-tz-database: Version bump. 2024a -> 2024b

2024-09-10 Thread Alexander Dahl
Hello Christian,

Am Mon, Sep 09, 2024 at 06:34:12PM +0200 schrieb Christian Melki:
> Minor changes.
> https://github.com/eggert/tz/blob/2024b/NEWS
> 
> Signed-off-by: Christian Melki 
> ---
>  rules/host-tz-database.make | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/rules/host-tz-database.make b/rules/host-tz-database.make
> index b0b3f74c9..c13b70b66 100644
> --- a/rules/host-tz-database.make
> +++ b/rules/host-tz-database.make
> @@ -17,10 +17,10 @@ HOST_PACKAGES-$(PTXCONF_HOST_TZ_DATABASE) += 
> host-tz-database
>  #
>  HOST_TZ_DATABASE := tz-database
>  HOST_TZ_DATABASE_DIR := $(HOST_BUILDDIR)/$(HOST_TZ_DATABASE)
> -HOST_TZ_DATABASE_VERSION:= 2024a
> +HOST_TZ_DATABASE_VERSION:= 2024b
>  
>  TZCODE_VERSION   := $(HOST_TZ_DATABASE_VERSION)
> -TZCODE_MD5   := 1a9d670f0b418130503401b8b8f41769
> +TZCODE_MD5   := aecb8ab771575b79183897cd591e2fd3
>  TZCODE   := tzcode$(TZCODE_VERSION)
>  TZCODE_SUFFIX:= tar.gz
>  TZCODE_URL   := \
> @@ -30,7 +30,7 @@ TZCODE_DIR  := $(HOST_TZ_DATABASE_DIR)
>  TZCODE_STRIP_LEVEL   := 0
>  
>  TZDATA_VERSION   := $(HOST_TZ_DATABASE_VERSION)
> -TZDATA_MD5   := 2349edd8335245525cc082f2755d5bf4
> +TZDATA_MD5   := e1d010b46844502f12dcff298c1b7154
>  TZDATA   := tzdata$(TZDATA_VERSION)
>  TZDATA_SUFFIX:= tar.gz
>  TZDATA_URL   := \

Tested-by: Alexander Dahl 

Thanks and Greets
Alex

> -- 
> 2.34.1
> 
> 



[ptxdist] util-linux build error with meson and older glibc

2024-09-10 Thread Alexander Dahl
Hello everyone,

building util-linux with ptxdist [1] here.  After switching to meson
build [2], compiling util-linux fails with OSELAS.Toolchain-2020.08.0
which contains gcc-10.2.1 and glibc-2.32.  Building for architecture
arm-v5te-linux-gnueabi here, console output below.

Autotools build was fine.  Build with a more recent toolchain
(OSELAS.Toolchain-2023.07, gcc 13.2.1, glibc 2.37) is successful.

From looking at the linker options I suspect -lutil missing?
According to manpage that's a BSD function present in glibc.
I suspect a change in glibc 2.34 integrating libutil in core glibc,
which makes it work with recent version 2.37.  So this is probably a
flaw in meson build not setting the necessary linker options for glibc
up to 2.33?  Could anyone point me how to fix this or does anyone by
chance already have a patch for this?  (Disclaimer: I have zero
experience with meson.)

% p -v -j1 compile util-linux

--
target: util-linux.compile
--

ptxdist: executing: 
PATH=/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-cross/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/lib/wrapper:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.05.0/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_toolchain:/usr/local/lib/ptxdist-2024.04.0/bin:/home/adahl/bin:/home/adahl/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
 HTTPS_PROXY=PTXDIST-UNALLOWED-DOWNLOAD HTTP_PROXY=PTXDIST-UNALLOWED-DOWNLOAD 
https_proxy=PTXDIST-UNALLOWED-DOWNLOAD http_proxy=PTXDIST-UNALLOWED-DOWNLOAD 
PKGCONFIG_WHITELIST_HOST='' PKGCONFIG_WHITELIST_TARGET='' 
PKGCONFIG_WHITELIST_SRC='util-linux' 
SYSROOT='/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/sysroot-target' V=1 
VERBOSE=1 LC_ALL='C.utf8' KBUILD_BUILD_TIMESTAMP=2020-08-01T00:00:00+00:00 
KBUILD_BUILD_USER=ptxdist KBUILD_BUILD_HOST=ptxdist  ninja -C 
/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build
 -v  -j1 

ninja: Entering directory 
`/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/build-target/util-linux-2.40.2-build'
[1/75] arm-v5te-linux-gnueabi-gcc  -o test_pty 
test_pty.p/lib_pty-session.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed 
-Wl,--no-undefined -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group
FAILED: test_pty 
arm-v5te-linux-gnueabi-gcc  -o test_pty test_pty.p/lib_pty-session.c.o 
test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined 
-Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group

/opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld:
 test_pty.p/lib_pty-session.c.o: in function `ul_pty_setup':

platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:198:
 undefined reference to `openpty'

/opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi/10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld:
 
platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:188:
 undefined reference to `openpty'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** 
[/usr/local/lib/ptxdist-2024.05.0/rules/post/ptxd_make_world_compile.make:20: 
/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/state/util-linux.compile] 
Error 1

Greets
Alex

[1] https://www.ptxdist.org/
[2] 
https://git.pengutronix.de/cgit/ptxdist/commit/?id=18c9c0f89c4148f3007b9fcc7833d99af60084dc



Re: [ptxdist] [PATCH] lighttpd: Version bump, 1.4.74 -> 1.4.76

2024-06-25 Thread Alexander Dahl
Hello Andreas,

Am Mon, Jun 24, 2024 at 06:36:05PM +0200 schrieb Andreas Helmcke:
> Important changes
> - detect VU#421644 HTTP/2 CONTINUATION Flood
> - avoid CVE-2024-3094 xz supply chain attack
> - incrementally stronger TLS cipher defaults
> 
> bugfixes
> 
> Link: https://www.lighttpd.net/2024/4/12/1.4.76/
> Link: https://www.lighttpd.net/2024/3/13/1.4.75/
> Signed-off-by: Andreas Helmcke 
> ---
>  rules/lighttpd.make | 12 ++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>  mode change 100644 => 100755 rules/lighttpd.make
> 
> diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> old mode 100644
> new mode 100755
> index 96382b86a..fcb543818
> --- a/rules/lighttpd.make
> +++ b/rules/lighttpd.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
>  #
>  # Paths and names
>  #
> -LIGHTTPD_VERSION := 1.4.74
> -LIGHTTPD_MD5 := f38c400232151c69cc608fca35e593a9
> +LIGHTTPD_VERSION := 1.4.76
> +LIGHTTPD_MD5 := f9018cda389b1aa6dae4c5f962c20825
>  LIGHTTPD := lighttpd-$(LIGHTTPD_VERSION)
>  LIGHTTPD_SUFFIX  := tar.xz
>  LIGHTTPD_URL := 
> http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
> @@ -77,6 +77,14 @@ LIGHTTPD_CONF_OPT  := \
>   --without-maxminddb \
>   --$(call ptx/wwo, PTXCONF_LIGHTTPD_LUA)-lua
>  
> +$(STATEDIR)/lighttpd.prepare:
> + @$(call targetinfo)
> + @$(call world/execute, LIGHTTPD, ./autogen.sh)
> + @$(call world/prepare, LIGHTTPD)
> + @$(call touch)

This probably works, but it is not the way ptxdist usually handles
this.  For packages not distributing ./configure you create a folder
in patches and symlink autogen.sh from the abovce folder.  See
dropwatch or evtest for example.

A short note in commit message about lighttpd not distributing
./configure anymore would be nice.

By chance, do you know how lighttpd is going forward on this?  I saw
buildroot switching to meson for building lighttpd.

Greets
Alex

> +
> +
> +
>  # 
> 
>  # Install
>  # 
> 
> -- 
> 2.43.0
> 
> 



Re: [ptxdist] [PATCH 07/20] figlet: replace URL with HTTPS

2024-06-12 Thread Alexander Dahl
Hei hei,

sorry for being late to the party, but we just discussed this in IRC …

Am Tue, May 14, 2024 at 10:35:39PM +0200 schrieb Lucas Stach:
> As the figlet page only provides FTP downloads, point the download
> URL to the github repository of the maintainer, which is also linked
> from the homepage.
> 
> Signed-off-by: Lucas Stach 
> ---
>  rules/figlet.make | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rules/figlet.make b/rules/figlet.make
> index 3dad77154430..c6d2fb38ea06 100644
> --- a/rules/figlet.make
> +++ b/rules/figlet.make
> @@ -20,7 +20,7 @@ FIGLET_VERSION  := 2.2.5
>  FIGLET_MD5   := d88cb33a14f1469fff975d021ae2858e
>  FIGLET   := figlet-$(FIGLET_VERSION)
>  FIGLET_SUFFIX:= tar.gz
> -FIGLET_URL   := 
> ftp://ftp.figlet.org/pub/figlet/program/unix/$(FIGLET).$(FIGLET_SUFFIX)
> +FIGLET_URL   := 
> https://github.com/cmatsuoka/figlet/archive/refs/tags/$(FIGLET_VERSION).$(FIGLET_SUFFIX)

This is replacing a probably handcrafted tarball from 10+ years ago
with a machine generated tarball from today.  Although the content
looks similar, the md5sum is not the same.

What about using this instead?

http://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gz

Greets
Alex

>  FIGLET_SOURCE:= $(SRCDIR)/$(FIGLET).$(FIGLET_SUFFIX)
>  FIGLET_DIR   := $(BUILDDIR)/$(FIGLET)
>  FIGLET_LICENSE   := BSD-3-clause
> -- 
> 2.39.2
> 
> 



Re: [ptxdist] [PATCH] libtraceevent: Fix help text

2024-05-21 Thread Alexander Dahl
Moin,

Am Tue, May 21, 2024 at 07:08:13PM +0200 schrieb Uwe Kleine-König:
> Fixes: 84741db5d065 ("libtraceevent: new package")
> Signed-off-by: Uwe Kleine-König 
> ---
>  rules/libtraceevent.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rules/libtraceevent.in b/rules/libtraceevent.in
> index a3b7b97379f3..c3c2587c163d 100644
> --- a/rules/libtraceevent.in
> +++ b/rules/libtraceevent.in
> @@ -5,4 +5,4 @@ config LIBTRACEEVENT
>   prompt "libtraceevent"
>   select HOST_MESON
>   help
> -   FIXME
> +   Linux kernel trace event library

Reviewed-by: Alexander Dahl 

Greets
Alex

> 
> base-commit: b114f7eb008dee7fab8140bf51cef436d7d57e60
> -- 
> 2.43.0
> 
> 



Re: [ptxdist] [PATCH 09/20] gdbserver: remove FTP URL

2024-05-14 Thread Alexander Dahl
Hello,

Am Tue, May 14, 2024 at 10:35:41PM +0200 schrieb Lucas Stach:
> Signed-off-by: Lucas Stach 
> ---
>  rules/gdbserver.make | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/rules/gdbserver.make b/rules/gdbserver.make
> index 2ff2f15395c4..7937158a9851 100644
> --- a/rules/gdbserver.make
> +++ b/rules/gdbserver.make
> @@ -27,9 +27,7 @@ GDBSERVER_LICENSE_FILES := \
>   file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
>   file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6
>  
> -GDBSERVER_URL := \
> - $(call ptx/mirror, GNU, gdb/$(GDBSERVER).$(GDBSERVER_SUFFIX)) \
> - 
> ftp://sourceware.org/pub/gdb/snapshots/current/$(GDBSERVER).$(GDBSERVER_SUFFIX)
> +GDBSERVER_URL := $(call ptx/mirror, GNU, 
> gdb/$(GDBSERVER).$(GDBSERVER_SUFFIX))
>  

Reviewed-by: Alexander Dahl 

Greets




Re: [ptxdist] [PATCH 08/20] gdb: remove FTP URL

2024-05-14 Thread Alexander Dahl
Am Tue, May 14, 2024 at 10:35:40PM +0200 schrieb Lucas Stach:
> Signed-off-by: Lucas Stach 
> ---
>  rules/gdb.make | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/rules/gdb.make b/rules/gdb.make
> index c1337427b605..085e1f66fc98 100644
> --- a/rules/gdb.make
> +++ b/rules/gdb.make
> @@ -24,9 +24,7 @@ GDB_SOURCE  := $(SRCDIR)/$(GDB).$(GDB_SUFFIX)
>  GDB_DIR  := $(BUILDDIR)/$(GDB)
>  GDB_LICENSE  := GPL-3.0-or-later
>  
> -GDB_URL := \
> - $(call ptx/mirror, GNU, gdb/$(GDB).$(GDB_SUFFIX)) \
> - ftp://sourceware.org/pub/gdb/snapshots/current/$(GDB).$(GDB_SUFFIX)
> +GDB_URL := $(call ptx/mirror, GNU, gdb/$(GDB).$(GDB_SUFFIX))

Reviewed-by: Alexander Dahl 

Greets
Alex




[ptxdist] [PATCH 2/3] u-boot: Allow other packages to inject dependencies

2024-05-06 Thread Alexander Dahl
Same approach as in barebox packages.

Signed-off-by: Alexander Dahl 
---
 platforms/u-boot.in | 5 +
 1 file changed, 5 insertions(+)

diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 53db146e1..9163a8378 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -1,6 +1,11 @@
 ## SECTION=bootloader
 
+config U_BOOT_DEPENDENCIES
+   tristate
+   select VIRTUAL
+
 menuconfig U_BOOT
+   select U_BOOT_DEPENDENCIES
select BOOTLOADER
select HOST_SYSTEM_PYTHON3
select HOST_OPENSSL if U_BOOT_NEEDS_HOST_OPENSSL
-- 
2.39.2




[ptxdist] [PATCH 3/3] u-boot: Add integration of firmware blobs

2024-05-06 Thread Alexander Dahl
Almost same approach as done for barebox with commit
6684c552fbd7 ("barebox: add integration of firmware blobs") already.

For some boards it is required to inject files to build dir.  This is
cleaner and not cluttering your source dir.  In U-Boot it seems to work
in both ways, injecting to source or build dir, so we opt for build dir.

Signed-off-by: Alexander Dahl 
---
 platforms/u-boot.firmware.in |  7 +++
 platforms/u-boot.in  |  8 
 rules/u-boot.make| 20 
 3 files changed, 31 insertions(+), 4 deletions(-)
 create mode 100644 platforms/u-boot.firmware.in

diff --git a/platforms/u-boot.firmware.in b/platforms/u-boot.firmware.in
new file mode 100644
index 0..da7f8128f
--- /dev/null
+++ b/platforms/u-boot.firmware.in
@@ -0,0 +1,7 @@
+## SECTION=u_boot_firmware
+
+#
+# This file does only exist to create a defined entry in the "u_boot_firmware"
+# section, so that the toplevel Kconfig can include 
generated/u_boot_firmware.in
+# even if no package is in that category.
+#
diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 9163a8378..5ce7387e4 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -90,6 +90,14 @@ config U_BOOT_CONFIG
 
 endif
 
+menuconfig U_BOOT_FIRMWARE
+   bool
+   prompt "integrate firmware blobs  "
+
+if U_BOOT_FIRMWARE
+source "generated/u_boot_firmware.in"
+endif
+
 config U_BOOT_CUSTOM_MAKE_ENV
prompt "Custom (additional) make environment"
string
diff --git a/rules/u-boot.make b/rules/u-boot.make
index e4c963d0c..2a8059170 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -36,6 +36,9 @@ endif
 # Prepare
 # 
 
+U_BOOT_INJECT_PATH := ${PTXDIST_SYSROOT_TARGET}/usr/lib/firmware
+U_BOOT_INJECT_OOT  := $(call ptx/ifdef, PTXCONF_U_BOOT_BUILD_OOT,YES,NO)
+
 ifdef PTXCONF_U_BOOT_BOOT_SCRIPT
 U_BOOT_BOOT_SCRIPT_TXT := $(call ptx/in-platformconfigdir, uboot.scr)
 U_BOOT_BOOT_SCRIPT_BIN := $(call remove_quotes, \
@@ -93,14 +96,23 @@ $(U_BOOT_CONFIG):
@exit 1
 endif
 
-
-ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_LEGACY
 $(STATEDIR)/u-boot.prepare:
@$(call targetinfo)
-   $(U_BOOT_CONF_ENV) $(MAKE) $(U_BOOT_CONF_OPT)
-   @$(call touch)
+
+ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_KCONFIG
+   @$(call world/prepare, U_BOOT)
 endif
 
+ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_LEGACY
+   $(U_BOOT_CONF_ENV) $(MAKE) $(U_BOOT_CONF_OPT)
+endif
+
+ifdef PTXCONF_U_BOOT_FIRMWARE
+   @$(call world/inject, U_BOOT)
+endif
+
+   @$(call touch)
+
 # 
 # Compile
 # 
-- 
2.39.2




[ptxdist] [PATCH 0/3] u-boot: Extend for using external firmware

2024-05-06 Thread Alexander Dahl
Hello everyone,

for quite some new boards external firmware blobs are required to build
a working bootloader image.  This series is the follow-up to the
reworked ptxdist inject mechanism and allows to build U-Boot for modern
boards with i.MX8 or i.MX9 SoCs (and probably more).

Greets
Alex

Alexander Dahl (3):
  u-boot: Add option to pass additional make env
  u-boot: Allow other packages to inject dependencies
  u-boot: Add integration of firmware blobs

 platforms/u-boot.firmware.in |  7 +++
 platforms/u-boot.in  | 22 ++
 rules/u-boot.make| 24 +++-
 3 files changed, 48 insertions(+), 5 deletions(-)
 create mode 100644 platforms/u-boot.firmware.in


base-commit: 5a720c419cd1fabde04e8de8d1d1367c76a2666b
-- 
2.39.2




[ptxdist] [PATCH 1/3] u-boot: Add option to pass additional make env

2024-05-06 Thread Alexander Dahl
Some things need to be set in environment instead of passing them as
additional make opts.

Signed-off-by: Alexander Dahl 
---
 platforms/u-boot.in | 9 +
 rules/u-boot.make   | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 000ca491a..53db146e1 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -85,6 +85,15 @@ config U_BOOT_CONFIG
 
 endif
 
+config U_BOOT_CUSTOM_MAKE_ENV
+   prompt "Custom (additional) make environment"
+   string
+   help
+ List of additional env variables set for make at build time.
+ Can be used for example to set BINMAN_INDIRS= to a path
+ containing firmware files (preferably somewhere in
+ sysroot-target).
+
 config U_BOOT_CUSTOM_MAKE_OPTS
prompt "Custom make options"
string
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 4bc7f3f78..e4c963d0c 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -63,7 +63,9 @@ U_BOOT_CONF_OPT   := \
 
 U_BOOT_MAKE_ENV:= \
CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
-   HOSTCC=$(HOSTCC)
+   HOSTCC=$(HOSTCC) \
+   $(call remove_quotes,$(PTXCONF_U_BOOT_CUSTOM_MAKE_ENV))
+
 U_BOOT_MAKE_OPT:= $(U_BOOT_CONF_OPT)
 
 U_BOOT_TAGS_OPT:= ctags cscope etags
-- 
2.39.2




[ptxdist] [PATCH v2 2/4] ptxd_make_world_inject: Use _DIR directly

2024-05-06 Thread Alexander Dahl
pkg_source was defined as "$($(1)_DIR)" which is the same as pkg_dir in
ptxd_make_world_common.  We can use pkg_dir directly.  Add a safe-guard
to bail out early if that var is empty.

Signed-off-by: Alexander Dahl 
---

Notes:
v2:
- no change

v1:
- implicit

 rules/post/ptxd_make_world_inject.make | 3 +--
 scripts/lib/ptxd_make_world_inject.sh  | 6 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index b7d28e92f..3506ee114 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -9,8 +9,7 @@
 world/inject/env = \
$(call world/env, $(1)) \
pkg_inject_path="$($(1)_INJECT_PATH)" \
-   pkg_inject_files="$($(1)_INJECT_FILES)" \
-   pkg_source="$($(1)_DIR)"
+   pkg_inject_files="$($(1)_INJECT_FILES)"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index 5c2d0dc5f..b74e464c6 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -10,7 +10,7 @@ ptxd_make_inject() {
 local source target
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
-target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
+target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
@@ -32,6 +32,10 @@ export -f ptxd_make_inject
 ptxd_make_world_inject() {
 ptxd_make_world_init || return
 
+if [ -z "${pkg_dir}" ]; then
+   ptxd_bailout "_DIR empty, no destination to inject to."
+fi
+
 for inject_file in ${pkg_inject_files}; do
ptxd_make_inject || return
 done
-- 
2.39.2




[ptxdist] [PATCH v2 1/4] ptxd_make_world_inject: Remove useless test

2024-05-06 Thread Alexander Dahl
One line above $target is set to "${var}/$(subshell)" and even if $var
_and_ the result of the subshell call is empty, there's still the slash.
Thus target is never empty.

Signed-off-by: Alexander Dahl 
---

Notes:
v2:
- no change

v1:
- implicit

 scripts/lib/ptxd_make_world_inject.sh | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index fe4eb8363..5c2d0dc5f 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -11,9 +11,6 @@ ptxd_make_inject() {
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
 target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
-if [ -z "${target}" ]; then
-   target="${source}"
-fi
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
-- 
2.39.2




[ptxdist] [PATCH v2 4/4] ptxd_make_world_inject: Introduce new variable _INJECT_OOT

2024-05-06 Thread Alexander Dahl
Setting the new variable to 'YES' allows to inject into _BUILD_DIR
instead of _DIR as before.

When building out-of-tree some bootloaders like U-Boot expect injected
files in the build dir, not in the source dir.  Backwards compatibility
is ensured, the source dir is still the default, the new inject dest is
optional and in case set it overwrites the default.

For using this in u-boot package, on top of the things already done to
use the old inject mechanism in general, add this line to
'rules/u-boot.make' for example:

U_BOOT_INJECT_OOT := YES

Signed-off-by: Alexander Dahl 
---

Notes:
v2:
- dropped the previous approach with the more flexible _INJECT_DEST
- reworked the whole logic to use new _INJECT_OOT variable

v1:
- implicit

 rules/post/ptxd_make_world_inject.make |  3 ++-
 scripts/lib/ptxd_make_world_inject.sh  | 23 ---
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index eabcdd052..1e3979a2f 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -9,7 +9,8 @@
 world/inject/env = \
$(call world/env, $(1)) \
pkg_inject_path="$(call ptx/escape,$($(1)_INJECT_PATH))" \
-   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))"
+   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))" \
+   pkg_inject_oot="$(call ptx/escape,$($(1)_INJECT_OOT))"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index b74e464c6..e8e94fbe6 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -10,7 +10,7 @@ ptxd_make_inject() {
 local source target
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
-target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
+target="${inject_dest}/$(echo ${inject_file} | cut -d ":" -f 2)"
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
@@ -32,8 +32,25 @@ export -f ptxd_make_inject
 ptxd_make_world_inject() {
 ptxd_make_world_init || return
 
-if [ -z "${pkg_dir}" ]; then
-   ptxd_bailout "_DIR empty, no destination to inject to."
+if [ -z "${pkg_inject_oot}" ]; then
+   pkg_inject_oot=NO
+fi
+
+case "${pkg_inject_oot}" in
+   "YES") inject_dest="${pkg_build_dir}" ;;
+   "NO")  inject_dest="${pkg_dir}" ;;
+   *) ptxd_bailout "_INJECT_OOT: please set to YES or NO" ;;
+esac
+
+if [ "${pkg_build_oot:-NO}" = 'NO' ] && [ "${pkg_inject_oot}" != 'NO' ]; 
then
+   ptxd_warning "_BUILD_OOT and _INJECT_OOT contradict each 
other." \
+   "Using $(ptxd_print_path ${inject_dest}) as inject destination 
anyways."
+fi
+
+if [ ! -d "${inject_dest}" ]; then
+   ptxd_bailout " inject destination dir missing." \
+   "Correct placement of world/inject depends on _BUILD_OOT and 
_INJECT_OOT." \
+   "Check order of calls in prepare stage!"
 fi
 
 for inject_file in ${pkg_inject_files}; do
-- 
2.39.2




[ptxdist] [PATCH v2 0/4] ptxd_make_world_inject: Spring cleanup and optional dest dir

2024-05-06 Thread Alexander Dahl
Hello,

some spring cleaning and a new feature for the firmware inject
mechanism.

When trying to re-build U-Boot as an oot build for the Karo QSBASE93
Evalkit (for QS93 Solder-Down System-on-Module) it became apparent
U-Boot wants some of those binary blobs in build folder instead of
source folder.  Supporting this usecase is nice to have, because you
won't clutter your source tree, especially when building from external
tree after something like `ptxdist local-src u-boot ~/src/u-boot` …

Maybe we should add some documentation for this inject mechanism?

Follow-up patches for u-boot package in preparation already, but let me
know what you think of this first.

Greets
Alex

v2:
- rework patch 4 introducing the new inject oot mechanism
  (using the new _INJECT_OOT variable now instead of a needlessly
  flexible approach in v1)

v1: 
https://lore.ptxdist.org/ptxdist/20240424143109.277373-1-...@thorsis.com/T/#t
- initial patch stack revision (implicit)

Alexander Dahl (4):
  ptxd_make_world_inject: Remove useless test
  ptxd_make_world_inject: Use _DIR directly
  ptxd_make_world_inject: Escape inject path and files
  ptxd_make_world_inject: Introduce new variable _INJECT_OOT

 rules/post/ptxd_make_world_inject.make |  6 +++---
 scripts/lib/ptxd_make_world_inject.sh  | 26 ++
 2 files changed, 25 insertions(+), 7 deletions(-)


base-commit: 5a720c419cd1fabde04e8de8d1d1367c76a2666b
-- 
2.39.2




[ptxdist] [PATCH v2 3/4] ptxd_make_world_inject: Escape inject path and files

2024-05-06 Thread Alexander Dahl
Same as in ptxd_make_world_common for all the other variables set in
make and used in shell.

Signed-off-by: Alexander Dahl 
---

Notes:
v2:
- no change

v1:
- implicit

 rules/post/ptxd_make_world_inject.make | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index 3506ee114..eabcdd052 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -8,8 +8,8 @@
 
 world/inject/env = \
$(call world/env, $(1)) \
-   pkg_inject_path="$($(1)_INJECT_PATH)" \
-   pkg_inject_files="$($(1)_INJECT_FILES)"
+   pkg_inject_path="$(call ptx/escape,$($(1)_INJECT_PATH))" \
+   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
-- 
2.39.2




Re: [ptxdist] [PATCH 4/4] ptxd_make_world_inject: Introduce separate destination directory

2024-05-03 Thread Alexander Dahl
Hello Michael,

Am Fri, May 03, 2024 at 05:31:29PM +0200 schrieb Michael Olbrich:
> On Fri, May 03, 2024 at 12:08:34PM +0200, Alexander Dahl wrote:
> > Am Fri, May 03, 2024 at 11:48:52AM +0200 schrieb Michael Olbrich:
> > > On Wed, Apr 24, 2024 at 04:31:09PM +0200, Alexander Dahl wrote:
> > > > Setting the optional _INJECT_DEST now allows to give a different
> > > > target for putting the binary blobs into.  When building out-of-tree
> > > > some bootloaders like U-Boot expect injected files in the build dir, not
> > > > in the source dir.  Backwards compatibility is ensured, the source dir
> > > > is still the default, the new inject dest is optional and in case set it
> > > > overwrites the default.
> > > > 
> > > > For using this in u-boot package, on top of the things already done to
> > > > use the inject mechanism in general, add this line to
> > > > 'rules/u-boot.make' for example:
> > > > 
> > > > U_BOOT_INJECT_DEST := $(U_BOOT_BUILD_DIR)
> > > 
> > > Can you add a patch for u-boot?
> > 
> > I will, in an upcoming patch series with more changes to the u-boot
> > package.  Planned to this after lunch later today anyways. ^^
> > 
> > > > 
> > > > Signed-off-by: Alexander Dahl 
> > > > ---
> > > >  rules/post/ptxd_make_world_inject.make |  3 ++-
> > > >  scripts/lib/ptxd_make_world_inject.sh  | 22 ++
> > > >  2 files changed, 20 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/rules/post/ptxd_make_world_inject.make 
> > > > b/rules/post/ptxd_make_world_inject.make
> > > > index eabcdd052..509d480ba 100644
> > > > --- a/rules/post/ptxd_make_world_inject.make
> > > > +++ b/rules/post/ptxd_make_world_inject.make
> > > > @@ -9,7 +9,8 @@
> > > >  world/inject/env = \
> > > > $(call world/env, $(1)) \
> > > > pkg_inject_path="$(call ptx/escape,$($(1)_INJECT_PATH))" \
> > > > -   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))"
> > > > +   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))" \
> > > > +   pkg_inject_dest="$(call ptx/escape,$($(1)_INJECT_DEST))"
> > > >  
> > > >  world/inject = \
> > > > $(call world/inject/env,$(strip $(1))) \
> > > > diff --git a/scripts/lib/ptxd_make_world_inject.sh 
> > > > b/scripts/lib/ptxd_make_world_inject.sh
> > > > index b74e464c6..90bd8b684 100644
> > > > --- a/scripts/lib/ptxd_make_world_inject.sh
> > > > +++ b/scripts/lib/ptxd_make_world_inject.sh
> > > > @@ -7,10 +7,15 @@
> > > >  #
> > > >  
> > > >  ptxd_make_inject() {
> > > > -local source target
> > > > +local dest source target
> > > > +
> > > > +dest="${pkg_dir}"
> > > > +if [ -n "${pkg_inject_dest}" ]; then
> > > > +   dest="${pkg_inject_dest}"
> > > > +fi
> > > 
> > > This should be in ptxd_make_world_inject(). It remains the same for all
> > > files.
> > 
> > I thought about this when changing it, but decided to keep it at this
> > place.  Moving it to ptxd_make_world_inject() would require to
> > introduce another non-local variable and I did not want that.  But
> > sure, can be done.
> 
> Just set pkg_inject_dest if it's empty. No need for a separate variable.

Ack.

> > > >  source="$(echo ${inject_file} | cut -d ":" -f 1)"
> > > > -target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
> > > > +target="${dest}/$(echo ${inject_file} | cut -d ":" -f 2)"
> > > >  
> > > >  if [[ "${source}" =~ ^/.* ]]; then
> > > > ptxd_bailout "'${source}' must not be an absolute path!" \
> > > > @@ -32,8 +37,17 @@ export -f ptxd_make_inject
> > > >  ptxd_make_world_inject() {
> > > >  ptxd_make_world_init || return
> > > >  
> > > > -if [ -z "${pkg_dir}" ]; then
> > > > -   ptxd_bailout "_DIR empty, no destination to inject to."
> > > > +if [ -z "${pkg_inject_dest}" ] && [ -z "${pkg_dir}" ]; then
> > > > +   ptxd_bailout "No destination to inject to.&qu

Re: [ptxdist] [PATCH] vim: allow vim to be installed alongside busybox vi and xxd

2024-05-03 Thread Alexander Dahl
Hello Ian,

Am Fri, May 03, 2024 at 01:24:15PM +0100 schrieb Ian Abbott:
> On 03/05/2024 10:40, Alexander Dahl wrote:
> > Hello Ian,
> > 
> > Am Fri, May 03, 2024 at 10:12:47AM +0100 schrieb Ian Abbott:
> > > On 03/05/2024 07:59, Alexander Dahl wrote:
> > > > Am Thu, May 02, 2024 at 03:53:22PM +0100 schrieb Ian Abbott:
> > > > > +
> > > > > +comment "BusyBox' vi is selected!"
> > > > > + depends on VIM_VIM && BUSYBOX_VI
> > > > > +
> > > > > +config VIM_VI_SYMLINK
> > > > > + depends on VIM_VIM && !BUSYBOX_VI
> > > > 
> > > > The !BUSYBOX_VI is redundant, but I guess one can keep it.
> > > 
> > > I'm not sure why it's redundant. I don't want this option and BUSYBOX_VI
> > > fighting over the symlink to /usr/bin/vi in the image.
> > 
> > Right, there should be only one package setting that symlink.
> > 
> > What I meant was: VIM_VIM already depends on !BUSYBOX_VI so if
> > VIM_VI_SYMLINK depends on VIM_VIM, then !BUSYBOX_VI is already
> > implicitly satisfied and stating it again is not strictly necessary.
> 
> Actually, my patch removed the dependency of VIM_VIM on !BUSYBOX_VI so that
> /usr/bin/vim can be installed alongside busybox's /usr/bin/vi.

You're right.  I did not look close enough.  Sorry for the noise then.

> I'm not sure if there is a valid use case for installing both busybox vi and
> vim. Obviously it would use more space in the image, but if busybox is
> already running, running busybox's vi should be less memory hungry than
> running vim.

Could confuse users, but otherwise, I think it's fine to make that
possible in ptxdist.  Developer can decide then.

Greets
Alex




Re: [ptxdist] [PATCH 4/4] ptxd_make_world_inject: Introduce separate destination directory

2024-05-03 Thread Alexander Dahl
Hello Michael,

thanks for reviewing, answers below …

Am Fri, May 03, 2024 at 11:48:52AM +0200 schrieb Michael Olbrich:
> On Wed, Apr 24, 2024 at 04:31:09PM +0200, Alexander Dahl wrote:
> > Setting the optional _INJECT_DEST now allows to give a different
> > target for putting the binary blobs into.  When building out-of-tree
> > some bootloaders like U-Boot expect injected files in the build dir, not
> > in the source dir.  Backwards compatibility is ensured, the source dir
> > is still the default, the new inject dest is optional and in case set it
> > overwrites the default.
> > 
> > For using this in u-boot package, on top of the things already done to
> > use the inject mechanism in general, add this line to
> > 'rules/u-boot.make' for example:
> > 
> > U_BOOT_INJECT_DEST := $(U_BOOT_BUILD_DIR)
> 
> Can you add a patch for u-boot?

I will, in an upcoming patch series with more changes to the u-boot
package.  Planned to this after lunch later today anyways. ^^

> > 
> > Signed-off-by: Alexander Dahl 
> > ---
> >  rules/post/ptxd_make_world_inject.make |  3 ++-
> >  scripts/lib/ptxd_make_world_inject.sh  | 22 ++
> >  2 files changed, 20 insertions(+), 5 deletions(-)
> > 
> > diff --git a/rules/post/ptxd_make_world_inject.make 
> > b/rules/post/ptxd_make_world_inject.make
> > index eabcdd052..509d480ba 100644
> > --- a/rules/post/ptxd_make_world_inject.make
> > +++ b/rules/post/ptxd_make_world_inject.make
> > @@ -9,7 +9,8 @@
> >  world/inject/env = \
> > $(call world/env, $(1)) \
> > pkg_inject_path="$(call ptx/escape,$($(1)_INJECT_PATH))" \
> > -   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))"
> > +   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))" \
> > +   pkg_inject_dest="$(call ptx/escape,$($(1)_INJECT_DEST))"
> >  
> >  world/inject = \
> > $(call world/inject/env,$(strip $(1))) \
> > diff --git a/scripts/lib/ptxd_make_world_inject.sh 
> > b/scripts/lib/ptxd_make_world_inject.sh
> > index b74e464c6..90bd8b684 100644
> > --- a/scripts/lib/ptxd_make_world_inject.sh
> > +++ b/scripts/lib/ptxd_make_world_inject.sh
> > @@ -7,10 +7,15 @@
> >  #
> >  
> >  ptxd_make_inject() {
> > -local source target
> > +local dest source target
> > +
> > +dest="${pkg_dir}"
> > +if [ -n "${pkg_inject_dest}" ]; then
> > +   dest="${pkg_inject_dest}"
> > +fi
> 
> This should be in ptxd_make_world_inject(). It remains the same for all
> files.

I thought about this when changing it, but decided to keep it at this
place.  Moving it to ptxd_make_world_inject() would require to
introduce another non-local variable and I did not want that.  But
sure, can be done.

> 
> >  
> >  source="$(echo ${inject_file} | cut -d ":" -f 1)"
> > -target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
> > +target="${dest}/$(echo ${inject_file} | cut -d ":" -f 2)"
> >  
> >  if [[ "${source}" =~ ^/.* ]]; then
> > ptxd_bailout "'${source}' must not be an absolute path!" \
> > @@ -32,8 +37,17 @@ export -f ptxd_make_inject
> >  ptxd_make_world_inject() {
> >  ptxd_make_world_init || return
> >  
> > -if [ -z "${pkg_dir}" ]; then
> > -   ptxd_bailout "_DIR empty, no destination to inject to."
> > +if [ -z "${pkg_inject_dest}" ] && [ -z "${pkg_dir}" ]; then
> > +   ptxd_bailout "No destination to inject to." \
> > +   "Set either _DIR or _INJECT_DEST to have a valid 
> > destination!"
> > +fi
> > +
> > +if [ -n "${pkg_inject_dest}" ]; then
> > +   if [ "${pkg_build_dir}" = "${pkg_inject_dest}" ] && [ 
> > "${pkg_build_oot}" = "YES" ]; then
> 
> This gives a warning even in the good case, right?

No it does not.  In the good case user has set either _DIR or
_INJECT_DEST to a not empty string and the bailout does not
happen.

The warning inside this more complicated if statement is just covering
this one edge case which I ran into when developing, and the text
should describe what happens, why the user would not find the files in
_BUILD_DIR in that case.

The mkdir is only dependend on _INJECT_DEST set, because there's
no need to create that dir if the feature is not used.

> I think we should require that pkg_inject_dest already exists at
> this point and fail if 

Re: [ptxdist] [PATCH] vim: allow vim to be installed alongside busybox vi and xxd

2024-05-03 Thread Alexander Dahl
Hello Ian,

Am Fri, May 03, 2024 at 10:12:47AM +0100 schrieb Ian Abbott:
> On 03/05/2024 07:59, Alexander Dahl wrote:
> > Hello Ian,
> > 
> > I like the idea.  Maybe it confuses users if 'vi' calls busybox and
> > 'vim' the full featured Vim, but I appreciate it anyway.  More
> > feedback below.
> 
> Thanks for the review. Feedback below.
> 
> > Am Thu, May 02, 2024 at 03:53:22PM +0100 schrieb Ian Abbott:
> > > --- a/rules/vim.in
> > > +++ b/rules/vim.in
> > > @@ -1,15 +1,7 @@
> > >   ## SECTION=editors
> > > -comment "BusyBox' vi and xxd is selected!"
> > > - depends on BUSYBOX_VI && BUSYBOX_XXD
> > > -
> > >   menuconfig VIM
> > >   tristate
> > > - depends on !(BUSYBOX_VI && BUSYBOX_XXD)
> > > - select LIBC_DL
> > > - select LIBC_M
> > > - select GCCLIBS_GCC_S
> > > - select NCURSES
> > >   prompt "vim   "
> > >   help
> > > Vim is an advanced text editor that seeks to provide the
> > > @@ -18,12 +10,20 @@ menuconfig VIM
> > >   if VIM
> > > -comment "BusyBox' vi is selected!"
> > > - depends on BUSYBOX_VI
> > > -
> > >   config VIM_VIM
> > > - depends on !BUSYBOX_VI
> > >   bool "Vim Editor"
> > > + select LIBC_DL
> > > + select LIBC_M
> > > + select GCCLIBS_GCC_S
> > > + select NCURSES
> > 
> > Don't move this to the suboption, keep it in the original place but
> > add 'if VIM_VIM' like this:
> > 
> >  select LIBC_DL if VIM_VIM
> > 
> > This avoids dependency problems, it's also in documentation:
> > https://www.ptxdist.org/doc/dev_advanced_rule_files.html#managing-external-compile-time-dependencies-on-demand
> 
> OK, that makes sense.
> 
> > > +
> > > +comment "BusyBox' vi is selected!"
> > > + depends on VIM_VIM && BUSYBOX_VI
> > > +
> > > +config VIM_VI_SYMLINK
> > > + depends on VIM_VIM && !BUSYBOX_VI
> > 
> > The !BUSYBOX_VI is redundant, but I guess one can keep it.
> 
> I'm not sure why it's redundant. I don't want this option and BUSYBOX_VI
> fighting over the symlink to /usr/bin/vi in the image.

Right, there should be only one package setting that symlink.

What I meant was: VIM_VIM already depends on !BUSYBOX_VI so if
VIM_VI_SYMLINK depends on VIM_VIM, then !BUSYBOX_VI is already
implicitly satisfied and stating it again is not strictly necessary.

IMHO: Keep it in, it better reflects the intention.

Greets
Alex

> 
> > 
> > Greets
> > Alex
> > 
> > > + bool "install symbolic link /usr/bin/vi"
> > > + default y
> > >   comment "BusyBox' xxd is selected!"
> > >   depends on BUSYBOX_XXD
> > > diff --git a/rules/vim.make b/rules/vim.make
> > > index b03778e53..8700b70bd 100644
> > > --- a/rules/vim.make
> > > +++ b/rules/vim.make
> > > @@ -103,6 +103,10 @@ VIM_INSTALL_OPT := \
> > >   VIM_LINKS := ex rview rvim view vimdiff
> > > +ifdef PTXCONF_VIM_VI_SYMLINK
> > > +VIM_LINKS += vi
> > > +endif
> > > +
> > >   $(STATEDIR)/vim.targetinstall:
> > >   @$(call targetinfo)
> > > -- 
> > > 2.43.0
> > > 
> > > 
> 
> Thanks again. I'll submit a v2 patch shortly.
> 
> -- 
> -=( Ian Abbott  || MEV Ltd. is a company  )=-
> -=( registered in England & Wales.  Regd. number: 02862268.  )=-
> -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
> -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-
> 
> 



Re: [ptxdist] [PATCH] vim: allow vim to be installed alongside busybox vi and xxd

2024-05-02 Thread Alexander Dahl
Hello Ian,

I like the idea.  Maybe it confuses users if 'vi' calls busybox and
'vim' the full featured Vim, but I appreciate it anyway.  More
feedback below.

Am Thu, May 02, 2024 at 03:53:22PM +0100 schrieb Ian Abbott:
> Commit ad2eb34a07ed ("vim: prevent file name conflicts with busybox")
> prevented vim being selected if busybox vi is selected. However, the vim
> package does not currently install /usr/bin/vi, so the only conflict is
> between vim's xxd and busybox's xxd.
> 
> Allow vim to be installed alongside busybox vi. Also add a configuration
> option to allow installation of a /usr/bin/vi symbolic link to
> /usr/bin/vim, but only allow it to be selected if busybox vi is not
> selected.
> 
> Move the auto-selections of LIBC_DL, LIBC_M, GCCLIBS_GCC_S, and NCURSES
> from VIM to VIM_VIM because VIM_XXD does not appear to require them.
> 
> Signed-off-by: Ian Abbott 
> ---
>  rules/vim.in   | 24 
>  rules/vim.make |  4 
>  2 files changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/rules/vim.in b/rules/vim.in
> index c4c9d14e6..2f7eba993 100644
> --- a/rules/vim.in
> +++ b/rules/vim.in
> @@ -1,15 +1,7 @@
>  ## SECTION=editors
>  
> -comment "BusyBox' vi and xxd is selected!"
> - depends on BUSYBOX_VI && BUSYBOX_XXD
> -
>  menuconfig VIM
>   tristate
> - depends on !(BUSYBOX_VI && BUSYBOX_XXD)
> - select LIBC_DL
> - select LIBC_M
> - select GCCLIBS_GCC_S
> - select NCURSES
>   prompt "vim   "
>   help
> Vim is an advanced text editor that seeks to provide the
> @@ -18,12 +10,20 @@ menuconfig VIM
>  
>  if VIM
>  
> -comment "BusyBox' vi is selected!"
> - depends on BUSYBOX_VI
> -
>  config VIM_VIM
> - depends on !BUSYBOX_VI
>   bool "Vim Editor"
> + select LIBC_DL
> + select LIBC_M
> + select GCCLIBS_GCC_S
> + select NCURSES

Don't move this to the suboption, keep it in the original place but
add 'if VIM_VIM' like this:

select LIBC_DL if VIM_VIM

This avoids dependency problems, it's also in documentation:
https://www.ptxdist.org/doc/dev_advanced_rule_files.html#managing-external-compile-time-dependencies-on-demand

> +
> +comment "BusyBox' vi is selected!"
> + depends on VIM_VIM && BUSYBOX_VI
> +
> +config VIM_VI_SYMLINK
> + depends on VIM_VIM && !BUSYBOX_VI

The !BUSYBOX_VI is redundant, but I guess one can keep it.

Greets
Alex

> + bool "install symbolic link /usr/bin/vi"
> + default y
>  
>  comment "BusyBox' xxd is selected!"
>   depends on BUSYBOX_XXD
> diff --git a/rules/vim.make b/rules/vim.make
> index b03778e53..8700b70bd 100644
> --- a/rules/vim.make
> +++ b/rules/vim.make
> @@ -103,6 +103,10 @@ VIM_INSTALL_OPT := \
>  
>  VIM_LINKS := ex rview rvim view vimdiff
>  
> +ifdef PTXCONF_VIM_VI_SYMLINK
> +VIM_LINKS += vi
> +endif
> +
>  $(STATEDIR)/vim.targetinstall:
>   @$(call targetinfo)
>  
> -- 
> 2.43.0
> 
> 



Re: [ptxdist] [PATCH] at91bootstrap: drop atmel download url

2024-04-24 Thread Alexander Dahl
Hei hei,

Am Wed, Apr 24, 2024 at 04:22:03PM +0200 schrieb Ladislav Michl:
> From: Ladislav Michl 
> 
> Atmel url just redirects to https://www.microchip.com/ happily
> feeding tarball with  content, so drop it entirely.
> 
> Signed-off-by: Ladislav Michl 
> ---
>  rules/at91bootstrap.make | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/rules/at91bootstrap.make b/rules/at91bootstrap.make
> index 7835564ea..1dfabdcbf 100644
> --- a/rules/at91bootstrap.make
> +++ b/rules/at91bootstrap.make
> @@ -20,9 +20,7 @@ AT91BOOTSTRAP_MD5   := 2d222312cf0af81c56db8747d6a38c7c
>  AT91BOOTSTRAP_SUFFIX := zip
>  AT91BOOTSTRAP:= Bootstrap-v$(AT91BOOTSTRAP_VERSION)
>  AT91BOOTSTRAP_TARBALL:= 
> AT91Bootstrap$(AT91BOOTSTRAP_VERSION).$(AT91BOOTSTRAP_SUFFIX)
> -AT91BOOTSTRAP_URL:= \
> -
> http://www.atmel.com/dyn/resources/prod_documents/$(AT91BOOTSTRAP_TARBALL) \
> -http://sources.buildroot.net/$(AT91BOOTSTRAP_TARBALL)
> +AT91BOOTSTRAP_URL    := http://sources.buildroot.net/$(AT91BOOTSTRAP_TARBALL)

Reviewed-by: Alexander Dahl 

Greets
Alex

>  AT91BOOTSTRAP_SOURCE := $(SRCDIR)/$(AT91BOOTSTRAP_TARBALL)
>  AT91BOOTSTRAP_DIR:= $(BUILDDIR)/$(AT91BOOTSTRAP)
>  AT91BOOTSTRAP_LICENSE:= BSD-Source-Code AND GPL-2.0-or-later
> -- 
> 2.39.2
> 
> 



[ptxdist] [PATCH 1/4] ptxd_make_world_inject: Remove useless test

2024-04-24 Thread Alexander Dahl
One line above $target is set to "${var}/$(subshell)" and even if $var
_and_ the result of the subshell call is empty, there's still the slash.
Thus target is never empty.

Signed-off-by: Alexander Dahl 
---
 scripts/lib/ptxd_make_world_inject.sh | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index fe4eb8363..5c2d0dc5f 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -11,9 +11,6 @@ ptxd_make_inject() {
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
 target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
-if [ -z "${target}" ]; then
-   target="${source}"
-fi
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
-- 
2.39.2




[ptxdist] [PATCH 4/4] ptxd_make_world_inject: Introduce separate destination directory

2024-04-24 Thread Alexander Dahl
Setting the optional _INJECT_DEST now allows to give a different
target for putting the binary blobs into.  When building out-of-tree
some bootloaders like U-Boot expect injected files in the build dir, not
in the source dir.  Backwards compatibility is ensured, the source dir
is still the default, the new inject dest is optional and in case set it
overwrites the default.

For using this in u-boot package, on top of the things already done to
use the inject mechanism in general, add this line to
'rules/u-boot.make' for example:

U_BOOT_INJECT_DEST := $(U_BOOT_BUILD_DIR)

Signed-off-by: Alexander Dahl 
---
 rules/post/ptxd_make_world_inject.make |  3 ++-
 scripts/lib/ptxd_make_world_inject.sh  | 22 ++
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index eabcdd052..509d480ba 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -9,7 +9,8 @@
 world/inject/env = \
$(call world/env, $(1)) \
pkg_inject_path="$(call ptx/escape,$($(1)_INJECT_PATH))" \
-   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))"
+   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))" \
+   pkg_inject_dest="$(call ptx/escape,$($(1)_INJECT_DEST))"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index b74e464c6..90bd8b684 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -7,10 +7,15 @@
 #
 
 ptxd_make_inject() {
-local source target
+local dest source target
+
+dest="${pkg_dir}"
+if [ -n "${pkg_inject_dest}" ]; then
+   dest="${pkg_inject_dest}"
+fi
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
-target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
+target="${dest}/$(echo ${inject_file} | cut -d ":" -f 2)"
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
@@ -32,8 +37,17 @@ export -f ptxd_make_inject
 ptxd_make_world_inject() {
 ptxd_make_world_init || return
 
-if [ -z "${pkg_dir}" ]; then
-   ptxd_bailout "_DIR empty, no destination to inject to."
+if [ -z "${pkg_inject_dest}" ] && [ -z "${pkg_dir}" ]; then
+   ptxd_bailout "No destination to inject to." \
+   "Set either _DIR or _INJECT_DEST to have a valid 
destination!"
+fi
+
+if [ -n "${pkg_inject_dest}" ]; then
+   if [ "${pkg_build_dir}" = "${pkg_inject_dest}" ] && [ 
"${pkg_build_oot}" = "YES" ]; then
+   ptxd_warning "_INJECT_DEST is set to _BUILD_DIR and 
_BUILD_OOT is set to 'YES'." \
+   "If you called world/inject before world/prepare your files 
will be removed after injecting."
+   fi
+   mkdir -p -- "${pkg_inject_dest}"
 fi
 
 for inject_file in ${pkg_inject_files}; do
-- 
2.39.2




[ptxdist] [PATCH 2/4] ptxd_make_world_inject: Use _DIR directly

2024-04-24 Thread Alexander Dahl
pkg_source was defined as "$($(1)_DIR)" which is the same as pkg_dir in
ptxd_make_world_common.  We can use pkg_dir directly.  Add a safe-guard
to bail out early if that var is empty.

Signed-off-by: Alexander Dahl 
---
 rules/post/ptxd_make_world_inject.make | 3 +--
 scripts/lib/ptxd_make_world_inject.sh  | 6 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index b7d28e92f..3506ee114 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -9,8 +9,7 @@
 world/inject/env = \
$(call world/env, $(1)) \
pkg_inject_path="$($(1)_INJECT_PATH)" \
-   pkg_inject_files="$($(1)_INJECT_FILES)" \
-   pkg_source="$($(1)_DIR)"
+   pkg_inject_files="$($(1)_INJECT_FILES)"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
diff --git a/scripts/lib/ptxd_make_world_inject.sh 
b/scripts/lib/ptxd_make_world_inject.sh
index 5c2d0dc5f..b74e464c6 100644
--- a/scripts/lib/ptxd_make_world_inject.sh
+++ b/scripts/lib/ptxd_make_world_inject.sh
@@ -10,7 +10,7 @@ ptxd_make_inject() {
 local source target
 
 source="$(echo ${inject_file} | cut -d ":" -f 1)"
-target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
+target="${pkg_dir}/$(echo ${inject_file} | cut -d ":" -f 2)"
 
 if [[ "${source}" =~ ^/.* ]]; then
ptxd_bailout "'${source}' must not be an absolute path!" \
@@ -32,6 +32,10 @@ export -f ptxd_make_inject
 ptxd_make_world_inject() {
 ptxd_make_world_init || return
 
+if [ -z "${pkg_dir}" ]; then
+   ptxd_bailout "_DIR empty, no destination to inject to."
+fi
+
 for inject_file in ${pkg_inject_files}; do
ptxd_make_inject || return
 done
-- 
2.39.2




[ptxdist] [PATCH 3/4] ptxd_make_world_inject: Escape inject path and files

2024-04-24 Thread Alexander Dahl
Same as in ptxd_make_world_common for all the other variables set in
make and used in shell.

Signed-off-by: Alexander Dahl 
---
 rules/post/ptxd_make_world_inject.make | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/post/ptxd_make_world_inject.make 
b/rules/post/ptxd_make_world_inject.make
index 3506ee114..eabcdd052 100644
--- a/rules/post/ptxd_make_world_inject.make
+++ b/rules/post/ptxd_make_world_inject.make
@@ -8,8 +8,8 @@
 
 world/inject/env = \
$(call world/env, $(1)) \
-   pkg_inject_path="$($(1)_INJECT_PATH)" \
-   pkg_inject_files="$($(1)_INJECT_FILES)"
+   pkg_inject_path="$(call ptx/escape,$($(1)_INJECT_PATH))" \
+   pkg_inject_files="$(call ptx/escape,$($(1)_INJECT_FILES))"
 
 world/inject = \
$(call world/inject/env,$(strip $(1))) \
-- 
2.39.2




[ptxdist] [PATCH 0/4] ptxd_make_world_inject: Spring cleanup and optional dest dir

2024-04-24 Thread Alexander Dahl
Hello,

some spring cleaning and a new feature for the firmware inject
mechanism.

When trying to re-build U-Boot as an oot build for the Karo QSBASE93
Evalkit (for QS93 Solder-Down System-on-Module) it became apparent
U-Boot wants some of those binary blobs in build folder instead of
source folder.  Supporting this usecase is nice to have, because you
won't clutter your source tree, especially when building from external
tree after something like `ptxdist local-src u-boot ~/src/u-boot` …

Maybe we should add some documentation for this inject mechanism?

Follow-up patches for u-boot package are not yet ready for submission.
Let me know what you thing of this first.

Greets
Alex

Alexander Dahl (4):
  ptxd_make_world_inject: Remove useless test
  ptxd_make_world_inject: Use _DIR directly
  ptxd_make_world_inject: Escape inject path and files
  ptxd_make_world_inject: Introduce separate destination directory

 rules/post/ptxd_make_world_inject.make |  6 +++---
 scripts/lib/ptxd_make_world_inject.sh  | 25 -
 2 files changed, 23 insertions(+), 8 deletions(-)


base-commit: 549a207826f541515b26c8f8bdcc1b8df23fe3c5
-- 
2.39.2




[ptxdist] [PATCH] tf-a: Update download defaults

2024-04-24 Thread Alexander Dahl
Previous URL threw 401 errors.  Experiments with other paths from the
same server yield no stable tarballs.  GitHub tarballs are stable, have
a different checksum however.  Tarball content was checked to be the
same (at least compared to those unstable git snapshot tarballs from the
previous URL).  GitHub tarball has same checksum as the one downloaded
by buildroot.

Signed-off-by: Alexander Dahl 
Link: 
https://lore.distrokit.org/distrokit/20240424124341.243323-1-...@thorsis.com/
---
 platforms/tf-a.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/platforms/tf-a.in b/platforms/tf-a.in
index 0a14bd8c4..495ae58fe 100644
--- a/platforms/tf-a.in
+++ b/platforms/tf-a.in
@@ -11,14 +11,14 @@ if TF_A
 
 config TF_A_URL
string
-   default 
"https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot";
+   default 
"https://github.com/ARM-software/arm-trusted-firmware/archive/refs/tags";
prompt "TF-A URL"
help
  Enter the TF-A URL you want to use.
 
 config TF_A_VERSION
string
-   default "v2.2"
+   default "v2.10"
prompt "TF-A version"
help
  Enter the TF-A git commit-ish you want to build. Usually a tagged
@@ -26,7 +26,7 @@ config TF_A_VERSION
 
 config TF_A_MD5
string
-   default "bb300e5a62c911e189c80d935d497a4b"
+   default "179042745d57dc03cb44063d43dc5301"
prompt "TF-A source md5"
 
 config TF_A_ARCH_STRING

base-commit: 549a207826f541515b26c8f8bdcc1b8df23fe3c5
-- 
2.39.2




Re: [ptxdist] [PATCH v6 3/5] scripts: add helper to inject files into a source directory

2024-04-23 Thread Alexander Dahl
Hello Michael,

I know this has been applied already, but while working on the extension I 
asked about last week, I stumbled over some things.  See below.

Am Samstag, 29. Januar 2022, 08:03:28 CEST schrieb Michael Riesch:
> Some packages may require certain files that are maintained
> or generated outside of their source repository. For example,
> binary firmware blobs could be excluded from the sources due
> to licensing issues. Add a helper that allows to inject certain
> files into the source directory (usually in the prepare stage).
> 
> Signed-off-by: Michael Riesch 
> ---
> 
> Notes:
> v6:
> - replaced 'break' with 'return'
> 
>  rules/post/ptxd_make_world_inject.make | 19 
>  scripts/lib/ptxd_make_world_inject.sh  | 42 ++
>  2 files changed, 61 insertions(+)
>  create mode 100644 rules/post/ptxd_make_world_inject.make
>  create mode 100644 scripts/lib/ptxd_make_world_inject.sh
> 
> diff --git a/rules/post/ptxd_make_world_inject.make
> b/rules/post/ptxd_make_world_inject.make new file mode 100644
> index 0..b7d28e92f
> --- /dev/null
> +++ b/rules/post/ptxd_make_world_inject.make
> @@ -0,0 +1,19 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2021 by Michael Riesch 
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +world/inject/env = \
> + $(call world/env, $(1)) \
> + pkg_inject_path="$($(1)_INJECT_PATH)" \
> + pkg_inject_files="$($(1)_INJECT_FILES)" \
> + pkg_source="$($(1)_DIR)"

Why passing 'pkg_source' here?  world/env/impl and thus world/env has 
'pkg_dir' and it has exactly the same content which is available in the shell 
script later.

Second thing: world/env is assigned in 
'rules/post/ptxd_make_world_common.make' and the interesting part looks like 
this:

pkg_dir="$(call ptx/escape,$($(1)_DIR))"

Same for all the other variables with paths.  Why was ptx/escape not used on 
_INJECT_PATH and _INJECT_FILES here?

> +
> +world/inject = \
> + $(call world/inject/env,$(strip $(1))) \
> + ptxd_make_world_inject
> +
> +# vim: syntax=make
> diff --git a/scripts/lib/ptxd_make_world_inject.sh
> b/scripts/lib/ptxd_make_world_inject.sh new file mode 100644
> index 0..fe4eb8363
> --- /dev/null
> +++ b/scripts/lib/ptxd_make_world_inject.sh
> @@ -0,0 +1,42 @@
> +#!/bin/bash
> +#
> +# Copyright (C) 2021 by Michael Riesch 
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +ptxd_make_inject() {
> +local source target
> +
> +source="$(echo ${inject_file} | cut -d ":" -f 1)"
> +target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
> +if [ -z "${target}" ]; then
> + target="${source}"
> +fi

Here ${target} can never be empty, because if both ${pkg_source} and $(echo …) 
are empty, there's still the '/' in the middle.  So the last three lines of 
this block make no sense.  Some leftover from earlier iterations?

Greets
Alex

> +
> +if [[ "${source}" =~ ^/.* ]]; then
> + ptxd_bailout "'${source}' must not be an absolute path!" \
> + "Use _INJECT_PATH to specify the search path."
> +fi
> +
> +if ! ptxd_in_path pkg_inject_path "${source}"; then
> + ptxd_bailout "Blob '${source}' not found in '${pkg_inject_path}'."
> +fi
> +source="${ptxd_reply}"
> +
> +echo -e "\nInject file $(ptxd_print_path ${source}) into" \
> +  "$(ptxd_print_path ${target})..."
> +cp ${source} ${target}
> +}
> +export -f ptxd_make_inject
> +
> +
> +ptxd_make_world_inject() {
> +ptxd_make_world_init || return
> +
> +for inject_file in ${pkg_inject_files}; do
> + ptxd_make_inject || return
> +done
> +}
> +export -f ptxd_make_world_inject







Re: [ptxdist] [PATCH v6 3/5] scripts: add helper to inject files into a source directory

2024-04-19 Thread Alexander Dahl
Hei hei,

sorry for digging up this old discussion, but I kind of want to use this 
approach and … see below.

Am Samstag, 29. Januar 2022, 08:03:28 CEST schrieb Michael Riesch:
> Some packages may require certain files that are maintained
> or generated outside of their source repository. For example,
> binary firmware blobs could be excluded from the sources due
> to licensing issues. Add a helper that allows to inject certain
> files into the source directory (usually in the prepare stage).

Currently trying to build recent U-Boot for i.MX8 and i.MX9 based boards which 
require additional firmware.  However I still want to build OOT to keep my 
source tree clean, especially when building with an external tree (after 
`ptxdist local-src u-boot $HOME/src/u-boot`).

Now U-Boot needs those binaries in the build tree, it does not work using this 
nice inject mechanism putting it in the source tree.

> 
> Signed-off-by: Michael Riesch 
> ---
> 
> Notes:
> v6:
> - replaced 'break' with 'return'
> 
>  rules/post/ptxd_make_world_inject.make | 19 
>  scripts/lib/ptxd_make_world_inject.sh  | 42 ++
>  2 files changed, 61 insertions(+)
>  create mode 100644 rules/post/ptxd_make_world_inject.make
>  create mode 100644 scripts/lib/ptxd_make_world_inject.sh
> 
> diff --git a/rules/post/ptxd_make_world_inject.make
> b/rules/post/ptxd_make_world_inject.make new file mode 100644
> index 0..b7d28e92f
> --- /dev/null
> +++ b/rules/post/ptxd_make_world_inject.make
> @@ -0,0 +1,19 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2021 by Michael Riesch 
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +world/inject/env = \
> + $(call world/env, $(1)) \
> + pkg_inject_path="$($(1)_INJECT_PATH)" \
> + pkg_inject_files="$($(1)_INJECT_FILES)" \
> + pkg_source="$($(1)_DIR)"

Here _DIR is assigned to pkg_source which makes the source dir the target 
folder.

Did anyone already think of how to extend this approach to be more flexible 
for the target folder?  Maybe even without damaging existing use cases?

Maybe adding a new optional variable _INJECT_DEST which defaults to 
_DIR and can be overridden?

Greets
Alex

> +
> +world/inject = \
> + $(call world/inject/env,$(strip $(1))) \
> + ptxd_make_world_inject
> +
> +# vim: syntax=make
> diff --git a/scripts/lib/ptxd_make_world_inject.sh
> b/scripts/lib/ptxd_make_world_inject.sh new file mode 100644
> index 0..fe4eb8363
> --- /dev/null
> +++ b/scripts/lib/ptxd_make_world_inject.sh
> @@ -0,0 +1,42 @@
> +#!/bin/bash
> +#
> +# Copyright (C) 2021 by Michael Riesch 
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +ptxd_make_inject() {
> +local source target
> +
> +source="$(echo ${inject_file} | cut -d ":" -f 1)"
> +target="${pkg_source}/$(echo ${inject_file} | cut -d ":" -f 2)"
> +if [ -z "${target}" ]; then
> + target="${source}"
> +fi
> +
> +if [[ "${source}" =~ ^/.* ]]; then
> + ptxd_bailout "'${source}' must not be an absolute path!" \
> + "Use _INJECT_PATH to specify the search path."
> +fi
> +
> +if ! ptxd_in_path pkg_inject_path "${source}"; then
> + ptxd_bailout "Blob '${source}' not found in '${pkg_inject_path}'."
> +fi
> +source="${ptxd_reply}"
> +
> +echo -e "\nInject file $(ptxd_print_path ${source}) into" \
> +  "$(ptxd_print_path ${target})..."
> +cp ${source} ${target}
> +}
> +export -f ptxd_make_inject
> +
> +
> +ptxd_make_world_inject() {
> +ptxd_make_world_init || return
> +
> +for inject_file in ${pkg_inject_files}; do
> + ptxd_make_inject || return
> +done
> +}
> +export -f ptxd_make_world_inject







Re: [ptxdist] [PATCH 1/2] Fix typos "can/must be uses" -> "used"

2024-04-09 Thread Alexander Dahl
Hello Markus,

Am Tue, Apr 09, 2024 at 09:37:44AM +0200 schrieb Markus Heidelberg:
> Signed-off-by: Markus Heidelberg 
> ---
>  doc/multi_image_platforms.inc | 6 +++---
>  doc/ref_make_variables.rst| 6 +++---
>  rules/other/Toplevel.make | 2 +-
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/doc/multi_image_platforms.inc b/doc/multi_image_platforms.inc
> index 2c8838f4e..726a42767 100644
> --- a/doc/multi_image_platforms.inc
> +++ b/doc/multi_image_platforms.inc
> @@ -26,7 +26,7 @@ package rules manually. See :ref:`adding_new_packages` for 
> more details one
>  how to create a new package.
>  
>  .. note:: PTXdist looks in ``patches/$()`` for the patches. Symlinks
> -  can be uses to share the patch stack across multiple bootloader packages.
> +  can be used to share the patch stack across multiple bootloader packages.
>  
>  .. _multi_image_individual_root_filesystems:
>  
> @@ -46,7 +46,7 @@ There are two ways to mange the package list for the image:
> Manually create the package list by listing package names or using 
> **make**
> macros to manipulate the default package list ``$(PTX_PACKAGES_INSTALL)``.
>  
> -   To add a single custom package, extra packages can be uses. An extra 
> package
> +   To add a single custom package, extra packages can be used. An extra 
> package
> is not added to ``$(PTX_PACKAGES_INSTALL)``. It is created by modifying 
> the
> package rule like this:
>  
> @@ -93,7 +93,7 @@ The final steps are highly hardware dependent. In some 
> cases a bootloader
>  image and a rootfs are all that is needed.
>  
>  To boot from SD-Card a disk image including bootloader, partition table and
> -rootfs is needed. The ``image-genimage`` template can be uses again to
> +rootfs is needed. The ``image-genimage`` template can be used again to
>  create such an image for each variant.
>  
>  .. note:: The genimage config files in ``config/images/`` are good examples
> diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst
> index 31616ac6f..6bba9db5d 100644
> --- a/doc/ref_make_variables.rst
> +++ b/doc/ref_make_variables.rst
> @@ -478,7 +478,7 @@ different.
>package then this package should be selected in the menu file.
>  
>  ``_PKGS``
> -  This is another mechanism to add files to the image. It can be uses
> +  This is another mechanism to add files to the image. It can be used
>instead of or in addition to ``_FILES``. It must be set to a list of
>ptxdist packages (the lowercase name of the packages). PTXdist will add
>the necessary dependencies.
> @@ -486,9 +486,9 @@ different.
>Note that this will not ensure that the packages are enabled or that all
>all package dependencies are satisfied. ``$(PTX_PACKAGES_INSTALL)`` can
>be used to specify all enabled packages. Or ``$(call ptx/collection,
> -  $(PTXDIST_WORKSPACE)/configs/)`` can be uses to to
> +  $(PTXDIST_WORKSPACE)/configs/)`` can be used to to
>specify the packages enabled by this collection. In both cases ``=`` must
> -  be uses instead of ``:=`` due to the makefile include order.
> +  be used instead of ``:=`` due to the makefile include order.
>  
>  ``_CONFIG``
>``genimage`` packages use this to specify the ``genimage`` configuration
> diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
> index f1a13d72f..ac2289431 100644
> --- a/rules/other/Toplevel.make
> +++ b/rules/other/Toplevel.make
> @@ -203,7 +203,7 @@ endif
>  #
>  # Pattern target to allow printing variable
>  # $(filter ..) is used to match against all existing variables so patterns
> -# containing '%' can be uses to print multiple variables.
> +# containing '%' can be used to print multiple variables.
>  # In verbose mode, '=' is printed.
>  # Trying to print undefined variables results in an error unless '-k' is
>  # used. In this case an empty value is printed.

Reviewed-by: Alexander Dahl 

Greets
Alex




Re: [ptxdist] [PATCH 2/2] Fix duplicated "to to" in texts

2024-04-09 Thread Alexander Dahl
Am Tue, Apr 09, 2024 at 09:37:45AM +0200 schrieb Markus Heidelberg:
> Signed-off-by: Markus Heidelberg 
> ---
>  doc/ref_make_variables.rst | 2 +-
>  platforms/image_ipkg.in| 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/ref_make_variables.rst b/doc/ref_make_variables.rst
> index 6bba9db5d..775ff71be 100644
> --- a/doc/ref_make_variables.rst
> +++ b/doc/ref_make_variables.rst
> @@ -486,7 +486,7 @@ different.
>Note that this will not ensure that the packages are enabled or that all
>all package dependencies are satisfied. ``$(PTX_PACKAGES_INSTALL)`` can
>be used to specify all enabled packages. Or ``$(call ptx/collection,
> -  $(PTXDIST_WORKSPACE)/configs/)`` can be used to to
> +  $(PTXDIST_WORKSPACE)/configs/)`` can be used to
>specify the packages enabled by this collection. In both cases ``=`` must
>be used instead of ``:=`` due to the makefile include order.
>  
> diff --git a/platforms/image_ipkg.in b/platforms/image_ipkg.in
> index 106a3cb77..11ddaa9d1 100644
> --- a/platforms/image_ipkg.in
> +++ b/platforms/image_ipkg.in
> @@ -30,7 +30,7 @@ menuconfig IMAGE_IPKG_SIGN_OPENSSL
>   select HOST_OPENSSL
>   prompt "sign ipkg-repository with openssl"
>   help
> -   Use openssl to to sign the Packages file in the package
> +   Use openssl to sign the Packages file in the package
> repository.

Reviewed-by: Alexander Dahl 

Greets
Alex




[ptxdist] [PATCH 2/2] Revert "initmethod-systemd: add more empty folders for ifupdown"

2024-04-03 Thread Alexander Dahl
Scripts in those folders not considered anymore since busybox 1.21.0
(ptxdist-2013.06.0).

This reverts commit 09e94f459f26c5784a0440cb946fc97fc53f5879.

Signed-off-by: Alexander Dahl 
---
 rules/initmethod-systemd.make | 2 --
 1 file changed, 2 deletions(-)

diff --git a/rules/initmethod-systemd.make b/rules/initmethod-systemd.make
index be2a31817..8701a6bc1 100644
--- a/rules/initmethod-systemd.make
+++ b/rules/initmethod-systemd.make
@@ -48,10 +48,8 @@ ifdef PTXCONF_INITMETHOD_SYSTEMD_IFUPDOWN
@$(call install_alternative, initmethod-systemd, 0, 0, 0644, 
/etc/network/interfaces)
@$(call install_copy, initmethod-systemd, 0, 0, 0755, 
/etc/network/if-down.d)
@$(call install_copy, initmethod-systemd, 0, 0, 0755, 
/etc/network/if-up.d)
-   @$(call install_copy, initmethod-systemd, 0, 0, 0755, 
/etc/network/if-pre-down.d)
@$(call install_copy, initmethod-systemd, 0, 0, 0755, 
/etc/network/if-post-down.d)
@$(call install_copy, initmethod-systemd, 0, 0, 0755, 
/etc/network/if-pre-up.d)
-   @$(call install_copy, initmethod-systemd, 0, 0, 0755, 
/etc/network/if-post-up.d)
 endif
 
@$(call install_finish,initmethod-systemd)
-- 
2.39.2




[ptxdist] [PATCH 1/2] Revert "initmethod-bbinit: add more empty folders for ifupdown"

2024-04-03 Thread Alexander Dahl
Scripts in those folders not considered anymore since busybox 1.21.0
(ptxdist-2013.06.0).

This reverts commit eb2d9e63ae110b7f3069307ee89a4d281f12d118.

Signed-off-by: Alexander Dahl 
---
 rules/initmethod-bbinit.make | 2 --
 1 file changed, 2 deletions(-)

diff --git a/rules/initmethod-bbinit.make b/rules/initmethod-bbinit.make
index 75d381e29..4ae5c3284 100644
--- a/rules/initmethod-bbinit.make
+++ b/rules/initmethod-bbinit.make
@@ -59,10 +59,8 @@ ifdef PTXCONF_INITMETHOD_BBINIT_ETC_INITD_NETWORKING
@$(call install_alternative, initmethod-bbinit, 0, 0, 0644, 
/etc/network/interfaces, n)
@$(call install_copy, initmethod-bbinit, 0, 0, 0755, 
/etc/network/if-down.d)
@$(call install_copy, initmethod-bbinit, 0, 0, 0755, 
/etc/network/if-up.d)
-   @$(call install_copy, initmethod-bbinit, 0, 0, 0755, 
/etc/network/if-pre-down.d)
@$(call install_copy, initmethod-bbinit, 0, 0, 0755, 
/etc/network/if-post-down.d)
@$(call install_copy, initmethod-bbinit, 0, 0, 0755, 
/etc/network/if-pre-up.d)
-   @$(call install_copy, initmethod-bbinit, 0, 0, 0755, 
/etc/network/if-post-up.d)
 endif
 
 ifdef PTXCONF_INITMETHOD_BBINIT_ETC_INITD_RT_SET_BANDWIDTH
-- 
2.39.2




[ptxdist] [PATCH 0/2] ifupdown: Remove not used hook folders again

2024-04-03 Thread Alexander Dahl
After putting a script in /etc/network/if-post-up.d and wondering why it
was not executed I found myself in a strange rabbit hole.

busybox added support for the folders post-up and pre-down with 1.20.0
and according to the two patches reverted now, complained when those
where missing.  So after upgrading to busybox 1.20.1 for
ptxdist-2012.07.0 those folders where created from ptxdist-2012.08.0
onwards.

That busybox feature seemed to be incompatible with how Debian ifupdown
(the original one) handles things, which considers those folders as
aliases only.  The claim "Treat post-up and pre-down as aliases for up
and down." is probably only related to things you can set in file
/etc/network/interfaces per interface, so post-up and pre-down probably
work from interfaces but not from hook folders.  The Debian manpage also
says this:

> Please note that as post-up and pre-down are aliases, no files in the
> corresponding directories are processed.  Please use if-up.d and
> if-down.d directories instead.

So busybox 1.21.0 removed executing scripts from post-up and pre-down
folders again, without explicitly making that clear, only stating it
would improve compatibility to Debian.  With busybox 1.21.0 those
warnings where gone again if those folders are not present, so from the
hook script point of view everything as before 1.20.0.

That update to busybox 1.21.0 came with ptxdist-2013.07.0 one year later
and from then on we had two useless folders.  Removing those now to
avoid further confusion.

Link: 
https://git.busybox.net/busybox/commit/?id=dd82443b92d7f5570fddc2eaeb634f1f971d
Link: 
https://git.busybox.net/busybox/commit/?id=3a9365e2732f5df2cdef758bc1f6e5e9da8fbcef

Alexander Dahl (2):
  Revert "initmethod-bbinit: add more empty folders for ifupdown"
  Revert "initmethod-systemd: add more empty folders for ifupdown"

 rules/initmethod-bbinit.make  | 2 --
 rules/initmethod-systemd.make | 2 --
 2 files changed, 4 deletions(-)


base-commit: e7e42d3b81e1244a33533b9c7a6e41d8da5d7769
-- 
2.39.2




Re: [ptxdist] [PATCH v2] lighttpd: Version bump, 1.4.72 -> 1.4.74

2024-03-12 Thread Alexander Dahl
Hello Andreas,

Am Fri, Mar 08, 2024 at 01:09:33PM +0100 schrieb Andreas Helmcke:
> Mainly Bugfixes
> 
> Link: https://www.lighttpd.net/2024/2/19/1.4.74/
> Link: https://www.lighttpd.net/2023/10/30/1.4.73/
> 
> Removed no longer needed option LIGHTTPD_WEDAV_LOCKS
> 
> Signed-off-by: Andreas Helmcke 
> ---
>  v2: removed LIGHTTPD_WEDAV_LOCKS
> 
>  rules/lighttpd.in   | 7 ---
>  rules/lighttpd.make | 7 +++
>  2 files changed, 3 insertions(+), 11 deletions(-)
> 
> diff --git a/rules/lighttpd.in b/rules/lighttpd.in
> index 18dd8ab4e..b782307f4 100644
> --- a/rules/lighttpd.in
> +++ b/rules/lighttpd.in
> @@ -13,7 +13,6 @@ menuconfig LIGHTTPD
> select LIBPCRE  if LIGHTTPD_PCRE
> select LIBXML2  if LIGHTTPD_WEBDAV_PROPS
> select SQLITE   if LIGHTTPD_WEBDAV_PROPS
> -   select LIBUUID  if LIGHTTPD_WEBDAV_LOCKS
> select OPENSSL  if LIGHTTPD_OPENSSL
> select LUA  if LIGHTTPD_LUA
> select LUA_INSTALL_LIBLUA   if LIGHTTPD_LUA
> @@ -159,12 +158,6 @@ config LIGHTTPD_WEBDAV_PROPS
> help
>   properties in mod_webdav
> -config LIGHTTPD_WEBDAV_LOCKS
> -   bool
> -   select LIGHTTPD_WEBDAV_PROPS
> -   prompt "locks in mod_webdav"
> -   help
> - locks in mod_webdav
>  endif
>  config LIGHTTPD_MOD_EXTRA

Patch does not apply on master here, it looks like there are some
empty lines missing here?  At least there are empty lines around those
blocks in rules/lighttpd.in but not in your diff.  Strange.

> diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> index 40d59c346..96382b86a 100644
> --- a/rules/lighttpd.make
> +++ b/rules/lighttpd.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
>  #
>  # Paths and names
>  #
> -LIGHTTPD_VERSION   := 1.4.72
> -LIGHTTPD_MD5   := 466f9fe131cd7d38d0fe47d2e6a2939d
> +LIGHTTPD_VERSION   := 1.4.74
> +LIGHTTPD_MD5   := f38c400232151c69cc608fca35e593a9
>  LIGHTTPD   := lighttpd-$(LIGHTTPD_VERSION)
>  LIGHTTPD_SUFFIX:= tar.xz
>  LIGHTTPD_URL   := 
> http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
> @@ -72,8 +72,7 @@ LIGHTTPD_CONF_OPT := \
> --$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_PROPS)-webdav-props \
> --$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_PROPS)-libxml \
> --$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_PROPS)-sqlite \
> -   --$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_LOCKS)-webdav-locks \
> -   --$(call ptx/wwo, PTXCONF_LIGHTTPD_WEBDAV_LOCKS)-uuid \
> +   --without-webdav-locks \
> --without-xxhash \
> --without-maxminddb \
> --$(call ptx/wwo, PTXCONF_LIGHTTPD_LUA)-lua

When applying those changes manually, build and run on armv5te target
works fine on first sight, so you might add my

Tested-by: Alexander Dahl 

Greets
Alex




Re: [ptxdist] setting from localsetup differing from setup not honoured

2024-02-20 Thread Alexander Dahl
Hello Michael,

Am Tue, Feb 20, 2024 at 09:55:39AM +0100 schrieb Michael Olbrich:
> Hi,
> 
> On Tue, Feb 20, 2024 at 09:14:58AM +0100, Alexander Dahl wrote:
> > currently tinkering with bootloaders and wondered why at91bootstrap 4
> > _always_ printed '2020-08-01 00:00:00' as build time, although I had set
> > PTXCONF_SETUP_DISABLE_REPRODUCIBLE with `ptxdist localsetup`?
> > 
> > Turns out PTXDIST_BUILD_TIMESTAMP is set correctly if
> > PTXCONF_SETUP_DISABLE_REPRODUCIBLE is set through `ptxdist setup` but
> > not if it is set through `ptxdist localsetup`.  If set through
> > localsetup `ptxdist print PTXCONF_SETUP_DISABLE_REPRODUCIBLE` gives
> > 'undefined' while it gives 'y' when set through 'setup'.
> > 
> > BSP is layered, two layers actually.  ptxdist version is still
> > 2023.05.0, but I could not find any significant changes to that
> > mechanism after that.  I'm afraid I am currently not able to provide a
> > solution for that problem, but I wanted to let you know.
> 
> I cannot reproduce this on master. 

Tried in another BSP now which already has ptxdist-2023.12.0.  Same
result, also with other variables like PTXCONF_SETUP_DEPRECATED_FATAL,
see output from a BSP on top of DistroKit master:

% cat .ptxdistrc.diff
5ff908847d27f19d31c328b51f205bf0
PTXCONF_SETUP_DEPRECATED_FATAL=y
PTXCONF_SETUP_DISABLE_REPRODUCIBLE=y
% p print PTXCONF_SETUP_DISABLE_REPRODUCIBLE
PTXCONF_SETUP_DISABLE_REPRODUCIBLE undefined
% p version
2023.12.0

> Are you running `ptxdist localsetup` and
> `ptxdist print` in the same layer? The localsetup config is only used from
> the toplevel layer, not stacked across all layers. So only
> ${PTXDIST_WORKSPACE}/.ptxdistrc.diff is used.

Yes, running from the top layer only.
Host system is Debian GNU/Linux 12 (bookworm) and my shell is zsh
(no difference from bash though).

Greets
Alex




[ptxdist] setting from localsetup differing from setup not honoured

2024-02-20 Thread Alexander Dahl
Hello everyone,

currently tinkering with bootloaders and wondered why at91bootstrap 4
_always_ printed '2020-08-01 00:00:00' as build time, although I had set
PTXCONF_SETUP_DISABLE_REPRODUCIBLE with `ptxdist localsetup`?

Turns out PTXDIST_BUILD_TIMESTAMP is set correctly if
PTXCONF_SETUP_DISABLE_REPRODUCIBLE is set through `ptxdist setup` but
not if it is set through `ptxdist localsetup`.  If set through
localsetup `ptxdist print PTXCONF_SETUP_DISABLE_REPRODUCIBLE` gives
'undefined' while it gives 'y' when set through 'setup'.

BSP is layered, two layers actually.  ptxdist version is still
2023.05.0, but I could not find any significant changes to that
mechanism after that.  I'm afraid I am currently not able to provide a
solution for that problem, but I wanted to let you know.

Greets
Alex




Re: [ptxdist] [PATCH] u-boot: Allow specification of padding byte for custom env images

2024-02-15 Thread Alexander Dahl
Hello Sebastian,

regarding your patch itself, please check indentation in Kconfig help.
Maybe run `ptxdist lint` before submitting, IIRC that problem is
checked by the linter.  The indentation is strange there with tabs
first and two spaces then.

(more comments below)

Am Mon, Feb 05, 2024 at 09:49:16PM +0100 schrieb Sebastian Muxel:
> Hello
> 
> > Just curious. In what situation would you need to alter the default
> > padding bytes? 0xff suits most (if not all) NVM types. Flash transition
> > layers usually just give an illusion of the traditional zero:ed block on
> > flash to block translation?
> 
> I had to tweak it to 0x00 after noticing that the env image generated by
> our vendor supplied SDK has specified it in it's make process. Keeping
> it at 0xFF wouldn't allow me to generate a firmware image. It could likely
> be that it's a hard requirement of their image generation/flashing tool?

Interesting.  So this env image does not stay standalone, but will be
integrated in some other packaging?  I'm pretty sure U-Boot itself
does not care about those padding bytes at runtime.  Maybe it's a
thing the flashing tool checks?

> I honestly haven't put much further thought into it and assumed it's due
> to the way NAND erasure works

Probably not.  If you let a raw NAND flash chip erase itself with the
proper command, you get all 0xFF afterwards.  An intelligent flash
tool would recognize larger blocks of 0xFF in an image and then just
not touch the flash in that areas.  Writing 0xFF on already erased
blocks gains nothing.  Writing non 0xFF padding is just useless write
operations and will only decrease the lifetime of the flash.

Greets
Alex



[ptxdist] [PATCH 0/5] FIT images with U-Boot and barebox on recent DistroKit

2024-02-02 Thread Alexander Dahl
Hei hei,

I'm working on something I need FIT images for in a BSP which is an
upper layer on top of DistroKit.  That task is not complete and will
have to wait until after my holidays, but I want to share things I found
on the way nonetheless.

Please review carefully.

Patch 1 is updating help text of kernel-fit rule Kconfig menu.

Patch 2 adapts the kernel-fit rule to generate a FIT image with a
generic kernel which can be booted by U-Boot.

Patch 3 fixes the default path in blspec-entry once all the .dtb are not
in /boot anymore but included in the FIT image.

Patch 4 fixes a minor annoyance in U-Boot rule when calling oldconfig
very often while using the non-kconfig legacy config mode (e.g. for a
defconfig).

Patch 5 fixes a field passed to the env used in the image-rauc package …
I wonder how this could ever work in DistroKit before?

So it's stuff all around the tree, and I have more fixes here, which I
could not prepare for sending, will do that later.

Greets
Alex

Alexander Dahl (5):
  kernel-fit: Review help text
  kernel-fit: Allow using 'kernel_noload' as sub-image type
  blspec-entry: Fix kernel entry for FIT image
  u-boot: Avoid hooking oldconfig if kconfig is not selected
  image-rauc: Fix quotation marks / whitespace handling

 platforms/kernel-fit.in| 26 ++
 rules/blspec-entry.make|  2 +-
 rules/image-rauc.make  |  2 +-
 rules/u-boot.make  |  2 ++
 scripts/lib/ptxd_make_fit_image.sh | 20 +++-
 scripts/migrate/migrate_platform   |  2 +-
 6 files changed, 42 insertions(+), 12 deletions(-)


base-commit: 69a17d3e7d14510f4aff738f8efd6c47c76c0d0c
-- 
2.39.2




[ptxdist] [PATCH 4/5] u-boot: Avoid hooking oldconfig if kconfig is not selected

2024-02-02 Thread Alexander Dahl
Calling `ptxdist oldconfig u-boot` (or `ptxdist oldconfig all`) makes
only sense if the package actually uses Kconfig.  If it does not, you
probably got an at best annoying error message of a missing u-boot
.config in your BSP.

Fixes: 44e565de9b2d ("u-boot: Add option to use Kconfig based configuration")
Signed-off-by: Alexander Dahl 
---
 rules/u-boot.make | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rules/u-boot.make b/rules/u-boot.make
index cadca4a6b..4bc7f3f78 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -214,7 +214,9 @@ $(STATEDIR)/u-boot.clean:
 # oldconfig / menuconfig
 # 
 
+ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_KCONFIG
 u-boot_oldconfig u-boot_menuconfig u-boot_nconfig: $(STATEDIR)/u-boot.extract
@$(call world/kconfig, U_BOOT, $(subst u-boot_,,$@))
+endif
 
 # vim: syntax=make
-- 
2.39.2




[ptxdist] [PATCH 3/5] blspec-entry: Fix kernel entry for FIT image

2024-02-02 Thread Alexander Dahl
The path prefix '/boot' should be added either when assigning
BLSPEC_KERNEL_IMAGE or when replacing @KERNEL@, but not in both cases.
Results in wrong paths like this otherwise:

linux   /boot//boot/linux.fit

Fixes: 0cfba65d15e6 ("image-kernel-fit: Add package")
Signed-off-by: Alexander Dahl 
---
 rules/blspec-entry.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/blspec-entry.make b/rules/blspec-entry.make
index 7523009f6..442159401 100644
--- a/rules/blspec-entry.make
+++ b/rules/blspec-entry.make
@@ -30,7 +30,7 @@ endif
 BLSPEC_ENTRY_LICENSE   = ignore
 
 ifdef PTXCONF_KERNEL_FIT
-BLSPEC_KERNEL_IMAGE= /boot/linux.fit
+BLSPEC_KERNEL_IMAGE= linux.fit
 else
 BLSPEC_KERNEL_IMAGE= $(KERNEL_IMAGE)
 endif
-- 
2.39.2




[ptxdist] [PATCH 1/5] kernel-fit: Review help text

2024-02-02 Thread Alexander Dahl
Fixed typos, mismatched case, and the variable name changed with commit
f50cd1449e93 ("rework device-tree handling").  The double underscore in
the migrate script help text was probably just a typo in the change back
then.

Signed-off-by: Alexander Dahl 
---
 platforms/kernel-fit.in  | 9 +
 scripts/migrate/migrate_platform | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/platforms/kernel-fit.in b/platforms/kernel-fit.in
index b5f878354..0e82889b9 100644
--- a/platforms/kernel-fit.in
+++ b/platforms/kernel-fit.in
@@ -9,10 +9,11 @@ menuconfig KERNEL_FIT
select IMAGE_ROOT_CPIO  if KERNEL_FIT_INITRAMFS
prompt "Generate images/linuximage.fit"
help
- Generate a FIT image from the kernel image. This will contain
- the Kernel image and all device trees in PTXCONF_DTC_OFTREE_DTS.
- Configurations are provided for each device tree together witt
- the Kernel image.
+ Generate a FIT image from the kernel image.
+ This will contain the kernel image and all device trees in
+ PTXCONF_KERNEL_DTS.
+ Configurations are provided for each device tree together with
+ the kernel image.
 
 if KERNEL_FIT
 
diff --git a/scripts/migrate/migrate_platform b/scripts/migrate/migrate_platform
index c75705f3a..f7432bc1c 100755
--- a/scripts/migrate/migrate_platform
+++ b/scripts/migrate/migrate_platform
@@ -46,7 +46,7 @@ s/^\(\(# \)\?PTXCONF_TF_A_PLATFORM\>\)\(.*$\)/\1S\3/
 # from   : ptxdist-2020.07.0
 # to : ptxdist-2020.08.0
 # symbol : PTXCONF_DTC -> PTXCONF_KERNEL_DTB
-# symbol : PTXCONF_DTC_OFTREE_DTS{,_PATH} -> PTXCONF_KERNEL__DTS{,_PATH}
+# symbol : PTXCONF_DTC_OFTREE_DTS{,_PATH} -> PTXCONF_KERNEL_DTS{,_PATH}
 # reason : dtc package removed. Devicetrees are built and installed with the 
kernel
 #
 s/^\(\(# \)\?PTXCONF\)_DTC\>\(.*$\)/\1_KERNEL_DTB\3/
-- 
2.39.2




[ptxdist] [PATCH 2/5] kernel-fit: Allow using 'kernel_noload' as sub-image type

2024-02-02 Thread Alexander Dahl
Multi platform kernels built by the kernel-fit rule before are not
usable in U-Boot, which adheres more strictly to the Flat Image Tree
(FIT) spec than barebox does.  For image sub-type 'kernel' U-Boot
expects valid 'load' and 'entry' addresses.  Setting those addresses to
a generic value is impossible however for generic kernels, e.g. the
DistroKit v7a kernel needs different addresses on at91 SAMA5 than
on i.MX6.  barebox circumvents this by ignoring missing 'load' and
'entry' addresses and finding a suitable address by itself.  For using
generic kernels in U-Boot you need sub-image type 'kernel_noload' and
dummy addresses, which is also supported in barebox from v2024.01.0
release onwards.

Link: 
https://github.com/open-source-firmware/flat-image-tree/releases/download/v0.8/fit-specification-v0.8.pdf
Link: 
https://lore.barebox.org/barebox/20231129203106.2417486-1-a.fat...@pengutronix.de/
Signed-off-by: Alexander Dahl 
---
 platforms/kernel-fit.in| 17 +
 scripts/lib/ptxd_make_fit_image.sh | 20 +++-
 2 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/platforms/kernel-fit.in b/platforms/kernel-fit.in
index 0e82889b9..5b160c57d 100644
--- a/platforms/kernel-fit.in
+++ b/platforms/kernel-fit.in
@@ -17,14 +17,31 @@ menuconfig KERNEL_FIT
 
 if KERNEL_FIT
 
+config KERNEL_FIT_NOLOAD
+   bool
+   prompt "Sub-image type 'kernel_noload'"
+   help
+ Use 'kernel_noload' as sub-image type for the kernel, setting
+ the load address and entry address to dummy values as required
+ by the FIT image specification.
+ Useful for booting kernels supporting multiple boards with
+ U-Boot, e.g. the platform-v7a kernel of DistroKit.
+ U-Boot supports this since release v2011.12.
+
+ Note: barebox added support with release v2024.01.0.
+ You can leave this option disabled if you only use barebox.
+ You should not enable this if you use older barebox versions.
+
 config KERNEL_FIT_LOAD
string
+   depends on !KERNEL_FIT_NOLOAD
prompt "Kernel load address (optional)"
help
  Required by most bootloaders. Optional for Barebox.
 
 config KERNEL_FIT_ENTRY
string
+   depends on !KERNEL_FIT_NOLOAD
prompt "Kernel entry address (optional)"
help
  Required by most bootloaders. Optional for Barebox.
diff --git a/scripts/lib/ptxd_make_fit_image.sh 
b/scripts/lib/ptxd_make_fit_image.sh
index dd0f63b7b..4b99e6fbf 100644
--- a/scripts/lib/ptxd_make_fit_image.sh
+++ b/scripts/lib/ptxd_make_fit_image.sh
@@ -19,20 +19,30 @@ ptxd_make_image_fit_its() {
kernel {
description = "kernel";
data = /incbin/("${image_kernel}");
-   type = "kernel";
arch = "$(ptxd_get_ptxconf PTXCONF_ARCH_STRING)";
os = "linux";
compression = "none";
 EOF
-if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)" ]; then
+if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_NOLOAD)" ]; then
 cat << EOF
+   type = "kernel_noload";
+   load = <0x>;
+   entry = <0x>;
+EOF
+else
+cat << EOF
+   type = "kernel";
+EOF
+if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)" ]; then
+cat << EOF
load = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_LOAD)>;
 EOF
-fi
-if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)" ]; then
-cat << EOF
+fi
+if [ -n "$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)" ]; then
+cat << EOF
entry = <$(ptxd_get_ptxconf PTXCONF_KERNEL_FIT_ENTRY)>;
 EOF
+fi
 fi
 cat << EOF
hash-1 {
-- 
2.39.2




[ptxdist] [PATCH 5/5] image-rauc: Fix quotation marks / whitespace handling

2024-02-02 Thread Alexander Dahl
If you had set
PTXCONF_IMAGE_RAUC_DESCRIPTION="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT}"
like DistroKit-2023.12.0 does, target update.raucb failed with
'command not found' because of wrong quoting and interpreting parts of
PTXCONF_IMAGE_RAUC_DESCRIPTION as command.

Signed-off-by: Alexander Dahl 
---
 rules/image-rauc.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/image-rauc.make b/rules/image-rauc.make
index e267e78c6..def2ade1e 100644
--- a/rules/image-rauc.make
+++ b/rules/image-rauc.make
@@ -56,7 +56,7 @@ IMAGE_RAUC_ENV= \
RAUC_BUNDLE_FORMAT=$(IMAGE_RAUC_BUNDLE_FORMAT) \
RAUC_BUNDLE_VERSION="$(call remove_quotes, 
$(PTXCONF_RAUC_BUNDLE_VERSION))" \
RAUC_BUNDLE_BUILD=$(call ptx/sh, date +%FT%T%z) \
-   RAUC_BUNDLE_DESCRIPTION=$(PTXCONF_IMAGE_RAUC_DESCRIPTION) \
+   RAUC_BUNDLE_DESCRIPTION="$(call remove_quotes, 
$(PTXCONF_IMAGE_RAUC_DESCRIPTION))" \
$(IMAGE_RAUC_ENV_HOOK) \
RAUC_KEY="$(shell cs_get_uri update)" \
RAUC_CERT="$(shell cs_get_uri update)" \
-- 
2.39.2




[ptxdist] [PATCH] treewide: Let codespell fix some spelling errors

2024-01-31 Thread Alexander Dahl
Command run: `codespell -w -i3 platforms/*.in rules/*.in`

Signed-off-by: Alexander Dahl 
---
 platforms/at91bootstrap.in   | 2 +-
 platforms/at91bootstrap2.in  | 2 +-
 platforms/grub.in| 2 +-
 rules/dtc.in | 2 +-
 rules/easy-rsa.in| 2 +-
 rules/glibc.in   | 4 ++--
 rules/graphics_and_multimedia.in | 2 +-
 rules/grpc.in| 2 +-
 rules/libusb-compat.in   | 2 +-
 rules/linux-firmware.in  | 2 +-
 rules/project-name.in| 2 +-
 rules/pulseaudio.in  | 2 +-
 rules/systemd.in | 2 +-
 rules/xorg-font-cursor-misc.in   | 2 +-
 14 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/platforms/at91bootstrap.in b/platforms/at91bootstrap.in
index 1e7c7901d..427970c11 100644
--- a/platforms/at91bootstrap.in
+++ b/platforms/at91bootstrap.in
@@ -18,7 +18,7 @@ menuconfig AT91BOOTSTRAP
  then jumps to it.
 
  It is required for these microcontrollers, because the bootROM of some
- of these cores can only handle a miximum of 4kB of the 1st stage
+ of these cores can only handle a maximum of 4kB of the 1st stage
  bootloader (e.g. SRAM limits). U-boot is usually much larger
  than this.
 
diff --git a/platforms/at91bootstrap2.in b/platforms/at91bootstrap2.in
index b64947a6a..0821f70a8 100644
--- a/platforms/at91bootstrap2.in
+++ b/platforms/at91bootstrap2.in
@@ -21,7 +21,7 @@ menuconfig AT91BOOTSTRAP2
  then jumps to it.
 
  It is required for these microcontrollers, because the bootROM of some
- of these cores can only handle a miximum of 4kB of the 1st stage
+ of these cores can only handle a maximum of 4kB of the 1st stage
  bootloader (e.g. SRAM limits). U-boot is usually much larger
  than this.
 
diff --git a/platforms/grub.in b/platforms/grub.in
index afa643d3a..45e776667 100644
--- a/platforms/grub.in
+++ b/platforms/grub.in
@@ -170,7 +170,7 @@ config GRUB_3C503_SHMEM
 
 config GRUB_3C503_AUI
bool
-   prompt "use AUI by deault"
+   prompt "use AUI by default"
depends on GRUB_3C503
help
  use AUI by default on 3c503 cards
diff --git a/rules/dtc.in b/rules/dtc.in
index e6d0b84d5..def824b96 100644
--- a/rules/dtc.in
+++ b/rules/dtc.in
@@ -5,7 +5,7 @@ menuconfig DTC
select HOST_FLEX
help
  Device Tree Compiler (dtc) toolchain. While dtc itself is
- occasionally needed for device tree manipulaton on the
+ occasionally needed for device tree manipulation on the
  target, libfdt may be required.
 
 if DTC
diff --git a/rules/easy-rsa.in b/rules/easy-rsa.in
index 282fb9afd..5069a0e96 100644
--- a/rules/easy-rsa.in
+++ b/rules/easy-rsa.in
@@ -14,4 +14,4 @@ config EASY_RSA
  lists (CRL). This is for people which don't know how to generate
  all PKI files with openssl tool. Additional this is for people which
  have a enough less paranoia to generate keys on an embedded device.
- The easy-rsa scripts will be placed at /usr/share/easy-rsa aferwards.
+ The easy-rsa scripts will be placed at /usr/share/easy-rsa afterwards.
diff --git a/rules/glibc.in b/rules/glibc.in
index 03847b2be..d713b2d15 100644
--- a/rules/glibc.in
+++ b/rules/glibc.in
@@ -13,7 +13,7 @@ config GLIBC_Y2038
bool
prompt "enable Y2038 support"
help
- Build the BSP with _TIME_BITS=64 to support dates beyound
+ Build the BSP with _TIME_BITS=64 to support dates beyond
  2038-01-19 03:14:07.
 
 comment"Install options"
@@ -33,7 +33,7 @@ config GLIBC_2_38
prompt "glibc-2.38 or later"
help
  In glibc-2.38 libcrypt was deprecated and removed afterwards.
- So libxcrypt is needed to provide the libcrypt implmentation.
+ So libxcrypt is needed to provide the libcrypt implementation.
 
 config GLIBC_LD
bool
diff --git a/rules/graphics_and_multimedia.in b/rules/graphics_and_multimedia.in
index 119bc46a0..8e88818c7 100644
--- a/rules/graphics_and_multimedia.in
+++ b/rules/graphics_and_multimedia.in
@@ -5,7 +5,7 @@ menuconfig MENU_XORG_FONTS
prompt "fonts "
help
  These fonts can be used with an x-server, standalone directfb or
- gtk ontop of directfb.
+ gtk on top of directfb.
 
 if MENU_XORG_FONTS
 
diff --git a/rules/grpc.in b/rules/grpc.in
index 805b3bc3b..6991fe18d 100644
--- a/rules/grpc.in
+++ b/rules/grpc.in
@@ -22,7 +22,7 @@ menuconfig GRPC
  call (RPC) framework.
 
  STAGING: remove in PTXdist 2024.03.0
- Not realy maintained in PTXdist, fails to build on some
+ Not really maintained in PTXdist, fails to build on some
  architectures and with gcc 12 and
  TARGET_HARDEN_GLIBCXX_ASSERTIONS. Needs updating to new versio

Re: [ptxdist] [RFC PATCH 0/1] building qmake based target packages

2023-11-20 Thread Alexander Dahl
Hello Michael,

Am Fri, Nov 10, 2023 at 08:51:01AM +0100 schrieb Michael Olbrich:
> On Tue, Oct 17, 2023 at 01:35:14PM +0200, Alexander Dahl wrote:
> > Hello everyone,
> > 
> > I currently have some kind of weird requirement: building a target
> > package with qmake, but not linking against Qt.  It's a fork of RTKlib
> > which is itself a university project (with hand written makefiles, but
> > not for the part I'm interested in):
> > 
> > https://github.com/rtklibexplorer/RTKLIB/releases/tag/b34h
> > 
> > I actually achieved building it with the attached make rule.  Note it
> > has a dependency to QT5, but I had to manually add the Qt mkspec file
> > ptxdist creates as an option to the _CONF_OPT variable.
> > 
> > Two things are bad about this:
> > 
> > 1.) I don't think it should be necessary to let the make rule set the
> > correct mkspec file.  There is only one and IMHO ptxdist should handle
> > this internally if CONF_TOOL is qmake?
> 
> I'm pretty sure you're calling the wrong qmake here. You need to modify
> PATH the same way e.g. rules/qwt5.make does.

This works, thanks.

(If not setting that, the qmake of my host system was taken.  Double
checked that by removing that qmake for now.)

> > 2.) rather large Qt libraries are installed to the target now.  I guess
> > I might be able to avoid this by setting 'select QT5 if BUILDTIME' in
> > the in rule, but I would have expected HOST_QT5 to be sufficient.  This
> > does not work however for two reasons: a) ptxdist complains it needs QT5
> > if CONF_TOOL is qmake and b) if I only select HOST_QT5 that mkspec is
> > not generated.
> 
> Do you need qmake from qt5 or would qt6 work as well? We already have a
> host-qt6 package and if we build the binary there and split out the qmake
> config stuff from qt6 into a new cross-qmake package.

Tested with 'select QT5' and 'select QT6' now and both work.
Only doing 'select HOST_QT5' or 'HOST_QT6' yields this:

[ 35/171] started : rtklib-demo5.prepare

ptxdist: error: 'rtklib-demo5' uses 'qmake' but does not select 'qt5' or 
'qt6'

(With ptxdist-2023.03.0 at least.)

> It would need to copy the mkspecs from the host package I think before
> adding the custom mkspecs stuff.

This is not yet in place, right?  At least I could not see any related
changes between ptxdist-2023.05.0 and master.

Greets
Alex

> 
> Michael
> 
> > I saw ptxdist having nearly zero packages selecting QT5, and none
> > requiring HOST_QT5 (?) so it's difficult to learn from examples here.
> > Maybe this usecase is quite esoteric?  Don't know.
> > 
> > In the end I would only need qmake, nothing more.  That one generates a
> > Makefile which is then used to compile the package.
> > 
> > Would take directions to improve ptxdist for qmake based packages.
> > 
> > Greets
> > Alex
> > 
> > Alexander Dahl (1):
> >   WIP: rtklib-demo5: Add new package
> > 
> >  rules/rtklib-demo5.in   | 23 
> >  rules/rtklib-demo5.make | 58 +
> >  2 files changed, 81 insertions(+)
> >  create mode 100644 rules/rtklib-demo5.in
> >  create mode 100644 rules/rtklib-demo5.make
> > 
> > 
> > base-commit: 90875f8af4f6f1dd9f8eda71df8e8a90866f9839
> > -- 
> > 2.30.2
> > 
> > 
> > 
> 
> -- 
> Pengutronix e.K.   | |
> Steuerwalder Str. 21   | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany  | Phone: +49-5121-206917-0|
> Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |



Re: [ptxdist] [PATCH] sshpass: fix a few typos in help text

2023-11-17 Thread Alexander Dahl
Hello Michael,

Am Fri, Nov 17, 2023 at 03:50:55PM +0100 schrieb Michael Tretter:
> Signed-off-by: Michael Tretter 
> ---
>  rules/sshpass.in | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/rules/sshpass.in b/rules/sshpass.in
> index b855016e2340..7c5fc5786e6d 100644
> --- a/rules/sshpass.in
> +++ b/rules/sshpass.in
> @@ -4,13 +4,13 @@ config SSHPASS
>   tristate
>   prompt "sshpass"
>   help
> -   Sshpass is a tool for non-interactivly performing password
> +   sshpass is a tool for non-interactively performing password
> authentication with SSH's so called "interactive keyboard
> password authentication".
> Most user should use SSH's more secure public key
> -   authentiaction instead.
> +   authentication instead.
>  
> -   SECURITY NOTE: There is a reason openssh insists that
> +   SECURITY NOTE: There is a reason OpenSSH insists that
> passwords be typed interactively.
> Passwords are harder to store securely and to pass around
> securely between programs.

Reviewed-by: Alexander Dahl 

Greets
Alex

> -- 
> 2.39.2
> 
> 



Re: [ptxdist] [PATCH v4] lighttpd: Version bump, 1.4.67 -> 1.4.72

2023-11-02 Thread Alexander Dahl
Hello Andreas,

Am Mon, Oct 23, 2023 at 02:21:13PM +0200 schrieb Andreas Helmcke:
> Bugfixes and several changes. e.g.
> - Stronger TLS defaults
> - HTTP/2 Support now as optional module
> - Some former modules are now build in
> 
> Link: https://www.lighttpd.net/2023/1/3/1.4.68/
> Link: https://www.lighttpd.net/2023/2/10/1.4.69/
> Link: https://www.lighttpd.net/2023/5/10/1.4.70/
> Link: https://www.lighttpd.net/2023/5/27/1.4.71/
> Link: https://www.lighttpd.net/2023/10/6/1.4.72/
> Signed-off-by: Andreas Helmcke 

Tested-by: Alexander Dahl 

Can confirm the connection is using HTTP/2 or HTTP/1.1 depending on
the menu option now.  Looks fine.

I had to adapt my lighttpd.conf for modules which where covered by
@MODULES@ before.  This is more a migration problem however, not
directly business of this patch (never was).

Thanks and greets
Alex

> ---
>  projectroot/etc/lighttpd/lighttpd.conf |  2 ++
>  rules/lighttpd.in  | 37 +-
>  rules/lighttpd.make| 17 +---
>  3 files changed, 22 insertions(+), 34 deletions(-)
> 
> diff --git a/projectroot/etc/lighttpd/lighttpd.conf 
> b/projectroot/etc/lighttpd/lighttpd.conf
> index fa2f60e13..abd4bb66e 100644
> --- a/projectroot/etc/lighttpd/lighttpd.conf
> +++ b/projectroot/etc/lighttpd/lighttpd.conf
> @@ -13,6 +13,8 @@ server.modules  = (
>   @MODULES@
>  )
>  
> +@NOH2@server.feature-flags += ( "server.h2proto" => "disable" )
> +
>  index-file.names = ( "index.html" )
>  
>  include "conf.d/*.conf"
> diff --git a/rules/lighttpd.in b/rules/lighttpd.in
> index 910271087..18dd8ab4e 100644
> --- a/rules/lighttpd.in
> +++ b/rules/lighttpd.in
> @@ -69,13 +69,6 @@ endmenu
>  
>  menu "modules "
>  
> -config LIGHTTPD_MOD_ACCESS
> - bool
> - prompt "mod_access"
> - default y
> - help
> -   Deny access to some files.
> -
>  config LIGHTTPD_MOD_ACCESSLOG
>   bool
>   prompt "mod_accesslog"
> @@ -83,12 +76,6 @@ config LIGHTTPD_MOD_ACCESSLOG
>   help
> flexible logging of requests served
>  
> -config LIGHTTPD_MOD_ALIAS
> - bool
> - prompt "mod_alias"
> - help
> -   Specify a special document-root for a given url-subset.
> -
>  config LIGHTTPD_MOD_AUTH
>   bool
>   prompt "mod_auth"
> @@ -123,11 +110,12 @@ config LIGHTTPD_BZ2LIB
> Enable bzip2 support for mod_deflate.
>  endif
>  
> -config LIGHTTPD_MOD_FASTCGI
> +config LIGHTTPD_MOD_DIRLISTING
>   bool
> - prompt "mod_fastcgi"
> -
> -if LIGHTTPD_MOD_FASTCGI
> + prompt "mod_dirlisting"
> + default y
> + help
> +   Creates an HTML page listing the contents of the target directory.
>  
>  config LIGHTTPD_MOD_FASTCGI_PHP
>   bool
> @@ -140,7 +128,14 @@ config LIGHTTPD_MOD_FASTCGI_PHP
>  comment "PHP CGI SAPI must be enabled"
>   depends on !PHP8_SAPI_CGI
>  
> -endif
> +config LIGHTTPD_MOD_H2
> + bool
> + prompt "mod_h2"
> + default y
> + help
> +   HTTP/2 support
> +   To use lighttpd without HTTP/2 you need to disable it in the 
> configuration file:
> +  server.feature-flags += ( "server.h2proto" => "disable" )
>  
>  config LIGHTTPD_MOD_MAGNET
>   bool
> @@ -149,12 +144,6 @@ config LIGHTTPD_MOD_MAGNET
>   help
> A module to control the request handling
>  
> -config LIGHTTPD_MOD_REWRITE
> - bool
> - prompt "mod_rewrite"
> - help
> -   Module for URL rewriting
> -
>  config LIGHTTPD_MOD_WEBDAV
>   bool
>   prompt "mod_webdav"
> diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> index 3aa54a1fb..40d59c346 100644
> --- a/rules/lighttpd.make
> +++ b/rules/lighttpd.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
>  #
>  # Paths and names
>  #
> -LIGHTTPD_VERSION := 1.4.67
> -LIGHTTPD_MD5 := 64822c5061001673162cf9775d91a80b
> +LIGHTTPD_VERSION := 1.4.72
> +LIGHTTPD_MD5 := 466f9fe131cd7d38d0fe47d2e6a2939d
>  LIGHTTPD := lighttpd-$(LIGHTTPD_VERSION)
>  LIGHTTPD_SUFFIX  := tar.xz
>  LIGHTTPD_URL := 
> http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
> @@ -93,24 +93,19 @@ $(STATEDIR)/lighttpd.install:
>  # 
> 
>  
>  LIGHTTPD_MODULES-y :=
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ACCESS) 

Re: [ptxdist] [PATCH v3] lighttpd: Version bump, 1.4.67 -> 1.4.72

2023-10-19 Thread Alexander Dahl
Hello,

got it sorted out, although the experience in #lighttpd IRC channel
was not as friendly as I hoped for.  See below.

Am Thu, Oct 19, 2023 at 10:33:47AM +0200 schrieb Alexander Dahl:
> Hello Andreas,
> 
> sorry to bother you again. :-/
> 
> I just tested v3 of your patch on my target.  See below.
> 
> Am Wed, Oct 18, 2023 at 06:00:14PM +0200 schrieb Andreas Helmcke:
> > Bugfixes and several changes. e.g.
> > - Stronger TLS defaults
> > - HTTP/2 Support now as optional module
> > - Some former modules are now build in
> > 
> > Link: https://www.lighttpd.net/2023/1/3/1.4.68/
> > Link: https://www.lighttpd.net/2023/2/10/1.4.69/
> > Link: https://www.lighttpd.net/2023/5/10/1.4.70/
> > Link: https://www.lighttpd.net/2023/5/27/1.4.71/
> > Link: https://www.lighttpd.net/2023/10/6/1.4.72/
> > Signed-off-by: Andreas Helmcke 
> > ---
> >  rules/lighttpd.in   | 35 +++
> >  rules/lighttpd.make | 15 +--
> >  2 files changed, 16 insertions(+), 34 deletions(-)
> > 
> > diff --git a/rules/lighttpd.in b/rules/lighttpd.in
> > index 910271087..670a00d15 100644
> > --- a/rules/lighttpd.in
> > +++ b/rules/lighttpd.in
> > @@ -69,13 +69,6 @@ endmenu
> >  
> >  menu "modules "
> >  
> > -config LIGHTTPD_MOD_ACCESS
> > -   bool
> > -   prompt "mod_access"
> > -   default y
> > -   help
> > - Deny access to some files.
> > -
> >  config LIGHTTPD_MOD_ACCESSLOG
> > bool
> > prompt "mod_accesslog"
> > @@ -83,12 +76,6 @@ config LIGHTTPD_MOD_ACCESSLOG
> > help
> >   flexible logging of requests served
> >  
> > -config LIGHTTPD_MOD_ALIAS
> > -   bool
> > -   prompt "mod_alias"
> > -   help
> > - Specify a special document-root for a given url-subset.
> > -
> >  config LIGHTTPD_MOD_AUTH
> > bool
> > prompt "mod_auth"
> > @@ -123,11 +110,12 @@ config LIGHTTPD_BZ2LIB
> >   Enable bzip2 support for mod_deflate.
> >  endif
> >  
> > -config LIGHTTPD_MOD_FASTCGI
> > +config LIGHTTPD_MOD_DIRLISTING
> > bool
> > -   prompt "mod_fastcgi"
> > -
> > -if LIGHTTPD_MOD_FASTCGI
> > +   prompt "mod_dirlisting"
> > +   default y
> > +   help
> > + Creates an HTML page listing the contents of the target directory.
> >  
> >  config LIGHTTPD_MOD_FASTCGI_PHP
> > bool
> > @@ -140,7 +128,12 @@ config LIGHTTPD_MOD_FASTCGI_PHP
> >  comment "PHP CGI SAPI must be enabled"
> > depends on !PHP8_SAPI_CGI
> >  
> > -endif
> > +config LIGHTTPD_MOD_H2
> > +   bool
> > +   prompt "mod_h2"
> > +   default y
> > +   help
> > + HTTP/2 support
> 
> I fear we can not make this an option (yet).

If you do not load 'mod_h2', you need an additional setting in
lighttpd.conf to make lighttpd happy.  Maybe we could add that in the
help text?  Or in the commit message?  It is this one:

server.feature-flags += ( "server.h2proto" => "disable" )

> 
> >  
> >  config LIGHTTPD_MOD_MAGNET
> > bool
> > @@ -149,12 +142,6 @@ config LIGHTTPD_MOD_MAGNET
> > help
> >   A module to control the request handling
> >  
> > -config LIGHTTPD_MOD_REWRITE
> > -   bool
> > -   prompt "mod_rewrite"
> > -   help
> > - Module for URL rewriting
> > -
> >  config LIGHTTPD_MOD_WEBDAV
> > bool
> > prompt "mod_webdav"
> > diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> > index 3aa54a1fb..a7e4b05c1 100644
> > --- a/rules/lighttpd.make
> > +++ b/rules/lighttpd.make
> > @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
> >  #
> >  # Paths and names
> >  #
> > -LIGHTTPD_VERSION   := 1.4.67
> > -LIGHTTPD_MD5   := 64822c5061001673162cf9775d91a80b
> > +LIGHTTPD_VERSION   := 1.4.72
> > +LIGHTTPD_MD5   := 466f9fe131cd7d38d0fe47d2e6a2939d
> >  LIGHTTPD   := lighttpd-$(LIGHTTPD_VERSION)
> >  LIGHTTPD_SUFFIX:= tar.xz
> >  LIGHTTPD_URL   := 
> > http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
> > @@ -93,24 +93,19 @@ $(STATEDIR)/lighttpd.install:
> >  # 
> > 
> >  
> >  LIGHTTPD_MODULES-y :=
> > -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ACCESS)

Re: [ptxdist] [PATCH v3] lighttpd: Version bump, 1.4.67 -> 1.4.72

2023-10-19 Thread Alexander Dahl
Hello Andreas,

sorry to bother you again. :-/

I just tested v3 of your patch on my target.  See below.

Am Wed, Oct 18, 2023 at 06:00:14PM +0200 schrieb Andreas Helmcke:
> Bugfixes and several changes. e.g.
> - Stronger TLS defaults
> - HTTP/2 Support now as optional module
> - Some former modules are now build in
> 
> Link: https://www.lighttpd.net/2023/1/3/1.4.68/
> Link: https://www.lighttpd.net/2023/2/10/1.4.69/
> Link: https://www.lighttpd.net/2023/5/10/1.4.70/
> Link: https://www.lighttpd.net/2023/5/27/1.4.71/
> Link: https://www.lighttpd.net/2023/10/6/1.4.72/
> Signed-off-by: Andreas Helmcke 
> ---
>  rules/lighttpd.in   | 35 +++
>  rules/lighttpd.make | 15 +--
>  2 files changed, 16 insertions(+), 34 deletions(-)
> 
> diff --git a/rules/lighttpd.in b/rules/lighttpd.in
> index 910271087..670a00d15 100644
> --- a/rules/lighttpd.in
> +++ b/rules/lighttpd.in
> @@ -69,13 +69,6 @@ endmenu
>  
>  menu "modules "
>  
> -config LIGHTTPD_MOD_ACCESS
> - bool
> - prompt "mod_access"
> - default y
> - help
> -   Deny access to some files.
> -
>  config LIGHTTPD_MOD_ACCESSLOG
>   bool
>   prompt "mod_accesslog"
> @@ -83,12 +76,6 @@ config LIGHTTPD_MOD_ACCESSLOG
>   help
> flexible logging of requests served
>  
> -config LIGHTTPD_MOD_ALIAS
> - bool
> - prompt "mod_alias"
> - help
> -   Specify a special document-root for a given url-subset.
> -
>  config LIGHTTPD_MOD_AUTH
>   bool
>   prompt "mod_auth"
> @@ -123,11 +110,12 @@ config LIGHTTPD_BZ2LIB
> Enable bzip2 support for mod_deflate.
>  endif
>  
> -config LIGHTTPD_MOD_FASTCGI
> +config LIGHTTPD_MOD_DIRLISTING
>   bool
> - prompt "mod_fastcgi"
> -
> -if LIGHTTPD_MOD_FASTCGI
> + prompt "mod_dirlisting"
> + default y
> + help
> +   Creates an HTML page listing the contents of the target directory.
>  
>  config LIGHTTPD_MOD_FASTCGI_PHP
>   bool
> @@ -140,7 +128,12 @@ config LIGHTTPD_MOD_FASTCGI_PHP
>  comment "PHP CGI SAPI must be enabled"
>   depends on !PHP8_SAPI_CGI
>  
> -endif
> +config LIGHTTPD_MOD_H2
> + bool
> + prompt "mod_h2"
> + default y
> + help
> +   HTTP/2 support

I fear we can not make this an option (yet).

>  
>  config LIGHTTPD_MOD_MAGNET
>   bool
> @@ -149,12 +142,6 @@ config LIGHTTPD_MOD_MAGNET
>   help
> A module to control the request handling
>  
> -config LIGHTTPD_MOD_REWRITE
> - bool
> - prompt "mod_rewrite"
> - help
> -   Module for URL rewriting
> -
>  config LIGHTTPD_MOD_WEBDAV
>   bool
>   prompt "mod_webdav"
> diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> index 3aa54a1fb..a7e4b05c1 100644
> --- a/rules/lighttpd.make
> +++ b/rules/lighttpd.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
>  #
>  # Paths and names
>  #
> -LIGHTTPD_VERSION := 1.4.67
> -LIGHTTPD_MD5 := 64822c5061001673162cf9775d91a80b
> +LIGHTTPD_VERSION := 1.4.72
> +LIGHTTPD_MD5 := 466f9fe131cd7d38d0fe47d2e6a2939d
>  LIGHTTPD := lighttpd-$(LIGHTTPD_VERSION)
>  LIGHTTPD_SUFFIX  := tar.xz
>  LIGHTTPD_URL := 
> http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
> @@ -93,24 +93,19 @@ $(STATEDIR)/lighttpd.install:
>  # 
> 
>  
>  LIGHTTPD_MODULES-y :=
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ACCESS)  += mod_access
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ACCESSLOG)   += mod_accesslog
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ALIAS)   += mod_alias
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_AUTH)+= mod_auth
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_AUTH)+= 
> mod_authn_file
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_DEFLATE) += mod_deflate
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_FASTCGI) += mod_fastcgi
> +LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_DIRLISTING)  += mod_dirlisting
> +LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_H2)  += mod_h2

We probably need to always install mod_h2.  I turned the option off
and now I get this at runtime 
(`lighttpd -tt -f /etc/lighttpd/lighttpd.conf`):

2012-01-01 00:46:15: (plugin.c.209) dlopen() failed for: 
/usr/lib/lighttpd/mod_h2.so /usr/lib/lighttpd/mod_h2.so: cannot open shared 
object file: No such file or directory

I asked the lighttpd devs on IRC about this, but got no helpful
response yet.

Apart of that my previous configuration does not work anymore, I get
some "unknown config-key" messages in log and the webserver only
returns 403.  Have to look deeper into that, but I just wanted to get
out that mod_h2 information first.

Greets
Alex

>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_MAGNET)  += mod_magnet
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_OPENSSL) += mod_openssl
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_R

Re: [ptxdist] [PATCH] lighttpd: Version bump, 1.4.67 -> 1.4.72

2023-10-18 Thread Alexander Dahl
Hello Andreas,

Am Wed, Oct 18, 2023 at 02:25:03PM +0200 schrieb Andreas Helmcke:
> Hello Alexander,
> 
> Am 18.10.23 um 13:38 schrieb Alexander Dahl:
> > Hello Andreas,
> > 
> > Am Wed, Oct 18, 2023 at 12:53:58PM +0200 schrieb Andreas Helmcke:
> >> Hello Alexander, hello Michael,
> >>
> >> Am 18.10.23 um 07:54 schrieb Michael Olbrich:
> >>> On Tue, Oct 17, 2023 at 08:05:11AM +0200, Alexander Dahl wrote:
> >>>> Hello Andreas,
> >>>>
> >>>> first of all, thanks for taking care of this, my remarks below.
> >>>>
> >>>> Am Mon, Oct 16, 2023 at 07:07:34PM +0200 schrieb Andreas Helmcke:
> >>>>> Bugfixes and several changes. e.g.
> >>>>> - Stronger TLS defaults
> >>>>> - HTTP/2 Support now as optional module
> >>>>>
> >>>>> see: https://www.lighttpd.net/releases/
> >>>>
> >>>> Link: https://www.lighttpd.net/2023/1/3/1.4.68/
> >>>> Link: https://www.lighttpd.net/2023/2/10/1.4.69/
> >>>> Link: https://www.lighttpd.net/2023/5/10/1.4.70/
> >>>> Link: https://www.lighttpd.net/2023/5/27/1.4.71/
> >>>> Link: https://www.lighttpd.net/2023/10/6/1.4.72/
> >>
> >> thanks, changed that
> >>
> >>>>> Signed-off-by: Andreas Helmcke 
> >>>>> ---
> >>>>>  rules/lighttpd.make | 4 ++--
> >>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>>>>
> >>>>> diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> >>>>> index 3aa54a1fb..7b7abf7d2 100644
> >>>>> --- a/rules/lighttpd.make
> >>>>> +++ b/rules/lighttpd.make
> >>>>> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
> >>>>>  #
> >>>>>  # Paths and names
> >>>>>  #
> >>>>> -LIGHTTPD_VERSION   := 1.4.67
> >>>>> -LIGHTTPD_MD5   := 64822c5061001673162cf9775d91a80b
> >>>>> +LIGHTTPD_VERSION   := 1.4.72
> >>>>> +LIGHTTPD_MD5   := 466f9fe131cd7d38d0fe47d2e6a2939d
> >>>>
> >>>> Builds fine, but …
> >>>>
> >>>> That 1.4.70 in particular needs a little more work on the ptxdist
> >>>> package, because several modules are not built separate anymore, but
> >>>> built-in now.  This makes some of the LIGHTTPD_MOD_* options in menu
> >>>> not necessary anymore, and breaks targetinstall if those should have
> >>>> been installed before, e.g. like this:
> >>>>
> >>>> Error: ptxd_lib_install: cannot find library 
> >>>> 'lighttpd/mod_indexfile'!
> >>
> >> I can not (re)produce your error, but ...
> > 
> > Interesting.  It's one of the modules always installed.  Maybe we have
> > different options set?  Comes from these lines:
> > 
> > 111 # add modules that are always loaded
> > 112 LIGHTTPD_MODULES_INSTALL := mod_indexfile mod_dirlisting 
> > mod_staticfile $(LIGHTTPD_MODULES-y)
> > 
> > Please test with PTXCONF_LIGHTTPD_INSTALL_SELECTED_MODULES set and
> > not set, and compare.  I guess you will also find 'mod_staticfile'?
> 
> Yes, you are right. I didn't use the option "Only install selected modules".
> If I fix this by removing mod_indexfile and mod_staticfile (which works) only 
> mod_dirlisting remains in the list of always loaded modules.

Yes.

> So it might be a good idea to completely do without a static list of always 
> loaded 
> modules and also make mod_dirlist configurable.
> Any objections?

Fine with me, if the module is installed by default as before.

Michael added this with c37f05122341 ("lighttpd: rework options and
configuration") back in 2013 for ptxdist-2013.03.0 when reworking the
lighttpd package.  Maybe he has an opinion?

Greets
Alex

> 
> > 
> >>>> The list of affected modules is in the 1.4.70 announcement.
> >>
> >> i have cleaned up the list of modules and removed the now obsolete ones.
> >>
> >>>> With 1.4.71 HTTP/2 support is moved to a separate module however and
> >>>> no longer built-in anymore.  Should we introduce a new menu option for
> >>>> that or let the ptxdist user configure it with
> >>>> PTXCONF_LIGHTTPD_MOD_EXTRA instead?
> >>>
> >>> If it requires additional dependencies then a new option is mandatory.
> >

Re: [ptxdist] [PATCH v2] lighttpd: Version bump, 1.4.67 -> 1.4.72

2023-10-18 Thread Alexander Dahl
Hello Andreas,

before you send v3, I have some nitpicking here.  Maybe you want to
consider that, too.

Am Wed, Oct 18, 2023 at 12:55:44PM +0200 schrieb Andreas Helmcke:
> Bugfixes and several changes. e.g.
> - Stronger TLS defaults
> - HTTP/2 Support now as optional module
> - Some former modules are now build in
> 
> Link: https://www.lighttpd.net/2023/1/3/1.4.68/
> Link: https://www.lighttpd.net/2023/2/10/1.4.69/
> Link: https://www.lighttpd.net/2023/5/10/1.4.70/
> Link: https://www.lighttpd.net/2023/5/27/1.4.71/
> Link: https://www.lighttpd.net/2023/10/6/1.4.72/
> 
> Signed-off-by: Andreas Helmcke 

You can remove the empty line between Link: and Signed-off-by: – Link
is one of the tags documented in the Linux kernel submitting patches
guide.

> ---
>  rules/lighttpd.in   | 26 +++---
>  rules/lighttpd.make |  9 +++--
>  2 files changed, 6 insertions(+), 29 deletions(-)
> 
> diff --git a/rules/lighttpd.in b/rules/lighttpd.in
> index 910271087..9e2b4c97a 100644
> --- a/rules/lighttpd.in
> +++ b/rules/lighttpd.in
> @@ -69,12 +69,12 @@ endmenu
>  
>  menu "modules "
>  
> -config LIGHTTPD_MOD_ACCESS
> +config LIGHTTPD_MOD_H2
>   bool
> - prompt "mod_access"
> + prompt "mod_h2"
>   default y
>   help
> -   Deny access to some files.
> +   HTTP/2 support

Please keep the alphabetic ordering when adding new entries.

>  
>  config LIGHTTPD_MOD_ACCESSLOG
>   bool
> @@ -83,12 +83,6 @@ config LIGHTTPD_MOD_ACCESSLOG
>   help
> flexible logging of requests served
>  
> -config LIGHTTPD_MOD_ALIAS
> - bool
> - prompt "mod_alias"
> - help
> -   Specify a special document-root for a given url-subset.
> -
>  config LIGHTTPD_MOD_AUTH
>   bool
>   prompt "mod_auth"
> @@ -123,12 +117,6 @@ config LIGHTTPD_BZ2LIB
> Enable bzip2 support for mod_deflate.
>  endif
>  
> -config LIGHTTPD_MOD_FASTCGI
> - bool
> - prompt "mod_fastcgi"
> -
> -if LIGHTTPD_MOD_FASTCGI
> -
>  config LIGHTTPD_MOD_FASTCGI_PHP
>   bool
>   depends on PHP8_SAPI_CGI
> @@ -140,8 +128,6 @@ config LIGHTTPD_MOD_FASTCGI_PHP
>  comment "PHP CGI SAPI must be enabled"
>   depends on !PHP8_SAPI_CGI
>  
> -endif
> -
>  config LIGHTTPD_MOD_MAGNET
>   bool
>   select LIGHTTPD_LUA
> @@ -149,12 +135,6 @@ config LIGHTTPD_MOD_MAGNET
>   help
> A module to control the request handling
>  
> -config LIGHTTPD_MOD_REWRITE
> - bool
> - prompt "mod_rewrite"
> - help
> -   Module for URL rewriting
> -
>  config LIGHTTPD_MOD_WEBDAV
>   bool
>   prompt "mod_webdav"
> diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> index 3aa54a1fb..9ff8b3ea7 100644
> --- a/rules/lighttpd.make
> +++ b/rules/lighttpd.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
>  #
>  # Paths and names
>  #
> -LIGHTTPD_VERSION := 1.4.67
> -LIGHTTPD_MD5 := 64822c5061001673162cf9775d91a80b
> +LIGHTTPD_VERSION := 1.4.72
> +LIGHTTPD_MD5 := 466f9fe131cd7d38d0fe47d2e6a2939d
>  LIGHTTPD := lighttpd-$(LIGHTTPD_VERSION)
>  LIGHTTPD_SUFFIX  := tar.xz
>  LIGHTTPD_URL := 
> http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
> @@ -93,16 +93,13 @@ $(STATEDIR)/lighttpd.install:
>  # 
> 
>  
>  LIGHTTPD_MODULES-y :=
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ACCESS)  += mod_access
> +LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_H2)  += mod_h2

Same here, this list is sorted alphabetically, keep that.

Greets
Alex

>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ACCESSLOG)   += mod_accesslog
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_ALIAS)   += mod_alias
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_AUTH)+= mod_auth
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_AUTH)+= 
> mod_authn_file
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_DEFLATE) += mod_deflate
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_FASTCGI) += mod_fastcgi
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_MAGNET)  += mod_magnet
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_OPENSSL) += mod_openssl
> -LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_REWRITE) += mod_rewrite
>  LIGHTTPD_MODULES-$(PTXCONF_LIGHTTPD_MOD_WEBDAV)  += mod_webdav
>  LIGHTTPD_MODULES-y += $(call remove_quotes,$(PTXCONF_LIGHTTPD_MOD_EXTRA))
>  
> -- 
> 2.39.2
> 
> 



Re: [ptxdist] [PATCH] lighttpd: Version bump, 1.4.67 -> 1.4.72

2023-10-18 Thread Alexander Dahl
Hello Andreas,

Am Wed, Oct 18, 2023 at 12:53:58PM +0200 schrieb Andreas Helmcke:
> Hello Alexander, hello Michael,
> 
> Am 18.10.23 um 07:54 schrieb Michael Olbrich:
> > On Tue, Oct 17, 2023 at 08:05:11AM +0200, Alexander Dahl wrote:
> >> Hello Andreas,
> >>
> >> first of all, thanks for taking care of this, my remarks below.
> >>
> >> Am Mon, Oct 16, 2023 at 07:07:34PM +0200 schrieb Andreas Helmcke:
> >>> Bugfixes and several changes. e.g.
> >>> - Stronger TLS defaults
> >>> - HTTP/2 Support now as optional module
> >>>
> >>> see: https://www.lighttpd.net/releases/
> >>
> >> Link: https://www.lighttpd.net/2023/1/3/1.4.68/
> >> Link: https://www.lighttpd.net/2023/2/10/1.4.69/
> >> Link: https://www.lighttpd.net/2023/5/10/1.4.70/
> >> Link: https://www.lighttpd.net/2023/5/27/1.4.71/
> >> Link: https://www.lighttpd.net/2023/10/6/1.4.72/
> 
> thanks, changed that
> 
> >>> Signed-off-by: Andreas Helmcke 
> >>> ---
> >>>  rules/lighttpd.make | 4 ++--
> >>>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> >>> index 3aa54a1fb..7b7abf7d2 100644
> >>> --- a/rules/lighttpd.make
> >>> +++ b/rules/lighttpd.make
> >>> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
> >>>  #
> >>>  # Paths and names
> >>>  #
> >>> -LIGHTTPD_VERSION := 1.4.67
> >>> -LIGHTTPD_MD5 := 64822c5061001673162cf9775d91a80b
> >>> +LIGHTTPD_VERSION := 1.4.72
> >>> +LIGHTTPD_MD5 := 466f9fe131cd7d38d0fe47d2e6a2939d
> >>
> >> Builds fine, but …
> >>
> >> That 1.4.70 in particular needs a little more work on the ptxdist
> >> package, because several modules are not built separate anymore, but
> >> built-in now.  This makes some of the LIGHTTPD_MOD_* options in menu
> >> not necessary anymore, and breaks targetinstall if those should have
> >> been installed before, e.g. like this:
> >>
> >> Error: ptxd_lib_install: cannot find library 'lighttpd/mod_indexfile'!
> 
> I can not (re)produce your error, but ...

Interesting.  It's one of the modules always installed.  Maybe we have
different options set?  Comes from these lines:

111 # add modules that are always loaded
112 LIGHTTPD_MODULES_INSTALL := mod_indexfile mod_dirlisting mod_staticfile 
$(LIGHTTPD_MODULES-y)

Please test with PTXCONF_LIGHTTPD_INSTALL_SELECTED_MODULES set and
not set, and compare.  I guess you will also find 'mod_staticfile'?

> >> The list of affected modules is in the 1.4.70 announcement.
> 
> i have cleaned up the list of modules and removed the now obsolete ones.
> 
> >> With 1.4.71 HTTP/2 support is moved to a separate module however and
> >> no longer built-in anymore.  Should we introduce a new menu option for
> >> that or let the ptxdist user configure it with
> >> PTXCONF_LIGHTTPD_MOD_EXTRA instead?
> > 
> > If it requires additional dependencies then a new option is mandatory.
> > If not, then I don't really care either way. Just leave it as is I guess.
> > 
> 
> I have decided to create a new menu option because i do think, that
> this is a central/fundamental part and not some exotic stuff so it
> deserves one.

Thanks.  It's good if you can turn it off.  Might save some space for
folks who don't want HTTP/2 for whatever reason.

Greets
Alex

> 
> 
> >>>  LIGHTTPD := lighttpd-$(LIGHTTPD_VERSION)
> >>>  LIGHTTPD_SUFFIX  := tar.xz
> >>>  LIGHTTPD_URL := 
> >>> http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
> >>> -- 
> >>> 2.39.2
> >>>
> 
> Andreas
> 



[ptxdist] [RFC PATCH 1/1] WIP: rtklib-demo5: Add new package

2023-10-17 Thread Alexander Dahl
---
 rules/rtklib-demo5.in   | 23 
 rules/rtklib-demo5.make | 58 +
 2 files changed, 81 insertions(+)
 create mode 100644 rules/rtklib-demo5.in
 create mode 100644 rules/rtklib-demo5.make

diff --git a/rules/rtklib-demo5.in b/rules/rtklib-demo5.in
new file mode 100644
index 0..61b69c58c
--- /dev/null
+++ b/rules/rtklib-demo5.in
@@ -0,0 +1,23 @@
+## SECTION=system_libraries
+
+config RTKLIB_DEMO5
+   tristate
+   select QT5
+   prompt "rtklib-demo5"
+   help
+ RTKLIB Demo5 is an open source version of RTKLIB optimized for
+ low cost receivers and for practical use.
+ It includes additional solution features to deal with the
+ sometimes very challenging measurements from lower cost
+ receivers and is also optimized to work with
+ multi-constellation solutions.
+ This is a good choice for those interested in learning more
+ about GNSS technologies.
+ It is also a solid solution for almost any real-time or
+ post-processing high precision positioning needs.
+
+ This package contains the library only.
+
+ https://rtkexplorer.com
+
+# vim: ft=kconfig noet tw=72 ts=8 sw=8
diff --git a/rules/rtklib-demo5.make b/rules/rtklib-demo5.make
new file mode 100644
index 0..3f0d1fd7e
--- /dev/null
+++ b/rules/rtklib-demo5.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Alexander Dahl 
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_RTKLIB_DEMO5) += rtklib-demo5
+
+#
+# Paths and names
+#
+RTKLIB_DEMO5_VERSION   := b34h
+RTKLIB_DEMO5_MD5   := 404e8e0c98471358d203a5ab2e830098
+RTKLIB_DEMO5   := rtklib-demo5-$(RTKLIB_DEMO5_VERSION)
+# release asset "demo5_b34h.zip" did not allow clean extract
+RTKLIB_DEMO5_SUFFIX:= tar.gz
+RTKLIB_DEMO5_URL   := 
https://github.com/rtklibexplorer/RTKLIB/archive/refs/tags/$(RTKLIB_DEMO5_VERSION).$(RTKLIB_DEMO5_SUFFIX)
+RTKLIB_DEMO5_SOURCE:= $(SRCDIR)/$(RTKLIB_DEMO5).$(RTKLIB_DEMO5_SUFFIX)
+RTKLIB_DEMO5_DIR   := $(BUILDDIR)/$(RTKLIB_DEMO5)
+RTKLIB_DEMO5_SUBDIR:= src
+RTKLIB_DEMO5_LICENSE   := BSD-2-Clause
+RTKLIB_DEMO5_LICENSE_FILES := 
file://license.txt;md5=0a9df7c41dafcfa98b6372cd36eae07b
+
+# 
+# Prepare
+# 
+
+RTKLIB_DEMO5_CONF_TOOL := qmake
+# ptxdist should pass this -spec option on its own
+RTKLIB_DEMO5_CONF_OPT  :=  \
+   $(CROSS_QMAKE_OPT) \
+   -spec "$(PTXDIST_SYSROOT_TARGET)/usr/lib/qt5/mkspecs/linux-ptx-g++"
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/rtklib-demo5.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, rtklib-demo5)
+   @$(call install_fixup, rtklib-demo5,PRIORITY,optional)
+   @$(call install_fixup, rtklib-demo5,SECTION,base)
+   @$(call install_fixup, rtklib-demo5,AUTHOR,"Alexander Dahl 
")
+   @$(call install_fixup, rtklib-demo5,DESCRIPTION,missing)
+
+   @$(call install_lib, rtklib-demo5, 0, 0, 0644, libRTKLib)
+
+   @$(call install_finish, rtklib-demo5)
+
+   @$(call touch)
+
+# vim: ft=make noet tw=72 ts=8 sw=8
-- 
2.30.2




[ptxdist] [RFC PATCH 0/1] building qmake based target packages

2023-10-17 Thread Alexander Dahl
Hello everyone,

I currently have some kind of weird requirement: building a target
package with qmake, but not linking against Qt.  It's a fork of RTKlib
which is itself a university project (with hand written makefiles, but
not for the part I'm interested in):

https://github.com/rtklibexplorer/RTKLIB/releases/tag/b34h

I actually achieved building it with the attached make rule.  Note it
has a dependency to QT5, but I had to manually add the Qt mkspec file
ptxdist creates as an option to the _CONF_OPT variable.

Two things are bad about this:

1.) I don't think it should be necessary to let the make rule set the
correct mkspec file.  There is only one and IMHO ptxdist should handle
this internally if CONF_TOOL is qmake?

2.) rather large Qt libraries are installed to the target now.  I guess
I might be able to avoid this by setting 'select QT5 if BUILDTIME' in
the in rule, but I would have expected HOST_QT5 to be sufficient.  This
does not work however for two reasons: a) ptxdist complains it needs QT5
if CONF_TOOL is qmake and b) if I only select HOST_QT5 that mkspec is
not generated.

I saw ptxdist having nearly zero packages selecting QT5, and none
requiring HOST_QT5 (?) so it's difficult to learn from examples here.
Maybe this usecase is quite esoteric?  Don't know.

In the end I would only need qmake, nothing more.  That one generates a
Makefile which is then used to compile the package.

Would take directions to improve ptxdist for qmake based packages.

Greets
Alex

Alexander Dahl (1):
  WIP: rtklib-demo5: Add new package

 rules/rtklib-demo5.in   | 23 
 rules/rtklib-demo5.make | 58 +
 2 files changed, 81 insertions(+)
 create mode 100644 rules/rtklib-demo5.in
 create mode 100644 rules/rtklib-demo5.make


base-commit: 90875f8af4f6f1dd9f8eda71df8e8a90866f9839
-- 
2.30.2




Re: [ptxdist] [PATCH] lighttpd: Version bump, 1.4.67 -> 1.4.72

2023-10-16 Thread Alexander Dahl
Hello Andreas,

first of all, thanks for taking care of this, my remarks below.

Am Mon, Oct 16, 2023 at 07:07:34PM +0200 schrieb Andreas Helmcke:
> Bugfixes and several changes. e.g.
> - Stronger TLS defaults
> - HTTP/2 Support now as optional module
> 
> see: https://www.lighttpd.net/releases/

Link: https://www.lighttpd.net/2023/1/3/1.4.68/
Link: https://www.lighttpd.net/2023/2/10/1.4.69/
Link: https://www.lighttpd.net/2023/5/10/1.4.70/
Link: https://www.lighttpd.net/2023/5/27/1.4.71/
Link: https://www.lighttpd.net/2023/10/6/1.4.72/

> Signed-off-by: Andreas Helmcke 
> ---
>  rules/lighttpd.make | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/lighttpd.make b/rules/lighttpd.make
> index 3aa54a1fb..7b7abf7d2 100644
> --- a/rules/lighttpd.make
> +++ b/rules/lighttpd.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIGHTTPD) += lighttpd
>  #
>  # Paths and names
>  #
> -LIGHTTPD_VERSION := 1.4.67
> -LIGHTTPD_MD5 := 64822c5061001673162cf9775d91a80b
> +LIGHTTPD_VERSION := 1.4.72
> +LIGHTTPD_MD5 := 466f9fe131cd7d38d0fe47d2e6a2939d

Builds fine, but …

That 1.4.70 in particular needs a little more work on the ptxdist
package, because several modules are not built separate anymore, but
built-in now.  This makes some of the LIGHTTPD_MOD_* options in menu
not necessary anymore, and breaks targetinstall if those should have
been installed before, e.g. like this:

Error: ptxd_lib_install: cannot find library 'lighttpd/mod_indexfile'!

The list of affected modules is in the 1.4.70 announcement.

With 1.4.71 HTTP/2 support is moved to a separate module however and
no longer built-in anymore.  Should we introduce a new menu option for
that or let the ptxdist user configure it with
PTXCONF_LIGHTTPD_MOD_EXTRA instead?

Greets
Alex

>  LIGHTTPD := lighttpd-$(LIGHTTPD_VERSION)
>  LIGHTTPD_SUFFIX  := tar.xz
>  LIGHTTPD_URL := 
> http://download.lighttpd.net/lighttpd/releases-1.4.x/$(LIGHTTPD).$(LIGHTTPD_SUFFIX)
> -- 
> 2.39.2
> 
> 



Re: [ptxdist] [PATCH] libcurl: Version bump. 8.3.0 -> 8.4.0

2023-10-11 Thread Alexander Dahl
Hei hei,

Am Wed, Oct 11, 2023 at 08:02:36PM +0200 schrieb Christian Melki:
> Mostly smaller fixes.
> https://curl.se/changes.html#8_4_0
> 
> Plugs two CVEs:
> CVE-2023-38546 cookie injection with none file
> CVE-2023-38545 SOCKS5 heap buffer overflow

For anyone interested, there's a nice read up on that heap overflow in
the blog of the maintainer:
https://daniel.haxx.se/blog/2023/10/11/how-i-made-a-heap-overflow-in-curl/

Greets
Alex

> 
> Signed-off-by: Christian Melki 
> ---
>  rules/libcurl.make | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/libcurl.make b/rules/libcurl.make
> index ad615bd87..61797e9ae 100644
> --- a/rules/libcurl.make
> +++ b/rules/libcurl.make
> @@ -15,8 +15,8 @@ PACKAGES-$(PTXCONF_LIBCURL) += libcurl
>  #
>  # Paths and names
>  #
> -LIBCURL_VERSION  := 8.3.0
> -LIBCURL_MD5  := 2fc6cf5cefa8b73e3826aa24befdccff
> +LIBCURL_VERSION  := 8.4.0
> +LIBCURL_MD5  := 8424597f247da68b6041dd7f9ca367fe
>  LIBCURL  := curl-$(LIBCURL_VERSION)
>  LIBCURL_SUFFIX   := tar.xz
>  LIBCURL_URL  := https://curl.se/download/$(LIBCURL).$(LIBCURL_SUFFIX)
> -- 
> 2.34.1
> 
> 



[ptxdist] [PATCH 0/3] poke: Add new package

2023-10-09 Thread Alexander Dahl
Hei hei,

for debugging an issue with monit [1] I put GNU poke [2] on my target.
Maybe this is helpful for others, too?!

Patch series includes GNU poke, a library which poke depends on, and
another library which the first library depends on … ;-)

Greets
Alex

[1] 
https://bitbucket.org/tildeslash/monit/issues/1093/service-not-monitored-on-device-without
[2] https://jemarch.net/poke.html

Alexander Dahl (3):
  libatomic_ops: Add new package
  bdwgc: Add new package
  poke: Add new package

 rules/bdwgc.in   | 11 ++
 rules/bdwgc.make | 85 
 rules/libatomic_ops.in   | 11 ++
 rules/libatomic_ops.make | 75 +++
 rules/poke.in| 17 
 rules/poke.make  | 71 +
 6 files changed, 270 insertions(+)
 create mode 100644 rules/bdwgc.in
 create mode 100644 rules/bdwgc.make
 create mode 100644 rules/libatomic_ops.in
 create mode 100644 rules/libatomic_ops.make
 create mode 100644 rules/poke.in
 create mode 100644 rules/poke.make


base-commit: b9019139839cacf60d1b073aeef749372b6d9318
-- 
2.30.2




[ptxdist] [PATCH 2/3] bdwgc: Add new package

2023-10-09 Thread Alexander Dahl
Dependency for the upcoming GNU poke.  Pinning down the configure
options was rather guesswork than informed decision, basically trying to
pin the defaults which would have been set anyways.

Signed-off-by: Alexander Dahl 
---
 rules/bdwgc.in   | 11 +++
 rules/bdwgc.make | 85 
 2 files changed, 96 insertions(+)
 create mode 100644 rules/bdwgc.in
 create mode 100644 rules/bdwgc.make

diff --git a/rules/bdwgc.in b/rules/bdwgc.in
new file mode 100644
index 0..b0fee1c49
--- /dev/null
+++ b/rules/bdwgc.in
@@ -0,0 +1,11 @@
+## SECTION=system_libraries
+
+config BDWGC
+   tristate
+   prompt "bdwgc"
+   select LIBATOMIC_OPS
+   help
+ A garbage collector for C and C++.
+ https://www.hboehm.info/gc/
+
+# vim: ft=kconfig noet tw=72 ts=8 sw=8
diff --git a/rules/bdwgc.make b/rules/bdwgc.make
new file mode 100644
index 0..021e4b5cc
--- /dev/null
+++ b/rules/bdwgc.make
@@ -0,0 +1,85 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Alexander Dahl 
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BDWGC) += bdwgc
+
+#
+# Paths and names
+#
+BDWGC_VERSION  := 8.2.4
+BDWGC_MD5  := 8901a6ed29ac35842420054772ea3441
+BDWGC  := gc-$(BDWGC_VERSION)
+BDWGC_SUFFIX   := tar.gz
+BDWGC_URL  := 
https://github.com/ivmai/bdwgc/releases/download/v$(BDWGC_VERSION)/$(BDWGC).$(BDWGC_SUFFIX)
+BDWGC_SOURCE   := $(SRCDIR)/$(BDWGC).$(BDWGC_SUFFIX)
+BDWGC_DIR  := $(BUILDDIR)/$(BDWGC)
+BDWGC_LICENSE  := Boehm-GC
+BDWGC_LICENSE_FILES := \
+   
file://README.QUICK;startline=1;endline=24;md5=798a33a333c0e8636ddeab552ac6090b 
\
+   
file://README.md;startline=526;endline=575;md5=71aaf0a0f29b504d185ff4e9fc1d5858
+
+# 
+# Prepare
+# 
+
+BDWGC_CONF_TOOL:= autoconf
+BDWGC_CONF_OPT :=  \
+   $(CROSS_AUTOCONF_USR) \
+   --disable-emscripten-asyncify \
+   --enable-threads=posix \
+   --enable-parallel-mark \
+   --enable-thread-local-alloc \
+   --enable-threads-discovery \
+   --disable-cplusplus \
+   --enable-throw-bad-alloc-library \
+   --enable-gcj-support \
+   --disable-sigrt-signals \
+   --disable-gc-debug \
+   --enable-java-finalization \
+   --enable-atomic-uncollectable \
+   --disable-redirect-malloc \
+   --enable-disclaim \
+   --disable-large-config \
+   --disable-gc-assertions \
+   --disable-mmap \
+   --disable-munmap \
+   --enable-dynamic-loading \
+   --enable-register-main-static-data \
+   --disable-checksums \
+   --disable-werror \
+   --disable-single-obj-compilation \
+   --disable-gcov \
+   --disable-docs \
+   --enable-handle-fork \
+   --without-ecos \
+   --with-libatomic-ops=yes
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/bdwgc.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, bdwgc)
+   @$(call install_fixup, bdwgc,PRIORITY,optional)
+   @$(call install_fixup, bdwgc,SECTION,base)
+   @$(call install_fixup, bdwgc,AUTHOR,"Alexander Dahl ")
+   @$(call install_fixup, bdwgc,DESCRIPTION,missing)
+
+   @$(call install_lib, bdwgc, 0, 0, 0644, libcord)
+   @$(call install_lib, bdwgc, 0, 0, 0644, libgc)
+
+   @$(call install_finish, bdwgc)
+
+   @$(call touch)
+
+# vim: ft=make noet tw=72 ts=8 sw=8
-- 
2.30.2




[ptxdist] [PATCH 3/3] poke: Add new package

2023-10-09 Thread Alexander Dahl
Link: https://jemarch.net/poke
Signed-off-by: Alexander Dahl 
---
 rules/poke.in   | 17 
 rules/poke.make | 71 +
 2 files changed, 88 insertions(+)
 create mode 100644 rules/poke.in
 create mode 100644 rules/poke.make

diff --git a/rules/poke.in b/rules/poke.in
new file mode 100644
index 0..6b1637716
--- /dev/null
+++ b/rules/poke.in
@@ -0,0 +1,17 @@
+## SECTION=editors
+
+config POKE
+   tristate
+   prompt "poke"
+   select BDWGC
+   select NCURSES
+   select READLINE
+   help
+ GNU poke is an interactive, extensible editor for binary data.
+ Not limited to editing basic entities such as bits and bytes,
+ it provides a full-fledged procedural, interactive programming
+ language designed to describe data structures and to operate
+ on them.
+ https://jemarch.net/poke
+
+# vim: ft=kconfig noet tw=72 ts=8 sw=8
diff --git a/rules/poke.make b/rules/poke.make
new file mode 100644
index 0..bfd67396c
--- /dev/null
+++ b/rules/poke.make
@@ -0,0 +1,71 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Alexander Dahl 
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_POKE) += poke
+
+#
+# Paths and names
+#
+POKE_VERSION   := 3.3
+POKE_MD5   := 25461e6e9032fa4d3ed089576990c159
+POKE   := poke-$(POKE_VERSION)
+POKE_SUFFIX:= tar.gz
+POKE_URL   := $(call ptx/mirror, GNU, poke/$(POKE).$(POKE_SUFFIX))
+POKE_SOURCE:= $(SRCDIR)/$(POKE).$(POKE_SUFFIX)
+POKE_DIR   := $(BUILDDIR)/$(POKE)
+POKE_LICENSE   := GPL-3.0-or-later
+POKE_LICENSE_FILES := \
+   file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+   file://jitter/COPYING;md5=d32239bcb673463ab874e80d47fae504
+
+# 
+# Prepare
+# 
+
+POKE_CONF_TOOL := autoconf
+POKE_CONF_OPT  :=  \
+   $(CROSS_AUTOCONF_USR) \
+   --enable-threads=posix \
+   --disable-rpath \
+   --enable-curses \
+   --disable-nls \
+   --disable-pvm-profiling \
+   --disable-libnbd \
+   --enable-hserver \
+   --$(call ptx/endis, PTXDIST_Y2038)-year2038 \
+   --$(call ptx/endis, PTXCONF_GLOBAL_LARGE_FILE)-largefile \
+   --with-libreadline-prefix="$(PTXDIST_SYSROOT_TARGET)/usr" \
+   --with-jitter-dispatch=best \
+   --without-vimdir \
+   --without-lispdir
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/poke.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, poke)
+   @$(call install_fixup, poke,PRIORITY,optional)
+   @$(call install_fixup, poke,SECTION,base)
+   @$(call install_fixup, poke,AUTHOR,"Alexander Dahl ")
+   @$(call install_fixup, poke,DESCRIPTION,missing)
+
+   @$(call install_lib, poke, 0, 0, 0644, libpoke)
+   @$(call install_copy, poke, 0, 0, 0755, -, /usr/bin/poke)
+   @$(call install_tree, poke, 0, 0, -,  /usr/share/poke)
+
+   @$(call install_finish, poke)
+
+   @$(call touch)
+
+# vim: ft=make noet tw=72 ts=8 sw=8
-- 
2.30.2




[ptxdist] [PATCH 1/3] libatomic_ops: Add new package

2023-10-09 Thread Alexander Dahl
Dependency for the upcoming bdwgc.

Signed-off-by: Alexander Dahl 
---
 rules/libatomic_ops.in   | 11 ++
 rules/libatomic_ops.make | 75 
 2 files changed, 86 insertions(+)
 create mode 100644 rules/libatomic_ops.in
 create mode 100644 rules/libatomic_ops.make

diff --git a/rules/libatomic_ops.in b/rules/libatomic_ops.in
new file mode 100644
index 0..23e79c4fd
--- /dev/null
+++ b/rules/libatomic_ops.in
@@ -0,0 +1,11 @@
+## SECTION=system_libraries
+
+config LIBATOMIC_OPS
+   tristate
+   prompt "libatomic_ops"
+   help
+ Semi-portable access to hardware-provided atomic memory update
+ operations on a number of architectures.
+ IN NEW CODE, PLEASE USE C11 OR C++14 STANDARD ATOMICS INSTEAD!
+
+# vim: ft=kconfig noet tw=72 ts=8 sw=8
diff --git a/rules/libatomic_ops.make b/rules/libatomic_ops.make
new file mode 100644
index 0..746ab9343
--- /dev/null
+++ b/rules/libatomic_ops.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Alexander Dahl 
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBATOMIC_OPS) += libatomic_ops
+
+#
+# Paths and names
+#
+LIBATOMIC_OPS_VERSION  := 7.8.0
+LIBATOMIC_OPS_MD5  := a7e51e8041c3e60c298c037b2789c3fa
+LIBATOMIC_OPS  := libatomic_ops-$(LIBATOMIC_OPS_VERSION)
+LIBATOMIC_OPS_SUFFIX   := tar.gz
+LIBATOMIC_OPS_URL  := 
https://github.com/ivmai/libatomic_ops/releases/download/v$(LIBATOMIC_OPS_VERSION)/$(LIBATOMIC_OPS).$(LIBATOMIC_OPS_SUFFIX)
+LIBATOMIC_OPS_SOURCE   := $(SRCDIR)/$(LIBATOMIC_OPS).$(LIBATOMIC_OPS_SUFFIX)
+LIBATOMIC_OPS_DIR  := $(BUILDDIR)/$(LIBATOMIC_OPS)
+# quote from LICENSE:
+#
+# > Our intent is to make it easy to use libatomic_ops, in both free and
+# > proprietary software.  Hence most of code (core library) that we
+# > expect to be linked into a client application is covered by a MIT or
+# > MIT-style license.
+#
+# > However, a few library routines (the gpl extension library) are
+# > covered by the GNU General Public License.  These are put into a
+# > separate library, libatomic_ops_gpl.a file.
+LIBATOMIC_OPS_LICENSE  := MIT AND Boehm-GC AND GPL-2.0-or-later
+LIBATOMIC_OPS_LICENSE_FILES := \
+   file://LICENSE;md5=5700d28353dfa2f191ca9b1bd707865e \
+   file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263
+
+# 
+# Prepare
+# 
+
+LIBATOMIC_OPS_CONF_TOOL:= autoconf
+LIBATOMIC_OPS_CONF_OPT :=  \
+   $(CROSS_AUTOCONF_USR) \
+   --enable-shared \
+   --disable-static \
+   --disable-werror \
+   --disable-assertions \
+   --disable-atomic-intrinsics \
+   --disable-gcov \
+   --enable-gpl \
+   --disable-docs
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/libatomic_ops.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, libatomic_ops)
+   @$(call install_fixup, libatomic_ops,PRIORITY,optional)
+   @$(call install_fixup, libatomic_ops,SECTION,base)
+   @$(call install_fixup, libatomic_ops,AUTHOR,"Alexander Dahl 
")
+   @$(call install_fixup, libatomic_ops,DESCRIPTION,missing)
+
+   @$(call install_lib, libatomic_ops, 0, 0, 0644, libatomic_ops)
+   @$(call install_lib, libatomic_ops, 0, 0, 0644, libatomic_ops_gpl)
+
+   @$(call install_finish, libatomic_ops)
+
+   @$(call touch)
+
+# vim: ft=make noet tw=72 ts=8 sw=8
-- 
2.30.2




Re: [ptxdist] [PATCH] ptxd_make_vcs_version: always use all Git tags

2023-09-26 Thread Alexander Dahl
Hello Roland,

Am Tue, Sep 26, 2023 at 10:32:05AM +0200 schrieb Roland Hieber:
> The short-circuit results in a preference of signed tags over non-signed
> tags. In BSPs where non-signed tags exist (e.g. DistroKit-2023.09.0)
> that are newer than the latest signed tag (e.g. DistroKit-2019.12.0),
> this will always lead to an unnecessarily old tag being used.

Maybe this thread from 2018 can help (been there, tried that):

https://lore.ptxdist.org/ptxdist/20180907100105.nleg2qmttyahc...@pengutronix.de/

Greets
Alex

> 
> Cc: Steffen Trumtrar 
> Signed-off-by: Roland Hieber 
> ---
> Steffen, do you still know why you chose a plain "git describe" first?
> 
> 
>  scripts/lib/ptxd_make_vcs_version.sh | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/scripts/lib/ptxd_make_vcs_version.sh 
> b/scripts/lib/ptxd_make_vcs_version.sh
> index 69e486ab31a5..d59e1eba9872 100644
> --- a/scripts/lib/ptxd_make_vcs_version.sh
> +++ b/scripts/lib/ptxd_make_vcs_version.sh
> @@ -7,8 +7,7 @@
>  #
>  
>  ptxd_make_vcs_version() {
> -PTXDIST_VCS_VERSION="$(git describe 2>/dev/null || \
> -git describe --always --tags 2>/dev/null)"
> +PTXDIST_VCS_VERSION="$(git describe --always --tags 2>/dev/null)"
>  
>  if [ -z "${PTXDIST_VCS_VERSION}" ]; then
>   PTXDIST_VCS_VERSION="unknown"
> -- 
> 2.39.2
> 
> 



[ptxdist] [PATCH] sshpass: Add new package

2023-09-21 Thread Alexander Dahl
As noted by sshpass itself and Debian: using this is a potential
security risk, consider pubkey auth first!

Link: https://sourceforge.net/projects/sshpass/
Signed-off-by: Alexander Dahl 
---
 rules/sshpass.in   | 22 
 rules/sshpass.make | 52 ++
 2 files changed, 74 insertions(+)
 create mode 100644 rules/sshpass.in
 create mode 100644 rules/sshpass.make

diff --git a/rules/sshpass.in b/rules/sshpass.in
new file mode 100644
index 0..b855016e2
--- /dev/null
+++ b/rules/sshpass.in
@@ -0,0 +1,22 @@
+## SECTION=networking
+
+config SSHPASS
+   tristate
+   prompt "sshpass"
+   help
+ Sshpass is a tool for non-interactivly performing password
+ authentication with SSH's so called "interactive keyboard
+ password authentication".
+ Most user should use SSH's more secure public key
+ authentiaction instead.
+
+ SECURITY NOTE: There is a reason openssh insists that
+ passwords be typed interactively.
+ Passwords are harder to store securely and to pass around
+ securely between programs.
+ If you have not looked into solving your needs using SSH's
+ "public key authentication", perhaps in conjunction with the
+ ssh agent (RTFM ssh-add), please do so before being tempted
+ into using this package.
+
+# vim: ft=kconfig noet tw=72 ts=8 sw=8
diff --git a/rules/sshpass.make b/rules/sshpass.make
new file mode 100644
index 0..7fe27d1e6
--- /dev/null
+++ b/rules/sshpass.make
@@ -0,0 +1,52 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2023 by Alexander Dahl 
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_SSHPASS) += sshpass
+
+#
+# Paths and names
+#
+SSHPASS_VERSION:= 1.10
+SSHPASS_MD5:= e435c55deb6e2e410508ecc5da3066f8
+SSHPASS:= sshpass-$(SSHPASS_VERSION)
+SSHPASS_SUFFIX := tar.gz
+SSHPASS_URL:= $(call ptx/mirror, SF, 
sshpass/$(SSHPASS).$(SSHPASS_SUFFIX))
+SSHPASS_SOURCE := $(SRCDIR)/$(SSHPASS).$(SSHPASS_SUFFIX)
+SSHPASS_DIR:= $(BUILDDIR)/$(SSHPASS)
+SSHPASS_LICENSE:= GPL-2.0-or-later
+SSHPASS_LICENSE_FILES  := file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f
+
+# 
+# Prepare
+# 
+
+SSHPASS_CONF_TOOL  := autoconf
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/sshpass.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, sshpass)
+   @$(call install_fixup, sshpass,PRIORITY,optional)
+   @$(call install_fixup, sshpass,SECTION,base)
+   @$(call install_fixup, sshpass,AUTHOR,"Alexander Dahl 
")
+   @$(call install_fixup, sshpass,DESCRIPTION,missing)
+
+   @$(call install_copy, sshpass, 0, 0, 0755, -, /usr/bin/sshpass)
+
+   @$(call install_finish, sshpass)
+
+   @$(call touch)
+
+# vim: ft=make noet tw=72 ts=8 sw=8

base-commit: 62f61865b380ca0064e7e8a3b7a81a8fb74ea51c
-- 
2.30.2




[ptxdist] [PATCH 2/2] uhubctl: Cosmetic rule file changes

2023-09-19 Thread Alexander Dahl
- bool -> tristate
- whitespace
- shorter install_copy call (in fact moves the binary from /usr/bin to
  /usr/sbin, which is what `make install` does here and where the binary
  is found in Debian as well)

Signed-off-by: Alexander Dahl 
---
 rules/uhubctl.in   | 4 ++--
 rules/uhubctl.make | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rules/uhubctl.in b/rules/uhubctl.in
index ec30f6637..6693ba16d 100644
--- a/rules/uhubctl.in
+++ b/rules/uhubctl.in
@@ -1,8 +1,8 @@
 ## SECTION=shell_and_console
 
 config UHUBCTL
-   bool
+   tristate
select LIBUSB
prompt "uhubctl"
help
-   Utility to control USB power per-port on smart USB hubs.
+ Utility to control USB power per-port on smart USB hubs.
diff --git a/rules/uhubctl.make b/rules/uhubctl.make
index 53bf1025a..fc4219fb6 100644
--- a/rules/uhubctl.make
+++ b/rules/uhubctl.make
@@ -30,7 +30,7 @@ UHUBCTL_LICENSE_FILES := \
 # 
 
 UHUBCTL_CONF_TOOL  := NO
-UHUBCTL_MAKE_ENV   := $(CROSS_ENV)
+UHUBCTL_MAKE_ENV   := $(CROSS_ENV)
 
 # 
 # Target-Install
@@ -45,7 +45,7 @@ $(STATEDIR)/uhubctl.targetinstall:
@$(call install_fixup, uhubctl,AUTHOR,"Lars Pedersen 
")
@$(call install_fixup, uhubctl,DESCRIPTION,missing)
 
-   @$(call install_copy, uhubctl, 0, 0, 0755, $(UHUBCTL_DIR)/uhubctl, 
/usr/bin/uhubctl)
+   @$(call install_copy, uhubctl, 0, 0, 0755, -, /usr/sbin/uhubctl)
 
@$(call install_finish, uhubctl)
 
-- 
2.30.2




[ptxdist] [PATCH] uhubctl: version bump 2.4.0 -> 2.5.0

2023-09-18 Thread Alexander Dahl
> * Added support for Linux sysfs based power switching provided in
>   Linux kernel 6.0+ - it allows to solve reliability issues when
>   turning power off on Linux (#450).
> * Added option --nodesc to skip querying device string descriptors
>   (necessary for some buggy devices which otherwise would completely freeze).
> * New simpler way to configure udev rules on Linux
>   (one rule works for any USB hub).
> * Even more supported devices.

License file hash changed due to copyright year update.

Link: https://github.com/mvp/uhubctl/pull/450
Link: https://github.com/mvp/uhubctl/releases/tag/v2.5.0
Signed-off-by: Alexander Dahl 
---
 rules/uhubctl.make | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rules/uhubctl.make b/rules/uhubctl.make
index 394b46855..53bf1025a 100644
--- a/rules/uhubctl.make
+++ b/rules/uhubctl.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_UHUBCTL) += uhubctl
 #
 # Paths and names
 #
-UHUBCTL_VERSION:= 2.4.0
-UHUBCTL_MD5:= 9bdf73940881df02574a94703ad8b582
+UHUBCTL_VERSION:= 2.5.0
+UHUBCTL_MD5:= e4e66d445ba8fda181ce4aa4abcd4247
 UHUBCTL:= uhubctl-$(UHUBCTL_VERSION)
 UHUBCTL_SUFFIX := tar.gz
 UHUBCTL_URL:= 
https://github.com/mvp/uhubctl/archive/v$(UHUBCTL_VERSION).$(UHUBCTL_SUFFIX)
@@ -23,7 +23,7 @@ UHUBCTL_SOURCE:= 
$(SRCDIR)/$(UHUBCTL).$(UHUBCTL_SUFFIX)
 UHUBCTL_DIR:= $(BUILDDIR)/$(UHUBCTL)
 UHUBCTL_LICENSE:= GPL-2.0-only
 UHUBCTL_LICENSE_FILES := \
-   file://LICENSE;md5=a79e6a142b69522fe7757fe7313895eb
+   file://LICENSE;md5=1e7b16e6ef7cd15d58b0f1c58dbf9817
 
 # 
 # Prepare

base-commit: 62f61865b380ca0064e7e8a3b7a81a8fb74ea51c
-- 
2.30.2




Re: [ptxdist] SBOM support

2023-09-07 Thread Alexander Dahl
Hello Simon,

Am Thu, Sep 07, 2023 at 03:03:47PM + schrieb Simon Falsig:
> Hi,
> 
> I saw a post from 2021 to the mailing list on generating SBOMs from ptxdist.
> Has there been any further work on this?
> 
> We've been looking at implementing this internally - plan would be to generate
> the SBOM in CycloneDX format, and consume it with Dependency-Track 
> (https://dependencytrack.org) for automatic vulnerability and license 
> monitoring.
> 
> Looks like we're quite close to having a working setup, but it'd make a lot 
> more
> sense to have it upstreamed rather than as local patches, so would like to 
> get a
> bit of input on the approach, and see if we can make that happen :)
> 
> We've identified two main steps:
> 1. Generate the SBOM itself. A minimal version of this can be created from the
>output of the existing fast-bsp-report in 40 lines of Python, using the
>CycloneDX library.
>I'd assume that such a script would just go into the scripts folder in 
> ptxdist?
>Is there a common way of tracking / documenting dependencies of such 
> scripts?
> 
> 2. To track vulnerabilities, it's necessary to track the Common Platform
>Enumeration (CPE) name of each package (from 
> https://nvd.nist.gov/products/cpe).
>This will allow matching packages to CVEs.
>My suggestion would be to add a _CPE variable to each package (built from
>whatever other variables make sense, typically _VERSION). I managed to add 
> this
>for the fast report (extracting it to pkg_cpe in 
> rules/post/ptxd_make_world_common.make,
>and adding it to the report in scripts/lib/ptxd_make_world_report.sh), but 
> I
>wouldn't be surprised if there are other places/report that need to track 
> this
>also for consistency?
>Packages that specify _CPE would then have this included in their report, 
> and
>there'd be no change for the packages that don't specify it.

As far as I know buildroot [1] already has support for this.  They
construct this from defaults and override it with several different
variables if defaults are not sufficient for a particular project:

_CPE_ID_VENDOR
_CPE_ID_VERSION
_CPE_ID_UPDATE
_CPE_ID_PRODUCT

And maybe more?  Some quirks handling like this is probably necessary
in ptxdist, too?

Greets
Alex

[1] https://buildroot.org/

> 
> 
> I'd be happy to get a bit of initial feedback on the approach. I'll have a 
> look
> at putting up some initial patches in the coming days too.
> 
> Thanks in advance and best regards,
> Simon
> 



Re: [ptxdist] [PATCH] host-cmake: Version bump. 3.27.2 -> 3.27.3

2023-08-23 Thread Alexander Dahl
Hello,

Am Wed, Aug 23, 2023 at 10:19:07PM +0200 schrieb Christian Melki:
> Minor changes.
> https://github.com/Kitware/CMake/compare/v3.27.2...v3.27.3
> 
> Signed-off-by: Christian Melki 
> ---
>  rules/host-cmake.make | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/host-cmake.make b/rules/host-cmake.make
> index b4c0905b1..535ada4b6 100644
> --- a/rules/host-cmake.make
> +++ b/rules/host-cmake.make
> @@ -15,8 +15,8 @@ HOST_PACKAGES-$(PTXCONF_HOST_CMAKE) += host-cmake
>  #
>  # Paths and names
>  #
> -HOST_CMAKE_VERSION   := 3.27.2
> -HOST_CMAKE_MD5   := 07786cd23c3d0aa9c2fef69efb13662b
> +HOST_CMAKE_VERSION   := 3.27.3
> +HOST_CMAKE_MD5   := 7228f5fcc8a858fdeac27e29bda0c144

Reviewed-by: Alexander Dahl 

Greets
Alex

>  HOST_CMAKE   := cmake-$(HOST_CMAKE_VERSION)
>  HOST_CMAKE_SUFFIX:= tar.gz
>  HOST_CMAKE_URL   := https://cmake.org/files/v$(basename 
> $(HOST_CMAKE_VERSION))/$(HOST_CMAKE).$(HOST_CMAKE_SUFFIX)
> -- 
> 2.34.1
> 
> 



Re: [ptxdist] [PATCH 3/3] rauc: version bump 1.10 -> 1.10.1

2023-08-10 Thread Alexander Dahl
Hello Roland,

Am Thu, Aug 10, 2023 at 01:02:56PM +0200 schrieb Roland Hieber:
> Changelog:
> https://github.com/rauc/rauc/releases/tag/v1.10.1
> 
> Signed-off-by: Roland Hieber 
> ---
>  .../{rauc-1.10 => rauc-1.10.1}/0001-README-clarify-license.patch  | 0
>  patches/{rauc-1.10 => rauc-1.10.1}/series | 0
>  2 files changed, 0 insertions(+), 0 deletions(-)
>  rename patches/{rauc-1.10 => rauc-1.10.1}/0001-README-clarify-license.patch 
> (100%)
>  rename patches/{rauc-1.10 => rauc-1.10.1}/series (100%)
> 
> diff --git a/patches/rauc-1.10/0001-README-clarify-license.patch 
> b/patches/rauc-1.10.1/0001-README-clarify-license.patch
> similarity index 100%
> rename from patches/rauc-1.10/0001-README-clarify-license.patch
> rename to patches/rauc-1.10.1/0001-README-clarify-license.patch
> diff --git a/patches/rauc-1.10/series b/patches/rauc-1.10.1/series
> similarity index 100%
> rename from patches/rauc-1.10/series
> rename to patches/rauc-1.10.1/series

Not sure where you got those patches from?  They are not in master.
The version bump itself is already in master as commit 196622be0a1b
("rauc: version bump 1.10 -> 1.10.1").

Greets
Alex



[ptxdist] [PATCH 1/2] mtd-utils: Introduce bbinit startup for ubihealthd

2023-06-11 Thread Alexander Dahl
We already introduced a systemd service unit with 434bd8a2cee9
("mtd-utils: Introduce systemd unit for ubihealthd"), but it was not
possible before to start the ubihealthd on bbinit based systems.  This
new init script does not allow to run multiple instances however and
just starts one daemon for the default ubi device.

The script is inspired and adapted from the one used for haveged.

Signed-off-by: Alexander Dahl 
---
 projectroot/etc/init.d/ubihealthd | 111 ++
 rules/mtd-utils-bbinit.in |   9 +++
 rules/mtd-utils.in|   5 ++
 rules/mtd-utils.make  |   8 +++
 4 files changed, 133 insertions(+)
 create mode 100755 projectroot/etc/init.d/ubihealthd
 create mode 100644 rules/mtd-utils-bbinit.in

diff --git a/projectroot/etc/init.d/ubihealthd 
b/projectroot/etc/init.d/ubihealthd
new file mode 100755
index 0..62608cdff
--- /dev/null
+++ b/projectroot/etc/init.d/ubihealthd
@@ -0,0 +1,111 @@
+#!/bin/sh
+
+PATH='/usr/sbin:/usr/bin'
+DESC='ubihealthd UBI device PEB scan daemon'
+NAME='ubihealthd'
+DAEMON="/usr/sbin/$NAME"
+DAEMON_ARGS=''
+SCRIPTNAME="/etc/init.d/$NAME"
+
+# exit if binary is missing
+[ -x "$DAEMON" ] || exit 0
+
+is_running() {
+start-stop-daemon -K --quiet --test --exec $DAEMON
+}
+
+do_start() {
+is_running && return 1
+start-stop-daemon -S --quiet --exec $DAEMON -- $DAEMON_ARGS || return 2
+}
+
+do_stop() {
+is_running || return 0
+start-stop-daemon -K --quiet --exec $DAEMON
+RETVAL="$?"
+
+# wait up to 30 seconds until daemon stopped
+for i in $(seq 30)
+do
+sleep 1
+echo -n '.'
+if ! is_running
+then
+break
+fi
+done
+
+# see if it's still running
+if is_running
+then
+start-stop-daemon -K --quiet --signal KILL --exec $DAEMON
+
+for i in $(seq 5)
+do
+sleep 1
+echo -n '.'
+if ! is_running
+then
+break
+fi
+done
+
+if is_running
+then
+return 2
+fi
+fi
+
+rm -f $PIDFILE
+return "$RETVAL"
+}
+
+case "$1" in
+start)
+echo -n "Starting $DESC ..."
+do_start
+case "$?" in
+0|1)echo " Done." ;;
+2)  echo " Failed." ;;
+esac
+;;
+stop)
+echo -n "Stopping $DESC ."
+do_stop
+case "$?" in
+0|1)echo " Done." ;;
+2)  echo " Failed." ;;
+esac
+;;
+restart)
+echo -n "Restarting $DESC .."
+do_stop
+case "$?" in
+0|1)
+do_start
+case "$?" in
+0)  echo " Done." ;;
+1)  echo " Failed." ;; # Old process still running
+*)  echo " Failed." ;; # Failed to start
+esac
+;;
+*)
+echo " Failed." # Failed to stop
+;;
+esac
+;;
+status)
+if is_running
+then
+echo "$NAME is running"
+else
+echo "$NAME is not running"
+fi
+;;
+*)
+echo "Usage: $SCRIPTNAME {start|stop|restart|status}" >&2
+exit 3
+;;
+esac
+
+:
diff --git a/rules/mtd-utils-bbinit.in b/rules/mtd-utils-bbinit.in
new file mode 100644
index 0..e6b628938
--- /dev/null
+++ b/rules/mtd-utils-bbinit.in
@@ -0,0 +1,9 @@
+## SECTION=initmethod_bbinit
+
+config MTD_UTILS_UBIHEALTHD_BBINIT_LINK
+   string
+   depends on MTD_UTILS_UBIHEALTHD_STARTSCRIPT
+   prompt "ubihealthd"
+   default "S83ubihealthd"
+
+# vim: ft=kconfig noet tw=72
diff --git a/rules/mtd-utils.in b/rules/mtd-utils.in
index eaf073932..434d1e8fb 100644
--- a/rules/mtd-utils.in
+++ b/rules/mtd-utils.in
@@ -303,6 +303,11 @@ menuconfig MTD_UTILS_UBIHEALTHD
 
 if MTD_UTILS_UBIHEALTHD
 
+config MTD_UTILS_UBIHEALTHD_STARTSCRIPT
+   bool
+   prompt "install /etc/init.d/ubihealthd"
+   depends on INITMETHOD_BBINIT
+
 config MTD_UTILS_UBIHEALTHD_SYSTEMD_UNIT
bool
prompt "install systemd unit files"
diff --git a/rules/mtd-utils.make b/rules/mtd-utils.make
index 0a181a879..659a0385b 100644
--- a/rules/mtd-utils.make
+++ b/rules/mtd-utils.make
@@ -205,6 +205,14 @@ endif
 ifdef PTXCONF_MTD_UTILS_UBIHEALTHD
@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
/usr/sbin/ubihealthd)
+ifdef PTXCONF_MTD_UTILS_UBIHEALTHD_STARTSCRIPT
+   @$(call install_alternative, mtd-utils, 0, 0, 0755,

[ptxdist] [PATCH 0/2] mtd-utils: ubihealthd: Init script and help text

2023-06-11 Thread Alexander Dahl
Hei hei,

just made our targets using bbinit work with ubihealthd.  (We already
had support for systemd for other targets.)  While at it, I found the
help text is missing some requirements which can not easily be expressed
through Kconfig.

Greets
Alex

Alexander Dahl (2):
  mtd-utils: Introduce bbinit startup for ubihealthd
  mtd-utils: Add ubihealthd requirements to help text

 projectroot/etc/init.d/ubihealthd | 111 ++
 rules/mtd-utils-bbinit.in |   9 +++
 rules/mtd-utils.in|   6 ++
 rules/mtd-utils.make  |   8 +++
 4 files changed, 134 insertions(+)
 create mode 100755 projectroot/etc/init.d/ubihealthd
 create mode 100644 rules/mtd-utils-bbinit.in


base-commit: 900bff9908170aad8a9b61b3e2c14b4734817d62
-- 
2.30.2




[ptxdist] [PATCH 2/2] mtd-utils: Add ubihealthd requirements to help text

2023-06-11 Thread Alexander Dahl
Fixes: 7d4e5f3969df ("mtd-utils: version bump 2.1.1 -> 2.1.2")
Signed-off-by: Alexander Dahl 
---
 rules/mtd-utils.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/mtd-utils.in b/rules/mtd-utils.in
index 434d1e8fb..8cc55caba 100644
--- a/rules/mtd-utils.in
+++ b/rules/mtd-utils.in
@@ -300,6 +300,7 @@ menuconfig MTD_UTILS_UBIHEALTHD
help
  Daemon that randomly scans each PEB of a UBI device to ensure that
  filesystems with little reading do enough wear leveling.
+ Requires kernel >= 5.1 and glibc >= 2.25.
 
 if MTD_UTILS_UBIHEALTHD
 
-- 
2.30.2




Re: [ptxdist] [PATCH] mailmap: Add a few entries for improved commit statistics

2023-06-07 Thread Alexander Dahl
Hello Uwe,

Am Wed, Jun 07, 2023 at 03:51:29PM +0200 schrieb Uwe Kleine-König:
> When a single person uses different variants of their real name and
> different email addresses, they appear as different persons in the
> hall of fame in the category "Commits".
> 
> With this .mailmap the number of individual committers is reduced from
> 148 to 141 (as of ptxdist-2023.05.0) as produced by
> 
>   git shortlog -sn

I noticed some more when calling `git shortlog -s` or lets say
omitting '-n' which gives you alphabetic order.  Not sure if those are
the same person, but I would guess so.

 1   Andrej Gantvorg
 1   andrej.gantv...@wago.com

   620   Bjoern Buerger
51   Bjørn Bürger

23   Denis OSTERLAND
22   Denis Osterland-Heim

14   Enrico Joerns
37   Enrico Jorns

11   Guillermo Rodriguez
16   Guillermo Rodríguez
 3   grodriguez

   936   Juergen Beisert
 3   Jürgen Beisert

As said on IRC before, things differ if you additionally pass '-e' …

Greets
Alex

> 
> .
> 
> Signed-off-by: Uwe Kleine-König 
> ---
>  .mailmap | 7 +++
>  1 file changed, 7 insertions(+)
>  create mode 100644 .mailmap
> 
> diff --git a/.mailmap b/.mailmap
> new file mode 100644
> index ..c1c31f0237a0
> --- /dev/null
> +++ b/.mailmap
> @@ -0,0 +1,7 @@
> +Christian Gieseler 
> +Denis Osterland-Heim 
> +Florian Bäuerle 
> +Ladislav Michl 
> +Ladislav Michl 
> +Michael Olbrich 
> +Thorsten Liepert 
> 
> base-commit: 5015bfbd0347abfc20bcf0bfedf5b02670353924
> -- 
> 2.39.2
> 
> 



[ptxdist] [PATCH] bbinit: Remove /bin and /sbin from PATH after /usr merge

2023-06-07 Thread Alexander Dahl
The so called /usr merge was done back with ptxdist-2017.05.0 and since
then /bin is just a symlink to /usr/bin and /sbin just a symlink to
/usr/sbin.  Putting /bin _and_ /usr/bin to PATH would actually put the
same directory twice to PATH.

Signed-off-by: Alexander Dahl 
---

Notes:
Not sure if this should have been RFC first?  This does not affect
PATH set by /etc/profile on login and there are more scripts outside
of /etc/init.d which set a PATH.

 projectroot/etc/init.d/NetworkManager | 2 +-
 projectroot/etc/init.d/atd| 2 +-
 projectroot/etc/init.d/avahi-daemon   | 2 +-
 projectroot/etc/init.d/chrony | 2 +-
 projectroot/etc/init.d/dropbear   | 2 +-
 projectroot/etc/init.d/haveged| 2 +-
 projectroot/etc/init.d/inetd  | 2 +-
 projectroot/etc/init.d/lighttpd   | 2 +-
 projectroot/etc/init.d/lldpd  | 2 +-
 projectroot/etc/init.d/monit  | 2 +-
 projectroot/etc/init.d/nftables   | 2 +-
 projectroot/etc/init.d/ntp-client | 2 +-
 projectroot/etc/init.d/ntp-server | 2 +-
 projectroot/etc/init.d/openssh| 2 +-
 projectroot/etc/init.d/proftpd| 2 +-
 projectroot/etc/init.d/pureftpd   | 2 +-
 projectroot/etc/init.d/rc-once| 2 +-
 projectroot/etc/init.d/samba  | 2 +-
 projectroot/etc/init.d/sysctl | 2 +-
 projectroot/etc/init.d/zeroconf   | 2 +-
 20 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/projectroot/etc/init.d/NetworkManager 
b/projectroot/etc/init.d/NetworkManager
index 50a5467ad..f76e01131 100644
--- a/projectroot/etc/init.d/NetworkManager
+++ b/projectroot/etc/init.d/NetworkManager
@@ -19,7 +19,7 @@ exec_prefix=/usr
 sbindir=${exec_prefix}/sbin
 localstatedir=/var
 
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
 DESC="network connection manager"
 NAME="NetworkManager"
 
diff --git a/projectroot/etc/init.d/atd b/projectroot/etc/init.d/atd
index 7253f646c..62bfef811 100644
--- a/projectroot/etc/init.d/atd
+++ b/projectroot/etc/init.d/atd
@@ -3,7 +3,7 @@
 #
 # atd
 #
-PATH=/usr/bin:/usr/sbin:/bin:/sbin
+PATH=/usr/bin:/usr/sbin
 
 PREFIX="atd: "
 ATD="/usr/sbin/atd"
diff --git a/projectroot/etc/init.d/avahi-daemon 
b/projectroot/etc/init.d/avahi-daemon
index 27c22cc52..7aadb7525 100644
--- a/projectroot/etc/init.d/avahi-daemon
+++ b/projectroot/etc/init.d/avahi-daemon
@@ -4,7 +4,7 @@
 # Mi 22. Jul 21:46:28 CEST 2009
 
 #set -e
-PATH=/sbin:/bin:/usr/bin
+PATH=/usr/sbin:/usr/bin
 BINARY=/usr/sbin/avahi-daemon
 OPTIONS="-D"
 
diff --git a/projectroot/etc/init.d/chrony b/projectroot/etc/init.d/chrony
index d112927f8..a40e2e621 100644
--- a/projectroot/etc/init.d/chrony
+++ b/projectroot/etc/init.d/chrony
@@ -7,7 +7,7 @@
 # Last change:  Bj�rn B�rger 
 # Date:Tue Mar  6 16:00:30 UTC 2007
 
-PATH=/sbin:/bin:/usr/bin:/usr/sbin
+PATH=/usr/sbin:/usr/bin
 BINARY="/usr/sbin/chronyd"
 CONFIG="/etc/chrony/chrony.conf"
 PREFIX="chrony: "
diff --git a/projectroot/etc/init.d/dropbear b/projectroot/etc/init.d/dropbear
index 1b16de20a..bec330ab2 100644
--- a/projectroot/etc/init.d/dropbear
+++ b/projectroot/etc/init.d/dropbear
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/dropbear
 NAME=dropbear
 
diff --git a/projectroot/etc/init.d/haveged b/projectroot/etc/init.d/haveged
index 1a4fc62a2..14e391320 100755
--- a/projectroot/etc/init.d/haveged
+++ b/projectroot/etc/init.d/haveged
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PATH='/sbin:/usr/sbin:/bin:/usr/bin'
+PATH='/usr/sbin:/usr/bin'
 DESC='haveged entropy daemon'
 NAME='haveged'
 DAEMON="/usr/sbin/$NAME"
diff --git a/projectroot/etc/init.d/inetd b/projectroot/etc/init.d/inetd
index 128d41a82..8fb10d994 100644
--- a/projectroot/etc/init.d/inetd
+++ b/projectroot/etc/init.d/inetd
@@ -3,7 +3,7 @@
 # This is an inetd init.d script which ist called by init(1) with [start|stop] 
as argument
 #
 
-PATH=/sbin:/bin:/usr/bin
+PATH=/usr/sbin:/usr/bin
 BINARY=/usr/sbin/inetd
 
 # --- nothing to change after this line ---
diff --git a/projectroot/etc/init.d/lighttpd b/projectroot/etc/init.d/lighttpd
index 24a17e2a0..e1b17c984 100644
--- a/projectroot/etc/init.d/lighttpd
+++ b/projectroot/etc/init.d/lighttpd
@@ -3,7 +3,7 @@
 #
 # lighttpd
 #
-PATH=/usr/bin:/usr/sbin:/bin:/sbin
+PATH=/usr/bin:/usr/sbin
 
 PREFIX="lighttpd: "
 LIGHTTPD="/usr/sbin/lighttpd"
diff --git a/projectroot/etc/init.d/lldpd b/projectroot/etc/init.d/lldpd
index 00c8240f5..a592730fb 100755
--- a/projectroot/etc/init.d/lldpd
+++ b/projectroot/etc/init.d/lldpd
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
+PATH=/usr/sbin:/usr/bin
 DESC="LLDP daemon"
 NAME=lldpd
 DAEMON=/usr/sbin/$NAME
diff --git a/pro

Re: [ptxdist] ptxdist initial impressions

2023-05-24 Thread Alexander Dahl
Hello Jookia,

as a long term user not affiliated with pengutronix I have some comments which 
might help.  See below.

Am Mittwoch, 17. Mai 2023, 18:11:31 CEST schrieb Jookia:
> Hello ptxdist friends,
> 
> I spent some time over the past few days trying to use ptxdist and
> documenting all the pain I hit in the process. This isn't a criticism
> more just anecdotal data of my experience. Hopefully it's useful to
> smooth down some rough edges.
> 
> I'm going to write this up in a psuedo-markdown format in sections,
> sorry if that breaks anyone's workflow.
> 
> 
> Documentation
> -
> 
> First up: Documentation is quite good aside from the 'Getting a working
> environment' section. I will be focusing on this today since I think it's
> probably the most critical problem with ptxdist at the moment: I expect
> that by the end of following this chapter I should have a bootable image
> of some kind and commands for using it, such as with qemu.
> 
> The first issue is that I'm told to downloaded files, but I'm not linked
> to them, quoting:
> 
> ptxdist-2023.05.0.tar.bz2
> OSELAS.BSP-Pengutronix-Example.tar.bz2 (or a similar source)
> ptxdist-2019.09.0.tar.bz2
> OSELAS.Toolchain-2019.09.1.tar.bz2
> 
> The OSELAS website is linked as ptxdist.org that doesn't mention OSELAS
> at all. There is a link to the toolchain but it's a different version.
> I managed to find a BSP for 'Generic' but it's 9 years old.

+1

That has to be improved.  There's no easy accessible single platform example 
BSP to get your feet wet, and DistroKit is nice for supporting some quite 
common SBCs, but is already quite complicated.

What's also lacking: some template or documentation on how to start from 
scratch without deriving your work from pre existing BSPs.  I tried that 
lately and put the steps online:

https://gist.github.com/LeSpocky/31af75ab63bc6f35fd71d53f06b5a50e

I dropped that link in IRC, but I got no clear signal if that's something to 
put into the official ptxdist documentation?

> The documentation says having a BSP is optional, but there's no
> instructions on how to work without one. It's probably not even a good
> idea to mention this, perhaps ptxdist should provide a skeleton project?
> 
> I get the distinct impression the right solution here is to use
> DistroKit as the starter BSP. This isn't mentioned anywhere in the
> documentation but is something I found out about on IRC.
> 
> I'm also not a fan of suggesting installing ptxdist. It seems strange to
> lock yourself to a repository of packages that you will need to tweak
> and fix. I would like to see more support for running it in tree.

Maybe this is some kind of misunderstanding.  You would never touch the 
distributed/installed ptxdist, but "overwrite" things by placing package rules 
with the same name in your BSP.  For example if you need a version bump for 
libfoo, you could copy /usr/local/lib/ptxdist-2100.01.0/rules/libfoo.make to 
your BSP at rules/libfoo.make and adapt it to your needs.

> Likewise with installing a toolchain it seems a bit weird to suggest
> Debian packages and going through how to extract these, but not offer a
> tarball.
> 
> The page also talks about building a toolchain. This is kind of
> a confusing process and seems way out of scope for getting up and
> running. If things are this difficult maybe ptxdist should provide a
> container or something with batteries included.
> 
> My setup
> 
> 
> That said I managed to get a setup going like this:
> 
> ```
> git clone https://git.pengutronix.de/git/ptxdist
> git clone https://git.pengutronix.de/git/DistroKit
> wget
> https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/t
> arballs/armv7-eabihf--glibc--bleeding-edge-2022.08-1.tar.bz2 tar -xvf
> armv7-eabihf--glibc--bleeding-edge-2022.08-1.tar.bz2
> cd ptxdist
> ./autogen.sh
> ./configure
> make -j8
> cd ..
> export PATH=$PATH:$PWD/ptxdist/bin
> mkdir project
> cd project
> ln -s ../DistroKit base
> ptxdist platform base/configs/platform-v7a/platformconfig
> ptxdist toolchain ../armv7-eabihf--glibc--bleeding-edge-2022.08-1/bin
> ptxdist migrate
> ptxdist menu
> # go to platformconfig -> architecture -> toolchain
> # set toolchain to arm-buildroot-linux-gnueabihf
> # disable toolchain version checks
> # set glibc version to 2.35
> rm selected_platformconfig
> ln -s configs/platform-v7a/platformconfig selected_platformconfig

I think this is a misunderstanding from using layers.  First you select base/
configs/platform-v7a/platformconfig as your platformconfig.  Then with ptxdist 
menu -> platformconfig you make changes, but those are not put to the base 
layer, but to your top layer.  ptxdist creates configs/platform-v7a/
platformconfig and configs/platform-v7a/platformconfig.diff then.  On the next 
invocation ptxdist detects your selected_platformconfig points to the base 
layer although you have a different platformconfig in the top layer, and it 
probably reports that in some way.  You could

Re: [ptxdist] ptxdist go problem

2023-03-29 Thread Alexander Dahl
Hello,

Am Mon, Mar 27, 2023 at 11:20:33AM + schrieb Herczig, Adam:
> Dear support,

This is a public mailing list, no commercial support.  And it's for
ptxdist itself, not for the BSP you're trying to build.  You might
want to ask the vendor too, or at least put them in Cc?

> My name is Adam Herczig from IP Camp Kft, Hungary. My company bought a Wago 
> plc type 750-8212 controller.
> I realized there is an sdk for c/c++ developing on github 
> (https://github.com/WAGO/pfc-firmware-sdk-G2).
> I did everything step by step according to the readme. However when I reached 
> "5.1) Compile all packages of PFC firmware"
> and try to run "ptxdist go -q" command I got an error
> 
> [/usr/local/lib/ptxdist-2020.08.0/rules/post/ptxd_make_world_prepare.make:20: 
> /home/user/work/WAGO/ptxproj/platform-wago-pfcXXX/state/host-pkg-config.prepare]
>  Error 2
> I checked the ptxd_make_world_prepare.make file in line 20 where make try to 
> call this 
> /home/user/work/WAGO/ptxproj/platform-wago-pfcXXX/state/host-pkg-config.prepare
>  file
> which basically does not exist. I guess this is the meaning of Error 2. 
> Without this file I cannot compile and I am stuck in the middle.

Try this:

ptxdist prepare host-pkg-config

Should give you more output compared to running with the -q option for
quiet. ;-)

Maybe you want to have a look at https://www.ptxdist.org/doc/ too?

> I pulled from master branch.
> 
> My linux system is a wsl :

You mean you build on Windows?  o.O

Never tried that TBH.

> No LSB modules are available.
> Distributor ID: Ubuntu
> Description:Ubuntu 20.04.6 LTS
> Release:20.04
> Codename:   focal
> 
> However I tried to work over docker but got the same result.
> 
> Do you have any useful idea or this is a bug ? Have you noticed this issue 
> previously or any similar?

FWIW: When I try to build that BSP, I got a different error:


/mnt/data/adahl/src/pfc-firmware-sdk-G2/rules/post/dependencies-for-parallel-build.make:144:
 A package named pekwm does not exist

This seems to be an issue of the BSP itself, no ptxdist issue.
Opened a ticket for that:
https://github.com/WAGO/pfc-firmware-sdk-G2/issues/6

Greets
Alex

> Much appreciate any kind of answer or idea.
> 
> Best Regards,
> Ádám Herczig
> Software Developer
> [cid:image001.png@01D960AE.FCD12040]
> H-1113 Budapest
> Bocskai Street 134 - 146.
> Hungary
> +36 70 947 9484
> adam.herc...@ip-camp.com
> [signature_3082424764]
> 
> 






Re: [ptxdist] [PATCH] libmodbus: adapt help text to the reality

2023-03-09 Thread Alexander Dahl
Hei hei,

Am Thu, Mar 09, 2023 at 10:29:06AM +0100 schrieb Michael Olbrich:
> On Thu, Mar 09, 2023 at 10:08:50AM +0100, Juergen Borleis wrote:
> > With change a08638d93d19624cf3c20d033ea8f61b96c43408
> >   "libmodbus: version bump 2.0.4 -> 3.0.8"
> > libmodbus changed from 2.x.x to 3.0.x version like libmodbus3 did.
> > 
> > And with change a76b31d5b637bc89ca26e7fa81503cbc7632b666
> >   "libmodbus3: version bump 3.0.6 -> 3.1.4"
> > libmodbus3 switched to the recent to 3.1.x version.
> 
> Hmmm, it feels like there were supposed to be for two packages, one for
> version 2.x and one for 3.x, at least it started that way.
> I don't really know anything about libmodbus. Are the two versions
> incompatible?

Yes, 3.0.x and 3.1.x have incompatible APIs and probably ABIs.
3.0.x has .so version 5 and 3.1.x has .so version 6, at least to my
notes and the code trying to distinguish this.

Greets
Alex

> 
> Ladislav, you touched it last, you did the "2.0.4 -> 3.0.8". Do you have
> any insight here?
> 
> Michael
> 
> 
> > Signed-off-by: Juergen Borleis 
> > ---
> >  rules/libmodbus.in  | 4 ++--
> >  rules/libmodbus3.in | 4 ++--
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/rules/libmodbus.in b/rules/libmodbus.in
> > index f4f71fc..89ab189 100644
> > --- a/rules/libmodbus.in
> > +++ b/rules/libmodbus.in
> > @@ -4,7 +4,7 @@ config LIBMODBUS
> > prompt "libmodbus"
> > help
> >   libmodbus is a library that implements the Modbus/RTU protocol
> > - (TCP and serial).
> > + (TCP and serial) (Version 3.0.x).
> >  
> > - WWW: https://launchpad.net/libmodbus
> > + WWW: https://libmodbus.org/
> >  
> > diff --git a/rules/libmodbus3.in b/rules/libmodbus3.in
> > index 3a950d7..d69a882 100644
> > --- a/rules/libmodbus3.in
> > +++ b/rules/libmodbus3.in
> > @@ -4,7 +4,7 @@ config LIBMODBUS3
> > prompt "libmodbus3"
> > help
> >   libmodbus is a library that implements the Modbus protocol
> > - (TCP and serial) (Version 3.0.x).
> > + (TCP and serial) (Version 3.1.x).
> >  
> > - WWW: http://http://libmodbus.org/
> > + WWW: https://libmodbus.org/
> >  
> > -- 
> > 2.30.2
> > 
> > 
> > 
> 
> -- 
> Pengutronix e.K.   | |
> Steuerwalder Str. 21   | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany  | Phone: +49-5121-206917-0|
> Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
> 



Re: [ptxdist] [PATCH] ptxd_make_world_compile_commands_filter: Fix grep for uptodate check

2023-02-15 Thread Alexander Dahl
Moin,

Am Fri, Feb 10, 2023 at 05:02:58PM +0100 schrieb Uwe Kleine-König:
> The intend here is to check the return code of grep, no need to call [
> (i.e. test). This fixes an error message:
> 
>   environment: line 10: [: syntax error: `-q' unexpected
> 
> Additionally add -e to force interpretation of
> "${PTXDIST_CROSS_CPPFLAGS}" as pattern. For me
> ${PTXDIST_CROSS_CPPFLAGS} starts with -isystem; without -e this is
> interpreted as option to grep instead of pattern which makes grep emit
> 
>   grep: invalid option -- 't'
> 
> .)
> 
> Also add -F to make grep use a fixed-string compare (instead of
> interpreting ${PTXDIST_CROSS_CPPFLAGS} as regexp).

All this makes sense. Thumbs up.

> 
> Fixes: ac0aac7fc727 ("impove compile_commands.json handling")
> Signed-off-by: Uwe Kleine-König 
> ---
>  scripts/lib/ptxd_make_world_compile_commands.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/ptxd_make_world_compile_commands.sh 
> b/scripts/lib/ptxd_make_world_compile_commands.sh
> index 56d7378fa28b..2703b5497799 100644
> --- a/scripts/lib/ptxd_make_world_compile_commands.sh
> +++ b/scripts/lib/ptxd_make_world_compile_commands.sh
> @@ -21,7 +21,7 @@ ptxd_make_world_compile_commands_filter() {
>  fi
>  
>  if [ "${src_cmds}" = "${dst_cmds}" ]; then
> - if [ grep -q "${PTXDIST_CROSS_CPPFLAGS}" "${src_cmds}" ]; then
> + if grep -q -F -e "${PTXDIST_CROSS_CPPFLAGS}" "${src_cmds}"; then

Acked-by: Alexander Dahl 

Greets
Alex

>   ptxd_warning "compile_commands.json is already up to date!"
>   return
>   fi
> -- 
> 2.39.0

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN | speech censured, the first thought forbidden, the
 X  AGAINST  | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL| (Jean-Luc Picard, quoting Judge Aaron Satie)


signature.asc
Description: PGP signature


[ptxdist] target package dependency to platform

2023-01-31 Thread Alexander Dahl
Hei hei,

I'm stuck with a problem where I can not find an elegant solution for.  
Let me describe.

I have a layered BSP.  The base layer has different platformconfigs for 
hardware targets with different SoC architectures, let's say the 
PTXCONF_PLATFORM is "pla" on one and "plb" on the other.  (I can not build the 
whole stuff for one platform only, two platforms are strictly required.)

There is a more or less ordinary CMake based target application in the base 
layer, let's say in "base/rules/myapp.{in,make}", because that application is 
needed on both platforms.

The two upper layers select the different platforms with different toolchains 
and both also enable "myapp".  (Yes, I could also have it all in a single 
layer BSP with two working copies and building one platform per working copy.  
Doesn't change the problem.)

myapp depends on multiple libraries, some of them hardware specific.  So for 
platform "pla" it needs "libmyliba" and for platform "plb" it does not.

In "base/rules/myapp.make" I pass PTXCONF_PLATFORM as a build time option to 
CMake like this:

MYAPP_CONF_OPT += -DHARDWARE_NAME=$(PTXCONF_PLATFORM)

Depending on "HARDWARE_NAME" I call `find_package(myliba)` in "CMakeLists.txt" 
of myapp.

I could do a "select LIBMYLIBA" in "base/rules/myapp.in" unconditionally, and 
that would make the build successful.  In the BSP for platform "pla" CMake 
would look for libmyliba and link and on the target it would be used at 
runtime just fine.  In the BSP for platform "plb" CMake would not look for it, 
would not complain, myapp would run happily on the target without using 
libmyliba just fine.

However, libmyliba would be built for platform "plb" and it would be copied 
over to "plb" target and take space, but never be used there.  Build time for 
it would be completely wasted.  Even worse, user might find it on target and 
wonder what it means, although it's useless on platform "plb".

I could _not_ add that "select LIBMYLIBA" and build would fail for target 
"pla" dependending on package build order.  Also dependencies in opkg packages 
would not be correct then.

What also does not work is this (in "base/rules/myapp.in"):

select LIBMYLIBA if PLATFORM = "pla"

This is valid syntax from Kconfig point of view, but PLATFORM is just not 
defined here at all.  I assume configs/ptxconfig and configs/platform-pla/
platformconfig are somewhat distinct Kconfig spaces and one can not simply 
reference to Kconfig options from the other side.

Interestingly I can do `ptxdist print PTXCONF_PLATFORM` and `ptxdist print 
PTXCONF_MYAPP` and ptxdist prints variables from both Kconfig spaces.  Also I 
can successfully use both in base/rules/myapp.make and that's at least 
somewhat misleading. (Misleading as in: Why can I use both here but not 
there?)

That's where I'm stuck.  Of course I looked through ptxdist git sources to 
find hints on how to solve this dilemma, but without luck.

Would be happy if anyone could give a hint or suggest a solution.

Greets
Alex






Re: [ptxdist] [PATCH] doc: Files are added to _LICENSE_FILES

2023-01-22 Thread Alexander Dahl
Moin,

Am Thu, Jan 19, 2023 at 05:21:32PM +0100 schrieb Uwe Kleine-König:
> This fixes a copy-n-paste error. _LICENSE_FILES is supposed to
> contain a list of files, not _LICENSE.
> 
> Signed-off-by: Uwe Kleine-König 
> ---
>  doc/dev_licenses.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/dev_licenses.rst b/doc/dev_licenses.rst
> index 0bb1c8d77c5e..6aed9daaca97 100644
> --- a/doc/dev_licenses.rst
> +++ b/doc/dev_licenses.rst
> @@ -195,7 +195,7 @@ Adding license files to PTXdist packages
>  
>  The SPDX license identifier of the package goes into the ``_LICENSE``
>  variable in the respective package rule file.
> -All relevant files identified in the steps above are then added to the 
> variable ``_LICENSE``,
> +All relevant files identified in the steps above are then added to the 
> variable ``_LICENSE_FILES``,
>  including a checksum so that PTXdist complains when they change.

Reviewed-by: Alexander Dahl 

Greets
Alex

>  
>  Example:
> -- 
> 2.39.0
> 
> 



Re: [ptxdist] [PATCH v2] dropbear: version bump 2022.82 -> 2022.83

2023-01-03 Thread Alexander Dahl
Hello,

Am Montag, 2. Januar 2023, 18:25:23 CET schrieb Ladislav Michl:
> From: Ladislav Michl 
> 
> Remove local patch which is already merged upstream.
> DROPBEAR_SK_KEYS config option now replaces separate
> DROPBEAR_SK_ECDSA and DROPBEAR_SK_ED25519 options, so
> generate localoptions.h accordingly.
> 
> Signed-off-by: Ladislav Michl 
> ---
>  CHANGES:
>  -v2: use DROPBEAR_SK_KEYS
> 
>  ...d-failure-use-DROPBEAR_PRIO_LOWDELAY.patch | 21 ---
>  patches/dropbear-2022.82/series   |  4 
>  rules/dropbear.make   |  7 +++
>  3 files changed, 3 insertions(+), 29 deletions(-)
>  delete mode 100644
> patches/dropbear-2022.82/0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDE
> LAY.patch delete mode 100644 patches/dropbear-2022.82/series
> 
> diff --git
> a/patches/dropbear-2022.82/0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOW
> DELAY.patch
> b/patches/dropbear-2022.82/0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOW
> DELAY.patch deleted file mode 100644
> index 8c46daf9c..0
> ---
> a/patches/dropbear-2022.82/0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOW
> DELAY.patch +++ /dev/null
> @@ -1,21 +0,0 @@
> -From: Matt Johnston 
> -Date: Sat, 23 Apr 2022 22:33:31 +0800
> -Subject: [PATCH] Fix X11 build failure, use DROPBEAR_PRIO_LOWDELAY
> -
> 
> - svr-x11fwd.c | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/svr-x11fwd.c b/svr-x11fwd.c
> -index 353cb12e8dd1..5d9e6a96f577 100644
>  a/svr-x11fwd.c
> -+++ b/svr-x11fwd.c
> -@@ -206,7 +206,7 @@ void x11cleanup(struct ChanSess *chansess) {
> - }
> -
> - static int x11_inithandler(struct Channel *channel) {
> --channel->prio = DROPBEAR_CHANNEL_PRIO_INTERACTIVE;
> -+channel->prio = DROPBEAR_PRIO_LOWDELAY;
> - return 0;
> - }
> -
> diff --git a/patches/dropbear-2022.82/series
> b/patches/dropbear-2022.82/series deleted file mode 100644
> index 87840318b..0
> --- a/patches/dropbear-2022.82/series
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -# generated by git-ptx-patches
> -#tag:base --start-number 1
> -0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch
> -# dacc85cb839b0a9eec87bf2d3fc2463f  - git-ptx-patches magic
> diff --git a/rules/dropbear.make b/rules/dropbear.make
> index e86b8bf43..dfdbe572d 100644
> --- a/rules/dropbear.make
> +++ b/rules/dropbear.make
> @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_DROPBEAR) += dropbear
>  #
>  # Paths and names
>  #
> -DROPBEAR_VERSION := 2022.82
> -DROPBEAR_MD5 := 7a4a5f2c6d23ff2e6627c97d7c1aeceb
> +DROPBEAR_VERSION := 2022.83
> +DROPBEAR_MD5 := a75a34bcc03cacf71a2db9da3b7c94a5
>  DROPBEAR := dropbear-$(DROPBEAR_VERSION)
>  DROPBEAR_SUFFIX  := tar.bz2
>  DROPBEAR_URL :=
> https://matt.ucc.asn.au/dropbear/releases/$(DROPBEAR).$(DROPBEAR_SUFFIX) @@
> -215,8 +215,7 @@ else
>  endif
> 
>   @echo "ptxdist: disabling u2f security key support"
> - @echo "#define DROPBEAR_SK_ECDSA 0" >> $(DROPBEAR_LOCALOPTIONS)
> - @echo "#define DROPBEAR_SK_ED25519 0" >> $(DROPBEAR_LOCALOPTIONS)
> + @echo "#define DROPBEAR_SK_KEYS 0" >> $(DROPBEAR_LOCALOPTIONS)
> 
>  # key exchange algorithm
>  ifdef PTXCONF_DROPBEAR_DH_GROUP14_SHA256

Tested-by: Alexander Dahl 

Greets






Re: [ptxdist] [PATCH] dropbear: version bump 2022.82 -> 2022.83

2023-01-02 Thread Alexander Dahl
Hello Ladislav,

Am Mittwoch, 28. Dezember 2022, 12:53:13 CET schrieb Ladislav Michl:
> From: Ladislav Michl 
> 
> Remove local patch which is already merged upstream.
> 
> Signed-off-by: Ladislav Michl 
> ---
>  ...d-failure-use-DROPBEAR_PRIO_LOWDELAY.patch | 21 ---
>  patches/dropbear-2022.82/series   |  4 
>  rules/dropbear.make   |  4 ++--
>  3 files changed, 2 insertions(+), 27 deletions(-)
>  delete mode 100644
> patches/dropbear-2022.82/0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDE
> LAY.patch delete mode 100644 patches/dropbear-2022.82/series
> 
> diff --git
> a/patches/dropbear-2022.82/0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOW
> DELAY.patch
> b/patches/dropbear-2022.82/0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOW
> DELAY.patch deleted file mode 100644
> index 8c46daf9c..0
> ---
> a/patches/dropbear-2022.82/0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOW
> DELAY.patch +++ /dev/null
> @@ -1,21 +0,0 @@
> -From: Matt Johnston 
> -Date: Sat, 23 Apr 2022 22:33:31 +0800
> -Subject: [PATCH] Fix X11 build failure, use DROPBEAR_PRIO_LOWDELAY
> -
> 
> - svr-x11fwd.c | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/svr-x11fwd.c b/svr-x11fwd.c
> -index 353cb12e8dd1..5d9e6a96f577 100644
>  a/svr-x11fwd.c
> -+++ b/svr-x11fwd.c
> -@@ -206,7 +206,7 @@ void x11cleanup(struct ChanSess *chansess) {
> - }
> -
> - static int x11_inithandler(struct Channel *channel) {
> --channel->prio = DROPBEAR_CHANNEL_PRIO_INTERACTIVE;
> -+channel->prio = DROPBEAR_PRIO_LOWDELAY;
> - return 0;
> - }
> -
> diff --git a/patches/dropbear-2022.82/series
> b/patches/dropbear-2022.82/series deleted file mode 100644
> index 87840318b..0
> --- a/patches/dropbear-2022.82/series
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -# generated by git-ptx-patches
> -#tag:base --start-number 1
> -0001-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch
> -# dacc85cb839b0a9eec87bf2d3fc2463f  - git-ptx-patches magic
> diff --git a/rules/dropbear.make b/rules/dropbear.make
> index e86b8bf43..fcfe8bce4 100644
> --- a/rules/dropbear.make
> +++ b/rules/dropbear.make
> @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_DROPBEAR) += dropbear
>  #
>  # Paths and names
>  #
> -DROPBEAR_VERSION := 2022.82
> -DROPBEAR_MD5 := 7a4a5f2c6d23ff2e6627c97d7c1aeceb
> +DROPBEAR_VERSION := 2022.83
> +DROPBEAR_MD5 := a75a34bcc03cacf71a2db9da3b7c94a5
>  DROPBEAR := dropbear-$(DROPBEAR_VERSION)
>  DROPBEAR_SUFFIX  := tar.bz2
>  DROPBEAR_URL :=
> https://matt.ucc.asn.au/dropbear/releases/$(DROPBEAR).$(DROPBEAR_SUFFIX)

The announcement contains this:

„- >> DROPBEAR_SK_KEYS config option now replaces separate DROPBEAR_SK_ECDSA
  and DROPBEAR_SK_ED25519 options.“

These options are explicitly disabled in rules/dropbear.make and I think that 
line(s) should be changed to the new config option.

Greets
Alex









Re: [ptxdist] [PATCH] monit: Add dependency to nsl

2022-11-21 Thread Alexander Dahl
Hello Michael,

Am Fri, Nov 18, 2022 at 12:32:25PM +0100 schrieb Michael Olbrich:
> On Mon, Oct 24, 2022 at 03:01:10PM +0200, Alexander Dahl wrote:
> > Am Montag, 24. Oktober 2022, 14:28:50 CEST schrieb Alexander Dahl:
> > > Am Montag, 24. Oktober 2022, 10:30:35 CEST schrieb Alexander Dahl:
> > > > Console log is flooded with this:
> > > > /usr/bin/monit: error while loading shared libraries: libnsl.so.1:
> > > > cannot open shared object file: No such file or directory
> > > > 
> > > > Output of readelf is this:
> > > > Dynamic section at offset 0xa5a50 contains 35 entries:
> > > >   TagType Name/Value
> > > >  
> > > >  0x0001 (NEEDED) Shared library: 
> > > > [librt.so.1]
> > > >  0x0001 (NEEDED) Shared library: [libm.so.6]
> > > > 
> > > >  0x0001 (NEEDED) Shared library:
> > > > [libpthread.so.0] 0x0001 (NEEDED) Shared 
> > > > library:
> > > > [libcrypt.so.1] 0x0001 (NEEDED) Shared library:
> > > > [libresolv.so.2] 0x0001 (NEEDED) Shared library:
> > > > [libnsl.so.1] 0x0001 (NEEDED) Shared library:
> > > > [libc.so.6] 0x0001 (NEEDED) Shared library:
> > > > [ld-linux-armhf.so.3]
> > > > 
> > > > Console log flooding is gone after setting the option.
> > > > 
> > > > Signed-off-by: Alexander Dahl 
> > > > ---
> > > > 
> > > >  rules/monit.in | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/rules/monit.in b/rules/monit.in
> > > > index 383433e78..9db337331 100644
> > > > --- a/rules/monit.in
> > > > +++ b/rules/monit.in
> > > > @@ -3,6 +3,7 @@
> > > > 
> > > >  menuconfig MONIT
> > > >  
> > > > tristate
> > > > prompt "monit "
> > > > 
> > > > +   select LIBC_NSL
> > > > 
> > > > select OPENSSL if MONIT_SSL
> > > > select ZLIB if MONIT_ZLIB
> > > > select BUSYBOX_START_STOP_DAEMON if MONIT_STARTSCRIPT
> > > 
> > > Well, this works with OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf
> > > which I used up to now in the BSP in question.  However on another BSP 
> > > with
> > > OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf I get the following
> > > error:
> > > 
> > >   [74/86] started : glibc.targetinstall
> > >   install_copy_toolchain_lib: libnsl.so not found
> > > 
> > > Both BSPs are still on ptxdist-2021.03.0 … what's the best way to quickly
> > > solve this?  Upgrade to recent ptxdist and toolchain might be possible, 
> > > but
> > > that takes quite some time, and I don't have much for that currently, so 
> > > an
> > > alternative approach would be appreciated. O:-)
> > 
> > Backported commit fd688d2239bc ("glibc: specify the major version number 
> > when 
> > installing most of the libraries") now and builds are successful again with 
> > both toolchains.  Runtime testing will follow, but I'm confident.
> 
> So, libnsl is not actually needed. It's just a broken configure script. If
> you enable PTXCONF_TARGET_LINKER_AS_NEEDED then it will be gone. 

Meanwhile I identified two more packages showing similar problems:
fcgi and log4cplus.  Both check for nsl in their prepare stages, fcgi
with autotools, and log4cplus with CMake.  However I could not tell
from their source or version control, why they do it.  Might be
related to usage of gethostbyname() but I'm not sure if that really
requires libnsl?

If built without PTXCONF_TARGET_LINKER_AS_NEEDED both show -lnsl in
compile stage and dependency to libnsl when inspecting with
`readelf -d`.  Those dependencies are gone when built with
PTXCONF_TARGET_LINKER_AS_NEEDED.  I read [1] and [2] to understand
that linker option and on quick glance it seems like a good idea.  Not
sure if it's safe to enable however or if that could cause unexpected
problems. (I will try, currently runtime testing builds with that
option set.)

> Or add ac_cv_lib_nsl_inet_addr=no to the _CONF_ENV. A patch with
> that should show up im master in the near future.

I backported this to monit in my BSP, and it worked.  Should we do
something similar with fcgi and log4cplus, or is it sufficient to
either enable PTXCONF_GLIBC_NSL or PTXCONF_TARGET_LINKER_AS_NEEDED?

Greets
Alex

[1] https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed
[2] https://www.man7.org/linux/man-pages/man1/ld.1.html



Re: [ptxdist] e2fsprogs: possibly broken when using OSELAS.Toolchain 2022.10.0

2022-11-17 Thread Alexander Dahl
Hei hei,

Am Thu, Nov 17, 2022 at 03:52:18PM +0100 schrieb Felix Mellmann:
> On 17.11.22 08:45, Michael Olbrich wrote:
> > On Wed, Nov 16, 2022 at 06:40:02PM +0100, Christian Melki wrote:
> > > On 11/16/22 15:08, Felix Mellmann wrote:
> > > > On 16.11.22 08:17, Michael Olbrich wrote:
> > > > > On Sun, Nov 13, 2022 at 06:32:01PM +0100, Felix Mellmann wrote:
> > > > > > I've just run into a linker problem when building e2fsprogs 1.46.5 
> > > > > > using
> > > > > > OSELAS.Toolchain 2022.10.0 (arm-v7a-linux-gnueabihf):
> > > > > > 
> > > > > > 
> > > > > > -
> > > > > > target: e2fsprogs.compile
> > > > > > -
> > > > > > 
> > > > > > make: Entering directory
> > > > > > '/PTXdist/BSP/platform-imx6/build-target/e2fsprogs-1.46.5'
> > > > > > cd ./util ; make subst
> > > > > > make[1]: Entering directory
> > > > > > '/PTXdist/BSP/platform-imx6/build-target/e2fsprogs-1.46.5/util'
> > > > > >       CREATE dirpaths.h
> > > > > >       CC subst.c
> > > > > >       LD subst
> > > > > > lto1: fatal error: bytecode stream in file 'subst.o' generated with 
> > > > > > LTO
> > > > > > version 11.2 instead of the expected 11.3
> > > > > > compilation terminated.
> > > > > > lto-wrapper: fatal error: /usr/bin/gcc returned 1 exit status
> > > > > > compilation terminated.
> > > > > > /usr/bin/ld: error: lto-wrapper failed
> > > > > > collect2: error: ld returned 1 exit status
> > > > > > make[1]: *** [Makefile:369: subst] Error 1
> > > > > > make[1]: Leaving directory
> > > > > > '/PTXdist/BSP/platform-imx6/build-target/e2fsprogs-1.46.5/util'
> > > > > > make: *** [Makefile:194: util/subst] Error 2
> > > > > > make: Leaving directory
> > > > > > '/PTXdist/BSP/platform-imx6/build-target/e2fsprogs-1.46.5'
> > > > > > make: ***
> > > > > > [/usr/local/lib/ptxdist-2022.11.0/rules/post/ptxd_make_world_compile.make:20:
> > > > > > /PTXdist/BSP/platform-imx6/state/e2fsprogs.compile] Error 2
> > > > > > 
> > > > > > The error vanishes if ./configure is called with "--disable-lto" 
> > > > > > instead of
> > > > > > "--enable-lto".
> > > > > > 
> > > > > > As I'm no expert at this level, I hope anyone could put some hints 
> > > > > > about the
> > > > > > issue.
> > > > > Is this a clean build? I've not seen this here with the same 
> > > > > toolchain and
> > > > > the error looks like you're mixing compiler versions.
> > > > It was a clean build, yes. But finally - ccache messed it up. After
> > > > clearing the cache the build was successful.
> > > > 
> > > > Well I should loose my trust in ccache ... Please drop my patch.
> > > > 
> > > I still think that LTO should not be enabled per project like that.
> > It's a good point. So I may apply the patch with a modified commit message.
> > I'm not sure yet.
> > 
> > > Regardless if it's working or not.
> > > A global for LTO would be much better.
> > Sneaking it in via compiler wrappers does not work. It breaks quite a few
> > packages (I tried that some time ago). But maybe a global option that
> > selected packages can use to enable it conditionally.
> 
> Grepping through the packages reveals, that 8 packages explicitly disable
> LTO and only e2fsprogs enables LTO. For the rest I'm unsure about the
> defaults. So what should a global LTO option look like and what should be
> the consequences? (i.e. replace all the enable/disable-lto with the global
> option? Enforce a setting for all packages not configuring a default?)
> 
> @Michael: you propose that I should resend the patch with a different commit
> message? Do you have a proposal? I really don't have a clue why LTO is
> enabled for this peculiar package and its consequences and I unfortunately
> run into a random ccache issue ..

According to `git blame rules/e2fsprogs.make` that option was added
with commit 471f5e0889e7 ("e2fsprogs: version bump 1.44.4 -> 1.44.6")
in 2020, but the commit message is rather generic.

Greets
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN | speech censured, the first thought forbidden, the
 X  AGAINST  | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL| (Jean-Luc Picard, quoting Judge Aaron Satie)


signature.asc
Description: PGP signature


Re: [ptxdist] Speed up targetinstall of certain packages

2022-11-08 Thread Alexander Dahl
Hello everyone,

Am Tue, Nov 08, 2022 at 11:13:44AM +0100 schrieb Christian Melki:
> 
> 
> On 11/4/22 8:12 PM, Alexander Dahl wrote:
> > Not sure how that should behave.  However if you want to speed up the
> > build: make sure you call ptxdist with -q or --quiet parameter.  The
> > output on screen takes suprisingly much time, even with modern
> > terminals, and especially when doing targetinstall of many many files
> > (as usually the case with web frontends. been there, done that.)
> > 
> > Greets
> > Alex
> > 
> 
> I have a slight disagreement here. I don't think the console is slow.

You're right.  As already discussed in IRC yesterday: I did some
benchmarks yesterday on the targetinstall stage of a package using
install_tree to install a folder containing 900+ files.  Turns out: no
significant difference between running with or without --quiet.

Greets
Alex

> So I did some investigation, mostly since the slowness bugs me too.
> I did a:
> export PS4='+[${EPOCHREALTIME}][${BASH_SOURCE}:${LINENO}]: 
> ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'; set -x;
> as time measurement and trace in the shellscript in question (mostly 
> scripts/lib/ptxd_make_xpkg_pkg.sh).
> This pretty linear progressive cpu consumption, albeit the big chunks were 
> due to calling of external binaries.
> 
> Then I did a timezone package clean and targetinstall.
> When targetinstalling a zone there was calls to several binaries.
> 
> For one zone I had external calls to (in order):
> echo, mkdir, printf(?), flock, ls, rm, mkdir, flock, mkdir, flock, mkdir, 
> flock, mkdir, flock, mkdir, flock, mkdir, mkdir, mkdir, mkdir, mkdir, 
> install, install, chmod, chmod, chown, echo.
> 
> Some of these could be internal builtins, but the consumed time suggested 
> otherwise.
> Either way. Each install took about 26 ms and I could account the majority of 
> that time in forking external programs and waiting for them to return.
> 
> So my conclusion is: The whole thing is a bit slow and bash doesn't help.
> 
> Regards,
> Christian
> 
> > > 
> > > Thanks for any feedback.
> > > BR,
> > > Christian
> > 
> 



Re: [ptxdist] Speed up targetinstall of certain packages

2022-11-04 Thread Alexander Dahl
Hello Christian,

Am Fri, Nov 04, 2022 at 03:37:02PM + schrieb Gieseler, Christian:
> Hello,
> 
> I have question regarding the speedup of daily work.
> 
> We have frontend and backend of our webgui deployed with separate packages. 
> Only task of these package is to deploy the files with 
> 
> @$(call install_tree, web-frontend, -, -, $(WEB_FRONTEND_DIR)/var-www/, 
> /var/www/,no)
> 
> Compile and install stages are empty. The just call targetinfo and touch to 
> skip the stages.
> 
> The frontend depends on the backend and the backend obviously depends on our 
> application which is called by the backend. 
> So our web-frontend.in file looks like this:
> ## SECTION=project_specific
> 
> config WEB_FRONTEND
>   bool
>   select APP_LAYER
>   select WEB_BACKEND
>   prompt "e-mode Web Frontend"
>   help
> 
> As expected if i clean and compile APP_LAYER the targetinstallstage of 
> Backend and Frontend are executed again. However this is only a Run-Time only 
> dependency. It is a third-party archive and install_tree takes quite some 
> time even on fast build hosts. Even it if is just a minute it is annoying to 
> spend the time waiting during image creation. Trying to solve that i found 
> "if RUNTIME"  für Run-Time only Dependencys in the documentation here:
> 
> https://www.ptxdist.org/doc/daily_work_section.html#controlling-package-dependencies-in-more-detail
> 
> So my expectation would be that if i change the webfrontend.in file like this:
> 
> config WEB_FRONTEND
>   bool
>   select APP_LAYERif RUNTIME
>   select WEB_BACKEND   if RUNTIME
>   prompt "e-mode Web Frontend"
>   help

That sounds reasonable and I would have done it the same.

> The "if RUNTIME" would make sure that the targetinstall stage is not executed 
> again if i just execute a "ptxdist clean app-layer" followed by a "ptxdist 
> images". Same with ptxdist clean root; ptxdist images. It is clear that all 
> targetinstall stages are executed again, but i would expect that the 
> web-frontend is deployed earlier if no build dependency is given.
> 
> Am i missing something, oder is the "if RUNTIME" Switch not working properly 
> in my ptxdist-2018.12 version? Or does it have no effect on targetinstall 
> stages?

Not sure how that should behave.  However if you want to speed up the
build: make sure you call ptxdist with -q or --quiet parameter.  The
output on screen takes suprisingly much time, even with modern
terminals, and especially when doing targetinstall of many many files
(as usually the case with web frontends. been there, done that.)

Greets
Alex

> 
> Thanks for any feedback.
> BR,
> Christian

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN | speech censured, the first thought forbidden, the
 X  AGAINST  | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL| (Jean-Luc Picard, quoting Judge Aaron Satie)


signature.asc
Description: PGP signature


Re: [ptxdist] [PATCH] monit: Add dependency to nsl

2022-10-24 Thread Alexander Dahl
Hello,

Am Montag, 24. Oktober 2022, 14:28:50 CEST schrieb Alexander Dahl:
> Hei hei,
> 
> Am Montag, 24. Oktober 2022, 10:30:35 CEST schrieb Alexander Dahl:
> > Console log is flooded with this:
> > /usr/bin/monit: error while loading shared libraries: libnsl.so.1:
> > cannot open shared object file: No such file or directory
> > 
> > Output of readelf is this:
> > Dynamic section at offset 0xa5a50 contains 35 entries:
> >   TagType Name/Value
> >  
> >  0x0001 (NEEDED) Shared library: [librt.so.1]
> >  0x0001 (NEEDED) Shared library: [libm.so.6]
> > 
> >  0x0001 (NEEDED) Shared library:
> > [libpthread.so.0] 0x0001 (NEEDED) Shared library:
> > [libcrypt.so.1] 0x0001 (NEEDED) Shared library:
> > [libresolv.so.2] 0x0001 (NEEDED) Shared library:
> > [libnsl.so.1] 0x0001 (NEEDED) Shared library:
> > [libc.so.6] 0x0001 (NEEDED) Shared library:
> > [ld-linux-armhf.so.3]
> > 
> > Console log flooding is gone after setting the option.
> > 
> > Signed-off-by: Alexander Dahl 
> > ---
> > 
> >  rules/monit.in | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/rules/monit.in b/rules/monit.in
> > index 383433e78..9db337331 100644
> > --- a/rules/monit.in
> > +++ b/rules/monit.in
> > @@ -3,6 +3,7 @@
> > 
> >  menuconfig MONIT
> >  
> > tristate
> > prompt "monit "
> > 
> > +   select LIBC_NSL
> > 
> > select OPENSSL if MONIT_SSL
> > select ZLIB if MONIT_ZLIB
> > select BUSYBOX_START_STOP_DAEMON if MONIT_STARTSCRIPT
> 
> Well, this works with OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf
> which I used up to now in the BSP in question.  However on another BSP with
> OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf I get the following
> error:
> 
>   [74/86] started : glibc.targetinstall
>   install_copy_toolchain_lib: libnsl.so not found
> 
> Both BSPs are still on ptxdist-2021.03.0 … what's the best way to quickly
> solve this?  Upgrade to recent ptxdist and toolchain might be possible, but
> that takes quite some time, and I don't have much for that currently, so an
> alternative approach would be appreciated. O:-)

Backported commit fd688d2239bc ("glibc: specify the major version number when 
installing most of the libraries") now and builds are successful again with 
both toolchains.  Runtime testing will follow, but I'm confident.

Greets
Alex






Re: [ptxdist] [PATCH] monit: Add dependency to nsl

2022-10-24 Thread Alexander Dahl
Hei hei,

Am Montag, 24. Oktober 2022, 10:30:35 CEST schrieb Alexander Dahl:
> Console log is flooded with this:
> 
> /usr/bin/monit: error while loading shared libraries: libnsl.so.1:
> cannot open shared object file: No such file or directory
> 
> Output of readelf is this:
> 
> Dynamic section at offset 0xa5a50 contains 35 entries:
>   TagType Name/Value
>  0x0001 (NEEDED) Shared library: [librt.so.1]
>  0x0001 (NEEDED) Shared library: [libm.so.6]
>  0x0001 (NEEDED) Shared library:
> [libpthread.so.0] 0x0001 (NEEDED) Shared library:
> [libcrypt.so.1] 0x0001 (NEEDED) Shared library:
> [libresolv.so.2] 0x0001 (NEEDED) Shared library:
> [libnsl.so.1] 0x0001 (NEEDED) Shared library:
> [libc.so.6] 0x0001 (NEEDED) Shared library:
> [ld-linux-armhf.so.3]
> 
> Console log flooding is gone after setting the option.
> 
> Signed-off-by: Alexander Dahl 
> ---
>  rules/monit.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/rules/monit.in b/rules/monit.in
> index 383433e78..9db337331 100644
> --- a/rules/monit.in
> +++ b/rules/monit.in
> @@ -3,6 +3,7 @@
>  menuconfig MONIT
>   tristate
>   prompt "monit "
> + select LIBC_NSL
>   select OPENSSL if MONIT_SSL
>   select ZLIB if MONIT_ZLIB
>   select BUSYBOX_START_STOP_DAEMON if MONIT_STARTSCRIPT

Well, this works with OSELAS.Toolchain-2018.02.0/arm-v7a-linux-gnueabihf which 
I used up to now in the BSP in question.  However on another BSP with 
OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf I get the following error:

  [74/86] started : glibc.targetinstall
  install_copy_toolchain_lib: libnsl.so not found

Both BSPs are still on ptxdist-2021.03.0 … what's the best way to quickly 
solve this?  Upgrade to recent ptxdist and toolchain might be possible, but 
that takes quite some time, and I don't have much for that currently, so an 
alternative approach would be appreciated. O:-)

Greets
Alex

> 
> base-commit: 30caaac3f949cf650402516f80807d22af46bd4e







[ptxdist] [PATCH] monit: Add dependency to nsl

2022-10-24 Thread Alexander Dahl
Console log is flooded with this:

/usr/bin/monit: error while loading shared libraries: libnsl.so.1: cannot 
open shared object file: No such file or directory

Output of readelf is this:

Dynamic section at offset 0xa5a50 contains 35 entries:
  TagType Name/Value
 0x0001 (NEEDED) Shared library: [librt.so.1]
 0x0001 (NEEDED) Shared library: [libm.so.6]
 0x0001 (NEEDED) Shared library: [libpthread.so.0]
 0x0001 (NEEDED) Shared library: [libcrypt.so.1]
 0x0001 (NEEDED) Shared library: [libresolv.so.2]
 0x0001 (NEEDED) Shared library: [libnsl.so.1]
 0x0001 (NEEDED) Shared library: [libc.so.6]
 0x0001 (NEEDED) Shared library: 
[ld-linux-armhf.so.3]

Console log flooding is gone after setting the option.

Signed-off-by: Alexander Dahl 
---
 rules/monit.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/monit.in b/rules/monit.in
index 383433e78..9db337331 100644
--- a/rules/monit.in
+++ b/rules/monit.in
@@ -3,6 +3,7 @@
 menuconfig MONIT
tristate
prompt "monit "
+   select LIBC_NSL
select OPENSSL if MONIT_SSL
select ZLIB if MONIT_ZLIB
select BUSYBOX_START_STOP_DAEMON if MONIT_STARTSCRIPT

base-commit: 30caaac3f949cf650402516f80807d22af46bd4e
-- 
2.30.2




Re: [ptxdist] OPKG Dependent Package

2022-10-20 Thread Alexander Dahl
Hello Pranay,

Am Donnerstag, 20. Oktober 2022, 08:29:36 CEST schrieb Joshi, Pranay:
> Hi Michael,
> 
> We are trying to build DistroKit-2019.12.0 BSP using PTXDist-2019.12.0, one
> of the dependent library is not available over web, please share the
> opkg-utils-0.4.1.tar.bz2 Library in the .tar.bz2 format.

I found a tarball named like that in our sources mirror.  You might consider 
to build a more recent version of DistroKit however.

Greets
Alex

> 
> Thanks
> 
> Pranay Joshi
> Lead Engineer-Firmware Engineering
> Drilling Services
> Baker Hughes
> 
> T +91 7208026212



opkg-utils-0.4.1.tar.bz2
Description: application/bzip-compressed-tar


Re: [ptxdist] [PATCH] libcurl: Align help texts

2022-10-12 Thread Alexander Dahl
Hello,

Am Wed, Oct 12, 2022 at 01:42:07PM +0200 schrieb Ladislav Michl:
> From: Ladislav Michl 
> 
> Signed-off-by: Ladislav Michl 
> ---
>  rules/libcurl.in | 17 +
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/rules/libcurl.in b/rules/libcurl.in
> index 36800b012..d5cf3519d 100644
> --- a/rules/libcurl.in
> +++ b/rules/libcurl.in
> @@ -11,12 +11,13 @@ menuconfig LIBCURL
>   select CA_CERTIFICATES  if LIBCURL_SSL_CA_CERTIFICATES && RUNTIME
>   select C_ARES   if LIBCURL_C_ARES
>   help
> - curl is a command line tool for transferring files with URL syntax, 
> supporting
> - FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and 
> FILE.
> - curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading,
> - HTTP form based upload, proxies, cookies, user+password authentication
> - (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume,
> - proxy tunneling and a busload of other useful tricks.
> +   curl is a command line tool for transferring files with URL syntax,
> +   supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT,
> +   LDAP, LDAPS and FILE.
> +   curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading,
> +   HTTP form based upload, proxies, cookies, user+password authentication
> +   (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume,
> +   proxy tunneling and a busload of other useful tricks.
>  
>  if LIBCURL
>  
> @@ -47,12 +48,12 @@ config LIBCURL_FILE
>  config LIBCURL_SMTP
>   bool "smtp"
>   help
> - enable smtp support for sending emails
> +   enable smtp support for sending emails
>  
>  config LIBCURL_VERBOSE
>   bool "verbose messages"
>   help
> - enable verbose messages, helpful for error indication
> +   enable verbose messages, helpful for error indication

Reviewed-by: Alexander Dahl 

Greets
Alex

>  
>  config LIBCURL_SSL
>   bool "ssl"
> -- 
> 2.32.0
> 
> 



Re: [ptxdist] OSELAS.Toolchain-2019.09.1 Building Issue

2022-10-03 Thread Alexander Dahl
Hello,

Am Mon, Oct 03, 2022 at 05:38:27PM + schrieb Joshi, Pranay:
> Hi Michael,
> 
> Thanks for your solutions.
> 
> I tried both the solution,
> 
> 1. First solution : Installed gcc9 and also changed Developer Options as 
> mentioned.
> 
> 2. Second Solution : Also used OSELAS Toolchain 2021.07.0 
> 
> But still getting issues in both the solution.
> 
> Please check attached logs for errors for both the solutions -
> Solution1: OSELAS.Toolchain-2019.09.1_Build_Error_with_gcc9
> Solution2: OSELAS.Toolchain-2021.07.0_Build_Error_1
> 
> If you have any other option that I can try please let me know.

You can use precompiled toolchains from http://debian.pengutronix.de/
… follow the instructions on that site to install.

Greets
Alex

> 
> 
> Pranay Joshi
> Lead Engineer-Firmware Engineering
> Drilling Services
> Baker Hughes
> 
> T +91 7208026212 
> 
> -Original Message-
> From: Michael Olbrich  
> Sent: Friday, September 30, 2022 3:43 PM
> To: Joshi, Pranay 
> Cc: ptxdist@pengutronix.de; ose...@community.pengutronix.de
> Subject: Re: [ptxdist] OSELAS.Toolchain-2019.09.1 Building Issue
> 
> [You don't often get email from m.olbr...@pengutronix.de. Learn why this is 
> important at https://aka.ms/LearnAboutSenderIdentification ]
> 
>   EXTERNAL EMAIL: This email originated outside of our organization. Do not 
> click on any links or open attachments from unexpected or unknown senders 
> unless you can verify the content is safe.
> 
> 
> Hi,
> 
> On Thu, Sep 29, 2022 at 03:10:40PM +, Joshi, Pranay wrote:
> > I am trying to build OSELAS Toolchain as mention in the documentation 
> > of PTXDist in the section of "Building the OSELAS.Toolchain for 
> > OSELAS.BSP-Pengutronix-Example".
> >
> > "https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ptxdist.org%2Fdoc%2Fenvironment.html&data=05%7C01%7Cpranay.joshi%40bakerhughes.com%7C26dcb0bbe1bd41f0030108daa2cc56d9%7Cd584a4b7b1f24714a578fd4d43c146a6%7C0%7C0%7C638001295777566170%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OoqOIfthzMV2pP2LWsOZA1JE%2FrvW394LkP7rakVpPKM%3D&reserved=0";.
> >
> > I am using Linux Host Machine x86_64 with Ubuntu 22.04 LTS. But 
> > getting error during building of toolchain, please check attached 
> > document for detail logs of building.
> 
> The host compiler is too new to build the toolchain. Install gcc-9/g++-9 in 
> Ubuntu and the run "ptxdist setup" and set
> 
> Developer Options   --->
>   (cpp-9) host CPP
>   (gcc-9) host CC
>   (g++-9) host CXX
> 
> Or better, update to OSELAS Toolchain 2021.07.0.
> 
> Michael
> 
> --
> Pengutronix e.K.   | |
> Steuerwalder Str. 21   | 
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pengutronix.de%2F&data=05%7C01%7Cpranay.joshi%40bakerhughes.com%7C26dcb0bbe1bd41f0030108daa2cc56d9%7Cd584a4b7b1f24714a578fd4d43c146a6%7C0%7C0%7C638001295777566170%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=voc6KDm33Le1WQigbqPcyQ9%2FQtfsA2FSYpXRaQJDl5U%3D&reserved=0
>   |
> 31137 Hildesheim, Germany  | Phone: +49-5121-206917-0|
> Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |




-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN | speech censured, the first thought forbidden, the
 X  AGAINST  | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL| (Jean-Luc Picard, quoting Judge Aaron Satie)


signature.asc
Description: PGP signature


[ptxdist] [PATCH 1/2] at91bootstrap2: Add missing dependency to special BOOTLOADER symbol

2022-09-26 Thread Alexander Dahl
This is probably needed to use $(BOOTLOADER_CROSS_COMPILE) in make rule,
as suggested in commit 1c402fa0d9ae ("[bootloader] better "special"
compiler handling for bootloader").

Fixes: 1bc08bd7836c ("at91bootstrap2: Revise make env and opt")
Signed-off-by: Alexander Dahl 
---
 platforms/at91bootstrap2.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/platforms/at91bootstrap2.in b/platforms/at91bootstrap2.in
index 0182912e5..2ae27d64f 100644
--- a/platforms/at91bootstrap2.in
+++ b/platforms/at91bootstrap2.in
@@ -1,6 +1,7 @@
 ## SECTION=bootloader
 
 menuconfig AT91BOOTSTRAP2
+   select BOOTLOADER
tristate
prompt "AT91 bootstrap 3.x"
help
-- 
2.30.2




[ptxdist] [PATCH 2/2] at91bootstrap2: Bump default version and add host-system dependency

2022-09-26 Thread Alexander Dahl
Configurations building for boards using NAND flash call a host system
python script for generating a special header file.  That script was
migrated to python3 with at91bootstrap v3.9.3 (and above).

(Meanwhile 3.10 is the latest v3 branch, upstream at91bootstrap
continued with v4 for new boards.)

Python3 is most probably installed on any modern build host anyways, so
it should not hurt much to enable the dependency unconditionally.
Otherwise we might get an error message like this:

'at91bootstrap2' must depend on 'host-system-python3' for 'python3'!

Signed-off-by: Alexander Dahl 
---
 platforms/at91bootstrap2.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/platforms/at91bootstrap2.in b/platforms/at91bootstrap2.in
index 2ae27d64f..b64947a6a 100644
--- a/platforms/at91bootstrap2.in
+++ b/platforms/at91bootstrap2.in
@@ -2,6 +2,7 @@
 
 menuconfig AT91BOOTSTRAP2
select BOOTLOADER
+   select HOST_SYSTEM_PYTHON3
tristate
prompt "AT91 bootstrap 3.x"
help
@@ -36,7 +37,7 @@ if AT91BOOTSTRAP2
 
 config AT91BOOTSTRAP2_VERSION
string
-   default "3.8.5"
+   default "3.9.3"
prompt "AT91 Bootstrap version"
help
  Enter the AT91 Bootstrap version you want to build. Usually something 
like "3.8.5"
-- 
2.30.2




[ptxdist] [PATCH 0/2] at91bootstrap2: Add missing dependencies

2022-09-26 Thread Alexander Dahl
Hei hei,

got build errors with recent ptxdist due to the missing host python3
dependency, and fixed the other one on the way.

Greets
Alex

Alexander Dahl (2):
  at91bootstrap2: Add missing dependency to special BOOTLOADER symbol
  at91bootstrap2: Bump default version and add host-system dependency

 platforms/at91bootstrap2.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


base-commit: 174951e837490428de5b53156c6667f232f701af
-- 
2.30.2




Re: [ptxdist] [PATCH 1/7] libcurl: version bump to 7.85

2022-09-20 Thread Alexander Dahl
Hello Marc,

Am Tue, Sep 20, 2022 at 02:56:59PM +0200 schrieb Marc Kleine-Budde:
> Signed-off-by: Marc Kleine-Budde 
> ---
>  rules/libcurl.make | 9 -
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/rules/libcurl.make b/rules/libcurl.make
> index 0d0ac9ea33d0..1ddefa9a5b4e 100644
> --- a/rules/libcurl.make
> +++ b/rules/libcurl.make
> @@ -105,7 +105,6 @@ LIBCURL_CONF_OPT  := \
>   --without-brotli \
>   --without-zstd \
>   --without-gssapi \
> - --with-default-ssl-backend=$(PTXCONF_LIBCURL_SSL_DEFAULT_BACKEND) \
>   --with-random=/dev/urandom \
>   --with-ca-bundle=$(PTXCONF_LIBCURL_SSL_CABUNDLE_PATH) \
>   --with-ca-path=$(PTXCONF_LIBCURL_SSL_CAPATH_PATH) \
> @@ -126,6 +125,14 @@ LIBCURL_CONF_OPT := \
>   --without-zsh-functions-dir \
>   --without-fish-functions-dir
>  
> +ifdef PTXCONF_LIBCURL_SSL
> +LIBCURL_CONF_OPT += \
> + --with-default-ssl-backend=$(PTXCONF_LIBCURL_SSL_DEFAULT_BACKEND)
> +else
> +LIBCURL_CONF_OPT += \
> + --without-ssl
> +endif

The diff does not match patch subject.

Greets
Alex

> +
>  # 
> 
>  # Target-Install
>  # 
> 
> -- 
> 2.30.2
> 
> 



  1   2   3   4   5   6   7   8   9   10   >