> For the complete documentation index, see [llms.txt](https://docs.medcrypt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.medcrypt.com/ko/helm/get-started-with-helm/dont-have-an-sbom/generate-spdx-sbom-with-open-source-tools/generate-sbom-with-yocto-on-linux.md).

# Linux에서 Yocto로 SBOM 생성

## Linux에서 Yocto를 사용해 .zst 파일 생성

{% hint style="info" %}
타사 정보의 정확성을 유지하기 위해 노력하고 있지만, [Yocto의 SBOM 문서](https://docs.yoctoproject.org/dev/dev-manual/sbom.html) 를 확인하여 마지막으로 확인한 이후 변경된 내용이 없는지 살펴보세요.
{% endhint %}

1. **상속 `create-spdx` 클래스**: Yocto 구성 파일에 다음 줄을 추가하여 해당 `create-spdx` 클래스를 상속하도록 하세요.

   ```makefile
   INHERIT += "create-spdx"
   ```
2. **이미지 빌드**: 표준 Yocto 빌드 프로세스를 사용해 이미지를 빌드하세요.
3. **SBOM 파일 찾기**: 빌드가 끝나면 세 가지 출력 파일이 생성됩니다. 여기서는 안내를 위해 모두 소개하지만, **세 번째 파일(굵게 표시된 파일)만 사용해야 합니다**. 이 항목은 Yocto 문서에서 그대로 가져왔습니다.

* 다음과 같은 JSON 형식의 SPDX 출력 파일 `IMAGE-MACHINE.spdx.json` 은 `tmp/deploy/images/MACHINE` 빌드 디렉터리에 있습니다.
* 이 최상위 파일에는 개별 레시피의 SPDX 파일 색인이 포함된 `IMAGE-MACHINE.spdx.index.json` 도 있습니다.
* **압축 아카이브 `IMAGE-MACHINE.spdx.tar.zst`에는 단일 레시피의 색인과 파일이 포함되어 있습니다.**

## **.zst 파일을 zip 형식(.tar.gz 또는 .zip)으로 변환**

1. .zst 파일이 있는 디렉터리로 이동합니다.
2. 개별 SBOM 파일이 들어 있는 파일의 압축을 풀려면 다음 명령을 실행하세요. 실제 파일 이름으로 `filename` 을 바꾸세요(Yocto 문서의 위 항목에서 해당 파일은 `IMAGE-MACHINE`).

`tar --zstd -xvf filename.zst`

2. zip 파일의 이름으로 사용할 이름을 지정해 디렉터리를 만듭니다.
3. 해당 디렉터리로 이동한 다음, 그 안에 `packages`하위 디렉터리를 만듭니다.
4. 개별 SBOM 파일을 이 디렉터리에 복사합니다.
5. 상위 디렉터리를 zip으로 압축하려면 다음 명령을 실행하세요. 이 예시에서는 파일 이름으로 `zst_sbom` 을 사용했습니다.

**.tar.gz 만들기**

{% code overflow="wrap" %}

```makefile
COPYFILE_DISABLE=1 tar -zcvf zst_sbom.tar.gz zst_sbom -x 
```

{% endcode %}

**.zip 만들기**

{% code overflow="wrap" %}

```
zip -r zst_sbom.zip zst_sbom -x '**/.*'
```

{% endcode %}

생성할 때 `.zip` Mac용으로는 다음을 추가합니다: `-x '**/__MACOSX'` 명령 뒤에 추가합니다. 이 방법은 다음을 생성할 때는 작동하지 않습니다. `.tar.gz`.

6. &#x20;파일을 생성할 때는 작동하지 않습니다. 파일을  `.tar.gz`  또는  `.zip` 형식으로 변환한 후에는  [SBOM을 업로드](/ko/helm/get-started-with-helm/upload-your-first-sbom.md) 하여 Helm에 추가할 수 있습니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.medcrypt.com/ko/helm/get-started-with-helm/dont-have-an-sbom/generate-spdx-sbom-with-open-source-tools/generate-sbom-with-yocto-on-linux.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
