Skip to content

Commit cedcff7

Browse files
corey-hammertontimvaillancourt
authored andcommitted
Fixing rpm filename expression for CentOS 7 (#269)
* Fixing rpm filename expression for CentOS 7 RPMs for CentOS 7 are not named *.el7.centos.$arch. They are named *.el7.$arch * Cleaning up the centos strings from the rpm path in the Docker file
1 parent 70f4883 commit cedcff7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ MAINTAINER Tim Vaillancourt <tim.vaillancourt@percona.com>
44
RUN yum install -y https://www.percona.com/redir/downloads/percona-release/redhat/latest/percona-release-0.1-4.noarch.rpm epel-release && \
55
yum install -y Percona-Server-MongoDB-34-tools zbackup && yum clean all
66

7-
ADD build/rpm/RPMS/x86_64/mongodb_consistent_backup*.el*.centos.x86_64.rpm /
8-
RUN yum localinstall -y /mongodb_consistent_backup*.el*.centos.x86_64.rpm && \
9-
yum clean all && rm -f /mongodb_consistent_backup*.el*.centos.x86_64.rpm
7+
ADD build/rpm/RPMS/x86_64/mongodb_consistent_backup*.el7.x86_64.rpm /
8+
RUN yum localinstall -y /mongodb_consistent_backup*.el7.x86_64.rpm && \
9+
yum clean all && rm -f /mongodb_consistent_backup*.el7.x86_64.rpm
1010

1111
USER mongodb_consistent_backup
1212
ENTRYPOINT ["mongodb-consistent-backup"]

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ uninstall:
4343
rm -rf $(SHAREDIR)/$(NAME)
4444

4545
# Build CentOS7 RPM (in Docker)
46-
build/rpm/RPMS/$(ARCH)/$(NAME)-$(VERSION)-$(RELEASE).el7.centos.$(ARCH).rpm:
46+
build/rpm/RPMS/$(ARCH)/$(NAME)-$(VERSION)-$(RELEASE).el7.$(ARCH).rpm:
4747
mkdir -p $(MAKE_DIR)/build/rpm/RPMS/$(ARCH)
4848
docker run --rm \
4949
-v "$(MAKE_DIR)/bin:/src/bin:Z" \
@@ -60,10 +60,10 @@ build/rpm/RPMS/$(ARCH)/$(NAME)-$(VERSION)-$(RELEASE).el7.centos.$(ARCH).rpm:
6060
-v "$(MAKE_DIR)/build/rpm/RPMS/$(ARCH):/src/build/rpm/RPMS/$(ARCH):Z" \
6161
-i centos:centos7 \
6262
/bin/bash -c "yum install -y python-devel python-virtualenv gcc make libffi-devel openssl-devel rpm-build && \
63-
make -C /src RELEASE=$(RELEASE) GIT_COMMIT=$(GIT_COMMIT) BIN_NAME=mongodb-consistent-backup.el7.centos.$(ARCH) rpm && \
64-
/src/bin/mongodb-consistent-backup.el7.centos.$(ARCH) --version"
63+
make -C /src RELEASE=$(RELEASE) GIT_COMMIT=$(GIT_COMMIT) BIN_NAME=mongodb-consistent-backup.el7.$(ARCH) rpm && \
64+
/src/bin/mongodb-consistent-backup.el7.$(ARCH) --version"
6565

66-
centos7: build/rpm/RPMS/$(ARCH)/$(NAME)-$(VERSION)-1.el7.centos.$(ARCH).rpm
66+
centos7: build/rpm/RPMS/$(ARCH)/$(NAME)-$(VERSION)-1.el7.$(ARCH).rpm
6767

6868
# Build Debian8 Binary (in Docker - .deb package soon!)
6969
bin/mongodb-consistent-backup.debian8.$(ARCH):
@@ -109,7 +109,7 @@ bin/mongodb-consistent-backup.debian9.$(ARCH):
109109

110110
debian9: bin/mongodb-consistent-backup.debian9.$(ARCH)
111111

112-
docker: build/rpm/RPMS/$(ARCH)/$(NAME)-$(VERSION)-$(RELEASE).el7.centos.$(ARCH).rpm
112+
docker: build/rpm/RPMS/$(ARCH)/$(NAME)-$(VERSION)-$(RELEASE).el7.$(ARCH).rpm
113113
docker build --no-cache --tag $(DOCKER_TAG) .
114114
docker tag $(DOCKER_TAG) $(NAME):latest
115115
docker run --rm -i $(DOCKER_TAG) --version

0 commit comments

Comments
 (0)