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

3707 Commits

Author SHA1 Message Date
Marcus Huewe
3883ea4bcb Open 0.175.0 development 2021-07-21 10:46:46 +02:00
Marcus Huewe
dd2481da20 Release 0.174.0
For the details, see the NEWS file (which is mostly about user
visible changes).
2021-07-21 10:43:53 +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
41ba072481 Merge branch 'browse_split_args' of https://github.com/marcus-h/osc
Slash split arguments in do_browse.
2021-07-20 15:23:03 +02:00
Marcus Huewe
fd4d8d726a Fix typo in the password deletion codepath in conf.config_set_option
A password can be deleted via "osc config -d <apiurl> pass". Actually,
if we really want to support password deletion, we should introduce
a --delete-password option because the "pass" config option can be
considered as an implementation detail, which we should not expose
to our users.
2021-07-14 11:31:56 +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
Marcus Huewe
dfdf07b228 Merge branch 'fix_frozenlink_commit' of https://github.com/marcus-h/osc
Fix the commit of a frozen package wc.
2021-07-09 13:50:12 +02:00
Marcus Huewe
e71b79c6d0 Fix the commit of a frozen package wc
Always send the sha256sums of all tracked files in case of a
frozen package wc. For instance, this is needed if the package is
a plain link (no branch) because in this case the backend might
request a sha256sum for a tracked but unmodified file (this can
happen because the backend cannot expand the link).
The new behavior is in line with a pulled/linkrepair package wc.

Fixes: #924 ("Transmitting file data There is no sha256 sum for
file")
2021-07-02 23:20:16 +02:00
Marco Strigl
6680fafba7
Merge pull request #923 from adrianschroeter/fix_obsrepositories
fix local product builds using obsrepositories:/ directives
2021-06-28 10:09:05 +02:00
90d9402a05 fix local product builds using obsrepositories:/ directives
We need an absolute path since osc calls build in user home directory.

Also extend the file name to hint to osc (and not any service
configuration)
2021-06-28 09:26:27 +02:00
Marco Strigl
0c3164bc8b
Merge pull request #921 from marcus-h/fix_ci_nonexistent_pkg
Handle "cd prj; osc ci non_existent_pkg" more gracefully
2021-06-04 15:27:03 +02:00
Marcus Huewe
fb44630ad7 Handle "cd prj; osc ci non_existent_pkg" more gracefully
When trying to commit a non-existent package via Project.commit it
is treated as an external package (because a non-existent package
has no "state" inside the project). That is, Project.commitExtPackage
is called, which fails with a FileNotFoundError in case of a
non-existent package (and the traceback is printed to the user).
In order to fix this, treat a non-existent package as broken package.
That is, simply print an info message and do not error out with a
traceback (note: the commit is _not_ aborted).

Fixes: #920 ("osc commit should fail gracefully in case of
nonexistent  filename")
2021-06-04 13:06:00 +02:00
Marcus Huewe
c94ea04eb7 Open 0.174.0 development 2021-05-18 22:39:39 +02:00
Marcus Huewe
60e06ad96d Release 0.173.0
For the details, see the NEWS file (which is mostly about user
visible changes).
2021-05-18 22:36:09 +02:00
6a12adccf5
Merge pull request #918 from adrianschroeter/cross
support cross compile using a sysroot
2021-05-18 08:00:43 +02:00
209686a16f support cross compile using a sysroot
We need to hand over the sysroot rpms in rpmlist with a prefix. And we
need to take care of the "crossarch" definition in buildinfo
2021-05-18 07:57:02 +02:00
Marcus Huewe
d1a0bc6b8f Merge branch 'sccache' of https://github.com/Firstyear/osc
Add sccache support to "osc build". Note that this feature needs a
recent obs-build/build package.
2021-05-14 09:55:34 +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
Marcus Huewe
1e94757498 Merge branch 'build_as_user' of https://github.com/adrianschroeter/osc
Do not use a preinstallimage if the local build is executed as a non-root
(the preinstallimage contains device nodes which usually cannot be created
by a non-root user - this is not a problem in the non-preinstallimage
codepath (see [1])).

