명령어/Linux
[RHEL] modifyrepo_c repomd.xml에 메타데이터 추가
jykim23
2026. 8. 5. 23:41
반응형
부제: 이미 만든 저장소의 repomd.xml에 파일을 끼워 넣거나 빼기
modifyrepo_c comps.xml /srv/repo/repodata # comps 메타데이터 추가
modifyrepo_c --mdtype=group comps.xml /srv/repo/repodata
modifyrepo_c --remove group /srv/repo/repodata # 해당 메타데이터 제거
Usage:
modifyrepo_c [OPTION?] <input metadata> <output repodata>
modifyrepo_c --remove <metadata type> <output repodata>
Modify a repository's repomd.xml
--mdtype=MDTYPE metadata type (filename에서 유추 가능)
--remove Remove specified file from repodata
-s, --checksum=SUMTYPE (default: sha256)modifyrepo_c는 createrepo_c에 포함된 도구로, 이미 생성된 저장소의 repomd.xml에 추가 메타데이터(그룹 comps, updateinfo, 커스텀 데이터 등)를 등록하거나 제거한다. createrepo로 저장소를 만든 뒤 그룹 정보나 보안 업데이트 정보를 나중에 얹을 때 쓴다. 데비안 계열에는 대응 개념이 없고, repomd.xml이라는 RHEL 저장소 특유의 인덱스를 손보는 전용 도구다.
지정한 repodata 디렉토리 안에서만 동작하며 repomd.xml과 압축된 메타데이터 파일을 갱신한다. 파일명으로 타입을 유추하지만, 애매하면 --mdtype으로 명시하는 게 안전하다.
이렇게도 쓴다
그룹(comps) 메타데이터를 저장소에 등록한다.
modifyrepo_c --mdtype=group comps.xml /srv/repo/repodata
보안·버그 정보를 담은 updateinfo를 추가한다.
modifyrepo_c --mdtype=updateinfo updateinfo.xml /srv/repo/repodata
잘못 넣은 메타데이터를 타입 이름으로 제거한다.
modifyrepo_c --remove group /srv/repo/repodata
여러 메타데이터를 배치 파일로 한 번에 등록한다.
modifyrepo_c --batchfile batch.txt /srv/repo/repodata
체크섬 타입과 압축을 지정해 등록한다.
modifyrepo_c -s sha512 --compress-type=xz comps.xml /srv/repo/repodata
createrepo_c로 저장소를 만든 직후 그룹 정보를 이어 붙인다(도구 조합).
createrepo_c /srv/repo && modifyrepo_c --mdtype=group comps.xml /srv/repo/repodata반응형