All of lore.kernel.org
 help / color / mirror / Atom feed
* Bitbake + Patches
@ 2022-08-22 20:54 forums
  2022-08-22 22:29 ` [yocto] " Khem Raj
  0 siblings, 1 reply; 11+ messages in thread
From: forums @ 2022-08-22 20:54 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]



I was told this was the right group to ask my question. If this is not right, please let me know.

I am currently using  Zeus, and with Zeus, we get Apache v2.4.41. But I would like to get a later version of apache because there have been a few fixes related to cyber security. So I believe that, given we’re using Zeus, we can’t upgrade to the latest version of Apache given the current recipe that Zeus uses. Therefore I believe that the only way accomplish getting tho the latest version of apache with Zeus would to be ‘patch’  the v2.4.41 version that comes with Zeus.

Looking at the Bitbake manual, in section 4.1, it states the following:

"BitBake takes several steps when fetching source code or files. The fetcher codebase deals with two distinct processes in order: obtaining the files from somewhere (cached or otherwise) and then unpacking those files into a specific location and perhaps in a specific way. Getting and unpacking the files is often optionally followed by patching. Patching, however, is not covered by this module."


The manual does not cover patching. 

Where can I get information on this process of patching something like apache or any other application that was add via IMAGE_INSTALL_append method.

Any help pointing me to where this process might be documented is much appreciated.


Thanks, Jim

[-- Attachment #2: Type: text/html, Size: 3342 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [yocto] Bitbake + Patches
  2022-08-22 20:54 Bitbake + Patches forums
@ 2022-08-22 22:29 ` Khem Raj
  2022-08-23 11:41   ` Peter Kjellerstedt
  0 siblings, 1 reply; 11+ messages in thread
From: Khem Raj @ 2022-08-22 22:29 UTC (permalink / raw)
  To: bitflipper; +Cc: yocto

On Mon, Aug 22, 2022 at 1:54 PM bitflipper <forums@bitflipper.net> wrote:
>
>
>
> I was told this was the right group to ask my question. If this is not right, please let me know.
>
> I am currently using  Zeus, and with Zeus, we get Apache v2.4.41. But I would like to get a later version of apache because there have been a few fixes related to cyber security. So I believe that, given we’re using Zeus, we can’t upgrade to the latest version of Apache given the current recipe that Zeus uses. Therefore I believe that the only way accomplish getting tho the latest version of apache with Zeus would to be ‘patch’  the v2.4.41 version that comes with Zeus.
>
> Looking at the Bitbake manual, in section 4.1, it states the following:
>
> "BitBake takes several steps when fetching source code or files. The fetcher codebase deals with two distinct processes in order: obtaining the files from somewhere (cached or otherwise) and then unpacking those files into a specific location and perhaps in a specific way. Getting and unpacking the files is often optionally followed by patching. Patching, however, is not covered by this module."
>
>
> The manual does not cover patching.
>
> Where can I get information on this process of patching something like apache or any other application that was add via IMAGE_INSTALL_append method.
>
> Any help pointing me to where this process might be documented is much appreciated.
>

look into mega manual something like this would help
https://docs.yoctoproject.org/dev-manual/common-tasks.html?highlight=writing+recipe#patching-code


>
> Thanks, Jim
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#57874): https://lists.yoctoproject.org/g/yocto/message/57874
> Mute This Topic: https://lists.yoctoproject.org/mt/93191096/1997914
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [yocto] Bitbake + Patches
  2022-08-22 22:29 ` [yocto] " Khem Raj
@ 2022-08-23 11:41   ` Peter Kjellerstedt
       [not found]     ` <B58205E1-72E9-41F6-9A52-A440A62C3C6B@bitflipper.net>
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Kjellerstedt @ 2022-08-23 11:41 UTC (permalink / raw)
  To: Khem Raj, bitflipper; +Cc: yocto@lists.yoctoproject.org

> -----Original Message-----
> From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On
> Behalf Of Khem Raj
> Sent: den 23 augusti 2022 00:29
> To: bitflipper <forums@bitflipper.net>
> Cc: yocto@lists.yoctoproject.org
> Subject: Re: [yocto] Bitbake + Patches
> 
> On Mon, Aug 22, 2022 at 1:54 PM bitflipper <forums@bitflipper.net> wrote:
> >
> >
> >
> > I was told this was the right group to ask my question. If this is not
> right, please let me know.
> >
> > I am currently using  Zeus, and with Zeus, we get Apache v2.4.41. But I
> would like to get a later version of apache because there have been a few
> fixes related to cyber security. So I believe that, given we’re using
> Zeus, we can’t upgrade to the latest version of Apache given the current
> recipe that Zeus uses. Therefore I believe that the only way accomplish
> getting tho the latest version of apache with Zeus would to be ‘patch’
> the v2.4.41 version that comes with Zeus.
> >
> > Looking at the Bitbake manual, in section 4.1, it states the following:
> >
> > "BitBake takes several steps when fetching source code or files. The
> fetcher codebase deals with two distinct processes in order: obtaining the
> files from somewhere (cached or otherwise) and then unpacking those files
> into a specific location and perhaps in a specific way. Getting and
> unpacking the files is often optionally followed by patching. Patching,
> however, is not covered by this module."
> >
> >
> > The manual does not cover patching.
> >
> > Where can I get information on this process of patching something like
> apache or any other application that was add via IMAGE_INSTALL_append
> method.
> >
> > Any help pointing me to where this process might be documented is much
> appreciated.
> >
> 
> look into mega manual something like this would help
> https://docs.yoctoproject.org/dev-manual/common-tasks.html?highlight=writing+recipe#patching-code
> 
> > Thanks, Jim

You don't really need to go patching apache just to update it. What you 
need is to add a bbappend file in one of your own layers. Call it 
recipes-httpd/apache2/apache2_2.4.41.bbappend and make it contain:

FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"

LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"

PV = "2.4.54"

SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
            file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
            file://0001-make_exports.awk-not-expose-the-path.patch"
SRC_URI_remove = "file://apache-configure_perlbin.patch"

SRC_URI[md5sum] = "<I don't have this at hand, but bitbake will tell you what it should be>"
SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"

You then also need to copy the three new patches and any other 
patches that differs between zeus and master and put them in your 
layer together with the bbappend file (in a subdirectory called 
"recipes-httpd/apache2/apache2").

The suggested contents of the bbappend above is based on the 
differences between the apache2 recipe in zeus and master.

