LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need help creating an RPM of a website (https://www.linuxquestions.org/questions/linux-software-2/need-help-creating-an-rpm-of-a-website-4175600784/)

TheBigOnion 02-28-2017 01:20 PM

Need help creating an RPM of a website
 
Hi,
I Have never created an RPM before and thus have never worked with a SPEC file before. I have created a PHP website and need to package it into an RPM. Here is my SPEC file:

Code:

##---------- file Rose.spec --------------
%define name    Rose
%define version 1.0
%define release 1
Summary: Rose is a web app to help find reading
Name: %{name}
Version: %{version}
Release: %{release}
Copyright: Rosely
Group: Applications/Internet
BuildArch: noarch
BuildRoot: %{_builddir}/%{name}-root
Distribution: Rosely
Vendor: Rosely Inc
Packager: Mary Jane
Provides: Rose web app

%description
This package contains the Rose web app.

%prep
exit 0

%build
exit 0

%install
exit 0

%post

%clean
exit 0

%files
%defattr(644,apache,apache,755)
/web/html/Rose/index.php
/web/html/Rose/books.php
/web/html/Rose/articles.php
/web/html/Rose/profile.php

The problem is, when I try to run RPMBUILD, it just says:
"error: File not found: /root/rpmbuild/BUILDROOT/rose-1.0-1.i386/web/html/Rose/*"

I don't know why it is putting that 'root/rpmbuild...." stuff on the front of my file locations. Can someone please give me some advice?

szboardstretcher 02-28-2017 01:22 PM

Advice? Don't use that method since you are building something so small and without serious dependencies. Use this instead.

https://github.com/jordansissel/fpm

TheBigOnion 02-28-2017 01:26 PM

Sorry, my job requires me to create an RPM using BUILDRPM.


Quote:

Originally Posted by szboardstretcher (Post 5677235)
Advice? Don't use that method since you are building something so small and without serious dependencies. Use this instead.

https://github.com/jordansissel/fpm


jefro 02-28-2017 03:49 PM

Is this a real location with files? "/root/rpmbuild/BUILDROOT/rose-1.0-1.i386/web/html/Rose/*""

Maybe you are running su or sudo or such?

TheBigOnion 03-01-2017 11:42 AM

Someone told me that I needed to copy my files into BUILDROOT. But now when I run RPMBUILD, one of the first things it does is delete all files in BUILDROOT. I am really lost on this one.

szboardstretcher 03-01-2017 11:51 AM

If you are lost at this point, and it is a company requirement to use RPM, then you should start from the beginning to learn it. Best to know the terminology and understand what you are doing and why you are doing it than just copying and pasting.

List of resources:

http://rpm5.org/docs/rpm-guide.html
https://websites.pmc.ucsc.edu/~dmk/n...ting_RPMs.html
https://fedoraproject.org/wiki/How_t...an_RPM_package


All times are GMT -5. The time now is 07:20 PM.