mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 19:16:00 +00:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56a38edc64 | |||
| d5cdd5d1c5 | |||
| 806a1f5593 | |||
| b82d61d686 | |||
| d7404ca99d | |||
| c81774a23c | |||
| b1ef20b90b | |||
| b100150ca3 | |||
| 482940952d | |||
| b50fabd346 | |||
| c383979d14 | |||
| 08138ad889 | |||
| b78940d18a | |||
| bb74ceef8d | |||
| 12800a51fa | |||
| 9b445f1116 | |||
| 40898f6ce0 | |||
| 3b4b1b3053 | |||
| e26fd3e022 | |||
| 677fe6cbd5 | |||
| 9e54179aea | |||
| 1145477b30 | |||
| 19cb72b28e | |||
| 497059b257 | |||
| fbda0655f2 | |||
| 1b32d114f3 | |||
| 90a4ceb162 | |||
| 2947369532 | |||
| 26bb3f43f8 | |||
| fd509a2295 | |||
| eb4fcd4085 | |||
| 4fd9e54785 | |||
| 5bc6cc856b |
+10
-8
@@ -28,16 +28,18 @@ __missingsources := $(filter-out $(wildcard ${__allsources}), ${__allsources})
|
||||
endif
|
||||
|
||||
$(SPECFILE):
|
||||
@echo Error: $(SPECFILE) is missing. Please run \`make autospec\` to try and auto
|
||||
@echo Error: generate one for you.
|
||||
@exit 1
|
||||
@[[ -f "$@" ]] || (\
|
||||
echo Error: $@ is missing. Please run \`make autospec\` to try and auto;\
|
||||
echo Error: generate one for you.;\
|
||||
exit 1 )
|
||||
|
||||
upstream:
|
||||
@echo Error: The \"upstream\" file is missing. Try running \`make autospec\` to
|
||||
@echo Error: auto generate one for you. If you are not using autospec to
|
||||
@echo Error: generate a spec file, specify the proper "Source*" entries in the
|
||||
@echo Error: spec header, and try running \`make generateupstream\`.
|
||||
@exit 1
|
||||
@[[ -f "$@" ]] || (\
|
||||
echo Error: The \"$@\" file is missing. Try running \`make autospec\` to;\
|
||||
echo Error: auto generate one for you. If you are not using autospec to;\
|
||||
echo Error: generate a spec file, specify the proper "Source*" entries in the;\
|
||||
echo Error: spec header, and try running \`make generateupstream\`.;\
|
||||
exit 1 )
|
||||
|
||||
#help spdxcheck: Checks that the package license is a valid SPDX license,
|
||||
#help or that it is in the exceptions list.
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ require-pkg-repo-dir:
|
||||
link-new-rpms: require-pkg-repo-dir
|
||||
mkdir -p ${PKG_REPO_DIR}/rpms
|
||||
rm -f ${PKG_REPO_DIR}/rpms/*.rpm
|
||||
find ${PKG_REPO_DIR}/results -name '*.rpm' -exec ln {} ${PKG_REPO_DIR}/rpms/ \;
|
||||
find ${PKG_REPO_DIR}/results -maxdepth 1 -name '*.rpm' -exec ln {} ${PKG_REPO_DIR}/rpms/ \;
|
||||
rm -f ${PKG_REPO_DIR}/rpms/*.src.rpm
|
||||
|
||||
|
||||
|
||||
+12
-12
@@ -136,11 +136,11 @@ clean-pkgs-dir: $(PACKAGES_FILE)
|
||||
done
|
||||
@echo "packages directory cleaned";
|
||||
|
||||
clean_PKGS = $(addprefix clean_,$(PKGS))
|
||||
clean_PKGS = $(addprefix clean_,$(PKGS_LOCAL))
|
||||
#help clean: Run 'make clean' for every package.
|
||||
clean: $(clean_PKGS)
|
||||
|
||||
proper_PKGS = $(addprefix proper_,$(PKGS))
|
||||
proper_PKGS = $(addprefix proper_,$(PKGS_LOCAL))
|
||||
#help proper: Run 'make proper' for every package, and purge the local
|
||||
#help repo and image.
|
||||
proper: $(proper_PKGS)
|
||||
@@ -154,34 +154,34 @@ proper: $(proper_PKGS)
|
||||
|
||||
$(clean_PKGS):
|
||||
@echo "cleaning $(patsubst clean_%,%,$@)"
|
||||
-@$(MAKE) -s -j -C $(addprefix packages/,$(patsubst clean_%,%,$@)) clean
|
||||
-@$(MAKE) -s -C $(addprefix packages/,$(patsubst clean_%,%,$@)) clean
|
||||
|
||||
$(proper_PKGS):
|
||||
-@$(MAKE) -s -j -C $(addprefix packages/,$(patsubst proper_%,%,$@)) proper
|
||||
-@$(MAKE) -s -C $(addprefix packages/,$(patsubst proper_%,%,$@)) proper
|
||||
|
||||
#help status: Runs git status for all package repos, thus displaying untracked
|
||||
#help and unstaged files in addition to staged files.
|
||||
status: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS))
|
||||
@for p in projects/common $(addprefix packages/,$(PKGS)); do \
|
||||
status: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
@for p in projects/common $(addprefix packages/,$(PKGS_LOCAL)); do \
|
||||
if [ -d "$$p/.git" ] && [ -n "$$(git -C $$p status -uno --porcelain)" ]; then echo "Uncommitted changes in $$p:"; git -C "$$p" status --short; fi ;\
|
||||
done
|
||||
|
||||
#help diff: Runs git diff for all package repos and displays the output using
|
||||
#help diffstat. Requires that diffstat is installed.
|
||||
diff: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS))
|
||||
@for p in projects/common $(addprefix packages/,$(PKGS)); do \
|
||||
diff: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
@for p in projects/common $(addprefix packages/,$(PKGS_LOCAL)); do \
|
||||
(cd $$p ; git status | grep -q 'nothing to commit, working [^ ]* clean' || (echo "Uncommitted changes in: $$p"; git diff |diffstat -p1)) ;\
|
||||
done
|
||||
|
||||
#help versions: Displays the version of each package in the ./packages tree.
|
||||
versions: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS))
|
||||
@for p in $(addprefix packages/,$(PKGS)); do \
|
||||
versions: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
@for p in $(addprefix packages/,$(PKGS_LOCAL)); do \
|
||||
(cd $$p; if ls *.spec &> /dev/null; then rpmspec -q --queryformat '%{NAME}-%{VERSION}\n' *.spec | head -n1; fi) ;\
|
||||
done
|
||||
|
||||
#help releases: Like 'make versions', but also displays the release number.
|
||||
releases: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS))
|
||||
@for p in $(addprefix packages/,$(PKGS)); do \
|
||||
releases: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
@for p in $(addprefix packages/,$(PKGS_LOCAL)); do \
|
||||
(cd $$p; if ls *.spec &> /dev/null; then rpmspec -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}\n' *.spec | head -n1; fi) ;\
|
||||
done
|
||||
|
||||
|
||||
@@ -102,6 +102,10 @@ $ echo missing-build-req >> buildreq_add
|
||||
$ make autospec
|
||||
```
|
||||
|
||||
Please see https://github.com/clearlinux/autospec#common-files for
|
||||
documention on buildreq_add and the other files autospec uses during the
|
||||
build process.
|
||||
|
||||
### Bump the release number for a package
|
||||
|
||||
If you simply need to increment a package's release number and rebuild the
|
||||
@@ -112,6 +116,16 @@ $ make bump
|
||||
$ make build
|
||||
```
|
||||
|
||||
### Update the release version for a package
|
||||
|
||||
If you have an update release version for a package, you can change the url
|
||||
for the new release in the package/example-pkg/Makefile. After modifying the
|
||||
new url, run `make autospec` again to fetch the new package and rebuild.
|
||||
|
||||
```
|
||||
$ make autospec
|
||||
```
|
||||
|
||||
## Other topics
|
||||
|
||||
### Customizing the mock config
|
||||
|
||||
Reference in New Issue
Block a user