1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-22 02:06:18 +02:00
Commit Graph

1715 Commits

Author SHA1 Message Date
dc22af0183 Remove deprecated subcommands 'create', 'list', 'log', 'show', 'decline', 'accept', 'delete', 'revoke' from the 'submitrequest' command 2022-08-25 10:01:36 +02:00
28c898a2cb Remove deprecated '--seperate-requests' option from the 'submitrequest' command 2022-08-25 09:57:42 +02:00
47d4aa1eda Remove deprecated '--raw' option from the 'develproject' command 2022-08-25 09:56:36 +02:00
cd66d2ab19 Remove deprecated '--maintained' option from the 'search' command 2022-08-25 09:50:42 +02:00
ee93af6d5f Remove deprecated 'rlog' command 2022-08-25 09:48:31 +02:00
c7df2a154b Remove deprecated 'rprjresults' command 2022-08-25 09:48:13 +02:00
7c282e80e9 Remove deprecated 'rresults' command 2022-08-25 09:47:49 +02:00
81d8c821d1 Remove deprecated 'results_meta' command 2022-08-25 09:47:26 +02:00
bfcdba8b4d Remove deprecated 'deleteprj' command 2022-08-25 09:46:54 +02:00
9ca0a5122e Remove deprecated 'deletepac' command 2022-08-25 09:46:35 +02:00
59e697e61e Remove deprecated 'editmeta' command 2022-08-25 09:46:08 +02:00
9cc4a5594f Fix resource warnings (unclosed files) 2022-08-24 08:43:09 +02:00
31b804eeec
Merge pull request #1114 from dmach/replace-imp-with-importlib
Replace imp with importlib
2022-08-23 08:29:34 +02:00
ddec088efc Replace imp with importlib 2022-08-22 15:45:25 +02:00
2892f1bb11 Do not list declined requests by default 2022-08-22 11:34:56 +02:00
lethliel
4b2bfb0b80 add version command to print the used version 2022-08-17 22:21:02 +02:00
6cb7412749 Remove duplicated --debug and --verbose options
Additional changes:
* rename getbinaries --debug to --debuginfo to avoid conflicts
* switch conf['verbose'] from int to bool

The changes were needed because the new argparser behaves differently
and commands such as `osc ls` ran in verbose mode by default.
2022-08-12 10:06:00 +02:00
84c97ab625 Fix crash caused by concatenating bytes with string 2022-08-12 10:06:00 +02:00
be8a5268a8 Replace unmaintained cmdln.py with a custom code
Cmdln.py is unmaintained for years and uses deprecated optparse.
Let's replace it with a simpler custom code. Also remove code
that generates man page, we'll replace it with a 3rd party tool.
2022-08-12 10:05:59 +02:00
e469c2c184
Merge pull request #1041 from AdamMajer/master
Add support for project separator
2022-08-12 10:03:23 +02:00
Anatoli Babenia
0036aa931e Print debug messages to stderr 2022-08-04 17:12:57 +03:00
Anatoli Babenia
988f19f9ce Document build repo selection logic 2022-08-03 13:36:31 +03:00
Anatoli Babenia
0660c14a62 Add debug print for REPO (and desc just in case) 2022-08-03 10:40:29 +03:00
Anatoli Babenia
0b6039025f Shortened build help and add debug prints
Debug prints are needed for troubleshooting ARCH selection problem in
https://github.com/openSUSE/osc/pull/241#issuecomment-1203463612
2022-08-03 08:36:51 +03:00
Anatoli Babenia
d9bc6d1c12 Remove unused code for discontinued distributions 2022-08-02 14:47:56 +03:00
Anatoli Babenia
5751222bd0 Remove extra line from the end of osc dists output 2022-08-02 14:45:23 +03:00
Anatoli Babenia
4d6a6aaf96 Move output formatting from core into commandline
This makes `get_distributions()` return list of dicts.
2022-08-02 14:45:23 +03:00
Anatoli Babenia
10a156d4ca Fix spelling mistake in get_distributions method name 2022-08-02 14:45:23 +03:00
Anatoli Babenia
560e556d36 Do not ask for login for -h,--help 2022-07-29 18:59:25 +03:00
eb83b42f32 Fix several undefined-variable issues reported by pylint 2022-07-28 21:01:16 +02:00
feb53212dd Modernize code with pyupgrade
pyupgrade --keep-percent-format --py36-plus `find -name '*.py'`
2022-07-28 19:14:12 +02:00
229913a77f Clean imports up, drop python 2 fallbacks 2022-07-28 13:17:43 +02:00
e16e196fa1
Merge pull request #1040 from dmach/fix/multibuild-commandline
Fix -M/--multibuild user experience, allow globs where possible
2022-07-28 11:03:34 +02:00
84fa637556 Add XDG compatible location for osc plugins.
I believe it is generally a good idea to move stuff from $HOME to
XDG-compatible directories.
2022-07-28 10:26:13 +02:00
ff1ae5e25e Fix multibuild packages in osc wipebinaries 2022-07-26 09:51:16 +02:00
f70b480cab Fix multibuild packages in osc jobhistory 2022-07-26 09:51:16 +02:00
a51524e5af Fix multibuild packages in osc buildhistory 2022-07-26 09:51:16 +02:00
1a4942da83 Fix multibuild packages in osc build 2022-07-26 09:51:16 +02:00
5198b6334b Fix multibuild packages in osc buildinfo 2022-07-26 09:51:16 +02:00
0fd93f7443 Fix multibuild packages in osc triggerreason 2022-07-26 09:51:16 +02:00
182e8e20a4 Fix multibuild packages in osc remotebuildlog 2022-07-26 09:51:15 +02:00
26ad5aa35c Fix multibuild packages in osc buildlog 2022-07-26 09:51:15 +02:00
502bff50ff Fix multibuild packages in osc restartbuild 2022-07-26 09:51:15 +02:00
30a3106375 Fix multibuild packages in osc sendsysrq 2022-07-26 09:51:15 +02:00
55ad41d33b Fix multibuild packages in osc results 2022-07-26 09:51:15 +02:00
6ccdb9cfe3 Fix multibuild packages in osc rebuild 2022-07-26 09:51:15 +02:00
637cfe8471
Merge pull request #1023 from dmach/fix/622-additional-changes
parseRevisionOption(): Raise an exception on invalid revisons
2022-07-25 18:26:06 +02:00
8d843b5968 Revert "interpretation of string literals in messages"
Emojis were broken due to this commit.