[1] https://github.com/openSUSE/osc/pull/908#issuecomment-806903856
2021-04-28 16:55:34 +02:00
08979fb0eb do not use preinstallimages when building as non-root
it can not work and build script will direct complain in future
2021-04-28 16:53:17 +02:00
Marcus Huewe
836412c57a Merge branch '_keyinfo' of https://github.com/adrianschroeter/osc
Use the _signkey route for retrieving the signkey. Use the "old" way
as a fallback when talking with an old API. We should probably also
use this route in the fetch module.
2021-04-28 14:25:26 +02:00
6632ca2d2e support _keyinfo route with signkey command by default 2021-04-28 13:42:06 +02:00
Marcus Huewe
d4d942f2cf Merge branch 'service-run' of https://github.com/pmgdeb/osc
Avoid excessively long lines in the help text of the service command.
2021-04-28 12:37:15 +02:00
Pedro Monreal
67ac287f55 Adjust the description size of 'osc service run' 2021-04-28 12:11:56 +02:00
Marcus Huewe
64ab6930c5 Merge branch 'fix-simpleimage' of https://github.com/adrianschroeter/osc
Use the correct build result directory in case of a "simpleimage" build
(the results are stored in the "OTHER" directory).
2021-04-26 16:10:45 +02:00
320adda399 simpleimage uses OTHER directory to deliver files 2021-04-26 08:02:38 +02:00
Marcus Huewe
dd9130a292 Merge branch 'http_request_no_filesize_limit' of https://github.com/marcus-h/osc
Support an arbitrary sized file in core.http_request.
2021-04-16 12:47:00 +02:00
Marcus Huewe
c932f95d46 Support an arbitrary sized file in core.http_request
The old code only supports a file whose size is less then or equal
to INT_MAX (due to a reasonable(!) limit in M2Crypto). The actual
issue is in core.http_request which mmap(...)s the file, wraps it
into a memoryview/buffer and then passes the memoryview/buffer to
urlopen. Eventually, the whole memoryview/buffer is read into memory
(see m2_PyObject_GetBufferInt). If the file is too large (> INT_MAX),
m2_PyObject_GetBufferInt raises a ValueError (which is perfectly
fine!).
Reading a whole file into memory is completely insane. In order to
avoid this, we now simply pass a file-like object to urlopen (more
precisely, the file-like object is associated with the Request
instance that is passed to urlopen). The advantange is that the
file-like object is processed in chunks of 8192 bytes (see
http.client.HTTPConnection) (that is, only 8192 bytes are read into
memory (instead of the whole file)).

There are two pitfalls when passing a file-like object to urlopen:
* By default, a chunked Transfer-Encoding is applied. It seems that
  some servers (like api.o.o) do not like this (PUTing a file with
  a chunked Transfer-Encoding to api.o.o results in status 400). In
  order to avoid a chunked Transfer-Encoding, we explicitly set a
  Content-Length header (we also do this in the non-file case (just
  for the sake of completeness)).
* If the request fails with status 401, it is retried with an
  appropriate Authorization header. When retrying the request, the
  file's offset has to be repositioned to the beginning of the file
  (otherwise, a 0-length body is sent which most likely does not
  match the Content-Length header).

Note: core.http_request's "data" and "file" parameters are now mutually
exclusive because specifying both makes no sense (only one of them
is considered) and it simplifies the implementation a bit.

Fixes: #202 ("osc user authentification seems to be broken with last
commit")
Fixes: #304 ("osc ci - cannot handle more than 2 GB file uploads")
2021-04-10 22:14:25 +02:00
Marcus Huewe
fc5470a152 Merge branch 'stderr_line_buffering' of https://github.com/marcus-h/osc
Make stderr line buffered if it does not refer to a tty.
2021-04-02 12:25:44 +02:00
Marcus Huewe
3c9ee7545e Merge branch 'remove_etree_getchildren' of https://github.com/marcus-h/osc
Do not use the deprecated Element.getchildren anymore.
2021-03-28 21:10:30 +02:00
Marcus Huewe
66440bea94 Merge branch 'fix_kvm_build_as_root' of https://github.com/adrianschroeter/osc
Remove "build as user" heuristic in case of a KVM build. A user build can
be explicitly performed by unsetting the su-wrapper config option.
2021-03-25 11:31:39 +01:00
6ac7855f4d remove "need root" autodetection
This kind of guessing can not really work here and leads to failing
builds when using KVM. (eg. when using a preinstallimage)

