I have created a script for deployment. During the pre script, is it possible to know whats the version of the rpm I am deploying.
I want to create a backup file with the version of the RPM (in its name) so that i can trace back the version of the RPM file.
You could define some variables at the top of your spec file, and then use them in both the tags section and the pre script.
%define version <your-version>
%define relver <your-relver>
Version: %{version}
Release: %{relver}
%pre
/bin/cp your-file your-file.%{version}-%{relver}
You can verify the script will do the expected copy by querying the scripts in the RPM:
rpm -qp --scripts <path-to-your-rpm>/<your-rpm-name>.rpm
Related
ACE and TAO is used for our deployment and they will be required to be packaged as RPM from now on (for SUSE platform if it matters).
While I know there are RPM files available we have some specific "$ACE_ROOT/include/makeinclude/platform_macros.GNU" file that we use and we would like to have the RPM build out of the binaries resulted from our own build.
Can we create an RPM after following the steps from ACE-INSTALL.html, based on that build output?
See ACE_wrappers/rpmbuild for the spec file that is used for all RPMs on OpenSuSE Build service. Couldn't you extend that script with the options you need and contribute that back into the main github repo?
If you create an RPM using rpmbuild -ba and PHP scripts are included in the RPM, does it make this RPM automatically dependent on /usr/bin/php and usr/bin/env?
I am using rpmbuild -ba to package a Symfony project. Symfony has many PHP scripts with #!/usr/bin/env php as the first line in the script.
After the build if I execute rpm -qp <rpm-package> --requires it shows me dependencies on /usr/bin/env, /usr/bin/php, /bin/sh (listed twice? weird) and /bin/bash.
I see some scripts using #!/bin/sh where others use #!/bin/bash.
I would like to understand where these dependencies come from as they have not been specified in the .spec file as a "Requires" dependency.
rpmbuild automatically scans your files for dependencies (using ldd etc). You can find the documentation here: http://ftp.rpm.org/max-rpm/s1-rpm-depend-auto-depend.html
(this is not recommended, but) if you want to stop rpmbuild from doing this, you can put:
AutoReqProv: no
in your spec file.
I have a Play project that I would like to deploy via RPM. I'm trying to use SBT to build the RPM, on CentOS, using the sbt-native-packager RPM plugin.
At the end I gt the rpm package.
But it stored in directory under %appname%/target/rpm
How can I use my own path for rpm buildroot tree?
Say, for example /home/build/buildroot
Sbt-native-packager version in use 0.8.0.
The simple (rpm config centric) answer is to configure %_topdir in ~/.rpmmacros before invoking rpmbuild. SBT may be adding additional complexities.
I'm trying to build curl...specifically libcurl...on my Android device; I've built OpenSSL and have cloned the repo. Unfortunately the curl sources use buildconf, which requires autoconf, and I don't have autoconf installed.
Is there an alternate way to generate the configure script and/or the Makefile from the included configure.ac and Makefile.in?
The source tarballs provided by the curl project include generated configure scripts, no need for autoconf then! You can get release versions or daily snapshots from curl.haxx.se.
The configure script is generally generated with the ./buildconf script in the curl source code root directory and it requires autoconf, automake and libtool to be installed.
I downloaded syslog-ng OSE from the site (version 3.4.0alpha3)
successfully run
./configure
make
make install
but I've got no /etc/syslog-ng.conf
nor /etc/init.d/syslog-ng
What might be the reason?
env is centos 6.3
This installs syslog-ng under /usr/local with your config as /usr/local/etc/syslog-ng.conf Please check./configure --help for options.
As far as I recall, there are init script examples in the source tree, but not automatically installed.