Re: SRC_URI Directory Change
Richard Purdie
On Fri, 2021-10-15 at 03:03 -0700, Chuck Wolber wrote:
Is there a recommended strategy to get do_fetch to invalidate on directoryI can see why this breaks and it isn't entirely straightforward to fix since we'd have to add data to the file-checksums entries which are generated by both OE and Bitbake. I have a bit of a horrible idea to do this in master-next which does solve the problem. We probably need a new bitbake selftest testcase before I could think about merging it though. Cheers, Richard
|
|
[PATCH][meta-selinux][dunfell] MAINTAINERS: update email address
Mikko Rapeli
From: Armin Kuster <akuster808@...>
Include example send-email Signed-off-by: Armin Kuster <akuster808@...> Signed-off-by: Joe MacDonald <joe@...> (cherry picked from commit 48038b45dc114592991c069eb66d174820c0701d) --- MAINTAINERS | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 36c451f..0dc492e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1,7 +1,14 @@ This file contains a list of maintainers for the meta-selinux layer. Please submit any patches against meta-selinux to the Yocto Project mailing -list (yocto@...). +list (yocto@...). + +git send-email -1 --to yocto@... --subject-prefix=meta-selinux][PATCH + +These values can be set as defaults for this repository: + +$ git config sendemail.to yocto@... +$ git config format.subjectPrefix meta-selinux][PATCH You may also contact the maintainers directly. -- 2.20.1
|
|
[PATCH][meta-selinux][dunfell] libselinux: Backport NULL pointer fix from 3.1
Jonas Brich
From: Mikko Rapeli <mikko.rapeli@...>
From: Jonas Brich <Jonas.Brich@...> Using function restorecon_init inside selinux_restorecon.c can result in a NULL pointer. This happens because function selinux_restorecon_set_sehandle can return a NULL pointer. But it is not checked and directly given to the next function. This problem is already fixed in libselinux 3.1 and above. Therefore backport this fix. Signed-off-by: Jonas Brich <Jonas.Brich@...> --- ...e-in-selinux_restorecon_set_sehandle.patch | 32 +++++++++++++++++++ recipes-security/selinux/libselinux_3.0.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 recipes-security/selinux/libselinux/0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch diff --git a/recipes-security/selinux/libselinux/0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch b/recipes-security/selinux/libselinux/0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch new file mode 100644 index 0000000..f12164f --- /dev/null +++ b/recipes-security/selinux/libselinux/0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch @@ -0,0 +1,32 @@ +From 08f5e30177218fae7ce9f5c8d6856690126b2b30 Mon Sep 17 00:00:00 2001 +From: Ji Qin <jiqin.ji@...> +Date: Sun, 14 Jun 2020 21:20:23 -0400 +Subject: [PATCH] libselinux: Fix NULL pointer use in + selinux_restorecon_set_sehandle + +error occur when selinux_restorecon_default_handle return NULL in +restorecon_init. + +fixes: https://github.com/SELinuxProject/selinux/issues/249 + +Signed-off-by: Ji Qin <jiqin.ji@...> +Acked-by: Stephen Smalley <stephen.smalley.work@...> +--- + libselinux/src/selinux_restorecon.c | 2 ++ + 1 file changed, 2 insertions(+) + +Upstream-Status: Backport [https://github.com/SELinuxProject/selinux/commit/08f5e30177218fae7ce9f5c8d6856690126b2b30] + +diff --git libselinux/src/selinux_restorecon.c libselinux/src/selinux_restorecon.c +index d1ce830c5..6993be6fd 100644 +--- libselinux/src/selinux_restorecon.c ++++ libselinux/src/selinux_restorecon.c +@@ -1154,6 +1154,8 @@ void selinux_restorecon_set_sehandle(struct selabel_handle *hndl) + size_t num_specfiles, fc_digest_len; + + fc_sehandle = (struct selabel_handle *) hndl; ++ if (!fc_sehandle) ++ return; + + /* Check if digest requested in selabel_open(3), if so use it. */ + if (selabel_digest(fc_sehandle, &fc_digest, &fc_digest_len, diff --git a/recipes-security/selinux/libselinux_3.0.bb b/recipes-security/selinux/libselinux_3.0.bb index 17a25a9..01f9b7b 100644 --- a/recipes-security/selinux/libselinux_3.0.bb +++ b/recipes-security/selinux/libselinux_3.0.bb @@ -13,4 +13,5 @@ SRC_URI += "\ file://libselinux-define-FD_CLOEXEC-as-necessary.patch \ file://0001-Fix-building-against-musl-and-uClibc-libc-libraries.patch \ file://0001-libselinux-export-flush_class_cache-call-it-on-polic.patch \ + file://0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch \ " -- 2.20.1
|
|
SRC_URI Directory Change
Is there a recommended strategy to get do_fetch to invalidate on
directory path changes in paths pointed to by file:// URLs in SRC_URI? Example: SRC_URI += "file://src;subdir=${S}" A
file at src/foo/bar/baz is recognized just fine. But then a directory
change to something like src/foo/bar2/baz is not recognized and does not
invalidate any tasks in subsequent builds. Use
case is a recipe that has a fair bit of metadata that is not even
remotely amenable to the typical flat layout expected of a set of
patches. ..Ch:W.. P.S.
I attempted to do this with an event handler that was run when
bb.event.RecipePreFinalise is is fired. It would compare directory trees
and set do_fetch[nostamp] = "1" to invalidate the fetcher task. But I
got really spotty behavior. It seems like event handlers are cached
like tasks. -- "Perfection must be reached by degrees; she requires the slow hand of time." - Voltaire
|
|
[meta-cgl][PATCH] libsocket6-perl: inherit autotools-brokensep
Yi Zhao
Inherit autotools-brokensep to fix the build error which is introduced
by oe-commit: commit 8e26252b45b7660c7c67c702411bdec187a76ffc Author: Richard Purdie <richard.purdie@...> Date: Sun Sep 19 16:17:31 2021 +0100 layer.conf: Extend recipes not to install without explict dependencies Fixes: libsocket6-perl/0.29-r2/temp/run.do_configure.27951: autoreconf: not found libsocket6-perl/0.29-r2/temp/run.do_configure.27951: oefatal: not found Signed-off-by: Yi Zhao <yi.zhao@...> --- meta-cgl-common/recipes-perl/perl/libsocket6-perl_0.29.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-cgl-common/recipes-perl/perl/libsocket6-perl_0.29.bb b/meta-cgl-common/recipes-perl/perl/libsocket6-perl_0.29.bb index bbeab8e..9f38380 100644 --- a/meta-cgl-common/recipes-perl/perl/libsocket6-perl_0.29.bb +++ b/meta-cgl-common/recipes-perl/perl/libsocket6-perl_0.29.bb @@ -23,4 +23,4 @@ do_configure:prepend () { sed -i 's:\./configure\(.[^-]\):./configure --build=${BUILD_SYS} --host=${HOST_SYS} --target=${TARGET_SYS} --prefix=${prefix} --exec_prefix=${exec_prefix} --bindir=${bindir} --sbindir=${sbindir} --libexecdir=${libexecdir} --datadir=${datadir} --sysconfdir=${sysconfdir} --sharedstatedir=${sharedstatedir} --localstatedir=${localstatedir} --libdir=${libdir} --includedir=${includedir} --oldincludedir=${oldincludedir} --infodir=${infodir} --mandir=${mandir}\1:' Makefile.PL } -inherit cpan +inherit autotools-brokensep cpan -- 2.25.1
|
|
Re: glibc -fstack-protector-strong
On 10/14/21 7:35 PM, Paul Eggleton wrote:
Hi folksThis was enabling ssp support in glibc not only for other programs but also for rest of glibc components during compile and that resulted in duplicate symbols, IIRC thats why we disabled it, the error you are seeing looks that we still have that problem lurking around. Unfortunately I dont have a solution handy to offer Thanks
|
|
glibc -fstack-protector-strong
Paul Eggleton
Hi folks
I'm looking at how -fstack-protector-strong might be enabled in the glibc recipe. It looks like it should already be enabled by default via --enable-stack-protector=strong in EXTRA_OECONF, however looking at the compile logs it is passing -fno-stack-protector instead. Examining the configure log: checking for -fstack-protector... (cached) no checking for -fstack-protector-strong... (cached) no checking for -fstack-protector-all... (cached) no This in turn comes from libc_cv_ssp_strong=no in CACHED_CONFIGUREVARS in glibc.inc. Searching back through the git history I can't find much by way of explanation as to why the stack protector options are disabled. Setting libc_cv_ssp_strong=yes however results in the following: | x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -fuse-ld=bfd -nostdlib -nostartfiles -r -o /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/libc_pic.os \ | -Wl,-d -Wl,--whole-archive /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/libc_pic.a -o /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/libc_pic.os | x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -fuse-ld=bfd -nostdlib -nostartfiles -r -o /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/elf/librtld.map.o \ | '-Wl,-(' /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/elf/dl-allobjs.os /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/elf/librtld.mapT | /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/9.3.0/ld.bfd: /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/libc_pic.a(libc_fatal.os): in function `__GI___libc_fatal': | /usr/src/debug/glibc/2.31+gitAUTOINC+4f0a61f753-r0/git/libio/../sysdeps/posix/libc_fatal.c:161: multiple definition of `__GI___libc_fatal'; /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/elf/dl-allobjs.os:/usr/src/debug/glibc/2.31+gitAUTOINC+4f0a61f753-r0/git/elf/dl-minimal.c:188: first defined here | /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/9.3.0/ld.bfd: /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/libc_pic.a(libc_fatal.os): in function `__GI___libc_fatal': | /usr/src/debug/glibc/2.31+gitAUTOINC+4f0a61f753-r0/git/libio/../sysdeps/posix/libc_fatal.c:161: multiple definition of `__libc_fatal'; /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/elf/dl-allobjs.os:/usr/src/debug/glibc/2.31+gitAUTOINC+4f0a61f753-r0/git/elf/dl-minimal.c:188: first defined here | collect2: error: ld returned 1 exit status | make[2]: *** [Makefile:499: /media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/build-x86_64-poky-linux/elf/librtld.map] Error 1 | make[2]: *** Waiting for unfinished jobs.... | make[2]: Leaving directory '/media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/git/elf' | make[1]: *** [Makefile:490: elf/subdir_lib] Error 2 | make[1]: Leaving directory '/media/large/oe/poky/tmp/work/core2-64-poky-linux/glibc/2.31+gitAUTOINC+4f0a61f753-r0/git' | make: *** [Makefile:9: all] Error 2 | ERROR: oe_runmake failed This is not an area I have looked much into before; does anyone have any insights? Thanks Paul
|
|
Re: docker fragment missing conntrack and netfilter entries?
#meta-virtualization
Bruce Ashfield
On Thu, Oct 14, 2021 at 12:23 PM <crawford.benjamin15@...> wrote:
FYI: you want the meta-virtualization mailing list, not the main yocto one for questions like this. There's a balancing act with the fragments: they are as non-overlapping as possible, they often support a wide range of kernel versions and kernel providers, so there are sometimes more, or less options than you'd expect in a fragment. In particular the fragments in meta-virtualization are changing right now, and are being unified in the kernel-cache repository (that allows the duplicated options to be rationalized). So depending on which docker.cfg you are looking at, you'd either send a patch to the linux-yocto mailing list, or the meta-virtualization list. In particular, the netfilter fragment is what is expected to provide many of the needed options, and that's what has been happening with the out of box docker, lxc, podman, k8s, etc, configurations tested in meta-virt. The docker.scc fragment will start pulling that in automatically as part of the de-duplication effort I hinted at above. But there's no harm in sending a patch, I'll figure out how/where it applies as I go through those efforts. Cheers, Bruce
-- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
|
|
[PATCH yocto-autobuilder-helper] scripts/collect-results: publish everything in tmp/log/oeqa/
Alexander Kanavin
From: Alexander Kanavin <alex@...>
In addition to the testresult json, testimage class now also provides the testimage task log and qemu console output log which can be useful for debugging test failures or even checking qemu test runs when failures did not happen. Rather than duplicate specific file/folder names, let's copy all that is available, and define what is published in the testimage class itself (with appropriate folder structure if/when needed). At the moment there's just three files, and they are copied into folders named after image names, so there's no clutter or risk of mixing them up with unrelated logs. [YOCTO #14518] Signed-off-by: Alexander Kanavin <alex@...> --- scripts/collect-results | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/collect-results b/scripts/collect-results index 93834d6..7caa177 100755 --- a/scripts/collect-results +++ b/scripts/collect-results @@ -3,11 +3,9 @@ WORKDIR=$1 DEST=$2 target=$3 -RESFILE=$WORKDIR/tmp/log/oeqa/testresults.json - -if [ -e $RESFILE ]; then - mkdir -p $DEST/$target - cp $WORKDIR/tmp/log/oeqa/testresults.json $DEST/$target/ +mkdir -p $DEST +if [ -e $WORKDIR/tmp/log/oeqa/ ]; then + cp -Lrf $WORKDIR/tmp/log/oeqa/ $DEST/$target fi if [ -e $WORKDIR/buildhistory ]; then -- 2.31.1
|
|
Re: docker fragment missing conntrack and netfilter entries?
#meta-virtualization
On 10/14/21 9:23 AM, crawford.benjamin15@... wrote:
Hi,seems fine. Please send a patch for enhancing it via docker.cfg Thanks,
|
|
Re: [PATCH yocto-autobuilder-helper] scripts/collect-results: publish everything in tmp/log/oeqa/
Alexander Kanavin
On Thu, 14 Oct 2021 at 18:08, Richard Purdie <richard.purdie@...> wrote: Since that build directory contains symlinks, we may need something like cp -L That's right, -L is needed. Alex
|
|
docker fragment missing conntrack and netfilter entries?
#meta-virtualization
crawford.benjamin15@...
Hi,
I have just completed a bringup of Poky on the ODROID N2+ platform, but noticed that Docker failed to start, complaining that it could not load the "nf_conntrack_netlink" module. After checking docker.cfg, I noticed that a few configuration options I expected were missing. Shouldn't the following be added: (?) CONFIG_NETFILTER_NETLINK=m CONFIG_NT_CT_NETLINK=m
|
|
Re: [PATCH yocto-autobuilder-helper] scripts/collect-results: publish everything in tmp/log/oeqa/
Richard Purdie
On Wed, 2021-10-13 at 18:18 +0200, Alexander Kanavin wrote:
From: Alexander Kanavin <alex@...>Since that build directory contains symlinks, we may need something like cp -L here? I didn't test but I think we might run into an issue? Cheers, Richard
|
|
Minutes: Yocto Project Weekly Triage Meeting 10/14/2021
Kiran Surendran
Wiki: https://wiki.yoctoproject.org/wiki/Bug_Triage Attendees: Steve, Randy, Bruce, Ross, Richard, Alexandre, Tim, Joshua, Kiran ARs: NONE
Medium+ 3.4 Unassigned Enhancements/Bugs: 68 (No change) Medium+ 3.5 Unassigned Enhancements/Bugs: 12 (No
change)
|
|
[PATCH yocto-autobuilder-helper] config.json: build FVP-Base instead of N1SDP
Ross Burton <ross@...>
FVP-Base is a better supported and more generally useful machine than N1S=
DP. Signed-off-by: Ross Burton <ross.burton@...> --- config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.json b/config.json index 0fe1f1a..dd890fe 100644 --- a/config.json +++ b/config.json @@ -324,11 +324,13 @@ "${BUILDDIR}/../meta-arm/meta-arm-bsp" ], "step1": { - "MACHINE": "n1sdp", + "shortname": "Build for fvp-base", + "MACHINE": "fvp-base", "BBTARGETS": "core-image-minimal core-image-sato core-im= age-sato:do_populate_sdk", "SANITYTARGETS" : "core-image-sato:do_testsdk" }, "step2": { + "shortname": "Build for juno", "MACHINE": "juno", "BBTARGETS": "core-image-minimal core-image-sato core-im= age-sato:do_populate_sdk", "SANITYTARGETS" : "core-image-sato:do_testsdk" --=20 2.25.1
|
|
Re: #zeus meta-intel
#zeus
Monsees, Steven C (US)
Thank you.
toggle quoted messageShow quoted text
I will most likely look into creating a dunfell based build this weekend... My current system is zeus based, centos, still using sysvinit on startup... Did run using clang 9.0 ? I appreciate your time and trouble, Steve
-----Original Message-----
From: Mittal, Anuj <anuj.mittal@...> Sent: Wednesday, October 13, 2021 9:28 PM To: Monsees, Steven C (US) <steven.monsees@...>; yocto@... Subject: Re: [yocto] #zeus meta-intel External Email Alert This email has been sent from an account outside of the BAE Systems network. Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar. There are no patches needed other than what is already in oe-core/meta- intel/meta-clang. I tried building zeus on Ubuntu 16.04 and didn't see any problem. zeus is no longer maintained or supported so I'd suggest checking a newer release or experimenting without using buildtools to see if that is exposing this problem. It does look like things are not being compiled properly or perhaps opencl-clang-native is linking to incorrect LLVM ... Thanks, Anuj On Wed, 2021-10-13 at 16:53 +0000, Monsees, Steven C (US) wrote:
|
|
[PATCH v2 1/1] sssd: re-package to fix QA issues
kai
From: Kai Kang <kai.kang@...>
It packages all file in ${libdir} to package sssd, including the .so symlink files. Then it causes QA issues: | ERROR: QA Issue: sssd rdepends on dbus-dev [dev-deps] | ERROR: QA Issue: sssd rdepends on ding-libs-dev [dev-deps] So re-package sssd then the .so symlink files and .pc files are packaged to sssd-dev which should be. File ${libdir}/libsss_sudo.so is not a symlink file but packaged to sssd-dev too. Then causes another QA issue: | ERROR: sssd-2.5.2-r0 do_package_qa: QA Issue: -dev package sssd-dev contains non-symlink .so '/usr/lib/libsss_sudo.so' [dev-elf] So create a new sub-package libsss-sudo to package file libsss_sudo.so and make sssd rdepends on it. Signed-off-by: Kai Kang <kai.kang@...> --- recipes-security/sssd/sssd_2.5.2.bb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/recipes-security/sssd/sssd_2.5.2.bb b/recipes-security/sssd/sssd_2.5.2.bb index 76d6e03..ed8af5e 100644 --- a/recipes-security/sssd/sssd_2.5.2.bb +++ b/recipes-security/sssd/sssd_2.5.2.bb @@ -125,10 +125,14 @@ SYSTEMD_SERVICE:${PN} = " \ " SYSTEMD_AUTO_ENABLE = "disable" -FILES:${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss*.so" -FILES:${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la" +PACKAGES =+ "libsss-sudo" +ALLOW_EMPTY:libsss-sudo = "1" -# The package contains symlinks that trip up insane -INSANE_SKIP:${PN} = "dev-so" +FILES:${PN} += "${base_libdir}/security/pam_sss*.so \ + ${datadir}/dbus-1/system-services/*.service \ + ${libdir}/krb5/* \ + ${libdir}/ldb/* \ + " +FILES:libsss-sudo = "${libdir}/libsss_sudo.so" -RDEPENDS:${PN} = "bind bind-utils dbus libldb libpam" +RDEPENDS:${PN} = "bind bind-utils dbus libldb libpam libsss-sudo" -- 2.17.1
|
|
[PATCH v2 0/1] sssd: re-package to fix QA issues
kai
From: Kai Kang <kai.kang@...>
v2: * replace _ with - new sub-package name * allow empty for new sub-package that it is enabled/disabled by a package config Kai Kang (1): sssd: re-package to fix QA issues recipes-security/sssd/sssd_2.5.2.bb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) -- 2.17.1
|
|
[psplash][PATCH v2] Add configure options to disable progress bar
Pavel Zhukov
Progress bar can overlap with products logos, added
--disable-progress-bar configure option to disable progress bar completely without patching the code. Default behaviour is to show progress bar Signed-off-by: Pavel Zhukov <pavel.zhukov@...> --- configure.ac | 8 ++++++++ psplash-config.h | 5 +++++ psplash.c | 14 ++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 2d836a1..2a7da91 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,14 @@ AS_IF([test x$disable_startup_msg =3D xtrue], [ EXTRA_GCC_FLAGS=3D"$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_STARTUP_MSG" ]) =20 +AC_ARG_ENABLE([progress-bar], + AS_HELP_STRING([--disable-progress-bar], [Disable progress bar]), + [disable_progress_bar=3Dtrue], + [disable_progress_bar=3Dfalse]) +AS_IF([test x$disable_progress_bar =3D xtrue], [ + EXTRA_GCC_FLAGS=3D"$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_PROGRESS_BAR" +]) + AC_ARG_ENABLE([img-fullscreen], AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in = fullscreen mode)]), [img_fullscreen=3Dtrue], diff --git a/psplash-config.h b/psplash-config.h index 0ba8440..eb90ef3 100644 --- a/psplash-config.h +++ b/psplash-config.h @@ -21,6 +21,11 @@ #define PSPLASH_IMG_FULLSCREEN 0 #endif =20 +/* Bool indicated if the progress bar should be disabled */ +#ifndef PSPLASH_DISABLE_PROGRESS_BAR +#define PSPLASH_SHOW_PROGRESS_BAR 1 +#endif + /* Position of the image split from top edge, numerator of fraction */ #define PSPLASH_IMG_SPLIT_NUMERATOR 5 =20 diff --git a/psplash.c b/psplash.c index 1a56629..ee1af6b 100644 --- a/psplash.c +++ b/psplash.c @@ -61,6 +61,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg) msg); } =20 +#ifdef PSPLASH_SHOW_PROGRESS_BAR void psplash_draw_progress (PSplashFB *fb, int value) { @@ -95,6 +96,7 @@ psplash_draw_progress (PSplashFB *fb, int value) DBG("value: %i, width: %i, barwidth :%i\n", value,=20 width, barwidth); } +#endif /* PSPLASH_SHOW_PROGRESS_BAR */ =20 static int=20 parse_command (PSplashFB *fb, char *string) @@ -108,20 +110,22 @@ parse_command (PSplashFB *fb, char *string) =20 command =3D strtok(string," "); =20 - if (!strcmp(command,"PROGRESS"))=20 + if (!strcmp(command,"MSG")) { char *arg =3D strtok(NULL, "\0"); =20 if (arg) - psplash_draw_progress (fb, atoi(arg)); + psplash_draw_msg (fb, arg); }=20 - else if (!strcmp(command,"MSG"))=20 + #ifdef PSPLASH_SHOW_PROGRESS_BAR + else if (!strcmp(command,"PROGRESS")) { char *arg =3D strtok(NULL, "\0"); =20 if (arg) - psplash_draw_msg (fb, arg); + psplash_draw_progress (fb, atoi(arg)); }=20 +#endif else if (!strcmp(command,"QUIT"))=20 { return 1; @@ -311,6 +315,7 @@ main (int argc, char** argv) POKY_IMG_ROWSTRIDE, POKY_IMG_RLE_PIXEL_DATA); =20 +#ifdef PSPLASH_SHOW_PROGRESS_BAR /* Draw progress bar border */ psplash_fb_draw_image (fb,=20 (fb->width - BAR_IMG_WIDTH)/2,=20 @@ -322,6 +327,7 @@ main (int argc, char** argv) BAR_IMG_RLE_PIXEL_DATA); =20 psplash_draw_progress (fb, 0); +#endif =20 #ifdef PSPLASH_STARTUP_MSG psplash_draw_msg (fb, PSPLASH_STARTUP_MSG); --=20 2.31.1
|
|
[psplash][PATCH] Add configure options to disable progress bar
Pavel Zhukov
From: Pavel Zhukov <pavel.zhukov@...>
Progress bar can overlap with products logos, added --disable-progress-bar configure option to disable progress bar completely without patching the code. Default behaviour is to show progress bar Signed-off-by: Pavel Zhukov <pavel.zhukov@...> --- configure.ac | 8 ++++++++ psplash-config.h | 5 +++++ psplash.c | 14 ++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 2d836a1..2a7da91 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,14 @@ AS_IF([test x$disable_startup_msg =3D xtrue], [ EXTRA_GCC_FLAGS=3D"$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_STARTUP_MSG" ]) =20 +AC_ARG_ENABLE([progress-bar], + AS_HELP_STRING([--disable-progress-bar], [Disable progress bar]), + [disable_progress_bar=3Dtrue], + [disable_progress_bar=3Dfalse]) +AS_IF([test x$disable_progress_bar =3D xtrue], [ + EXTRA_GCC_FLAGS=3D"$EXTRA_GCC_FLAGS -DPSPLASH_DISABLE_PROGRESS_BAR" +]) + AC_ARG_ENABLE([img-fullscreen], AS_HELP_STRING([--enable-img-fullscreen], [Enable the logo image in = fullscreen mode)]), [img_fullscreen=3Dtrue], diff --git a/psplash-config.h b/psplash-config.h index 0ba8440..eb90ef3 100644 --- a/psplash-config.h +++ b/psplash-config.h @@ -21,6 +21,11 @@ #define PSPLASH_IMG_FULLSCREEN 0 #endif =20 +/* Bool indicated if the progress bar should be disabled */ +#ifndef PSPLASH_DISABLE_PROGRESS_BAR +#define PSPLASH_SHOW_PROGRESS_BAR 1 +#endif + /* Position of the image split from top edge, numerator of fraction */ #define PSPLASH_IMG_SPLIT_NUMERATOR 5 =20 diff --git a/psplash.c b/psplash.c index 1a56629..ee1af6b 100644 --- a/psplash.c +++ b/psplash.c @@ -61,6 +61,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg) msg); } =20 +#ifdef PSPLASH_SHOW_PROGRESS_BAR void psplash_draw_progress (PSplashFB *fb, int value) { @@ -95,6 +96,7 @@ psplash_draw_progress (PSplashFB *fb, int value) DBG("value: %i, width: %i, barwidth :%i\n", value,=20 width, barwidth); } +#endif /* PSPLASH_SHOW_PROGRESS_BAR */ =20 static int=20 parse_command (PSplashFB *fb, char *string) @@ -108,20 +110,22 @@ parse_command (PSplashFB *fb, char *string) =20 command =3D strtok(string," "); =20 - if (!strcmp(command,"PROGRESS"))=20 + if (!strcmp(command,"MSG")) { char *arg =3D strtok(NULL, "\0"); =20 if (arg) - psplash_draw_progress (fb, atoi(arg)); + psplash_draw_msg (fb, arg); }=20 - else if (!strcmp(command,"MSG"))=20 + #ifdef PSPLASH_SHOW_PROGRESS_BAR + else if (!strcmp(command,"PROGRESS")) { char *arg =3D strtok(NULL, "\0"); =20 if (arg) - psplash_draw_msg (fb, arg); + psplash_draw_progress (fb, atoi(arg)); }=20 +#endif else if (!strcmp(command,"QUIT"))=20 { return 1; @@ -311,6 +315,7 @@ main (int argc, char** argv) POKY_IMG_ROWSTRIDE, POKY_IMG_RLE_PIXEL_DATA); =20 +#ifdef PSPLASH_SHOW_PROGRESS_BAR /* Draw progress bar border */ psplash_fb_draw_image (fb,=20 (fb->width - BAR_IMG_WIDTH)/2,=20 @@ -322,6 +327,7 @@ main (int argc, char** argv) BAR_IMG_RLE_PIXEL_DATA); =20 psplash_draw_progress (fb, 0); +#endif =20 #ifdef PSPLASH_STARTUP_MSG psplash_draw_msg (fb, PSPLASH_STARTUP_MSG); --=20 2.31.1
|
|