Create RPM through MakeFile and Tar ball
up vote
0
down vote
favorite
I am trying to generate RPM using MakeFile, but it fails to work.
Here I show an example
System is CentOs 7
1- I have my application here
/applicationGroup/group01/app01
2- Here is what I have for sake of example
/applicationGroup/group01/app01/public
/applicatoinGroup/group01/app01/lib
/applicationGroup/group01/app01/.git
/applicationGroup/group01/app01/somephp.php
/applicationGroup/group01/app01/MakeFile
/applicationGroup/group01/app01/rpm.spec
/applicationGroup/group01/app01/build
3- Here is what I want to do
1- setup the MakeFile, so it create the tarball and save it to
build/SOURCE2- the tar ball should exclude : MakeFile, rpm.spec, .git and
.gitignore3- then MakeFile use the rpmbuild to create the rpm
4- then run: make rpm clean
5- the generated rpm should be relocatable. That means, i use the
prefix=/mynewlocation/myappV02, and install it in a new location on
same machine.
I need the simplest MakeFile and rpm.spec example to achieve above example.
My problem is, when I run the generated rpm, it install it in its original folder location. even though I use the prefix= option.
Name: myAppName
Version: 1.0.1
Release: 1
Summary: myApp description
License: free
URL: http://myapp.somedomain.com
BuildArch: noarch
Source0: MyappName_V1.0.1.tar.gz
Prefix: /app01
%description
My software Description
%define_missing_doc_files_terminate_build 0
%prep
%autosetup -c package
%build
%install
rm -rf %buildroot
mkdir -p %buildroot
cp -rp * %buildroot
%files
/app01/*
%changelog
git makefile tar rpm
add a comment |
up vote
0
down vote
favorite
I am trying to generate RPM using MakeFile, but it fails to work.
Here I show an example
System is CentOs 7
1- I have my application here
/applicationGroup/group01/app01
2- Here is what I have for sake of example
/applicationGroup/group01/app01/public
/applicatoinGroup/group01/app01/lib
/applicationGroup/group01/app01/.git
/applicationGroup/group01/app01/somephp.php
/applicationGroup/group01/app01/MakeFile
/applicationGroup/group01/app01/rpm.spec
/applicationGroup/group01/app01/build
3- Here is what I want to do
1- setup the MakeFile, so it create the tarball and save it to
build/SOURCE2- the tar ball should exclude : MakeFile, rpm.spec, .git and
.gitignore3- then MakeFile use the rpmbuild to create the rpm
4- then run: make rpm clean
5- the generated rpm should be relocatable. That means, i use the
prefix=/mynewlocation/myappV02, and install it in a new location on
same machine.
I need the simplest MakeFile and rpm.spec example to achieve above example.
My problem is, when I run the generated rpm, it install it in its original folder location. even though I use the prefix= option.
Name: myAppName
Version: 1.0.1
Release: 1
Summary: myApp description
License: free
URL: http://myapp.somedomain.com
BuildArch: noarch
Source0: MyappName_V1.0.1.tar.gz
Prefix: /app01
%description
My software Description
%define_missing_doc_files_terminate_build 0
%prep
%autosetup -c package
%build
%install
rm -rf %buildroot
mkdir -p %buildroot
cp -rp * %buildroot
%files
/app01/*
%changelog
git makefile tar rpm
Have you tried to read any manual about relocatable rpms? I googled this: rpm5.org/docs/api/relocatable.html Additionally: I understand you already have some spec file. Can you share it here? By the way: why you want to use makefile?
– Kuchara
Nov 10 at 15:45
I need to use MakeFile to automate the deployment process. as one single step for developers to create the rpm and one step for DevOp to install the rpm. There is more into this, this is just part of the solution. Docker and git CI/DI is part of it. By the way, i don't have the spec file handy now.
– user3534653
Nov 10 at 16:17
ok, i found the spec, included above
– user3534653
Nov 10 at 16:31
You can't do anything with Make until you know how to do i without Make. You must figure out how to build a satisfactory rpm on the command line, before you worry about writing a Makefile.
– Beta
Nov 11 at 0:41
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to generate RPM using MakeFile, but it fails to work.
Here I show an example
System is CentOs 7
1- I have my application here
/applicationGroup/group01/app01
2- Here is what I have for sake of example
/applicationGroup/group01/app01/public
/applicatoinGroup/group01/app01/lib
/applicationGroup/group01/app01/.git
/applicationGroup/group01/app01/somephp.php
/applicationGroup/group01/app01/MakeFile
/applicationGroup/group01/app01/rpm.spec
/applicationGroup/group01/app01/build
3- Here is what I want to do
1- setup the MakeFile, so it create the tarball and save it to
build/SOURCE2- the tar ball should exclude : MakeFile, rpm.spec, .git and
.gitignore3- then MakeFile use the rpmbuild to create the rpm
4- then run: make rpm clean
5- the generated rpm should be relocatable. That means, i use the
prefix=/mynewlocation/myappV02, and install it in a new location on
same machine.
I need the simplest MakeFile and rpm.spec example to achieve above example.
My problem is, when I run the generated rpm, it install it in its original folder location. even though I use the prefix= option.
Name: myAppName
Version: 1.0.1
Release: 1
Summary: myApp description
License: free
URL: http://myapp.somedomain.com
BuildArch: noarch
Source0: MyappName_V1.0.1.tar.gz
Prefix: /app01
%description
My software Description
%define_missing_doc_files_terminate_build 0
%prep
%autosetup -c package
%build
%install
rm -rf %buildroot
mkdir -p %buildroot
cp -rp * %buildroot
%files
/app01/*
%changelog
git makefile tar rpm
I am trying to generate RPM using MakeFile, but it fails to work.
Here I show an example
System is CentOs 7
1- I have my application here
/applicationGroup/group01/app01
2- Here is what I have for sake of example
/applicationGroup/group01/app01/public
/applicatoinGroup/group01/app01/lib
/applicationGroup/group01/app01/.git
/applicationGroup/group01/app01/somephp.php
/applicationGroup/group01/app01/MakeFile
/applicationGroup/group01/app01/rpm.spec
/applicationGroup/group01/app01/build
3- Here is what I want to do
1- setup the MakeFile, so it create the tarball and save it to
build/SOURCE2- the tar ball should exclude : MakeFile, rpm.spec, .git and
.gitignore3- then MakeFile use the rpmbuild to create the rpm
4- then run: make rpm clean
5- the generated rpm should be relocatable. That means, i use the
prefix=/mynewlocation/myappV02, and install it in a new location on
same machine.
I need the simplest MakeFile and rpm.spec example to achieve above example.
My problem is, when I run the generated rpm, it install it in its original folder location. even though I use the prefix= option.
Name: myAppName
Version: 1.0.1
Release: 1
Summary: myApp description
License: free
URL: http://myapp.somedomain.com
BuildArch: noarch
Source0: MyappName_V1.0.1.tar.gz
Prefix: /app01
%description
My software Description
%define_missing_doc_files_terminate_build 0
%prep
%autosetup -c package
%build
%install
rm -rf %buildroot
mkdir -p %buildroot
cp -rp * %buildroot
%files
/app01/*
%changelog
git makefile tar rpm
git makefile tar rpm
edited Nov 10 at 16:30
asked Nov 10 at 15:10
user3534653
9112
9112
Have you tried to read any manual about relocatable rpms? I googled this: rpm5.org/docs/api/relocatable.html Additionally: I understand you already have some spec file. Can you share it here? By the way: why you want to use makefile?
– Kuchara
Nov 10 at 15:45
I need to use MakeFile to automate the deployment process. as one single step for developers to create the rpm and one step for DevOp to install the rpm. There is more into this, this is just part of the solution. Docker and git CI/DI is part of it. By the way, i don't have the spec file handy now.
– user3534653
Nov 10 at 16:17
ok, i found the spec, included above
– user3534653
Nov 10 at 16:31
You can't do anything with Make until you know how to do i without Make. You must figure out how to build a satisfactory rpm on the command line, before you worry about writing a Makefile.
– Beta
Nov 11 at 0:41
add a comment |
Have you tried to read any manual about relocatable rpms? I googled this: rpm5.org/docs/api/relocatable.html Additionally: I understand you already have some spec file. Can you share it here? By the way: why you want to use makefile?
– Kuchara
Nov 10 at 15:45
I need to use MakeFile to automate the deployment process. as one single step for developers to create the rpm and one step for DevOp to install the rpm. There is more into this, this is just part of the solution. Docker and git CI/DI is part of it. By the way, i don't have the spec file handy now.
– user3534653
Nov 10 at 16:17
ok, i found the spec, included above
– user3534653
Nov 10 at 16:31
You can't do anything with Make until you know how to do i without Make. You must figure out how to build a satisfactory rpm on the command line, before you worry about writing a Makefile.
– Beta
Nov 11 at 0:41
Have you tried to read any manual about relocatable rpms? I googled this: rpm5.org/docs/api/relocatable.html Additionally: I understand you already have some spec file. Can you share it here? By the way: why you want to use makefile?
– Kuchara
Nov 10 at 15:45
Have you tried to read any manual about relocatable rpms? I googled this: rpm5.org/docs/api/relocatable.html Additionally: I understand you already have some spec file. Can you share it here? By the way: why you want to use makefile?
– Kuchara
Nov 10 at 15:45
I need to use MakeFile to automate the deployment process. as one single step for developers to create the rpm and one step for DevOp to install the rpm. There is more into this, this is just part of the solution. Docker and git CI/DI is part of it. By the way, i don't have the spec file handy now.
– user3534653
Nov 10 at 16:17
I need to use MakeFile to automate the deployment process. as one single step for developers to create the rpm and one step for DevOp to install the rpm. There is more into this, this is just part of the solution. Docker and git CI/DI is part of it. By the way, i don't have the spec file handy now.
– user3534653
Nov 10 at 16:17
ok, i found the spec, included above
– user3534653
Nov 10 at 16:31
ok, i found the spec, included above
– user3534653
Nov 10 at 16:31
You can't do anything with Make until you know how to do i without Make. You must figure out how to build a satisfactory rpm on the command line, before you worry about writing a Makefile.
– Beta
Nov 11 at 0:41
You can't do anything with Make until you know how to do i without Make. You must figure out how to build a satisfactory rpm on the command line, before you worry about writing a Makefile.
– Beta
Nov 11 at 0:41
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53240266%2fcreate-rpm-through-makefile-and-tar-ball%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried to read any manual about relocatable rpms? I googled this: rpm5.org/docs/api/relocatable.html Additionally: I understand you already have some spec file. Can you share it here? By the way: why you want to use makefile?
– Kuchara
Nov 10 at 15:45
I need to use MakeFile to automate the deployment process. as one single step for developers to create the rpm and one step for DevOp to install the rpm. There is more into this, this is just part of the solution. Docker and git CI/DI is part of it. By the way, i don't have the spec file handy now.
– user3534653
Nov 10 at 16:17
ok, i found the spec, included above
– user3534653
Nov 10 at 16:31
You can't do anything with Make until you know how to do i without Make. You must figure out how to build a satisfactory rpm on the command line, before you worry about writing a Makefile.
– Beta
Nov 11 at 0:41