mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 19:16:00 +00:00
Compare commits
73 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f4b36eb52 | |||
| 7fcf1ca778 | |||
| ad28b67e3d | |||
| ff9ceba3c5 | |||
| 50d755e823 | |||
| cf08aaaa5d | |||
| ecc540786b | |||
| ee24dc9199 | |||
| d3616700c1 | |||
| e6f9dc64cf | |||
| c818274cec | |||
| 8094f8a358 | |||
| 1fe250bb13 | |||
| 48312c546e | |||
| 2ed43dee7c | |||
| 2c29d463aa | |||
| 916aa9ce90 | |||
| e5c860f7c9 | |||
| b9b24a353b | |||
| 45b72cc7bc | |||
| baabce03b6 | |||
| 191989a32a | |||
| f1f9d44878 | |||
| ae6182ad24 | |||
| f8bc62ae39 | |||
| e750687701 | |||
| 28747a2037 | |||
| 3208712529 | |||
| 9e94a00898 | |||
| e053e67bd5 | |||
| 68768eb65f | |||
| 2a7d53c6cd | |||
| 213b7b4d57 | |||
| 17f5e2eb9d | |||
| a85ca255c1 | |||
| 4133026569 | |||
| 60de5ce7d5 | |||
| 91a4c42013 | |||
| 49289f00d9 | |||
| 64a279e8f8 | |||
| c4709f40af | |||
| b443e169d5 | |||
| cd55363a3c | |||
| e0054520f8 | |||
| ecb84bfabf | |||
| 6b3a74eea5 | |||
| 9b81676c6f | |||
| e0844510f6 | |||
| 536b562a5b | |||
| c4cb75a89f | |||
| 244e21ef2d | |||
| 8defd1c276 | |||
| 3bd55aea4f | |||
| e76c4bd179 | |||
| 2383eca632 | |||
| 89f861fda6 | |||
| 447126c594 | |||
| a3ad322a0a | |||
| c357625466 | |||
| ee3938da6c | |||
| d86d9e564d | |||
| df467c348a | |||
| 581aa3f813 | |||
| 5946c4dfa9 | |||
| f3e7eec6dc | |||
| fca54d3027 | |||
| 6550c61092 | |||
| d2d8b886bd | |||
| e227e8722b | |||
| b924031ba6 | |||
| 0981d133b1 | |||
| 3d195f17b2 | |||
| 187098145c |
+18
-12
@@ -9,13 +9,15 @@ include $(TOPLVL)/projects/common/Makefile.shared
|
||||
|
||||
SHELL = /bin/bash
|
||||
|
||||
CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
SPECFILE = $(addsuffix .spec, $(PKG_NAME))
|
||||
|
||||
SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || rpmspec -D '_vendor clr' --srpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}\n' $(SPECFILE))
|
||||
SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || $(call queryspec,%{NVR}\n,$(SPECFILE)))
|
||||
SRPMFILE = results/$(SRPMVERS).src.rpm
|
||||
|
||||
LATEST_RPMS = $(wildcard rpms/*.rpm)
|
||||
DEBUGINFO_RPM = $(wildcard rpms/*-debuginfo-*.rpm)
|
||||
DEBUGINFO_RPM = $(wildcard rpms/${PKG_NAME}-debuginfo-$(shell $(call queryspec,%{V}-%{R},${SPECFILE})).*.rpm)
|
||||
RPMS ?= $(LATEST_RPMS)
|
||||
|
||||
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
||||
@@ -46,7 +48,7 @@ upstream:
|
||||
#help spdxcheck: Checks that the package license is a valid SPDX license,
|
||||
#help or that it is in the exceptions list.
|
||||
spdxcheck: $(SPECFILE)
|
||||
@for LICENSE in `rpmspec -D '_vendor clr' --srpm -q --queryformat '%{LICENSE}\n' $(SPECFILE)`; do \
|
||||
@for LICENSE in `$(call queryspec,%{LICENSE}\n,$(SPECFILE))`; do \
|
||||
if ! grep -qx "$$LICENSE" $(TOPLVL)/projects/common/licenses-{spdx,exceptions,extra}; then FAIL=yes; echo "ERROR: License '$$LICENSE' is not an allowed SPDX license ID"; fi; \
|
||||
done; test -z "$$FAIL"
|
||||
|
||||
@@ -76,7 +78,7 @@ configemail:
|
||||
|
||||
#help checkblacklist: Verify rpms files to not include banned files for Clear Linux OS.
|
||||
checkblacklist:
|
||||
@$(TOPLVL)/projects/common/checkblacklist.sh $(TOPLVL)/projects/common/blacklist results/*.rpm
|
||||
@$(TOPLVL)/projects/common/checkblacklist.sh $(TOPLVL)/projects/common/blacklist $(filter-out ${DEBUGINFO_RPM},${RPMS})
|
||||
|
||||
prebuild-checks:
|
||||
|
||||
@@ -217,12 +219,12 @@ bump:
|
||||
git pull --rebase
|
||||
$(MAKE) bumpnogit
|
||||
git add $(SPECFILE) release
|
||||
git commit -a -m "version bump from $(shell rpmspec -D '_vendor clr' --srpm -q --queryformat '%{VERSION}-%{RELEASE}\n' $(SPECFILE)) to `rpmspec -D '_vendor clr' --srpm -q --queryformat '%{VERSION}-%{RELEASE}\n' $(SPECFILE)`"
|
||||
git commit -a -m "version bump from $(shell $(call queryspec,%{VERSION}-%{RELEASE}\n,$(SPECFILE))) to `$(call queryspec,%{VERSION}-%{RELEASE}\n,$(SPECFILE))`"
|
||||
|
||||
#help bumpnogit: Increments the release file by one and does not commit changes.
|
||||
bumpnogit:
|
||||
@$(MAKE) spdxcheck
|
||||
oldrel=$(shell rpmspec -D '_vendor clr' --srpm -q --queryformat '%{RELEASE}\n' $(SPECFILE)); \
|
||||
oldrel=$(shell $(call queryspec,%{RELEASE}\n,$(SPECFILE))); \
|
||||
newrel=$$(($$oldrel + 1)); \
|
||||
sed -i "s/^\(Release[[:blank:]]*:[[:blank:]]*\)$$oldrel$$/\1$$newrel/" $(SPECFILE); \
|
||||
echo "$$newrel" > release;
|
||||
@@ -232,7 +234,7 @@ $(__missingsources): sources
|
||||
# First argument is a Clear Linux build number (e.g. 22000)
|
||||
define fetch-from-srpm
|
||||
tmp=$$(mktemp -d -p "."); \
|
||||
srpm=$$(rpmspec --srpm -q --qf "%{NVR}.src.rpm\n" $(SPECFILE)); \
|
||||
srpm=$$($(call queryspec,%{NVR}.src.rpm\n,$(SPECFILE))); \
|
||||
if cd "$$tmp" && ! curl -s -S -f -L -O $(MIRROR_CURL_OPTS) $(DOWNLOAD_MIRROR)/releases/$(1)/clear/source/SRPMS/$$srpm; then \
|
||||
echo "Failed to download $$srpm from Clear Linux release $(1)." >&2; \
|
||||
cd .. && rm -rf "$$tmp"; \
|
||||
@@ -240,7 +242,7 @@ define fetch-from-srpm
|
||||
fi; \
|
||||
rpm2cpio $$srpm | cpio --quiet -id; \
|
||||
cd ..; \
|
||||
srclist=$$(rpmspec --srpm -q --qf "[%{SOURCE}\n]" $(SPECFILE)); \
|
||||
srclist=$$($(call queryspec,[%{SOURCE}\n],$(SPECFILE))); \
|
||||
for s in $$srclist; do \
|
||||
if ! mv --no-clobber "$$tmp"/$$s .; then \
|
||||
echo "Missing source file \"$$s\" in $${srpm}." >&2; \
|
||||
@@ -279,7 +281,7 @@ else
|
||||
sources:
|
||||
@$(MAKE) generateupstream; \
|
||||
[ $$? -eq 0 ] && exit 0; \
|
||||
nvr="$$(rpmspec --srpm -q --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\n' $(SPECFILE))"; \
|
||||
nvr="$$($(call queryspec,%{NAME}\t%{VERSION}\t%{RELEASE}\n,$(SPECFILE)))"; \
|
||||
git -C $(TOPLVL)/projects/common fetch --tags >/dev/null 2>&1; \
|
||||
latest_builds=$$(git -C $(TOPLVL)/projects/common tag -l | sort -rn); \
|
||||
for b in $$latest_builds; do \
|
||||
@@ -305,8 +307,8 @@ prekoji-checks:
|
||||
koji: prekoji-checks kojidef
|
||||
@$(MAKE) spdxcheck
|
||||
@$(MAKE) checkblacklist
|
||||
@if [ "$$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then \
|
||||
echo "Error: Must be on the master branch to submit to koji" >&2; \
|
||||
@if [ "$(CURRENT_BRANCH)" != "master" ] && [ "$(CURRENT_BRANCH)" != "main" ]; then \
|
||||
echo "Error: Must be on the \"master\" or \"main\" branch to submit to koji" >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if ! git diff --quiet HEAD -- ${SPECFILE}; then \
|
||||
@@ -322,7 +324,7 @@ koji: prekoji-checks kojidef
|
||||
exit 1; \
|
||||
fi
|
||||
git tag $(SRPMVERS)
|
||||
git push origin master refs/tags/$(SRPMVERS)
|
||||
git push origin $(CURRENT_BRANCH):master refs/tags/$(SRPMVERS)
|
||||
$(KOJI_CMD) build $$KOJI_NOWAIT $(KOJI_TAG) $(PKG_BASE_URL)/$(PKG_NAME)?#$(SRPMVERS)
|
||||
|
||||
#help rekoji: In case a previous 'make koji' failed, trigger a rebuild for the
|
||||
@@ -449,6 +451,10 @@ install-debuginfo-local:
|
||||
sudo chown -R dbginfo:dbginfo "$$d"; \
|
||||
sudo cp -a "$$d" $$dest/; \
|
||||
done; \
|
||||
find $$tmpdir/usr/share/debug/.build-id -type l 2> /dev/null | while read -r link; do \
|
||||
new_target=$$(readlink $$link | sed 's|/usr/share/debug|/usr/lib/debug|'); \
|
||||
sudo ln -sf "$$new_target" "$$link"; \
|
||||
done; \
|
||||
find $$tmpdir/usr/share/debug/ -mindepth 1 -maxdepth 1 -regextype awk -regex '.*/(.build-id|boot|lib|sbin|usr)$$' 2> /dev/null | while read -r d; do \
|
||||
sudo chown -R dbginfo:dbginfo "$$d"; \
|
||||
sudo cp -a "$$d" $$dest/; \
|
||||
|
||||
@@ -47,6 +47,14 @@ define subjectprefix
|
||||
git config format.subjectPrefix "PATCH $(1)"
|
||||
endef
|
||||
|
||||
# Query the spec file (or spec files) listed in argument 2 for the field(s)
|
||||
# specified in argument 1. The fields are derived from the source rpm(s)
|
||||
# generated by the specs. Queried fields that are declared within the spec file
|
||||
# must be declared above the first %files section.
|
||||
define queryspec
|
||||
rpmspec --define='_vendor clr' --srpm --query --queryformat='$(1)' <(sed -n '1,/%files/p' $(2))
|
||||
endef
|
||||
|
||||
# If GITOLITE_BASE_URL is defined, sets a repo's push URL for that gitolite
|
||||
# instance. Accepts one argument: the path to the repo on gitolite. If
|
||||
# GITOLITE_BASE_URL is not defined, no push URL is set -- the shell's null
|
||||
|
||||
+3
-3
@@ -163,7 +163,7 @@ status: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
#help diffstat. Requires that diffstat is installed.
|
||||
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)) ;\
|
||||
(cd $$p; git status --porcelain | grep -vq '^?? ' && (echo "Uncommitted changes in: $$p"; git diff | diffstat -p1); :) ;\
|
||||
done
|
||||
|
||||
#help log: Run git log origin/master..HEAD for all package repos, thus
|
||||
@@ -178,13 +178,13 @@ log: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
#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 \
|
||||
(cd $$p; if ls *.spec &> /dev/null; then rpmspec -q --queryformat '%{NAME}-%{VERSION}\n' *.spec | head -n1; fi) ;\
|
||||
(cd $$p; if ls *.spec &> /dev/null; then $(call queryspec,%{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_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) ;\
|
||||
(cd $$p; if ls *.spec &> /dev/null; then $(call queryspec,%{NVR}\n,*.spec) | head -n1; fi) ;\
|
||||
done
|
||||
|
||||
#help provides: Is used to find out which RPM package provides some file.
|
||||
|
||||
Binary file not shown.
@@ -45,11 +45,14 @@ BSD-3-Clause
|
||||
BSD-3-Clause-Attribution
|
||||
BSD-3-Clause-Clear
|
||||
BSD-3-Clause-LBNL
|
||||
BSD-3-Clause-Modification
|
||||
BSD-3-Clause-No-Military-License
|
||||
BSD-3-Clause-No-Nuclear-License
|
||||
BSD-3-Clause-No-Nuclear-License-2014
|
||||
BSD-3-Clause-No-Nuclear-Warranty
|
||||
BSD-3-Clause-Open-MPI
|
||||
BSD-4-Clause
|
||||
BSD-4-Clause-Shortened
|
||||
BSD-4-Clause-UC
|
||||
BSD-Protection
|
||||
BSD-Source-Code
|
||||
@@ -62,6 +65,7 @@ BitTorrent-1.0
|
||||
BitTorrent-1.1
|
||||
BlueOak-1.0.0
|
||||
Borceux
|
||||
C-UDA-1.0
|
||||
CAL-1.0
|
||||
CAL-1.0-Combined-Work-Exception
|
||||
CATOSL-1.1
|
||||
@@ -96,6 +100,7 @@ CC-BY-ND-4.0
|
||||
CC-BY-SA-1.0
|
||||
CC-BY-SA-2.0
|
||||
CC-BY-SA-2.0-UK
|
||||
CC-BY-SA-2.1-JP
|
||||
CC-BY-SA-2.5
|
||||
CC-BY-SA-3.0
|
||||
CC-BY-SA-3.0-AT
|
||||
@@ -104,6 +109,7 @@ CC-PDDC
|
||||
CC0-1.0
|
||||
CDDL-1.0
|
||||
CDDL-1.1
|
||||
CDL-1.0
|
||||
CDLA-Permissive-1.0
|
||||
CDLA-Sharing-1.0
|
||||
CECILL-1.0
|
||||
@@ -132,6 +138,7 @@ CrystalStacker
|
||||
Cube
|
||||
D-FSL-1.0
|
||||
DOC
|
||||
DRL-1.0
|
||||
DSDP
|
||||
Dotseqn
|
||||
ECL-1.0
|
||||
@@ -154,7 +161,9 @@ FSFULLR
|
||||
FTL
|
||||
Fair
|
||||
Frameworx-1.0
|
||||
FreeBSD-DOC
|
||||
FreeImage
|
||||
GD
|
||||
GFDL-1.1
|
||||
GFDL-1.1-invariants-only
|
||||
GFDL-1.1-invariants-or-later
|
||||
@@ -252,6 +261,7 @@ Linux-OpenIB
|
||||
MIT
|
||||
MIT-0
|
||||
MIT-CMU
|
||||
MIT-Modern-Variant
|
||||
MIT-advertising
|
||||
MIT-enna
|
||||
MIT-feh
|
||||
@@ -271,6 +281,7 @@ MulanPSL-1.0
|
||||
MulanPSL-2.0
|
||||
Multics
|
||||
Mup
|
||||
NAIST-2003
|
||||
NASA-1.3
|
||||
NBPL-1.0
|
||||
NCGL-UK-2.0
|
||||
@@ -306,6 +317,7 @@ OFL-1.1
|
||||
OFL-1.1-RFN
|
||||
OFL-1.1-no-RFN
|
||||
OGC-1.0
|
||||
OGDL-Taiwan-1.0
|
||||
OGL-Canada-2.0
|
||||
OGL-UK-1.0
|
||||
OGL-UK-2.0
|
||||
|
||||
+1
-1
@@ -211,7 +211,7 @@ def main():
|
||||
with open (filename, "r") as myfile:
|
||||
lines = myfile.readlines()
|
||||
else:
|
||||
output = subprocess.check_output("git format-patch -1 --stdout", shell=True).decode("latin-1")
|
||||
output = subprocess.check_output("git format-patch -1 --stdout", shell=True).decode("utf-8", errors="replace")
|
||||
lines = output.split("\n")
|
||||
|
||||
parse_patch(lines)
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
compat-libsigc++-soname20 compat-libsigc-plus-plus-soname20
|
||||
gtk+ gtk-plus
|
||||
libsigc++ libsigc-plus-plus
|
||||
|
||||
Reference in New Issue
Block a user