mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 11:06:15 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 80bb811f5f | |||
| 71827cbf99 | |||
| 84a9b62e3f | |||
| 0dfb2f6ef5 | |||
| 59a46563cf | |||
| a198b2d0a0 | |||
| 9574f4ecde | |||
| 649f1e38de | |||
| 0b86a75a10 | |||
| a06eab078d | |||
| d4ea9f57dc | |||
| ee0847f750 | |||
| 98047e4b8e |
+30
-44
@@ -21,7 +21,8 @@ RPMS ?= $(LATEST_RPMS)
|
||||
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
||||
|
||||
# MOCK_CONFIG_VAL is set in Makefile.shared
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL) $(MOCK_OPTS)
|
||||
MOCK_SMP_FLAGS=$(patsubst -j%, -D_smp_mflags\ -j%,$(filter -j%, $(MAKEFLAGS)))
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL) $(MOCK_SMP_FLAGS) $(MOCK_OPTS)
|
||||
|
||||
ifneq ($(wildcard upstream),)
|
||||
__allsources := $(notdir $(strip $(shell cat upstream)))
|
||||
@@ -172,7 +173,7 @@ autospec: preautospec-checks pullrebase localreponotice clean-old-content
|
||||
--name $(PKG_NAME) \
|
||||
--archives $(ARCHIVES) \
|
||||
--mock-config $(MOCK_CONFIG_VAL) \
|
||||
--mock-opts="$(MOCK_OPTS)" \
|
||||
--mock-opts="$(MOCK_SMP_FLAGS) $(MOCK_OPTS)" \
|
||||
$${SETVERSION:+ --version $${SETVERSION}} \
|
||||
$${NON_INTERACTIVE:+ --non_interactive} \
|
||||
$${SKIP_GIT:+ --skip-git} \
|
||||
@@ -349,11 +350,6 @@ rekoji-nowait:
|
||||
logcheck:
|
||||
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
|
||||
|
||||
$(TOPLVL)/repo:
|
||||
@echo "Creating local RPM repository $(TOPLVL)/repo"
|
||||
mkdir $(TOPLVL)/repo
|
||||
$(MAKE) localrepocreate
|
||||
|
||||
#help repoadd: Adds locally-built RPMs for this package to the local RPM
|
||||
#help repository. If this repository does not yet exist, it is created and
|
||||
#help enabled.
|
||||
@@ -361,22 +357,16 @@ repoadd: $(TOPLVL)/repo
|
||||
@if [ -z "${LATEST_RPMS}" ]; then \
|
||||
echo "No rpms found in rpms/ directory."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -f .repo-index ]; then \
|
||||
echo "Cleaning old rpms:"; \
|
||||
for r in `cat .repo-index`; do \
|
||||
echo "-$$r"; \
|
||||
rm -f $(TOPLVL)/repo/$$r; \
|
||||
done; \
|
||||
rm .repo-index; \
|
||||
fi; \
|
||||
for r in ${LATEST_RPMS}; do \
|
||||
echo "+$$r"; \
|
||||
echo $$(basename $$r) >> .repo-index; \
|
||||
ln -f $$r $(TOPLVL)/repo/; \
|
||||
done
|
||||
$(MAKE) localrepocreate
|
||||
$(call localrepoenable,${PM_CONF},${MOCK_CONF})
|
||||
fi
|
||||
$(MAKE) -s repodel NO_CREATEREPO=1
|
||||
@echo "Adding new rpms:"; \
|
||||
for rpm in ${LATEST_RPMS}; do \
|
||||
echo "+$${rpm#rpms/}"; \
|
||||
echo "$${rpm#rpms/}" >> .repo-index; \
|
||||
done; \
|
||||
flock $</repo.lock ln -f -t $< ${LATEST_RPMS}
|
||||
$(MAKE) -s localrepocreate
|
||||
$(MAKE) -s localrepoenable
|
||||
|
||||
#help repostage: Stages locally-built RPMs for this package to the local RPM
|
||||
#help directory. If this directory does not yet exist, it is created and
|
||||
@@ -385,37 +375,33 @@ repostage: $(TOPLVL)/repo
|
||||
@if [ -z "${LATEST_RPMS}" ]; then \
|
||||
echo "No rpms found in rpms/ directory."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if [ -f .repo-index ]; then \
|
||||
echo "Cleaning old rpms:"; \
|
||||
for r in `cat .repo-index`; do \
|
||||
echo "-$$r"; \
|
||||
rm -f $(TOPLVL)/repo/$$r; \
|
||||
done; \
|
||||
rm .repo-index; \
|
||||
fi; \
|
||||
for r in ${LATEST_RPMS}; do \
|
||||
echo "+$$r"; \
|
||||
echo $$(basename $$r) >> .repo-index; \
|
||||
ln -f $$r $(TOPLVL)/repo/; \
|
||||
done
|
||||
fi
|
||||
$(MAKE) -s repodel NO_CREATEREPO=1
|
||||
@for r in ${LATEST_RPMS}; do \
|
||||
echo "+$${rpm#rpms/}"; \
|
||||
echo "$${rpm#rpms/}" >> .repo-index; \
|
||||
done; \
|
||||
flock $</repo.lock ln -f -t $< ${LATEST_RPMS}
|
||||
|
||||
#help repodel: Removes RPMs from the local RPM repository that were
|
||||
#help previously added by 'make repoadd' for this package.
|
||||
repodel:
|
||||
repodel: $(TOPLVL)/repo
|
||||
@if [ -f .repo-index ]; then \
|
||||
echo "Cleaning old rpms:"; \
|
||||
for r in `cat .repo-index`; do \
|
||||
echo "-$$r"; \
|
||||
rm -f $(TOPLVL)/repo/$$r; \
|
||||
done; \
|
||||
mapfile -t rpms < <(sed 's|.*|$</&|' .repo-index); \
|
||||
for rpm in "$${rpms[@]}"; do \
|
||||
echo "-$${rpm#$</}"; \
|
||||
done < .repo-index; \
|
||||
flock $</repo.lock rm -f "$${rpms[@]}"; \
|
||||
rm .repo-index; \
|
||||
$(MAKE) localrepocreate; \
|
||||
if [ -z "$$NO_CREATEREPO" ]; then \
|
||||
$(MAKE) -s localrepocreate; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
#help repoenable: Enables the local RPM repository for use with Yum/DNF and
|
||||
#help Mock. If this repository does not yet exist, it is created.
|
||||
repoenable: $(TOPLVL)/repo ; $(call localrepoenable,${PM_CONF},${MOCK_CONF})
|
||||
repoenable: localrepoenable ;
|
||||
|
||||
#help repodisable: Disables the local RPM repository.
|
||||
repodisable: localrepodisable ;
|
||||
|
||||
+47
-17
@@ -93,34 +93,64 @@ $(MAKE) clone_$(1) || { \
|
||||
}
|
||||
endef
|
||||
|
||||
$(TOPLVL)/repo:
|
||||
@echo "Creating local RPM repository $(TOPLVL)/repo"
|
||||
mkdir $(TOPLVL)/repo
|
||||
|
||||
# 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
|
||||
# augmented for local repo support.
|
||||
define localrepoenable
|
||||
@cp $(1) $(TOPLVL)/repo/yum.conf
|
||||
@printf "\n\n[local]\nname=Local\nfailovermethod=priority\nenabled=1\ngpgcheck=0\npriority=1\n" >> $(TOPLVL)/repo/yum.conf
|
||||
@printf "baseurl=file://$$(realpath $(TOPLVL))/repo/\n\n" >> $(TOPLVL)/repo/yum.conf
|
||||
@cp $(2) $(TOPLVL)/repo/clear.cfg
|
||||
@printf "\n\n[localrepo]\nname=Local repo\nfailovermethod=priority\nenabled=1\ngpgcheck=0\npriority=1\n" >> $(TOPLVL)/repo/clear.cfg
|
||||
@printf "baseurl=file://$$(realpath $(TOPLVL))/repo/\n\n" >> $(TOPLVL)/repo/clear.cfg
|
||||
@sed -i '/^"""/d; $$a"""' $(TOPLVL)/repo/clear.cfg
|
||||
endef
|
||||
localrepoenable: $(TOPLVL)/repo
|
||||
@if grep -qx '\[localrepo\]' ${PM_CONF}; then \
|
||||
echo "[ERROR] ${PM_CONF} contains section named [localrepo]."; \
|
||||
echo "[ERROR] Remove that section and try again."; \
|
||||
exit 1; \
|
||||
fi >&2
|
||||
@if grep -qx '\[localrepo\]' ${MOCK_CONF}; then \
|
||||
echo "[ERROR] ${MOCK_CONF} contains section named [localrepo]."; \
|
||||
echo "[ERROR] Remove that section and try again."; \
|
||||
exit 1; \
|
||||
fi >&2
|
||||
@last="$$(tail -n 1 ${MOCK_CONF})"; \
|
||||
if [[ "$$last" != "\"\"\"" ]]; then \
|
||||
echo "[ERROR] Last line of ${MOCK_CONF} is malformed; expected: \"\"\"; actual: $$last"; \
|
||||
echo "[ERROR] Fix that line and try again."; \
|
||||
exit 1; \
|
||||
fi >&2
|
||||
@pm_new=$$(mktemp -p $< yum.conf.XXXXXXX); \
|
||||
pm_orig=$</yum.conf; \
|
||||
mock_new=$$(mktemp -p $< clear.cfg.XXXXXXX); \
|
||||
mock_orig=$</clear.cfg; \
|
||||
cp ${PM_CONF} $$pm_new; \
|
||||
printf "\n\n[localrepo]\nname=localrepo\nfailovermethod=priority\nenabled=1\ngpgcheck=0\npriority=1\n" >> $$pm_new; \
|
||||
printf "baseurl=file://$$(realpath $<)/\n\n" >> $$pm_new; \
|
||||
if ! cmp -s $$pm_new $$pm_orig; then \
|
||||
flock $</repo.lock mv $$pm_new $$pm_orig; \
|
||||
fi; \
|
||||
rm -f $$pm_new; \
|
||||
cp ${MOCK_CONF} $$mock_new; \
|
||||
sed -i '$$d' $$mock_new; \
|
||||
printf "\n\n[localrepo]\nname=localrepo\nfailovermethod=priority\nenabled=1\ngpgcheck=0\npriority=1\n" >> $$mock_new; \
|
||||
printf "baseurl=file://$$(realpath $<)/\n\n" >> $$mock_new; \
|
||||
sed -i '$$a"""' $$mock_new; \
|
||||
if ! cmp -s $$mock_new $$mock_orig; then \
|
||||
flock $</repo.lock mv $$mock_new $$mock_orig; \
|
||||
fi; \
|
||||
rm -f $$mock_new
|
||||
|
||||
# Disables the local RPM repo by removing the installed package manager and
|
||||
# Mock configuration files.
|
||||
localrepodisable:
|
||||
@rm -f $(TOPLVL)/repo/yum.conf
|
||||
@rm -f $(TOPLVL)/repo/clear.cfg
|
||||
localrepodisable: $(TOPLVL)/repo
|
||||
flock $</repo.lock rm -f $</yum.conf $</clear.cfg
|
||||
|
||||
# Runs createrepo_c (or createrepo) for the local RPM repo
|
||||
localrepocreate:
|
||||
( cd $(TOPLVL)/repo ; if type createrepo_c 1>/dev/null 2>&1; then createrepo_c .; else createrepo .; fi );
|
||||
# Runs createrepo_c for the local RPM repo
|
||||
localrepocreate: $(TOPLVL)/repo
|
||||
cd $< && flock repo.lock createrepo_c .
|
||||
|
||||
# Remove all RPMs from the local RPM repo
|
||||
localrepoclean:
|
||||
@find $(TOPLVL)/repo -maxdepth 1 -name '*.rpm' -delete
|
||||
localrepoclean: $(TOPLVL)/repo
|
||||
flock $</repo.lock find $< -maxdepth 1 -name '*.rpm' -delete
|
||||
|
||||
# Summarizes the local RPM repo status
|
||||
localrepostatus:
|
||||
|
||||
+1
-6
@@ -290,14 +290,9 @@ autospecnewgo: preautospecnew-checks localreponotice
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
$(TOPLVL)/repo:
|
||||
@echo "Creating local RPM repository $(TOPLVL)/repo"
|
||||
mkdir $(TOPLVL)/repo
|
||||
$(MAKE) localrepocreate
|
||||
|
||||
#help repoenable: Enables the local RPM repository for use with Yum/DNF and
|
||||
#help Mock. If this repository does not yet exist, it is created.
|
||||
repoenable: $(TOPLVL)/repo ; $(call localrepoenable,${PM_CONF},${MOCK_CONF})
|
||||
repoenable: localrepoenable ;
|
||||
|
||||
#help repodisable: Disables the local RPM repository.
|
||||
repodisable: localrepodisable ;
|
||||
|
||||
@@ -34,6 +34,7 @@ Judy
|
||||
Keras
|
||||
Keras_Applications
|
||||
Keras_Preprocessing
|
||||
LPCNet
|
||||
LS_COLORS
|
||||
LVM2
|
||||
LibRaw
|
||||
@@ -162,7 +163,6 @@ R-R.cache
|
||||
R-R.methodsS3
|
||||
R-R.oo
|
||||
R-R.utils
|
||||
R-R2Cuba
|
||||
R-R2HTML
|
||||
R-R2WinBUGS
|
||||
R-R2jags
|
||||
@@ -876,7 +876,6 @@ R-tis
|
||||
R-tm
|
||||
R-toOrdinal
|
||||
R-topicmodels
|
||||
R-treatSens
|
||||
R-tree
|
||||
R-triebeard
|
||||
R-trimcluster
|
||||
@@ -1046,12 +1045,14 @@ amtk
|
||||
analitza
|
||||
aniso8601
|
||||
ansible
|
||||
antlr4-python3-runtime
|
||||
anyjson
|
||||
apache-ant
|
||||
apache-libcloud
|
||||
apipkg
|
||||
appdirs
|
||||
applaunchservices
|
||||
applicationinsights
|
||||
appstream
|
||||
appstream-glib
|
||||
apr
|
||||
@@ -1116,11 +1117,94 @@ avahi
|
||||
awesome-wm
|
||||
awscli
|
||||
axel
|
||||
azure-batch
|
||||
azure-cli
|
||||
azure-cli-command-modules-nspkg
|
||||
azure-cli-core
|
||||
azure-cli-nspkg
|
||||
azure-cli-telemetry
|
||||
azure-common
|
||||
azure-configs
|
||||
azure-core
|
||||
azure-cosmos
|
||||
azure-datalake-store
|
||||
azure-functions-devops-build
|
||||
azure-graphrbac
|
||||
azure-iot-sdk
|
||||
azure-keyvault
|
||||
azure-keyvault-certificates
|
||||
azure-keyvault-keys
|
||||
azure-keyvault-secrets
|
||||
azure-loganalytics
|
||||
azure-mgmt-advisor
|
||||
azure-mgmt-apimanagement
|
||||
azure-mgmt-appconfiguration
|
||||
azure-mgmt-applicationinsights
|
||||
azure-mgmt-authorization
|
||||
azure-mgmt-batch
|
||||
azure-mgmt-batchai
|
||||
azure-mgmt-billing
|
||||
azure-mgmt-botservice
|
||||
azure-mgmt-cdn
|
||||
azure-mgmt-cognitiveservices
|
||||
azure-mgmt-compute
|
||||
azure-mgmt-consumption
|
||||
azure-mgmt-containerinstance
|
||||
azure-mgmt-containerregistry
|
||||
azure-mgmt-containerservice
|
||||
azure-mgmt-core
|
||||
azure-mgmt-cosmosdb
|
||||
azure-mgmt-datalake-analytics
|
||||
azure-mgmt-datalake-nspkg
|
||||
azure-mgmt-datalake-store
|
||||
azure-mgmt-datamigration
|
||||
azure-mgmt-deploymentmanager
|
||||
azure-mgmt-devtestlabs
|
||||
azure-mgmt-dns
|
||||
azure-mgmt-eventgrid
|
||||
azure-mgmt-eventhub
|
||||
azure-mgmt-hdinsight
|
||||
azure-mgmt-imagebuilder
|
||||
azure-mgmt-iotcentral
|
||||
azure-mgmt-iothub
|
||||
azure-mgmt-iothubprovisioningservices
|
||||
azure-mgmt-keyvault
|
||||
azure-mgmt-kusto
|
||||
azure-mgmt-loganalytics
|
||||
azure-mgmt-managedservices
|
||||
azure-mgmt-managementgroups
|
||||
azure-mgmt-maps
|
||||
azure-mgmt-marketplaceordering
|
||||
azure-mgmt-media
|
||||
azure-mgmt-monitor
|
||||
azure-mgmt-msi
|
||||
azure-mgmt-netapp
|
||||
azure-mgmt-network
|
||||
azure-mgmt-nspkg
|
||||
azure-mgmt-policyinsights
|
||||
azure-mgmt-privatedns
|
||||
azure-mgmt-rdbms
|
||||
azure-mgmt-recoveryservices
|
||||
azure-mgmt-recoveryservicesbackup
|
||||
azure-mgmt-redhatopenshift
|
||||
azure-mgmt-redis
|
||||
azure-mgmt-relay
|
||||
azure-mgmt-reservations
|
||||
azure-mgmt-resource
|
||||
azure-mgmt-search
|
||||
azure-mgmt-security
|
||||
azure-mgmt-servicebus
|
||||
azure-mgmt-servicefabric
|
||||
azure-mgmt-signalr
|
||||
azure-mgmt-sql
|
||||
azure-mgmt-sqlvirtualmachine
|
||||
azure-mgmt-storage
|
||||
azure-mgmt-trafficmanager
|
||||
azure-mgmt-web
|
||||
azure-multiapi-storage
|
||||
azure-nspkg
|
||||
azure-servicebus
|
||||
azure-storage-blob
|
||||
azure-storage-common
|
||||
babeltrace
|
||||
babl
|
||||
@@ -1349,6 +1433,7 @@ comedilib
|
||||
comfortaa-fonts
|
||||
commonmark
|
||||
compat-SDL2-soname1
|
||||
compat-boost-soname1.72.0
|
||||
compat-cryptsetup-soname4
|
||||
compat-curl-gnutls-soname4
|
||||
compat-double-conversion-soname1
|
||||
@@ -1579,6 +1664,7 @@ envs
|
||||
eog
|
||||
eog-plugins
|
||||
epm
|
||||
epson-inkjet-printer-escpr
|
||||
eternalegypt
|
||||
ethtool
|
||||
etr
|
||||
@@ -1602,6 +1688,7 @@ extras
|
||||
f2fs-tools
|
||||
faas-cli
|
||||
faba-icon-theme
|
||||
fabric
|
||||
fakeroot
|
||||
fangfrisch
|
||||
fann
|
||||
@@ -1689,6 +1776,7 @@ gcab
|
||||
gcc
|
||||
gcc7
|
||||
gcc8
|
||||
gcc9
|
||||
gcompris-qt
|
||||
gcr
|
||||
gcs-oauth2-boto-plugin
|
||||
@@ -1970,12 +2058,12 @@ intel-media-driver
|
||||
intelhex
|
||||
intervaltree
|
||||
intltool
|
||||
invoke
|
||||
ioc-cbc-tools
|
||||
ioping
|
||||
ioport
|
||||
iotop
|
||||
ipaddr
|
||||
ipaddress
|
||||
ipcalc
|
||||
ipdb
|
||||
ipdbplugin
|
||||
@@ -2005,6 +2093,7 @@ isa-l
|
||||
iso-codes
|
||||
iso8601
|
||||
isodate
|
||||
isomd5sum
|
||||
isort
|
||||
ister
|
||||
isync
|
||||
@@ -2020,6 +2109,7 @@ jaraco.collections
|
||||
jaraco.functools
|
||||
jaraco.text
|
||||
jarn.viewdoc
|
||||
javaproperties
|
||||
jdcal
|
||||
jedi
|
||||
jedi-vim
|
||||
@@ -2031,6 +2121,7 @@ joe
|
||||
josepy
|
||||
jpegoptim
|
||||
jq
|
||||
jsmin
|
||||
json-c
|
||||
json-glib
|
||||
json5
|
||||
@@ -2211,6 +2302,7 @@ kmod
|
||||
kmousetool
|
||||
kmouth
|
||||
kmplot
|
||||
knack
|
||||
knavalbattle
|
||||
knetwalk
|
||||
knewstuff
|
||||
@@ -2772,6 +2864,8 @@ mpir
|
||||
mpmath
|
||||
mpv
|
||||
mraa
|
||||
msal
|
||||
msal-extensions
|
||||
msgpack
|
||||
msgpack-c
|
||||
msm
|
||||
@@ -3490,6 +3584,7 @@ perl-Math-Utils
|
||||
perl-Math-Vec
|
||||
perl-Memoize-ExpireLRU
|
||||
perl-Meta-Builder
|
||||
perl-Metrics-Any
|
||||
perl-Minion
|
||||
perl-Mixin-Linewise
|
||||
perl-Mock-Config
|
||||
@@ -3717,6 +3812,7 @@ perl-Test-LectroTest
|
||||
perl-Test-LongString
|
||||
perl-Test-Manifest
|
||||
perl-Test-Memory-Cycle
|
||||
perl-Test-Metrics-Any
|
||||
perl-Test-MockModule
|
||||
perl-Test-MockTime
|
||||
perl-Test-More-UTF8
|
||||
@@ -3985,6 +4081,7 @@ polkit-qt
|
||||
poppler
|
||||
poppler-data-clr-rename
|
||||
popt
|
||||
portalocker
|
||||
portaudio
|
||||
portend
|
||||
positional
|
||||
@@ -4327,7 +4424,9 @@ scikit-image
|
||||
scikit-learn
|
||||
scipy
|
||||
scons
|
||||
scour
|
||||
scowl
|
||||
scp
|
||||
screen
|
||||
scripttest
|
||||
scrypt
|
||||
@@ -4430,6 +4529,7 @@ squashfs-tools
|
||||
squid
|
||||
sshfs
|
||||
sshpass
|
||||
sshtunnel
|
||||
ssocr
|
||||
sssd
|
||||
ssw
|
||||
@@ -4471,7 +4571,6 @@ sweeper
|
||||
swift
|
||||
swig
|
||||
swupd-client
|
||||
swupd-client-pre-release
|
||||
swupd-overdue
|
||||
swupd-probe
|
||||
swupd-search
|
||||
@@ -4658,6 +4757,8 @@ voluptuous-serialize
|
||||
vpnc
|
||||
vpp
|
||||
vsqlite
|
||||
vsts
|
||||
vsts-cd-manager
|
||||
vte
|
||||
waffle
|
||||
waitress
|
||||
@@ -4736,9 +4837,12 @@ xf86-video-vesa
|
||||
xf86-video-vmware
|
||||
xfburn
|
||||
xfce4-appfinder
|
||||
xfce4-battery-plugin
|
||||
xfce4-dev-tools
|
||||
xfce4-notifyd
|
||||
xfce4-panel
|
||||
xfce4-pulseaudio-plugin
|
||||
xfce4-screensaver
|
||||
xfce4-screenshooter
|
||||
xfce4-session
|
||||
xfce4-settings
|
||||
@@ -4785,6 +4889,7 @@ xvfb-run
|
||||
xwd
|
||||
xwdrun
|
||||
xwininfo
|
||||
xxhash
|
||||
xz
|
||||
yajl
|
||||
yakuake
|
||||
|
||||
Reference in New Issue
Block a user