[ptxdist] Race condition between rc-once.service and systemd-remount-fs.service

2024-05-03 Thread Ian Abbott

Hi,

If the root file system is initially mounted read-only, there is a 
possible race between rc-once.service and the 
systemd-remount-fs.service.  If rc-once.service sees the root filesystem 
is mounted read-only, then it will temporarily remount it read-write and 
later mount it read-only again.  Meanwhile, systemd-remount-fs.service 
will also remount the root file system as specified by /etc/fstab which 
could be read-write. Depending on the ordering, it is possible for the 
root file-system to end up mounted read-only when it should have ended 
up mounted read-write.


As long as the two services do not run simultaneously, the root file 
system should end up mounted in the correct state.  However, I do not 
know what the intended order is supposed to be.  Perhaps it is 
intentionally system-dependent?


--
-=( 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 )=-



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

2024-05-03 Thread 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.

Make the auto-selection of LIBC_M depend on VIM_VIM because VIM_XXD does
not appear to require it.  While we are at it, remove the obsolete
GCCLIBS_GCC_S and LIBC_DL selections.

Signed-off-by: Ian Abbott 
---
v2: Corrected dependency problem I introduced by moving the
auto-selection of the required libraries from VIM to VIM_VIM.  I have
move them back, but only select them if VIM_VIM is selected, as
suggested by Alexander Dahl

v3: Applied changes requested by Michael Olbrich. (1) Align the 'if ...'
with tabs. [Actually, there is now only one 'if ...' now! -- IA] (2) vim
is still compiled even if VIM_VIM is disabled, so leave the NCURSES
dependency as is. (3) Remove GCCLIBC_GCC_S and LIBC_DL dependencies as
they are no longer used. (4) Add '|| ALLYES' dependency to conditionally
built items for better build tests.

v4: Updated commit description which I forgot to do in v3.
---
 rules/vim.in   | 22 ++
 rules/vim.make |  4 
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/rules/vim.in b/rules/vim.in
index c4c9d14e6..d16b54a2d 100644
--- a/rules/vim.in
+++ b/rules/vim.in
@@ -1,14 +1,8 @@
 ## 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 LIBC_M   if VIM_VIM
select NCURSES
prompt "vim   "
help
@@ -18,18 +12,22 @@ menuconfig VIM
 
 if VIM
 
-comment "BusyBox' vi is selected!"
-   depends on BUSYBOX_VI
-
 config VIM_VIM
-   depends on !BUSYBOX_VI
bool "Vim Editor"
 
+comment "BusyBox' vi is selected!"
+   depends on VIM_VIM && BUSYBOX_VI
+
+config VIM_VI_SYMLINK
+   depends on VIM_VIM && !BUSYBOX_VI || ALLYES
+   bool "install symbolic link /usr/bin/vi"
+   default y
+
 comment "BusyBox' xxd is selected!"
depends on BUSYBOX_XXD
 
 config VIM_XXD
-   depends on !BUSYBOX_XXD
+   depends on !BUSYBOX_XXD || ALLYES
bool "XXD"
 
 endif
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




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

2024-05-03 Thread 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.

Make the auto-selections of LIBC_DL, LIBC_M, GCCLIBS_GCC_S, and NCURSES
depend on VIM_VIM because VIM_XXD does not appear to require them.

Signed-off-by: Ian Abbott 
---
v2: Corrected dependency problem I introduced by moving the
auto-selection of the required libraries from VIM to VIM_VIM.  I have
move them back, but only select them if VIM_VIM is selected, as
suggested by Alexander Dahl

v3: Applied changes requested by Michael Olbrich. (1) Align the 'if ...'
with tabs. [Actually, there is now only one 'if ...' now! -- IA] (2) vim
is still compiled even if VIM_VIM is disabled, so leave the NCURSES
dependency as is. (3) Remove GCCLIBC_GCC_S and LIBC_DL dependencies as
they are no longer used. (4) Add '|| ALLYES' dependency to conditionally
built items for better build tests.
---
 rules/vim.in   | 22 ++
 rules/vim.make |  4 
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/rules/vim.in b/rules/vim.in
index c4c9d14e6..d16b54a2d 100644
--- a/rules/vim.in
+++ b/rules/vim.in
@@ -1,14 +1,8 @@
 ## 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 LIBC_M   if VIM_VIM
