3 Commits

Author SHA256 Message Date
Jiri Slaby
b0edd63f02 update released 2025-04-15 09:43:20 +02:00
Jiri Slaby
0dc09dfec5 check_for_updates: rewrite to py
Easier rpm parsing.

And add suport for github tokens.
2025-04-15 09:39:16 +02:00
Jiri Slaby
8f5c3395fa update plugins 2025-04-15 09:39:13 +02:00
20 changed files with 131 additions and 82 deletions

View File

@@ -1,7 +1,17 @@
<services>
<service name="obs_scm" mode="disabled">
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/joe-skb7/cscope-maps.git</param>
<param name="scm">git</param>
<param name="versionformat">%cd</param>
</service>
<service name="tar" mode="buildtime">
<param name="obsinfo">cscope-maps.obsinfo</param>
</service>
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/bogado/file-line.git</param>
<param name="scm">git</param>
<param name="revision">main</param>
<param name="versionformat">@PARENT_TAG@+%cd</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="versionrewrite-replacement">\1</param>
@@ -10,7 +20,7 @@
<param name="obsinfo">file-line.obsinfo</param>
</service>
<service name="obs_scm" mode="disabled">
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/neomutt/neomutt.vim.git</param>
<param name="scm">git</param>
<param name="versionformat">%cd</param>
@@ -20,7 +30,7 @@
<param name="obsinfo">neomutt.vim.obsinfo</param>
</service>
<service name="obs_scm" mode="disabled">
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/saltstack/salt-vim.git</param>
<param name="scm">git</param>
<param name="versionformat">%cd</param>
@@ -29,7 +39,7 @@
<param name="obsinfo">salt-vim.obsinfo</param>
</service>
<service name="obs_scm" mode="disabled">
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/vim-latex/vim-latex</param>
<param name="scm">git</param>
<param name="versionformat">@PARENT_TAG@+%cd</param>
@@ -40,7 +50,7 @@
<param name="obsinfo">vim-latex.obsinfo</param>
</service>
<service name="obs_scm" mode="disabled">
<service name="obs_scm" mode="manual">
<param name="url">https://github.com/plasticboy/vim-markdown</param>
<param name="scm">git</param>
<param name="versionformat">@PARENT_TAG@+%cd</param>

View File

