Revert "Separate CentOS from MOS"

The commit this patch reverts breaks Fuel CI
on docker container rebuilds.

This reverts commit bc9c3117c7.

Change-Id: I18fe16cf8f0be40e30fec6229606d1d69cbfe73d
Closes-Bug: #1521551
This commit is contained in:
Matthew Mosesohn 2015-12-01 10:52:09 +00:00
parent bc9c3117c7
commit 32b1363015
27 changed files with 54 additions and 273 deletions

2
.gitignore vendored
View File

@ -24,4 +24,4 @@ lock
.DS_Store
Nailgun.egg-info
repomd.xml*
repomd.xml

View File

@ -62,15 +62,10 @@ BOOTSTRAP_RPMS_CUSTOM:=\
define yum_local_repo
[mirror]
name=Upstream mirror
name=Mirantis mirror
baseurl=file://$(LOCAL_MIRROR_CENTOS_OS_BASEURL)
gpgcheck=0
enabled=1
[mos-mirror]
name=MOS mirror
baseurl=file://$(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)
gpgcheck=0
enabled=1
endef
define bootstrap_yum_conf
@ -109,7 +104,7 @@ $(BUILD_DIR)/bootstrap/initramfs.img: \
$(BUILD_DIR)/bootstrap/linux: $(BUILD_DIR)/mirror/centos/build.done
mkdir -p $(BUILD_DIR)/bootstrap
find $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL) -name '$(KERNEL_PATTERN)' | xargs rpm2cpio | \
find $(LOCAL_MIRROR_CENTOS_OS_BASEURL) -name '$(KERNEL_PATTERN)' | xargs rpm2cpio | \
(cd $(BUILD_DIR)/bootstrap/; cpio -imd './boot/vmlinuz*')
mv $(BUILD_DIR)/bootstrap/boot/vmlinuz* $(BUILD_DIR)/bootstrap/linux
rm -r $(BUILD_DIR)/bootstrap/boot
@ -199,14 +194,10 @@ $(BUILD_DIR)/bootstrap/prepare-initram-root.done: \
-sudo chroot $(INITRAMROOT) chkconfig postfix off
-sudo chroot $(INITRAMROOT) chown smmsp:smmsp /var/spool/clientmqueue
# FIXME (vparakhin): there's no single RPM repo anymore, therefore
# source mirrors for kernel, modules and libs are specified explicitly.
# Perhaps this stuff should be moved to global config.mk
# Installing kernel modules
find $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL) -name '$(KERNEL_PATTERN)' | xargs rpm2cpio | \
find $(LOCAL_MIRROR_CENTOS_OS_BASEURL) -name '$(KERNEL_PATTERN)' | xargs rpm2cpio | \
( cd $(INITRAMROOT); sudo cpio -idm './lib/modules/*' './boot/vmlinuz*' )
find $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL) -name '$(KERNEL_FIRMWARE_PATTERN)' | xargs rpm2cpio | \
find $(LOCAL_MIRROR_CENTOS_OS_BASEURL) -name '$(KERNEL_FIRMWARE_PATTERN)' | xargs rpm2cpio | \
( cd $(INITRAMROOT); sudo cpio -idm './lib/firmware/*' )
find $(LOCAL_MIRROR_CENTOS_OS_BASEURL) -name 'libmlx4*' | xargs rpm2cpio | \
( cd $(INITRAMROOT); sudo cpio -idm './etc/*' './usr/lib64/*' )

View File

@ -147,8 +147,6 @@ FUELUPGRADE_GERRIT_COMMIT?=none
LOCAL_MIRROR_CENTOS:=$(LOCAL_MIRROR)/centos
LOCAL_MIRROR_CENTOS_OS_BASEURL:=$(LOCAL_MIRROR_CENTOS)/os/$(CENTOS_ARCH)
LOCAL_MIRROR_MOS_CENTOS:=$(LOCAL_MIRROR)/mos-centos
LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL:=$(LOCAL_MIRROR_MOS_CENTOS)
LOCAL_MIRROR_UBUNTU:=$(LOCAL_MIRROR)/ubuntu
LOCAL_MIRROR_UBUNTU_OS_BASEURL:=$(LOCAL_MIRROR_UBUNTU)
LOCAL_MIRROR_DOCKER:=$(LOCAL_MIRROR)/docker

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -29,10 +25,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -8,11 +8,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -36,10 +32,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -7,10 +7,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:///repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:///mos-repo/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo
@ -20,4 +16,4 @@ ADD fuel-centos.ks /root/fuel-centos.ks
RUN chmod +x /usr/local/bin/start.sh; \
touch /etc/sysconfig/network
CMD /usr/local/bin/start.sh
CMD /usr/local/bin/start.sh

