1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-21 17:56:19 +02:00
Commit Graph

404 Commits

Author SHA1 Message Date
c06b794ddf support osc build --shell-after-fail from build script 2021-02-12 08:20:51 +01:00
9ad555ee24 mention flatpack as well 2021-01-18 10:21:50 +01:00
Oleg Girko
74846ea83b Add support for nspawn VM type.
This allows to utilise support for systemd-nspawn backend in build engine.
Like LXC, systemd-nspawn creates isolated lightweight container.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
2020-11-22 14:34:37 +00:00
Michael Schroeder
5d2542522d Support flatpak building 2020-11-12 14:08:10 +01:00
Marcus Huewe
e58abf1527 Support a preinstallimage in combination with the --offline option
Currently, if the --offline option is passed to "osc build ...", a
preinstallimage is not used (even if it exists). Instead, a
preinstallimage should be used (if it exists) even if the --offline
option is specified.
2020-09-07 18:54:59 +02:00
Kevin Tee
783544d2da
Update build.py
Fix repeated word.
2020-07-26 11:57:18 +00:00
Adam Williamson
13a13a87c4 Fix ElementTree imports for Python 3.9
Importing `cElementTree` has been deprecated since Python 3.3 -
importing `ElementTree` automatically uses the fastest
implementation available - and is finally removed in Python 3.9.
Importing cElementTree directly (not as part of xml) is an even
older relic, it's for Ye Time Before ElementTree Was Added To
Python and it was instead an external module...which was before
Python 2.5.

We still need to work with Python 2.7 for now, so we use a try/
except to handle both 2.7 and 3.9 cases. Also, let's not repeat
this import 12 times in one file for some reason.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-06-02 15:13:10 -07:00
Marco Strigl
3967133022
Merge pull request #793 from sjamgade/ccache_path
add option pkg-ccache to be passed to build-cmd
2020-05-22 15:55:48 +02:00
Fabian Vogt
f3d07eab3f Fix kiwi build with --prefer-pkgs
The buildinfo contains packages from the local dir, so it needs the list of
local packages to work correctly.
2020-05-20 11:34:27 +02:00
Sumit Jamgade
5dd853e302 add option pkg-ccache to be passed to build-cmd
this option is a /path/to/_ccache.tar. The patch just forwards that
option to the build script.
2020-05-19 16:15:49 +02:00
12e0b67117 complete --shell-cmd support parts to get it working 2020-05-12 13:16:29 +02:00
William Brown
bdb0c8033c Add ccache argument for oscrc 2020-04-14 14:50:24 +10:00
lethliel
81acc39c9f e.reason is a string not a integer decimal 2020-04-01 12:48:12 +02:00
Marcus Huewe
cd51f47a77 Return bytes in packagequery.PackageQueryResult.evr() instead of a str
The packagequery.PackageQueryResult class is supposed to provide a
bytes API. Hence, packagequery.PackageQueryResult.evr() should return
bytes instead of a str. Also, adjust the single caller in the build
module.
2020-03-15 18:30:00 +01:00
Marcus Huewe
fb9e64c2f1 Merge branch 'handle_empty_releas_in_rpmquery' of https://github.com/lethliel/osc
Do not pass None as a release to RpmQuery.filename. The release might
be None in case of a kiwi build (the returned canonname is not used in
case of kiwi build).
2020-02-07 10:23:35 +01:00
lethliel
f5aa389e38 handle empty release in build.py
This is very unlikely but in very rare cases this
can happen.

Builing kiwi images containing debian is one case.
In this case we do not know what is inside the kiwi
file and osc build assumes buildtype 'rpm' to generate
a package list which get's thrown away anyway.

