Skip to content

Commit cba8339

Browse files
committed
refactor: rename os-image-composer to ict across entire codebase
- Update Go module path from os-image-composer to ict - Rename cmd/os-image-composer/ to cmd/ict/ - Update CLI binary name, help text, and completion scripts - Update config search paths (ict.yml, /etc/ict/, etc.) - Update system paths (/var/cache/ict, /tmp/ict) - Rename schema file to ict-config.schema.json - Update Earthfile build targets and paths - Update all documentation (.md) references - Update GitHub Actions workflows and CODEOWNERS - Update shell scripts and image template comments - Rename architecture doc files to ict-* prefix No logic or behavior changes - only names and string literals.
1 parent e65cc10 commit cba8339

214 files changed

Lines changed: 1147 additions & 1147 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
# someone opens a pull request.
88

99
# Everything requires image-composer-maintain team review by default
10-
* @open-edge-platform/os-image-composer-maintain
10+
* @open-edge-platform/ict-maintain
1111

1212
# CI files
13-
.github/ @adimoft @daveroge @shanedonohue @manilk1x @open-edge-platform/os-image-composer-maintain
13+
.github/ @adimoft @daveroge @shanedonohue @manilk1x @open-edge-platform/ict-maintain
1414

1515
# documentation content
1616
/docs @open-edge-platform/open-edge-platform-docs-write

.github/copilot-instructions.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Copilot Instructions for os-image-composer
1+
# Copilot Instructions for ict
22

33
## Architecture Overview
44

5-
OS Image Composer builds custom Linux images from pre-built packages. Key components:
5+
ICT builds custom Linux images from pre-built packages. Key components:
66

77
- **Provider** (`internal/provider/`) - Orchestrates builds per OS (azl, elxr, emt, rcd, ubuntu). Implements `Provider` interface with `Name`, `Init`, `PreProcess`, `BuildImage`, `PostProcess` methods. Each provider exports an `OsName` constant and a `Register()` function
88
- **Image makers** (`internal/image/`) - Creates output formats: `rawmaker/`, `isomaker/`, `initrdmaker/`
@@ -31,7 +31,7 @@ Coverage threshold is enforced in CI and auto-ratcheted — see `.coverage-thres
3131

3232
1. Create package in `internal/provider/{osname}/`
3333
2. Implement `provider.Provider` interface (see `internal/provider/provider.go`)
34-
3. Register in `cmd/os-image-composer/build.go` switch statement
34+
3. Register in `cmd/ict/build.go` switch statement
3535
4. Add default configs in `config/osv/{osname}/`
3636
5. Create example templates in `image-templates/`
3737

@@ -47,19 +47,19 @@ for _, tt := range tests {
4747
```
4848
- Follow the **AAA pattern**: Arrange (setup), Act (execute), Assert (verify)
4949
- Test file naming: `*_test.go` in same package
50-
- Reset shared state in tests (see `resetBuildFlags()` pattern in `cmd/os-image-composer/build_test.go`)
50+
- Reset shared state in tests (see `resetBuildFlags()` pattern in `cmd/ict/build_test.go`)
5151

5252
## Error Handling
5353

5454
- **Always wrap** with context: `fmt.Errorf("failed to X: %w", err)`
55-
- Use named returns with defer for cleanup (see `docs/architecture/os-image-composer-coding-style.md`)
55+
- Use named returns with defer for cleanup (see `docs/architecture/ict-coding-style.md`)
5656
- Never ignore errors with `_`
5757

5858
## Logging
5959