The revert causes a change in behavior:
"\n" no longer gets resolved to a newline.
It is suggested to do the following instead:

$ osc <command> ... -m "first line
second line"

This reverts commit 16fda3115c.
2022-07-07 15:42:22 +02:00
Adam Majer
f10247014d Process input with configurable project separators
This allows for usage of configurable project name separator in
the command line inputs

Fixes: #1024
2022-07-04 15:05:05 +02:00
Adam Majer
c4c2d2a933 Add project_separator to config file
This allows for arbitrary string to be used as a project
separator instead of restricting oneself to : or directory
structure.

Fixes: #1024
2022-07-04 15:05:05 +02:00
253d760a76 fix crash on "osc up" for git based package/projects 2022-06-24 08:46:49 +02:00
295ea7f356 Warn when trying to commit a prj/pac managed in scm 2022-06-08 14:18:33 +02:00
fad89f8e09
Merge pull request #1027 from adrianschroeter/github
add another exception for github URLs for "osc add"
2022-06-02 10:21:02 +02:00
a223dd085a
Merge pull request #1009 from dmach/aggregatepac-flavor
Support flavors in aggregatepac
2022-06-02 10:06:21 +02:00
cf5da11b26 Enable md5 revisions in osc log 2022-06-02 10:02:32 +02:00
Mihai Moldovan
f2474fa7f0 commandline: handle calls without arguments gracefully
Fixes the following error:

