Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Create RPM from tarball

    Posted on

    I’m trying to create an rpm file to install WebLogic on a RHEL server. I have already installed WebLogic on a server and afterwards, tarred the installation. Using the tarball with satellite server, WebLogic is automatically deployed to RHEL and is ready to run when the server boots. Now, instead of using a .tar file I would like to use an .rpm file. This will give us better control over the software being installed.

    I installed rpm-build on my server and set up the /rpmbuild directory structure i.e. /root/rpmbuild/BUILD, /BUILDROOT, /RPMS, /SOURCES, /SPECS, /SRPMS, /tmp, .rpmmacros. The tar file was placed in the /SOURCE directory and the WebLogic.spec file was placed in the /SPEC directory. However, running the command:

    rpmbuild -ba /root/rpmbuild/SPECS/weblogic.spec

    ...unpacks the source file and populates the /BUILD and /BUILDROOT directories, but the program crashes on the
    'Executing(%install): /bin/sh -e /root/rpmbuild/tmp/rpm-tmp.CgRyQZ’ with a file not found error ‘error: File not found: /root/rpmbuild/BUILDROOT/weblogic-1.0-1.x86_64/etc/weblogic/weblogic.conf’. I’m not sure why the program is even looking for this file since there is no file weblogic.conf on a weblogic server. Also, the weblogic.spec file is black under the ‘%install’
    I know that getting the .spec file is critical to getting the RPM build, so I’ve included the file below. Does anyone have any suggestions on how to complete this effort?

    Name: WeblogicInstall
    Version: 1.0
    Release: 1
    Summary: A weblogic installation
    License: GPL
    Source0: weblogic.tar.gz
    BuildArch: noarch
    BuildRoot:  %{_tmppath}/%{name}-%{version}.%{release}
    
    %description
    Installs weblogic in the /apphome directory.
    
    %prep
    rm -rf $RPM_BUILD_DIR/12c 
    
    %setup -q #Command changes to build directory, /usr/src/redhat/BUILD, and extracts
              #source files. Macro expects at least one of the source files will create the necessary
              #subdirectory under /usr/src/redhat/BUILD. Subdirectory should be named with the package name
              #and version, such as telnet-1.0.1. 
    
    %build
    
    %install
    
    %clean
    rm -rf $RPM_BUILD_ROOT
    
    %files
    
    %changelog
    
    

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat