Compare commits

..

7 Commits

Author SHA1 Message Date
William Douglas 398fb69708 Always remove the pumpAutospec file
Remove pumpAutospec even if the package hasn't yet become a git repo
yet.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-07-24 15:36:47 -07:00
William Douglas cdcb8aa9d8 Switch to git rm for removing the autospec log file
Signed-off-by: William Douglas <william.douglas@intel.com>
2024-07-22 16:38:33 -07:00
Arjan van de Ven 3168ba058e update 2024-07-22 23:22:51 +00:00
William Douglas 76fef57d5b Add env var for autospec logging
Add environment variable that autospec uses to decide when to log
fatal errors to a special file used for the update process.

Also does the cleanup of the autospec created file for new autospec
runs.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-07-22 16:20:55 -07:00
Arjan van de Ven 59ea0b102e new packages file 2024-07-09 18:23:06 +00:00
William Douglas e4c604a161 Export the output of cargo vendor
autospec learned how to use 'cargo vendor' output as a drop in
configuration file so put the output of cargo vendor there.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-07-08 15:11:34 -07:00
William Douglas 59c4520f37 Fix import order
Signed-off-by: William Douglas <william.douglas@intel.com>
2024-07-08 14:07:10 -07:00
3 changed files with 34 additions and 11 deletions
+2
View File
@@ -166,6 +166,7 @@ preautospec-checks:
#help to autospec.
#help For more information, see the project at https://github.com/clearlinux/autospec
autospec: preautospec-checks pullrebase localreponotice clean-old-content
git rm --ignore-unmatch pumpAutospec || rm -f pumpAutospec
@if [ -e $(SPECFILE) ] && ! grep -q "# Generated by: autospec.py" $(SPECFILE) ; then \
echo "Specfile already exists and was not created by autospec.py! Aborting."; \
exit 1; \
@@ -406,6 +407,7 @@ update-versions:
#help or update the package and push the update to koji.
#help If no update.sh exists, update the version, autospec and push the
#help update to koji (bumping the bump.list if found).
update: export AUTOSPEC_UPDATE=1
update:
@if [ -f update.first ]; then \
for pkg in $$(< update.first); do \
+21 -2
View File
@@ -121,6 +121,7 @@ R-MNP
R-MatchIt
R-Matching
R-MatrixModels
R-MetricsWeighted
R-ModelMetrics
R-NADA
R-NLP
@@ -148,6 +149,7 @@ R-RNetCDF
R-ROCR
R-ROSE
R-RProtoBuf
R-RPushbullet
R-RSQLite
R-RSclient
R-RUnit
@@ -216,6 +218,7 @@ R-arules
R-ash
R-askpass
R-assertthat
R-audio
R-backports
R-base64enc
R-base64url
@@ -338,6 +341,7 @@ R-distr
R-distrEx
R-distributional
R-dlm
R-doBy
R-doMC
R-doMPI
R-doParallel
@@ -914,6 +918,7 @@ R-spatstat.linnet
R-spatstat.model
R-spatstat.random
R-spatstat.sparse
R-spatstat.univar
R-spatstat.utils
R-spc
R-spdep
@@ -963,6 +968,7 @@ R-tibble
R-tidyr
R-tidyrules
R-tidyselect
R-tidytable
R-tidyverse
R-tikzDevice
R-timeDate
@@ -1072,6 +1078,7 @@ WPEBackend-fdo
WireGuard
XStatic-term.js
Z3
aardvark-dns
abireport
abseil-cpp
accel-config
@@ -1160,7 +1167,6 @@ bash-completion
bashdb
bats
bc
bcache-tools
bcachefs-tools
bcc
bcftools
@@ -1221,6 +1227,7 @@ byobu
bz2file
bzip2
c-ares
c-blosc2
cJSON
c_rehash
ca-certs
@@ -1246,6 +1253,7 @@ cereal
cfitsio
cgdb
cgit
chafa
check
cheese
chirp
@@ -1392,6 +1400,7 @@ dbus-glib
dbus-python
dconf
dconf-editor
ddcutil
ddd
deap
debugedit
@@ -1500,8 +1509,10 @@ fakeroot
falcosecurity-libs
fann
farstream
fastfetch
faultstat
fcgi
fd
fdk-aac
fdupes
feh
@@ -2347,6 +2358,7 @@ libva-intel-driver
libva-utils
libvdpau
libvirt
libvirt-dbus
libvirt-glib
libvirt-python
libvisio
@@ -2503,6 +2515,7 @@ modsecurity
modsecurity-nginx
modules
mokutil
mold
mono
moreutils
mosh
@@ -2552,6 +2565,7 @@ neovim
net-snmp
net-tools
netaddr
netavark
netbase
netcdf
netcdf-fortran
@@ -2678,6 +2692,7 @@ parallel
parley
parted
pass
passt
passwdqc
patch
patchelf
@@ -3859,6 +3874,7 @@ pypi-cu2qu
pypi-curio
pypi-cvss
pypi-cxxfilt
pypi-cysystemd
pypi-cython
pypi-cytoolz
pypi-dacite
@@ -3941,6 +3957,7 @@ pypi-flaky
pypi-flask
pypi-flatbuffers
pypi-flatten_json
pypi-flexcache
pypi-flexparser
pypi-flit
pypi-flit_core
@@ -4208,6 +4225,7 @@ pypi-numexpr
pypi-numpoly
pypi-numpy
pypi-numpydoc
pypi-nvidia_ml_py
pypi-oauth2client
pypi-oauthlib
pypi-olefile
@@ -4217,6 +4235,7 @@ pypi-openshift
pypi-openstep_plist
pypi-opt_einsum
pypi-ordered_set
pypi-orjson
pypi-ouimeaux
pypi-outcome
pypi-overrides
@@ -4361,7 +4380,6 @@ pypi-pypresence
pypi-pyproject_api
pypi-pyproject_hooks
pypi-pyproject_metadata
pypi-pyprojectx
pypi-pypsrp
pypi-pyqrcode
pypi-pyqt5_sip
@@ -4955,6 +4973,7 @@ slurm
smartmontools
smemstat
snappy
snapshot
sndio
socat
socket.io-client-cpp
+11 -9
View File
@@ -9,9 +9,8 @@ import subprocess
import tempfile
import time
from git import Repo
import requests
from git import Repo
def vendor_check():
@@ -74,13 +73,14 @@ def update_cargo_vendor(path, name, git):
subprocess.run(f"cp -a {vendor_git} {backup_vendor_git}", cwd=path,
shell=True, check=True, stdout=subprocess.DEVNULL)
shutil.rmtree(vendor_path)
subprocess.run('cargo vendor', cwd=path, shell=True, check=True,
stdout=subprocess.DEVNULL)
cargo_vendors = subprocess.run('cargo vendor', cwd=path, shell=True,
check=True, stdout=subprocess.PIPE,
universal_newlines=True).stdout
subprocess.run(f"cp -a {backup_vendor_git} {vendor_git}", cwd=path,
shell=True, check=True, stdout=subprocess.DEVNULL)
repo = Repo(vendor_path)
if not (len(repo.untracked_files) > 0 or repo.is_dirty()):
return False
return False, ""
subprocess.run('git add .', cwd=vendor_path, shell=True, check=True,
stdout=subprocess.DEVNULL)
subprocess.run('git commit -m "vendor update"', cwd=vendor_path,
@@ -92,10 +92,10 @@ def update_cargo_vendor(path, name, git):
subprocess.run(f"git push origin main:main {tag}", cwd=vendor_path,
shell=True, check=True, stdout=subprocess.DEVNULL)
time.sleep(30)
return tag
return tag, cargo_vendors
def update_cargo_sources(name, tag):
def update_cargo_sources(name, tag, cargo_vendors):
makefile = []
options = []
archive_match = os.path.join(r'\$\(CGIT_BASE_URL\)', 'vendor', name,
@@ -132,6 +132,8 @@ def update_cargo_sources(name, tag):
options.append(line)
with open('options.conf', 'w', encoding='utf8') as ofile:
ofile.writelines(options)
with open('cargo_vendors', 'w', encoding='utf8') as cfile:
cfile.write(cargo_vendors)
def main():
@@ -147,9 +149,9 @@ def main():
if vtype == 'cargo':
vdir = setup_cargo_vendor(tdir)
if vdir:
tag = update_cargo_vendor(vdir, args.name, args.git)
tag, cargo_vendors = update_cargo_vendor(vdir, args.name, args.git)
if tag:
update_cargo_sources(args.name, tag)
update_cargo_sources(args.name, tag, cargo_vendors)
updated = True
if not updated:
print(args.archives)