mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.11' into trunk
This commit is contained in:
commit
dc0b389646
|
|
@ -7,25 +7,26 @@
|
|||
### Step 1:
|
||||
- Build and copy sources to build tree:
|
||||
```
|
||||
ant artifacts
|
||||
cp build/apache-cassandra-*-src.tar.gz $RPM_BUILD_DIR/SOURCES/
|
||||
ant artifacts -Drelease=true
|
||||
```
|
||||
|
||||
### Step 2:
|
||||
- Since there is no version specified in the SPEC file, one needs to be passed at `rpmbuild` time (example with 4.0):
|
||||
```
|
||||
rpmbuild --define="version 4.0" -ba redhat/cassandra.spec
|
||||
mkdir -p build/rpmbuild/{BUILD,RPMS,SPECS,SRPMS}
|
||||
rpmbuild --define="version 4.0" \
|
||||
--define="revision $(date +"%Y%m%d")git$(git rev-parse --short HEAD)%{?dist}" \
|
||||
--define "_topdir $(pwd)/build/rpmbuild" \
|
||||
--define "_sourcedir $(pwd)/build" \
|
||||
-ba redhat/cassandra.spec
|
||||
```
|
||||
|
||||
Use revision value in the example above for git based snapshots. Change to `--define="revision 1"` for non-snapshot releases.
|
||||
|
||||
- RPM files can be found in their respective build tree directories:
|
||||
```
|
||||
ls -l $RPM_BUILD_DIR/{SRPMS,RPMS}/
|
||||
ls -l build/rpmbuild/{SRPMS,RPMS}/
|
||||
```
|
||||
|
||||
### Hint:
|
||||
- Don't build packages as root..
|
||||
```
|
||||
# this makes your RPM_BUILD_DIR = ~/rpmbuild
|
||||
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
|
||||
```
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@
|
|||
# Turn off the brp-python-bytecompile script
|
||||
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
|
||||
|
||||
# rpmbuild should not barf when it spots we ship
|
||||
# binary executable files in our 'noarch' package
|
||||
%define _binaries_in_noarch_packages_terminate_build 0
|
||||
|
||||
%global username cassandra
|
||||
|
||||
%define relname apache-cassandra-%{version}
|
||||
%define revision 1
|
||||
|
||||
Name: cassandra
|
||||
Version: %{version}
|
||||
|
|
|
|||
Loading…
Reference in New Issue