Now we just check for release
2020-02-07 09:41:23 +01:00
Marcus Huewe
d94e457632 Merge branch 'fix_build_user_determination' of https://github.com/lethliel/osc
By default, pass --norootforbuild to the build script when running osc
shell/chroot (unless --userootforbuild is passed to osc).
2020-02-04 19:43:24 +01:00
8716dcc24a use signdummy for product builds
avoids build failure, but leads to unsigned media
2020-02-04 17:26:24 +01:00
37f19f7de9 fix counter handling for obsrepositories:/ in products
all entries had the same name, so repos got ignored.
2020-02-04 17:25:14 +01:00
lethliel
9849112278 append --norootforbuild as default
pass opts to run_build and check if norootforbuild
needs to be appended to cmd. (if opts.userootforbuild is not set)
2020-01-22 14:24:58 +01:00
Marco Strigl
3d2f1a4ffb
Merge pull request #718 from adrianschroeter/arch_zst
- support zstd arch linux files in local build
2020-01-10 14:06:56 +01:00
5f2721d8f6 - support zstd arch linux files in local build
Note: This requires a tar executable supporting zstd
2020-01-09 15:49:54 +01:00
lethliel
76793cc0ac fix regression in osc chroot
This fixes some regressions with osc chroot:

- osc chroot --wipe --root=/dir/ can now be called outside
  a working copy
- osc chroot --noinit --root=/dir/ can now be called outside
  a working copy and behaves like the old code (Just entering
  the chroot without any modifications)
- The confirmation of the deletion is implemented again and thus
  the --force option was implemented too.
2019-12-20 20:43:01 +01:00
lethliel
ade9baba52 fix lastbuildroot on builds not in WC
fix the lastbuildroot handling if the package is being build oustide of
a package directory and thus no .osc/ dir can be found.

We then just skip the store_write_last_buildroot and store_read_last_buildroot
calls.
2019-12-09 14:07:48 +01:00
db795c8121 support local building using RedHat rpm-md modules 2019-12-05 13:06:30 +01:00
b08bd8a437 support building for kiwi products using obsrepositories:/ 2019-12-04 15:16:58 +01:00
b329b74816 build environement parameter caching
repository, architecture and vm_type from last build is automatically
reused if not specified otherwise.
2019-12-04 15:16:54 +01:00
47e346dde8 avoid source service run for "osc shell"
this also drops the warning line if service disabled. It seems not
to be important enough to me.
2019-12-04 14:50:15 +01:00
f4bdd3c876 avoid implicit --noinit if extra packages are specified 2019-12-04 14:50:15 +01:00
eb7aab1cf7 osc build --vm-disk-size= switch support 2019-12-04 14:50:15 +01:00
a628ea8cca read debug packages from server side project configuration
=> avoids unresolvable errors when distro is not providing the
    extra/debug package
2019-12-04 08:41:46 +01:00
f480799522 Use --noinit and --offline on "osc shell" when environment exists 2019-12-02 14:23:41 +01:00
d46e93fb03 disable hostarch check for emulator builds entirely 2019-12-02 08:35:50 +01:00
4bcb78e322 osc build --vm-type=qemu support for cross architecture builds 2019-11-28 10:07:36 +01:00
b78a0b3896 osc shell/chroot/wipe is now handled via build script (working for chroot and KVM only atm) 2019-11-28 10:07:11 +01:00
lethliel
d59141e3fe fix build with alternative prj and multibuild
building with alternative project (pac='_repository')
and multibuild did not work correctly, because the buildflavor
was not submitted to the src server.

With commit 2390823d649a3b0b6bf3b7bd07713c4426932bed in open-build-service
it is now possible to submit the build flavor like this: _repository:<flavor>

