Skip to content

Commit 00f6622

Browse files
committed
libcouchbase: fix rpm build for amazon
1 parent 81cbd74 commit 00f6622

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

libcouchbase/Jenkinsfile.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
268268
if (!(relno == 7 && name == 'centos')) {
269269
sh("sed -i 's/openssl11-devel/openssl-devel/g' ../libcouchbase/packaging/rpm/libcouchbase.spec.in")
270270
}
271+
if (relno == 2023 && name == 'amzn') {
272+
sh("sed -i '1i %undefine _package_note_file\\nBuildRequires: redhat-rpm-config' ../libcouchbase/packaging/rpm/libcouchbase.spec.in")
273+
}
271274
sh("""
272275
sed 's/@VERSION@/${VERSION.rpmVer()}/g;s/@RELEASE@/${VERSION.rpmRel()}/g;s/@TARREDAS@/${VERSION.tarName()}/g;s/^make.*test/true/g' \
273276
< ../libcouchbase/packaging/rpm/libcouchbase.spec.in > libcouchbase.spec
@@ -285,7 +288,7 @@ def package_rpm(name, bits, relno, arch, mock, VERSION) {
285288
dir("ws_${name}${relno}-${bits}/build") {
286289
sh("""
287290
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
288-
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm
291+
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.*${relno}.src.rpm
289292
""".stripIndent())
290293
sh("sudo chown couchbase:couchbase -R libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}")
291294
sh("rm -rf libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}/*.log")

libcouchbase/lcb-lnx-scripted-build-pipeline.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
195195
if (!(relno == 7 && name == 'centos')) {
196196
sh("sed -i 's/openssl11-devel/openssl-devel/g' ../libcouchbase/packaging/rpm/libcouchbase.spec.in")
197197
}
198+
if (relno == 2023 && name == 'amzn') {
199+
sh("sed -i '1i %undefine _package_note_file\\nBuildRequires: redhat-rpm-config' ../libcouchbase/packaging/rpm/libcouchbase.spec.in")
200+
}
198201
sh("""
199202
sed 's/@VERSION@/${VERSION.rpmVer()}/g;s/@RELEASE@/${VERSION.rpmRel()}/g;s/@TARREDAS@/${VERSION.tarName()}/g;s/^make.*test/true/g' \
200203
< ../libcouchbase/packaging/rpm/libcouchbase.spec.in > libcouchbase.spec
@@ -212,7 +215,7 @@ def package_rpm(name, bits, relno, arch, mock, VERSION) {
212215
dir("ws_${name}${relno}-${bits}/build") {
213216
sh("""
214217
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
215-
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm
218+
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.*${relno}.src.rpm
216219
""".stripIndent())
217220
sh("sudo chown couchbase:couchbase -R libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}")
218221
sh("rm -rf libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}/*.log")

libcouchbase/lcb-scripted-build-pipeline.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ def package_srpm(name, bits, relno, arch, mock, VERSION) {
195195
if (!(relno == 7 && name == 'centos')) {
196196
sh("sed -i 's/openssl11-devel/openssl-devel/g' ../libcouchbase/packaging/rpm/libcouchbase.spec.in")
197197
}
198+
if (relno == 2023 && name == 'amzn') {
199+
sh("sed -i '1i %undefine _package_note_file\\nBuildRequires: redhat-rpm-config' ../libcouchbase/packaging/rpm/libcouchbase.spec.in")
200+
}
198201
sh("""
199202
sed 's/@VERSION@/${VERSION.rpmVer()}/g;s/@RELEASE@/${VERSION.rpmRel()}/g;s/@TARREDAS@/${VERSION.tarName()}/g;s/^make.*test/true/g' \
200203
< ../libcouchbase/packaging/rpm/libcouchbase.spec.in > libcouchbase.spec
@@ -212,7 +215,7 @@ def package_rpm(name, bits, relno, arch, mock, VERSION) {
212215
dir("ws_${name}${relno}-${bits}/build") {
213216
sh("""
214217
sudo mock --rebuild -r ${mock} --resultdir="libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}" --old-chroot \
215-
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.el${relno}.src.rpm
218+
--verbose libcouchbase-${VERSION.tar()}_${name}${relno}_srpm/libcouchbase-${VERSION.version()}-${VERSION.rpmRel()}.*${relno}.src.rpm
216219
""".stripIndent())
217220
sh("sudo chown couchbase:couchbase -R libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}")
218221
sh("rm -rf libcouchbase-${VERSION.tar()}_${name}${relno}_${arch}/*.log")

0 commit comments

Comments
 (0)