aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fuel-main
diff options
context:
space:
mode:
authorFlorin Dumitrascu <florin.dumitrascu@enea.com>2016-03-13 18:49:38 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2016-05-02 13:23:19 +0000
commit430ca5fb3be140238665d19124b861e5226fddaa (patch)
tree79ec69ccb6f19278ac7f0d025fdab9e0f2cbe57b /patches/fuel-main
parent1732427ab05ed1301bf9d53fcf47128f44d04811 (diff)
Initial code commit
This brings initial code base for Armband project that allows building an OPNFV Fuel 8 iso based on Brahmaputra components to be deployed on arm64 servers. Signed-off-by: Stanislaw Kardach <kda@semihalf.com> Signed-off-by: Alexandru Avadanii <alexandru.avadanii@enea.com> Signed-off-by: Florin Dumitrascu <florin.dumitrascu@enea.com> JIRA:FUEL-39 (cherry picked from commit c715e7bb460f499f4fd20f7ab000d7a6d670636a) Change-Id: Ic4ed6e6dfbe396d4c8c40357848aae0e158397da
Diffstat (limited to 'patches/fuel-main')
-rw-r--r--patches/fuel-main/0001-Use-qemu-debootstrap-to-support-multi-arch.patch53
-rw-r--r--patches/fuel-main/0002-Allow-multi-arch-debian-mirrors.patch45
-rw-r--r--patches/fuel-main/0003-Follow-redirects.patch24
-rw-r--r--patches/fuel-main/0004-Add-apt-https-support-package-to-sandbox.patch24
-rw-r--r--patches/fuel-main/0005-Make-cpio-accept-symlinks.patch30
-rw-r--r--patches/fuel-main/0006-Add-cobbler-grub-aarch64-RPM-reinstall-to-start.sh.patch42
6 files changed, 218 insertions, 0 deletions
diff --git a/patches/fuel-main/0001-Use-qemu-debootstrap-to-support-multi-arch.patch b/patches/fuel-main/0001-Use-qemu-debootstrap-to-support-multi-arch.patch
new file mode 100644
index 00000000..8b5e38d7
--- /dev/null
+++ b/patches/fuel-main/0001-Use-qemu-debootstrap-to-support-multi-arch.patch
@@ -0,0 +1,53 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Thu, 25 Feb 2016 13:31:19 +0100
+Subject: [PATCH] Use qemu-debootstrap to support multi-arch
+
+---
+ prepare-build-env.sh | 2 +-
+ requirements-rpm.txt | 1 +
+ sandbox.mk | 4 ++--
+ 3 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/prepare-build-env.sh b/prepare-build-env.sh
+index 194e528..fa186ed 100755
+--- a/prepare-build-env.sh
++++ b/prepare-build-env.sh
+@@ -112,7 +112,7 @@ sudo apt-get -y install build-essential make git $GEMPKG debootstrap createrepo
+ python-nose libvirt-bin python-ipaddr python-paramiko python-yaml \
+ python-pip kpartx extlinux unzip genisoimage syslinux debmirror \
+ lrzip python-daemon python-dev libparse-debcontrol-perl reprepro devscripts \
+- xorriso
++ xorriso qemu-user-static
+ sudo gem install bundler -v 1.2.1
+ sudo gem install builder
+ sudo pip install xmlbuilder jinja2 pbr
+diff --git a/requirements-rpm.txt b/requirements-rpm.txt
+index e0aa9ba..9a2d141 100644
+--- a/requirements-rpm.txt
++++ b/requirements-rpm.txt
+@@ -202,6 +202,7 @@ python-yaql
+ pytz
+ PyYAML
+ qemu-img
++qemu-user-static
+ rabbitmq-server
+ rpm
+ rpm-build
+diff --git a/sandbox.mk b/sandbox.mk
+index 3c65cc6..cf3704b 100644
+--- a/sandbox.mk
++++ b/sandbox.mk
+@@ -182,8 +182,8 @@ mkdir -p $(SANDBOX_UBUNTU)/etc/init.d
+ touch $(SANDBOX_UBUNTU)/etc/init.d/.legacy-bootordering
+ mkdir -p $(SANDBOX_UBUNTU)/usr/sbin
+ cp -a $(BUILD_DIR)/policy-rc.d $(SANDBOX_UBUNTU)/usr/sbin
+-echo "Running debootstrap"
+-sudo debootstrap --no-check-gpg --include=ca-certificates --arch=$(UBUNTU_ARCH) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
++echo "Running qemu-debootstrap"
++sudo qemu-debootstrap --no-check-gpg --include=ca-certificates --arch=$(UBUNTU_ARCH) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
+ if [ -e $(SANDBOX_UBUNTU)/etc/resolv.conf ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf.orig; fi
+ sudo cp /etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf
+ if [ -e $(SANDBOX_UBUNTU)/etc/hosts ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/hosts $(SANDBOX_UBUNTU)/etc/hosts.orig; fi
+--
+1.9.1
+
diff --git a/patches/fuel-main/0002-Allow-multi-arch-debian-mirrors.patch b/patches/fuel-main/0002-Allow-multi-arch-debian-mirrors.patch
new file mode 100644
index 00000000..d95abcac
--- /dev/null
+++ b/patches/fuel-main/0002-Allow-multi-arch-debian-mirrors.patch
@@ -0,0 +1,45 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Thu, 25 Feb 2016 23:58:58 +0100
+Subject: [PATCH] Allow multi-arch debian mirrors
+
+This patch allows specifying multiple architectures via UBUNTU_ARCH in
+form of a list of space separated architectures. The first architecture
+in the list is considered primary and will be used for building all the
+deb packages by fuel-main. Additional architectures are added to allow
+targets of other architectures to use the mirror.
+NOTE: this imposes a requirement that all packages built are arch
+independent (which is true so far).
+---
+ mirror/ubuntu/module.mk | 2 +-
+ sandbox.mk | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mirror/ubuntu/module.mk b/mirror/ubuntu/module.mk
+index 7a9466e..fe1ada2 100644
+--- a/mirror/ubuntu/module.mk
++++ b/mirror/ubuntu/module.mk
+@@ -81,7 +81,7 @@ $(BUILD_DIR)/mirror/ubuntu/mirror.done:
+ --root=$(MIRROR_MOS_UBUNTU_ROOT) \
+ --dist=$(MIRROR_MOS_UBUNTU_SUITE) \
+ --section=$(subst $(space),$(comma),$(MIRROR_MOS_UBUNTU_SECTION)) \
+- --arch=$(UBUNTU_ARCH) \
++ --arch=$(shell echo $(UBUNTU_ARCH) | tr ' ' ',') \
+ $(LOCAL_MIRROR_UBUNTU)/
+ rm -rf $(LOCAL_MIRROR_UBUNTU)/.temp $(LOCAL_MIRROR_UBUNTU)/project
+ $(ACTION.TOUCH)
+diff --git a/sandbox.mk b/sandbox.mk
+index cf3704b..18757a1 100644
+--- a/sandbox.mk
++++ b/sandbox.mk
+@@ -183,7 +183,7 @@ touch $(SANDBOX_UBUNTU)/etc/init.d/.legacy-bootordering
+ mkdir -p $(SANDBOX_UBUNTU)/usr/sbin
+ cp -a $(BUILD_DIR)/policy-rc.d $(SANDBOX_UBUNTU)/usr/sbin
+ echo "Running qemu-debootstrap"
+-sudo qemu-debootstrap --no-check-gpg --include=ca-certificates --arch=$(UBUNTU_ARCH) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
++sudo qemu-debootstrap --no-check-gpg --include=ca-certificates --arch=$(word 1,$(UBUNTU_ARCH)) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
+ if [ -e $(SANDBOX_UBUNTU)/etc/resolv.conf ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf.orig; fi
+ sudo cp /etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf
+ if [ -e $(SANDBOX_UBUNTU)/etc/hosts ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/hosts $(SANDBOX_UBUNTU)/etc/hosts.orig; fi
+--
+1.9.1
+
diff --git a/patches/fuel-main/0003-Follow-redirects.patch b/patches/fuel-main/0003-Follow-redirects.patch
new file mode 100644
index 00000000..3d1d1b8b
--- /dev/null
+++ b/patches/fuel-main/0003-Follow-redirects.patch
@@ -0,0 +1,24 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Tue, 1 Mar 2016 09:35:24 +0100
+Subject: [PATCH] Follow redirects
+
+---
+ config.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config.mk b/config.mk
+index ae4766b..2a99278 100644
+--- a/config.mk
++++ b/config.mk
+@@ -271,7 +271,7 @@ USE_PREDEFINED_FUEL_LIB_PUPPET_MODULES?=
+
+ # If the URL given ended with target.txt then is't a pointer to a snapshot that
+ # should be unlinked. If it is not - return it as is.
+-expand_repo_url=$(shell url=$1; echo $${url} | grep -q -e '.*\.target\.txt$$' && echo "$${url%/*}/$$(curl -sSf $$url | head -1)/x86_64/" || echo $${url})
++expand_repo_url=$(shell url=$1; echo $${url} | grep -q -e '.*\.target\.txt$$' && echo "$${url%/*}/$$(curl -sSfL $$url | head -1)/x86_64/" || echo $${url})
+
+ # Expand repo URLs now
+ #MIRROR_CENTOS:=$(call expand_repo_url,$(MIRROR_CENTOS))
+--
+1.9.1
+
diff --git a/patches/fuel-main/0004-Add-apt-https-support-package-to-sandbox.patch b/patches/fuel-main/0004-Add-apt-https-support-package-to-sandbox.patch
new file mode 100644
index 00000000..da08ff80
--- /dev/null
+++ b/patches/fuel-main/0004-Add-apt-https-support-package-to-sandbox.patch
@@ -0,0 +1,24 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Tue, 1 Mar 2016 11:06:32 +0100
+Subject: [PATCH] Add apt https support package to sandbox
+
+---
+ sandbox.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sandbox.mk b/sandbox.mk
+index 18757a1..c450d19 100644
+--- a/sandbox.mk
++++ b/sandbox.mk
+@@ -183,7 +183,7 @@ touch $(SANDBOX_UBUNTU)/etc/init.d/.legacy-bootordering
+ mkdir -p $(SANDBOX_UBUNTU)/usr/sbin
+ cp -a $(BUILD_DIR)/policy-rc.d $(SANDBOX_UBUNTU)/usr/sbin
+ echo "Running qemu-debootstrap"
+-sudo qemu-debootstrap --no-check-gpg --include=ca-certificates --arch=$(word 1,$(UBUNTU_ARCH)) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
++sudo qemu-debootstrap --no-check-gpg --include=ca-certificates,apt-transport-https --arch=$(word 1,$(UBUNTU_ARCH)) $(MIRROR_UBUNTU_SUITE) $(SANDBOX_UBUNTU) $(MIRROR_UBUNTU_METHOD)://$(MIRROR_UBUNTU)$(MIRROR_UBUNTU_ROOT)
+ if [ -e $(SANDBOX_UBUNTU)/etc/resolv.conf ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf.orig; fi
+ sudo cp /etc/resolv.conf $(SANDBOX_UBUNTU)/etc/resolv.conf
+ if [ -e $(SANDBOX_UBUNTU)/etc/hosts ]; then sudo cp -a $(SANDBOX_UBUNTU)/etc/hosts $(SANDBOX_UBUNTU)/etc/hosts.orig; fi
+--
+1.9.1
+
diff --git a/patches/fuel-main/0005-Make-cpio-accept-symlinks.patch b/patches/fuel-main/0005-Make-cpio-accept-symlinks.patch
new file mode 100644
index 00000000..269eb907
--- /dev/null
+++ b/patches/fuel-main/0005-Make-cpio-accept-symlinks.patch
@@ -0,0 +1,30 @@
+From: Stanislaw Kardach <stanislaw.kardach@caviumnetworks.com>
+Date: Wed, 2 Mar 2016 10:04:32 +0100
+Subject: [PATCH] Make cpio accept symlinks
+
+---
+ bootstrap/module.mk | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/bootstrap/module.mk b/bootstrap/module.mk
+index cb09691..3f28172 100644
+--- a/bootstrap/module.mk
++++ b/bootstrap/module.mk
+@@ -230,11 +230,11 @@ $(BUILD_DIR)/bootstrap/prepare-initram-root.done: \
+
+ # Installing kernel modules
+ find $(LOCAL_MIRROR_CENTOS_OS_BASEURL) -name '$(KERNEL_PATTERN)' | xargs rpm2cpio | \
+- ( cd $(INITRAMROOT); sudo cpio -idm './lib/modules/*' './boot/vmlinuz*' )
++ ( cd $(INITRAMROOT); sudo cpio --extract-over-symlinks -idm './lib/modules/*' './boot/vmlinuz*' )
+ find $(LOCAL_MIRROR_CENTOS_OS_BASEURL) -name '$(KERNEL_FIRMWARE_PATTERN)' | xargs rpm2cpio | \
+- ( cd $(INITRAMROOT); sudo cpio -idm './lib/firmware/*' )
++ ( cd $(INITRAMROOT); sudo cpio --extract-over-symlinks -idm './lib/firmware/*' )
+ find $(LOCAL_MIRROR_CENTOS_OS_BASEURL) -name 'libmlx4*' | xargs rpm2cpio | \
+- ( cd $(INITRAMROOT); sudo cpio -idm './etc/*' './usr/lib64/*' )
++ ( cd $(INITRAMROOT); sudo cpio --extract-over-symlinks -idm './etc/*' './usr/lib64/*' )
+ for version in `ls -1 $(INITRAMROOT)/lib/modules`; do \
+ sudo depmod -b $(INITRAMROOT) $$version; \
+ done
+--
+1.9.1
+
diff --git a/patches/fuel-main/0006-Add-cobbler-grub-aarch64-RPM-reinstall-to-start.sh.patch b/patches/fuel-main/0006-Add-cobbler-grub-aarch64-RPM-reinstall-to-start.sh.patch
new file mode 100644
index 00000000..0fafba2f
--- /dev/null
+++ b/patches/fuel-main/0006-Add-cobbler-grub-aarch64-RPM-reinstall-to-start.sh.patch
@@ -0,0 +1,42 @@
+From: Florin Dumitrascu <florin.dumitrascu@enea.com>
+Date: Fri, 4 Mar 2016 17:19:41 +0100
+Subject: [PATCH] Add cobbler-grub-aarch64 RPM reinstall to start.sh
+
+Because /var/lib/cobbler is mounted as a volume, new cobbler aarch64
+grub loader packaged as an RPM (cobbler-grub-aarch64) should be
+reinstalled if its files are missing on Docker container start.
+---
+ docker/cobbler/setup.sh | 2 +-
+ docker/cobbler/start.sh | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/docker/cobbler/setup.sh b/docker/cobbler/setup.sh
+index a7fce0c..90627a8 100644
+--- a/docker/cobbler/setup.sh
++++ b/docker/cobbler/setup.sh
+@@ -31,7 +31,7 @@ yum update -y
+
+ ln -s /etc/dnsmasq.conf /etc/cobbler.dnsmasq.conf
+
+-packages="httpd cobbler dnsmasq xinetd tftp-server"
++packages="httpd cobbler cobbler-grub-aarch64 dnsmasq xinetd tftp-server"
+ echo $packages | xargs -n1 yum install -y
+
+
+diff --git a/docker/cobbler/start.sh b/docker/cobbler/start.sh
+index 3c5d411..c1a359b 100644
+--- a/docker/cobbler/start.sh
++++ b/docker/cobbler/start.sh
+@@ -18,6 +18,9 @@ fi
+ if rpm -V cobbler-web | grep -q missing; then
+ yum reinstall -q -y cobbler-web
+ fi
++if rpm -V cobbler-grub-aarch64 | grep -q missing; then
++ yum reinstall -q -y cobbler-grub-aarch64
++fi
+
+
+ # Run puppet to apply custom config
+--
+1.9.1
+