LEEUNITYAssets / Content / 博客.asset
层级
⌄ Lee / Homepage
INSPECTOR
Type
Content
Name
博客
lee@mtftm.com ↗GitHub ↗
N017SYSTEM / LINUX

技术 / English

Packaging and Package Repair Guide

Confirm Package Architecture

更新
2026.07.18
阅读
1 分钟
语言
English

Configure OBS

Omitted

Pull

osc co home:Lee/xxx && cd $_
osc up -S

rm -f _service;for file in `ls`;do new_file=${file##*:};mv $file $new_file;done

Build

osc build --no-verify --clean amd64 x86_64
osc build --no-verify --clean riscv64 riscv64

View Package Contents

rpm -qpl /var/tmp/build-root/..../.rpm

Confirm Package Architecture

rpm -qp --queryformat '%{ARCH}\n' libraw-0.22.0-1.or.riscv64.rpm

Test Run Inside Podman Container

podman run --rm -it -v /your/RPM/path/:/mnt:z system:amd64 /bin/bash
podman run --rm -it -v /your/RPM/path/:/mnt:z system:riscv64 /bin/bash

ls -F /mnt
dnf install /mnt/*.rpm

How to Import a Raw Image into Podman

# Associate image with Loop device
sudo losetup -Pf --show system-virt_riscv64.raw

# Create temporary mount point
mkdir -p ./tmp_root
# Mount the second partition (root partition)
sudo mount /dev/loop0p2 ./tmp_root
# Clean up old image
podman rmi system:riscv64
# Extract files and import
# Add --numeric-owner to ensure permission IDs remain in original state
sudo tar -C ./tmp_root --numeric-owner -cf - . | podman import - system:riscv64

# Clean up mount
sudo umount ./tmp_root
sudo losetup -d /dev/loop0
rmdir ./tmp_root

# Start test
podman run -it --rm system:riscv64 /bin/sh