6060
- Use the project logger, **not** `fmt.Println` or `log` stdlib:
6161
```go
62-
import "github.com/open-edge-platform/os-image-composer/internal/utils/logger"
62+
import "github.com/open-edge-platform/ict/internal/utils/logger"
6363

6464
var log = logger.Logger()
6565
```
@@ -78,17 +78,17 @@ var log = logger.Logger()
7878
- **Imports**: stdlib → third-party → local (blank line separated)
7979
- **Struct-based design over globals** — prefer dependency injection
8080
- **Interface naming**: should end with `-er` when possible (e.g., `PackageInstaller`, `ConfigReader`)
81-
- **Named returns + defer for cleanup** — the standard cleanup pattern (not "goto fail"); see [coding style Section 4.3](../docs/architecture/os-image-composer-coding-style.md)
81+
- **Named returns + defer for cleanup** — the standard cleanup pattern (not "goto fail"); see [coding style Section 4.3](../docs/architecture/ict-coding-style.md)
8282
- **Linters** (`earthly +lint`): `govet`, `gofmt`, `errcheck`, `staticcheck`, `unused`, `gosimple` — all errors must be handled (`errcheck` is enforced)
8383
- Shell scripts: `set -euo pipefail`
84-
- See `docs/architecture/os-image-composer-coding-style.md` for the full guide
84+
- See `docs/architecture/ict-coding-style.md` for the full guide
8585

8686
## Security
8787

8888
- **HTTP clients**: Always use `network.NewSecureHTTPClient()` or the singleton `network.GetSecureHTTPClient()` from `internal/utils/network/` — enforces TLS 1.2+ with approved cipher suites. Never use `http.DefaultClient`
8989
- **Command execution**: Use the `internal/utils/shell/` package which maintains an allowlist of approved system commands. Never use raw `exec.Command()`
9090
- **Input validation**: Sanitize user-provided filenames and paths; use `filepath.Clean()` on paths
91-
- **Template validation**: Templates are validated against JSON schema (`os-image-template.schema.json`) via `os-image-composer validate`
91+
- **Template validation**: Templates are validated against JSON schema (`os-image-template.schema.json`) via `ict validate`
9292
- **File permissions**: `0700` for chroot dirs, `0755` for general dirs, `0644` for data files, `0640` for log files
9393
- CI runs **Trivy** (dependency vulnerability scanning — fails on HIGH/CRITICAL), **Gitleaks** (secret detection), and **Zizmor** (GitHub Actions security auditing)
9494

@@ -100,16 +100,16 @@ Before opening a PR, check whether your changes affect any of these and update a
100100

101101
| What changed | Docs to update |
102102
|---|---|
103-
| CLI flags or commands | `docs/architecture/os-image-composer-cli-specification.md`, `docs/tutorial/usage-guide.md` |
103+
| CLI flags or commands | `docs/architecture/ict-cli-specification.md`, `docs/tutorial/usage-guide.md` |
104104
| Build process or Earthfile targets | `docs/tutorial/usage-guide.md`, this file's **Build and Test** section |
105-
| Image template schema or fields | `docs/architecture/os-image-composer-templates.md`, relevant `image-templates/*.yml` examples |
105+
| Image template schema or fields | `docs/architecture/ict-templates.md`, relevant `image-templates/*.yml` examples |
106106
| New OS provider | `docs/architecture/architecture.md`, this file's **Adding a New OS Provider** section |
107107
| New tutorial-worthy feature | Add or update a guide in `docs/tutorial/` |
108108
| Architecture or design decisions | Add an ADR in `docs/architecture/` |
109109
| Security-related changes | `docs/architecture/image-composition-tool-security-objectives.md` |
110-
| Caching behavior | `docs/architecture/os-image-composer-caching.md` |
111-
| Coding conventions | `docs/architecture/os-image-composer-coding-style.md` |
112-
| Dependencies or multi-repo setup | `docs/architecture/os-image-composer-multi-repo-support.md` |
110+
| Caching behavior | `docs/architecture/ict-caching.md` |
111+
| Coding conventions | `docs/architecture/ict-coding-style.md` |
112+
| Dependencies or multi-repo setup | `docs/architecture/ict-multi-repo-support.md` |
113113
| User-facing features or fixes | `docs/release-notes.md` |
114114