select NCURSES
prompt "vim   "
help
@@ -18,18 +12,22 @@ menuconfig VIM
 
 if VIM
 
-comment "BusyBox' vi is selected!"
-   depends on BUSYBOX_VI
-
 config VIM_VIM
-   depends on !BUSYBOX_VI
bool "Vim Editor"
 
+comment "BusyBox' vi is selected!"
+   depends on VIM_VIM && BUSYBOX_VI
+
+config VIM_VI_SYMLINK
+   depends on VIM_VIM && !BUSYBOX_VI || ALLYES
+   bool "install symbolic link /usr/bin/vi"
+   default y
+
 comment "BusyBox' xxd is selected!"
depends on BUSYBOX_XXD
 
 config VIM_XXD
-   depends on !BUSYBOX_XXD
+   depends on !BUSYBOX_XXD || ALLYES
bool "XXD"
 
 endif
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 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." \
> > > > +   "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.
> 
> Still, for u-boot the warning will always be visible right? That's not
> nice.

No, it is not always visible.  Warning is only visible if
_BUILD_OOT is set to 'YES'.  For u-boot this is actually never
the case, because there it's either 'KEEP' or 'NO'.  But the code is
generic, thus the warning for this edge case.

When testing this I had exactly that case: inject 

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

2024-05-03 Thread 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.

> > 
> > >  
> > >  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.

Still, for u-boot the warning will always be visible right? That's not
nice.

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

Setting _INJECT_DEST to anything other than pkg_dir or pkg_build_dir
does not really make sense. The whole point of this is, to copy files
there.
Hmmm, maybe we should make that explicit:

_INJECT_OOT := YES

Or something else that indicates that the pkg_build_dir should be used. So
don't make it more flexible than needed.

And then you can definitely check for the directory existence to determine
if the order was correct.

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

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

2024-05-03 Thread Michael Olbrich
On Fri, May 03, 2024 at 10:14:44AM +0100, Ian Abbott wrote:
> 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.
> 
> Make the auto-selections of LIBC_DL, LIBC_M, GCCLIBS_GCC_S, and NCURSES
> depend on VIM_VIM because VIM_XXD does not appear to require them.
> 
> Signed-off-by: Ian Abbott 
> ---
> v2: Corrected dependency problem I introduced by moving the
> auto-selection of the required libraries from VIM to VIM_VIM.  I have
> move them back, but only select them if VIM_VIM is selected, as
> suggested by Alexander Dahl
> ---
>  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..24772d969 100644
> --- a/rules/vim.in
> +++ b/rules/vim.in
> @@ -1,15 +1,11 @@
>  ## 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
> + select LIBC_DL if VIM_VIM
> + select LIBC_M if VIM_VIM
> + select GCCLIBS_GCC_S if VIM_VIM
> + select NCURSES if VIM_VIM

1. Align the 'if ...' with tabs.
2. vim is still compiled even if VIM_VIM is disabled so ncurses still
   needed. So leave that dependency as is.
3. GCCLIBS_GCC_S LIBC_DL are actually no longer used. That was missed
   during some update in the past. Just remove those while at it.

>   prompt "vim   "
>   help
> Vim is an advanced text editor that seeks to provide the
> @@ -18,13 +14,17 @@ menuconfig VIM
>  
>  if VIM
>  
> -comment "BusyBox' vi is selected!"
> - depends on BUSYBOX_VI
> -
>  config VIM_VIM
> - depends on !BUSYBOX_VI
>   bool "Vim Editor"
>  
> +comment "BusyBox' vi is selected!"
> + depends on VIM_VIM && BUSYBOX_VI
> +
> +config VIM_VI_SYMLINK
> + depends on VIM_VIM && !BUSYBOX_VI

This should have a '|| ALLYES' at the end for better build tests.

Michael

> + 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
> 
> 
> 

-- 
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] 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] vim: allow vim to be installed alongside busybox vi and xxd

2024-05-03 Thread 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.


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.