Removing the code, since we have a now a way to allow the user to
specify building as user via su-wrapper config
2021-03-25 09:06:48 +01:00
Marcus Huewe
5d6a1cef4d Make stderr line buffered if it does not refer to a tty
If osc is invoked, for instance, via "osc -d rbl ... > log.txt 2>&1",
writes to stderr and stdout do not necessarily appear in program order
in the log.txt file. More precisely, it is possible that the buildlog
comes first and the http debug output is at the end of the
file.
During osc/python3 startup (with the redirection from above), the
following is done:
- make stdout line buffered (due to the code in osc-wrapper.py)
- make stderr buffered (but not line buffered) because stderr does
  not refer to a tty (python3 startup)

Consequently, if osc has code like

print("foo")
print("bar", file=sys.stderr)
print("baz")

it is possible that the contents of the log.txt is

foo
baz
bar

because stderr is buffered (but not line buffered). In order to fix
this, make stderr line buffered, too.
2021-03-24 14:13:38 +01:00
Marcus Huewe
4e9dde71b8 Merge branch 'build-as-user' of https://github.com/adrianschroeter/osc
Allow a local build as the current user/support an empty su-wrapper
config option.
2021-03-22 15:22:13 +01:00
4907982d42 allow to run build script as user
works only with kvm atm, we should maybe point the user to it in that
case?

Requires: https://github.com/openSUSE/obs-build/pull/678/files
2021-03-22 15:16:35 +01:00
Marcus Huewe
21274b6981 Do not use the deprecated Element.getchildren anymore
Element.getchildren is deprecated and not available on python39
anymore. Instead, iterate over the element itself (which iterates
over the element's children).

Fixes: #903 ("AttributeError: 'xml.etree.ElementTree.Element' object
has no attribute 'getchildren'")
2021-03-21 19:19:23 +01:00
Marcus Huewe
52aa999529 Merge branch 'add_force' of https://github.com/marcus-h/osc
Add "--force" option to the "osc add" command.
2021-03-18 15:06:25 +01: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
Marcus Huewe
9fb287c7c2 Merge branch 'stage_support' of https://github.com/adrianschroeter/osc
Add a "--stage <STAGE>" option to "osc build". It can be used to specify
which build "stages"/steps are executed.
2021-02-18 11:43:28 +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
24fb9732f0
Merge pull request #898 from adrianschroeter/shell_after_fail
implement osc build --shell-after-fail
2021-02-12 08:41:36 +01:00
c06b794ddf support osc build --shell-after-fail from build script 2021-02-12 08:20:51 +01:00
Marcus Huewe
6144b27470 Merge branch 'showlinked' of https://github.com/adrianschroeter/osc
Add "showlinked [<prj> <pkg>]" command that can be used to show which
packages link to the "<prj>/<pkg>" package.
2021-02-08 20:36:49 +01:00
bc25ac769e add showlinked command 2021-02-08 10:50:45 +01:00
Marcus Huewe
fc7d3d91fc Merge branch 'creq_slash_split' of https://github.com/marcus-h/osc
Support slash notation in "osc creq -a <action type> args".
2021-02-01 23:06:57 +01:00
Marcus Huewe
609990ba62 Open 0.173.0 development 2021-01-27 13:30:43 +01:00
Marcus Huewe
5df5465b1a Release 0.172.0
For the details see the NEWS file.
2021-01-27 13:21:32 +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
Ludwig Nussel
224ec6eef5
Merge pull request #847 from marcus-h/service_old_dir
Add .old dir support for source services
2021-01-20 15:08:27 +01:00