//Peter


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [yocto] Bitbake + Patches
       [not found]     ` <B58205E1-72E9-41F6-9A52-A440A62C3C6B@bitflipper.net>
@ 2022-08-24 14:13       ` Peter Kjellerstedt
       [not found]         ` <0C54FD2B-AEAB-4425-9CEB-FFCA85458A16@bitflipper.net>
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Kjellerstedt @ 2022-08-24 14:13 UTC (permalink / raw)
  To: forums; +Cc: yocto@lists.yoctoproject.org

> -----Original Message-----
> From: forums <forums@bitflipper.net>
> Sent: den 23 augusti 2022 22:34
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Subject: Re: [yocto] Bitbake + Patches
>  
> Thanks Peter. I will look into this. But isn’t this bbappend considered a
> patch as well or will replace Apache 2.4.41 with the latest version of
> apache?

Well, it depends on how strict your terminology is. To me, a patch is a 
file, typically generated by `diff` or `git format-patch`. But of course, 
adding the bbappend suggested below will modify the recipe so that it 
builds the latest version of Apache.

> I am relatively new to yocto so there’s a lot I need to learn.
> 
> Jim
> 
> On Aug 23, 2022, at 7:41 AM, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
> >
> >> -----Original Message-----
> >> From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On Behalf Of Khem Raj
> >> Sent: den 23 augusti 2022 00:29
> >> To: bitflipper <forums@bitflipper.net>
> >> Cc: yocto@lists.yoctoproject.org
> >> Subject: Re: [yocto] Bitbake + Patches
> >>
> >> On Mon, Aug 22, 2022 at 1:54 PM bitflipper <forums@bitflipper.net> wrote:
> >>>
> >>> I was told this was the right group to ask my question. If this is 
> >>> not right, please let me know.
> >>>
> >>> I am currently using  Zeus, and with Zeus, we get Apache v2.4.41. 
> >>> But I would like to get a later version of apache because there 
> >>> have been a few fixes related to cyber security. So I believe that, 
> >>> given we’re using Zeus, we can’t upgrade to the latest version of 
> >>> Apache given the current recipe that Zeus uses. Therefore I believe 
> >>> that the only way accomplish getting tho the latest version of 
> >>> apache with Zeus would to be ‘patch’ the v2.4.41 version that comes 
> >>> with Zeus.
> >>>
> >>> Looking at the Bitbake manual, in section 4.1, it states the
> >>> following:
> >>>
> >>> "BitBake takes several steps when fetching source code or files. 
> >>> The fetcher codebase deals with two distinct processes in order: 
> >>> obtaining the files from somewhere (cached or otherwise) and then 
> >>> unpacking those files into a specific location and perhaps in a 
> >>> specific way. Getting and unpacking the files is often optionally 
> >>> followed by patching. Patching, however, is not covered by this 
> >>> module."
> >>>
> >>> The manual does not cover patching.
> >>>
> >>> Where can I get information on this process of patching something like
> >>> apache or any other application that was add via IMAGE_INSTALL_append
> >>> method.
> >>>
> >>> Any help pointing me to where this process might be documented is much
> >>> appreciated.
> >>>
> >>
> >> look into mega manual something like this would help
> >> https://docs.yoctoproject.org/dev-manual/common-tasks.html?highlight=writing+recipe#patching-code
> >>
> >>> Thanks, Jim
> >
> > You don't really need to go patching apache just to update it. What you
> > need is to add a bbappend file in one of your own layers. Call it
> > recipes-httpd/apache2/apache2_2.4.41.bbappend and make it contain:
> >
> > FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
> >
> > LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
> >
> > PV = "2.4.54"
> >
> > SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
> >            file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
> >            file://0001-make_exports.awk-not-expose-the-path.patch"
> > SRC_URI_remove = "file://apache-configure_perlbin.patch"
> >
> > SRC_URI[md5sum] = "<I don't have this at hand, but bitbake will tell you what it should be>"
> > SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
> >
> > You then also need to copy the three new patches and any other
> > patches that differs between zeus and master and put them in your
> > layer together with the bbappend file (in a subdirectory called
> > "recipes-httpd/apache2/apache2").
> >
> > The suggested contents of the bbappend above is based on the
> > differences between the apache2 recipe in zeus and master.
> >
> > //Peter

//Peter


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [yocto] Bitbake + Patches
       [not found]         ` <0C54FD2B-AEAB-4425-9CEB-FFCA85458A16@bitflipper.net>
@ 2022-08-26 14:03           ` Peter Kjellerstedt
  2022-08-29  2:49             ` forums
                               ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Peter Kjellerstedt @ 2022-08-26 14:03 UTC (permalink / raw)
  To: forums; +Cc: Yocto (yocto@lists.yoctoproject.org)