--
-=( 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 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 it does not.

This would move the responsibility to create that dir to the package
author.  I opted against that, because _DIR and _BUILD_DIR
are also implicitly created by ptxdist, no need to create those in the
make rules.  This is a question of policy, but it would make the
inject mechanism somewhat asymmetric if _DIR (for when
_INJECT_DEST is not set) has not to be created by the package author
but _INJECT_DEST has to.

Again: sure, can be done if desired.

Let me know if I should change the pieces or if my explanations made
sense and things can be kept like this?

Greets
Alex

> Michael
> 
> > +   ptxd_warning "_INJECT_DEST is set to _BUILD_DIR and 
> > _BUILD_OOT is set to 'YES'." \
> > +   "If you called world/inject before 

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

2024-05-03 Thread 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?

> 
> 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.

>  
>  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? I think we should
require that pkg_inject_dest already exists at this point and fail if it
does not.

Michael

> + 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
> 
> 
> 

-- 
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] 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 )=-
> 
> 



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

2024-05-03 Thread 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.

Make the auto-selections of LIBC_DL, LIBC_M, GCCLIBS_GCC_S, and NCURSES
depend on VIM_VIM because VIM_XXD does not appear to require them.

Signed-off-by: Ian Abbott 
---
v2: Corrected dependency problem I introduced by moving the
auto-selection of the required libraries from VIM to VIM_VIM.  I have
move them back, but only select them if VIM_VIM is selected, as
suggested by Alexander Dahl
---
 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..24772d969 100644
--- a/rules/vim.in
+++ b/rules/vim.in
@@ -1,15 +1,11 @@
 ## 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
+   select LIBC_DL if VIM_VIM
+   select LIBC_M if VIM_VIM
+   select GCCLIBS_GCC_S if VIM_VIM
+   select NCURSES if VIM_VIM
prompt "vim   "
help
  Vim is an advanced text editor that seeks to provide the
@@ -18,13 +14,17 @@ menuconfig VIM
 
 if VIM
 
-comment "BusyBox' vi is selected!"
-   depends on BUSYBOX_VI
-
 config VIM_VIM
-   depends on !BUSYBOX_VI
bool "Vim Editor"
 
+comment "BusyBox' vi is selected!"
+   depends on VIM_VIM && BUSYBOX_VI
+
+config VIM_VI_SYMLINK
+   depends on VIM_VIM && !BUSYBOX_VI
+   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] vim: allow vim to be installed alongside busybox vi and xxd

2024-05-03 Thread 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.




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] [APPLIED] wayland-protocols: version bump 1.34 -> 1.35

2024-05-03 Thread Michael Olbrich
Thanks, applied as 549a207826f541515b26c8f8bdcc1b8df23fe3c5.

Michael

[sent from post-receive hook]

On Fri, 03 May 2024 10:29:47 +0200, Philipp Zabel  
wrote:
> Marks the tablet-v2 protocol as stable. New protocol: alpha-modifier.
> Some small buf fixes and clarifications.
> 
> https://lists.freedesktop.org/archives/wayland-devel/2024-April/043572.html
> 
> Signed-off-by: Philipp Zabel 
> Message-Id: <20240417160030.184488-1-p.za...@pengutronix.de>
> Signed-off-by: Michael Olbrich 
> 
> diff --git a/rules/wayland-protocols.make b/rules/wayland-protocols.make
> index 2f28746379c7..066e9b00071b 100644
> --- a/rules/wayland-protocols.make
> +++ b/rules/wayland-protocols.make
> @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_WAYLAND_PROTOCOLS) += wayland-protocols
>  #
>  # Paths and names
>  #
> -WAYLAND_PROTOCOLS_VERSION:= 1.34
> -WAYLAND_PROTOCOLS_MD5:= 512393249240369ad70a17dd0f98edaa
> +WAYLAND_PROTOCOLS_VERSION:= 1.35
> +WAYLAND_PROTOCOLS_MD5:= cd0f2a1ab6e54568e4f856f140dedca9
>  WAYLAND_PROTOCOLS:= 
> wayland-protocols-$(WAYLAND_PROTOCOLS_VERSION)
>  WAYLAND_PROTOCOLS_SUFFIX := tar.xz
>  WAYLAND_PROTOCOLS_URL:= 
> https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/$(WAYLAND_PROTOCOLS_VERSION)/downloads/$(WAYLAND_PROTOCOLS).$(WAYLAND_PROTOCOLS_SUFFIX)



Re: [ptxdist] [APPLIED] linux-firmware: Version bump. 20240312 -> 20240410

2024-05-03 Thread Michael Olbrich
Thanks, applied as df5a93146d57e03ce217923eda901272bc39dbef.

Michael

[sent from post-receive hook]

On Fri, 03 May 2024 10:29:46 +0200, Christian Melki 
 wrote:
> No license file changes.
> https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/log/?h=20240410
> 
> Signed-off-by: Christian Melki 
> Message-Id: <20240412164840.2165113-1-christian.me...@t2data.com>
> Signed-off-by: Michael Olbrich 
> 
> diff --git a/rules/linux-firmware.make b/rules/linux-firmware.make
> index 6473f1f86064..f12901f024f5 100644
> --- a/rules/linux-firmware.make
> +++ b/rules/linux-firmware.make
> @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_LINUX_FIRMWARE) += linux-firmware
>  #
>  # Paths and names
>  #
> -LINUX_FIRMWARE_VERSION   := 20240312
> -LINUX_FIRMWARE_MD5   := 9dde672fd15408bca23a4df38d4513e2
> +LINUX_FIRMWARE_VERSION   := 20240410
> +LINUX_FIRMWARE_MD5   := 62c5622044539ca0a431a19d7c57bc02
>  LINUX_FIRMWARE   := linux-firmware-$(LINUX_FIRMWARE_VERSION)
>  LINUX_FIRMWARE_SUFFIX:= tar.gz
>  LINUX_FIRMWARE_URL   := $(call ptx/mirror, KERNEL, 
> kernel/firmware/$(LINUX_FIRMWARE).$(LINUX_FIRMWARE_SUFFIX))



Re: [ptxdist] [APPLIED] mesalib: version bump 24.0.4 -> 24.0.5

2024-05-03 Thread Michael Olbrich
Thanks, applied as f1838e1f4b5aa2cb9deb5bf59828ea71c00e.

Michael

[sent from post-receive hook]

On Fri, 03 May 2024 10:29:45 +0200, Philipp Zabel  
wrote:
> https://docs.mesa3d.org/relnotes/24.0.5.html
> 
> Signed-off-by: Philipp Zabel 
> Message-Id: <20240412080840.3882092-1-p.za...@pengutronix.de>
> Signed-off-by: Michael Olbrich 
> 
> diff --git a/rules/host-mesalib.make b/rules/host-mesalib.make
> index f353f8f434e8..3bf420f44191 100644
> --- a/rules/host-mesalib.make
> +++ b/rules/host-mesalib.make
> @@ -64,7 +64,6 @@ HOST_MESALIB_CONF_OPT   := \
>   -Dimagination-srv=false \
>   -Dinstall-intel-gpu-tests=false \
>   -Dintel-clc=disabled \
> - -Dintel-xe-kmd=disabled \
>   -Dlibunwind=disabled \
>   -Dllvm=disabled \
>   -Dlmsensors=disabled \
> diff --git a/rules/mesalib.make b/rules/mesalib.make
> index eee7d5880e80..4a278f6a640c 100644
> --- a/rules/mesalib.make
> +++ b/rules/mesalib.make
> @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_MESALIB) += mesalib
>  #
>  # Paths and names
>  #
> -MESALIB_VERSION  := 24.0.4
> -MESALIB_MD5  := de4661e901f2dfb194e6b1bf04dc2171
> +MESALIB_VERSION  := 24.0.5
> +MESALIB_MD5  := 8d8c4bb8d938adcf1a9381570d45
>  MESALIB  := mesa-$(MESALIB_VERSION)
>  MESALIB_SUFFIX   := tar.xz
>  MESALIB_URL  := \
> @@ -191,7 +191,6 @@ MESALIB_CONF_OPT  := \
>   -Dimagination-srv=false \
>   -Dinstall-intel-gpu-tests=false \
>   -Dintel-clc=disabled \
> - -Dintel-xe-kmd=disabled \
>   -Dlibunwind=disabled \
>   -Dllvm=$(call ptx/endis, PTXCONF_MESALIB_LLVM)d \
>   -Dlmsensors=$(call ptx/endis, PTXCONF_MESALIB_LMSENSORS)d \



[ptxdist] [ANNOUNCE] PTXdist 2024.05.0 released

2024-05-03 Thread Michael Olbrich
Hi,

I'm happy to announce that I've just released ptxdist-2024.05.0.

This is a smaller and rather boring release. No really big changes.
There is a new polkit version that makes it more usable for embedded use
cases. It comes with a JavaScript engine that makes it rather easy to write
policies that make sense for embedded devices.

The rest are mostly version bumps and a few new packages and bugfixes.