The obs commit also enables osc buildinfo --alternative-prject -M <flavor>
to show the correct buildinfo for the flavor.
2019-10-23 11:46:38 +02:00
lethliel
2aa6e998d2 fix and unify building of local package cache
* all filename functions now return bytes-like objects
* the caller does the decoding
* the caller in build.py passes encoded arguments
2019-07-26 13:38:45 +02:00
72b96b7d39 fix typo in last commit fixing simpleimage support 2019-06-27 16:34:41 +02:00
024759bee0 fix local build using simpleimage 2019-06-27 16:14:17 +02:00
Bernhard M. Wiedemann
13a174bdcc Fix encode method call
This broke with
--define="%_buildhost foo"
2019-05-25 13:36:10 +02:00
lethliel
6c001fa64c [python3] build with python3 (mostly bytestring)
* return of get_buildinfo is bytestring with python3
* other variables contain bytestrings as well now
2019-04-07 10:42:00 -05:00
lethliel
93d15fc83b reworked meter.py based on discussion
* new function create_text_meter with fallback selection
* NoPBTextMeter.start() will print the basename (if not stated otherise with
  basename = None)
* The callers that should use an alternare TextMeter class now call create_text_meter()
* The callers that should not use and alternate TextMeter (because of different handling,
  like build.py) call create_text_meter(use_pb_fallback=False)
* the warning 'Please install the progressbar module' is now only shown once

improvements
2019-01-16 11:39:40 +01:00
Marcus Huewe
e608200414 Remove yet another superfluous try-except from meter import
Follow-up fix for commit be94132298
("Remove superfluous try-except from meter import").
2019-01-14 00:41:09 +01:00
Marcus Huewe
bec52a7917 Merge branch 'python3_prep' of https://github.com/lethliel/osc
Get rid of the urlgrabber dependency. The current implementation of the
progress bar is quite "noisy" if the line length exceeds the size of
the terminal window, but that's something we could fix later. (The
superfluous error message will be fixed in a subsequent commit.)
2018-11-01 19:55:07 +01:00
lethliel
65b053abb3 replace urlgrabber to enable python3 compatibility
- new module grabber.py
  * OscMirrorGroup to keep urlgrabber.mirrorgroup behavior
  * OscFileGrabber moved here

- meter.py
  * reworked to use progressbar module instead of progressbar
    of urlgrabber and simplified the module.

- babysitter.py
  * removed URLGrabErrorr

- build.py
  * removed adding of url_local to urllist. (not needed anymore)
  * removed URLGrabError

- commandline.py
  * switched from urlgrabber.urlgrab to OscFileGrabber().urlgrab

- core.py
  * reworked progressbar behavior

- fetch.py
  * removed join_url (not needed anymore)
  * moved OscFileGrabber to grabber.py
  * removed failureReport (not needed anymore)
2018-10-19 09:31:37 +02:00
153032bc11 fix local multibuild flavor support when package does not exist ('_repository' case) 2018-08-22 11:20:40 +02:00
2566d6aa73 add podman build support 2018-08-14 13:02:16 +02:00
Sean Kelly
b42e6f5e04 Support larger uids and gids 2018-06-25 16:55:47 -04:00
0c3edd3fa0 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-04-27 15:01:09 +02:00
Marcus Huewe
0b241a9586 Consider "recommends" and "supplements" in build.create_deps
Fixes: #363 ("osc build -p ../rpms/tw doesnt send recommends to
the server which makes client side build behave differently to server
side build").
2017-12-26 23:28:14 +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
Neal Gompa
ef9b308d50 Add pacsuffix hint using BinaryType from build config 2017-09-26 07:57:59 -04:00
Tim Hardeck
a8cc111851 Set build files for fissile 2017-08-01 15:01:53 +02:00
Michael Schroeder
e6d492ee38 Support 'fissile' build type 2017-07-21 10:58:52 +02:00
Michael Schroeder
9ed700e930 Fix --set-container-derived-from option passing
We now use dir:// as with the repos. Also pass the option with
the "--option=value" form.
2017-07-03 13:34:35 +02:00
Marco Strigl
fcef29131c pass --buildflavor to build script 2017-05-31 07:00:46 +02:00
Michael Schroeder
2b7cef3b33 Prepare for md5sum checking of containers
We do not want to use an old container if a new version is built
on the server. They don't have a rebuild count or something like
that (yet).
2017-05-17 11:20:03 +02:00
Michael Schroeder
7dae421d77 Support derived images for kiwi docker builds
Kiwi currently rejects the --set-container-derived-from option,
but this will hopefully change.
2017-05-16 14:02:37 +02:00
Michael Schroeder
8bffeb70e5 Support docker builds 2017-05-16 11:14:52 +02:00
Bernhard M. Wiedemann
f4771ce67a allow to pass any option to the build command
so that we do not have to patch osc for every parameter added to build
e.g. "--vm-custom-opt" in my case

