1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 22:56:15 +01:00
Commit Graph

3074 Commits

Author SHA1 Message Date
2b0f015de0 0.162.0 2017-11-28 15:12:29 +01:00
Marcus Huewe
a39b44a53b Merge branch 'check_hash_for_file' of https://github.com/lethliel/osc
Validate the sha256 hashes for new, modified, and replaced files, if the
srcserver supports it.
2017-11-27 19:14:00 +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
5791d1bb5c Merge branch 'mount_sysfs' of https://github.com/lethliel/osc
Mount sysfs during "osc chroot". The current implementation
of "osc chroot" is a major pain for plain "su" users, because the
root password has to be entered several times - we should fix this.

Fixes: #354 ("Mount sysfs in chroot")
2017-11-21 12:34:15 +01:00
lethliel
00b6a9fe27 in chroot also mount /sys in addition to proc 2017-11-21 10:52:40 +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
cb376a1a34 Merge branch 'config_replace_issue_313' of https://github.com/lethliel/osc
Store a newly created config file in $XDG_CONFIG_HOME/osc/. For backward
compatibility, ~/.oscrc is used, if present.

Fixes: #313 ("oscrc should be stored in $XDG_CONFIG_HOME on linux")
2017-11-08 12:23:07 +01:00
Marcus Huewe
516d0318ed Merge branch 'master' of https://github.com/abergmann/osc
Improve documentation for "osc meta attribute".
2017-11-08 12:13:09 +01:00
marco
6bc2d3f939 use XDG_CONFIG_HOME/osc/oscrc as default config
write oscrc to the default location for user-specific configuration.
If XDG_CONFIG_HOME is not set use ~/.config/osc/oscrc which is basically the same.

If there is already a ~/.oscrc use this one (for compat reasons). Existing user
installations should not get affected by this commit.

The order is the following:

Given config with -c
config defined in OSC_CONFIG
existing ~/.oscrc
default XDG_CONFIG_HOME/osc/oscrc
2017-11-08 11:17:11 +01:00
690dbf42ab Small documentation fix to clarify attribute usage. 2017-11-08 10:55:38 +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
Marcus Huewe
3c1bb1cf0a Merge branch 'xz-support' of https://github.com/suihkulokki/osc
Support an xz compressed control.tar file. In case of a control.tar.xz and
a missing lzma module, an exception is thrown at runtime (for now, in order
to avoid a hard depedency to the lzma module, which is no standard module).
2017-10-30 22:24:00 +01:00
Riku Voipio
9166a7f075 debquery: support control.tar.xz
Similar to recent fixes in libsolv and obs-build. Since tarfile
on python2 doesn't do lzma, decompress the file into memory and
feed it as a fake file via StringIO to tarfile
2017-10-30 14:10:54 +02: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
Marcus Huewe
a3c2aeb64c Merge branch 'fix_project_results' of https://github.com/lethliel/osc
Fix for commit 2d327df ("Allow multiple --repo and --arch options in
\"osc prjresults\"").
2017-10-18 15:34:17 +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
d66ccb2a7d Cleanup babysitter a bit
In case of an exception, return status code 1 by default.
2017-10-06 13:25:25 +02:00
Marcus Huewe
6acc90d438 Exit with status 1 in case of a ServiceRuntimeError
Fixes: #344 ("'osc ci' exit code doesn't take source service results
       into account")
2017-10-06 13:19:15 +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
aea395a7e7 Document 'R' (replaced) file state
Fixes: #336 ("Missing explanation for status 'R'")
2017-10-03 22:05:41 +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
2d327df4e7 Allow multiple --repo and --arch options in "osc prjresults"
This harmonizes "osc prjresults --help" with osc's actual behavior.
Also, core.get_prj_results expects lists (or None) instead of strings
for the corresponding repo/arch parameters.
2017-09-28 15:29:48 +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
Marcus Huewe
c9c0f8a731 Fix potential shell injections
Also, document a potential shell injection in core.unpack_srcrpm
(via the "files" parameter), which cannot be exploited, because
"files" is not used by the current osc code.

Fixes: #340 ("osc add of directories does not quote the argument")
2017-09-28 00:09:42 +02:00
Marcus Huewe
08504a1509 Merge branch 'lintlog_in_interactive_review' of https://github.com/lethliel/osc
Add support for showing rpmlint logs during interactive review.
2017-09-26 23:47:38 +02:00
marco
b59d40c57c show lintlog (li) in interactive mode 2017-09-26 20:20:02 +02:00
Marcus Huewe
3389db2c8f Merge branch 'repotype-pacsuffix-hint' of https://github.com/Conan-Kudo/osc
Use the buildconfig's binarytype to determine the correct pacsuffix
(TODO: cleanup Buildinfo pacsuffix code a bit).
2017-09-26 14:06:29 +02:00
Neal Gompa
ef9b308d50 Add pacsuffix hint using BinaryType from build config 2017-09-26 07:57:59 -04:00
Marcus Huewe
c2922e8a67 Open 0.161 development 2017-09-26 12:45:48 +02:00
73e8e3e97b prepare 0.160.0 release
mainly needed for new container support
2017-09-22 09:06:18 +02:00
Marcus Huewe
b07ba53ad0 Allow slash separated arguments in "osc rpmlintlog" 2017-09-01 10:51:28 +02:00
Marcus Huewe
38af00d509 Merge branch 'rpmlint' of https://github.com/lethliel/osc
Add new "osc rpmlint" command to retrieve the rpmlint.log file (if
present).
2017-09-01 10:49:16 +02:00
marco
99309db315 show rpmlint.log
Provide function to show the content of rpmlint.log.
The core function get_rpmlint_log will later be used in the interactive
request mode to provide the rpmlint logs to the reviewer.

I add the osc rpmlint | rpmlintlog | lint command also.
2017-09-01 10:27:05 +02:00