Thanks to all contributors and - as always - the shortlog below.

Enjoy,
Michael Olbrich


Ahmad Fatoum (1):
  tf-a: stop defining AS and other variables in cross make env

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

Christian Melki (16):
  libxkbcommon: Version bump. 1.6.0 -> 1.7.0
  zstd: Version bump. 1.5.5 -> 1.5.6
  libcurl: Version bump. 8.6.0 -> 8.7.1
  host-libcurl: Follow target libcurl.
  hwdata: Version bump. 0.380 -> 0.381.
  sdl2: Version bump. 2.30.1 -> 2.30.2
  mtd-utils: Version bump. 2.1.6 -> 2.2.0
  host-mtd-utils: Follow target mtd-utils
  util-linux: Version bump. 2.39.3 -> 2.40
  host-util-linux: Follow target util-linux.
  mtdev: Version bump. 1.1.6 -> 1.1.7
  pciutils: Version bump. 3.11.1 -> 3.12.0
  chrony: Fix URL.
  libarchive: Version bump. 3.7.2 -> 3.7.3
  libcap-ng: Version bump. 0.8.4 -> 0.8.5
  linux-firmware: Version bump. 20240312 -> 20240410

Markus Heidelberg (2):
  Fix typos "can/must be uses" -> "used"
  Fix duplicated "to to" in texts

Michael Olbrich (32):
  iperf3: version bump 3.6 -> 3.16
  ptxd_make_nested: only redirect PTXDIST_FD_STD{OUT,ERR} if defined
  {host-,}shaderc: explicitly use the Python wrapper
  util-linux: allow 32-bit time_t if Y2K38 support is disabled
  systemd: don't use install_alternative_tree for a /usr/share/polkit-1
  duktape: new package
  polkit: version bump 0.105 -> 124
  libatasmart: new package
  libnvme: new package
  mpfr: new package
  libbytesize: new package
  libblockdev: new package
  udisks: new package
  gstreamer1: version bump 1.24.1 -> 1.24.2
  gst-plugins-base1: version bump 1.24.1 -> 1.24.2
  gst-plugins-good1: version bump 1.24.1 -> 1.24.2
  gst-plugins-bad1: version bump 1.24.1 -> 1.24.2
  gst-plugins-ugly1: version bump 1.24.1 -> 1.24.2
  gst-devtools1: version bump 1.24.1 -> 1.24.2
  gst-libav1: version bump 1.24.1 -> 1.24.2
  gst-plugins-rs: version bump 1.24.1 -> 1.24.2
  gst-python1: version bump 1.24.1 -> 1.24.2
  gst-rtsp-server1: version bump 1.24.1 -> 1.24.2
  gstreamer-vaapi1: version bump 1.24.1 -> 1.24.2
  intel-gmmlib: version bump 22.3.16 -> 22.3.19
  intel-media-driver: version bump 23.4.3 -> 24.2.0
  host-glslang: add missing dependency
  libbytesize: only build & install in src/
  gdb: don't use libmpfr without depending on it
  polkit: allow building without polkitd
  beep: move to staging
  ntpclient: move to staging

Michael Tretter (1):
  rauc/image-rauc: move BUNDLE_VERSION to image-rauc

Philipp Zabel (15):
  mesalib: version bump 24.0.3 -> 24.0.4
  wayland-protocols: version bump 1.33 -> 1.34
  glslang: version bump 1.3.275.0 -> 1.3.280.0
  spirv-headers: version bump 1.3.275.0 -> 1.3.280.0
  spirv-tools: version bump 1.3.275.0 -> 1.3.280.0
  volk: version bump 1.3.275.0 -> 1.3.280.0
  vulkan-headers: version bump 1.3.275.0 -> 1.3.280.0
  vulkan-loader: version bump 1.3.275.0 -> 1.3.280.0
  vulkan-tools: version bump 1.3.275.0 -> 1.3.280.0
  vulkan-utility-libraries: version bump 1.3.275.0 -> 1.3.280.0
  vulkan-validationlayers: version bump 1.3.275.0 -> 1.3.280.0
  shaderc: version bump v2023.8 -> v2024.0
  opus: add machine learning options
  mesalib: version bump 24.0.4 -> 24.0.5
  wayland-protocols: version bump 1.34 -> 1.35


-- 
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- |


signature.asc
Description: PGP signature


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

2024-05-03 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
> 
>