```
%  osc
Traceback (most recent call last):
  File "/usr/bin/osc", line 45, in <module>
    r = babysitter.run(osccli)
  File "/usr/lib/python3.10/site-packages/osc/babysitter.py", line 67, in run
    return prg.main(argv)
  File "/usr/lib/python3.10/site-packages/osc/cmdln.py", line 341, in main
    self.postoptparse()
  File "/usr/lib/python3.10/site-packages/osc/commandline.py", line 137, in postoptparse
    if self._get_canonical_cmd_name(self.args[0]) == "help":
IndexError: list index out of range
```
2022-05-30 20:43:37 +02:00
Marco Strigl
c3d535c3b2
Merge pull request #1012 from adrianschroeter/obs_git
initial obs-git support
2022-05-24 11:39:45 +02:00
cc0b8f1606 Never require login in the help command 2022-05-05 11:07:28 +02:00
Dirk Müller
56ad831a39
Add osc helm type build support 2022-05-04 23:17:20 +02:00
c875ca2886
initial obs-git support
* init command is working inside of a git repository
* downloadassets command fetches references assets from build description
* checkout is cloning from git
2022-04-29 09:59:13 +02:00
Dirk Müller
3ed913c007
Whitespace fixes as expected by pycodestyle/pep8 2022-04-27 14:13:18 +02:00
Dirk Müller
69c83d41aa
add support for building preinstall images
This is yet another build type supported by the obs-build
script intended to build images that speed up the build setup
phase.
2022-04-27 14:00:00 +02:00
Dirk Müller
32f37e307a
Stylistic cleanups 2022-04-26 09:37:18 +02:00
Marco Strigl
d5e04f806f
Merge pull request #1015 from dmach/fix/1014-getbinaries-download-into-subdirs
Fix getbinaries command by downloading files in subdirs named by the packages
2022-04-25 11:29:35 +02:00
e88459e02b
add another exception for github URLs for "osc add"
osc#905
2022-04-11 08:48:30 +02:00
Daniel Mach
34563aa7b2
Merge pull request #850 from lethliel/fix_issue_849
use sr_ids[0] for superseding
2022-04-07 10:43:43 +02:00
Daniel Mach
5d6cfe80d5
Merge pull request #622 from jberry-suse/parseRevisionOption-clean
osc/core: parseRevisionOption(): cleanup and make logic consistent.
2022-04-04 10:52:37 +02:00
c9f8fedf01 Fix getbinaries by downloading logs and metadata into subdirs named by packages
This applies when downloading multiple packages, typically the whole repo.
When downloading a single package, everything works as usual
and the subdir is not created.
2022-03-30 11:14:19 +02:00
a342eacf2e Revert "Skip fetching metadata and logs in the getbinaries command"
This reverts commit 08a70952c0.
2022-03-21 17:10:07 +01:00
Daniel Mach
cb4b2389a6
Merge pull request #747 from adrianschroeter/request_diffing
support request diffing relative to a former request
2022-03-16 14:20:20 +01:00
c568cf7b41 support request diffing relative to a former request 2022-03-16 13:57:01 +01:00
Daniel Mach
ade215c071
Merge pull request #460 from JanZerebecki/rm-dead-doc-ref
Remove reference to non existing documentation
2022-03-15 09:56:41 +01:00
5c5597432c Support flavors in aggregatepac 2022-03-02 14:38:21 +01:00
Daniel Mach
ced706080b
Merge pull request #1006 from dmach/getbinaries-multibuild
Fix getbinaries command to fetch also multibuild packages
2022-02-28 16:35:26 +01:00
e37e144099 Fix getbinaries -M/--multibuild-package option usage 2022-02-28 13:31:51 +01:00
08a70952c0 Skip fetching metadata and logs in the getbinaries command
They have identical names for all downloaded packages
and get overwritten by the last downloaded file.
Unless we dowload them into subdirs or prefix them with package name,
it makes no sense to download them.
2022-02-28 13:09:37 +01:00
John Paul Adrian Glaubitz
483e07042a Add -F option to osc submitreq
Fixes #1001
2022-02-25 12:01:10 +01:00
d222a38d03 Fix getbinaries command to fetch also multibuild packages 2022-02-23 14:56:02 +01:00
171b546379 Remove Windows from the supported operating systems
The ':' character is used as a separator in Open Build Service
and constantly appears in directory names after running osc commands.
Windows do not support ':' as a valid character on file system.
This breaks not only osc but also basic commands such
as 'git clone' on a project that contains colons in paths.