115115
## Git Commits & PRs
@@ -139,7 +139,7 @@ All PRs must pass these checks before merging:
139139
- **Minimal user templates**: only `image` + `target` sections required; OS defaults handle the rest
140140
- **Always include a `metadata` block** with `description`, `use_cases`, and `keywords` for discoverability
141141
- **Merge behavior**: packages are _additive_ (merged by name); `disk` configuration _replaces_ entirely
142-
- **Validate** before committing: `os-image-composer validate -t <template.yml>`
142+
- **Validate** before committing: `ict validate -t <template.yml>`
143143

144144
## Key Files
145145

.github/workflows/gitleak-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
with:
2020
scan-scope: "all"
2121
source: "./"
22-
config_path: "./ci/gitleaks_baselines/os-image-composer-gitleaks.sarif"
22+
config_path: "./ci/gitleaks_baselines/ict-gitleaks.sarif"
2323
report_format: "sarif"
2424
redact: "true"

Earthfile

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ build:
106106
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux \
107107
go build -trimpath -buildmode=pie -o build/live-installer \
108108
-ldflags "-s -w \
109-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Version=$VERSION' \
110-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Toolname=Image-Composer' \
111-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Organization=Open Edge Platform' \
112-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.BuildDate=$BUILD_DATE' \
113-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.CommitSHA=$COMMIT_SHA'" \
109+
-X 'github.com/open-edge-platform/ict/internal/config/version.Version=$VERSION' \
110+
-X 'github.com/open-edge-platform/ict/internal/config/version.Toolname=Image-Composer' \
111+
-X 'github.com/open-edge-platform/ict/internal/config/version.Organization=Open Edge Platform' \
112+
-X 'github.com/open-edge-platform/ict/internal/config/version.BuildDate=$BUILD_DATE' \
113+
-X 'github.com/open-edge-platform/ict/internal/config/version.CommitSHA=$COMMIT_SHA'" \
114114
./cmd/live-installer
115115

116116
SAVE ARTIFACT build/live-installer AS LOCAL ./build/live-installer
@@ -120,17 +120,17 @@ build:
120120
COMMIT_SHA=$(cat /tmp/commit_sha) && \
121121
BUILD_DATE=$(cat /tmp/build_date) && \
122122
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux \
123-
go build -trimpath -buildmode=pie -o build/os-image-composer \
123+
go build -trimpath -buildmode=pie -o build/ict \
124124
-ldflags "-s -w \
125-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Version=$VERSION' \
126-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Toolname=Image-Composer' \
127-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Organization=Open Edge Platform' \
128-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.BuildDate=$BUILD_DATE' \
129-
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.CommitSHA=$COMMIT_SHA'" \
130-
./cmd/os-image-composer
125+
-X 'github.com/open-edge-platform/ict/internal/config/version.Version=$VERSION' \
126+
-X 'github.com/open-edge-platform/ict/internal/config/version.Toolname=Image-Composer' \
127+
-X 'github.com/open-edge-platform/ict/internal/config/version.Organization=Open Edge Platform' \
128+
-X 'github.com/open-edge-platform/ict/internal/config/version.BuildDate=$BUILD_DATE' \
129+
-X 'github.com/open-edge-platform/ict/internal/config/version.CommitSHA=$COMMIT_SHA'" \
130+
./cmd/ict
131131

132-
SAVE ARTIFACT build/os-image-composer AS LOCAL ./build/os-image-composer
133-
SAVE ARTIFACT /tmp/version.txt AS LOCAL ./build/os-image-composer.version
132+
SAVE ARTIFACT build/ict AS LOCAL ./build/ict
133+
SAVE ARTIFACT /tmp/version.txt AS LOCAL ./build/ict.version
134134

135135
lint:
136136
FROM +golang-base
@@ -212,59 +212,59 @@ deb:
212212

213213
# Create directory structure following FHS (Filesystem Hierarchy Standard)
214214
RUN mkdir -p usr/local/bin \
215-
etc/os-image-composer/config \
216-
usr/share/os-image-composer/examples \
217-
usr/share/doc/os-image-composer \
218-
var/cache/os-image-composer \
215+
etc/ict/config \
216+
usr/share/ict/examples \
217+
usr/share/doc/ict \
218+
var/cache/ict \
219219
DEBIAN
220220

