RPM packaging a directory of files

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat RPM packaging a directory of files
# 1  
Old 02-06-2014
RPM packaging a directory of files

Hi, I wonder if anyone can point me in the right direction


I have a requirement to distribute a set of admin scripts that currently sit in an SVN repo by packaging them up in an RPM so that they can me unpacked to the correct location by simply installing the package .. e.g. 'yum install admin-scripts'

I just needed some advice on how i would achieve this within the spec file

Im not quite sure what I would use as the source0: ?

normally i would point to a tar.gz of source code, but in this case, I need to first checkout the contents of a repository to a temp dir somewhere, then point to that dir as the source (and all of its subdirectoies)

So I guess I have 2 questions -

1) does the %prep section run before the source0: line is evaluated (in other words can i run a script in %prep to extract the dir tree from SVN that will ultimately be used by source0:

2) can I use a 'directory' as a source0: ? so that it knows to pack up everything under that location ?

I hope all that made sense

Any guidance would be greatly appreciated
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

2. Linux

rpm packaging issue for unixodbc driver manager

Hi All, I am trying to make rpm package for unixODBC driver manager 2.3.0 using below spec file. During rpmbuild i am getting the error. Can you pls advice how we can overcome this issue %define name unixODBC %define ver 2.3.0 %define prefix /usr %define sysconfdir /etc %define libdir... (2 Replies)
Discussion started by: kamauv234
2 Replies

3. UNIX for Advanced & Expert Users

How to install .rpm file from a directory using yum?

Hello Everybody, I am having a cluster which is not connected to internet. I want to check its performance do I downloaded required packages from the internet and copied them in a particular folder. As per the instructions given at http:... (6 Replies)
Discussion started by: albertspade
6 Replies

4. Shell Programming and Scripting

build rpm with SPEC file for packaging .jar and some .sh files..

Good day people, Hereby wish to have your advise for below: I have some .jar files, some script files (install.sh, action.sh) , and a libaes.so file. Basically, the .jar files compute the operation of my system and define the working directory for my system. My current scenario: i trigger... (1 Reply)
Discussion started by: cielle
1 Replies

5. SuSE

Rpm packaging on Suse Linux

Hi All, I am new to linux. Still I am asked to package a war file as an RPM package. That is an unusual RPM packaging(To me). If you guys could guide me, on how to do that, will be great. I have a war file inside a folder, that folder is inside a tar file as a SOURCE for RPM package.... (8 Replies)
Discussion started by: dirshah
8 Replies

6. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

7. Red Hat

RPM Packaging doubt!

Hi, I need to create an RPM package for my java application. Already build package for that application avail;able. I need to create binary RPM package for my java application. For that in spec file, do I need to write any script kind of thing to install my package. any one have idea... (1 Reply)
Discussion started by: ram.sj
1 Replies

8. Linux

Converting .tar files into RPM

Hi guys, Can anyone tell me, how .tar files could be convert into .RPM package. Hoping soon replay with positive assistance. Thanks. (1 Reply)
Discussion started by: daya.pandit
1 Replies

9. UNIX for Dummies Questions & Answers

how to install rpm to specific directory

Hi, For example, I want to install abc.rpm to /abc directory. How can I do that? Please help. (2 Replies)
Discussion started by: beeloo
2 Replies

10. UNIX for Dummies Questions & Answers

Howto install RPM package for non-Root user directory?

Dear expert, Suppose I have an application that comes in rpm format. Let's call it: my_downloaded_package.rpm How can I install it in my particular home directory (since I'm not a root user). Say the directory where I want to install above rpm package is: ~/.my_desired_location... (1 Reply)
Discussion started by: monkfan
1 Replies
Login or Register to Ask a Question
scap-as-rpm(8)						  System Administration Utilities					    scap-as-rpm(8)

NAME
scap-as-rpm - manual page for scap-as-rpm DESCRIPTION
usage: scap-as-rpm [-h] [--pkg-name PKG_NAME] [--pkg-version PKG_VERSION] [--pkg-release PKG_RELEASE] [--pkg-summary PKG_SUMMARY] [--pkg-license PKG_LICENSE] [--pkg-scap-location PKG_SCAP_LOCATION] [--rpm-destination RPM_DESTINATION] [--srpm-destination SRPM_DESTINATION] FILE [FILE ...] Takes given SCAP input(s) and makes an RPM package that contains them. The result RPM can be installed using # yum install ./pack- age-name-1-1.rpm which will put the contents into /usr/share/xml/scap. No dependency on openscap or scapworkbench is enforced in the output package so you can use any SCAP-capable scanner to evaluate the content. positional arguments: FILE List of files that should be put into the result package. These should be SCAP XML files but such requirement is not enforced. optional arguments: -h, --help show this help message and exit --pkg-name PKG_NAME Name of the RPM package, if none is provided the basename of the first SCAP input is used. Ex.: xyzsecurity-guide --pkg-version PKG_VERSION --pkg-release PKG_RELEASE --pkg-summary PKG_SUMMARY Optional short description of the package. --pkg-license PKG_LICENSE Short name of the license that you want to publish the package under. Ex.: GPLv2+, BSD, ... --pkg-scap-location PKG_SCAP_LOCATION Folder where SCAP files are supposed to be installed. Each package will have its own folder inside this folder. RPM variables can be used and will be expanded as usual. It is recommended to keep the default settings. --rpm-destination RPM_DESTINATION The folder (absolute or relative to CWD) where the result RPM shall be saved. --srpm-destination SRPM_DESTINATION The folder (absolute or relative to CWD) where the result SRPM shall be saved. scap-as-rpm November 2013 scap-as-rpm(8)