[DRBD-user] drbd-utils 8.9.1-3 drbd-udev rpm rules directory (redhat)

Roland Friedwagner roland.friedwagner at wu.ac.at
Mon Aug 18 12:04:07 CEST 2014

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi,

rather simple RPM location patch ...

drbd-8.4:
^^^^^^^^^
--- Makefile.ori        2014-06-02 15:00:13.000000000 +0200
+++ Makefile    2014-08-07 11:15:10.934511085 +0200
@@ -27,7 +27,8 @@
 # variables set by configure
 GIT = git
 LN_S = ln -s
-RPMBUILD = rpmbuild
+RPMBUILD ?= rpmbuild
+RPM ?= rpm
 SED = sed
 
 # default for KDIR/KVER
@@ -196,13 +197,13 @@
 
 .PHONY: km-rpm
 km-rpm: check-kdir tgz drbd-km.spec
-       cp drbd-$(FDIST_VERSION).tar.gz `rpm -E "%_sourcedir"`
+       cp drbd-$(FDIST_VERSION).tar.gz preamble-* `$(RPM) -E "%_sourcedir"`
        $(RPMBUILD) -bb \
            --define "kernelversion $(KVER)" \
            --define "kdir $(KDIR)" \
            $(RPMOPT) \
            drbd-km.spec
-       @echo "You have now:" ; find `rpm -E "%_rpmdir"` -name *.rpm
+       @echo "You have now:" ; find `$(RPM) -E "%_rpmdir"` -name *.rpm
 
 # kernel module package using the system macros.
 # result is kABI aware and uses the weak-updates mechanism.
@@ -212,21 +213,21 @@
 # uname -r, which may be wrong in a chroot build environment.
 .PHONY: kmp-rpm
 kmp-rpm: tgz drbd-kernel.spec
-       cp drbd-$(FDIST_VERSION).tar.gz `rpm -E "%_sourcedir"`
+       cp drbd-$(FDIST_VERSION).tar.gz preamble-* `$(RPM) -E "%_sourcedir"`
        $(RPMBUILD) -bb \
            $(if $(filter file,$(origin KVER)), --define "kernel_version $(KVER)") \
            $(RPMOPT) \
            drbd-kernel.spec
-       @echo "You have now:" ; find `rpm -E "%_rpmdir"` -name *.rpm
+       @echo "You have now:" ; find `$(RPM) -E "%_rpmdir"` -name *.rpm
 
 .PHONY: srpm
 srpm: tgz
-       cp drbd-$(FDIST_VERSION).tar.gz `rpm -E "%_sourcedir"`
+       cp drbd-$(FDIST_VERSION).tar.gz preamble-* `$(RPM) -E "%_sourcedir"`
        $(RPMBUILD) -bs \
            --define "kernelversion $(KVER)" \
            --define "kernel_version $(KVER)" \
            --define "kdir $(KDIR)" \
                $(RPMOPT) \
                drbd-km.spec drbd-kernel.spec
-       @echo "You have now:" ; find `rpm -E "%_srcrpmdir"` -name *.src.rpm
+       @echo "You have now:" ; find `$(RPM) -E "%_srcrpmdir"` -name *.src.rpm
 endif

$ make RPM=rpm_wu.sh RPMBUILD=rpmbuild_wu.sh tarball|kmp-rpm


drbd-utils:
^^^^^^^^^^^
--- configure.ac.in     2014-08-08 14:27:12.175839138 +0200
+++ configure.ac        2014-08-11 09:58:35.022522373 +0200
@@ -171,6 +171,7 @@
 AC_PATH_PROG(GREP, grep)
 AC_PATH_PROG(FLEX, flex)
 AC_PATH_PROG(RPMBUILD, rpmbuild)
+AC_PATH_PROG(RPM, rpm)
 AC_PATH_PROG(XSLTPROC, xsltproc)
 AC_PATH_PROG(TAR, tar)
 AC_PATH_PROG(GIT, git)
@@ -190,6 +191,10 @@
    AC_MSG_WARN([No rpmbuild found, building RPM packages is disabled.])
 fi
 
+if test -z $RPM; then
+   AC_MSG_WARN([No rpm found, building RPM packages is disabled.])
+fi
+
 if test -z $DPKG_BUILDPACKAGE; then
    AC_MSG_WARN([No dpkg-buildpackage found, building Debian packages is disabled.])
 fi
--- Makefile.in.ori     2014-08-08 14:27:12.174839011 +0200
+++ Makefile.in 2014-08-11 10:10:21.914365264 +0200
@@ -29,6 +29,7 @@
 LN_S = @LN_S@
 PREFIX = @prefix@
 RPMBUILD = @RPMBUILD@
+RPM = @RPM@
 SED = @SED@
 
 # features enabled or disabled by configure
@@ -184,17 +185,17 @@
 
 .PHONY: rpm
 rpm: tgz drbd.spec
-       cp drbd-utils-$(FDIST_VERSION).tar.gz `rpm -E "%_sourcedir"`
+       cp drbd-utils-$(FDIST_VERSION).tar.gz `$(RPM) -E "%_sourcedir"`
        $(RPMBUILD) -bb \
            $(RPMOPT) \
            drbd.spec
-       @echo "You have now:" ; find `rpm -E "%_rpmdir"` -name *.rpm
+       @echo "You have now:" ; find `$(RPM) -E "%_rpmdir"` -name *.rpm
 
 .PHONY: srpm
 srpm: tgz drbd.spec
-       cp drbd-utils-$(FDIST_VERSION).tar.gz `rpm -E "%_sourcedir"`
+       cp drbd-utils-$(FDIST_VERSION).tar.gz `$(RPM) -E "%_sourcedir"`
        $(RPMBUILD) -bs \
                $(RPMOPT) \
                drbd.spec
-       @echo "You have now:" ; find `rpm -E "%_srcrpmdir"` -name *.src.rpm
+       @echo "You have now:" ; find `$(RPM) -E "%_srcrpmdir"` -name *.src.rpm
 endif

$ export RPMBUILD=/opt/wu-wien/bin/rpmbuild_wu.sh
$ export RPM=/opt/wu-wien/bin/rpm_wu.sh
$ ./autogen.sh
$ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --without-83-support --with-distro=redhat
$ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --without-83-support --with-distro=redhat --enable-spec
$ make tarball
$ make rpm

kind regards




More information about the drbd-user mailing list