Ubuntu package repositories added to Fuel ISO
[genesis.git] / fuel / build / f_isoroot / f_repobuild / Makefile
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 # stefan.k.berg@ericsson.com
4 # jonas.bjurel@ericsson.com
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 TOP := $(shell pwd)
12 DOCKNAME = fuelrepo
13 DOCKVERSION = 1.0
14
15 .PHONY: all
16 all: .nailgun
17
18 .fuel-createmirror:
19         sudo apt-get install -y rsync python dpkg-dev fakeroot openssl
20         sudo ln -s `pwd` /var/www
21         sudo mkdir /var/log/mirror-sync
22         sudo chmod 777 /var/log/mirror-sync
23         rm -rf tmpiso tmpdir
24         mkdir tmpiso
25         fuseiso ${ISOCACHE} tmpiso
26         cp tmpiso/ubuntu/pool/main/f/fuel-createmirror/fuel-createmirror_6.1*.deb .
27         fusermount -u tmpiso
28         rm -rf tmpiso
29         sudo dpkg -i fuel-createmirror_6.1*.deb
30         sudo sed -i 's/DOCKER_MODE=true/DOCKER_MODE=false/' /etc/fuel-createmirror/common.cfg
31         touch .fuel-createmirror
32
33
34 .PHONY: clean
35 clean:
36         # Deliberately not cleaning nailgun directory to speed up multiple builds
37         @rm -rf ../release/opnfv/nailgun fuel-createmirror_6.1*.deb
38
39 .PHONY: release
40 release:.nailgun
41         @rm -Rf ../release/opnfv/nailgun
42         @mkdir -p ../release/opnfv
43         @cp -Rp nailgun ../release/opnfv/nailgun
44
45 .nailgun: .fuel-createmirror
46         rm -Rf nailgun
47         fakeroot /opt/fuel-createmirror-6.1/fuel-createmirror
48         # Bug fix for https://bugs.launchpad.net/fuel/+bug/1476593
49         find nailgun/mos-ubuntu -type d -exec chmod 755 {} \;
50         touch .nailgun