rpm

RPM - RedHat Package Manager

RPM

in

RPM Building FAQ

in
RPM

RPM building topics

Attachments

You need yumdownloader to install source packages (part of yum-utils)

 yum install yum-utils<

Now install sources for a given package

 yumdownloader --source packagename<

Note that you don't need to enable source repositories in /etc/yum.repos.d. Keep them disabled.

%define newmacro %{?oldmacro}%{!?oldmacro:defvalue}<
%if %{!?someflag:1}0
%{__install} ...
%else
%{__rm} ...
%endif<
%patch1 -b .bak<
 %{__perl} -pi.orig -e '
s|\@DBINST\@|\$(localstatedir)/lib|g;
s|^\@INSTALL_CLAMAV_CONF_TRUE\@|\t|g;
' src/Makefile.in etc/Makefile.in<
%{__cat} <<EOF >somefile
%{somemacro}/sometext
sometext
EOF<
%configure  --enable-feature0 %{?setforpositive:--enable-feature1} %{!?setifnegative:--enable-feature2}     --enable-feature3<
 Source5: myextrafile

%{__install} %{_sourcedir}/myextrafile %{_buildroot}targetdir<

Rough solution is to completely disable invocation of /usr/lib/rpm/perl.req by rpm builder:

 %define __perl_requires %{nil}<

More fine-grained solution is described at sonic.net<

somecommand 2>/dev/null || :<
%defattr(0644, user, user, 0755)
%dir %{ovardir}/
%exclude %{ovardir}/*<
 %package
Obsoletes: foreign < %{version}-%{release}
Provides: foreign<
 %package
Requires feature(pkgname)
Requires feature(pkgname-version) = %{version}-%{release}

%package alternative1
Provides feature(pkgname) = alternative1
Provides feature(pkgname-version) = %{version}-%{release}

%package alternative2
Provides feature(pkgname) = alternative2
Provides feature(pkgname-version) = %{version}-%{release}<
 %define debug_package %{nil}<
 rpm -ivh --replacepkgs package.rpm<

Building a Mandriva package xxx-3mdk.src.rpm on RedHat

 rpmbuild -ba x.spec<

renders

 /var/tmp/rpm-tmp.xxx: fg: no job control<

Solution: change "%make" to either "make" or "%{__make}".
Alternatively, you could enhance your local macros in ~/.rpmmacrosto include %make along with appropriate versions of the MDK menumacros that do the correct thing for RH.

Creating Ubuntu packages from CPAN modules

Some of our PERL tools require some CPAN< modules that are not part of the standard Ubuntu distribution. It's obviously possible to install the module using CPAN but I like using deb packages where possible as then you only have one repository to manage. Fortunately with dh-make-perl it is possible to quickly turn any CPAN module in to a debian package!Read more

Syndicate content