diff --git a/Build.pm b/Build.pm index 9a3e23b4e..7c561c164 100644 --- a/Build.pm +++ b/Build.pm @@ -44,7 +44,7 @@ our $do_fissile; our $do_helm; our $do_flatpak; our $do_mkosi; -our $do_obsproduct; +our $do_productcompose; sub import { for (@_) { @@ -61,9 +61,9 @@ sub import { $do_helm = 1 if $_ eq ':helm'; $do_flatpak = 1 if $_ eq ':flatpak'; $do_mkosi = 1 if $_ eq ':mkosi'; - $do_obsproduct = 1 if $_ eq ':obsproduct'; + $do_productcompose = 1 if $_ eq ':productcompose'; } - $do_rpm = $do_deb = $do_kiwi = $do_obsproduct = $do_arch = $do_collax = $do_livebuild = $do_snapcraft = $do_appimage = $do_docker = $do_fissile = $do_helm = $do_flatpak = $do_mkosi = 1 if !$do_rpm && !$do_deb && !$do_kiwi && !$do_arch && !$do_collax && !$do_livebuild && !$do_snapcraft && !$do_appimage && !$do_docker && !$do_fissile && !$do_helm && !$do_flatpak && !$do_mkosi && !$do_obsproduct; + $do_rpm = $do_deb = $do_kiwi = $do_productcompose = $do_arch = $do_collax = $do_livebuild = $do_snapcraft = $do_appimage = $do_docker = $do_fissile = $do_helm = $do_flatpak = $do_mkosi = 1 if !$do_rpm && !$do_deb && !$do_kiwi && !$do_arch && !$do_collax && !$do_livebuild && !$do_snapcraft && !$do_appimage && !$do_docker && !$do_fissile && !$do_helm && !$do_flatpak && !$do_mkosi && !$do_productcompose; if ($do_deb) { require Build::Deb; @@ -101,8 +101,8 @@ sub import { if ($do_mkosi) { require Build::Mkosi; } - if ($do_obsproduct) { - require Build::ObsProduct; + if ($do_productcompose) { + require Build::ProductCompose; } } @@ -198,6 +198,9 @@ my %subst_defaults = ( 'system-packages:kiwi-product' => [ 'kiwi', ], + 'system-packages:productcompose' => [ + 'product-composer', + ], 'system-packages:docker' => [ 'docker', 'system-packages:repo-creation', ], @@ -831,6 +834,9 @@ sub get_sysbuild { @sysdeps = @{$config->{'substitute'}->{'system-packages:kiwi-image'} || []}; @sysdeps = @{$config->{'substitute'}->{'kiwi-setup:image'} || []} unless @sysdeps; @sysdeps = @{$subst_defaults{'system-packages:kiwi-image'} || []} unless @sysdeps; + } elsif ($buildtype eq 'productcompose') { + @sysdeps = @{$config->{'substitute'}->{'system-packages:productcompose'} || []}; + @sysdeps = @{$subst_defaults{'system-packages:productcompose'} || []} unless @sysdeps; } elsif ($buildtype eq 'kiwi-product') { @sysdeps = @{$config->{'substitute'}->{'system-packages:kiwi-product'} || []}; @sysdeps = @{$config->{'substitute'}->{'kiwi-setup:product'} || []} unless @sysdeps; @@ -1263,7 +1269,7 @@ sub add_all_providers { sub recipe2buildtype { my ($recipe) = @_; return undef unless defined $recipe; - return $1 if $recipe =~ /\.(spec|dsc|kiwi|obsproduct|livebuild)$/; + return $1 if $recipe =~ /\.(spec|dsc|kiwi|productcompose|livebuild)$/; $recipe =~ s/.*\///; $recipe =~ s/^_service:.*://; return 'arch' if $recipe eq 'PKGBUILD'; @@ -1321,7 +1327,7 @@ sub parse { return Build::Kiwi::parse($cf, $fn, @args) if $do_kiwi && $fn =~ /\.kiwi$/; return Build::LiveBuild::parse($cf, $fn, @args) if $do_livebuild && $fn =~ /\.livebuild$/; return Build::Mkosi::parse($cf, $fn, @args) if $do_mkosi && $fn =~ /^mkosi\./; - return Build::ObsProduct::parse($cf, $fn, @args) if $do_obsproduct && $fn =~ /\.obsproduct$/; + return Build::ProductCompose::parse($cf, $fn, @args) if $do_productcompose && $fn =~ /\.productcompose$/; return parse_typed($cf, $fn, recipe2buildtype($fn), @args); } @@ -1331,7 +1337,7 @@ sub parse_typed { return Build::Rpm::parse($cf, $fn, @args) if $do_rpm && $buildtype eq 'spec'; return Build::Deb::parse($cf, $fn, @args) if $do_deb && $buildtype eq 'dsc'; return Build::Kiwi::parse($cf, $fn, @args) if $do_kiwi && $buildtype eq 'kiwi'; - return Build::ObsProduct::parse($cf, $fn, @args) if $do_obsproduct && $buildtype eq 'obsproduct'; + return Build::ProductCompose::parse($cf, $fn, @args) if $do_productcompose && $buildtype eq 'productcompose'; return Build::LiveBuild::parse($cf, $fn, @args) if $do_livebuild && $buildtype eq 'livebuild'; return Build::Snapcraft::parse($cf, $fn, @args) if $do_snapcraft && $buildtype eq 'snapcraft'; return Build::Appimage::parse($cf, $fn, @args) if $do_appimage && $buildtype eq 'appimage'; diff --git a/Build/ObsProduct.pm b/Build/ProductCompose.pm similarity index 98% rename from Build/ObsProduct.pm rename to Build/ProductCompose.pm index 85602ea10..bbb8c9404 100644 --- a/Build/ObsProduct.pm +++ b/Build/ProductCompose.pm @@ -18,7 +18,7 @@ # ################################################################ -package Build::ObsProduct; +package Build::ProductCompose; use strict; use warnings; diff --git a/PBuild/Recipe.pm b/PBuild/Recipe.pm index 524bec690..5262b435b 100644 --- a/PBuild/Recipe.pm +++ b/PBuild/Recipe.pm @@ -72,8 +72,8 @@ sub find_recipe { return $files{$files[0]}; } } - if ($type ne 'obsproduct') { - @files = grep {/\.obsproduct$/} keys %files; + if ($type ne 'productcompose') { + @files = grep {/\.productcompose$/} keys %files; @files = grep {/^\Q$pkg\E/i} @files if @files > 1; return $files{$files[0]} if @files == 1; if (@files > 1) { diff --git a/build-recipe b/build-recipe index 1cb98db46..db2b938d4 100644 --- a/build-recipe +++ b/build-recipe @@ -32,7 +32,7 @@ RPM_NOPREP= BUILD_CHANGELOG_TIMESTAMP= VCSURL= -for i in spec dsc kiwi obsproduct arch collax preinstallimage simpleimage mock livebuild snapcraft debootstrap debbuild appimage docker podman fissile helm flatpak mkosi; do +for i in spec dsc kiwi productcompose arch collax preinstallimage simpleimage mock livebuild snapcraft debootstrap debbuild appimage docker podman fissile helm flatpak mkosi; do . "$BUILD_DIR/build-recipe-$i" done @@ -122,7 +122,7 @@ recipe_set_buildtype() { *.spec|*.src.rpm) BUILDTYPE=spec ;; *.dsc) BUILDTYPE=dsc ;; *.kiwi) BUILDTYPE=kiwi ;; - *.obsproduct) BUILDTYPE=obsproduct ;; + *.productcompose) BUILDTYPE=productcompose ;; PKGBUILD) BUILDTYPE=arch ;; snapcraft.yaml) BUILDTYPE=snapcraft ;; appimage.yml) BUILDTYPE=appimage ;; @@ -185,7 +185,7 @@ expand_recipe_directories() { case $(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" type) in dsc) types=".dsc" ;; kiwi) types=".kiwi" ;; - obsproduct) types=".obsproduct" ;; + productcompose) types=".productcompose" ;; arch) types="PKGBUILD" ;; collax) types="build.collax" ;; livebuild) types=".livebuild" ;; @@ -193,7 +193,7 @@ expand_recipe_directories() { mkosi) types="mkosi." ;; esac fi - types="$types .spec _specsubdir:package _specsubdir:dist .dsc PKGBUILD Dockerfile build.collax .kiwi .obsproduct .src.rpm .nosrc.rpm simpleimage snapcraft.yaml Chart.yaml flatpak.yaml flatpak.json mkosi." + types="$types .spec _specsubdir:package _specsubdir:dist .dsc PKGBUILD Dockerfile build.collax .kiwi .productcompose .src.rpm .nosrc.rpm simpleimage snapcraft.yaml Chart.yaml flatpak.yaml flatpak.json mkosi." fi for t in $types ; do found= diff --git a/build-recipe-obsproduct b/build-recipe-productcompose similarity index 83% rename from build-recipe-obsproduct rename to build-recipe-productcompose index 30ea7db97..cff1ce788 100644 --- a/build-recipe-obsproduct +++ b/build-recipe-productcompose @@ -22,13 +22,13 @@ ################################################################ -recipe_setup_obsproduct() { +recipe_setup_productcompose() { TOPDIR=/usr/src/packages test "$DO_INIT_TOPDIR" = false || rm -rf "$BUILD_ROOT$TOPDIR" mkdir -p "$BUILD_ROOT$TOPDIR" mkdir -p "$BUILD_ROOT$TOPDIR/OTHER" mkdir -p "$BUILD_ROOT$TOPDIR/SOURCES" - mkdir -p "$BUILD_ROOT$TOPDIR/OBSPRODUCT" + mkdir -p "$BUILD_ROOT$TOPDIR/PRODUCT" # compat, older build versions did not clean TOPDIR ... mkdir -p "$BUILD_ROOT$TOPDIR/BUILD" mkdir -p "$BUILD_ROOT$TOPDIR/RPMS" @@ -51,12 +51,12 @@ recipe_setup_obsproduct() { fi } -recipe_prepare_obsproduct() { +recipe_prepare_productcompose() { : } -recipe_build_obsproduct() { - echo "running obs product builder..." +recipe_build_productcompose() { + echo "running product composer..." extra_args="" if test -n "$RELEASE" ; then @@ -65,13 +65,13 @@ recipe_build_obsproduct() { if test -n "$BUILD_FLAVOR" ; then extra_args=" $extra_args --flavor $BUILD_FLAVOR" fi - chroot "$BUILD_ROOT" su -c "/usr/bin/obs-product-builder build $extra_args -v --clean $TOPDIR/SOURCES/$RECIPEFILE $TOPDIR/OBSPRODUCT" - abuild < /dev/null && BUILD_SUCCEEDED=true + chroot "$BUILD_ROOT" su -c "/usr/bin/product-composer build $extra_args -v --clean $TOPDIR/SOURCES/$RECIPEFILE $TOPDIR/PRODUCT" - abuild < /dev/null && BUILD_SUCCEEDED=true } -recipe_resultdirs_obsproduct() { - echo OBSPRODUCT +recipe_resultdirs_productcompose() { + echo PRODUCT } -recipe_cleanup_obsproduct() { +recipe_cleanup_productcompose() { : } diff --git a/docs/build_config.adoc b/docs/build_config.adoc index 1b73eee7f..62c489e24 100644 --- a/docs/build_config.adoc +++ b/docs/build_config.adoc @@ -395,7 +395,7 @@ architecture!). For example arm-linux-gnueabihf for armv7hl builds. Build recipe type. This is the format of the file which provides the build description. This gets usually autodetected, but in some rare cases it can be set here to either one of these: spec, dsc, kiwi, -livebuild, arch, preinstallimage, obsproduct. +livebuild, arch, preinstallimage, productcompose. Defines the build recipe format. Valid values are currently: none, spec, dsc, arch, kiwi, preinstallimage. If no type is specified, OBS deduces a diff --git a/expanddeps b/expanddeps index 547ceed6b..a10af7776 100755 --- a/expanddeps +++ b/expanddeps @@ -382,7 +382,7 @@ Build::readdeps($cf, undef, \%repo); my @sysdeps = Build::get_sysbuild($cf, $buildtype, $extrasysdeps); -if ($buildtype eq 'kiwi-image' || $buildtype eq 'kiwi-product' || $buildtype eq 'obsproduct') { +if ($buildtype eq 'kiwi-image' || $buildtype eq 'kiwi-product' || $buildtype eq 'productcompose') { if (!shift @sysdeps) { print STDERR "expansion error\n"; print STDERR " $_\n" for @sysdeps;