Skip to content

Commit

Permalink
Merge branch 'LiXi-storage:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
freyshen authored Oct 11, 2023
2 parents 1237c2a + 3740eda commit fb3b4d2
Show file tree
Hide file tree
Showing 32 changed files with 3,509 additions and 1,433 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ stamp-h1
*.checked
*.pyc
*.c_checked
*.h_checked
*.o

#
Expand Down
77 changes: 64 additions & 13 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
SUBDIRS = pybuild
SUBDIRS += barreleye pycheck bash_completion .
DIST_SUBDIRS = pybuild

if ENABLE_BARRELE
SUBDIRS += barreleye
endif #ENABLE_BARRELE
SUBDIRS += pycheck bash_completion .
DIST_SUBDIRS += barreleye pycheck bash_completion .


build_dir = `pwd`/build
rpmbuild_opt =
Expand All @@ -23,7 +30,7 @@ EXTRA_DIST = \
coral.spec \
detect-distro.sh \
doc \
example_configs/barreleye.toml \
example_configs/barreleye.conf.example \
pybarrele/*.py \
pybuild/*.py \
pycoral/*.py \
Expand All @@ -48,6 +55,7 @@ clean-local:
rm -f $$exe.spec; \
done
rm -fr coral_build_*
rm -fr debian/.debhelper

all: all-am $(CHECKS)

Expand All @@ -57,46 +65,89 @@ mrproper: maintainer-clean
rm -f Makefile.in aclocal.m4 configure
rm -f compile depcomp install-sh missing

BARRELEYE_RPM = build/RPMS/$(target_cpu)/coral-barreleye-$(PACKAGE_VERSION)-$(CORAL_RELEASE).$(DISTRO_SHORT)*.$(target_cpu).rpm
CORAL_PACKAGES =

CORAL_RPMS =
if ENABLE_BARRELE
rpmbuild_opt += --with barrele
CORAL_RPMS += $(BARRELEYE_RPM)
CORAL_PACKAGES += barreleye
else
rpmbuild_opt += --without barrele
endif

EXES = barrele

EXES =
PYINSTALLER_CMD=PYTHONPATH=$(PIP3_PACKAGE_PATH) pyinstaller -F --clean


if ENABLE_BARRELE
EXES += barrele
dist/barrele:
mkdir -p dist
$(PYINSTALLER_CMD) barrele
endif


EXE_BINS = $(addprefix dist/, $(EXES))
EXE_BINS = @DOLLAR@(addprefix dist/, $(EXES))

exes: $(EXE_BINS)

EXTRA_OPTION =
rpms: coral.spec dist
ISO_EXTRA =


if MAKE_RPMS
rpms: coral.spec dist Makefile
mkdir -p $(build_dir)/BUILD $(build_dir)/SPECS $(build_dir)/SRPMS $(build_dir)/RPMS \
&& rpmbuild $(rpmbuild_opt) --define="_topdir $(build_dir)" \
--define="_prefix $(prefix)" \
$(EXTRA_OPTION) -tb $(distdir).tar.gz \
&& echo "RPMs successfully generated in $(build_dir)/RPMS"

ISO_EXTRA =
coral-$(PACKAGE_VERSION).$(DISTRO_SHORT).$(target_cpu).iso: $(ISO_EXTRA) rpms
ISO_EXTRA += rpms
endif #MAKE_RPMS

if MAKE_DEBS
debs: Makefile
VER=$$(echo @VERSION@ | tr '_' '-'); \
changelog_version=$$(sed -ne '1s/^coral (\(.*\)).*$$/\1/p' debian/changelog); \
if [ "$$changelog_version" != "$$VER" ]; then \
echo -e "coral ($$VER) unstable; urgency=low\n\n * Automated changelog.\n\n -- Coral Packaging Team <[email protected]> $$(date -R)\n" > debian/changelog; \
fi; \
rm -fr debs; \
dpkg-buildpackage -us -uc -I.git || { \
rc=$${PIPESTATUS[0]}; \
[ $${rc} -gt 1 ] && exit $${rc}; \
exit 0; \
}; \
mkdir -p debs && \
mv ../coral-*_$${VER}_*.deb \
../coral_$${VER}_*.buildinfo \
../coral_$${VER}.tar.gz \
../coral_$${VER}.dsc \
../coral_$${VER}_*.changes \
debs/
ISO_EXTRA += debs
endif #MAKE_DEBS

coral-$(PACKAGE_VERSION).$(DISTRO_SHORT).$(target_cpu).iso: $(ISO_EXTRA)
rm $(ISO_PATH) -fr
rm -f coral-*.iso
rm -f coral-*_SHA256SUM
cp -a $(ISO_CACHE_PATH) $(ISO_PATH)
./coral release_info save $(DISTRO_SHORT) $(target_cpu) coral_release_info.yaml
cp coral_release_info.yaml $(ISO_PATH)
cp $(CORAL_RPMS) $(PACKAGE_PATH)
createrepo $(PACKAGE_PATH)
mkdir -p $(PACKAGE_PATH)
if [ "$(DISTRO_SHORT)" = "ubuntu2204" ]; then \
DEB_PACKAGE_VERSION=$$(echo $(PACKAGE_VERSION) | tr '_' '-'); \
for CORAL_PACKAGE in $(CORAL_PACKAGES); do \
cp debs/coral-$${CORAL_PACKAGE}_$${DEB_PACKAGE_VERSION}_*.deb $(PACKAGE_PATH); \
done; \
fi
if [ "$(DISTRO_SHORT)" = "el7" -o "$(DISTRO_SHORT)" = "el8" ]; then \
for CORAL_PACKAGE in $(CORAL_PACKAGES); do \
cp build/RPMS/$(target_cpu)/coral-$${CORAL_PACKAGE}-$(PACKAGE_VERSION)-$(CORAL_RELEASE).$(DISTRO_SHORT)*.$(target_cpu).rpm $(PACKAGE_PATH); \
done; \
createrepo $(PACKAGE_PATH); \
fi
@if [ "$(DISTRO_SHORT)" = "el8" ]; then \
repo2module -s stable $(PACKAGE_PATH) $(PACKAGE_PATH)/modules.yaml; \
modifyrepo --mdtype=modules $(PACKAGE_PATH)/modules.yaml $(PACKAGE_PATH)/repodata; \
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ EOF
done
}

check_for_application lex yacc autoheader aclocal automake autoconf
check_for_application autoheader aclocal automake autoconf

# Actually we don't need the pkg-config executable, but we need the M4 macros.
# We check for `pkg-config' here and hope that M4 macros will then be
Expand Down
1 change: 1 addition & 0 deletions barreleye/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ M4_DESTINE_FILES = ime-1.1.m4 \
lustre-b_es5_1.m4 \
lustre-b_es5_2.m4 \
lustre-b_es6_0.m4 \
lustre-b_es6_1.m4 \
lustre-2.13.m4 \
sfa-3.0.m4 \
sfa-11.0.m4 \
Expand Down
34 changes: 17 additions & 17 deletions barreleye/grafana_dashboards/cluster_status.json.template

Large diffs are not rendered by default.

Loading

0 comments on commit fb3b4d2

Please sign in to comment.