similar in nature to gcc'c -Wl, option
2017-04-19 15:33:08 +02:00
3ab3ff0b1c list appimage build results 2017-03-15 10:32:11 +01:00
3e2bb0ec1d add support for highly experimental native appimage.yml support 2017-03-14 19:02:01 +01:00
670bd90e29 fix local build of kiwi images using obsrepositories:// (affects newer python3-kiwi) 2017-03-08 13:01:08 +01:00
1cb3f9eed5 Add '--vm-memory' option to osc build 2016-11-29 09:07:20 +01:00
Matias Hilden
82dbd10af2 Ignore build descr directory in build-root substitution for local packages
If build-root contains %(package) substitution, --local-package builds
would substitute absolute path there. This is different than the rule used
in osc chroot (uses relative path), causing the chroot to fail by default.

This commit removes the directory part from both build-root substitutions.
2016-11-14 13:48:06 +02:00
Andreas Schwab
0c00108521 get_prefer_pkgs: don't ignore debuginfo packages 2016-08-17 09:44:36 +02:00
f2faa82ac7 fix local package caching for snapcraft 2016-07-01 11:15:12 +02:00
d623cb8552 add support for snapcraft builds 2016-06-30 08:06:29 +02:00
Michael Schroeder
95b6087c5b Use the preinstall filename if the hdrmd5 is not available 2016-06-09 16:40:39 +02:00
Michael Schroeder
55da852a90 Add support for preinstall iamges
Adapted from a submission from Ericsson by Esa Kulmala, thanks a lot!
2016-06-09 16:24:30 +02:00
Bernhard M. Wiedemann
bbefe024e5 add vm-user option
this needs latest obs-build to work
2016-02-18 11:31:59 +01:00
25118ceccc - support --vm-telnet option for KVM builds
latest build package is required.
2015-11-25 14:20:55 +01:00
Marcus Huewe
070daecaf5 - build.Buildinfo: improved error formatting
Use the same formatting for an "unresolvable" error as in "osc results -v"
2015-09-23 18:29:51 +02:00
4342d9a6e1 Correction of grammatical errors
"exists" is a Python keyword, and wrong outside the 3rd person
singular in English.
2015-09-16 10:17:15 +02:00
5d6882e0e1 Collax support 2015-09-10 11:35:27 +02:00
Daniel Gollub
beb46cc012 Support prefer-pkg for live-build 2015-08-12 16:29:22 +02:00
Marcus Huewe
84ba8c6e17 - fixed fullfilename calculation in the Pac class
Now, the fullfilename is calculated using the canonname of a
bdep instead of using the bdep's binary attribute (the canonname
and binary attribute can differ (e.g. ConsoleKit-64bit-0.4.6-3.2.ppc.rpm
vs. ::import::ppc64::ConsoleKit-64bit-0.4.6-3.2.ppc.rpm))
2015-06-16 17:37:40 +02:00
Marcus Huewe
e4919568eb - do_build: added --trust-all-projects option
--trust-all-projects can be used to disable the trusted project check
2015-05-05 23:39:58 +02:00
Marcus Huewe
a800f8f3fc Merge branch 'master' of https://github.com/andreas-schwab/osc 2015-04-27 10:49:48 +02:00
6de9cb4e03 - add support for buildtime source service mode 2015-04-24 09:47:48 +02:00
Andreas Schwab
dc8ab2ee30 Pass disk/swap/logfile options to obs-build also for VM type emulator 2015-04-17 11:10:54 +02:00
e610cb569a Merge pull request #138 from k0da/threads
Pass threads option to obs-build
2015-04-08 10:30:14 +02:00
Dinar Valeev
e12f1b43c4 Pass threads option to obs-build
Currently --jobs sets only -smp flag for VM, in some cases we want
to pass threads as well. So the command line would like -smp 4,threads=4

