Compare commits

...

10 Commits

Author SHA1 Message Date
Arjan van de Ven f825b6b7fc update packages file 2025-02-12 07:05:01 +00:00
Arjan van de Ven 4627d7a47d update packages file 2025-02-04 18:21:27 +00:00
Arjan van de Ven 8b2e15fa59 update packages file 2025-01-28 17:50:13 +00:00
Arjan van de Ven ec3903192a update packages file 2025-01-24 00:07:48 +00:00
Arjan van de Ven da6bc31e4a update packages file 2025-01-17 14:49:29 +00:00
Arjan van de Ven c360ffe52c update packages file 2025-01-09 19:17:51 +00:00
Arjan van de Ven f092f66d8d update packages file 2024-12-19 06:03:26 +00:00
Brett T. Warden 704e8c90b8 Cleanup parsing of version from specfile in catchup targets
Make sure we only parse %{version} one time while doing a catchup.
2024-12-05 17:11:40 -08:00
Brett T. Warden 1ca80a16a3 Implement catchup targets
Implement a new target 'catchup' that will backport upstream commits
from the current package version to HEAD.
Implement a new target 'catchup-<commit|tag>' that will backport
upstream commits up to the target, as resolvable by git. This powers
'catchup'.
Rework the target 'backport-<commit>' to clone and use the upstream
git repository instead of using GitHub URLs. This also simplifies the
resolution of targets to full commit hashes, as needed to ensure unique
patch names and entries in 'series'.

'make catchup' will backport all the patches to catch this package up to
the upstream's HEAD
'make catchup-v5.0' will backport all the patches to catch this package
up to tag "v5.0" upstream.
'make catchup-ffdcba' will backport all the patches between this
package's current version and the upstream commit ffdcba.
'make backport-ffdcba' will backport ONLY upstream commit ffdcba.

All targets will produce patches named "backport-<commit>.patch", where
<commit> is the full SHA1 commit hash, regardless of whether you used an
abbreviated hash (or a tag, for catchup-%).

