merlimat closed pull request #2129: Fixed RPM/Deb package to include "apache" and "incubating" in name URL: https://github.com/apache/incubator-pulsar/pull/2129
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/pulsar-client-cpp/pkg/deb/build-deb.sh b/pulsar-client-cpp/pkg/deb/build-deb.sh index 74f25a2cb7..9f302e8587 100755 --- a/pulsar-client-cpp/pkg/deb/build-deb.sh +++ b/pulsar-client-cpp/pkg/deb/build-deb.sh @@ -25,8 +25,8 @@ SRC_ROOT_DIR=$(git rev-parse --show-toplevel) cd $SRC_ROOT_DIR/pulsar-client-cpp/pkg/deb POM_VERSION=`cat ../../../pom.xml | xmllint --format - | sed "s/xmlns=\".*\"//g" | xmllint --stream --pattern /project/version --debug - | grep -A 2 "matches pattern" | grep text | sed "s/.* [0-9] //g"` -# Sanitize VERSION by removing `-incubating` since it's not legal in DEB -VERSION=`echo $POM_VERSION | awk -F- '{print $1}'` +# Sanitize VERSION by removing `SNAPSHOT` if any since it's not legal in DEB +VERSION=`echo $POM_VERSION | awk -F- '{print $1}'`-incubating ROOT_DIR=apache-pulsar-$POM_VERSION CPP_DIR=$ROOT_DIR/pulsar-client-cpp @@ -42,23 +42,24 @@ make pulsarShared pulsarStatic -j 3 strip lib/libpulsar.* popd -DEST_DIR=pulsar-client +DEST_DIR=apache-pulsar-client mkdir -p $DEST_DIR/DEBIAN cat <<EOF > $DEST_DIR/DEBIAN/control -Package: pulsar-client +Package: apache-pulsar-client Version: ${VERSION} Maintainer: Apache Pulsar <d...@pulsar.incubator.apache.org> Architecture: amd64 Description: The Apache Pulsar client contains a C++ and C APIs to interact with Apache Pulsar brokers. EOF -DEVEL_DEST_DIR=pulsar-client-dev +DEVEL_DEST_DIR=apache-pulsar-client-dev mkdir -p $DEVEL_DEST_DIR/DEBIAN cat <<EOF > $DEVEL_DEST_DIR/DEBIAN/control -Package: pulsar-client-dev +Package: apache-pulsar-client-dev Version: ${VERSION} Maintainer: Apache Pulsar <d...@pulsar.incubator.apache.org> Architecture: amd64 +Depends: apache-pulsar-client Description: The Apache Pulsar client contains a C++ and C APIs to interact with Apache Pulsar brokers. EOF @@ -86,8 +87,8 @@ cp $DEST_DIR/usr/share/doc/pulsar-client-$VERSION/* $DEVEL_DEST_DIR/usr/share/do ## Build actual debian packages -dpkg-deb --build pulsar-client -dpkg-deb --build pulsar-client-dev +dpkg-deb --build $DEST_DIR +dpkg-deb --build $DEVEL_DEST_DIR mkdir DEB mv *.deb DEB diff --git a/pulsar-client-cpp/pkg/rpm/SPECS/pulsar-client.spec b/pulsar-client-cpp/pkg/rpm/SPECS/pulsar-client.spec index 56c78391d3..eb6758ed84 100644 --- a/pulsar-client-cpp/pkg/rpm/SPECS/pulsar-client.spec +++ b/pulsar-client-cpp/pkg/rpm/SPECS/pulsar-client.spec @@ -17,8 +17,8 @@ # under the License. # -%define name pulsar-client -%define release 1 +%define name apache-pulsar-client +%define release 1_incubating %define buildroot %{_topdir}/%{name}-%{version}-root BuildRoot: %{buildroot} @@ -33,7 +33,8 @@ Prefix: /usr %package devel Summary: Apache Pulsar client library -Provides: pulsar-client-devel +Provides: apache-pulsar-client-devel +Requires: apache-pulsar-client %description The Apache Pulsar client contains a C++ and C APIs to interact ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services