That's why we decided to make osc unsupported on Windows.
2022-02-17 13:34:03 +01:00
dc253ed212
add build --verbose option for build script
shows kernel messages (only) atm
2022-01-13 11:57:54 +01:00
Marcus Huewe
b8482bfab3 Osc.postoptparse only returns if the get_config call succeeds
The old code passes try_again=False to the recursive postoptparse
call when calling it from one of the exception handlers. This is
wrong because it can result in an incomplete conf.config dict (for
instance, if two apiurl sections have no user and no password and
no credentials_mgr_class option - see #761 ("Traceback config with
two backends and no username")).
Hence, Osc.postoptparse should only return if the conf.get_config
call succeeds. For this, unconditionally call Osc.postoptparse from
within the exception handlers. Note: this could potentially (although
quite unlikely) result in an endless recursion but in each recursive
call "user" interaction is required (that is, the user could simply
press CTRL+c) - so this should not be a problem.

Implementation note: this change breaks the API. Rationale: the
semantics of Osc.postoptparse changed. Hence, "pretending" to
honor the try_again parameter could result in unexpected behavior
(from the API consumer's POV). Hence, a traceback might be more
sensible.

Fixes: #761 ("Traceback config with two backends and no username")
2021-11-23 15:34:48 +01:00
Marcus Huewe
b6f69180e2 Merge branch 'fix_mr' of https://github.com/adrianschroeter/osc
Do not create an MR for the entire project if "osc mr" is invoked in
a package wc (only create an MR for the specific package instead).
Strictly speaking, the "breaks" the existing UI - but this rather seems
to be a "fix" than a "break";)
2021-10-11 16:05:06 +02:00
2b278e7226
avoid sending entire projects on "osc mr"
We may have a package working directory, so we should only put this into
request and not entire project.
2021-10-08 17:13:53 +02:00
f98083df5c
detachbranch: remove _link when link target got removed 2021-09-16 17:15:33 +02:00
Marcus Huewe
d38d6a53a4 Add support for creating a workflow token via "osc token"
A workflow token can be created via "osc token --create --operation
workflow --scm-token <SCM_TOKEN>".
Triggering a workflow token via osc is probably unlikely - that's
why it is not yet implemented (it would also make the UI a bit
awkward because one has to specify a concrete http header).

Fixes: #943 ("implement osc token --operation=workflow")
2021-08-26 11:05:02 +02:00
Marcus Huewe
9eea35eda0 Use makeurl instead of manual URL construction in do_token
The use of makeurl makes the code more readable/maintainable (IMHO)
and it also does proper percentage encoding of the query string (not
that the osc codebase cares much about it, though:/).
2021-08-26 10:46:57 +02:00
Oleg Girko
fd5483c3a2 Fix XPath used in search requests.
Newer rexml Ruby gem used on OBS server side uses stricter XPath parsing.
This change fixes incorrect XPath that was accepted by older rexml,
but not accepted by newer one.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2021-08-25 19:46:23 +01:00
Marcus Huewe
d7dbd1bc0b Do not crash when running "osc search --binary --verbose foo"
The old code does not support the --binary option in combination
with the --verbose option. Specifying --binary and --verbose at
the same time results in a crash (because the binary listing
contains no <title>...</title> element).
In order to fix this, do not try to access a <title>...</title>
element when --binary and --verbose are both specified. Instead,
in this case, include information about the repo, arch, version,
and release of the corresponding binary element.

Fixes: #933 ("osc se -v -B crash")
2021-07-30 21:05:05 +02:00
Marcus Huewe
6b83134377 Merge branch 'config_select_password_store' of https://github.com/marcus-h/osc
Add support for changing the password store via "osc config" + a small
bugfix in the "osc config -d <apiurl> pass" codepath.
2021-07-21 10:31:47 +02:00
Marcus Huewe
7e23743239 Add support for changing the password store via osc config
The password store can be changed (without entering the password
again) via "osc config <apiurl> --select-password-store". This
command deletes the password from the current password store and
stores it in the selected password store.

Previously, the --select-password-store option had no meaningful
semantics. In order to use it, one always had to provide a password
and explicitly pass "pass" as the config option (the same could be
achieved by using --change-password). Hence, in a strict sense,
this change breaks the UI.
2021-07-14 11:28:57 +02:00
Marcus Huewe
0963bc690f Slash split arguments in do_browse
Without the slash splitting, "osc browse prj/pkg" interprets the
argument as a project, which is wrong. Hence, perform the slash
splitting (as most commands do).
2021-07-13 15:57:58 +02:00
William Brown
c12e0b5cda Add support for sccache.
Sccache is an alternate build caching system to ccache/icecream. It
supports C, C++ and Rust. It can optionally have distributed or remote
caches via redis, s3 object stores, memcached, azure storage or
google cloud storage.

This can help to significantly improve the performance of Rust rebuilds.

For example, Kanidm changes from 400s to 122s on a rebuild, and rust-lang
rebuilds improve from 7200s to 4770s. With some changes to the rust
packages especially this will be possible to speed up over version
changes as well.

See also: obs-build PR https://github.com/openSUSE/obs-build/pull/680
2021-05-14 12:57:40 +10:00
6632ca2d2e support _keyinfo route with signkey command by default 2021-04-28 13:42:06 +02:00
Pedro Monreal
67ac287f55 Adjust the description size of 'osc service run' 2021-04-28 12:11:56 +02:00
Marcus Huewe
f65f08dfbb Add "--force" option to the "osc add" command
"osc add --force <filename>" adds the filename to the working copy
even if it is excluded by the exclude_glob config option.
2021-03-18 15:05:31 +01:00
2bc186d0ea add new stage option for the build script
(minor code improvement for handing over release number)
2021-02-18 09:01:18 +01:00
c06b794ddf support osc build --shell-after-fail from build script 2021-02-12 08:20:51 +01:00
bc25ac769e add showlinked command 2021-02-08 10:50:45 +01:00
Marcus Huewe
2371a6c91b Support slash notation in "osc creq -a <action type> args"
Most osc commands support slash notation for the specification of
a project package pair. That is, "osc <cmd> prj/pkg" has the same
semantics as "osc <cmd> prj pkg" (in most cases).
For consistency reasons, "osc creq" should also support the slash
notation for the action type's arguments. That is, for instance,
"osc creq -a submit src_prj/src_pkg dst_prj/dst_pkg" should have the
same effect as "osc creq -a submit src_prj src_pkg dst_prj dst_pkg".

Proposed-by: darix
2021-01-25 21:16:17 +01:00
ca080d2118 add --lastsucceeded option also for buildlog command
introduce --last-succeeded alias
2021-01-18 10:21:58 +01:00