Skip to content

Commit

Permalink
solbuild: Use eopkg.py3 to build pspec.xml recipes
Browse files Browse the repository at this point in the history
**Summary**
This is necessary to be able to build the old-sk00l pisi recipe, as part
of phase1+2 of the py2->py3 eopkg migration in #2193

Signed-off-by: Rune Morling <[email protected]>
  • Loading branch information
ermo committed Jun 19, 2024
1 parent b302b10 commit 4bb7a1d
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From cd93718b3252ca60af3503ed90a6a0d39765273f Mon Sep 17 00:00:00 2001
From: Rune Morling <[email protected]>
Date: Tue, 18 Jun 2024 14:45:57 +0200
Subject: [PATCH] builder: Use eopkg.py3 to build pspec.xml recipes

This ensures that solbuild will work with the phase1+2 changes to eopkg
and pisi packages [here](https://github.com/getsolus/packages/pull/2964)

In addition, make a cosmetic tweak to eopkg install commands (which will
effectively be using eopkg.bin when the PR above lands) so the -y flag
is set before the -c flag when installing components.

Signed-off-by: Rune Morling <[email protected]>
---
builder/build.go | 2 +-
builder/eopkg.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/builder/build.go b/builder/build.go
index 92d426f..ba03ccf 100644
--- a/builder/build.go
+++ b/builder/build.go
@@ -382,7 +382,7 @@ func (p *Package) BuildXML(notif PidNotifier, pman *EopkgManager, overlay *Overl

// Now build the package, ignore-sandbox in case someone is stupid
// and activates it in eopkg.conf...
- cmd := eopkgCommand(fmt.Sprintf("eopkg build --ignore-sandbox --yes-all -O %s %s", wdir, xmlFile))
+ cmd := eopkgCommand(fmt.Sprintf("eopkg.py3 build --ignore-sandbox --yes-all -O %s %s", wdir, xmlFile))

slog.Info("Now starting build", "package", p.Name)

diff --git a/builder/eopkg.go b/builder/eopkg.go
index 1c0c887..1f1f1a1 100644
--- a/builder/eopkg.go
+++ b/builder/eopkg.go
@@ -219,7 +219,7 @@ func (e *EopkgManager) Upgrade() error {

// InstallComponent will install the named component inside the chroot.
func (e *EopkgManager) InstallComponent(comp string) error {
- err := ChrootExec(e.notif, e.root, eopkgCommand(fmt.Sprintf("eopkg install -c %v -y", comp)))
+ err := ChrootExec(e.notif, e.root, eopkgCommand(fmt.Sprintf("eopkg install -y -c %v", comp)))
e.notif.SetActivePID(0)

return err
--
2.45.1

5 changes: 4 additions & 1 deletion packages/s/solbuild/package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name : solbuild
version : 1.6.3
release : 54
release : 55
source :
- https://github.com/getsolus/solbuild/archive/refs/tags/v1.6.3.tar.gz : 51fd8fde341847b3a8aeb37fce257600ff5185a83371bc5cee14cc3d38a4b38d
homepage : https://github.com/getsolus/solbuild
Expand All @@ -26,6 +26,9 @@ rundeps :
- config-local-unstable : solbuild
- config-unstable : solbuild
- git
setup : |
# Ensure that eopkg.py3 is used for old-sk00l pspec.xml builds
%patch -p1 -i $pkgfiles/0001-builder-Use-eopkg.py3-to-build-pspec.xml-recipes.patch
build : |
%make
install : |
Expand Down
16 changes: 8 additions & 8 deletions packages/s/solbuild/pspec_x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<Name>solbuild</Name>
<Homepage>https://github.com/getsolus/solbuild</Homepage>
<Packager>
<Name>Silke Hofstra</Name>
<Email>[email protected]</Email>
<Name>Rune Morling</Name>
<Email>[email protected]</Email>
</Packager>
<License>Apache-2.0</License>
<PartOf>programming.tools</PartOf>
Expand Down Expand Up @@ -38,7 +38,7 @@
</Description>
<PartOf>programming.tools</PartOf>
<RuntimeDependencies>
<Dependency releaseFrom="54">solbuild</Dependency>
<Dependency releaseFrom="55">solbuild</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="data">/usr/share/solbuild/local-unstable-x86_64.profile</Path>
Expand All @@ -51,19 +51,19 @@
</Description>
<PartOf>programming.tools</PartOf>
<RuntimeDependencies>
<Dependency releaseFrom="54">solbuild</Dependency>
<Dependency releaseFrom="55">solbuild</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="data">/usr/share/solbuild/99_unstable.conf</Path>
</Files>
</Package>
<History>
<Update release="54">
<Date>2024-06-16</Date>
<Update release="55">
<Date>2024-06-18</Date>
<Version>1.6.3</Version>
<Comment>Packaging update</Comment>
<Name>Silke Hofstra</Name>
<Email>[email protected]</Email>
<Name>Rune Morling</Name>
<Email>[email protected]</Email>
</Update>
</History>
</PISI>

0 comments on commit 4bb7a1d

Please sign in to comment.