@@ -1,43 +0,0 @@
#!/usr/bin/perl
use warnings;
use strict;
use Data::Dumper;
use JSON;
use LWP::UserAgent;
open(SPEC, '<vim-plugins.spec') or die "cannot open spec";
my $spec;
{
local $/ = undef;
$spec = <SPEC>;
}
close(SPEC);
my $child = open(SPEC, '-|', qw|rpm -E|, $spec) // die "cannot run rpm";
exit 0 unless ($child);
my $ua = LWP::UserAgent->new;
my $json = JSON->new->allow_nonref;
while (<SPEC>) {
chomp;
my ($org, $repo, $rel, $ver) = (m@^Source\d+:\s+https://github\.com/([^/]+)/([^/]+)/(?:archive/refs/tags|releases/download/([^/]+))/([^/]+)\.tar\.gz#@);
next unless defined $ver;
$ver = $rel if defined $rel;
my $req_url = defined $rel ? 'releases/latest' : 'tags';
my $req = HTTP::Request->new(GET => "https://api.github.com/repos/$org/$repo/$req_url");
my $res = $ua->request($req);
die "bad HTTP reply for $org/$repo -- \"" . $res->status_line . '"' unless ($res->is_success);
my $j = $json->decode($res->content);
$j = @{$j}[0] unless (defined $rel);
my $ver2 = $j->{'name'} || $j->{'tag_name'};
if ($ver2 ne $ver) {
print "$org, $repo, $ver -> $ver2\n";
}
}
close(SPEC);
1;

55
check_for_updates.py Executable file
View File

@@ -0,0 +1,55 @@
#!/usr/bin/python3
import argparse
import re
import requests
import rpm
import sys
from termcolor import colored
parser = argparse.ArgumentParser()
parser.add_argument('-t', '--token')
args = parser.parse_args()
ts = rpm.TransactionSet()
spec = ts.parseSpec('vim-plugins.spec')
ver_re = re.compile(r"https://github\.com/(?P<org>[^/]+)/(?P<repo>[^/]+)/(?:archive/refs/tags|releases/download/(?P<rel>[^/]+))/(?P<ver>[^/]+)\.tar\.gz#")
for src in spec.sources:
if src[2] != 1: # Source
continue
m = ver_re.match(src[0])
if m is None:
continue
org = m.group('org')
repo = m.group('repo')
rel = m.group('rel')
ver = m.group('ver')
if ver is None:
continue
print(colored(f"Checking {org}/{repo} (current rel='{rel}' ver='{ver}')", 'green'))
url_suffix = 'tags'
if rel is not None:
url_suffix = 'releases/latest'
ver = rel
headers = {}
if args.token:
headers['Authorization'] = f"token {args.token}"
get = requests.get(f"https://api.github.com/repos/{org}/{repo}/{url_suffix}", headers=headers)
if not get.ok:
print(f"bad HTTP reply for {org}/{repo}: {get.status_code} {get.reason}")
sys.exit(1)
js = get.json()
if rel is None:
js = js[0] # take the latest tag only
ver2 = js['name'] or js['tag_name']
if ver != ver2:
print(colored(f"\t{ver2} available", 'red'))

BIN
cscope-maps-20210418.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

4
cscope-maps.obsinfo Normal file
View File

@@ -0,0 +1,4 @@
name: cscope-maps
version: 20210418
mtime: 1618746153
commit: 6cb3c8228dc506e91ad39b192d20f8496a5e49b5

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a951da2d1501cb50d02e801f6d0349c6a95a762de7f5e4af2eb5f5bc6a28b685
size 93195

BIN
neomutt.vim-20241013.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,4 +1,4 @@
name: neomutt.vim
version: 20220612
mtime: 1655060512
commit: 4f87a1e1fa3e4b343558594f3b5490cd028b8718
version: 20241013
mtime: 1728812981
commit: 0081eb9ab89d06b5d29678721463e0148b4b4575

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:25f81b34a00b74299b4e0c55ea2e5da25250f0b5318ccd9d434ecc9f8c1e9d14
size 1012236

BIN
vim-latex-1.10.0+20250111.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,4 +1,4 @@
name: vim-latex
version: 1.10.0+20220519
mtime: 1652983369
commit: 069a26a0963adb6a9de9f40f5a7332c7207d5423
version: 1.10.0+20250111
mtime: 1736599285
commit: 08821de4f16625dfe35c9d0d18bb650102e4107f

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:50f0fb90d94c76fa6129ccc4c795d2d79ca05f1376eeeebeefefba033db174bb
size 161291

BIN
vim-markdown-2.0.0+20240920.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,4 +1,4 @@
name: vim-markdown
version: 2.0.0+20220926
mtime: 1664174663
commit: c3f83ebb43b560af066d2a5d66bc77c6c05293b1
version: 2.0.0+20240920
mtime: 1726813437
commit: 8f6cb3a6ca4e3b6bcda0730145a0b700f3481b51

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Apr 15 06:21:19 UTC 2025 - Jiri Slaby <jslaby@suse.cz>
- update
* ale 4.0.0
* cscope_maps 20210418 (bsc#1236667)
* editorconfig 1.2.1
* latex 1.10.0+20250111
* neomutt.vim 20241013
* markdown 2.0.0+20240920
-------------------------------------------------------------------
Fri Jan 17 10:01:41 UTC 2025 - Jiri Slaby <jslaby@suse.cz>

View File

@@ -18,7 +18,7 @@
%define ack_version 1.0.9
%define airline_version 0.11
%define ale_version 3.3.0
%define ale_version 4.0.0
%define align_version_orig 37-43
%define align_version 37.43
%define a_version 2.18
@@ -27,20 +27,21 @@
%define calendar_version 2.5
%define colorsel_version 20110107
%define colorschemes_version 1.0
%define cscope_maps_version 20210418
%define diffchanges_tag 346dae2
%define diffchanges_version 0.6+g346dae2
%define editorconfig_version 1.1.1
%define editorconfig_version 1.2.1
%define file_line_version 1.0+20161020
%define fugitive_version 3.7
%define gitdiff_version 2
%define gnupg_version 2.7.1
%define latex_version 1.10.0+20220519
%define latex_version 1.10.0+20250111
%define locateopen_version 1.3
%define markdown_version 2.0.0+20220926
%define markdown_version 2.0.0+20240920
%define matrix_version 1.10
%define minibufexpl_version 6.3.2
%define multiplesearch_version 1.3
%define neomutt_version 20220612
%define neomutt_version 20241013
%define NERDcommenter_version 2.7.0
%define NERDtree_version 7.1.3
%define project_version 1.4.1
@@ -106,17 +107,17 @@ Source36: https://github.com/vim-airline/vim-airline/archive/refs/tags/v%{
Source37: https://github.com/dense-analysis/ale/archive/refs/tags/v%{ale_version}.tar.gz#/vimplugin-ale-%{ale_version}.tar.gz
Source38: https://github.com/dhruvasagar/vim-table-mode/archive/refs/tags/v%{table_mode_version}.tar.gz#/vimplugin-table-mode-%{table_mode_version}.tar.gz
Source39: https://github.com/aliou/bats.vim/archive/refs/tags/v%{bats_version}.tar.gz#/vimplugin-bats-%{bats_version}.tar.gz
Source40: https://cscope.sourceforge.net/cscope_maps.vim
# from _service
Source100: file-line-%{file_line_version}.tar.xz
Source101: vim-markdown-%{markdown_version}.tar.xz
Source102: neomutt.vim-%{neomutt_version}.tar.xz
Source103: salt-vim-%{salt_version}.tar.xz
Source104: vim-latex-%{latex_version}.tar.xz
Source105: cscope-maps-%{cscope_maps_version}.tar.xz
Source200: gitrebase.vim
Source300: global-rsync-filter
Source1000: https://raw.githubusercontent.com/openSUSE/pack-tools/master/contrib/vim/spec.snippets
Source1001: check_for_updates.pl
Source1001: check_for_updates.py
Patch0: salt-syntax-avoid-multiline-lets.patch
Patch1: locateopen-1.3-locate-support.patch
Patch2: showmarks-signs.patch
@@ -736,7 +737,7 @@ Usage:
Press <c-w>o again: the previous set of windows is restored
%prep
%setup -q -c -n %{name} -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -a21 -a22 -a23 -a24 -a26 -a27 -a28 -a30 -a31 -a32 -a33 -a34 -a35 -a36 -a37 -a38 -a39 -a100 -a101 -a102 -a103 -a104
%setup -q -c -n %{name} -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -a21 -a22 -a23 -a24 -a26 -a27 -a28 -a30 -a31 -a32 -a33 -a34 -a35 -a36 -a37 -a38 -a39 -a100 -a101 -a102 -a103 -a104 -a105
pushd salt-vim-%{salt_version}
%patch -P 0 -p1
popd
@@ -763,6 +764,7 @@ chmod -v 644 taglist-%{taglist_version}/doc/taglist.txt
# BEGIN EXCLUDES
cat > ale-%{ale_version}/.rsync-filter <<EOF
- /supported-tools.md
- /test-files/
EOF
cat > bufexplorer-%{bufexplorer_version}/.rsync-filter <<EOF
@@ -775,6 +777,10 @@ cat > editorconfig-vim-%{editorconfig_version}/.rsync-filter <<EOF
- /mkzip.sh
EOF
cat > neomutt.vim-%{neomutt_version}/.rsync-filter <<EOF
- /tests/
EOF
cat > nerdtree-%{NERDtree_version}/.rsync-filter <<EOF
- /_config.yml
- /nerdtree_plugin/
@@ -834,8 +840,6 @@ for i in */; do
"$i" %buildroot/%{vimplugin_dir}/
done
install -m 644 %{SOURCE40} %buildroot/%vimplugin_dir/plugin/
install -d %buildroot/%vimplugin_dir/after/ftplugin/
install -m 644 %{SOURCE200} %buildroot/%vimplugin_dir/after/ftplugin/
@@ -936,6 +940,9 @@ fi \
%vimplugin_dir/autoload/asyncomplete/sources/ale.vim
%vimplugin_dir/doc/ale*
%vimplugin_dir/ftplugin/ale-*.vim
%dir %vimplugin_dir/lua/
%vimplugin_dir/lua/ale/
%vimplugin_dir/lspconfig.vim
%vimplugin_dir/plugin/ale.vim
%dir %vimplugin_dir/rplugin
%dir %vimplugin_dir/rplugin/python3
@@ -986,6 +993,7 @@ fi \
%files -n vim-plugin-cscope
%defattr(-,root,root,0755)
%doc cscope-maps-%{cscope_maps_version}/README.md
%vimplugin_dir/plugin/cscope_maps.vim
%files -n vim-plugin-diffchanges
@@ -997,6 +1005,7 @@ fi \
%defattr(-,root,root,0755)
%license editorconfig-vim-%{editorconfig_version}/LICENSE
%vimplugin_dir/plugin/editorconfig.vim
%vimplugin_dir/ftdetect/editorconfig.vim
%vimplugin_dir/autoload/editorconfig_core/
%vimplugin_dir/autoload/editorconfig_core.vim
%vimplugin_dir/autoload/editorconfig.vim

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3c5b2f29b437192c651957ce6b9408ba1f8cece2dae624dd82f04157289193fe
size 401593

BIN
vimplugin-ale-4.0.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eb8be206659e6fb3bab9df66fe9b80c14265325e3d9a4bbaad7c63058c2ba558
size 33287

BIN
vimplugin-editorconfig-1.2.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.