diff --git a/scripts/release/rpm/README.md b/scripts/release/rpm/README.md index 967d1eb8adf..e586a65f3f6 100644 --- a/scripts/release/rpm/README.md +++ b/scripts/release/rpm/README.md @@ -5,19 +5,19 @@ On a machine with Docker, execute the following command from the root directory of this repository: _Enterprise Linux:_ -``` bash -docker build --target build-env -f ./scripts/release/rpm/Dockerfile.centos -t azure/azure-cli:centos7-builder . +```bash +docker build --target build-env -f ./scripts/release/rpm/centos7.dockerfile -t azure/azure-cli:centos7-builder . ``` _Fedora:_ ```bash -docker build --target build-env -f ./scripts/release/rpm/Dockerfile.fedora -t azure/azure-cli:fedora29-builder . +docker build --target build-env -f ./scripts/release/rpm/fedora.dockerfile -t azure/azure-cli:fedora29-builder . ``` _Mariner:_ ```bash -docker build --target build-env -f ./scripts/release/rpm/Dockerfile.mariner -t azure/azure-cli:mariner-builder . +docker build --target build-env -f ./scripts/release/rpm/mariner.dockerfile -t azure/azure-cli:mariner-builder . ``` After several minutes, this will have created a Docker image named `azure/azure-cli:centos7-builder` containing an @@ -25,17 +25,17 @@ unsigned `.rpm` built from the current contents of your azure-cli directory. To you can run the following command: _Enterprise Linux:_ -``` bash +```bash docker run azure/azure-cli:centos7-builder cat /root/rpmbuild/RPMS/x86_64/azure-cli-dev-1.el7.x86_64.rpm > ./bin/azure-cli-dev-1.el7.x86_64.rpm ``` _Fedora:_ -``` bash +```bash docker run azure/azure-cli:fedora29-builder cat /root/rpmbuild/RPMS/x86_64/azure-cli-dev-1.fc29.x86_64.rpm > ./bin/azure-cli-dev-1.fc29.x86_64.rpm ``` _Mariner:_ -``` bash +```bash docker run azure/azure-cli:mariner-builder cat /usr/src/mariner/RPMS/x86_64/azure-cli-dev-1.cm1.x86_64.rpm > ./bin/azure-cli-dev-1.cm1.x86_64.rpm ``` @@ -60,8 +60,8 @@ Run the RPM package On a machine with Docker, execute the following command from the root directory of this repository: -``` bash -docker build -f ./scripts/release/rpm/Dockerfile.centos -t azure/azure-cli:centos7 . +```bash +docker build -f ./scripts/release/rpm/centos7.dockerfile -t azure/azure-cli:centos7 . ``` If you had previously followed this instructions above for building an RPM package, this should finish very quickly. @@ -72,23 +72,23 @@ Verification ------------ Install the RPM: -``` +```bash sudo rpm -i RPMS/*/azure-cli-2.0.16-1.noarch.rpm az --version ``` Check the file permissions of the package: -``` +```bash rpmlint RPMS/*/azure-cli-2.0.16-1.x86_64.rpm ``` Check the file permissions of the package: -``` +```bash rpm -qlvp RPMS/*/azure-cli-2.0.16-1.x86_64.rpm ``` To remove: -``` +```bash sudo rpm -e azure-cli ``` @@ -97,4 +97,3 @@ Links - [Fedora Project: How to Create an RPM Package](https://fedoraproject.org/wiki/How_to_create_an_RPM_package) - [Fedora Project: Packaging RPM Macros](https://fedoraproject.org/wiki/Packaging:RPMMacros?rd=Packaging/RPMMacros) - diff --git a/scripts/release/rpm/Dockerfile.centos7 b/scripts/release/rpm/centos7.dockerfile similarity index 100% rename from scripts/release/rpm/Dockerfile.centos7 rename to scripts/release/rpm/centos7.dockerfile diff --git a/scripts/release/rpm/Dockerfile.fedora b/scripts/release/rpm/fedora.dockerfile similarity index 100% rename from scripts/release/rpm/Dockerfile.fedora rename to scripts/release/rpm/fedora.dockerfile diff --git a/scripts/release/rpm/Dockerfile.mariner b/scripts/release/rpm/mariner.dockerfile similarity index 100% rename from scripts/release/rpm/Dockerfile.mariner rename to scripts/release/rpm/mariner.dockerfile diff --git a/scripts/release/rpm/pipeline.sh b/scripts/release/rpm/pipeline.sh index 9812368191a..f6f2d5384a1 100755 --- a/scripts/release/rpm/pipeline.sh +++ b/scripts/release/rpm/pipeline.sh @@ -15,14 +15,14 @@ CLI_VERSION=`cat src/azure-cli/azure/cli/__main__.py | grep __version__ | sed s/ docker build \ --target build-env \ --build-arg cli_version=${CLI_VERSION} \ - -f ./scripts/release/rpm/Dockerfile.${IMAGE} \ + -f ./scripts/release/rpm/${IMAGE}.dockerfile \ -t azure/azure-cli:${IMAGE}-builder \ . # Continue the previous build, and create a container that has the current azure-cli build but not the source code. docker build \ --build-arg cli_version=${CLI_VERSION} \ - -f ./scripts/release/rpm/Dockerfile.${IMAGE} \ + -f ./scripts/release/rpm/${IMAGE}.dockerfile \ -t azure/azure-cli:${IMAGE} \ . diff --git a/scripts/release/rpm/pipeline_mariner.sh b/scripts/release/rpm/pipeline_mariner.sh index b087c30669e..11b0eddb2f0 100644 --- a/scripts/release/rpm/pipeline_mariner.sh +++ b/scripts/release/rpm/pipeline_mariner.sh @@ -12,14 +12,14 @@ CLI_VERSION=`cat src/azure-cli/azure/cli/__main__.py | grep __version__ | sed s/ docker build \ --target build-env \ --build-arg cli_version=${CLI_VERSION} \ - -f ./scripts/release/rpm/Dockerfile.mariner \ + -f ./scripts/release/rpm/mariner.dockerfile \ -t azure/azure-cli:mariner-builder \ . # Continue the previous build, and create a container that has the current azure-cli build but not the source code. docker build \ --build-arg cli_version=${CLI_VERSION} \ - -f ./scripts/release/rpm/Dockerfile.mariner \ + -f ./scripts/release/rpm/mariner.dockerfile \ -t azure/azure-cli:mariner \ . diff --git a/scripts/release/rpm/Dockerfile.ubi8 b/scripts/release/rpm/ubi8.dockerfile similarity index 100% rename from scripts/release/rpm/Dockerfile.ubi8 rename to scripts/release/rpm/ubi8.dockerfile