diff --git a/.gitmodules b/.gitmodules index 2383a3c1..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "probert"] - path = probert - url = git@github.com:CanonicalLtd/probert.git diff --git a/Makefile b/Makefile index 51b57cc0..ffa56d09 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,10 @@ BOOTLOADER=grub2 OFFLINE=-o INSTALLIMG=ubuntu-server-${STREAM}-${RELEASE}-${ARCH}-installer.img INSTALLER_RESOURCES += $(shell find installer/resources -type f) -GITDEBDIR=/tmp/subiquity-deb +PROBERTDIR=./probert +PROBERT_REPO=https://github.com/CanonicalLtd/probert.git +PROBERT_REVNO=cf19028b1061a2b8fe2662a45669243d26324f65 +GITDEBDIR=./debian.git DEBDIR=./debian ifneq (,$(MACHINE)) @@ -26,7 +29,7 @@ endif all: dryrun -$(NAME)_$(VERSION).orig.tar.gz: clean +$(NAME)_$(VERSION).orig.tar.gz: probert clean cd .. && tar czf $(NAME)_$(VERSION).orig.tar.gz $(shell basename `pwd`) --exclude-vcs --exclude=debian --exclude='.tox*' tarball: $(NAME)_$(VERSION).orig.tar.gz @@ -34,7 +37,7 @@ tarball: $(NAME)_$(VERSION).orig.tar.gz install_deps: sudo apt-get install python3-urwid python3-pyudev python3-netifaces python3-nose python3-flake8 python3-yaml git bzr ubuntu-cloudimage-keyring python3-jinja2 python3-coverage -dryrun: +dryrun: probert $(MAKE) ui-view DRYRUN="--dry-run" ui-view: @@ -52,7 +55,7 @@ unit: echo "Running unit tests..." python3 -m "nose" -v --nologcapture --with-coverage ${TOPDIR}/tests/ -installer/$(INSTALLIMG): installer/geninstaller installer/runinstaller $(INSTALLER_RESOURCES) +installer/$(INSTALLIMG): installer/geninstaller installer/runinstaller $(INSTALLER_RESOURCES) probert (cd installer && ./geninstaller -v $(OFFLINE) -r $(RELEASE) -a $(ARCH) -s $(STREAM) -b $(BOOTLOADER)) echo $(INSTALLER_RESOURCES) @@ -61,29 +64,37 @@ installer: installer/$(INSTALLIMG) run: installer (cd installer && INSTALLER=$(INSTALLIMG) ./runinstaller) +probert: + @if [ ! -d "$(PROBERTDIR)" ]; then \ + git clone -q $(PROBERT_REPO) $(PROBERTDIR); \ + (cd probert && git checkout -f $(PROBERT_REVNO)); \ + fi + git-checkout-deb: - @if [ ! -d "$(GITDEBDIR)" ]; then \ + @if [ ! -d "$(DEBDIR)" ]; then \ git clone -q https://github.com/CanonicalLtd/subiquity-deb.git $(GITDEBDIR); \ - fi - @if [ ! -h "$(DEBDIR)" ]; then \ - ln -sf $(GITDEBDIR)/debian $(DEBDIR); \ - fi + mv $(GITDEBDIR)/debian $(DEBDIR); \ + rm -fr $(GITDEBDIR); \ + fi + DPKGBUILDARGS = -us -uc -i'.git.*|.tox|.bzr.*|.editorconfig|.travis-yaml' deb-src: git-checkout-deb clean tarball @dpkg-buildpackage -S -sa $(DPKGBUILDARGS) -deb-release: git-checkout-deb +deb-release: git-checkout-deb tarball @dpkg-buildpackage -S -sd $(DPKGBUILDARGS) deb: git-checkout-deb @dpkg-buildpackage -b $(DPKGBUILDARGS) clean: - @-debian/rules clean - @rm -rf debian/subiquity - @rm -rf ../$(NAME)_*.deb ../$(NAME)_*.tar.gz ../$(NAME)_$.dsc ../$(NAME)_*.changes \ - ../$(NAME)_*.build ../$(NAME)_*.upload - wrap-and-sort + @if [ -d "$(DEBDIR)" ]; then \ + ./debian/rules clean; \ + rm -rf debian/subiquity; \ + rm -rf ../$(NAME)_*.deb ../$(NAME)_*.tar.gz ../$(NAME)_$.dsc ../$(NAME)_*.changes \ + ../$(NAME)_*.build ../$(NAME)_*.upload; \ + wrap-and-sort; \ + fi rm -f installer/target.img rm -f installer/installer.img rm -f installer/geninstaller.log diff --git a/probert b/probert deleted file mode 160000 index f98791fe..00000000 --- a/probert +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f98791fe735866c2e1d244dc12849d880b323bfd