From 5717fd6fc966bd771f339fade27d5cffc6b9e5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrew=20Lee=20=28=E6=9D=8E=E5=81=A5=E7=A7=8B=29?= <ajqlee@debian.org> Date: Sat, 20 Aug 2016 05:48:35 +0800 Subject: [PATCH] Imported Upstream version 2.7.1 --- .../backend/source/kde4/kdelibs/.directory | 5 +++ src/api/tmp/cache/.gitignore | 2 + src/api/tmp/pids/.gitignore | 1 + src/api/tmp/sessions/.gitignore | 1 + src/api/tmp/sockets/.gitignore | 1 + src/backend/Makefile | 41 +++++++++++++++++++ 6 files changed, 51 insertions(+) create mode 100644 src/api/test/fixtures/backend/source/kde4/kdelibs/.directory create mode 100644 src/api/tmp/cache/.gitignore create mode 100644 src/api/tmp/pids/.gitignore create mode 100644 src/api/tmp/sessions/.gitignore create mode 100644 src/api/tmp/sockets/.gitignore create mode 100644 src/backend/Makefile diff --git a/src/api/test/fixtures/backend/source/kde4/kdelibs/.directory b/src/api/test/fixtures/backend/source/kde4/kdelibs/.directory new file mode 100644 index 0000000000..f145dbf812 --- /dev/null +++ b/src/api/test/fixtures/backend/source/kde4/kdelibs/.directory @@ -0,0 +1,5 @@ +<directory> + <entry name="test.txt"/> + <entry name="file2"/> + <entry name="file3"/> +</directory> diff --git a/src/api/tmp/cache/.gitignore b/src/api/tmp/cache/.gitignore new file mode 100644 index 0000000000..3192a3b710 --- /dev/null +++ b/src/api/tmp/cache/.gitignore @@ -0,0 +1,2 @@ +# This file is needed to keep the directory +* diff --git a/src/api/tmp/pids/.gitignore b/src/api/tmp/pids/.gitignore new file mode 100644 index 0000000000..276ad58c3d --- /dev/null +++ b/src/api/tmp/pids/.gitignore @@ -0,0 +1 @@ +# This file is needed to keep the directory diff --git a/src/api/tmp/sessions/.gitignore b/src/api/tmp/sessions/.gitignore new file mode 100644 index 0000000000..276ad58c3d --- /dev/null +++ b/src/api/tmp/sessions/.gitignore @@ -0,0 +1 @@ +# This file is needed to keep the directory diff --git a/src/api/tmp/sockets/.gitignore b/src/api/tmp/sockets/.gitignore new file mode 100644 index 0000000000..276ad58c3d --- /dev/null +++ b/src/api/tmp/sockets/.gitignore @@ -0,0 +1 @@ +# This file is needed to keep the directory diff --git a/src/backend/Makefile b/src/backend/Makefile new file mode 100644 index 0000000000..16451f8d74 --- /dev/null +++ b/src/backend/Makefile @@ -0,0 +1,41 @@ +include ../../Makefile.include + +OBS_BACKEND_DATA_SUBDIRS := build events info jobs log projects repos run sources trees workers +OBS_BACKEND_DATA_DIR := /srv/obs + +prepare_dirs: + $(INSTALL) -d -m 755 $(DESTDIR)$(OBS_BACKEND_PREFIX) + $(INSTALL) -d -m 755 $(DESTDIR)$(OBS_BACKEND_DATA_DIR) + +bs_config: + [ -f ./BSConfig.pm ] || cp ./BSConfig.pm.template ./BSConfig.pm + + +install: prepare_dirs install_data_dirs bs_config + # prevent error while copy if there is an previous installation + rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/build + cp -a ./* $(DESTDIR)$(OBS_BACKEND_PREFIX) + rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/Makefile + rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/t + rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/testdata + rm -rf $(DESTDIR)$(OBS_BACKEND_PREFIX)/examples + # just for check section, it is a %%ghost + ln -sf /usr/lib/build $(DESTDIR)$(OBS_BACKEND_PREFIX)/build + +install_data_dirs: prepare_dirs + $(foreach data_dir,$(OBS_BACKEND_DATA_SUBDIRS), \ + $(shell $(INSTALL) -d -m 755 $(DESTDIR)$(OBS_BACKEND_DATA_DIR)/$(data_dir) ) \ + ) + + +test_unit: bs_config clean_cover + rm -rf t/tmp/* + PERL5OPT=-MDevel::Cover LANG=C prove -Ibuild -I. -v t/*.t + +cover: test_unit + cover -ignore_re '^((build|XML|t)/|/usr/bin/prove$$)' -outputdir /srv/www/htdocs + +clean_cover: + rm -rf cover_db/ + +.PHONY: test_unit cover -- GitLab