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

1308 Commits

Author SHA1 Message Date
Marcus Huewe
f12c7747d0 Merge branch 'approver' of https://github.com/adrianschroeter/osc
Introduce "osc request approval..." and "osc request cancelapproval"
commands.
2018-10-18 15:23:06 +02:00
e1fd0b4ee9 add support for approved requests (requires OBS 2.10) 2018-10-18 13:26:39 +02:00
Marcus Huewe
25014c326f Merge branch 'fix_413_get_deleted_sources' of https://github.com/lethliel/osc
Introduce --deleted option to "osc co" for checking out the files of
a deleted package (no package wc is established).
2018-10-18 12:59:55 +02:00
lethliel
0123bb71db fixes 413 checkout deleted package
* altered command do_checkout
  new option -D | --deleted. Can only be used with PACKAGE and needs
  -o to work

* what happens:
  core function checkout_deleted_package fetches the file list of the deleted
  package and saves it to given destdir. If destdir is not existent it
  creates the destination directory. Otherwise the files will be written
  in the existing directory.
2018-10-18 08:59:05 +02:00
Marcus Huewe
f1c31561cb Merge branch 'clean_xpath' of https://github.com/lethliel/osc
Let's get rid of this old cruft.
2018-08-30 14:13:00 +02:00
ae2656b415 open 0.164 development 2018-08-21 10:34:53 +02:00
d82b30636f release 0.163.0 2018-08-20 13:19:29 +02:00
lethliel
69983249ef cleanup xpath. submit/* is ignored by the API since 2012 2018-08-07 11:53:49 +02:00
Marcus Huewe
88274c92ed Merge branch 'fix_newline_in_verbose' of https://github.com/lethliel/osc
Print each unresolvable on a separate line.
2018-05-03 09:57:02 +02:00
Marcus Huewe
d756f56af2 Show diff when creating a new comment (interactive_review)
Note that the diff is only shown, if it was requested before (that is
the "i" command was issued). The new behavior is consistent with the
other commands like "a", "d" etc.
2018-04-26 17:01:49 +02:00
lethliel
b7ada2cb5b fix missing newline in osc r -v
This adds a newline after unresolvable:. So the
messages are now well printed.
2018-04-26 15:38:25 +02:00
lethliel
1caa825e89 fixed IncompleteRead(0) error on long builds.
catch IncompleteRead() and retry until retry_counter is
reached. Then re-raise IncompleteRead()
2018-04-24 10:44:46 +02:00
Marcus Huewe
5341f3aae5 Merge branch 'fix_dod_get_binaries' of https://github.com/lethliel/osc
Support dod binaries in core.get_binarylist.
2018-03-14 14:06:13 +01:00
lethliel
9b42897413 fix getbinaries with DOD binaries
getbinaries of dod binaries do not have a size or mtime.
This will break. So just set to None and print unkown instead.
2018-03-14 13:45:38 +01:00
Marcus Huewe
5fb71aa6d4 Merge branch 'fix_385' of https://github.com/lethliel/osc
Fix for python26, since it does not support an epath/xpath like
.//entry[@hash].

Fixes: #385 ("osc 0.162.x does not work anymore on SLE11")
2018-02-23 13:29:11 +01:00
Marco Strigl
e017a8e237 do not use complex path separator fixes #385
This is a fix for issue #385. osc commit breaks due to
the use of sfilelist.findall('.//entry[@hash]')

I now will iterate through the sfilelist and use

for entry in sfilelist.findall('entry'):
    if entry.get('hash'):
        ... execute hash code ...

This is a little bit slower, but should not break
on SLE11 anymore
2018-02-23 13:24:48 +01:00
80352cbfc7 add sendsysrq command 2018-02-09 08:50:21 +01:00
Marco Strigl
5b3d8633fa only assign issue detail if text for tag exists 2018-01-22 11:00:40 +01:00
ChrisWi
26f00c6749 change WARNING message for better understanding 2017-12-14 12:11:25 +01:00
lethliel
43be8f0e9c add meaningful error if no attribute name 2017-12-08 13:20:24 +01:00
lethliel
aa01b1c52a reopen 0.163 development 2017-12-06 10:22:15 +01:00
lethliel
067fd4cd2d release 0.162.1 2017-12-05 14:29:03 +01:00
Marcus Huewe
f698103977 Send sha256 hashes for tracked files if the wc is pulled/linkrepair
In case of a pulled/linkrepair wc, it is possible that the backend
requests a hash for a tracked file, which is neither added, restored,
nor modified. For instance, this can happen if a new file was added
to the link target. Hence, for a pulled/linkrepair wc always send
the sha256 hashes of the tracked files.
2017-12-03 15:02:22 +01:00
e818989d21 0.163 development open 2017-11-28 15:13:26 +01:00
2b0f015de0 0.162.0 2017-11-28 15:12:29 +01:00
lethliel
f0325eb0b5 added code to get the sha256 hashes of files
This is needed for a new validation of the source server.

The source server will 'ask' for the sha256 sum of files which are new or
modified and osc calculates the sha256 sums for those files and sends them
back to the server.

The server checks the sha256 sums and if dies if something is wrong.
2017-11-27 16:18:19 +01:00
Marcus Huewe
03c25eb8f9 Merge branch 'return_external_2.6_compat' of https://github.com/lethliel/osc
Workaround for python26 due to missing subprocess.check_output.

Fixes: #355 ("subprocess.check_output() not in Python 2.6")
2017-11-21 14:25:55 +01:00
lethliel
7581856d9b added compat code for python 2.6
if subprocess has no method check_output us Popen instead
2017-11-21 14:06:31 +01:00
Marcus Huewe
0f9ab38948 Merge branch 'fix_#351' of https://github.com/lethliel/osc
Fix logic for finding disabled repos in do_repositories.

Fixes: #351 ("Not all options for osc getbinaries is listed")
2017-11-09 11:56:36 +01:00
marco
12b17cfc5d consider arch when checking the disabled repos
At the moment just repo.name is considered. So if
the repo is disabled for s390 all other repo / arch
combination are not shown in the repo list.

To be able to change this r is now a list of dicts
containing the name and arch of the disabled repo.

None for repo if a complete arch gets disabled
None for arch if a complete repo gets disabled
2017-11-08 14:02:20 +01:00
Marcus Huewe
9d4390eed9 Close file before returning from core.dgst
The old f.close() call was never reached.
2017-11-07 17:52:34 +01:00
marco
b52edb6513 Open 0.162 development 2017-10-26 14:47:40 +02:00
marco
fbcda8ae6e prepare 0.161.1 release 2017-10-26 14:21:33 +02:00
Marcus Huewe
a884b58313 Fix python 2.6 SyntaxError
Multiple context expressions are only supported since version 2.7.
It was introduced in commit f6f879d ("Fix potential shell injection
when running rpm2cpio").
2017-10-26 14:16:58 +02:00
marco
b7d3ae992c Open 0.162 development 2017-10-26 13:51:51 +02:00
marco
72f9f89e85 prepare 0.161 release 2017-10-26 13:33:06 +02:00
Marcus Huewe
06d0693f64 Merge branch 'show_issues_in_diff' of https://github.com/lethliel/osc
When showing a diff in the interactive review mode, also show the issues
that are associated with the request.
2017-10-20 17:39:27 +02:00
marco
895f168b91 show issues (bugs) in interactive review diff 2017-10-20 12:59:47 +02:00
marco
3a5bd607f8 fixes broken osc results on project level 2017-10-18 15:17:56 +02:00
Marcus Huewe
760a3e5558 Merge branch 'show_overview_in_diff' of https://github.com/lethliel/osc
Show request details, when displaying a diff in the interactive
review mode.
2017-10-11 13:30:48 +02:00
marco
4f518b5e59 prepend request summary to diff in interactive mode 2017-10-11 08:55:55 +02:00
Marcus Huewe
0eecdaf830 Add missing comment
Follow-up commit for f6f879d.
2017-10-10 16:36:58 +02:00
Marcus Huewe
f6f879dac5 Fix potential shell injection when running rpm2cpio
Actually, there is nothing that can be injected, except the "-h"
option. However, in case rpm2cpio evolves, we are on the safe side.
Also, document the potential shell injection in the cpio call
(the comment was accidentally removed in commit dbdc712) (the
current osc code is not affected, because we never pass filenames
via *files to core.unpack_srcrpm).
2017-10-10 16:24:42 +02:00
Marcus Huewe
a5c7611aee Support unusual filenames in "osc add <directory>"
This way, we can also support directories/files that contain
a newline "\n" etc.
2017-10-10 16:18:45 +02:00
Marcus Huewe
c3ba1fbf63 Eventually fix potential shell injections for find
It seems that the "find" binary has no way to indicate an
end of options for its arguments. Hence, we use os.walk to mimic
"find"'s behavior, which is also the cleaner solution.

Fixes: #340 ("osc add of directories does not quote the argument")
2017-10-10 16:18:39 +02:00
Marcus Huewe
760d4d65d7 Supersede existing requests if --yes is passed to "osc sr"
This basically reverts commit b2b59ca, because the old code performed
a "no" instead of a "yes" (see also the discussion in
https://github.com/openSUSE/osc/pull/269).

Fixes: #343 ("'osc sr --yes ...' doesn't supersede existing requests
       as promised")
2017-10-06 12:32:52 +02:00
Marcus Huewe
f52cf7745a Take --repo/--arch options in "osc prjresults --xml..." into account
Fixes: #341 ("prjresults doesn't support repo/arch options")
2017-09-28 15:55:11 +02:00
Marcus Huewe
8a81a68028 Cleanup url construction in core.show_results_meta
The old code was flawed, because, for instance,
core.show_results_meta(apiurl, project, arch=['x86_64']) resulted
in a wrong http request: GET <apiurl>/build/<project>/_result&arch=x86_64
(note the "&" instead of the correct "?"). The drawback of the new
implementation is that we have to do the proper quoting manually.
2017-09-28 15:52:25 +02:00
Marcus Huewe
dbdc712018 Really fix potential shell injections
This is a follow-up commit for commit c9c0f8a. Using core.run_external
with shell=True is too error-prone.

Fixes: #340 ("osc add of directories does not quote the argument")
2017-09-28 14:48:30 +02:00
Marcus Huewe
63c2aa3630 Do not run diff3 in the shell
This fixes a potential shell injection.

See also: #340 ("osc add of directories does not quote the argument")
2017-09-28 12:03:53 +02:00