[-- Attachment #1: Type: text/plain, Size: 3183 bytes --]

[ In the future, please make sure to reply to list and not just to me. ]
[ Top posting since Outlook doesn’t support inline responses to HTML mails. ]

No, you are supposed to copy the suggest text for the bbappend verbatim, with the exception of the SRC_URI[md5sum] which need to be corrected to match the actual MD5 sum (which bitbake will tell you when you try to build). The suggested additions/deletions for SRC_URI in the bbappend I suggested should be correct as specified, based on the differences between the apache2 recipe in Zeus and master. You will also need to copy the three new patch files from master of meta-webserver, and any of the other patches that have been updated between Zeus and master. Changing PV takes care of the actual update of the code to the new version (since it determines which tar ball is fetched from upstream).

//Peter

From: forums <forums@bitflipper.net>
Sent: den 26 augusti 2022 14:21
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Subject: Re: [yocto] Bitbake + Patches


FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"

LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"

PV = "2.4.54"

SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
          file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch<file:///0009-support-apxs.in-force-destdir-to-be-empty-string.patch> \
          file://0001-make_exports.awk-not-expose-the-path.patch<file:///0001-make_exports.awk-not-expose-the-path.patch>"
SRC_URI_remove = "file://apache-configure_perlbin.patch"

SRC_URI[md5sum] = "<I don't have this at hand, but bitbake will tell you what it should be>"
SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"


H Peter. I have t admin, looking at the above bbappend, its really confusing to me. I’ve looked at some of the documents on bitbake and I just can’t find anything to teach me how to put a bbappend together to accomplish upgrading an application.

Like for example:

SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch

I believe this one should be:

                           SRC_URI += file:/usr/bin/patch

The next one:

file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch<file:///0009-support-apxs.in-force-destdir-to-be-empty-string.patch>

I’ve no idea what this one will nee to be.

And this one:

file://0001-make_exports.awk-not-expose-the-path.patch<file:///0001-make_exports.awk-not-expose-the-path.patch>

I don’t know what is supposed to go here either.


Then the SRC_URI_remove will be a pointer to the file containing the patches containing the diff’e between apache 12.4.1 and apache 2.4.54 ? I don’t think you can create a single patch file containing diff’s between multiple versions can you? I think it would have to be diff’s between apache 2.4.41 and 2.4.42. Right. Totally confused as to what to do here.

Any further help appreciated.

If you know of a resource for me to reference please pass it on. I just don’t see any clear documentation that explains how to construct a bbappend file.


Thanks, Jim

[-- Attachment #2: Type: text/html, Size: 9821 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [yocto] Bitbake + Patches
  2022-08-26 14:03           ` Peter Kjellerstedt
@ 2022-08-29  2:49             ` forums
       [not found]             ` <170FB0FB9A5D94E8.11791@lists.yoctoproject.org>
  2022-08-30 20:22             ` Randy MacLeod
  2 siblings, 0 replies; 11+ messages in thread
From: forums @ 2022-08-29  2:49 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Yocto (yocto@lists.yoctoproject.org)



Hi Peter. In my mind this process is starting to come together as to why is happening. So I copied the bbappend file as is  and I did get the error your expected that I would about the md5sum:


ERROR: apache2-2.4.54-r0 do_fetch: Checksum failure fetching https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2
ERROR: apache2-2.4.54-r0 do_fetch: Fetcher failure for URL: 'https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2'. Checksum mismatch!
File: '/ct/yocto/imx-5.4.70/downloads/httpd-2.4.54.tar.bz2' has md5 checksum 861b43073ab416d689f1fc4dfa087711 when <I don't have this at hand, but bitbake will tell you what it should be> was expected
If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
SRC_URI[md5sum] = "861b43073ab416d689f1fc4dfa087711"
SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.

But then I don’t understand what needs to be done with what you said here:

>> You then also need to copy the three new patches and any other
>> patches that differs between zeus and master and put them in your
>> layer together with the bbappend file (in a subdirectory called
>> "recipes-httpd/apache2/apache2”)


My assumption here is that I need to copy the difference between the Zeus and Master recipe for apache2 and place them in a file here;  

	recipies-httpd/apache2/apache2

The name of the file will be apache2 and it will contain the diffs between Zeus and Master for the apache2 recipes. And the diff are from the following file:

	./sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb

Right?


Thanks, Jim






> On Aug 26, 2022, at 10:03 AM, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
> 
> [ In the future, please make sure to reply to list and not just to me. ]
> [ Top posting since Outlook doesn’t support inline responses to HTML mails. ]
>  
> No, you are supposed to copy the suggest text for the bbappend verbatim, with the exception of the SRC_URI[md5sum] which need to be corrected to match the actual MD5 sum (which bitbake will tell you when you try to build). The suggested additions/deletions for SRC_URI in the bbappend I suggested should be correct as specified, based on the differences between the apache2 recipe in Zeus and master. You will also need to copy the three new patch files from master of meta-webserver, and any of the other patches that have been updated between Zeus and master. Changing PV takes care of the actual update of the code to the new version (since it determines which tar ball is fetched from upstream).
>  
> //Peter
>  
> From: forums <forums@bitflipper.net> 
> Sent: den 26 augusti 2022 14:21
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Subject: Re: [yocto] Bitbake + Patches
>  
>  
> FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
> 
> LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
> 
> PV = "2.4.54"
> 
> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
>           file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
>           file://0001-make_exports.awk-not-expose-the-path.patch"
> SRC_URI_remove = "file://apache-configure_perlbin.patch"
> 
> SRC_URI[md5sum] = "<I don't have this at hand, but bitbake will tell you what it should be>"
> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>  
>  
> H Peter. I have t admin, looking at the above bbappend, its really confusing to me. I’ve looked at some of the documents on bitbake and I just can’t find anything to teach me how to put a bbappend together to accomplish upgrading an application.
>  
> Like for example:
>  
> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch
>  
> I believe this one should be:   
>  
>                            SRC_URI += file:/usr/bin/patch
>  
> The next one:
>  
> file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch
>  
> I’ve no idea what this one will nee to be.
>  
> And this one:
>  
> file://0001-make_exports.awk-not-expose-the-path.patch
>  
> I don’t know what is supposed to go here either.
>  
>  
> Then the SRC_URI_remove will be a pointer to the file containing the patches containing the diff’e between apache 12.4.1 and apache 2.4.54 ? I don’t think you can create a single patch file containing diff’s between multiple versions can you? I think it would have to be diff’s between apache 2.4.41 and 2.4.42. Right. Totally confused as to what to do here.
>  
> Any further help appreciated.
>  
> If you know of a resource for me to reference please pass it on. I just don’t see any clear documentation that explains how to construct a bbappend file.
>  
>  
> Thanks, Jim



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [yocto] Bitbake + Patches
       [not found]             ` <170FB0FB9A5D94E8.11791@lists.yoctoproject.org>
@ 2022-08-29 19:34               ` forums
       [not found]               ` <170FE7D455D5B425.21714@lists.yoctoproject.org>
  1 sibling, 0 replies; 11+ messages in thread
From: forums @ 2022-08-29 19:34 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Yocto (yocto@lists.yoctoproject.org)




Peter, I plugging in the  bbappend as is except for the md5sumthat was spit out by the yocto build. Here’s my bbappend file:


	FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:”

	LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3”

	PV = “2.4.54"

	SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
            file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
            file://0001-make_exports.awk-not-expose-the-path.patch”
	SRC_URI_remove = "file://apache-configure_perlbin.patch”

	SRC_URI[md5sum] = "<861b43073ab416d689f1fc4dfa087711>”
	SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"


When I run bitable, I get the following error:



	ERROR: smith-nephew-cp-lwb5-2.4.54-r0 do_populate_lic: QA Issue: smith-nephew-cp-lwb5: LIC_FILES_CHKSUM points to an invalid file: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.54-r0/smith-nephew-cp-lwb5-2.4.54/LICENSE [license-checksum]
	ERROR: smith-nephew-cp-lwb5-2.4.54-r0 do_populate_lic: Fatal QA errors found, failing task.
	ERROR: Logfile of failure stored in: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.54-r0/temp/log.do_populate_lic.1455644
	ERROR: Task (/ct/yocto/imx-5.4.70/sources/meta-laird-cp/recipes-packages/images/smith-nephew-cp-lwb5.bb:do_populate_lic) failed with exit code '1'


I’m suspecting its something to do with the LIC_FILES_CHKSUM ??

Any input appreciated.



Thanks, Jim




> On Aug 28, 2022, at 10:49 PM, bitflipper <forums@bitflipper.net> wrote:
> 
> 
> 
> Hi Peter. In my mind this process is starting to come together as to why is happening. So I copied the bbappend file as is  and I did get the error your expected that I would about the md5sum:
> 
> 
> ERROR: apache2-2.4.54-r0 do_fetch: Checksum failure fetching https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2
> ERROR: apache2-2.4.54-r0 do_fetch: Fetcher failure for URL: 'https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2'. Checksum mismatch!
> File: '/ct/yocto/imx-5.4.70/downloads/httpd-2.4.54.tar.bz2' has md5 checksum 861b43073ab416d689f1fc4dfa087711 when <I don't have this at hand, but bitbake will tell you what it should be> was expected
> If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
> SRC_URI[md5sum] = "861b43073ab416d689f1fc4dfa087711"
> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
> Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.
> 
> But then I don’t understand what needs to be done with what you said here:
> 
>>> You then also need to copy the three new patches and any other
>>> patches that differs between zeus and master and put them in your
>>> layer together with the bbappend file (in a subdirectory called
>>> "recipes-httpd/apache2/apache2”)
> 
> 
> My assumption here is that I need to copy the difference between the Zeus and Master recipe for apache2 and place them in a file here;  
> 
> 	recipies-httpd/apache2/apache2
> 
> The name of the file will be apache2 and it will contain the diffs between Zeus and Master for the apache2 recipes. And the diff are from the following file:
> 
> 	./sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb
> 
> Right?
> 
> 
> Thanks, Jim
> 
> 
> 
> 
> 
> 
>> On Aug 26, 2022, at 10:03 AM, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
>> 
>> [ In the future, please make sure to reply to list and not just to me. ]
>> [ Top posting since Outlook doesn’t support inline responses to HTML mails. ]
>> 
>> No, you are supposed to copy the suggest text for the bbappend verbatim, with the exception of the SRC_URI[md5sum] which need to be corrected to match the actual MD5 sum (which bitbake will tell you when you try to build). The suggested additions/deletions for SRC_URI in the bbappend I suggested should be correct as specified, based on the differences between the apache2 recipe in Zeus and master. You will also need to copy the three new patch files from master of meta-webserver, and any of the other patches that have been updated between Zeus and master. Changing PV takes care of the actual update of the code to the new version (since it determines which tar ball is fetched from upstream).
>> 
>> //Peter
>> 
>> From: forums <forums@bitflipper.net> 
>> Sent: den 26 augusti 2022 14:21
>> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>> Subject: Re: [yocto] Bitbake + Patches
>> 
>> 
>> FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
>> 
>> LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
>> 
>> PV = "2.4.54"
>> 
>> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
>>          file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
>>          file://0001-make_exports.awk-not-expose-the-path.patch"
>> SRC_URI_remove = "file://apache-configure_perlbin.patch"
>> 
>> SRC_URI[md5sum] = "<I don't have this at hand, but bitbake will tell you what it should be>"
>> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>> 
>> 
>> H Peter. I have t admin, looking at the above bbappend, its really confusing to me. I’ve looked at some of the documents on bitbake and I just can’t find anything to teach me how to put a bbappend together to accomplish upgrading an application.
>> 
>> Like for example:
>> 
>> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch
>> 
>> I believe this one should be:   
>> 
>>                           SRC_URI += file:/usr/bin/patch
>> 
>> The next one:
>> 
>> file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch
>> 
>> I’ve no idea what this one will nee to be.
>> 
>> And this one:
>> 
>> file://0001-make_exports.awk-not-expose-the-path.patch
>> 
>> I don’t know what is supposed to go here either.
>> 
>> 
>> Then the SRC_URI_remove will be a pointer to the file containing the patches containing the diff’e between apache 12.4.1 and apache 2.4.54 ? I don’t think you can create a single patch file containing diff’s between multiple versions can you? I think it would have to be diff’s between apache 2.4.41 and 2.4.42. Right. Totally confused as to what to do here.
>> 
>> Any further help appreciated.
>> 
>> If you know of a resource for me to reference please pass it on. I just don’t see any clear documentation that explains how to construct a bbappend file.
>> 
>> 
>> Thanks, Jim
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#57932): https://lists.yoctoproject.org/g/yocto/message/57932
> Mute This Topic: https://lists.yoctoproject.org/mt/93191096/7113531
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [forums@bitflipper.net]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [yocto] Bitbake + Patches
       [not found]               ` <170FE7D455D5B425.21714@lists.yoctoproject.org>
@ 2022-08-29 20:06                 ` forums
  2022-08-29 22:06                   ` forums
  0 siblings, 1 reply; 11+ messages in thread
From: forums @ 2022-08-29 20:06 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Yocto (yocto@lists.yoctoproject.org)




Peter, I think I know what caused the Error. I think apache 2.4.52 will be sufficient for our current needs. 

I have subsequently changed the PV to 2.4.52. But that LC_FILES_CHKSUM is still generating the same build error. How did you get the MD5 Checksum? If you can tell me which file you took it form that would be helpful and I can go and get that MD5 sum from Honiker tree — whatever file it was that I should get it from.


Thanks, Jim


> On Aug 29, 2022, at 3:34 PM, bitflipper <forums@bitflipper.net> wrote:
> 
> 
> 
> 
> Peter, I plugging in the  bbappend as is except for the md5sumthat was spit out by the yocto build. Here’s my bbappend file:
> 
> 
> 	FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:”
> 
> 	LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3”
> 
> 	PV = “2.4.54"
> 
> 	SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
>            file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
>            file://0001-make_exports.awk-not-expose-the-path.patch”
> 	SRC_URI_remove = "file://apache-configure_perlbin.patch”
> 
> 	SRC_URI[md5sum] = "<861b43073ab416d689f1fc4dfa087711>”
> 	SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
> 
> 
> When I run bitable, I get the following error:
> 
> 
> 
> 	ERROR: smith-nephew-cp-lwb5-2.4.54-r0 do_populate_lic: QA Issue: smith-nephew-cp-lwb5: LIC_FILES_CHKSUM points to an invalid file: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.54-r0/smith-nephew-cp-lwb5-2.4.54/LICENSE [license-checksum]
> 	ERROR: smith-nephew-cp-lwb5-2.4.54-r0 do_populate_lic: Fatal QA errors found, failing task.
> 	ERROR: Logfile of failure stored in: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.54-r0/temp/log.do_populate_lic.1455644
> 	ERROR: Task (/ct/yocto/imx-5.4.70/sources/meta-laird-cp/recipes-packages/images/smith-nephew-cp-lwb5.bb:do_populate_lic) failed with exit code '1'
> 
> 
> I’m suspecting its something to do with the LIC_FILES_CHKSUM ??
> 
> Any input appreciated.
> 
> 
> 
> Thanks, Jim
> 
> 
> 
> 
>> On Aug 28, 2022, at 10:49 PM, bitflipper <forums@bitflipper.net> wrote:
>> 
>> 
>> 
>> Hi Peter. In my mind this process is starting to come together as to why is happening. So I copied the bbappend file as is  and I did get the error your expected that I would about the md5sum:
>> 
>> 
>> ERROR: apache2-2.4.54-r0 do_fetch: Checksum failure fetching https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2
>> ERROR: apache2-2.4.54-r0 do_fetch: Fetcher failure for URL: 'https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2'. Checksum mismatch!
>> File: '/ct/yocto/imx-5.4.70/downloads/httpd-2.4.54.tar.bz2' has md5 checksum 861b43073ab416d689f1fc4dfa087711 when <I don't have this at hand, but bitbake will tell you what it should be> was expected
>> If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
>> SRC_URI[md5sum] = "861b43073ab416d689f1fc4dfa087711"
>> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>> Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.
>> 
>> But then I don’t understand what needs to be done with what you said here:
>> 
>>>> You then also need to copy the three new patches and any other
>>>> patches that differs between zeus and master and put them in your
>>>> layer together with the bbappend file (in a subdirectory called
>>>> "recipes-httpd/apache2/apache2”)
>> 
>> 
>> My assumption here is that I need to copy the difference between the Zeus and Master recipe for apache2 and place them in a file here;  
>> 
>> 	recipies-httpd/apache2/apache2
>> 
>> The name of the file will be apache2 and it will contain the diffs between Zeus and Master for the apache2 recipes. And the diff are from the following file:
>> 
>> 	./sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb
>> 
>> Right?
>> 
>> 
>> Thanks, Jim
>> 
>> 
>> 
>> 
>> 
>> 
>>> On Aug 26, 2022, at 10:03 AM, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
>>> 
>>> [ In the future, please make sure to reply to list and not just to me. ]
>>> [ Top posting since Outlook doesn’t support inline responses to HTML mails. ]
>>> 
>>> No, you are supposed to copy the suggest text for the bbappend verbatim, with the exception of the SRC_URI[md5sum] which need to be corrected to match the actual MD5 sum (which bitbake will tell you when you try to build). The suggested additions/deletions for SRC_URI in the bbappend I suggested should be correct as specified, based on the differences between the apache2 recipe in Zeus and master. You will also need to copy the three new patch files from master of meta-webserver, and any of the other patches that have been updated between Zeus and master. Changing PV takes care of the actual update of the code to the new version (since it determines which tar ball is fetched from upstream).
>>> 
>>> //Peter
>>> 
>>> From: forums <forums@bitflipper.net> 
>>> Sent: den 26 augusti 2022 14:21
>>> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>>> Subject: Re: [yocto] Bitbake + Patches
>>> 
>>> 
>>> FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
>>> 
>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
>>> 
>>> PV = "2.4.54"
>>> 
>>> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
>>>         file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
>>>         file://0001-make_exports.awk-not-expose-the-path.patch"
>>> SRC_URI_remove = "file://apache-configure_perlbin.patch"
>>> 
>>> SRC_URI[md5sum] = "<I don't have this at hand, but bitbake will tell you what it should be>"
>>> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>>> 
>>> 
>>> H Peter. I have t admin, looking at the above bbappend, its really confusing to me. I’ve looked at some of the documents on bitbake and I just can’t find anything to teach me how to put a bbappend together to accomplish upgrading an application.
>>> 
>>> Like for example:
>>> 
>>> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch
>>> 
>>> I believe this one should be:   
>>> 
>>>                          SRC_URI += file:/usr/bin/patch
>>> 
>>> The next one:
>>> 
>>> file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch
>>> 
>>> I’ve no idea what this one will nee to be.
>>> 
>>> And this one:
>>> 
>>> file://0001-make_exports.awk-not-expose-the-path.patch
>>> 
>>> I don’t know what is supposed to go here either.
>>> 
>>> 
>>> Then the SRC_URI_remove will be a pointer to the file containing the patches containing the diff’e between apache 12.4.1 and apache 2.4.54 ? I don’t think you can create a single patch file containing diff’s between multiple versions can you? I think it would have to be diff’s between apache 2.4.41 and 2.4.42. Right. Totally confused as to what to do here.
>>> 
>>> Any further help appreciated.
>>> 
>>> If you know of a resource for me to reference please pass it on. I just don’t see any clear documentation that explains how to construct a bbappend file.
>>> 
>>> 
>>> Thanks, Jim
>> 
>> 
>> 
>> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#57937): https://lists.yoctoproject.org/g/yocto/message/57937
> Mute This Topic: https://lists.yoctoproject.org/mt/93191096/7113531
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [forums@bitflipper.net]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [yocto] Bitbake + Patches
  2022-08-29 20:06                 ` forums
@ 2022-08-29 22:06                   ` forums
  2022-09-06 18:01                     ` Peter Kjellerstedt
  0 siblings, 1 reply; 11+ messages in thread
From: forums @ 2022-08-29 22:06 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Yocto (yocto@lists.yoctoproject.org)




Peter, so here’s my current bbappend file for Apache 2.4.52 which is included with honester:

	FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:”

	LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3”

	PV = “2.4.52"

	SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
            file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
            file://0001-make_exports.awk-not-expose-the-path.patch”
	SRC_URI_remove = "file://apache-configure_perlbin.patch”

	SRC_URI[md5sum] = “861b43073ab416d689f1fc4dfa087711"
	SRC_URI[sha256sum] = “eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340”

And the current build error:


	ERROR: smith-nephew-cp-lwb5-2.4.52-r0 do_populate_lic: QA Issue: smith-nephew-cp-lwb5: LIC_FILES_CHKSUM points to an invalid file: /ct/yocto/imx-	5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.52-r0/smith-nephew-cp-lwb5-2.4.52/LICENSE [license-checksum]
	ERROR: smith-nephew-cp-lwb5-2.4.52-r0 do_populate_lic: Fatal QA errors found, failing task.
	ERROR: Logfile of failure stored in: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.52-r0/temp/log.do_populate_lic.1463178
	ERROR: Task (/ct/yocto/imx-5.4.70/sources/meta-laird-cp/recipes-packages/images/smith-nephew-cp-lwb5.bb:do_populate_lic) failed with exit code ‘1’

My gut feeling is that the SRC_URI[mdtsum] and SRC_URI[sha256sum] and out of whack because I needed to switch from 2.4.54  to  2.4.52 of apache.  You supplied the SRC_URI[sha256sum] based on a 2.4.54 version of Apache?  and I filled in the SRC_URI[md5sum] based on what bitable told me it should be. If you can tell me how to get the correct SRC_URI[sha256sum] for apache 2.4.52 I think I can get past this error.


Thanks, Jim




 









> On Aug 29, 2022, at 4:06 PM, forums <forums@bitflipper.net> wrote:
> 
> 
> 
> 
> Peter, I think I know what caused the Error. I think apache 2.4.52 will be sufficient for our current needs. 
> 
> I have subsequently changed the PV to 2.4.52. But that LC_FILES_CHKSUM is still generating the same build error. How did you get the MD5 Checksum? If you can tell me which file you took it form that would be helpful and I can go and get that MD5 sum from Honiker tree — whatever file it was that I should get it from.
> 
> 
> Thanks, Jim
> 
> 
>> On Aug 29, 2022, at 3:34 PM, bitflipper <forums@bitflipper.net> wrote:
>> 
>> 
>> 
>> 
>> Peter, I plugging in the  bbappend as is except for the md5sumthat was spit out by the yocto build. Here’s my bbappend file:
>> 
>> 
>> 	FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:”
>> 
>> 	LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3”
>> 
>> 	PV = “2.4.54"
>> 
>> 	SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
>>           file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
>>           file://0001-make_exports.awk-not-expose-the-path.patch”
>> 	SRC_URI_remove = "file://apache-configure_perlbin.patch”
>> 
>> 	SRC_URI[md5sum] = "<861b43073ab416d689f1fc4dfa087711>”
>> 	SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>> 
>> 
>> When I run bitable, I get the following error:
>> 
>> 
>> 
>> 	ERROR: smith-nephew-cp-lwb5-2.4.54-r0 do_populate_lic: QA Issue: smith-nephew-cp-lwb5: LIC_FILES_CHKSUM points to an invalid file: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.54-r0/smith-nephew-cp-lwb5-2.4.54/LICENSE [license-checksum]
>> 	ERROR: smith-nephew-cp-lwb5-2.4.54-r0 do_populate_lic: Fatal QA errors found, failing task.
>> 	ERROR: Logfile of failure stored in: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.54-r0/temp/log.do_populate_lic.1455644
>> 	ERROR: Task (/ct/yocto/imx-5.4.70/sources/meta-laird-cp/recipes-packages/images/smith-nephew-cp-lwb5.bb:do_populate_lic) failed with exit code '1'
>> 
>> 
>> I’m suspecting its something to do with the LIC_FILES_CHKSUM ??
>> 
>> Any input appreciated.
>> 
>> 
>> 
>> Thanks, Jim
>> 
>> 
>> 
>> 
>>> On Aug 28, 2022, at 10:49 PM, bitflipper <forums@bitflipper.net> wrote:
>>> 
>>> 
>>> 
>>> Hi Peter. In my mind this process is starting to come together as to why is happening. So I copied the bbappend file as is  and I did get the error your expected that I would about the md5sum:
>>> 
>>> 
>>> ERROR: apache2-2.4.54-r0 do_fetch: Checksum failure fetching https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2
>>> ERROR: apache2-2.4.54-r0 do_fetch: Fetcher failure for URL: 'https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2'. Checksum mismatch!
>>> File: '/ct/yocto/imx-5.4.70/downloads/httpd-2.4.54.tar.bz2' has md5 checksum 861b43073ab416d689f1fc4dfa087711 when <I don't have this at hand, but bitbake will tell you what it should be> was expected
>>> If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
>>> SRC_URI[md5sum] = "861b43073ab416d689f1fc4dfa087711"
>>> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>>> Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.
>>> 
>>> But then I don’t understand what needs to be done with what you said here:
>>> 
>>>>> You then also need to copy the three new patches and any other
>>>>> patches that differs between zeus and master and put them in your
>>>>> layer together with the bbappend file (in a subdirectory called
>>>>> "recipes-httpd/apache2/apache2”)
>>> 
>>> 
>>> My assumption here is that I need to copy the difference between the Zeus and Master recipe for apache2 and place them in a file here;  
>>> 
>>> 	recipies-httpd/apache2/apache2
>>> 
>>> The name of the file will be apache2 and it will contain the diffs between Zeus and Master for the apache2 recipes. And the diff are from the following file:
>>> 
>>> 	./sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb
>>> 
>>> Right?
>>> 
>>> 
>>> Thanks, Jim
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>> On Aug 26, 2022, at 10:03 AM, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
>>>> 
>>>> [ In the future, please make sure to reply to list and not just to me. ]
>>>> [ Top posting since Outlook doesn’t support inline responses to HTML mails. ]
>>>> 
>>>> No, you are supposed to copy the suggest text for the bbappend verbatim, with the exception of the SRC_URI[md5sum] which need to be corrected to match the actual MD5 sum (which bitbake will tell you when you try to build). The suggested additions/deletions for SRC_URI in the bbappend I suggested should be correct as specified, based on the differences between the apache2 recipe in Zeus and master. You will also need to copy the three new patch files from master of meta-webserver, and any of the other patches that have been updated between Zeus and master. Changing PV takes care of the actual update of the code to the new version (since it determines which tar ball is fetched from upstream).
>>>> 
>>>> //Peter
>>>> 
>>>> From: forums <forums@bitflipper.net> 
>>>> Sent: den 26 augusti 2022 14:21
>>>> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>>>> Subject: Re: [yocto] Bitbake + Patches
>>>> 
>>>> 
>>>> FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
>>>> 
>>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
>>>> 
>>>> PV = "2.4.54"
>>>> 
>>>> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
>>>>        file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
>>>>        file://0001-make_exports.awk-not-expose-the-path.patch"
>>>> SRC_URI_remove = "file://apache-configure_perlbin.patch"
>>>> 
>>>> SRC_URI[md5sum] = "<I don't have this at hand, but bitbake will tell you what it should be>"
>>>> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>>>> 
>>>> 
>>>> H Peter. I have t admin, looking at the above bbappend, its really confusing to me. I’ve looked at some of the documents on bitbake and I just can’t find anything to teach me how to put a bbappend together to accomplish upgrading an application.
>>>> 
>>>> Like for example:
>>>> 
>>>> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch
>>>> 
>>>> I believe this one should be:   
>>>> 
>>>>                         SRC_URI += file:/usr/bin/patch
>>>> 
>>>> The next one:
>>>> 
>>>> file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch
>>>> 
>>>> I’ve no idea what this one will nee to be.
>>>> 
>>>> And this one:
>>>> 
>>>> file://0001-make_exports.awk-not-expose-the-path.patch
>>>> 
>>>> I don’t know what is supposed to go here either.
>>>> 
>>>> 
>>>> Then the SRC_URI_remove will be a pointer to the file containing the patches containing the diff’e between apache 12.4.1 and apache 2.4.54 ? I don’t think you can create a single patch file containing diff’s between multiple versions can you? I think it would have to be diff’s between apache 2.4.41 and 2.4.42. Right. Totally confused as to what to do here.
>>>> 
>>>> Any further help appreciated.
>>>> 
>>>> If you know of a resource for me to reference please pass it on. I just don’t see any clear documentation that explains how to construct a bbappend file.
>>>> 
>>>> 
>>>> Thanks, Jim
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#57937): https://lists.yoctoproject.org/g/yocto/message/57937
>> Mute This Topic: https://lists.yoctoproject.org/mt/93191096/7113531
>> Group Owner: yocto+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [forums@bitflipper.net]
>> -=-=-=-=-=-=-=-=-=-=-=-
>> 
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [yocto] Bitbake + Patches
  2022-08-26 14:03           ` Peter Kjellerstedt
  2022-08-29  2:49             ` forums
       [not found]             ` <170FB0FB9A5D94E8.11791@lists.yoctoproject.org>
@ 2022-08-30 20:22             ` Randy MacLeod
  2 siblings, 0 replies; 11+ messages in thread
From: Randy MacLeod @ 2022-08-30 20:22 UTC (permalink / raw)
  To: forums; +Cc: Yocto (yocto@lists.yoctoproject.org), Peter Kjellerstedt

[-- Attachment #1: Type: text/plain, Size: 4688 bytes --]

On 2022-08-26 10:03, Peter Kjellerstedt wrote:
>
> [ In the future, please make sure to reply to list and not just to me. ]
>
> [ Top posting since Outlook doesn’t support inline responses to HTML 
> mails. ]
>
> No, you are supposed to copy the suggest text for the bbappend 
> verbatim, with the exception of theSRC_URI[md5sum]which need to be 
> corrected to match the actual MD5 sum (which bitbake will tell you 
> when you try to build). The suggested additions/deletions for 
> SRC_URIin the bbappend I suggested should be correct as specified, 
> based on the differences between the apache2 recipe in Zeus and 
> master. You will also need to copy the three new patch files from 
> master of meta-webserver, and any of the other patches that have been 
> updated between Zeus and master. Changing PVtakes care of the actual 
> update of the code to the new version (since it determines which tar 
> ball is fetched from upstream).
>
> //Peter
>
Jim,

In addition to all of this, note that the 'zeus' branch was only 
supported until
August 2020:

https://wiki.yoctoproject.org/wiki/Releases


If you want longer term support to be able to use a well maintained
release of Yocto for 5, 10 or 15 years, there are vendors, including
Wind River, that supply those services. See:
https://www.yoctoproject.org/ecosystem/members/

Good luck,

../Randy


> *From:*forums <forums@bitflipper.net>
> *Sent:* den 26 augusti 2022 14:21
> *To:* Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> *Subject:* Re: [yocto] Bitbake + Patches
>
>         FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
>
>         LIC_FILES_CHKSUM =
>         "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3
>         <file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3>"
>
>         PV = "2.4.54"
>
>         SRC_URI +=
>         "file://0008-Fix-perl-install-directory-to-usr-bin.patch
>         <file://0008-Fix-perl-install-directory-to-usr-bin.patch> \
>         file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch
>         <file:///0009-support-apxs.in-force-destdir-to-be-empty-string.patch> \
>         file://0001-make_exports.awk-not-expose-the-path.patch
>         <file:///0001-make_exports.awk-not-expose-the-path.patch>"
>         SRC_URI_remove = "file://apache-configure_perlbin.patch
>         <file://apache-configure_perlbin.patch>"
>
>         SRC_URI[md5sum] = "<I don't have this at hand, but bitbake
>         will tell you what it should be>"
>         SRC_URI[sha256sum] =
>         "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>
> H Peter. I have t admin, looking at the above bbappend, its really 
> confusing to me. I’ve looked at some of the documents on bitbake and I 
> just can’t find anything to teach me how to put a bbappend together to 
> accomplish upgrading an application.
>
> Like for example:
>
>         SRC_URI +=
>         "file://0008-Fix-perl-install-directory-to-usr-bin.patch
>         <file://0008-Fix-perl-install-directory-to-usr-bin.patch>
>
> I believe this one should be:
>
> SRC_URI += file:/usr/bin/patch
>
> The next one:
>
>         file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch
>         <file:///0009-support-apxs.in-force-destdir-to-be-empty-string.patch>
>
> I’ve no idea what this one will nee to be.
>
> And this one:
>
>         file://0001-make_exports.awk-not-expose-the-path.patch
>         <file:///0001-make_exports.awk-not-expose-the-path.patch>
>
> I don’t know what is supposed to go here either.
>
> Then the SRC_URI_remove will be a pointer to the file containing the 
> patches containing the diff’e between apache 12.4.1 and apache 2.4.54 
> ? I don’t think you can create a single patch file containing diff’s 
> between multiple versions can you? I think it would have to be diff’s 
> between apache 2.4.41 and 2.4.42. Right. Totally confused as to what 
> to do here.
>
> Any further help appreciated.
>
> If you know of a resource for me to reference please pass it on. I 
> just don’t see any clear documentation that explains how to construct 
> a bbappend file.
>
> Thanks, Jim
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#57911):https://lists.yoctoproject.org/g/yocto/message/57911
> Mute This Topic:https://lists.yoctoproject.org/mt/93191096/3616765
> Group Owner:yocto+owner@lists.yoctoproject.org
> Unsubscribe:https://lists.yoctoproject.org/g/yocto/unsub  [randy.macleod@windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

-- 
# Randy MacLeod
# Wind River Linux

[-- Attachment #2: Type: text/html, Size: 14438 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [yocto] Bitbake + Patches
  2022-08-29 22:06                   ` forums
@ 2022-09-06 18:01                     ` Peter Kjellerstedt
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Kjellerstedt @ 2022-09-06 18:01 UTC (permalink / raw)
  To: bitflipper; +Cc: Yocto (yocto@lists.yoctoproject.org)

[-- Attachment #1: Type: text/plain, Size: 11230 bytes --]

Sorry for not responding earlier. I do not read this list regularly.

The values I supplied for the suggested bbappend all come from the version of the apache2 recipe that is on master of the openembedded repository.
If you change the version from 2.4.54 to 2.4.52, then yes, you will have to change the checksums as well to match. It also means that you may need to apply other patches (based on what the recipe for apache2 looks like on the Honister branch).

Looking at your error messages below, they refer to a recipe called “smith-nephew-cp-lwb5”. I do not know what that is (though the version matches apache2’s…)

//Peter

From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On Behalf Of bitflipper
Sent: den 30 augusti 2022 00:06
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: Yocto (yocto@lists.yoctoproject.org) <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] Bitbake + Patches




Peter, so here’s my current bbappend file for Apache 2.4.52 which is included with honester:

        FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:”

        LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3”

        PV = <file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3”%0b%0b       %20PV%20=%20> “2.4.52"

        SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
            file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
            file://0001-make_exports.awk-not-expose-the-path.patch”
        SRC_URI_remove = "file://apache-configure_perlbin.patch”

        SRC_URI[md5sum] = <file://apache-configure_perlbin.patch”%0b%0b       %20SRC_URI[md5sum]%20=%20> “861b43073ab416d689f1fc4dfa087711"
        SRC_URI[sha256sum] = “eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340”

And the current build error:


        ERROR: smith-nephew-cp-lwb5-2.4.52-r0 do_populate_lic: QA Issue: smith-nephew-cp-lwb5: LIC_FILES_CHKSUM points to an invalid file: /ct/yocto/imx-       5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.52-r0/smith-nephew-cp-lwb5-2.4.52/LICENSE [license-checksum]
        ERROR: smith-nephew-cp-lwb5-2.4.52-r0 do_populate_lic: Fatal QA errors found, failing task.
        ERROR: Logfile of failure stored in: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.52-r0/temp/log.do_populate_lic.1463178
        ERROR: Task (/ct/yocto/imx-5.4.70/sources/meta-laird-cp/recipes-packages/images/smith-nephew-cp-lwb5.bb:do_populate_lic) failed with exit code ‘1’

My gut feeling is that the SRC_URI[mdtsum] and SRC_URI[sha256sum] and out of whack because I needed to switch from 2.4.54  to  2.4.52 of apache.  You supplied the SRC_URI[sha256sum] based on a 2.4.54 version of Apache?  and I filled in the SRC_URI[md5sum] based on what bitable told me it should be. If you can tell me how to get the correct SRC_URI[sha256sum] for apache 2.4.52 I think I can get past this error.

Thanks, Jim

> On Aug 29, 2022, at 4:06 PM, forums <forums@bitflipper.net<mailto:forums@bitflipper.net>> wrote:
>
> Peter, I think I know what caused the Error. I think apache 2.4.52 will be sufficient for our current needs.
>
> I have subsequently changed the PV to 2.4.52. But that LC_FILES_CHKSUM is still generating the same build error. How did you get the MD5 Checksum? If you can tell me which file you took it form that would be helpful and I can go and get that MD5 sum from Honiker tree — whatever file it was that I should get it from.
>
>
> Thanks, Jim
>
>
>> On Aug 29, 2022, at 3:34 PM, bitflipper <forums@bitflipper.net<mailto:forums@bitflipper.net>> wrote:
>>
>> Peter, I plugging in the  bbappend as is except for the md5sumthat was spit out by the yocto build. Here’s my bbappend file:
>>
>>       FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:”
>>
>>       LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3”
>>
>>       PV = <file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3”%0b%3e%3e%20%0b%3e%3e      %20PV%20=%20> “2.4.54"
>>
>>       SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
>>           file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
>>           file://0001-make_exports.awk-not-expose-the-path.patch”
>>       SRC_URI_remove = "file://apache-configure_perlbin.patch”
>>
>>       SRC_URI[md5sum] = <file://apache-configure_perlbin.patch”%0b%3e%3e%20%0b%3e%3e      %20SRC_URI[md5sum]%20=%20> "<861b43073ab416d689f1fc4dfa087711>”
>>       SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>>
>>
>> When I run bitable, I get the following error:
>>
>>
>>
>>       ERROR: smith-nephew-cp-lwb5-2.4.54-r0 do_populate_lic: QA Issue: smith-nephew-cp-lwb5: LIC_FILES_CHKSUM points to an invalid file: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.54-r0/smith-nephew-cp-lwb5-2.4.54/LICENSE [license-checksum]
>>       ERROR: smith-nephew-cp-lwb5-2.4.54-r0 do_populate_lic: Fatal QA errors found, failing task.
>>       ERROR: Logfile of failure stored in: /ct/yocto/imx-5.4.70/build/tmp/work/imx6ulevk-poky-linux-gnueabi/smith-nephew-cp-lwb5/2.4.54-r0/temp/log.do_populate_lic.1455644
>>       ERROR: Task (/ct/yocto/imx-5.4.70/sources/meta-laird-cp/recipes-packages/images/smith-nephew-cp-lwb5.bb:do_populate_lic) failed with exit code '1'
>>
>>
>> I’m suspecting its something to do with the LIC_FILES_CHKSUM ??
>>
>> Any input appreciated.
>>
>>
>>
>> Thanks, Jim
>>
>>
>>
>>
>>> On Aug 28, 2022, at 10:49 PM, bitflipper <forums@bitflipper.net<mailto:forums@bitflipper.net>> wrote:
>>>
>>>
>>>
>>> Hi Peter. In my mind this process is starting to come together as to why is happening. So I copied the bbappend file as is  and I did get the error your expected that I would about the md5sum:
>>>
>>>
>>> ERROR: apache2-2.4.54-r0 do_fetch: Checksum failure fetching https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2
>>> ERROR: apache2-2.4.54-r0 do_fetch: Fetcher failure for URL: 'https://archive.apache.org/dist/httpd/httpd-2.4.54.tar.bz2'. Checksum mismatch!
>>> File: '/ct/yocto/imx-5.4.70/downloads/httpd-2.4.54.tar.bz2' has md5 checksum 861b43073ab416d689f1fc4dfa087711 when <I don't have this at hand, but bitbake will tell you what it should be> was expected
>>> If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
>>> SRC_URI[md5sum] = "861b43073ab416d689f1fc4dfa087711"
>>> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>>> Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.
>>>
>>> But then I don’t understand what needs to be done with what you said here:
>>>
>>>>> You then also need to copy the three new patches and any other
>>>>> patches that differs between zeus and master and put them in your
>>>>> layer together with the bbappend file (in a subdirectory called
>>>>> "recipes-httpd/apache2/apache2”)
>>>
>>>
>>> My assumption here is that I need to copy the difference between the Zeus and Master recipe for apache2 and place them in a file here;
>>>
>>>      recipies-httpd/apache2/apache2
>>>
>>> The name of the file will be apache2 and it will contain the diffs between Zeus and Master for the apache2 recipes. And the diff are from the following file:
>>>
>>>      ./sources/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.41.bb
>>>
>>> Right?
>>>
>>>
>>> Thanks, Jim
>>>
>>>
>>>
>>>
>>>
>>>
>>>> On Aug 26, 2022, at 10:03 AM, Peter Kjellerstedt <peter.kjellerstedt@axis.com<mailto:peter.kjellerstedt@axis.com>> wrote:
>>>>
>>>> [ In the future, please make sure to reply to list and not just to me. ]
>>>> [ Top posting since Outlook doesn’t support inline responses to HTML mails. ]
>>>>
>>>> No, you are supposed to copy the suggest text for the bbappend verbatim, with the exception of the SRC_URI[md5sum] which need to be corrected to match the actual MD5 sum (which bitbake will tell you when you try to build). The suggested additions/deletions for SRC_URI in the bbappend I suggested should be correct as specified, based on the differences between the apache2 recipe in Zeus and master. You will also need to copy the three new patch files from master of meta-webserver, and any of the other patches that have been updated between Zeus and master. Changing PV takes care of the actual update of the code to the new version (since it determines which tar ball is fetched from upstream).
>>>>
>>>> //Peter
>>>>
>>>> From: forums <forums@bitflipper.net<mailto:forums@bitflipper.net>>
>>>> Sent: den 26 augusti 2022 14:21
>>>> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com<mailto:peter.kjellerstedt@axis.com>>
>>>> Subject: Re: [yocto] Bitbake + Patches
>>>>
>>>>
>>>> FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
>>>>
>>>> LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
>>>>
>>>> PV = "2.4.54"
>>>>
>>>> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch \
>>>>        file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
>>>>        file://0001-make_exports.awk-not-expose-the-path.patch"
>>>> SRC_URI_remove = "file://apache-configure_perlbin.patch"
>>>>
>>>> SRC_URI[md5sum] = "<I don't have this at hand, but bitbake will tell you what it should be>"
>>>> SRC_URI[sha256sum] = "eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340"
>>>>
>>>>
>>>> H Peter. I have t admin, looking at the above bbappend, its really confusing to me. I’ve looked at some of the documents on bitbake and I just can’t find anything to teach me how to put a bbappend together to accomplish upgrading an application.
>>>>
>>>> Like for example:
>>>>
>>>> SRC_URI += "file://0008-Fix-perl-install-directory-to-usr-bin.patch
>>>>
>>>> I believe this one should be:
>>>>
>>>>                         SRC_URI += file:/usr/bin/patch
>>>>
>>>> The next one:
>>>>
>>>> file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch
>>>>
>>>> I’ve no idea what this one will nee to be.
>>>>
>>>> And this one:
>>>>
>>>> file://0001-make_exports.awk-not-expose-the-path.patch
>>>>
>>>> I don’t know what is supposed to go here either.
>>>>
>>>>
>>>> Then the SRC_URI_remove will be a pointer to the file containing the patches containing the diff’e between apache 12.4.1 and apache 2.4.54 ? I don’t think you can create a single patch file containing diff’s between multiple versions can you? I think it would have to be diff’s between apache 2.4.41 and 2.4.42. Right. Totally confused as to what to do here.
>>>>
>>>> Any further help appreciated.
>>>>
>>>> If you know of a resource for me to reference please pass it on. I just don’t see any clear documentation that explains how to construct a bbappend file.
>>>>
>>>>
>>>> Thanks, Jim


[-- Attachment #2: Type: text/html, Size: 20022 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-09-06 18:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-22 20:54 Bitbake + Patches forums
2022-08-22 22:29 ` [yocto] " Khem Raj
2022-08-23 11:41   ` Peter Kjellerstedt
     [not found]     ` <B58205E1-72E9-41F6-9A52-A440A62C3C6B@bitflipper.net>
2022-08-24 14:13       ` Peter Kjellerstedt
     [not found]         ` <0C54FD2B-AEAB-4425-9CEB-FFCA85458A16@bitflipper.net>
2022-08-26 14:03           ` Peter Kjellerstedt
2022-08-29  2:49             ` forums
     [not found]             ` <170FB0FB9A5D94E8.11791@lists.yoctoproject.org>
2022-08-29 19:34               ` forums
     [not found]               ` <170FE7D455D5B425.21714@lists.yoctoproject.org>
2022-08-29 20:06                 ` forums
2022-08-29 22:06                   ` forums
2022-09-06 18:01                     ` Peter Kjellerstedt
2022-08-30 20:22             ` Randy MacLeod

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.