Signed-off-by: Dinar Valeev <dvaleev@suse.com>
2015-03-10 11:58:08 +01:00
Dinar Valeev
5cc8a05d46 ppc64le can build ppc64 in KVM
Little Endian host can do build in Big Endian VM

Signed-off-by: Dinar Valeev <dvaleev@suse.com>
2015-01-14 14:57:28 +01:00
Marcus Huewe
8c8618ac91 - fixed corner case in __del__ method
For a detailed explanation see
d093c2b43b
2015-01-03 13:06:12 +01:00
Michael Schroeder
7ca0b2d04e send conflicts/obsoletes for local packages as well
Also sends the missing "I" entry, so the backend has no longer
to guess the version from the self-provides.
2014-12-09 13:12:34 +01:00
Denis Pynkin
d17b497867 Added configuration options for kernel and initrd selection during KVM build
Some distributions have no initrd images compatible with KVM builds and
sometimes we need to use not system kernel version.

New options in configuration file:
- build-kernel -- kernel used for VM builds
- build-initrd -- initrd image used for VM builds
2014-11-20 19:09:53 +03:00
Michael Schroeder
f47c39521d Verify hdrmd5 of packages if specified in the buildinfo
Needed for buildenv builds that want specific packages.
2014-11-17 12:40:54 +01:00
Michael Schroeder
6ccf64fc2f fix buildenv data name, it needs to be "buildenv"
The repo server is kind of picky...
2014-11-07 13:52:06 +01:00
Michael Schroeder
d5b795a02b osc build: add support for _buildenv upload 2014-11-07 13:41:34 +01:00
Denis Pynkin
e0d96a49b3 Initialize variable 's_built' during image build.
Fixed images local build failure because of
uninitialized variable 's_built'.
2014-09-09 16:07:35 +03:00
Marcus Huewe
b07a4d0b37 Merge branch 'w291' of https://github.com/berendt/osc
Conflicts:
	osc/build.py

Resolved merge conflict.
2014-08-14 17:24:28 +02:00
Christian Berendt
1751bdc47f Resolve PEP8 issue E231
* E231 missing whitespace after ':'
2014-08-13 17:30:12 +02:00
Christian Berendt
d35983d5b8 Resolve PEP8 issue W291
* W291 trailing whitespace
2014-08-12 15:01:16 +02:00
Jan Blunck
475d2a298d Add support for livebuild buildtype
This commit allows for 'osc build' to do local builds of type livebuild.
Debian livebuild is the native Debian live image building system.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
2014-07-08 21:18:01 +02:00
Jan Blunck
b2ad3ebabc Make get_built_files() take the buildtype instead of the pactype
It is possible that two different build types use the same package type.
Therefore we need to make get_built_files() work on the build type.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
2014-07-04 16:42:53 +02:00
Marcus Huewe
7efd6db501 - added support for a per apiurl "build-root" option
Resolution order:
OSC_BUILD_ROOT env var > apiurl build-root option > general build-root option
2014-06-04 15:33:30 +02:00
Michael Schroeder
42c357336e take epoch into account when calculating the filename
ArchLinux has the epoch in the canonname, Debian discusses doing
this as well.
2014-05-13 13:29:41 +02:00
Michael Schroeder
5a65b06927 support installonly/noinstall tags for mock buildengine 2014-04-30 16:26:03 +02:00
Marcus Huewe
d6e6c0538e - get "osc build --prefer-pkgs ..." working with Arch 2014-04-03 17:41:41 +02:00