221221
# Copy the built binary from the build target
222-
COPY +build/os-image-composer usr/local/bin/os-image-composer
222+
COPY +build/ict usr/local/bin/ict
223223

224224
# Make the binary executable
225-
RUN chmod +x usr/local/bin/os-image-composer
225+
RUN chmod +x usr/local/bin/ict
226226

227227
# Create default global configuration with system paths (user-editable)
228228
# Note: Must be named config.yml to match the default search paths in the code
229-
RUN echo "# OS Image Composer - Global Configuration" > etc/os-image-composer/config.yml && \
230-
echo "# This file contains tool-level settings that apply across all image builds." >> etc/os-image-composer/config.yml && \
231-
echo "# Image-specific parameters should be defined in the image specification." >> etc/os-image-composer/config.yml && \
232-
echo "" >> etc/os-image-composer/config.yml && \
233-
echo "# Core tool settings" >> etc/os-image-composer/config.yml && \
234-
echo "workers: 8" >> etc/os-image-composer/config.yml && \
235-
echo "# Number of concurrent download workers (1-100, default: 8)" >> etc/os-image-composer/config.yml && \
236-
echo "" >> etc/os-image-composer/config.yml && \
237-
echo "config_dir: \"/etc/os-image-composer/config\"" >> etc/os-image-composer/config.yml && \
238-
echo "# Directory containing configuration files for different target OSs" >> etc/os-image-composer/config.yml && \
239-
echo "" >> etc/os-image-composer/config.yml && \
240-
echo "cache_dir: \"/var/cache/os-image-composer\"" >> etc/os-image-composer/config.yml && \
241-
echo "# Package cache directory where downloaded RPMs/DEBs are stored" >> etc/os-image-composer/config.yml && \
242-
echo "" >> etc/os-image-composer/config.yml && \
243-
echo "work_dir: \"/tmp/os-image-composer\"" >> etc/os-image-composer/config.yml && \
244-
echo "# Working directory for build operations and image assembly" >> etc/os-image-composer/config.yml && \
245-
echo "" >> etc/os-image-composer/config.yml && \
246-
echo "temp_dir: \"/tmp\"" >> etc/os-image-composer/config.yml && \
247-
echo "# Temporary directory for short-lived files" >> etc/os-image-composer/config.yml && \
248-
echo "" >> etc/os-image-composer/config.yml && \
249-
echo "# Logging configuration" >> etc/os-image-composer/config.yml && \
250-
echo "logging:" >> etc/os-image-composer/config.yml && \
251-
echo " level: \"info\"" >> etc/os-image-composer/config.yml && \
252-
echo " # Log verbosity level: debug, info, warn, error" >> etc/os-image-composer/config.yml
229+
RUN echo "# ICT - Global Configuration" > etc/ict/config.yml && \
230+
echo "# This file contains tool-level settings that apply across all image builds." >> etc/ict/config.yml && \
231+
echo "# Image-specific parameters should be defined in the image specification." >> etc/ict/config.yml && \
232+
echo "" >> etc/ict/config.yml && \
233+
echo "# Core tool settings" >> etc/ict/config.yml && \
234+
echo "workers: 8" >> etc/ict/config.yml && \
235+
echo "# Number of concurrent download workers (1-100, default: 8)" >> etc/ict/config.yml && \
236+
echo "" >> etc/ict/config.yml && \
237+
echo "config_dir: \"/etc/ict/config\"" >> etc/ict/config.yml && \
238+
echo "# Directory containing configuration files for different target OSs" >> etc/ict/config.yml && \
239+
echo "" >> etc/ict/config.yml && \
240+
echo "cache_dir: \"/var/cache/ict\"" >> etc/ict/config.yml && \
241+
echo "# Package cache directory where downloaded RPMs/DEBs are stored" >> etc/ict/config.yml && \
242+
echo "" >> etc/ict/config.yml && \
243+
echo "work_dir: \"/tmp/ict\"" >> etc/ict/config.yml && \
244+
echo "# Working directory for build operations and image assembly" >> etc/ict/config.yml && \
245+
echo "" >> etc/ict/config.yml && \
246+
echo "temp_dir: \"/tmp\"" >> etc/ict/config.yml && \
247+
echo "# Temporary directory for short-lived files" >> etc/ict/config.yml && \
248+
echo "" >> etc/ict/config.yml && \
249+
echo "# Logging configuration" >> etc/ict/config.yml && \
250+
echo "logging:" >> etc/ict/config.yml && \
251+
echo " level: \"info\"" >> etc/ict/config.yml && \
252+
echo " # Log verbosity level: debug, info, warn, error" >> etc/ict/config.yml
253253