View File

@ -1,5 +1,5 @@
install
#url --url=http://127.0.0.1/repo/os/x86_64/
url --url=http://127.0.0.1/os/x86_64/
lang en_US.UTF-8
keyboard uk
network --device eth0 --bootproto dhcp
@ -8,8 +8,7 @@ authconfig --enableshadow --passalgo=sha512 --enablefingerprint
selinux --disabled
timezone --utc Etc/UTC
#repo --name="CentOS" --baseurl=http://mirror.centos.org/centos/6/os/x86_64/ --cost=100
repo --name="Upstream CentOS" --baseurl=http://127.0.0.1/repo/os/x86_64/
repo --name="MOS CentOS" --baseurl=http://127.0.0.1/mos-repo/
repo --name="Fuel CentOS" --baseurl=http://127.0.0.1/os/x86_64/ --cost 100
#repo --name="Updates" --baseurl=http://mirror.centos.org/centos-6/6/updates/x86_64/ --cost=100
# CentOSPlus is here ONLY for a libselinux patch.
# Once 6.6 is released, this should be removed

View File

@ -19,10 +19,8 @@ for loopdev in `seq 1 9`; do
done
# Start webserver and wait for it to be up
mkdir -p /var/www/html/repo
ln -s /repo/os /var/www/html/repo/os
ln -s /mos-repo /var/www/html/
ln -s /repo/os /var/www/html/os
service httpd start
cd /export
ami-creator -c /root/fuel-centos.ks -n fuel-centos
ami-creator -c /root/fuel-centos.ks -n fuel-centos

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -28,10 +24,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -37,10 +33,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -68,17 +68,16 @@ $(BUILD_DIR)/docker/fuel-centos.done: \
sudo docker build -t fuel/fuel-centos-build $(BUILD_DIR)/docker/fuel-centos-build && \
mkdir -p $(BUILD_DIR)/docker/fuel-centos/ && \
echo "Generating fuel/centos base image. Refer to $(BUILD_DIR)/docker/fuel-centos-build.log if it fails." && \
sudo docker -D run --net=bridge --rm -a stdout -a stderr -i -t --privileged -v $(LOCAL_MIRROR_CENTOS):/repo:ro -v $(LOCAL_MIRROR_MOS_CENTOS):/mos-repo:ro -v $(BUILD_DIR)/docker/fuel-centos:/export fuel/fuel-centos-build 2>&1 > $(BUILD_DIR)/docker/fuel-centos-build.log && \
sudo docker -D run --net=bridge --rm -a stdout -a stderr -i -t --privileged -v $(LOCAL_MIRROR_CENTOS):/repo:ro -v $(BUILD_DIR)/docker/fuel-centos:/export fuel/fuel-centos-build 2>&1 > $(BUILD_DIR)/docker/fuel-centos-build.log && \
sudo $(SOURCE_DIR)/docker/fuel-centos-build/img2docker.sh $(BUILD_DIR)/docker/fuel-centos/fuel-centos.img fuel/centos
$(ACTION.TOUCH)
$(BUILD_DIR)/docker/repo-container-up.done: \
$(BUILD_DIR)/docker/fuel-centos.done
-sudo docker rm -f "$(REPO_CONTAINER)"
sudo docker -D run -d -p 80 -v $(LOCAL_MIRROR_CENTOS):/var/www/html/repo -v $(LOCAL_MIRROR_MOS_CENTOS):/var/www/html/mos-repo --name "$(REPO_CONTAINER)" fuel/centos /usr/sbin/apachectl -DFOREGROUND
sudo docker -D run -d -p 80 -v $(LOCAL_MIRROR_CENTOS):/var/www/html --name "$(REPO_CONTAINER)" fuel/centos /usr/sbin/apachectl -DFOREGROUND
REPO_PORT=`sudo docker port $(REPO_CONTAINER) 80 | cut -d':' -f2` && \
wget -t10 -T1 -O /dev/null --waitretry 1 --retry-connrefused --no-proxy http://127.0.0.1:$${REPO_PORT}/repo/os/x86_64/repodata/repomd.xml && \
wget -t10 -T1 -O /dev/null --waitretry 1 --retry-connrefused --no-proxy http://127.0.0.1:$${REPO_PORT}/mos-repo/repodata/repomd.xml
wget -t10 -T1 --waitretry 1 --retry-connrefused --no-proxy http://127.0.0.1:$${REPO_PORT}/os/x86_64/repodata/repomd.xml
$(ACTION.TOUCH)
$(BUILD_DIR)/docker/sources.done: \

