Skip to content

Commit b2ce21e

Browse files
committed
rpm: add support for MOCK_OPTIONS
.. and drop unneeded --cap-add=SYS_ADMIN from mock-on-docker
1 parent a66c68b commit b2ce21e

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

packaging/rpm/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ build_prepare: archive
3131
srpm: build_prepare
3232
/usr/bin/mock \
3333
-r $(MOCK_CONFIG) \
34+
$(MOCK_OPTIONS) \
3435
--define "__version $(VERSION)" \
3536
--define "__release $(BUILD_NUMBER)" \
3637
--enable-network \
@@ -46,6 +47,7 @@ srpm: build_prepare
4647
rpm: srpm
4748
/usr/bin/mock \
4849
-r $(MOCK_CONFIG) \
50+
$(MOCK_OPTIONS) \
4951
--define "__version $(VERSION)"\
5052
--define "__release $(BUILD_NUMBER)"\
5153
--enable-network \

packaging/rpm/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# RPM packages for librdkafka
22

3+
On a system with RPM mock installed, simply run make to create RPM packages:
4+
5+
$ make
6+
7+
Additional mock options may be specified using MOCK_OPTIONS:
8+
9+
$ make MOCK_OPTIONS='--bootstrap-chroot'
10+
11+
312
## Build with Mock on docker
413

514
From the librdkafka top-level directory:

packaging/rpm/mock-on-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if [[ $on_builder == 0 ]]; then
3939

4040
mkdir -p ${PWD}/packaging/rpm/cache/mock
4141

42-
docker run --cap-add=SYS_ADMIN \
42+
docker run \
4343
--privileged \
4444
-t \
4545
-v ${PWD}/packaging/rpm/cache/mock:/var/cache/mock \

0 commit comments

Comments
 (0)