254254
# Copy OS variant configuration files (user-editable)
255-
COPY config etc/os-image-composer/config
255+
COPY config etc/ict/config
256256

257257
# Copy image templates as examples (read-only, for reference)
258-
COPY image-templates usr/share/os-image-composer/examples
258+
COPY image-templates usr/share/ict/examples
259259

260260
# Copy documentation
261-
COPY README.md usr/share/doc/os-image-composer/
262-
COPY LICENSE usr/share/doc/os-image-composer/
263-
COPY docs/architecture/os-image-composer-cli-specification.md usr/share/doc/os-image-composer/
261+
COPY README.md usr/share/doc/ict/
262+
COPY LICENSE usr/share/doc/ict/
263+
COPY docs/architecture/ict-cli-specification.md usr/share/doc/ict/
264264

265265
# Create the DEBIAN control file with proper metadata
266266
RUN VERSION=$(cat /tmp/pkg_version) && \
267-
echo "Package: os-image-composer" > DEBIAN/control && \
267+
echo "Package: ict" > DEBIAN/control && \
268268
echo "Version: ${VERSION}" >> DEBIAN/control && \
269269
echo "Section: utils" >> DEBIAN/control && \
270270
echo "Priority: optional" >> DEBIAN/control && \
@@ -273,17 +273,17 @@ deb:
273273
echo "Depends: bash, coreutils, unzip, dosfstools, xorriso, grub-common" >> DEBIAN/control && \
274274
echo "Recommends: mmdebstrap, debootstrap" >> DEBIAN/control && \
275275
echo "License: MIT" >> DEBIAN/control && \
276-
echo "Description: OS Image Composer (OIC)" >> DEBIAN/control && \
276+
echo "Description: ICT (OIC)" >> DEBIAN/control && \
277277
echo " OIC enables users to compose custom bootable OS images based on a" >> DEBIAN/control && \
278278
echo " user-provided template that specifies package lists, configurations," >> DEBIAN/control && \
279279
echo " and output formats for supported distributions." >> DEBIAN/control
280280

281281
# Build the debian package and stage in a stable location
282282
RUN VERSION=$(cat /tmp/pkg_version) && \
283283
mkdir -p /tmp/dist && \
284-
dpkg-deb --build . /tmp/dist/os-image-composer_${VERSION}_${ARCH}.deb
284+
dpkg-deb --build . /tmp/dist/ict_${VERSION}_${ARCH}.deb
285285

286286
# Save the debian package artifact and resolved version information to dist/
287-
RUN VERSION=$(cat /tmp/pkg_version) && cp /tmp/pkg_version /tmp/dist/os-image-composer.version
288-
SAVE ARTIFACT /tmp/dist/os-image-composer_*_${ARCH}.deb AS LOCAL dist/
289-
SAVE ARTIFACT /tmp/dist/os-image-composer.version AS LOCAL dist/os-image-composer.version
287+
RUN VERSION=$(cat /tmp/pkg_version) && cp /tmp/pkg_version /tmp/dist/ict.version
288+
SAVE ARTIFACT /tmp/dist/ict_*_${ARCH}.deb AS LOCAL dist/
289+
SAVE ARTIFACT /tmp/dist/ict.version AS LOCAL dist/ict.version

0 commit comments

Comments
 (0)