Re: [OE-core] [PATCH 1/7, v3] openssh: replace complete configuration files by patch

2024-03-16 Thread Alexandre Belloni via lists.openembedded.org
Please always resend the whole series, the maintainer should have to go
and cherry pick patches from various versions once the series has been
dropped.

On 12/03/2024 12:00:21+0100, Enrico Scholz via lists.openembedded.org wrote:
> From: Enrico Scholz 
> 
> Instead of shipping the whole configuration files for openssh, add
> small patch includes configuration snippets from subdirectories.
> 
> This allows us to keep the original upstream configuration which is
> mainly useful for documentation purposes.  It makes it more easy to
> identify OE specific setup.
> 
> Signed-off-by: Enrico Scholz 
> ---
>  .../openssh/openssh/include-conf.patch|  34 +
>  .../openssh/openssh/ssh_config|  48 ---
>  .../openssh/openssh/sshd_config   | 119 --
>  .../openssh/openssh_9.6p1.bb  |   5 +-
>  4 files changed, 35 insertions(+), 171 deletions(-)
>  create mode 100644 
> meta/recipes-connectivity/openssh/openssh/include-conf.patch
>  delete mode 100644 meta/recipes-connectivity/openssh/openssh/ssh_config
>  delete mode 100644 meta/recipes-connectivity/openssh/openssh/sshd_config
> 
> diff --git a/meta/recipes-connectivity/openssh/openssh/include-conf.patch 
> b/meta/recipes-connectivity/openssh/openssh/include-conf.patch
> new file mode 100644
> index ..0a3f6839f838
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssh/openssh/include-conf.patch
> @@ -0,0 +1,34 @@
> +Include configuration snippets from subdirectory.
> +
> +NOTE: first configuration option wins.
> +
> +Upstream-Status: Inappropriate [configuration]
> +
> +Signed-off-by: Enrico Scholz 
> +
> +Index: openssh-9.5p1/ssh_config
> +===
> +--- openssh-9.5p1.orig/ssh_config
>  openssh-9.5p1/ssh_config
> +@@ -5,6 +5,8 @@
> + # users, and the values can be changed in per-user configuration files
> + # or on the command line.
> +
> ++Include /etc/ssh/ssh_config.d/*.conf
> ++
> + # Configuration data is parsed as follows:
> + #  1. command line options
> + #  2. user-specific file
> +Index: openssh-9.5p1/sshd_config
> +===
> +--- openssh-9.5p1.orig/sshd_config
>  openssh-9.5p1/sshd_config
> +@@ -10,6 +10,8 @@
> + # possible, but leave them commented.  Uncommented options override the
> + # default value.
> +
> ++Include /etc/ssh/sshd_config.d/*.conf
> ++
> + #Port 22
> + #AddressFamily any
> + #ListenAddress 0.0.0.0
> diff --git a/meta/recipes-connectivity/openssh/openssh/ssh_config 
> b/meta/recipes-connectivity/openssh/openssh/ssh_config
> deleted file mode 100644
> index cb2774a163ed..
> --- a/meta/recipes-connectivity/openssh/openssh/ssh_config
> +++ /dev/null
> @@ -1,48 +0,0 @@
> -#$OpenBSD: ssh_config,v 1.35 2020/07/17 03:43:42 dtucker Exp $
> -
> -# This is the ssh client system-wide configuration file.  See
> -# ssh_config(5) for more information.  This file provides defaults for
> -# users, and the values can be changed in per-user configuration files
> -# or on the command line.
> -
> -# Configuration data is parsed as follows:
> -#  1. command line options
> -#  2. user-specific file
> -#  3. system-wide file
> -# Any configuration value is only changed the first time it is set.
> -# Thus, host-specific definitions should be at the beginning of the
> -# configuration file, and defaults at the end.
> -
> -# Site-wide defaults for some commonly used options.  For a comprehensive
> -# list of available options, their meanings and defaults, please see the
> -# ssh_config(5) man page.
> -
> -Include /etc/ssh/ssh_config.d/*.conf
> -
> -# Host *
> -#   ForwardAgent no
> -#   ForwardX11 no
> -#   PasswordAuthentication yes
> -#   HostbasedAuthentication no
> -#   GSSAPIAuthentication no
> -#   GSSAPIDelegateCredentials no
> -#   BatchMode no
> -#   CheckHostIP yes
> -#   AddressFamily any
> -#   ConnectTimeout 0
> -#   StrictHostKeyChecking ask
> -#   IdentityFile ~/.ssh/id_rsa
> -#   IdentityFile ~/.ssh/id_dsa
> -#   IdentityFile ~/.ssh/id_ecdsa
> -#   IdentityFile ~/.ssh/id_ed25519
> -#   Port 22
> -#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
> -#   MACs hmac-md5,hmac-sha1,umac...@openssh.com
> -#   EscapeChar ~
> -#   Tunnel no
> -#   TunnelDevice any:any
> -#   PermitLocalCommand no
> -#   VisualHostKey no
> -#   ProxyCommand ssh -q -W %h:%p gateway.example.com
> -#   RekeyLimit 1G 1h
> -#   UserKnownHostsFile ~/.ssh/known_hosts.d/%k
> diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_config 
> b/meta/recipes-connectivity/openssh/openssh/sshd_config
> deleted file mode 100644
> index e9eaf9315775..
> --- a/meta/recipes-connectivity/openssh/openssh/sshd_config
> +++ /dev/null
> @@ -1,119 +0,0 @@
> -#$OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
> -
> -# This is the sshd server system-wide configuration file.  See
> -# sshd_config(5) for more information.
> -
> 

[OE-core] [PATCH] toolchain-shar-relocate.sh: Add check for missing command 'file'

2024-03-16 Thread Tom Hochstein
On a machine without the file command, the SDK install fails with a
cryptic error message.

```
xargs: file: No such file or directory
sed: no input files
Failed to replace perl. Relocate script failed. Abort!
```

Add a test for 'file' to print a clear error message.

```
The command 'file' is required by the relocation script, please install it 
first. Abort!
```

Signed-off-by: Tom Hochstein 
---
 meta/files/toolchain-shar-relocate.sh | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/files/toolchain-shar-relocate.sh 
b/meta/files/toolchain-shar-relocate.sh
index e8ab357717..3d55e38102 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -1,7 +1,9 @@
-if ! xargs --version > /dev/null 2>&1; then
-   echo "xargs is required by the relocation script, please install it 
first. Abort!"
-   exit 1
-fi
+for cmd in xargs file; do
+   if ! command -v $cmd &> /dev/null; then
+   echo "The command '$cmd' is required by the relocation script, 
please install it first. Abort!"
+   exit 1
+   fi
+done
 
 # fix dynamic loader paths in all ELF SDK binaries
 # allow symlinks to be accessed via the find command too
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197256): 
https://lists.openembedded.org/g/openembedded-core/message/197256
Mute This Topic: https://lists.openembedded.org/mt/104970783/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][PATCH] bzip2: add libbz2.so.1.0 link for compat

2024-03-16 Thread Alexander Kanavin
It's better to backport the upstream patch, as nobody's going to
remember why do_install snippet is there, or to remove it when there's
a new release (if it doesn't cause installation conflicts).

Alex

On Sat, 16 Mar 2024 at 01:19, Randolph Sapp via lists.openembedded.org
 wrote:
>
> From: Randolph Sapp 
>
> Add a link from libbz2.so.1.0 to libbz2.so.${PV} for compatibility with
> other distributions.
>
> A handfull of distributions are still using the "Makefile-libbz2_so" to
> generate libbz2 and bzip2-shared. This creates a library with a soname
> of "libbz2.so.1.0". This library link is not provide by default in
> autotools builds so add one here as Gentoo does now [1].
>
> This has been addressed upstream already, but there hasn't been a stable
> release since then [2].
>
> [1] https://bugs.gentoo.org/338321
> [2] https://gitlab.com/bzip2/bzip2/-/merge_requests/42
>
> Signed-off-by: Randolph Sapp 
> ---
>  meta/recipes-extended/bzip2/bzip2_1.0.8.bb | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb 
> b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
> index 4e3a06f240..4453171701 100644
> --- a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
> +++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
> @@ -62,6 +62,11 @@ do_install_ptest () {
> sed -i -e "s|^Makefile:|_Makefile:|" ${D}${PTEST_PATH}/Makefile
>  }
>
> +# add the following link for cross-distro compatibility
> +do_install:append () {
> +   ln -s libbz2.so.${PV} "${D}${libdir}/libbz2.so.1.0"
> +}
> +
>  FILES:libbz2 = "${libdir}/lib*${SOLIBS}"
>
>  RDEPENDS:${PN}-ptest += "make bash"
> --
> 2.44.0
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197255): 
https://lists.openembedded.org/g/openembedded-core/message/197255
Mute This Topic: https://lists.openembedded.org/mt/104959821/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] weston-init: Add --system for useradd

2024-03-16 Thread Alexander Kanavin
This, unfortunately, is a recipe-specific workaround for an issue that
is general, and needs to be investigated properly. Please see the
thread ' ''.bashrc': Unknown file type; file ignored".

If you can join forces with Enrico and get to the bottom of it I'd
appreciate, as I'm traveling/on holiday/in company get-togethers for
the next week and can't quickly allocate enough time to reproduce and
help.

Alex



On Fri, 15 Mar 2024 at 09:18, Yu, Mingli  wrote:
>
> From: Mingli Yu 
>
> Add --system parameter for useradd to avoid intruducing .bashrc
> and .profile under home dir to fix the below error.
>  $ bitbake core-image-weston
> | DEBUG: Executing python function set_image_size
> | DEBUG: 352679.60 = 271292 * 1.30
> | DEBUG: 455079.60 = max(352679.60, 65536)[352679.60] + 102400
> | DEBUG: 455080.00 = int(455079.60)
> | DEBUG: 455080 = aligned(455080)
> | DEBUG: returning 455080
> | DEBUG: Python function set_image_size finished
> | DEBUG: Executing shell function do_image_tar
> | tar: ./home/weston/.bashrc: Unknown file type; file ignored
> | tar: ./home/weston/.profile: Unknown file type; file ignored
> | tar: Exiting with failure status due to previous errors
> | WARNING: 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/temp/run.do_image_tar.1972897:150
>  exit 1 from '[ $? -eq 1 ]'
> | WARNING: Backtrace (BB generated script):
> #1: do_image_tar, 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/temp/run.do_image_tar.1972897,
>  line 150
> #2: main, 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/temp/run.do_image_tar.1972897,
>  line 156
> | DEBUG: Python function extend_recipe_sysroot finished
> | DEBUG: Executing python function set_image_size
> | DEBUG: 352679.60 = 271292 * 1.30
> | DEBUG: 455079.60 = max(352679.60, 65536)[352679.60] + 102400
> | DEBUG: 455080.00 = int(455079.60)
> | DEBUG: 455080 = aligned(455080)
> | DEBUG: returning 455080
> | DEBUG: Python function set_image_size finished
> | DEBUG: Executing shell function do_image_ext4
> | DEBUG: Executing dd if=/dev/zero 
> of=/buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/deploy-core-image-weston-image-complete/core-image-weston-qemux86-64.rootfs-20240315032140.ext4
>  seek=455080 count=0 bs=1024
> | 0+0 records in
> | 0+0 records out
> | 0 bytes copied, 0.00136946 s, 0.0 kB/s
> | DEBUG: Actual Rootfs size:  268184
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/rootfs
> | DEBUG: Actual Partition size: 466001920
> | DEBUG: Executing mkfs.ext4 -F -i 4096 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/deploy-core-image-weston-image-complete/core-image-weston-qemux86-64.rootfs-20240315032140.ext4
>  -d 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/rootfs
> | mke2fs 1.47.0 (5-Feb-2023)
> | Discarding device blocks: done
> | Creating filesystem with 455080 1k blocks and 113792 inodes
> | Filesystem UUID: 2031373e-63cd-4711-968b-4023ff7d6a90
> | Superblock backups stored on blocks:
> |   8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
> |
> | Allocating group tables: done
> | Writing inode tables: done
> | Creating journal (8192 blocks): done
> | Copying files into the device: __populate_fs: ignoring entry ".bashrc"
> | .bashrc: File not found by ext2_lookup while looking up ".bashrc"
> | mkfs.ext4: File not found by ext2_lookup while populating file system
> | WARNING: 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/temp/run.do_image_ext4.1972895:178
>  exit 1 from 'mkfs.$fstype -F $extra_imagecmd 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/deploy-core-image-weston-image-complete/core-image-weston-qemux86-64.rootfs-20240315032140.$fstype
>  -d 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/rootfs'
> | WARNING: Backtrace (BB generated script):
> |   #1: oe_mkext234fs, 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/temp/run.do_image_ext4.1972895,
>  line 178
> |   #2: do_image_ext4, 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/temp/run.do_image_ext4.1972895,
>  line 150
> |   #3: main, 
> /buildarea1/test/yocto/builds/poky-build-weston/tmp/work/qemux86_64-poky-linux/core-image-weston/1.0/temp/run.do_image_ext4.1972895,
>  line 215
> ERROR: Task 
> (/buildarea1/test/yocto/poky/meta/recipes-graphics/images/core-image-weston.bb:do_image_ext4)
>  failed with exit code '1'
>
> Before the patch:
> $ ls -a 
> 

Re: [OE-core] [PATCH V2] dnf: remove log_lock.pid before exit

2024-03-16 Thread Alexander Kanavin
On Fri, 15 Mar 2024 at 02:43, Changqing Li  wrote:
> This issue only happened when dnf log rotate is happened. maybe install
> "a lot" packages can trigger reproduce this issue more quickly.

Maybe logrotate threshold can as well be adjusted to happen on small,
easily reproducible installations?

> Thanks for trying to help.  I had try to find the root cause when I opened 
> the upstream issue, but unfortunately, not got the root cause,  I thought
>
> it should be a complicated one. After do more investigating recently, the 
> root cause should be found, and I have send pull request [1] to upsteam dnf ,
>
> will backport the patch if upstream accept the fix.
>
> [1] https://github.com/rpm-software-management/dnf/pull/2065

Thanks, that looks roughly correct to me, let's see what upstream says.

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197253): 
https://lists.openembedded.org/g/openembedded-core/message/197253
Mute This Topic: https://lists.openembedded.org/mt/104784184/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-