What is the minimum I have to do to create an RPM file?

前端 未结 9 1489
误落风尘
误落风尘 2020-12-04 04:20

I just want to create an RPM file to distribute my Linux binary \"foobar\", with only a couple of dependencies. It has a config file, /etc/foobar.conf and should be installe

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 05:25

    Process of generating RPM from source file:

    1. download source file with.gz extention.
    2. install rpm-build and rpmdevtools from yum install. (rpmbuild folder will be generated...SPECS,SOURCES,RPMS.. folders will should be generated inside the rpmbuild folder).
    3. copy the source code.gz to SOURCES folder.(rpmbuild/SOURCES)
    4. Untar the tar ball by using the following command. go to SOURCES folder :rpmbuild/SOURCES where tar file is present. command: e.g tar -xvzf httpd-2.22.tar.gz httpd-2.22 folder will be generated in the same path.
    5. go to extracted folder and then type below command: ./configure --prefix=/usr/local/apache2 --with-included-apr --enable-proxy --enable-proxy-balancer --with-mpm=worker --enable-mods-static=all (.configure may vary according to source for which RPM has to built-- i have done for apache HTTPD which needs apr and apr-util dependency package).
    6. run below command once the configure is successful: make
    7. after successfull execution od make command run: checkinstall in tha same folder. (if you dont have checkinstall software please download latest version from site) Also checkinstall software has bug which can be solved by following way::::: locate checkinstallrc and then replace TRANSLATE = 1 to TRANSLATE=0 using vim command. Also check for exclude package: EXCLUDE="/selinux"
    8. checkinstall will ask for option (type R if you want tp build rpm for source file)
    9. Done .rpm file will be built in RPMS folder inside rpmbuild/RPMS file... ALL the BEST ....

提交回复
热议问题