File PACKAGES.md of Package SL-Micro

# Package Investigation Guide for SL-Micro

This document provides various methods to investigate and understand the packages included in the `SL-Micro.kiwi` file.

## Package Sources in SL-Micro.kiwi

The KIWI configuration file defines packages in several sections:
- **`<packages type="image">`**: Core packages installed in all image variants
- **`<packages type="bootstrap">`**: Packages needed during the build process
- **Profile-specific packages**: Packages only installed for certain hardware profiles
- **`<namedCollection>`**: Package groups/patterns that bundle related packages

## Investigation Methods

### 1. Using OSC (OpenSUSE Build Service Command Line)

#### Basic Package Information
```bash
# Get package metadata
osc meta pkg <PROJECT> <PACKAGE>

# Example for kernel-firmware-all
osc meta pkg openSUSE:Factory kernel-firmware-all

# Get package spec file (shows dependencies and descriptions)
osc cat <PROJECT> <PACKAGE> <PACKAGE>.spec

# Example
osc cat openSUSE:Factory kernel-firmware-all kernel-firmware-all.spec
```

#### Search for Packages
```bash
# Search across all repositories
osc search <PACKAGE_NAME>

# Search in specific project
osc ls <PROJECT> | grep <PATTERN>

# Example
osc search NetworkManager
```

#### Package Dependencies
```bash
# View package dependencies (requires local installation)
osc cat <PROJECT> <PACKAGE> <PACKAGE>.spec | grep "Requires:"
```

### 2. Using zypper (On SUSE Systems)

#### Package Information
```bash
# Detailed package information
zypper info <PACKAGE_NAME>

# List package contents (files installed)
rpm -ql <PACKAGE_NAME>

# Show package dependencies
zypper info --requires <PACKAGE_NAME>

# Search for packages
zypper search <PATTERN>
```

#### Pattern/Collection Information
```bash
# List packages in a pattern
zypper info pattern:<PATTERN_NAME>

# Example
zypper info pattern:base-transactional
```

### 3. Web-Based Resources

#### Official SUSE/openSUSE Package Search
- **Main portal**: https://software.opensuse.org/
- **Direct search**: https://software.opensuse.org/package/<PACKAGE_NAME>
- **Example**: https://software.opensuse.org/package/kernel-firmware-all

#### Repository Browsers
- **openSUSE Factory**: https://build.opensuse.org/project/show/openSUSE:Factory
- **SUSE Package Hub**: https://packagehub.suse.com/
- **SLE repositories**: https://scc.suse.com/ (requires SUSE account)

#### Source Code Repositories
- **Kernel firmware**: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/
- **SUSE packages**: https://github.com/openSUSE/
- **Package sources**: https://build.opensuse.org/

### 4. Understanding Package Types in SL-Micro.kiwi

#### Core System Packages (Lines ~338-357)
Essential packages for all SL-Micro variants:
```xml
<packages type="image">
    <namedCollection name="base_transactional"/>
    <package name="grub2"/>
    <package name="NetworkManager"/>
    <!-- etc. -->
</packages>
```

#### Kernel Packages (Lines ~370-377)
Kernel and firmware packages by profile:
```xml
<packages type="image" profiles="x86,x86-encrypted,...">
    <package name="kernel-default"/>
    <package name="kernel-firmware-all"/>
</packages>
```

#### Hardware-Specific Packages
Architecture or platform-specific packages:
```xml
<packages type="image" profiles="rpi,aarch64-self_install">
    <package name="raspberrypi-firmware" arch="aarch64"/>
</packages>
```

## Specific Package Categories in SL-Micro

### System Foundations
- **`SL-Micro-release`**: Distribution identification and branding
- **`systemd-default-settings-branding-SLE-Micro`**: Systemd configuration
- **`ca-certificates`**: SSL/TLS certificate authorities
- **`glibc-locale-base`**: Basic locale support

