binary RPM 파일의 설치 과정에 대한 질문입니다.

jai의 이미지

1/ kernel-2.4.20-18.8.src.rpm 파일을 받아
rpm -ivh kernel-2.4.20-18.8.src.rpm 을 실행하면
/usr/src/redhat/SPECS/ 와 /usr/src/redhat/SOURCES/ 에
관련한 파일들이 생깁니다.
rpmbuild -bb kernerl-2.4.spec 을 실행하면
binary RPM 파일이 생성됩니다.

2/ 제가 궁금한 것은
spec 파일안에 %prep, %build, %install 섹션에서
수행되는 명령들, 스크립트 들을 사용해
바이너리, 소스 rpm 파일들을 만든다(build) 란 말은

rpmbuild -bb kernel-2.4.spec 명령으로 만들어진 바이너리 rpm 을 시스템에 설치할 때
즉, rpm -ivh ???.rpm 명령의 실행으로 실제 s/w 를 설치하는 과정은
스펙파일에 기재된 과정을 따라 간다는 건가요?

예를 들면 kernel-2.4.spec 의 일부분인
%install
cd linux-%{version}
mkdir -p $RPM_BUILD_ROOT/{boot,sbin}

이 두 명령이 바이너리 rpm 을 만들 때 수행되지만,
그 결과로 만들어진 바이너리 rpm 으로 s/w 를 설치할 때도 저 과정들이
수행되는 건지 정말 궁금합니다.

ai의 이미지

spec 에서 시키는대로 해줍니다. %install 섹션의 대부분은 (이미 생성된 파일의) 복사, 심볼릭링크, 간단한 파일의 생성 등으로 되어 있습니다. 그리고 $RPM_BUILD_ROOT 는 바이너리 rpm 제작에서만 의미가 있습니다. 아래에서

Quote:
mkdir -p $RPM_BUILD_ROOT/{boot,sbin}

바이너리 rpm 을 만드는 과정에서 /boot, /sbin 에다 파일을 생성시켜서는 안되므로 $RPM_BUILD_ROOT 아래에다 만듭니다. 실제로 rpm 을 설치할 때에는 $RPM_BUILD_ROOT 이 / 로 대체된다고 이해하시면 쉬울 것 같네요.

그 외에도 rpm 설치 전후에 실행될 스크립트를 담고있는 %pre, %post 섹션과, rpm 제거 전후에 실행될 스크립트를 담고있는 %preun, %postun 섹션도 참고하세요. /etc/alternatives 아래의 심볼릭 링크 생성이라든지, 또는 httpd.conf 에 apache module 을 등록/제거 하는 일이라든지를 이런 곳에서 하게 됩니다.

War doesnt determine whos right, just whos left.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.