mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 19:16:00 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 305bf6f63b | |||
| 4797950600 | |||
| 18b1f4841d | |||
| 2a061d8ec2 | |||
| 47927ff332 | |||
| 80bb811f5f | |||
| 71827cbf99 | |||
| 84a9b62e3f | |||
| 0dfb2f6ef5 | |||
| 59a46563cf | |||
| a198b2d0a0 | |||
| 9574f4ecde | |||
| 649f1e38de | |||
| 0b86a75a10 | |||
| a06eab078d |
+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 ;
|
||||
|
||||
@@ -163,7 +163,6 @@ R-R.cache
|
||||
R-R.methodsS3
|
||||
R-R.oo
|
||||
R-R.utils
|
||||
R-R2Cuba
|
||||
R-R2HTML
|
||||
R-R2WinBUGS
|
||||
R-R2jags
|
||||
@@ -589,6 +588,7 @@ R-mlmRev
|
||||
R-mnormt
|
||||
R-mockery
|
||||
R-mockr
|
||||
R-modeldata
|
||||
R-modelr
|
||||
R-modeltools
|
||||
R-modest
|
||||
@@ -877,7 +877,6 @@ R-tis
|
||||
R-tm
|
||||
R-toOrdinal
|
||||
R-topicmodels
|
||||
R-treatSens
|
||||
R-tree
|
||||
R-triebeard
|
||||
R-trimcluster
|
||||
@@ -1132,6 +1131,7 @@ azure-cosmos
|
||||
azure-datalake-store
|
||||
azure-functions-devops-build
|
||||
azure-graphrbac
|
||||
azure-identity
|
||||
azure-iot-sdk
|
||||
azure-keyvault
|
||||
azure-keyvault-certificates
|
||||
@@ -1435,6 +1435,7 @@ comedilib
|
||||
comfortaa-fonts
|
||||
commonmark
|
||||
compat-SDL2-soname1
|
||||
compat-boost-soname1.72.0
|
||||
compat-cryptsetup-soname4
|
||||
compat-curl-gnutls-soname4
|
||||
compat-double-conversion-soname1
|
||||
@@ -1665,6 +1666,7 @@ envs
|
||||
eog
|
||||
eog-plugins
|
||||
epm
|
||||
epson-inkjet-printer-escpr
|
||||
eternalegypt
|
||||
ethtool
|
||||
etr
|
||||
@@ -1776,6 +1778,7 @@ gcab
|
||||
gcc
|
||||
gcc7
|
||||
gcc8
|
||||
gcc9
|
||||
gcompris-qt
|
||||
gcr
|
||||
gcs-oauth2-boto-plugin
|
||||
@@ -2092,6 +2095,7 @@ isa-l
|
||||
iso-codes
|
||||
iso8601
|
||||
isodate
|
||||
isomd5sum
|
||||
isort
|
||||
ister
|
||||
isync
|
||||
@@ -2177,6 +2181,7 @@ kcachegrind
|
||||
kcalc
|
||||
kcalendarcore
|
||||
kcalutils
|
||||
kcc
|
||||
kcharselect
|
||||
kcmutils
|
||||
kcodecs
|
||||
@@ -2226,7 +2231,6 @@ keepassxc
|
||||
kemoticons
|
||||
kerberos
|
||||
kernel-config
|
||||
kernel-config-checker
|
||||
kernel-install
|
||||
kexec-tools
|
||||
keychain
|
||||
@@ -2368,6 +2372,7 @@ kwallet-pam
|
||||
kwalletmanager
|
||||
kwayland
|
||||
kwayland-integration
|
||||
kwayland-server
|
||||
kwidgetsaddons
|
||||
kwin
|
||||
kwindowsystem
|
||||
@@ -3162,6 +3167,7 @@ perl-AnyEvent-CacheDNS
|
||||
perl-Apache-Htpasswd
|
||||
perl-Apache-LogFormat-Compiler
|
||||
perl-Apache-Session
|
||||
perl-App-MigrateModules
|
||||
perl-App-Nopaste
|
||||
perl-App-cpanminus
|
||||
perl-App-perlbrew
|
||||
@@ -3442,6 +3448,7 @@ perl-Geo-IP
|
||||
perl-Geo-IPfree
|
||||
perl-Getopt-Euclid
|
||||
perl-Getopt-Long-Descriptive
|
||||
perl-Getopt-Long-Modern
|
||||
perl-Getopt-Tabular
|
||||
perl-Git-Version-Compare
|
||||
perl-Glib
|
||||
@@ -3475,6 +3482,7 @@ perl-HTTP-Negotiate
|
||||
perl-HTTP-Parser-XS
|
||||
perl-HTTP-Request-AsCGI
|
||||
perl-HTTP-Server-Simple
|
||||
perl-HTTP-Tinyish
|
||||
perl-Hash-Flatten
|
||||
perl-Hash-Merge
|
||||
perl-Hash-MoreUtils
|
||||
@@ -3810,6 +3818,7 @@ perl-Test-LectroTest
|
||||
perl-Test-LongString
|
||||
perl-Test-Manifest
|
||||
perl-Test-Memory-Cycle
|
||||
perl-Test-MemoryGrowth
|
||||
perl-Test-Metrics-Any
|
||||
perl-Test-MockModule
|
||||
perl-Test-MockTime
|
||||
@@ -3951,6 +3960,7 @@ perl-local-lib
|
||||
perl-multidimensional
|
||||
perl-namespace-autoclean
|
||||
perl-namespace-clean
|
||||
perl-pmtools
|
||||
perl-prefork
|
||||
perl-strictures
|
||||
persistent
|
||||
@@ -4061,6 +4071,7 @@ plasma-nm
|
||||
plasma-pa
|
||||
plasma-sdk
|
||||
plasma-vault
|
||||
plasma-wayland-protocols
|
||||
plasma-workspace
|
||||
plasma-workspace-wallpapers
|
||||
plata-theme
|
||||
@@ -4422,6 +4433,7 @@ scikit-image
|
||||
scikit-learn
|
||||
scipy
|
||||
scons
|
||||
scour
|
||||
scowl
|
||||
scp
|
||||
screen
|
||||
@@ -4834,6 +4846,7 @@ xf86-video-vesa
|
||||
xf86-video-vmware
|
||||
xfburn
|
||||
xfce4-appfinder
|
||||
xfce4-battery-plugin
|
||||
xfce4-dev-tools
|
||||
xfce4-notifyd
|
||||
xfce4-panel
|
||||
@@ -4885,6 +4898,7 @@ xvfb-run
|
||||
xwd
|
||||
xwdrun
|
||||
xwininfo
|
||||
xxhash
|
||||
xz
|
||||
yajl
|
||||
yakuake
|
||||
|
||||
Reference in New Issue
Block a user