반응형
부제: 배포 전에 패키지의 흔한 실수를 잡는다
rpmlint hello.spec # spec 문법·관행 검사
rpmlint hello-2.12-1.el9.x86_64.rpm # 완성된 rpm 검사
rpmlint ~/rpmbuild/RPMS/ # 디렉토리 통째로
$ rpmlint bad.spec
bad.spec: W: no-%prep-section
bad.spec: W: no-%build-section
bad.spec: W: no-%install-section
0 packages and 1 specfiles checked; 0 errors, 3 warnings.rpmlint는 spec과 rpm을 정적 분석해 패키징 관행 위반을 짚어준다. 섹션 누락, 요약문 끝의 마침표, 잘못된 권한, 표준에 어긋난 경로 같은 것들이다. 빌드는 통과해도 배포 품질에서 걸리는 문제를 미리 걸러낸다. E는 오류, W는 경고다.
이렇게도 쓴다
빌드 결과물을 한 번에 검사한다.
rpmlint ~/rpmbuild/RPMS/x86_64/*.rpm
특정 경고를 무시하고 나머지만 본다.
rpmlint -o "Filters ['no-documentation']" hello.spec
설명 없이 요약 카운트만 본다.
rpmlint -i hello.spec
빌드 직후 바로 lint까지 이어 검증한다.
rpmbuild -ba hello.spec && rpmlint ~/rpmbuild/RPMS/x86_64/hello-*.rpm
경고 개수만 세어 CI 게이트에 쓴다.
rpmlint hello.spec | grep -c ': W:'반응형
'명령어 > Linux' 카테고리의 다른 글
| [RHEL] gendiff 소스 트리에서 패치 파일 생성 (0) | 2026.07.16 |
|---|---|
| [RHEL] rpmdiff 두 RPM 패키지 차이 비교 (0) | 2026.07.16 |
| [RHEL] spectool spec의 소스·패치 나열하고 내려받기 (0) | 2026.07.16 |
| [RHEL] rpmdev-vercmp 두 RPM 버전 크기 비교 (0) | 2026.07.16 |
| [RHEL] rpmdev-bumpspec spec 버전 올리고 changelog 추가 (0) | 2026.07.16 |