1
0
mirror of https://github.com/openSUSE/osc.git synced 2026-01-31 18:09:00 +01:00

2895 Commits

Author SHA1 Message Date
lethliel
9b7bcd6de0 improve error message if file is not a valid rpm
The current error message is quite confusing and nobody knows what
"invalid lead magic" means.
2018-10-18 15:23:31 +02:00
lethliel
f9c9c86c71 added general decode_it function
First it tries chardet and after that it tries the locale
2018-10-17 16:31:41 +02:00
lethliel
59b7374bbf fix osc bl with umlaute 2018-10-17 16:12:23 +02:00
lethliel
83948a2b0a fix osc bl 2018-10-17 15:27:22 +02:00
lethliel
c070dc3d78 fix missing decoding if output is piped to a non tty 2018-10-17 14:32:27 +02:00
65ca4b1054 support checkconstraints command without local checkout 2018-10-17 10:16:42 +02:00
Johannes Kastl
e5e9860b7b change keep-link description to make it easier to understand 2018-10-17 10:15:54 +02:00
bbf34432f0 fix local multibuild flavor support when package does not exist ('_repository' case) 2018-10-17 10:15:30 +02:00
e98d67cbcf open 0.164 development 2018-10-17 10:14:58 +02:00
62af1f5336 release 0.163.0 2018-10-17 10:14:41 +02:00
Marcus Huewe
27dbe35503 Refactor the do_vc code a bit
No functional changes.
2018-10-17 10:14:18 +02:00
Marcus Huewe
5efe917d56 Consider the "realname" config option in apiurl sections
This is a follow up fix for commit ef13d67 ("Export a real name
for vc to consume").
2018-10-17 10:13:51 +02:00
2f473e1878 add podman build support 2018-10-17 10:13:08 +02:00
d0a6842664 Clarify use of osc token
Clarify the fact that the parameters of osc token -t and osc token -d are
of different types.
2018-10-17 10:12:33 +02:00
lethliel
bc9ad6fe15 cleanup xpath. submit/* is ignored by the API since 2012 2018-10-17 10:12:10 +02:00
2a9ce7d504 Export a real name for vc to consume 2018-10-17 10:11:16 +02:00
1af3467917 fix DISTURL checkout for package containers using a multibuild flavor 2018-10-17 10:09:32 +02:00
Sean Kelly
4557231cdc Support larger uids and gids 2018-10-17 10:09:03 +02:00
jonsger
d952b8965e Fix typo in "osc revert" help 2018-10-17 10:06:51 +02:00
27532723eb always run build using --statistics. I could have made this
yet another option, but
* only very old build scripts don't know it, we should just require a recent one
* build script is ignoring it for chroot case

so why bother with another option?
2018-10-17 10:06:07 +02:00
e0589e83a3 fix some commands when used with / syntax between arguments 2018-10-17 10:05:39 +02:00
a64c188e16 - support "addcontainers" command 2018-10-17 10:05:09 +02:00
Marcus Huewe
e86d8ac188 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-10-17 10:04:29 +02:00
lethliel
13acdea010 fix missing newline in osc r -v
This adds a newline after unresolvable:. So the
messages are now well printed.
2018-10-17 10:03:06 +02:00
lethliel
c693198e46 fixed IncompleteRead(0) error on long builds.
catch IncompleteRead() and retry until retry_counter is
reached. Then re-raise IncompleteRead()
2018-10-17 10:01:13 +02:00
lethliel
11e51b417d fix order of options valdiation. Now -P and -p is
honored if given by user.
2018-10-17 09:55:54 +02:00
deac6b00f7 add new options to diff command:
--unexpand for local diffs only (bsc#1089025)
--meta for diffing meta files
2018-10-17 09:55:39 +02:00
lethliel
a9fc04d996 fix set maintainer (fixes issue #452) 2018-10-17 09:43:17 +02:00
lethliel
2b778f555d 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-10-16 20:54:53 +02:00
lethliel
e7f979d4ea change output when creating binaries directory
was:
Creating binaries

is now:
Creating directory "binaries"
2018-10-16 20:53:41 +02:00
Marco Strigl
0c93ce26a3 Merge pull request #442 from z3ntu/py3.7
Fix Python 3.7 support
2018-10-10 20:54:27 +02:00
Luca Weiss
fa58c8a260 Fix Python 3.7 support
See PEP 479
2018-10-09 17:02:23 +02:00
lethliel
70279c60d8 fix creation of cpio archives
Problem was that the length of the cpio archive was calculated wrong,
because the content was not binary
2018-09-26 14:45:29 +02:00
lethliel
16bcfd65a9 fix crash on empty input list / meta files 2018-08-28 15:31:06 +02:00
Marco Strigl
50256bb860 fix for issue #433
This fixes https://github.com/openSUSE/osc/issues/433
and syncs oscssl.py with master
2018-07-23 14:03:23 +02:00
Marcus Huewe
ca942c46aa Disable ssl session resumption
The old code could potentially yield to a use-after-free situation,
which results in UB. For this, consider the following scenario, where
osc performs several HTTPS requests (assumption: the server supports
ssl session resumption):

- HTTPS Request 1:
  * a new SSL *s connection is established, which also creates a new
    SSL_SESSION *ss => ss->references == 1
  * once the handshake is done, the ss is put into the session cache
    (see ssl_update_cache) => ss->references == 2
  - osc saves the session ss in a class variable
  - s is SSL_free()d, which calls SSL_SESSION_free => ss->references == 1

- HTTPS Request 2:
  * setup a new SSL *s connection that reuses the saved session ss
    => ss->references == 2
  * once the handshake is done, ssl_update_cache is called, which is a
    NOP, because s->hit == 1 (that is, the session was resumed)
  * osc saves the session ss in a class variable
  * s is SSL_free()d, which calls SSL_SESSION_free => ss->references == 1

...

> 2 hours later (see tls1_default_timeout)

...

- HTTPS Request 256:
  * setup a new SSL *s connection that reuses the saved session ss
    => ss->references == 2
  * once the handshake is done, ssl_update_cache is called, but is
    _no_ NOP anymore
  * ssl_update_cache flushes the session cache (this is done every
    255/256 (depending on the way we count) connections) => ss is
    SSL_SESSION_free()d => ss->references == 1
  * osc saves the session ss in a class variable
  * s is SSL_free()d, which calls SSL_SESSION_free:
    since ss->references == 1, ss is eventually free()d

- HTTPS Request 257:
  * setup a new SSL *s connection that reuses the saved session ss

Since ss does not exist anymore, the remaining program execution is UB.

(Note: SSL_free(...) is _NOT_ called, if M2Crypto 0.29 is used.
M2Crypto 0.30 calls SSL_free(...) again.)

Due to a bug in OpenSSL_1_1_0h (see openssl commit 8e405776858) the
scenario from above can be triggered with exactly 2 HTTPS requests (the
SSL_SESSION is not cached, because we configured SSL_VERIFY_PEER, but
no sid_ctx was set). This is fixed in openssl commit c4fa1f7fc01.

In order to reliably reuse a session, we probably need to listen to the
session cache changes. Such callbacks could be registered via
SSL_CTX_sess_set_new_cb and/or SSL_CTX_sess_set_remove_cb, but both
functions are not provided by M2Crypto. Another idea is to directly utilize
the session cache, but this also has to be implemented in M2Crypto first.
Yet another approach is to retrieve the session via SSL_get1_session, which
increases the session's refcnt, but this also needs to be implemented in
M2Crypto first (if we choose to use this approach, we also have to make
sure that we eventually free the session manually...).

Fixes: #398 ("SIGSEGV on \"osc commit\"")
2018-07-12 08:55:16 +02:00
lethliel
6d0b20782e fix slice error (division now returns float) when working with long packagelists. 2018-06-07 14:02:37 +02:00
lethliel
d8751be732 decode diff in osc rq show -d before printing it 2018-06-05 14:48:41 +02:00
lethliel
a455fd8e39 remove debug print 2018-04-27 14:03:01 +02:00
lethliel
a6627de8d3 fixed osc less <path> 2018-04-26 15:49:09 +02:00
Marco Strigl
e309a073d3 Merge pull request #407 from z3ntu/python3
python3: Fix osc add
2018-04-23 16:21:47 +02:00
lethliel
89a181264c fixed osc branch with different srcprj or srcpkg 2018-04-23 12:40:57 +02:00
Luca Weiss
f8e0e2a7e0 Fix osc add
hashlib wants bytes, ET.tostring produces a string and not bytes
2018-04-20 08:34:39 +02:00
lethliel
a30ac8f29c prevent progressbar to get double printed 2018-04-16 16:19:53 +02:00
lethliel
b38af807fc fix osc log (request is shown as bytes string)
b'rqxxxxxx' -> rqxxxxxx
2018-04-16 13:47:20 +02:00
lethliel
8a48813d8d fixed IncompleteRead(0) error on long builds.
sstatus object is introduced, which holds the state
of the stream. If an incompleteRead is thrown the stream
is restarted as long as retry_count is not reached (3)
2018-04-16 13:36:59 +02:00
lethliel
4ee2e34d5f fix commit with editors != vim 2018-04-09 12:26:11 +02:00
lethliel
3760a07b50 fixed osc ls with _link file 2018-03-26 15:06:02 +02:00
lethliel
e07332ac7f fix osc lb -s and osc lbl -s 2018-03-26 14:42:23 +02:00
lethliel
73fa448528 fixed osc bl -s 2018-03-26 13:41:50 +02:00