summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Bidar2023-11-26 06:53:47 +0200
committerBjörn Bidar2023-11-26 06:53:47 +0200
commit000eb8b3c82b7b8177c6fcae5f2e29850ad3850b (patch)
tree65540cd783f501a819c48226ef616b04963a19f3
parent8618c14d4f54cc5aeffee74f2a3dc4cf418ff4cb (diff)
downloadaur-000eb8b3c82b7b8177c6fcae5f2e29850ad3850b.tar.gz
Update to 1.5.0
- New upstream release - Rebase sb2 patches - Removed merged patches Signed-off-by: Björn Bidar <bjorn.bidar@thaodan.de>
-rw-r--r--.SRCINFO54
-rw-r--r--0001-Import-zsh-completition-made-by-Holger-Macht.patch179
-rw-r--r--0001-remove-public-route-from-osc.patch36
-rw-r--r--0002-Add-sb2install-support-to-osc.patch (renamed from 0010-Add-sb2install-support-to-osc.patch)8
-rw-r--r--0002-Fetch-project-list-in-zsh-completition-at-runtime.patch155
-rw-r--r--0003-Parse-pwd-s-apiurl-in-zsh-completion.patch47
-rw-r--r--0003-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch (renamed from 0011-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch)8
-rw-r--r--0004-Fetch-project-repositories-list-for-zsh-completion.patch74
-rw-r--r--0004-Support-synchronous-copyproj.patch (renamed from 0012-Support-synchronous-copyproj.patch)12
-rw-r--r--0005-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch (renamed from 0013-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch)12
-rw-r--r--0005-Match-more-command-aliases-in-the-zsh-completion.patch42
-rw-r--r--0006-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch (renamed from 0014-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch)8
-rw-r--r--0006-Refactor-help-text-generation-in-zsh-completition-so.patch88
-rw-r--r--0007-Add-architecture-and-scheduler-maps.patch (renamed from 0015-Add-architecture-and-scheduler-maps.patch)0
-rw-r--r--0007-Complete-help-text-for-options-that-have-separate-ha.patch67
-rw-r--r--0008-Fetch-repository-architectures-in-zsh-completition.patch69
-rw-r--r--0008-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch (renamed from 0016-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch)4
-rw-r--r--0009-Add-zsh-completion-for-build-command.patch48
-rw-r--r--0009-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch (renamed from 0017-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch)0
-rw-r--r--PKGBUILD61
20 files changed, 105 insertions, 867 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d2787b2f954f..c1cce54c8ab3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = osc
pkgdesc = Command line client for the openSUSE Build Service
- pkgver = 1.3.1
+ pkgver = 1.5.0
pkgrel = 1
url = https://github.com/openSUSE/osc
arch = any
@@ -19,41 +19,25 @@ pkgbase = osc
conflicts = zsh-completion-osc
replaces = osc-bash-completion
replaces = zsh-completion-osc
- source = https://github.com/openSUSE/osc/archive/1.3.1.tar.gz
- source = 0001-Import-zsh-completition-made-by-Holger-Macht.patch
- source = 0002-Fetch-project-list-in-zsh-completition-at-runtime.patch
- source = 0003-Parse-pwd-s-apiurl-in-zsh-completion.patch
- source = 0004-Fetch-project-repositories-list-for-zsh-completion.patch
- source = 0005-Match-more-command-aliases-in-the-zsh-completion.patch
- source = 0006-Refactor-help-text-generation-in-zsh-completition-so.patch
- source = 0007-Complete-help-text-for-options-that-have-separate-ha.patch
- source = 0008-Fetch-repository-architectures-in-zsh-completition.patch
- source = 0009-Add-zsh-completion-for-build-command.patch
- source = 0010-Add-sb2install-support-to-osc.patch
- source = 0011-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch
- source = 0012-Support-synchronous-copyproj.patch
- source = 0013-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch
- source = 0014-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch
- source = 0015-Add-architecture-and-scheduler-maps.patch
- source = 0016-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch
- source = 0017-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch
- sha256sums = 6fb9fee8dfd86276632d6a7a25169f34bec1bc251c79161b5f096a9ebde51cd8
- sha256sums = 6d0343bd5254bebf4feb972b198953f7faa977411d007f7d432ed8b969ef20dd
- sha256sums = 60e861db1a13b3a0dce8d9630bc77f023773c550558a2f2f5d144f56bcb01f49
- sha256sums = 89d7acdb5dd2ad996f438681d16fca7d8a7fcccc0c9947647a24a93ff0820295
- sha256sums = 278e8da8f3010de09e031d90cf759d24d68bd44eba9dbbef9aa78abb11e13f31
- sha256sums = f3871ab614898a9a71ccb5545211aefa8bbacebf9500126c2a1d07c2c939b29c
- sha256sums = 794b07b4edc5a0a53f6780a3c9b8442264d960ceae525b7ca9407b1b853c009c
- sha256sums = 88ad2c7135f972e69b0188f3f10f4907a0e5dda3bf06a80656f4772339cbfb4d
- sha256sums = 33fc7b90ca2b14b66622816a895f60051f6c4dce6d843504ff4d125728043a56
- sha256sums = 5fab7671bd4e4aa52930f9e52a0b1fbb6187df1ca6a8d3e975beeccc3016938e
- sha256sums = 19829c5586774b65321a0c27539ce6c3d5de041faeb77efff38c00c952e36b67
- sha256sums = 705395902faf621929d921e414551d14998b6daf22f0732253a648b655d448e2
- sha256sums = 8ca69c2797f933e7fe7c6b4452d4ce848dbb26a35d1b143fd8017cd91f5061b8
- sha256sums = 4b079b31fe946c7bf595494fab2f84cc3c094354daf8d1df4d9d5615fb0f06a9
- sha256sums = 8c05cda87e16283af460d56113666b9f7896f1e77b9055da00d9f45d971bcd7c
+ source = https://github.com/openSUSE/osc/archive/1.5.0.tar.gz
+ source = 0001-remove-public-route-from-osc.patch
+ source = 0002-Add-sb2install-support-to-osc.patch
+ source = 0003-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch
+ source = 0004-Support-synchronous-copyproj.patch
+ source = 0005-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch
+ source = 0006-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch
+ source = 0007-Add-architecture-and-scheduler-maps.patch
+ source = 0008-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch
+ source = 0009-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch
+ sha256sums = 7d3be5b17338f11767441c451c50137356756b51786d0296e751f2fef1c87e27
+ sha256sums = 06cdc1134dcfec28af98b3738189c8794cf898fa2578a7a2947acc3102b16094
+ sha256sums = 1e4a61c7ae267812de89459c715baa66115851d0f213f95f4ac46fe0f67802a3
+ sha256sums = d5415d2ad620ec8ff9c5ea9b97b78ed76eef4ead4b11892465f6a96a015a03b7
+ sha256sums = a857b48a3c9d698c8ab347509dafb67cfe201f882a0d90f9738c6386945ca3b6
+ sha256sums = eba2c169e52fb5b0e722591f67b8c93615610a66acfb5e660a65fc8fb9f0c81c
+ sha256sums = 83219095de865463ce82206b50fc975c4a4de86e5af3415c8f41ed8de9d2ebd1
sha256sums = eae5f978b8385db3acae46df96fc4973f306c4a640389165a8ac54469d370e5b
- sha256sums = e690cc2396b42e2f85e961595526e056f86dd850d2b2c74178381d89d33afb6a
+ sha256sums = d2ba1b665101e28673c65912b7bc9095dbdc02049fb8c8d83f1809a441132d8f
sha256sums = 67c916cd7ba9dcd4899477c223c79f7087c0a0077d33f95ccb465b790e052547
pkgname = osc
diff --git a/0001-Import-zsh-completition-made-by-Holger-Macht.patch b/0001-Import-zsh-completition-made-by-Holger-Macht.patch
deleted file mode 100644
index 5338ac4b70ce..000000000000
--- a/0001-Import-zsh-completition-made-by-Holger-Macht.patch
+++ /dev/null
@@ -1,179 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Sun, 16 Jul 2023 03:24:47 +0300
-Subject: [PATCH] Import zsh completition made by Holger Macht
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Right now the zsh completition is packaged inside the zsh package on
-OpenSUSE.
-Several distributions either package it or the user has to import it
-themselves.
-
-It is better if it is stored here so any can pick it up in there zsh
-package and put fixes in here.
-
-The file was imported from the OpenSUSE zsh package plus a few spelling fixes.
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 149 ++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 149 insertions(+)
- create mode 100644 contrib/osc.zsh
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-new file mode 100644
-index 0000000000000000000000000000000000000000..d043d2f33562807a9e284e88aebb4be1551ae119
---- /dev/null
-+++ b/contrib/osc.zsh
-@@ -0,0 +1,149 @@
-+#compdef osc
-+#
-+# Copyright (C) 2009,2010 Holger Macht <holger@homac.de>
-+#
-+# This file is released under the GPLv2.
-+#
-+# Based on the zsh guide from http://zsh.dotsrc.org/Guide/zshguide06.html
-+#
-+# Toggle verbose completions: zstyle ':completion:*:osc:*' verbose no
-+# zstyle ':completion:*:osc-subcommand:*' verbose no
-+#
-+# Use the variables $ZSH_OSC_BUILD_TARGETS_EXTRA and $ZSH_OSC_PROJECTS_EXTRA to
-+# extend the list of possible completions in your ~/.zshrc like that:
-+# export OSC_PROJECTS_EXTRA="Base:System Base:shells"
-+#
-+# version 0.2
-+#
-+
-+OSC_BUILD_TARGETS="openSUSE_13.1 openSUSE_13.2 openSUSE_Tumbleweed openSUSE_Factory SLE_11_SP3 SLE_12"
-+OSC_PROJECTS="openSUSE:Factory openSUSE:Tumbleweed openSUSE:13.2 openSUSE:13.1"
-+
-+# user defined variables $OSC_BUILD_TARGETS_EXTRA and
-+# $OSC_PROJECTS_EXTRA can add to the project/build target list
-+OSC_BUILD_TARGETS="$OSC_BUILD_TARGETS $ZSH_OSC_BUILD_TARGETS_EXTRA"
-+OSC_PROJECTS="$OSC_PROJECTS $ZSH_OSC_PROJECTS_EXTRA"
-+
-+# Main dispatcher
-+
-+_osc() {
-+ if (( CURRENT > 2 )) && [[ ${words[2]} != "help" ]]; then
-+ # Remember the subcommand name
-+ local cmd=${words[2]}
-+ # Set the context for the subcommand.
-+ curcontext="${curcontext%:*:*}:osc-subcommand"
-+ # Narrow the range of words we are looking at to exclude `osc'
-+ (( CURRENT-- ))
-+ shift words
-+ # Run the completion for the subcommand
-+ if [ "$cmd" = "submitreq" -o "$cmd" = "sr" ]; then
-+ _osc_cmd_submitreq
-+ elif [ "$cmd" = "getbinaries" ]; then
-+ _osc_cmd_getbinaries
-+ elif [ "$cmd" = "checkout" -o "$cmd" = "co" -o "$cmd" = "branch" ]; then
-+ _osc_cmd_checkout
-+ elif [ "$cmd" = "buildlog" -o "$cmd" = "buildinfo" -o "$cmd" = "bl" ]; then
-+ _osc_cmd_buildlog
-+ else
-+ _osc_cmd_do $cmd
-+ fi
-+ else
-+ local hline
-+ local -a cmdlist
-+ local tag=0
-+ _call_program help-commands osc help | while read -A hline; do
-+ # start parsing with "commands:"
-+ [[ $hline[1] = "commands:" ]] && tag=1
-+ # stop parsing at the line starting with "For"
-+ [[ $hline[1] = "For" ]] && tag=0
-+ [[ $tag = 0 ]] && continue
-+ # all commands have to start with lower case letters
-+ [[ $hline[1] =~ ^[A-Z] ]] && continue
-+ (( ${#hline} < 2 )) && continue
-+
-+ # ${hline[1]%,} truncates the last ','
-+ cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-+ done
-+ _describe -t osc-commands 'osc command' cmdlist
-+ fi
-+}
-+
-+_osc_cmd_getbinaries() {
-+ _arguments \
-+ '1:PROJECT:( `echo $OSC_PROJECTS` )' \
-+ '2:PACKAGE:(PACKAGE)' \
-+ '3:REPOSITORY:( `echo $OSC_BUILD_TARGETS` )' \
-+ '4:ARCHITECTURE:(i586 x86_64)'
-+}
-+
-+_osc_cmd_checkout() {
-+ _arguments \
-+ '1:PROJECT:( `echo $OSC_PROJECTS` )' \
-+ '2:PACKAGE:(PACKAGE)'
-+}
-+
-+_osc_cmd_buildlog() {
-+ _arguments \
-+ '1:REPOSITORY:( `echo $OSC_BUILD_TARGETS` )' \
-+ '2:ARCHITECTURE:(i586 x86_64)'
-+}
-+
-+_osc_cmd_submitreq() {
-+ local hline
-+ local -a cmdlist
-+ local tag=0
-+ _call_program help-commands osc help $cmd | while read -A hline; do
-+ # start parsing from "usage:"
-+ [[ $hline[1] = "usage:" ]] && tag=1
-+ [[ $tag = 0 ]] && continue
-+
-+ if [[ $hline[1] =~ ^osc ]]; then
-+ shift hline; shift hline
-+ elif ! [[ $hline[1] =~ ^- ]]; then
-+ # Option has to start with a '-' or 'osc submitrequest'
-+ continue
-+ fi
-+
-+ (( ${#hline} < 2 )) && continue
-+
-+ cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-+
-+ done
-+
-+ _describe -t osc-commands 'osc command' cmdlist
-+}
-+
-+
-+_osc_cmd_do() {
-+ local hline
-+ local -a cmdlist
-+ local tag=0
-+
-+ # only start completion if there's some '-' on the line
-+ if ! [ "$words[2]" = "-" ]; then
-+ _complete
-+ return
-+ fi
-+
-+ _call_program help-commands osc help $cmd | while read -A hline; do
-+ # start parsing from "Options:"
-+ [[ $hline[1] = "Options:" ]] && tag=1
-+ [[ $tag = 0 ]] && continue
-+ # Option has to start with a '-'
-+ [[ $hline[1] =~ ^- ]] || continue
-+ (( ${#hline} < 2 )) && continue
-+
-+ cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-+ done
-+
-+ if [ -n "$cmdlist" ]; then
-+ _describe -t osc-commands 'osc command' cmdlist
-+ else
-+ _complete
-+ fi
-+}
-+
-+# Code to make sure _osc is run when we load it
-+_osc "$@"
-+
-+
diff --git a/0001-remove-public-route-from-osc.patch b/0001-remove-public-route-from-osc.patch
new file mode 100644
index 000000000000..fb8f8f4701a8
--- /dev/null
+++ b/0001-remove-public-route-from-osc.patch
@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Marco Strigl <mstrigl@suse.com>
+Date: Wed, 22 Nov 2023 14:33:06 +0100
+Subject: [PATCH] remove public route from osc
+
+---
+ osc/commandline.py | 2 +-
+ osc/core.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/osc/commandline.py b/osc/commandline.py
+index f2892b827c795b4e0218761a20243bf8c4985093..b7c19bc63e1dbd5566ead116890df62a72a4bb05 100644
+--- a/osc/commandline.py
++++ b/osc/commandline.py
+@@ -4860,7 +4860,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
+ return (parent_project, parent_package)
+
+ def _pdiff_get_exists_and_parent(self, apiurl, project, package):
+- link_url = makeurl(apiurl, ['public', 'source', project, package])
++ link_url = makeurl(apiurl, ['source', project, package])
+ try:
+ file = http_GET(link_url)
+ root = ET.parse(file).getroot()
+diff --git a/osc/core.py b/osc/core.py
+index bda78ddf70a8990588ebb3752802cce46ef8bd4d..3a5543dc356d9831d5f868ff0ae62155e4135682 100644
+--- a/osc/core.py
++++ b/osc/core.py
+@@ -3938,7 +3938,7 @@ def show_pattern_meta(apiurl: str, prj: str, pattern: str):
+
+
+ def show_configuration(apiurl):
+- u = makeurl(apiurl, ['public', 'configuration'])
++ u = makeurl(apiurl, ['configuration'])
+ f = http_GET(u)
+ return f.readlines()
+
diff --git a/0010-Add-sb2install-support-to-osc.patch b/0002-Add-sb2install-support-to-osc.patch
index af55f09e72d7..efdb5898e9f6 100644
--- a/0010-Add-sb2install-support-to-osc.patch
+++ b/0002-Add-sb2install-support-to-osc.patch
@@ -8,10 +8,10 @@ Subject: [PATCH] Add sb2install support to osc
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/osc/build.py b/osc/build.py
-index f59bb6520649fe1388165388e46982413029d3ac..429217916e4673cd67a954e57be04adb62b105ce 100644
+index c93072af1d98e8ba4575f3084a39087a7920d483..096e6c40998e35650b857d09cce41cfc95e10f67 100644
--- a/osc/build.py
+++ b/osc/build.py
-@@ -191,6 +191,7 @@ class Buildinfo:
+@@ -192,6 +192,7 @@ class Buildinfo:
self.urls[node.get('project') + "/" + node.get('repository')] = baseurl + '/%(arch)s/%(filename)s'
self.vminstall_list = [dep.name for dep in self.deps if dep.vminstall]
@@ -19,7 +19,7 @@ index f59bb6520649fe1388165388e46982413029d3ac..429217916e4673cd67a954e57be04adb
self.preinstall_list = [dep.name for dep in self.deps if dep.preinstall]
self.runscripts_list = [dep.name for dep in self.deps if dep.runscripts]
self.noinstall_list = [dep.name for dep in self.deps if dep.noinstall]
-@@ -236,7 +237,8 @@ class Pac:
+@@ -237,7 +238,8 @@ class Pac:
'project', 'repository', 'sysroot',
'preinstall', 'vminstall', 'runscripts',
'noinstall', 'installonly', 'notmeta',
@@ -29,7 +29,7 @@ index f59bb6520649fe1388165388e46982413029d3ac..429217916e4673cd67a954e57be04adb
self.mp[i] = node.get(i)
self.mp['buildarch'] = buildarch
-@@ -1421,6 +1423,7 @@ def main(apiurl, store, opts, argv):
+@@ -1430,6 +1432,7 @@ def main(apiurl, store, opts, argv):
rpmlist.append('preinstall: ' + ' '.join(bi.preinstall_list) + '\n')
rpmlist.append('vminstall: ' + ' '.join(bi.vminstall_list) + '\n')
diff --git a/0002-Fetch-project-list-in-zsh-completition-at-runtime.patch b/0002-Fetch-project-list-in-zsh-completition-at-runtime.patch
deleted file mode 100644
index 7f9db73b194f..000000000000
--- a/0002-Fetch-project-list-in-zsh-completition-at-runtime.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Thu, 20 Jul 2023 15:17:06 +0300
-Subject: [PATCH] Fetch project list in zsh completition at runtime
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Similar to the bash/tcsh completition fetch the project list at
-runtime.
-Includes basic completion for alias/api-url as project list
-cache is separated per instance.
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 88 ++++++++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 84 insertions(+), 4 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index d043d2f33562807a9e284e88aebb4be1551ae119..1d7c43e00c1f8f372b719c623fc20b09512f7a71 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -1,6 +1,7 @@
- #compdef osc
- #
- # Copyright (C) 2009,2010 Holger Macht <holger@homac.de>
-+# Copyright (C) 2023 Björn Bidar <bjorn.bidar@jolla.com>
- #
- # This file is released under the GPLv2.
- #
-@@ -17,16 +18,25 @@
- #
-
- OSC_BUILD_TARGETS="openSUSE_13.1 openSUSE_13.2 openSUSE_Tumbleweed openSUSE_Factory SLE_11_SP3 SLE_12"
--OSC_PROJECTS="openSUSE:Factory openSUSE:Tumbleweed openSUSE:13.2 openSUSE:13.1"
-
- # user defined variables $OSC_BUILD_TARGETS_EXTRA and
- # $OSC_PROJECTS_EXTRA can add to the project/build target list
- OSC_BUILD_TARGETS="$OSC_BUILD_TARGETS $ZSH_OSC_BUILD_TARGETS_EXTRA"
--OSC_PROJECTS="$OSC_PROJECTS $ZSH_OSC_PROJECTS_EXTRA"
-
- # Main dispatcher
-
- _osc() {
-+ # Variables shared by all internal functions
-+ local osc_projects osc_rc osc_cmd osc_alias
-+ _osc_complete_prepare
-+ osc_projects="${XDG_CACHE_HOME}/osc.projects"
-+ osc_rc="${XDG_CONFIG_HOME}/osc/oscrc"
-+ osc_cmd=osc
-+
-+ if [[ "${words[0]}" = "isc" ]] ; then
-+ osc_alias=internal
-+ fi
-+
- if (( CURRENT > 2 )) && [[ ${words[2]} != "help" ]]; then
- # Remember the subcommand name
- local cmd=${words[2]}
-@@ -36,6 +46,40 @@ _osc() {
- (( CURRENT-- ))
- shift words
- # Run the completion for the subcommand
-+ if [ $cmd = -A -o $cmd = --apiurl ] ; then
-+ if [[ -s "${osc_rc}" ]] ; then
-+ local hints=($(sed -rn '/^(aliases=|\[http)/{s/,/ /g;s/(aliases=|\[|\])//gp}' < "${osc_rc}" 2> /dev/null))
-+ if [[ -n "${words[2]}" ]]; then
-+ for h in ${hints[@]} ; do
-+ case "$h" in
-+ http*)
-+ local tmp=$(sed -rn '\@^\['${h}'@,\@=@{\@^aliases=@{s@[^=]+=([^,]+),.*@\1@p};}' < "${osc_rc}" 2> /dev/null)
-+ if [[ "${words[2]}" = "$h" ]]; then
-+ osc_alias=$tmp
-+ break
-+ fi
-+ ;;
-+ *)
-+ if [[ "${words[2]}" = "$h" ]]; then
-+ osc_alias=$h
-+ break
-+ fi
-+ esac
-+ done
-+ else
-+ _arguments '1:ALIAS:( `echo $hints`)'
-+ return
-+ fi
-+ fi
-+ fi
-+
-+ if [[ -n "$osc_alias" ]] ; then
-+ osc_projects="${osc_projects}.${osc_alias}"
-+ osc_command="$osc_command -A $osc_alias"
-+ fi
-+
-+ _osc_update_project_list
-+
- if [ "$cmd" = "submitreq" -o "$cmd" = "sr" ]; then
- _osc_cmd_submitreq
- elif [ "$cmd" = "getbinaries" ]; then
-@@ -68,9 +112,45 @@ _osc() {
- fi
- }
-
-+_osc_call_me_maybe()
-+{
-+ typeset -i ctime=$(command date -d "$(command stat -c '%z' ${1})" +'%s')
-+ typeset -i now=$(command date -d now +'%s')
-+ if ((now - ctime < 86400)) ; then
-+ return 1
-+ fi
-+ return 0
-+}
-+
-+_osc_complete_prepare() {
-+ local xdg_dir
-+ for xdg_dir in "${XDG_CACHE_HOME:=$HOME/.cache}" "${XDG_CONFIG_HOME:=$HOME/.config}"; do
-+ if [[ ! -d "${xdg_dir}" ]]; then
-+ mkdir -p "${xdg_dir}"
-+ fi
-+ done
-+
-+ if [[ -f ~/.osc.projects ]]; then
-+ rm ~/.osc.projects -f
-+ fi
-+}
-+
-+_osc_update_project_list() {
-+ if [[ -s "${osc_projects}" ]] ; then
-+ if _osc_call_me_maybe "$osc_projects" ; then
-+ if tmp=$(mktemp ${osc_projects}.XXXXXX) ; then
-+ command ${osc_cmd} ls / >| $tmp
-+ mv -uf $tmp ${osc_projects}
-+ fi
-+ fi
-+ else
-+ command ${osc_cmd} ls / >| "${osc_projects}"
-+ fi
-+}
-+
- _osc_cmd_getbinaries() {
- _arguments \
-- '1:PROJECT:( `echo $OSC_PROJECTS` )' \
-+ '1:PROJECT:( `cat $osc_projects` )' \
- '2:PACKAGE:(PACKAGE)' \
- '3:REPOSITORY:( `echo $OSC_BUILD_TARGETS` )' \
- '4:ARCHITECTURE:(i586 x86_64)'
-@@ -78,7 +158,7 @@ _osc_cmd_getbinaries() {
-
- _osc_cmd_checkout() {
- _arguments \
-- '1:PROJECT:( `echo $OSC_PROJECTS` )' \
-+ '1:PROJECT:( `cat $osc_projects` )' \
- '2:PACKAGE:(PACKAGE)'
- }
-
diff --git a/0003-Parse-pwd-s-apiurl-in-zsh-completion.patch b/0003-Parse-pwd-s-apiurl-in-zsh-completion.patch
deleted file mode 100644
index dc45ecf2e2c5..000000000000
--- a/0003-Parse-pwd-s-apiurl-in-zsh-completion.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Thu, 20 Jul 2023 15:34:43 +0300
-Subject: [PATCH] Parse pwd's apiurl in zsh completion
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index 1d7c43e00c1f8f372b719c623fc20b09512f7a71..8c1148ffacdbe09e0ec127ef949e78f75c1fbd26 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -37,6 +37,18 @@ _osc() {
- osc_alias=internal
- fi
-
-+ if [ -s "${PWD}/.osc/_apiurl" -a -s "${osc_rc}" ]; then
-+ local osc_apiurl
-+ read osc_apiurl < "${PWD}/.osc/_apiurl"
-+ # We prefer to match an apiurl with an alias so that the project list
-+ # cache would match also when -A was passed with said alias.
-+ # If there's no alias for that api url match to use the plain apiurl instead.
-+ osc_alias=$(sed -rn '\@^\['${apiurl}'@,\@=@{\@^aliases=@{s@[^=]+=([^,]+),.*@\1@p};}' < "${osc_rc}" 2> /dev/null)
-+ if [ -z $osc_alias ] ; then
-+ osc_alias=${osc_apiurl}
-+ fi
-+ fi
-+
- if (( CURRENT > 2 )) && [[ ${words[2]} != "help" ]]; then
- # Remember the subcommand name
- local cmd=${words[2]}
-@@ -74,8 +86,8 @@ _osc() {
- fi
-
- if [[ -n "$osc_alias" ]] ; then
-- osc_projects="${osc_projects}.${osc_alias}"
-- osc_command="$osc_command -A $osc_alias"
-+ osc_projects="${osc_projects}.${osc_alias//\//_}"
-+ osc_command="$osc_command -A ${osc_alias}"
- fi
-
- _osc_update_project_list
diff --git a/0011-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch b/0003-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch
index 91283509b65d..0a35306e86f9 100644
--- a/0011-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch
+++ b/0003-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch
@@ -13,10 +13,10 @@ Subject: [PATCH] Support 'osc copyprj' in api by Islam Amer usage: osc copyprj
2 files changed, 80 insertions(+)
diff --git a/osc/commandline.py b/osc/commandline.py
-index eb5fc9a706204b14dc9245dd9e73e2eb7c871133..7ad18e584ead6347ef67eb670ad53a6952d4e459 100644
+index b7c19bc63e1dbd5566ead116890df62a72a4bb05..ad45daa45efbb4f4e53e2bcc03e6731a22e78e59 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
-@@ -2098,6 +2098,58 @@ class Osc(cmdln.Cmdln):
+@@ -2106,6 +2106,58 @@ class Osc(cmdln.Cmdln):
else:
raise oscerr.WrongOptions('The --delete switch is only for pattern metadata or attributes.')
@@ -76,10 +76,10 @@ index eb5fc9a706204b14dc9245dd9e73e2eb7c871133..7ad18e584ead6347ef67eb670ad53a69
@cmdln.option('-m', '--message', metavar='TEXT',
diff --git a/osc/core.py b/osc/core.py
-index 862b8ee3140f4ab9b78a90b520eb0c6c3b3912a1..a0ab1ddff152332749e192414c83a61a045d3988 100644
+index 3a5543dc356d9831d5f868ff0ae62155e4135682..116d4f2e895d1ed03aba483588cd78ef168175f7 100644
--- a/osc/core.py
+++ b/osc/core.py
-@@ -6245,6 +6245,34 @@ def copy_pac(
+@@ -6279,6 +6279,34 @@ def copy_pac(
raise oscerr.APIError('failed to copy: %s' % ', '.join(todo))
return 'Done.'
diff --git a/0004-Fetch-project-repositories-list-for-zsh-completion.patch b/0004-Fetch-project-repositories-list-for-zsh-completion.patch
deleted file mode 100644
index f93e3596d057..000000000000
--- a/0004-Fetch-project-repositories-list-for-zsh-completion.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Fri, 21 Jul 2023 17:57:18 +0300
-Subject: [PATCH] Fetch project repositories list for zsh completion
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 28 ++++++++++++++++------------
- 1 file changed, 16 insertions(+), 12 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index 8c1148ffacdbe09e0ec127ef949e78f75c1fbd26..67afbc2f89cc6520365ce77702207be11b679ab6 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -9,20 +9,10 @@
- #
- # Toggle verbose completions: zstyle ':completion:*:osc:*' verbose no
- # zstyle ':completion:*:osc-subcommand:*' verbose no
--#
--# Use the variables $ZSH_OSC_BUILD_TARGETS_EXTRA and $ZSH_OSC_PROJECTS_EXTRA to
--# extend the list of possible completions in your ~/.zshrc like that:
--# export OSC_PROJECTS_EXTRA="Base:System Base:shells"
- #
- # version 0.2
- #
-
--OSC_BUILD_TARGETS="openSUSE_13.1 openSUSE_13.2 openSUSE_Tumbleweed openSUSE_Factory SLE_11_SP3 SLE_12"
--
--# user defined variables $OSC_BUILD_TARGETS_EXTRA and
--# $OSC_PROJECTS_EXTRA can add to the project/build target list
--OSC_BUILD_TARGETS="$OSC_BUILD_TARGETS $ZSH_OSC_BUILD_TARGETS_EXTRA"
--
- # Main dispatcher
-
- _osc() {
-@@ -160,11 +150,25 @@ _osc_update_project_list() {
- fi
- }
-
-+_osc_project_repositories() {
-+ if [ ! -s $PWD/.osc/_build_repositories ] || \
-+ _osc_call_me_maybe $PWD/.osc/_build_repositories ; then
-+ osc repositories > /dev/null
-+ fi
-+ # Just check if file exist in case the call to the api failed
-+ if [ -s $PWD/.osc/_build_repositories ] ; then
-+ cat $PWD/.osc/_build_repositories | while read build_repository ; do
-+ # Only output first word of each line
-+ echo ${build_repository%\ *}
-+ done | sort -u
-+ fi
-+}
-+
- _osc_cmd_getbinaries() {
- _arguments \
- '1:PROJECT:( `cat $osc_projects` )' \
- '2:PACKAGE:(PACKAGE)' \
-- '3:REPOSITORY:( `echo $OSC_BUILD_TARGETS` )' \
-+ '3:REPOSITORY:( `_osc_project_repositories`' \
- '4:ARCHITECTURE:(i586 x86_64)'
- }
-
-@@ -176,7 +180,7 @@ _osc_cmd_checkout() {
-
- _osc_cmd_buildlog() {
- _arguments \
-- '1:REPOSITORY:( `echo $OSC_BUILD_TARGETS` )' \
-+ '1:REPOSITORY:( `_osc_project_repositories` )' \
- '2:ARCHITECTURE:(i586 x86_64)'
- }
-
diff --git a/0012-Support-synchronous-copyproj.patch b/0004-Support-synchronous-copyproj.patch
index fe15d5a1a32d..9f08c4657278 100644
--- a/0012-Support-synchronous-copyproj.patch
+++ b/0004-Support-synchronous-copyproj.patch
@@ -9,10 +9,10 @@ Subject: [PATCH] Support synchronous copyproj
2 files changed, 7 insertions(+)
diff --git a/osc/commandline.py b/osc/commandline.py
-index 7ad18e584ead6347ef67eb670ad53a6952d4e459..d1d95e6ea060a76c672ef30278ba5c75f46ad849 100644
+index ad45daa45efbb4f4e53e2bcc03e6731a22e78e59..d67a4184afac79795c2e3dd7a2ca1ad64d77fe9a 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
-@@ -2100,6 +2100,8 @@ class Osc(cmdln.Cmdln):
+@@ -2108,6 +2108,8 @@ class Osc(cmdln.Cmdln):
@cmdln.option('-b', '--with-binaries', action='store_true',
help='copy the built binaries over to avoid a rebuild')
@@ -21,7 +21,7 @@ index 7ad18e584ead6347ef67eb670ad53a6952d4e459..d1d95e6ea060a76c672ef30278ba5c75
@cmdln.option('-x', '--with-history', action='store_true',
help='replicate the history of each package.')
@cmdln.option('-o', '--make-older', action='store_true',
-@@ -2118,6 +2120,8 @@ class Osc(cmdln.Cmdln):
+@@ -2126,6 +2128,8 @@ class Osc(cmdln.Cmdln):
The user must be able to create DESTPRJ
@@ -30,7 +30,7 @@ index 7ad18e584ead6347ef67eb670ad53a6952d4e459..d1d95e6ea060a76c672ef30278ba5c75
usage:
osc copyprj SOURCEPRJ DESTPRJ
"""
-@@ -2146,6 +2150,7 @@ class Osc(cmdln.Cmdln):
+@@ -2154,6 +2158,7 @@ class Osc(cmdln.Cmdln):
withhistory = opts.with_history,
makeolder = opts.make_older,
resign = opts.re_sign,
@@ -39,10 +39,10 @@ index 7ad18e584ead6347ef67eb670ad53a6952d4e459..d1d95e6ea060a76c672ef30278ba5c75
print("done cp")
print(r)
diff --git a/osc/core.py b/osc/core.py
-index a0ab1ddff152332749e192414c83a61a045d3988..a0672d3338b777acda32fb02ac49ae02a3295c26 100644
+index 116d4f2e895d1ed03aba483588cd78ef168175f7..d3d4ca9cf3b3cfc6ad966fa3692cfa019d8d567c 100644
--- a/osc/core.py
+++ b/osc/core.py
-@@ -6269,6 +6269,8 @@ def copy_prj(src_apiurl, src_project, dst_project,
+@@ -6303,6 +6303,8 @@ def copy_prj(src_apiurl, src_project, dst_project,
query['resign'] = '1'
if comment:
query['comment'] = comment
diff --git a/0013-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch b/0005-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch
index 8c8978d79cd3..fc5258ec16db 100644
--- a/0013-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch
+++ b/0005-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch
@@ -9,10 +9,10 @@ Subject: [PATCH] Add -p to copyprj to enable copying of prjconf
2 files changed, 8 insertions(+)
diff --git a/osc/commandline.py b/osc/commandline.py
-index d1d95e6ea060a76c672ef30278ba5c75f46ad849..92eddde45027feb6d9730263c84a4dcdecdf47d5 100644
+index d67a4184afac79795c2e3dd7a2ca1ad64d77fe9a..2eff6bfb2a38a7919d2c1850a57f49ebe7feba92 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
-@@ -2106,6 +2106,8 @@ class Osc(cmdln.Cmdln):
+@@ -2114,6 +2114,8 @@ class Osc(cmdln.Cmdln):
help='replicate the history of each package.')
@cmdln.option('-o', '--make-older', action='store_true',
help='No idea')
@@ -21,7 +21,7 @@ index d1d95e6ea060a76c672ef30278ba5c75f46ad849..92eddde45027feb6d9730263c84a4dcd
@cmdln.option('-r', '--re-sign', action='store_true',
help='re-sign the binaries')
@cmdln.option('-m', '--message', metavar='TEXT',
-@@ -2151,6 +2153,7 @@ class Osc(cmdln.Cmdln):
+@@ -2159,6 +2161,7 @@ class Osc(cmdln.Cmdln):
makeolder = opts.make_older,
resign = opts.re_sign,
now = opts.now,
@@ -30,10 +30,10 @@ index d1d95e6ea060a76c672ef30278ba5c75f46ad849..92eddde45027feb6d9730263c84a4dcd
print("done cp")
print(r)
diff --git a/osc/core.py b/osc/core.py
-index a0672d3338b777acda32fb02ac49ae02a3295c26..b7a09c85b71bb403b0334dd51ca9c8754b7c0842 100644
+index d3d4ca9cf3b3cfc6ad966fa3692cfa019d8d567c..66b51f437df47cb09cb7b440338836cf9a79ec62 100644
--- a/osc/core.py
+++ b/osc/core.py
-@@ -6250,6 +6250,8 @@ def copy_prj(src_apiurl, src_project, dst_project,
+@@ -6284,6 +6284,8 @@ def copy_prj(src_apiurl, src_project, dst_project,
withhistory = False,
makeolder = False,
resign = False,
@@ -42,7 +42,7 @@ index a0672d3338b777acda32fb02ac49ae02a3295c26..b7a09c85b71bb403b0334dd51ca9c875
comment = None):
"""
Create a copy of a project.
-@@ -6271,6 +6273,9 @@ def copy_prj(src_apiurl, src_project, dst_project,
+@@ -6305,6 +6307,9 @@ def copy_prj(src_apiurl, src_project, dst_project,
query['comment'] = comment
if now:
query['nodelay'] = '1'
diff --git a/0005-Match-more-command-aliases-in-the-zsh-completion.patch b/0005-Match-more-command-aliases-in-the-zsh-completion.patch
deleted file mode 100644
index 2d3f4c848c0d..000000000000
--- a/0005-Match-more-command-aliases-in-the-zsh-completion.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Fri, 21 Jul 2023 21:50:05 +0300
-Subject: [PATCH] Match more command aliases in the zsh completion
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 18 +++++++-----------
- 1 file changed, 7 insertions(+), 11 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index 67afbc2f89cc6520365ce77702207be11b679ab6..244a23556e9b8179c8de711ad6a00a866759ed42 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -82,17 +82,13 @@ _osc() {
-
- _osc_update_project_list
-
-- if [ "$cmd" = "submitreq" -o "$cmd" = "sr" ]; then
-- _osc_cmd_submitreq
-- elif [ "$cmd" = "getbinaries" ]; then
-- _osc_cmd_getbinaries
-- elif [ "$cmd" = "checkout" -o "$cmd" = "co" -o "$cmd" = "branch" ]; then
-- _osc_cmd_checkout
-- elif [ "$cmd" = "buildlog" -o "$cmd" = "buildinfo" -o "$cmd" = "bl" ]; then
-- _osc_cmd_buildlog
-- else
-- _osc_cmd_do $cmd
-- fi
-+ case $cmd in
-+ submitrequest|submitreq|sr) _osc_cmd_submitreq ;;
-+ getbinaries) _osc_cmd_getbinaries ;;
-+ checkout|co|branch|getpac|bco|branchco) _osc_cmd_checkout ;;
-+ buildlog|buildinfo|bl|blt|buildlogtail) _osc_cmd_buildlog ;;
-+ *) _osc_cmd_do $cmd
-+ esac
- else
- local hline
- local -a cmdlist
diff --git a/0014-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch b/0006-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch
index 0864e854ff96..44568de74396 100644
--- a/0014-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch
+++ b/0006-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch
@@ -14,10 +14,10 @@ Subject: [PATCH] Add support for --rebuild and --chroot-only in build.
2 files changed, 10 insertions(+)
diff --git a/osc/build.py b/osc/build.py
-index 429217916e4673cd67a954e57be04adb62b105ce..1afc2e76862793d3e0e2811b4aa86206ca352374 100644
+index 096e6c40998e35650b857d09cce41cfc95e10f67..ef18a0b8cb61ae96a013f526775cd7644acce648 100644
--- a/osc/build.py
+++ b/osc/build.py
-@@ -699,6 +699,12 @@ def main(apiurl, store, opts, argv):
+@@ -727,6 +727,12 @@ def main(apiurl, store, opts, argv):
buildargs.append('--norootforbuild')
if opts.clean:
buildargs.append('--clean')
@@ -31,10 +31,10 @@ index 429217916e4673cd67a954e57be04adb62b105ce..1afc2e76862793d3e0e2811b4aa86206
buildargs.append('--no-checks')
if not opts.no_changelog:
diff --git a/osc/commandline.py b/osc/commandline.py
-index 92eddde45027feb6d9730263c84a4dcdecdf47d5..90fc4aa23023883049949ec7cf54d311c69f94ea 100644
+index 2eff6bfb2a38a7919d2c1850a57f49ebe7feba92..2e575eddd4aa044ca53c4677fd8a99a8d92890c8 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
-@@ -7100,6 +7100,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
+@@ -7119,6 +7119,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='Copy overlay filesystem to buildroot after installing all RPMs .')
@cmdln.option('--noinit', '--no-init', action='store_true',
help='Skip initialization of build root and start with build immediately.')
diff --git a/0006-Refactor-help-text-generation-in-zsh-completition-so.patch b/0006-Refactor-help-text-generation-in-zsh-completition-so.patch
deleted file mode 100644
index 9e9d3af784c9..000000000000
--- a/0006-Refactor-help-text-generation-in-zsh-completition-so.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Fri, 21 Jul 2023 23:09:51 +0300
-Subject: [PATCH] Refactor help text generation in zsh completition so it can
- be reused
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 42 ++++++++++++++++--------------------------
- 1 file changed, 16 insertions(+), 26 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index 244a23556e9b8179c8de711ad6a00a866759ed42..f6e1978c2abaf5dde5ec3e8ee598290bab476046 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -181,12 +181,16 @@ _osc_cmd_buildlog() {
- }
-
- _osc_cmd_submitreq() {
-+ _osc_complete_help_commands 'options' 'option'
-+}
-+
-+_osc_complete_help_commands() {
- local hline
- local -a cmdlist
- local tag=0
- _call_program help-commands osc help $cmd | while read -A hline; do
- # start parsing from "usage:"
-- [[ $hline[1] = "usage:" ]] && tag=1
-+ [[ $hline[1] = "${1}:" ]] && tag=1
- [[ $tag = 0 ]] && continue
-
- if [[ $hline[1] =~ ^osc ]]; then
-@@ -198,40 +202,26 @@ _osc_cmd_submitreq() {
-
- (( ${#hline} < 2 )) && continue
-
-- cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-+ cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-
- done
--
-- _describe -t osc-commands 'osc command' cmdlist
--}
-
-+ if [ -n "$cmdlist" ] ; then
-+ _describe -t osc-commands "osc $2" cmdlist
-+ else
-+ return 1
-+ fi
-+}
-
- _osc_cmd_do() {
-- local hline
-- local -a cmdlist
-- local tag=0
--
- # only start completion if there's some '-' on the line
- if ! [ "$words[2]" = "-" ]; then
-- _complete
-- return
-+ _complete
-+ return
- fi
-
-- _call_program help-commands osc help $cmd | while read -A hline; do
-- # start parsing from "Options:"
-- [[ $hline[1] = "Options:" ]] && tag=1
-- [[ $tag = 0 ]] && continue
-- # Option has to start with a '-'
-- [[ $hline[1] =~ ^- ]] || continue
-- (( ${#hline} < 2 )) && continue
--
-- cmdlist=($cmdlist "${hline[1]%,}:${hline[2,-1]}")
-- done
--
-- if [ -n "$cmdlist" ]; then
-- _describe -t osc-commands 'osc command' cmdlist
-- else
-- _complete
-+ if ! _osc_complete_help_commands 'options' 'option'; then
-+ _complete
- fi
- }
-
diff --git a/0015-Add-architecture-and-scheduler-maps.patch b/0007-Add-architecture-and-scheduler-maps.patch
index e38914d086bb..e38914d086bb 100644
--- a/0015-Add-architecture-and-scheduler-maps.patch
+++ b/0007-Add-architecture-and-scheduler-maps.patch
diff --git a/0007-Complete-help-text-for-options-that-have-separate-ha.patch b/0007-Complete-help-text-for-options-that-have-separate-ha.patch
deleted file mode 100644
index b824e758cbbc..000000000000
--- a/0007-Complete-help-text-for-options-that-have-separate-ha.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Fri, 21 Jul 2023 23:20:23 +0300
-Subject: [PATCH] Complete help text for options that have separate handlers
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 37 ++++++++++++++++++++++++++-----------
- 1 file changed, 26 insertions(+), 11 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index f6e1978c2abaf5dde5ec3e8ee598290bab476046..8ac714c88a82aa251591b3e52d9cd3dcf28d838d 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -161,23 +161,38 @@ _osc_project_repositories() {
- }
-
- _osc_cmd_getbinaries() {
-- _arguments \
-- '1:PROJECT:( `cat $osc_projects` )' \
-- '2:PACKAGE:(PACKAGE)' \
-- '3:REPOSITORY:( `_osc_project_repositories`' \
-- '4:ARCHITECTURE:(i586 x86_64)'
-+ if [ "$words[2]" = "-" ]; then
-+ _osc_complete_help_commands 'options' 'option'
-+ return
-+ else
-+ _arguments \
-+ '1:PROJECT:( `cat $osc_projects` )' \
-+ '2:PACKAGE:(PACKAGE)' \
-+ '3:REPOSITORY:( `_osc_project_repositories`' \
-+ '4:ARCHITECTURE:(i586 x86_64)'
-+ fi
- }
-
- _osc_cmd_checkout() {
-- _arguments \
-- '1:PROJECT:( `cat $osc_projects` )' \
-- '2:PACKAGE:(PACKAGE)'
-+ if [ "$words[2]" = "-" ]; then
-+ _osc_complete_help_commands 'options' 'option'
-+ return
-+ else
-+ _arguments \
-+ '1:PROJECT:( `cat $osc_projects` )' \
-+ '2:PACKAGE:(PACKAGE)'
-+ fi
- }
-
- _osc_cmd_buildlog() {
-- _arguments \
-- '1:REPOSITORY:( `_osc_project_repositories` )' \
-- '2:ARCHITECTURE:(i586 x86_64)'
-+ if [ "$words[2]" = "-" ]; then
-+ _osc_complete_help_commands 'options' 'option'
-+ return
-+ else
-+ _arguments \
-+ '1:REPOSITORY:( `_osc_project_repositories` )' \
-+ '2:ARCHITECTURE:(i586 x86_64)'
-+ fi
- }
-
- _osc_cmd_submitreq() {
diff --git a/0008-Fetch-repository-architectures-in-zsh-completition.patch b/0008-Fetch-repository-architectures-in-zsh-completition.patch
deleted file mode 100644
index 056aa167d948..000000000000
--- a/0008-Fetch-repository-architectures-in-zsh-completition.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Fri, 21 Jul 2023 23:45:45 +0300
-Subject: [PATCH] Fetch repository architectures in zsh completition
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 27 +++++++++++++++++++++++++--
- 1 file changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index 8ac714c88a82aa251591b3e52d9cd3dcf28d838d..7d495a1c37dffdbc3c644b82b4092397a4037454 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -160,16 +160,35 @@ _osc_project_repositories() {
- fi
- }
-
-+_osc_project_repositories_arches() {
-+ if [ ! -s $PWD/.osc/_build_repositories ] || \
-+ _osc_call_me_maybe $PWD/.osc/_build_repositories ; then
-+ osc repositories > /dev/null
-+ fi
-+ # Just check if file exist in case the call to the api failed
-+ if [ -s $PWD/.osc/_build_repositories ] ; then
-+ grep -- $1 $PWD/.osc/_build_repositories | while read build_repository ; do
-+ # Only output second word of each line
-+ echo ${build_repository#*\ }
-+ done | sort -u
-+ fi
-+}
-+
-+
- _osc_cmd_getbinaries() {
- if [ "$words[2]" = "-" ]; then
- _osc_complete_help_commands 'options' 'option'
- return
- else
-+ if [ -n "$words[2]" ] ; then
-+ local osc_project_repository_arch=$(_osc_project_repositories_arches \
-+ "${words[2]}")
-+ fi
- _arguments \
- '1:PROJECT:( `cat $osc_projects` )' \
- '2:PACKAGE:(PACKAGE)' \
- '3:REPOSITORY:( `_osc_project_repositories`' \
-- '4:ARCHITECTURE:(i586 x86_64)'
-+ '4:ARCHITECTURE:(`echo $osc_project_repository_arch`)'
- fi
- }
-
-@@ -189,9 +208,13 @@ _osc_cmd_buildlog() {
- _osc_complete_help_commands 'options' 'option'
- return
- else
-+ if [ -n "$words[2]" ] ; then
-+ local osc_project_repository_arch=$(_osc_project_repositories_arches \
-+ "${words[2]}")
-+ fi
- _arguments \
- '1:REPOSITORY:( `_osc_project_repositories` )' \
-- '2:ARCHITECTURE:(i586 x86_64)'
-+ '2:ARCHITECTURE:(`echo $osc_project_repository_arch`)'
- fi
- }
-
diff --git a/0016-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch b/0008-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch
index 37c9c8b1a3a9..8725a867bbd1 100644
--- a/0016-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch
+++ b/0008-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch
@@ -9,10 +9,10 @@ Subject: [PATCH] Trap any kind of exception during plugin parsing (eg IOError
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/osc/commandline.py b/osc/commandline.py
-index 90fc4aa23023883049949ec7cf54d311c69f94ea..d0d74d4f68a1a970cbc4b799ccd5da2f29bc6726 100644
+index 2e575eddd4aa044ca53c4677fd8a99a8d92890c8..ed110d359bb6803ab06d21fe88ea6a43006943fa 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
-@@ -10121,7 +10121,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
+@@ -10164,7 +10164,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
if (inspect.isfunction(data) and inspect.getmodule(data) == mod
or inspect.ismodule(data)):
setattr(self.__class__, name, data)
diff --git a/0009-Add-zsh-completion-for-build-command.patch b/0009-Add-zsh-completion-for-build-command.patch
deleted file mode 100644
index 08c5551d0959..000000000000
--- a/0009-Add-zsh-completion-for-build-command.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@jolla.com>
-Date: Sat, 22 Jul 2023 00:54:39 +0300
-Subject: [PATCH] Add zsh completion for build command
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
----
- contrib/osc.zsh | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/contrib/osc.zsh b/contrib/osc.zsh
-index 7d495a1c37dffdbc3c644b82b4092397a4037454..10bfc32e89b6ae486d54d2a519db346074d9b5f5 100644
---- a/contrib/osc.zsh
-+++ b/contrib/osc.zsh
-@@ -85,6 +85,7 @@ _osc() {
- case $cmd in
- submitrequest|submitreq|sr) _osc_cmd_submitreq ;;
- getbinaries) _osc_cmd_getbinaries ;;
-+ build) _osc_cmd_build ;;
- checkout|co|branch|getpac|bco|branchco) _osc_cmd_checkout ;;
- buildlog|buildinfo|bl|blt|buildlogtail) _osc_cmd_buildlog ;;
- *) _osc_cmd_do $cmd
-@@ -218,6 +219,22 @@ _osc_cmd_buildlog() {
- fi
- }
-
-+_osc_cmd_build() {
-+ if [ "$words[2]" = "-" ]; then
-+ _osc_complete_help_commands 'options' 'option'
-+ return
-+ else
-+ if [ -n "$words[2]" ] ; then
-+ local osc_project_repository_arch=$(_osc_project_repositories_arches \
-+ "${words[2]}")
-+ fi
-+ _arguments \
-+ '1:REPOSITORY:( `_osc_project_repositories` )' \
-+ '2:ARCHITECTURE:(`echo $osc_project_repository_arch`)' \
-+ '3:Build Description:_files'
-+ fi
-+}
-+
- _osc_cmd_submitreq() {
- _osc_complete_help_commands 'options' 'option'
- }
diff --git a/0017-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch b/0009-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch
index b30d58e38006..b30d58e38006 100644
--- a/0017-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch
+++ b/0009-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch
diff --git a/PKGBUILD b/PKGBUILD
index 2dcea92ede82..82352034ea6f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
# Contributor : Patrick McCarty <pnorcks at gmail dot com>
pkgname=osc
-pkgver=1.3.1
+pkgver=1.5.0
pkgrel=1
pkgdesc="Command line client for the openSUSE Build Service"
arch=(any)
@@ -25,42 +25,17 @@ optdepends=('obs-build: required to run local builds'
conflicts=('osc-git' 'osc-bash-completion' 'zsh-completion-osc')
replaces=('osc-bash-completion' 'zsh-completion-osc')
source=("https://github.com/openSUSE/${pkgname}/archive/${pkgver}.tar.gz"
- 0001-Import-zsh-completition-made-by-Holger-Macht.patch
- 0002-Fetch-project-list-in-zsh-completition-at-runtime.patch
- 0003-Parse-pwd-s-apiurl-in-zsh-completion.patch
- 0004-Fetch-project-repositories-list-for-zsh-completion.patch
- 0005-Match-more-command-aliases-in-the-zsh-completion.patch
- 0006-Refactor-help-text-generation-in-zsh-completition-so.patch
- 0007-Complete-help-text-for-options-that-have-separate-ha.patch
- 0008-Fetch-repository-architectures-in-zsh-completition.patch
- 0009-Add-zsh-completion-for-build-command.patch
- 0010-Add-sb2install-support-to-osc.patch
- 0011-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch
- 0012-Support-synchronous-copyproj.patch
- 0013-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch
- 0014-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch
- 0015-Add-architecture-and-scheduler-maps.patch
- 0016-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch
- 0017-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch
+ 0001-remove-public-route-from-osc.patch
+ 0002-Add-sb2install-support-to-osc.patch
+ 0003-Support-osc-copyprj-in-api-by-Islam-Amer-usage-osc-c.patch
+ 0004-Support-synchronous-copyproj.patch
+ 0005-Add-p-to-copyprj-to-enable-copying-of-prjconf.patch
+ 0006-Add-support-for-rebuild-and-chroot-only-in-build.-re.patch
+ 0007-Add-architecture-and-scheduler-maps.patch
+ 0008-Trap-any-kind-of-exception-during-plugin-parsing-eg-.patch
+ 0009-Fix-hdrmd5-check-of-downloaded-packages-from-DoD-rep.patch
)
-sha256sums=('6fb9fee8dfd86276632d6a7a25169f34bec1bc251c79161b5f096a9ebde51cd8'
- '6d0343bd5254bebf4feb972b198953f7faa977411d007f7d432ed8b969ef20dd'
- '60e861db1a13b3a0dce8d9630bc77f023773c550558a2f2f5d144f56bcb01f49'
- '89d7acdb5dd2ad996f438681d16fca7d8a7fcccc0c9947647a24a93ff0820295'
- '278e8da8f3010de09e031d90cf759d24d68bd44eba9dbbef9aa78abb11e13f31'
- 'f3871ab614898a9a71ccb5545211aefa8bbacebf9500126c2a1d07c2c939b29c'
- '794b07b4edc5a0a53f6780a3c9b8442264d960ceae525b7ca9407b1b853c009c'
- '88ad2c7135f972e69b0188f3f10f4907a0e5dda3bf06a80656f4772339cbfb4d'
- '33fc7b90ca2b14b66622816a895f60051f6c4dce6d843504ff4d125728043a56'
- '5fab7671bd4e4aa52930f9e52a0b1fbb6187df1ca6a8d3e975beeccc3016938e'
- '19829c5586774b65321a0c27539ce6c3d5de041faeb77efff38c00c952e36b67'
- '705395902faf621929d921e414551d14998b6daf22f0732253a648b655d448e2'
- '8ca69c2797f933e7fe7c6b4452d4ce848dbb26a35d1b143fd8017cd91f5061b8'
- '4b079b31fe946c7bf595494fab2f84cc3c094354daf8d1df4d9d5615fb0f06a9'
- '8c05cda87e16283af460d56113666b9f7896f1e77b9055da00d9f45d971bcd7c'
- 'eae5f978b8385db3acae46df96fc4973f306c4a640389165a8ac54469d370e5b'
- 'e690cc2396b42e2f85e961595526e056f86dd850d2b2c74178381d89d33afb6a'
- '67c916cd7ba9dcd4899477c223c79f7087c0a0077d33f95ccb465b790e052547')
+
prepare() {
# Add 'Arch_Core' and 'Arch_Extra' as osc build targets
@@ -85,7 +60,19 @@ package() {
python setup.py install --root="${pkgdir}/" --optimize=1 --prefix=/usr
install -Dm644 contrib/complete.sh "${pkgdir}/usr/share/bash-completion/completions/osc"
- install -Dm755 contrib/osc.zsh "${pkgdir}/usr/share/zsh/site-functions/_osc"
+ install -Dm755 contrib/osc.zsh "${pkgdir}/usr/share/zsh/functions/Completion/_osc"
+
}
+sha256sums=('7d3be5b17338f11767441c451c50137356756b51786d0296e751f2fef1c87e27'
+ '06cdc1134dcfec28af98b3738189c8794cf898fa2578a7a2947acc3102b16094'
+ '1e4a61c7ae267812de89459c715baa66115851d0f213f95f4ac46fe0f67802a3'
+ 'd5415d2ad620ec8ff9c5ea9b97b78ed76eef4ead4b11892465f6a96a015a03b7'
+ 'a857b48a3c9d698c8ab347509dafb67cfe201f882a0d90f9738c6386945ca3b6'
+ 'eba2c169e52fb5b0e722591f67b8c93615610a66acfb5e660a65fc8fb9f0c81c'
+ '83219095de865463ce82206b50fc975c4a4de86e5af3415c8f41ed8de9d2ebd1'
+ 'eae5f978b8385db3acae46df96fc4973f306c4a640389165a8ac54469d370e5b'
+ 'd2ba1b665101e28673c65912b7bc9095dbdc02049fb8c8d83f1809a441132d8f'
+ '67c916cd7ba9dcd4899477c223c79f7087c0a0077d33f95ccb465b790e052547')
+
# vim:set sts=2 ts=2 sw=2 et: