mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 11:06:15 +00:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d82331cfa | |||
| ea568f6239 | |||
| 4e2e716a76 | |||
| c64bda09fc | |||
| 65c5758c08 | |||
| 3d334b1fd4 | |||
| 31399a1cb7 | |||
| d7bff595de | |||
| 3f53222de8 | |||
| 4435eace17 | |||
| e971c54843 | |||
| c5df45b631 | |||
| 1123cf8edc | |||
| 779526d7a4 | |||
| 8280750fe8 | |||
| 72414dec9f | |||
| 61fa7c0655 | |||
| c30c608d19 | |||
| b9702018c7 | |||
| 50e2a1d14e | |||
| 941bc3100e | |||
| 2971492feb | |||
| faa11f738d | |||
| 4db065fa34 | |||
| 07cf4c7085 | |||
| 82baba5b88 | |||
| 257ff7bc57 | |||
| 80d1f17444 | |||
| 4f059caffc | |||
| 7d2f1d5e1d | |||
| d36404255b | |||
| 88dd353e21 | |||
| c232a0f6c2 |
@@ -62,6 +62,38 @@ define remotepkgname
|
||||
$(if $(USE_PACKAGE_MAPPING),$$(awk -v P="$(1)" '$$1 == P { res=$$2 } END { print res ? res : P }' $(TOPLVL)/projects/common/pkg-mapping),$(1))
|
||||
endef
|
||||
|
||||
# Clone repo from the configured gitolite instance, but only if the repo exists
|
||||
# on that instance and matches the pattern "packages/..*".
|
||||
define try-clone-gitolite
|
||||
rpkg=$(call remotepkgname,$(1)); \
|
||||
if ssh $(GITOLITE_BASE_URL) info "packages/$$rpkg" | grep --quiet "packages/$$rpkg$$"; then \
|
||||
git clone $(PKG_BASE_URL)/$$rpkg packages/$(1); \
|
||||
cd packages/$(1); \
|
||||
$(call gitoliteurl,packages/$(1)); \
|
||||
$(call subjectprefix,$(1)); \
|
||||
fi
|
||||
endef
|
||||
|
||||
# Clone repo from the configured package repo hosting location, as defined by
|
||||
# the PKG_BASE_URL variable, but only if the repo exists.
|
||||
define try-clone-other
|
||||
rpkg=$(call remotepkgname,$(1)); \
|
||||
if git ls-remote $(PKG_BASE_URL)/$$rpkg &> /dev/null; then \
|
||||
git clone $(PKG_BASE_URL)/$$rpkg packages/$(1); \
|
||||
cd packages/$(1); \
|
||||
$(call subjectprefix,$(1)); \
|
||||
fi
|
||||
endef
|
||||
|
||||
# First, try running `make clone_PKG`, where PKG is the first argument. If that
|
||||
# fails, proceed with fallback cloning strategies.
|
||||
define clone-if-available
|
||||
$(MAKE) clone_$(1) || { \
|
||||
$(if $(GITOLITE_BASE_URL),$(call try-clone-gitolite,$(1)),$(call try-clone-other,$(1))); \
|
||||
}
|
||||
endef
|
||||
|
||||
|
||||
# Enables the local RPM repo by installing package manager and Mock configs.
|
||||
# First argument is the path to the package manager config, and the second
|
||||
# argument is the path to the mock config. Each of these config files is
|
||||
|
||||
+10
-1
@@ -166,6 +166,15 @@ diff: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
(cd $$p ; git status | grep -q 'nothing to commit, working [^ ]* clean' || (echo "Uncommitted changes in: $$p"; git diff |diffstat -p1)) ;\
|
||||
done
|
||||
|
||||
#help log: Run git log origin/master..HEAD for all package repos, thus
|
||||
#help displaying any committed but unpushed changes.
|
||||
log: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
@for p in projects/common $(addprefix packages/,$(PKGS_LOCAL)); do \
|
||||
( cd $$p; if [ "$$(git rev-parse --verify HEAD)" != "$$(git rev-parse --verify origin/master)" ] ; then \
|
||||
echo $$p ; git --no-pager log --pretty="format:%s" origin/master..HEAD ; echo ; echo;\
|
||||
fi ; ) \
|
||||
done
|
||||
|
||||
#help versions: Displays the version of each package in the ./packages tree.
|
||||
versions: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
@for p in $(addprefix packages/,$(PKGS_LOCAL)); do \
|
||||
@@ -196,7 +205,7 @@ autospecnew: preautospecnew-checks localreponotice
|
||||
echo "Please specify NAME and URL. The ARCHIVES variable is optional."; \
|
||||
exit 1; \
|
||||
fi
|
||||
-$(MAKE) clone_$(NAME)
|
||||
$(call clone-if-available,$(NAME))
|
||||
@if [ ! -d $(TOPLVL)/packages/$(NAME)/.git ]; then \
|
||||
echo "no remote repository found, creating new package repository and running autospec"; \
|
||||
mkdir -p $(TOPLVL)/packages/$(NAME); \
|
||||
|
||||
+10
-2
@@ -244,14 +244,15 @@ def main():
|
||||
|
||||
zap_line_in_file_start(".spec", "Release :")
|
||||
zap_line_in_file_start(".spec", "Source99 :")
|
||||
zap_line_in_file_start(".spec", "Source0 :")
|
||||
zap_line_in_file_start(".spec", "export SOURCE_DATE_EPOCH")
|
||||
zap_line_in_file_start(".spec", "export AR=gcc-ar")
|
||||
zap_line_in_file_start(".spec", "export RANLIB=gcc-ranlib")
|
||||
zap_line_in_file_start(".spec", "export NM=gcc-nm")
|
||||
zap_line_in_file_start(".spec", "export CFLAGS=\"$CFLAGS -O3 -ffat-lto-objects -flto=4 \"")
|
||||
zap_line_in_file_start(".spec", "export FCFLAGS=\"$CFLAGS -O3 -ffat-lto-objects -flto=4 \"")
|
||||
zap_line_in_file_start(".spec", "export FCFLAGS=\"$FFLAGS -O3 -ffat-lto-objects -flto=4 \"")
|
||||
zap_line_in_file_start(".spec", "export FFLAGS=\"$CFLAGS -O3 -ffat-lto-objects -flto=4 \"")
|
||||
zap_line_in_file_start(".spec", "export FFLAGS=\"$FFLAGS -O3 -ffat-lto-objects -flto=4 \"")
|
||||
zap_line_in_file_start(".spec", "export CXXFLAGS=\"$CXXFLAGS -O3 -ffat-lto-objects -flto=4 \"")
|
||||
zap_line_in_file_start(".spec", "%setup -q -n ")
|
||||
zap_line_in_file_start(".spec", "URL :")
|
||||
@@ -288,13 +289,15 @@ def main():
|
||||
zap_line_in_file_start(".spec", "cp -a ")
|
||||
zap_line_in_file_start(".spec", "cd %{_builddir}/")
|
||||
zap_line_in_file_start(".spec", "export GCC_IGNORE_WERROR=1")
|
||||
zap_line_in_file_start(".spec", "rm -rf %{buildroot}")
|
||||
|
||||
zap_line_in_file_start("b/Makefile", "URL =")
|
||||
zap_line_in_file_start("b/Makefile", "PKG_NAME :=")
|
||||
|
||||
zap_line_in_file_start("b/options.conf", "name = ")
|
||||
zap_line_in_file("b/options.conf", "archives = ")
|
||||
zap_line_in_file("b/options.conf", "giturl = ")
|
||||
zap_line_in_file("b/options.conf", "url = ")
|
||||
zap_line_in_file_start("b/options.conf", "url = ")
|
||||
zap_line_in_file("b/options.conf", "[package]")
|
||||
zap_line_in_file("b/options.conf", "")
|
||||
zap_line_in_file("b/options.conf", "[autospec]")
|
||||
@@ -351,8 +354,13 @@ def main():
|
||||
zap_line_in_file("b/options.conf", "# require package verification for build")
|
||||
zap_line_in_file("b/options.conf", "verify_required = true")
|
||||
zap_line_in_file("b/options.conf", "# do not generate debuginfo for this package")
|
||||
zap_line_in_file("b/options.conf", "# configure build also for openmpi")
|
||||
zap_line_in_file("b/options.conf", "openmpi = false")
|
||||
zap_line_in_file("b/options.conf", "alias =")
|
||||
zap_line_in_file("b/options.conf", "alias = ")
|
||||
zap_line_in_file("b/options.conf", "nodebug = false")
|
||||
zap_line_in_file("b/options.conf", "domain =")
|
||||
zap_line_in_file("b/options.conf", "domain = ")
|
||||
|
||||
zap_line_in_file("b/buildreq_add", "# This file contains additional build requirements that did not get")
|
||||
zap_line_in_file("b/buildreq_add", "# picked up automatically. One name per line, no whitespace.")
|
||||
|
||||
Reference in New Issue
Block a user