mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 19:16:00 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6550c61092 | |||
| d2d8b886bd | |||
| e227e8722b | |||
| b924031ba6 | |||
| 0981d133b1 | |||
| 3d195f17b2 | |||
| 187098145c | |||
| fbd176e68d | |||
| 75e48d2e12 | |||
| 87bbccedf1 | |||
| 3f52dc6afb |
+7
-7
@@ -11,7 +11,7 @@ SHELL = /bin/bash
|
||||
|
||||
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)
|
||||
@@ -46,7 +46,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"
|
||||
|
||||
@@ -217,12 +217,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 +232,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 +240,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 +279,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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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.
|
||||
|
||||
@@ -16,6 +16,7 @@ AMDPLPA
|
||||
AML
|
||||
AMPAS
|
||||
ANTLR-PD
|
||||
ANTLR-PD-fallback
|
||||
APAFML
|
||||
APL-1.0
|
||||
APSL-1.0
|
||||
@@ -53,6 +54,7 @@ BSD-4-Clause-UC
|
||||
BSD-Protection
|
||||
BSD-Source-Code
|
||||
BSL-1.0
|
||||
BUSL-1.1
|
||||
Bahyph
|
||||
Barr
|
||||
Beerware
|
||||
@@ -200,6 +202,7 @@ Glide
|
||||
Glulxe
|
||||
HPND
|
||||
HPND-sell-variant
|
||||
HTMLTIDY
|
||||
HaskellReport
|
||||
Hippocratic-2.1
|
||||
IBM-pibs
|
||||
@@ -252,6 +255,7 @@ MIT-CMU
|
||||
MIT-advertising
|
||||
MIT-enna
|
||||
MIT-feh
|
||||
MIT-open-group
|
||||
MITNFA
|
||||
MPL-1.0
|
||||
MPL-1.1
|
||||
|
||||
@@ -620,6 +620,7 @@ R-ordinal
|
||||
R-pROC
|
||||
R-packrat
|
||||
R-pamr
|
||||
R-parallelly
|
||||
R-parsedate
|
||||
R-partitions
|
||||
R-party
|
||||
@@ -675,6 +676,7 @@ R-profdpm
|
||||
R-profileModel
|
||||
R-profmem
|
||||
R-progress
|
||||
R-projpred
|
||||
R-promises
|
||||
R-proto
|
||||
R-protolite
|
||||
@@ -1062,10 +1064,9 @@ avahi
|
||||
awesome-wm
|
||||
awscli
|
||||
axel
|
||||
azure-appconfiguration
|
||||
azure-batch
|
||||
azure-cli
|
||||
azure-cli-command-modules-nspkg
|
||||
azure-cli-core
|
||||
azure-cli-nspkg
|
||||
azure-cli-telemetry
|
||||
azure-common
|
||||
@@ -1077,8 +1078,10 @@ azure-functions-devops-build
|
||||
azure-graphrbac
|
||||
azure-iot-sdk
|
||||
azure-keyvault
|
||||
azure-keyvault-administration
|
||||
azure-keyvault-certificates
|
||||
azure-keyvault-keys
|
||||
azure-keyvault-nspkg
|
||||
azure-keyvault-secrets
|
||||
azure-loganalytics
|
||||
azure-mgmt-advisor
|
||||
@@ -1144,12 +1147,17 @@ azure-mgmt-signalr
|
||||
azure-mgmt-sql
|
||||
azure-mgmt-sqlvirtualmachine
|
||||
azure-mgmt-storage
|
||||
azure-mgmt-synapse
|
||||
azure-mgmt-trafficmanager
|
||||
azure-mgmt-web
|
||||
azure-multiapi-storage
|
||||
azure-nspkg
|
||||
azure-storage-blob
|
||||
azure-storage-common
|
||||
azure-synapse-accesscontrol
|
||||
azure-synapse-artifacts
|
||||
azure-synapse-nspkg
|
||||
azure-synapse-spark
|
||||
babeltrace
|
||||
babl
|
||||
backcall
|
||||
@@ -1339,7 +1347,6 @@ compat-curl-gnutls-soname4
|
||||
compat-enchant-soname1
|
||||
compat-fuse-soname2
|
||||
compat-gtksourceview-soname3
|
||||
compat-hunspell-soname1.6
|
||||
compat-icu4c-soname64
|
||||
compat-libhandy-0.0
|
||||
compat-libpng-soname12
|
||||
@@ -1349,6 +1356,7 @@ compat-nettle-soname6
|
||||
compat-nettle-soname7
|
||||
compat-opencv-soname42
|
||||
compat-protobuf-soname22
|
||||
compat-python38
|
||||
compat-re2-soname7
|
||||
compat-readline-soname5
|
||||
compat-tracker-soname2.0
|
||||
@@ -1397,6 +1405,7 @@ cve-bin-tool
|
||||
cxxfilt
|
||||
cycler
|
||||
cyrus-sasl
|
||||
dacite
|
||||
dapl
|
||||
darkflow
|
||||
darktable
|
||||
@@ -1417,6 +1426,7 @@ decorator
|
||||
defusedxml
|
||||
dejagnu
|
||||
dejavu-fonts
|
||||
deprecation
|
||||
desktop-file-utils
|
||||
devhelp
|
||||
dfc
|
||||
@@ -1616,6 +1626,7 @@ gdal
|
||||
gdb
|
||||
gdbm
|
||||
gdk-pixbuf
|
||||
gdk-pixbuf-xlib
|
||||
gdl
|
||||
gdm
|
||||
geany
|
||||
@@ -1918,6 +1929,7 @@ iwd
|
||||
ixion
|
||||
jack2
|
||||
jansson
|
||||
janus
|
||||
jaraco.classes
|
||||
jaraco.collections
|
||||
jaraco.functools
|
||||
@@ -2789,6 +2801,7 @@ p11-kit
|
||||
p7zip
|
||||
packaging
|
||||
pacrunner
|
||||
paho-mqtt
|
||||
paho.mqtt.c
|
||||
paho.mqtt.cpp
|
||||
palapeli
|
||||
@@ -3866,6 +3879,7 @@ python-crfsuite
|
||||
python-dateutil
|
||||
python-digitalocean
|
||||
python-distutils-extra
|
||||
python-dotenv
|
||||
python-future
|
||||
python-gflags
|
||||
python-graphviz
|
||||
@@ -3989,6 +4003,7 @@ requests-mock
|
||||
requests-ntlm
|
||||
requests-oauthlib
|
||||
requests-toolbelt
|
||||
requests-unixsocket
|
||||
responses
|
||||
rest
|
||||
restic
|
||||
@@ -4225,12 +4240,14 @@ the_silver_searcher
|
||||
thermal_daemon
|
||||
thermal_monitor
|
||||
thin-provisioning-tools
|
||||
threadpoolctl
|
||||
threadweaver
|
||||
three-merge
|
||||
thunar-volman
|
||||
thunderbird
|
||||
thunderbolt-software-user-space
|
||||
tiff
|
||||
tifffile
|
||||
tig
|
||||
tigervnc
|
||||
tilix
|
||||
@@ -4266,6 +4283,7 @@ typing_extensions
|
||||
tzdata
|
||||
tzlocal
|
||||
ua-parser
|
||||
uamqp
|
||||
ucpp
|
||||
udisks2
|
||||
udunits
|
||||
|
||||
+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)
|
||||
|
||||
Reference in New Issue
Block a user