-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001-Generate-the-abi-report-inside-of-the-chroot-using-a.patch
73 lines (67 loc) · 2.6 KB
/
0001-Generate-the-abi-report-inside-of-the-chroot-using-a.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From 65465b6b47b6aecee0d3696a3a9f4818b5b390c2 Mon Sep 17 00:00:00 2001
From: Joey Riches <josephriches@gmail.com>
Date: Wed, 29 Dec 2021 20:13:30 +0000
Subject: [PATCH 1/1] Generate the abi report inside of the chroot using
abi-wizard
This runs the abi-wizard inside of the chroot on the %installroot%
directory. This solves the problem of unclean abi reports when
packager's do not have all the dependencies installed.
This requires abi-wizard to be packaged as part of the system.base or
system.devel component to ensure that it is available inside the chroot.
---
src/builder/build.go | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/src/builder/build.go b/src/builder/build.go
index ca77a91..801d953 100644
--- a/src/builder/build.go
+++ b/src/builder/build.go
@@ -395,6 +395,16 @@ func (p *Package) BuildYpkg(notif PidNotifier, usr *UserInfo, pman *EopkgManager
}).Error("Failed to build package")
return err
}
+
+ // Generate ABI Report
+ log.Debug("Attempting to generate ABI report")
+ if err := p.GenerateABIReport(notif, overlay); err != nil {
+ log.WithFields(log.Fields{
+ "error": err,
+ }).Error("Failed to generate ABI report within solbuild")
+ return err
+ }
+
notif.SetActivePID(0)
return nil
}
@@ -450,6 +460,21 @@ func (p *Package) BuildXML(notif PidNotifier, pman *EopkgManager, overlay *Overl
return nil
}
+// GenerateABIReport will take care of generating the abireport using abi-wizard
+func (p *Package) GenerateABIReport(notif PidNotifier, overlay *Overlay) error {
+ wdir := p.GetWorkDirInternal()
+ log.Printf("Generating ABI Report...")
+ cmd := fmt.Sprintf("cd %s; abi-wizard %s/YPKG/root/%s/install", wdir, BuildUserHome, p.Name)
+ if err := ChrootExec(notif, overlay.MountPoint, cmd); err != nil {
+ log.WithFields(log.Fields{
+ "error": err,
+ }).Error("Failed to generate abireport with abi-wizard")
+ return err
+ }
+ notif.SetActivePID(0)
+ return nil
+}
+
// CollectAssets will search for the build files and copy them back to the
// users current directory. If solbuild was invoked via sudo, solbuild will
// then attempt to set the owner as the original user.
@@ -488,6 +513,10 @@ func (p *Package) CollectAssets(overlay *Overlay, usr *UserInfo, manifestTarget
collections = append(collections, tramPath)
}
+ // Collect files from abireport
+ abireportfiles, _ := filepath.Glob(filepath.Join(collectionDir, "abi_*"))
+ collections = append(collections, abireportfiles...)
+
if p.Type == PackageTypeYpkg {
pspecs, _ := filepath.Glob(filepath.Join(collectionDir, "pspec_*.xml"))
collections = append(collections, pspecs...)
--
2.34.0