View File

@ -8,11 +8,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -34,10 +30,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -29,10 +25,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -29,10 +25,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -24,10 +20,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -29,10 +25,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -28,10 +24,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -7,11 +7,7 @@ RUN rm -rf /etc/yum.repos.d/*; \
echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/repo/os/x86_64/\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/mos-repo/\n\
baseurl=http://$(route -n | awk '/^0.0.0.0/ { print $2 }'):_PORT_/os/x86_64/\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean expire-cache; \
@ -34,10 +30,6 @@ RUN echo -e "\
[nailgun]\n\
name=Nailgun Local Repo\n\
baseurl=file:/var/www/nailgun/centos/x86_64\n\
gpgcheck=0\n\
[mos]\n\
name=MOS Local Repo\n\
baseurl=file:/var/www/nailgun/mos-centos/x86_64\n\
gpgcheck=0" \
> /etc/yum.repos.d/nailgun.repo; \
yum clean all; \

View File

@ -12,8 +12,6 @@ selinux --disabled
unsupported_hardware
# SKIP CONFIGURING X
skipx
repo --name="MOS Centos repository" --baseurl=file:///mnt/source/mos-centos/ --cost=100
{{extra_repos}}
# NEVER ever place zerombr here, it breaks automated installation
%include /tmp/bootloader.ks
%include /tmp/partition.ks
@ -445,14 +443,10 @@ repodir="${wwwdir}/${OPENSTACK_VERSION}"
# Copying Centos files
mkdir -p ${repodir}/centos/x86_64
mkdir -p ${repodir}/mos-centos/x86_64
cp -r ${SOURCE}/images ${repodir}/centos/x86_64
cp -r ${SOURCE}/isolinux ${repodir}/centos/x86_64
cp -r ${SOURCE}/repodata ${repodir}/centos/x86_64
cp -r ${SOURCE}/Packages ${repodir}/centos/x86_64
cp -r ${SOURCE}/mos-centos/repodata ${repodir}/mos-centos/x86_64
cp -r ${SOURCE}/mos-centos/Packages ${repodir}/mos-centos/x86_64
cp -r ${SOURCE}/extra-repos ${wwwdir}/
cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
# Copying Ubuntu files
@ -497,16 +491,11 @@ touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
# Prepare local repository specification
rm /etc/yum.repos.d/CentOS*.repo
cp ${SOURCE}/extra-repos/extra.repo /etc/yum.repos.d/
cat > /etc/yum.repos.d/nailgun.repo << EOF
[nailgun]
name=Nailgun Local Repo
baseurl=file:/var/www/nailgun/${OPENSTACK_VERSION}/centos/x86_64
gpgcheck=0
[mos]
name=MOS Local Repo
baseurl=file:/var/www/nailgun/${OPENSTACK_VERSION}/mos-centos/x86_64
gpgcheck=0
EOF
# Disable subscription-manager plugins

View File

@ -53,6 +53,8 @@ $(BUILD_DIR)/iso/isoroot-centos.done: \
$(BUILD_DIR)/iso/isoroot-dotfiles.done
mkdir -p $(ISOROOT)
tar xf $(CENTOS_DEP_FILE) -C $(ISOROOT) --xform s:^centos-repo/::
createrepo -g $(ISOROOT)/comps.xml \
-u media://`head -1 $(ISOROOT)/.discinfo` $(ISOROOT)
$(ACTION.TOUCH)
else
$(BUILD_DIR)/iso/isoroot-centos.done: \
@ -63,9 +65,9 @@ $(BUILD_DIR)/iso/isoroot-centos.done: \
$(BUILD_DIR)/iso/isoroot-dotfiles.done
mkdir -p $(ISOROOT)
rsync -rp $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/ $(ISOROOT)
rsync -rp $(LOCAL_MIRROR_MOS_CENTOS) $(ISOROOT)
rsync -rp $(LOCAL_MIRROR)/extra-repos $(ISOROOT)
rsync -rp $(LOCAL_MIRROR)/centos-packages.changelog $(ISOROOT)
createrepo -g $(ISOROOT)/comps.xml \
-u media://`head -1 $(ISOROOT)/.discinfo` $(ISOROOT)
$(ACTION.TOUCH)
endif
@ -144,26 +146,6 @@ $(BUILD_DIR)/iso/isoroot-files.done: \
$(ISOROOT)/.discinfo: $(SOURCE_DIR)/iso/.discinfo ; $(ACTION.COPY)
$(ISOROOT)/.treeinfo: $(SOURCE_DIR)/iso/.treeinfo ; $(ACTION.COPY)
# It's a callable object.
# Usage: $(call create_ks_repo_entry,repo)
# where:
# repo=repo_name,http://path_to_the_repo,repo_priority
# repo_priority is a number from 1 to 99
define create_ks_repo_entry
repo --name="$(call get_repo_name,$1)" --baseurl=file:///mnt/source/extra-repos/$(call get_repo_name,$1) --cost=$(call get_repo_priority,$1)
endef
$(ISOROOT)/ks.yaml: \
export ks_contents:=$(foreach repo,$(EXTRA_RPM_REPOS),\n$(space)$(call create_ks_repo_entry,$(repo))\n)
$(ISOROOT)/ks.yaml:
@mkdir -p $(@D)
cp $(KSYAML) $@
ifneq ($(strip $(EXTRA_RPM_REPOS)),)
/bin/echo "extra_repos:" >> $@
/bin/echo -e "$${ks_contents}" >> $@
endif
$(ISOROOT)/isolinux/isolinux.cfg: $(SOURCE_DIR)/iso/isolinux/isolinux.cfg ; $(ACTION.COPY)
$(ISOROOT)/isolinux/splash.jpg: $(call depv,FEATURE_GROUPS)
ifeq ($(filter mirantis,$(FEATURE_GROUPS)),mirantis)
@ -171,10 +153,11 @@ $(ISOROOT)/isolinux/splash.jpg: $(SOURCE_DIR)/iso/isolinux/splash.jpg ; $(ACTION
else
$(ISOROOT)/isolinux/splash.jpg: $(SOURCE_DIR)/iso/isolinux/splash_community.jpg ; $(ACTION.COPY)
endif
$(ISOROOT)/ks.cfg: $(SOURCE_DIR)/iso/ks.template $(SOURCE_DIR)/iso/ks.py $(ISOROOT)/ks.yaml
$(ISOROOT)/ks.cfg: $(call depv,KSYAML)
$(ISOROOT)/ks.cfg: $(SOURCE_DIR)/iso/ks.template $(SOURCE_DIR)/iso/ks.py $(KSYAML)
python $(SOURCE_DIR)/iso/ks.py \
-t $(SOURCE_DIR)/iso/ks.template \
-c $(ISOROOT)/ks.yaml \
-c $(KSYAML) \
-u '{"CENTOS_RELEASE": "$(CENTOS_RELEASE)", "PRODUCT_VERSION": "$(PRODUCT_VERSION)"}' \
-o $@.tmp
mv $@.tmp $@

View File

@ -1,30 +0,0 @@
$(BUILD_DIR)/mirror/centos/extra-repos-download.done: $(BUILD_DIR)/mirror/centos/yum-config.done
$(BUILD_DIR)/mirror/centos/extra-repos-download.done:
mkdir -p $(LOCAL_MIRROR)/extra-repos
$(foreach repo,$(EXTRA_RPM_REPOS),$(call extra_repo_download,$(repo));)
$(ACTION.TOUCH)
$(LOCAL_MIRROR)/extra-repos/extra.repo: $(call depv,EXTRA_RPM_REPOS)
$(LOCAL_MIRROR)/extra-repos/extra.repo: \
export fuelnode_repos:=$(foreach repo,$(EXTRA_RPM_REPOS),\n$(call create_fuelnode_repo,$(repo))\n)
$(LOCAL_MIRROR)/extra-repos/extra.repo:
mkdir -p $(@D)
/bin/echo -e "$${fuelnode_repos}" > $@
$(BUILD_DIR)/mirror/centos/extra-repos.done: $(LOCAL_MIRROR)/extra-repos/extra.repo
$(BUILD_DIR)/mirror/centos/extra-repos.done: $(BUILD_DIR)/mirror/centos/extra-repos-download.done
$(BUILD_DIR)/mirror/centos/extra-repos.done:
$(foreach repo,$(EXTRA_RPM_REPOS),$(call extra_repo_metadata,$(repo));)
$(ACTION.TOUCH)
define extra_repo_download
set -ex ; reposync --downloadcomps --plugins --delete --arch=$(CENTOS_ARCH) \
-c $(BUILD_DIR)/mirror/centos/etc/yum.conf --repoid=$(call get_repo_name,$1) \
-p $(LOCAL_MIRROR)/extra-repos/
endef
define extra_repo_metadata
set -ex ; createrepo -g $(LOCAL_MIRROR)/extra-repos/$(call get_repo_name,$1)/comps.xml \
-u media://`head -1 $(SOURCE_DIR)/iso/.discinfo` \
-o $(LOCAL_MIRROR)/extra-repos/$(call get_repo_name,$1)/ $(LOCAL_MIRROR)/extra-repos/$(call get_repo_name,$1)/
endef

View File

@ -1,23 +1,14 @@
# This module downloads required upstream rpm packages and creates rpm repository.
# This module downloads required rpm packages and creates rpm repository.
include $(SOURCE_DIR)/mirror/centos/repo.mk
# This module downloads centos installation images.
include $(SOURCE_DIR)/mirror/centos/boot.mk
# This module downloads MOS rpm repository
include $(SOURCE_DIR)/mirror/centos/mos-repo.mk
# This module downloads extra rpm repositories
include $(SOURCE_DIR)/mirror/centos/extra-repos.mk
$(BUILD_DIR)/mirror/centos/build.done: \
$(BUILD_DIR)/mirror/centos/repo.done \
$(BUILD_DIR)/mirror/centos/boot.done \
$(BUILD_DIR)/mirror/centos/mos-repo.done \
$(BUILD_DIR)/mirror/centos/extra-repos.done
$(BUILD_DIR)/mirror/centos/boot.done
$(ACTION.TOUCH)
mirror-centos: $(BUILD_DIR)/mirror/centos/build.done
repo-centos: $(BUILD_DIR)/mirror/centos/repo.done
repo-mos-centos: $(BUILD_DIR)/mirror/centos/mos-repo.done
extra-repos-centos: $(BUILD_DIR)/mirror/centos/extra-repos.done
.PHONY: mirror-centos repo-centos repo-mos-centos extra-repos-centos
.PHONY: mirror-centos repo-centos

View File

@ -1,13 +0,0 @@
$(BUILD_DIR)/mirror/centos/mos-download.done: $(BUILD_DIR)/mirror/centos/yum-config.done
mkdir -p $(@D)
mkdir -p $(LOCAL_MIRROR_MOS_CENTOS)
set -ex ; reposync --norepopath --downloadcomps --plugins --delete --arch=$(CENTOS_ARCH) \
-c $(BUILD_DIR)/mirror/centos/etc/yum.conf --repoid=fuel -p $(LOCAL_MIRROR_MOS_CENTOS)
$(ACTION.TOUCH)
$(BUILD_DIR)/mirror/centos/mos-repo.done: $(BUILD_DIR)/mirror/centos/mos-download.done
createrepo -g $(LOCAL_MIRROR_MOS_CENTOS)/comps.xml \
-u media://`head -1 $(SOURCE_DIR)/iso/.discinfo` \
-o $(LOCAL_MIRROR_MOS_CENTOS)/ $(LOCAL_MIRROR_MOS_CENTOS)/
$(ACTION.TOUCH)

View File

@ -1,6 +1,6 @@
include $(SOURCE_DIR)/mirror/centos/yum_repos.mk
.PHONY: show-yum-urls-centos show-yum-urls-centos-full show-yum-repos-centos
.PHONY: show-yum-urls-centos show-yum-repos-centos
MIRROR_CENTOS_OS_BASEURL?=$(MIRROR_CENTOS)/os/$(CENTOS_ARCH)
@ -157,15 +157,11 @@ $(BUILD_DIR)/mirror/centos/urls.list: $(BUILD_DIR)/mirror/centos/requirements-rp
# yumdownloader -q prints logs to stdout, filter them out
sed -rne '/\.rpm$$/ {p}' < $@.out > $@.pre
sort -u < $@.pre > $@.tmp
mv $@.tmp $@.full
grep "$(MIRROR_CENTOS)" $@.full > $@
mv $@.tmp $@
show-yum-urls-centos: $(BUILD_DIR)/mirror/centos/urls.list
cat $<
show-yum-urls-centos-full: $(BUILD_DIR)/mirror/centos/urls.list
cat $(BUILD_DIR)/mirror/centos/urls.list.full
show-yum-repos-centos: \
$(BUILD_DIR)/mirror/centos/etc/yum.repos.d/base.repo \
$(BUILD_DIR)/mirror/centos/etc/yum.repos.d/extra.repo
@ -186,6 +182,5 @@ $(BUILD_DIR)/mirror/centos/repo.done: \
$(BUILD_DIR)/mirror/centos/yum.done \
| $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/comps.xml
createrepo -g $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/comps.xml \
-u media://`head -1 $(SOURCE_DIR)/iso/.discinfo` \
-o $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/ $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/
$(ACTION.TOUCH)

View File

@ -107,7 +107,6 @@ baseurl=$(MIRROR_FUEL)
gpgcheck=0
enabled=1
priority=20
exclude=*debuginfo*
endef
# Accept EXTRA_RPM_REPOS in a form of a list of: name,url,priority
@ -128,15 +127,4 @@ baseurl = $(call get_repo_url,$1)
gpgcheck = 0
enabled = 1
priority = $(call get_repo_priority,$1)
exclude=*debuginfo*
endef
define create_fuelnode_repo
[$(call get_repo_name,$1)]
name = Repo "$(call get_repo_name,$1)"
baseurl = file:///var/www/nailgun/extra-repos/$(call get_repo_name,$1)
gpgcheck = 0
enabled = 1
priority = $(call get_repo_priority,$1)
endef

View File

@ -16,8 +16,7 @@ $(BUILD_DIR)/packages/rpm/buildd.tar.gz: SANDBOX_PACKAGES:=rpm-build tar yum yum
$(BUILD_DIR)/packages/rpm/buildd.tar.gz: SANDBOX:=$(BUILD_DIR)/packages/rpm/SANDBOX/buildd
$(BUILD_DIR)/packages/rpm/buildd.tar.gz: export SANDBOX_UP:=$(SANDBOX_UP)
$(BUILD_DIR)/packages/rpm/buildd.tar.gz: export SANDBOX_DOWN:=$(SANDBOX_DOWN)
$(BUILD_DIR)/packages/rpm/buildd.tar.gz: $(BUILD_DIR)/mirror/centos/repo.done \
$(BUILD_DIR)/mirror/centos/mos-repo.done
$(BUILD_DIR)/packages/rpm/buildd.tar.gz: $(BUILD_DIR)/mirror/centos/repo.done
sh -c "$${SANDBOX_UP}"
sh -c "$${SANDBOX_DOWN}"
sudo tar czf $@.tmp -C $(SANDBOX) .
@ -72,8 +71,8 @@ $(BUILD_DIR)/packages/rpm/$1-repocleanup.done: $(BUILD_DIR)/packages/source_$1.d
else
$(BUILD_DIR)/packages/rpm/$1-repocleanup.done: SPECFILE:=$(SOURCE_DIR)/packages/rpm/specs/$1.spec
endif
$(BUILD_DIR)/packages/rpm/$1-repocleanup.done: $(BUILD_DIR)/mirror/centos/mos-repo.done
python $(SOURCE_DIR)/packages/rpm/genpkgnames.py $$(SPECFILE) | xargs -I{} sudo find $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)/Packages -regex '.*/{}-[^-]+-[^-]+' -delete
$(BUILD_DIR)/packages/rpm/$1-repocleanup.done: $(BUILD_DIR)/mirror/centos/repo.done
python $(SOURCE_DIR)/packages/rpm/genpkgnames.py $$(SPECFILE) | xargs -I{} sudo find $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/Packages -regex '.*/{}-[^-]+-[^-]+' -delete
$$(ACTION.TOUCH)
endef
@ -96,10 +95,9 @@ $(eval $(foreach pkg,$(packages_list),$(call build_rpm,$(pkg))$(NEWLINE)))
$(BUILD_DIR)/packages/rpm/repo.done: $(BUILD_DIR)/bootstrap/fuel-bootstrap-image-builder-rpm.done
$(BUILD_DIR)/packages/rpm/repo.done:
find $(BUILD_DIR)/packages/rpm/RPMS -name '*.rpm' -exec cp -u {} $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)/Packages \;
createrepo -g $(LOCAL_MIRROR_MOS_CENTOS)/comps.xml \
-u media://`head -1 $(SOURCE_DIR)/iso/.discinfo` \
-o $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL) $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)
find $(BUILD_DIR)/packages/rpm/RPMS -name '*.rpm' -exec cp -u {} $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/Packages \;
createrepo -g $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/comps.xml \
-o $(LOCAL_MIRROR_CENTOS_OS_BASEURL) $(LOCAL_MIRROR_CENTOS_OS_BASEURL)
$(ACTION.TOUCH)
$(BUILD_DIR)/packages/rpm/fuel-docker-images.done: SANDBOX:=$(BUILD_DIR)/packages/rpm/SANDBOX/fuel-docker-images
@ -111,7 +109,7 @@ $(BUILD_DIR)/packages/rpm/fuel-docker-images.done: \
$(BUILD_DIR)/packages/rpm/buildd.tar.gz \
$(BUILD_DIR)/packages/rpm/repo-late.done \
$(BUILD_DIR)/docker/build.done
python $(SOURCE_DIR)/packages/rpm/genpkgnames.py $(SPECFILE) | xargs -I{} sudo find $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)/Packages -regex '.*/{}-[^-]+-[^-]+' -delete
python $(SOURCE_DIR)/packages/rpm/genpkgnames.py $(SPECFILE) | xargs -I{} sudo find $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/Packages -regex '.*/{}-[^-]+-[^-]+' -delete
mkdir -p $(BUILD_DIR)/packages/rpm/RPMS/x86_64
mkdir -p $(SANDBOX) && \
sudo tar xzf $(BUILD_DIR)/packages/rpm/buildd.tar.gz -C $(SANDBOX) && \
@ -121,10 +119,9 @@ $(BUILD_DIR)/packages/rpm/fuel-docker-images.done: \
sudo cp $(SPECFILE) $(SANDBOX)/tmp && \
sudo chroot $(SANDBOX) rpmbuild --nodeps --define "_topdir /tmp" -ba /tmp/fuel-docker-images.spec
cp $(SANDBOX)/tmp/RPMS/*/fuel-docker-images-*.rpm $(BUILD_DIR)/packages/rpm/RPMS/x86_64
find $(BUILD_DIR)/packages/rpm/RPMS -name '*.rpm' | xargs cp -u --target-directory=$(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)/Packages
createrepo -g $(LOCAL_MIRROR_MOS_CENTOS)/comps.xml \
-u media://`head -1 $(SOURCE_DIR)/iso/.discinfo` \
-o $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL) $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)
find $(BUILD_DIR)/packages/rpm/RPMS -name '*.rpm' | xargs cp -u --target-directory=$(LOCAL_MIRROR_CENTOS_OS_BASEURL)/Packages
createrepo -g $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/comps.xml \
-o $(LOCAL_MIRROR_CENTOS_OS_BASEURL) $(LOCAL_MIRROR_CENTOS_OS_BASEURL)
$(ACTION.TOUCH)
# in case BUILD_PACKAGES=0 we have to build only fuel-bootstrap-image-builder
@ -133,9 +130,9 @@ $(BUILD_DIR)/packages/rpm/build.done: $(BUILD_DIR)/packages/rpm/repo.done
else
$(BUILD_DIR)/packages/rpm/build.done: $(BUILD_DIR)/bootstrap/fuel-bootstrap-image-builder-rpm.done \
$(BUILD_DIR)/mirror/centos/repo.done
find $(BUILD_DIR)/packages/rpm/RPMS -name '*.rpm' -exec cp -u {} $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)/Packages \;
createrepo -g $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)/comps.xml \
-o $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL) $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)
find $(BUILD_DIR)/packages/rpm/RPMS -name '*.rpm' -exec cp -u {} $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/Packages \;
createrepo -g $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/comps.xml \
-o $(LOCAL_MIRROR_CENTOS_OS_BASEURL) $(LOCAL_MIRROR_CENTOS_OS_BASEURL)
endif
$(ACTION.TOUCH)
@ -165,10 +162,9 @@ $(BUILD_DIR)/packages/rpm/repo-late.done: $(BUILD_DIR)/mirror/centos/repo.done
ifeq (1,$(strip $(BUILD_PACKAGES)))
$(BUILD_DIR)/packages/rpm/repo-late.done: $(BUILD_DIR)/packages/rpm/repo.done
endif
find $(BUILD_DIR)/packages/rpm/RPMS -name '*.rpm' -exec cp -u --target-directory $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)/Packages {} +
createrepo -g $(LOCAL_MIRROR_MOS_CENTOS)/comps.xml \
-u media://`head -1 $(SOURCE_DIR)/iso/.discinfo` \
-o $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL) $(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)
find $(BUILD_DIR)/packages/rpm/RPMS -name '*.rpm' -exec cp -u --target-directory $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/Packages {} +
createrepo -g $(LOCAL_MIRROR_CENTOS_OS_BASEURL)/comps.xml \
-o $(LOCAL_MIRROR_CENTOS_OS_BASEURL) $(LOCAL_MIRROR_CENTOS_OS_BASEURL)
$(ACTION.TOUCH)
$(BUILD_DIR)/packages/rpm/build-late.done: $(BUILD_DIR)/packages/rpm/repo-late.done

View File

@ -1,17 +1,9 @@
.PHONY: show-ubuntu-sandbox-repos show-centos-sandbox-repos
define yum_local_repo
[upstream-local-mirror]
name=Local upstream mirror
baseurl=file://$(LOCAL_MIRROR_CENTOS_OS_BASEURL)
gpgcheck=0
enabled=1
priority=10
endef
define yum_local_mos_repo
[mos-local-mirror]
[mirror]
name=Mirantis mirror
baseurl=file://$(LOCAL_MIRROR_MOS_CENTOS_OS_BASEURL)
baseurl=file://$(LOCAL_MIRROR_CENTOS_OS_BASEURL)
gpgcheck=0
enabled=1
priority=10
@ -66,7 +58,6 @@ cat > $(SANDBOX)/etc/yum.repos.d/base.repo <<EOF
$(yum_upstream_repo)
$(yum_epel_repo)
$(yum_local_repo)
$(yum_local_mos_repo)
EOF
mkdir -p $(SANDBOX)/etc/yum/pluginconf.d/
mkdir -p $(SANDBOX)/etc/yum-plugins/
@ -201,10 +192,8 @@ show-centos-sandbox-repos: export sandbox_yum_conf_content:=$(sandbox_yum_conf)
show-centos-sandbox-repos: export yum_upstream_repo_content:=$(yum_upstream_repo)
show-centos-sandbox-repos: export yum_epel_repo_content:=$(yum_epel_repo)
show-centos-sandbox-repos: export yum_local_repo_content:=$(yum_local_repo)
show-centos-sandbox-repos: export yum_local_mos_repo_content:=$(yum_local_mos_repo)
show-centos-sandbox-repos:
/bin/echo -e "$${sandbox_yum_conf_content}\n"
/bin/echo -e "$${yum_upstream_repo_content}\n"
/bin/echo -e "$${yum_epel_repo_content}\n"
/bin/echo -e "$${yum_local_repo_content}\n"
/bin/echo -e "$${yum_local_mos_repo_content}\n"