### Boot and Kernel
- **`grub2`**: GRUB2 bootloader
- **`kernel-default`** / **`kernel-rt`**: Standard or real-time kernels
- **`kernel-firmware-all`**: Hardware firmware collection (see details below)
- **`dracut-kiwi-oem-*`**: Initial RAM disk generation

### Network and Security
- **`NetworkManager`**: Network connection management
- **`firewalld`**: Dynamic firewall management
- **`patterns-base-transactional`**: Transactional update support

### Hardware Support
- **`patterns-base-hardware`**: Hardware detection and drivers
- **`raspberrypi-firmware`**: Raspberry Pi specific firmware
- **Various `kernel-firmware-*`**: Device-specific firmware packages

## Named Collections (Patterns) Details

### `base_transactional`
Core packages for transactional update system:
- Btrfs utilities for snapshots
- Transactional-update tools
- Read-only root filesystem support

### `hardware`
Hardware support collection:
- Device drivers
- Hardware detection tools
- Platform-specific utilities

### `micro_defaults`
SL-Micro specific defaults:
- Configuration files
- Service presets
- Default settings

## Firmware Package Breakdown

The `kernel-firmware-all` metapackage includes 30+ firmware subpackages:

### Graphics Firmware
- `kernel-firmware-amdgpu`: AMD GPU firmware
- `kernel-firmware-i915`: Intel integrated graphics
- `kernel-firmware-radeon`: AMD Radeon graphics

### Network Firmware
- `kernel-firmware-iwlwifi`: Intel wireless
- `kernel-firmware-ath*`: Qualcomm Atheros wireless
- `kernel-firmware-brcm`: Broadcom wireless
- `kernel-firmware-realtek`: Realtek devices

### Enterprise Network
- `kernel-firmware-mellanox`: Mellanox networking
- `kernel-firmware-qlogic`: QLogic adapters
- `kernel-firmware-chelsio`: Chelsio network adapters

## Investigation Examples

### Example 1: Understanding NetworkManager
```bash
# Get package info
osc meta pkg openSUSE:Factory NetworkManager

# Check dependencies
osc cat openSUSE:Factory NetworkManager NetworkManager.spec | grep "Requires:"

# Web search
# Visit: https://software.opensuse.org/package/NetworkManager
```

### Example 2: Investigating a Pattern
```bash
# Find pattern definition
osc search patterns-base-transactional

# Get pattern contents
zypper info pattern:base-transactional  # (on SUSE system)
```

### Example 3: Hardware-Specific Package
```bash
# Raspberry Pi firmware details
osc meta pkg openSUSE:Factory raspberrypi-firmware
osc cat openSUSE:Factory raspberrypi-firmware raspberrypi-firmware.spec
```

## Best Practices

1. **Start with OSC**: Use `osc meta pkg` and `osc cat` for initial investigation
2. **Check web resources**: Use software.opensuse.org for comprehensive package info
3. **Read spec files**: Package .spec files contain the most detailed information
4. **Understand patterns**: Named collections are often more important than individual packages
5. **Consider profiles**: Package inclusion depends on the image profile being built

## Troubleshooting Package Issues

### Package Not Found
1. Check spelling and exact package name
2. Verify the package exists in the target repository
3. Check if it's architecture-specific (`arch="x86_64"`)

### Understanding Dependencies
1. Look at `Requires:` lines in spec files
2. Check for `Provides:` and `Obsoletes:` relationships
3. Consider build-time vs. runtime dependencies

### Profile-Specific Behavior
1. Check which profiles include the package
2. Understand profile inheritance and combinations
3. Verify architecture compatibility

## Additional Resources

- **KIWI Documentation**: https://osinside.github.io/kiwi/
- **openSUSE Build Service**: https://build.opensuse.org/
- **SUSE Documentation**: https://documentation.suse.com/
- **Package maintenance**: https://en.opensuse.org/openSUSE:Package_maintenance
openSUSE Build Service is sponsored by