Patches are added to 'series' in chronological order, unless they're
already anywhere in that file.
2024-12-05 16:00:31 -08:00
Arjan van de Ven 27e359bda0 update packages file 2024-12-05 19:57:20 +00:00
2 changed files with 76 additions and 18 deletions
+56 -14
View File
@@ -582,27 +582,69 @@ cloc: $(SRPMFILE)
@$(MOCK) --clean --scrub=chroot --uniqueext=$(PKG_NAME)
cat results/cloc.txt
#help backport-<commit>: Retrieve a commit from the upstream git repository and save it as a backport patch.
#help Currently only works with GitHub repositories. The giturl is read from options.conf.
backport-%:
@commit=$*; \
echo "Backporting commit: $${commit}"; \
giturl=$$(grep -E '^giturl\s*=\s*https://github.com' options.conf | sed 's/giturl\s*=\s*//' | sed 's/\.git$$//' | sed 's/\/$$//' 2>/dev/null); \
#help catchup: Backport the commits from the current version to the upstream HEAD (not release).
#help Only works if giturl is defined and the current package version can be mapped to a git tag.
catchup:
$(MAKE) catchup-HEAD
#help catchup-<commit|tag>: Backport the commits from the current version to the specified commit or tag.
#help Only works if giturl is defined and the current package version can be mapped to a git tag.
catchup-%:
@target=$*; \
giturl=$$(grep -E '^giturl\s*=\s*\S+' options.conf | sed 's/giturl\s*=\s*//' 2>/dev/null); \
if [[ -z "$${giturl}" ]]; then \
echo "Error: giturl not defined in options.conf"; \
exit 1; \
fi; \
if ! curl -s -L -o $@.patch $${giturl}/commit/$*.patch || [[ "Not Found" == $$(< $@.patch) ]]; then \
rm -f $@.patch; \
echo "Error: Failed to download commit $*"; \
mkdir -p results; \
if [[ -d results/$(PKG_NAME) ]]; then \
echo "Reusing existing repository..."; \
git -C results/$(PKG_NAME) fetch origin; \
else \
echo "Cloning upstream repository..."; \
git -C results clone "$${giturl}" $(PKG_NAME); \
fi; \
if ! git -C results/$(PKG_NAME) rev-parse --verify --quiet "$${target}" >/dev/null; then \
echo "Error: Target commit/tag $${target} not found"; \
exit 1; \
fi; \
patch=$@.patch; \
full_commit=$$(head -1 $@.patch | grep -oE '\b$*\S+' 2>/dev/null); \
if ! [[ -z "$${full_commit}" ]]; then \
patch=backport-$${full_commit}.patch; \
mv $@.patch $${patch}; \
version=$$(rpm -q --qf '%{VERSION}\n' --specfile $(SPECFILE) | head -1); \
echo "Version: $${version}"; \
current_tag=$$(git -C results/$(PKG_NAME) tag --list | grep -E "^($(PKG_NAME)-)?v?$${version}$$") || { \
echo "Error: No tag found for current package version"; \
exit 1; \
}; \
echo "Catching up from $${current_tag} to $${target}"; \
for commit in $$(git -C results/$(PKG_NAME) log --reverse --pretty=oneline $${current_tag}..$${target} | cut -d' ' -f1); do \
$(MAKE) backport-$${commit}; \
done;
#help backport-<commit>: Retrieve a commit from the upstream git repository and save it as a backport patch.
#help The giturl is read from options.conf.
backport-%:
@commit=$*; \
echo "Backporting commit: $${commit}"; \
giturl=$$(grep -E '^giturl\s*=\s*\S+' options.conf | sed 's/giturl\s*=\s*//' 2>/dev/null); \
if [[ -z "$${giturl}" ]]; then \
echo "Error: giturl not defined in options.conf"; \
exit 1; \
fi; \
mkdir -p results; \
if [[ -d results/$(PKG_NAME) ]]; then \
echo "Reusing existing repository..."; \
git -C results/$(PKG_NAME) fetch origin; \
else \
echo "Cloning upstream repository..."; \
git -C results clone "$${giturl}" $(PKG_NAME); \
fi; \
full_commit=$$(git -C results/$(PKG_NAME) show --pretty=oneline $${commit} 2>/dev/null | head -1 | cut -d' ' -f 1); \
if [[ -z "$${full_commit}" ]]; then \
echo "Error: Commit for $${commit} not found"; \
exit 1; \
fi; \
patch=backport-$${full_commit}.patch; \
git -C results/$(PKG_NAME) format-patch -1 --stdout $${full_commit} > $${patch}; \
if [[ -s $${patch} ]]; then \
echo "$${patch} created"; \
grep -qE "^$${patch}$$" series 2>/dev/null || echo "$${patch}" >> series; \
+20 -4
View File
@@ -811,6 +811,7 @@ R-readr
R-readstata13
R-readxl
R-recipes
R-reformulas
R-registry
R-relimp
R-rematch
@@ -1207,6 +1208,7 @@ boost
borgbackup
boto3
botocore
bottom
bovo
box2d
bpftool
@@ -1237,6 +1239,7 @@ buildreq-qmake
buildreq-qt6
buildreq-scons
buildx
bwidget
byobu
bz2file
bzip2
@@ -1372,6 +1375,7 @@ compat-taglib-soname1
compat-tbb-soname2
compat-tiff-soname5
compat-wlroots-soname11
compat-yaml-cpp-soname6
component
compose
configobj
@@ -1753,6 +1757,7 @@ gstreamer-vaapi
gtk+
gtk-doc
gtk-frdp
gtk-layer-shell
gtk-vnc
gtk-xfce-engine
gtk3
@@ -1846,6 +1851,7 @@ ipe
iperf
ipmitool
ipp-crypto
ipp-usb
iproute2
ipset
iptables
@@ -1858,6 +1864,7 @@ irrlicht
irrlichtmt
irssi
isa-l
isl
iso-codes
isodate
isomd5sum
@@ -2385,6 +2392,7 @@ libva
libva-intel-driver
libva-utils
libvdpau
libversion
libvirt
libvirt-dbus
libvirt-glib
@@ -2438,6 +2446,7 @@ linux-ltscurrent
linux-ltsprev
linux-preempt-rt
linux-tools
linuxcnc
linuxptp
lksctp-tools
lldpd
@@ -2505,7 +2514,6 @@ mesa
mesa-demos
meson
messagelib
meta-c-basic
meta-desktop-gnome
meta-os-core
meta-os-core-plus
@@ -2528,6 +2536,7 @@ mingw-crt
mingw-gcc
minicom
minimodem
minizip-ng
minuet
mixer-tools
mkfontdir
@@ -3651,7 +3660,6 @@ php-zmq
picmi
picocom
pidgin
pidgin-sipe
pigeonhole
pigz
pim-data-exporter
@@ -3739,6 +3747,7 @@ pynvim
pyotherside
pyotp
pyparted
pypi-Yapps
pypi-absl_py
pypi-abydos
pypi-accelerate
@@ -4158,7 +4167,6 @@ pypi-jupyterlab_server
pypi-jupyterlab_widgets
pypi-jupyterlite_core
pypi-jupyterlite_pyodide_kernel
pypi-jupyterlite_sphinx
pypi-jxmlease
pypi-kcc
pypi-kerberos
@@ -4505,6 +4513,7 @@ pypi-rapidfuzz
pypi-rapidfuzz_capi
pypi-rcssmin
pypi-rdflib
pypi-re2
pypi-readme_renderer
pypi-readtime
pypi-recommonmark
@@ -4810,6 +4819,7 @@ pypi-zope.security
pypi-zope.testing
pypi-zope.testrunner
pypi-zopfli
pystring
python
python-digitalocean
python-distutils-extra
@@ -4979,6 +4989,7 @@ s3fs-fuse
salt
samba
samtools
sane-airscan
sane-backends
sassc
sbc
@@ -4991,6 +5002,7 @@ scour
scowl
screen
scummvm
scx
sddm
sddm-kcm
seahorse
@@ -5102,7 +5114,9 @@ tallow
tar
taskwarrior
tbb
tbtools
tcl
tclx
tcpdump
tdb
tecla
@@ -5157,6 +5171,7 @@ udisks2
udunits
uget
uhttpmock
uhubctl
umockdev
unbundle
unibilium
@@ -5171,7 +5186,6 @@ usb-modeswitch-data
usbredir
usbutils
userspace-rcu
usrbinjava
usrbinvi
usrsctp
utf8proc
@@ -5231,6 +5245,7 @@ wlroots
wmctrl
woff2
wol
wolfssl
wpa_supplicant
wsjtx
wslu
@@ -5351,6 +5366,7 @@ zenity
zimg
zip
zlib
zlib-ng
znc
zopfli
zsh