[v7,14/14] doc/user_manual.md: Document details about deb-src caching

Message ID 20201125080653.16303-1-Vijaikumar_Kanagarajan@mentor.com
State Superseded, archived
Headers show
Series Deb-src caching | expand

Commit Message

Vijai Kumar K Nov. 24, 2020, 10:06 p.m. UTC
Add details about deb-src caching.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
 doc/user_manual.md | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

Jan Kiszka Nov. 25, 2020, 1:35 a.m. UTC | #1
On 25.11.20 09:06, Vijai Kumar K wrote:
> Add details about deb-src caching.
> 
> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> ---
>  doc/user_manual.md | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/doc/user_manual.md b/doc/user_manual.md
> index 8d04cd2..c0f842a 100644
> --- a/doc/user_manual.md
> +++ b/doc/user_manual.md
> @@ -918,3 +918,28 @@ And build the corresponding image target:
>  ```
>  bitbake mc:qemuarm64-buster:isar-image-base
>  ```
> +## Cache all upstream Debian source packages in local apt
> +
> +### Motivation
> +
> +For OSS license clearance, we might need to have the sources of all Debian packages we
> +ship with the particular image.

OSS license *compliance*: Some licenses require to provide the
corresponding sources code, other require copyright attributions that
may be best provided via the source code. In addition, you may want to
archive the code locally in order to ensure reproducibility (and
modifiability) in the future.

> +
> +Currently the local-apt generated has only Debian binary packages. Extend the local-apt
> +to have Debian source packages as well, for OSS clearing purposes.
> +
> +### Solution
> +
> + - Trigger download of Debian source packages as part of rootfs postprocess.
> +
> +With the current base-apt implementation, we already cache all the binary packages and
> +generate a local-apt for offline build.
> +
> +Use rootfs postprocessing to parse through the the list fo deb files in ${DEDDIR} and
> +download the corresponding Debian source file using "apt-get source" command.
> +
> +By default, the Debian source caching is not enabled. If you want to cache the Debian
> +sources as well, as part of your image build, add the below line to your local.conf file.
> +```
> +BASE_REPO_FEATURES = "cache-deb-src"
> +```
> 

So this will fetch and and store ALL sources corresponding to the binary
packages that the target image installs? Or rather that any rootfs
installs, thus also buildchroots and sdkrootfs? Please make this clearer.

Jan
vijai kumar Nov. 25, 2020, 3:14 a.m. UTC | #2
On Wednesday, November 25, 2020 at 5:05:45 PM UTC+5:30 Jan Kiszka wrote:

> On 25.11.20 09:06, Vijai Kumar K wrote: 
> > Add details about deb-src caching. 
> > 
> > Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com> 
> > --- 
> > doc/user_manual.md | 25 +++++++++++++++++++++++++ 
> > 1 file changed, 25 insertions(+) 
> > 
> > diff --git a/doc/user_manual.md b/doc/user_manual.md 
> > index 8d04cd2..c0f842a 100644 
> > --- a/doc/user_manual.md 
> > +++ b/doc/user_manual.md 
> > @@ -918,3 +918,28 @@ And build the corresponding image target: 
> > ``` 
> > bitbake mc:qemuarm64-buster:isar-image-base 
> > ``` 
> > +## Cache all upstream Debian source packages in local apt 
> > + 
> > +### Motivation 
> > + 
> > +For OSS license clearance, we might need to have the sources of all 
> Debian packages we 
> > +ship with the particular image. 
>
> OSS license *compliance*: Some licenses require to provide the 
> corresponding sources code, other require copyright attributions that 
> may be best provided via the source code. In addition, you may want to 
> archive the code locally in order to ensure reproducibility (and 
> modifiability) in the future. 
>

Will include this line.
 

>
> > + 
> > +Currently the local-apt generated has only Debian binary packages. 
> Extend the local-apt 
> > +to have Debian source packages as well, for OSS clearing purposes. 
> > + 
> > +### Solution 
> > + 
> > + - Trigger download of Debian source packages as part of rootfs 
> postprocess. 
> > + 
> > +With the current base-apt implementation, we already cache all the 
> binary packages and 
> > +generate a local-apt for offline build. 
> > + 
> > +Use rootfs postprocessing to parse through the the list fo deb files in 
> ${DEDDIR} and 
> > +download the corresponding Debian source file using "apt-get source" 
> command. 
> > + 
> > +By default, the Debian source caching is not enabled. If you want to 
> cache the Debian 
> > +sources as well, as part of your image build, add the below line to 
> your local.conf file. 
> > +``` 
> > +BASE_REPO_FEATURES = "cache-deb-src" 
> > +``` 
> > 
>
> So this will fetch and and store ALL sources corresponding to the binary 
> packages that the target image installs? Or rather that any rootfs 
> installs, thus also buildchroots and sdkrootfs? Please make this clearer. 
>

Yes. Exactly. I will update the document.

Thanks,
Vijai Kumar K
 

>
> Jan 
>
> -- 
> Siemens AG, T RDA IOT 
> Corporate Competence Center Embedded Linux 
>

Patch

diff --git a/doc/user_manual.md b/doc/user_manual.md
index 8d04cd2..c0f842a 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -918,3 +918,28 @@  And build the corresponding image target:
 ```
 bitbake mc:qemuarm64-buster:isar-image-base
 ```
+## Cache all upstream Debian source packages in local apt
+
+### Motivation
+
+For OSS license clearance, we might need to have the sources of all Debian packages we
+ship with the particular image.
+
+Currently the local-apt generated has only Debian binary packages. Extend the local-apt
+to have Debian source packages as well, for OSS clearing purposes.
+
+### Solution
+
+ - Trigger download of Debian source packages as part of rootfs postprocess.
+
+With the current base-apt implementation, we already cache all the binary packages and
+generate a local-apt for offline build.
+
+Use rootfs postprocessing to parse through the the list fo deb files in ${DEDDIR} and
+download the corresponding Debian source file using "apt-get source" command.
+
+By default, the Debian source caching is not enabled. If you want to cache the Debian
+sources as well, as part of your image build, add the below line to your local.conf file.
+```
+BASE_REPO_FEATURES = "cache-deb-src"
+```