rpm 4.15.0

hammy

Member
Jun 1, 2019
62
27
18
UK
A brief resume for those looking to "have a play" with the rpm in didbs (0.1.7 in the didbs thread, has the rpm I used in these experiments in the "gcc" release).

(Sorry it's a little rough, feel free to add posts correcting stuff and off we go)

Create yourself a personal ~/.rpmmacros file containing:

Code:
%_prefix /usr/anuswear
%_sysconfdir /usr/anuswear/etc
%_localstatedir /usr/anuswear/var
$_infodir /usr/anuswear/info
$_mandir /usr/anuswear/man
$_defaultdocdir /usr/anuswear/doc
$_buildshell /usr/anuswear/bin/sh
Create a target dir for the experiments /usr/anuswear owned by your user, and create some sub-dirs and init a new RPM database:

Code:
mkdir -p ~/rpmbuild/SPEC
mkdir -p /usr/anuswear/etc
mkdir -p /usr/anuswear/var
mkdir -p /usr/anuswear/info
mkdir -p /usr/anuswear/man
mkdir -p /usr/anuswear/doc
mkdir -p /usr/anuswear/bin
mkdir -p /usr/anuswear/sbin
rpmdb --initdb
cp /usr/didbs/current/bin/sh /usr/anuswear/bin/
cp /usr/didbs/current/sbin/install-info /usr/anuswear/sbin/
Create a "virtual package" that probably is a hack, but here we go:

Code:
Summary: Test vpkg with base didbs tools
Name: initial-anuswear
Epoch: 1
Version: 0.1.0
Release: 9%{?dist}
License: GPLv3+

Provides: /bin/sh
Provides: /usr/anuswear/bin/sh
Provides: /usr/anuswear/bin/wish
Provides: /usr/anuswear/bin/tclsh
Provides: /usr/anuswear/bin/perl
Provides: /usr/anuswear/bin/awk
Provides: /usr/anuswear/bin/gawk
Provides: /usr/anuswear/sbin/install-info

%description
This is a virtual RPM package.  It contains no actual files.

%prep
# nothing to do
%build
# nothing to do
%install
# nothing to do
%clean
# nothing to do
%files
# no files in a virtual package
Put that into ~/rpmbuild/SPECS/initial-anuswear.spec and then run:

rpmbuild -ba initial-anuswear.spec

That should create an RPM in ~/rpmbuild/RPMS/mips/initial-anuswear-0.1.0-9.mips.rpm

rpm -i ~/rpmbuild/RPMS/mips/initial-anuswear-0.1.0-9.mips.rpm

Next install the example SRPM (attached) which should create the necessary SPEC for the example make build:

rpm -i /path/to/make-4.2.1-9.src.rpm

Then we build the make RPMs using the just installed source:

Code:
cd ~/rpmbuild/SPECS
rpmbuild -ba make.spec --nocheck
At that point, you should be able to install the RPM it just created:

Code:
rpm -i ~/rpbuild/RPMS/mips/make-4.2.1-9.mips.rpm
 

Attachments

Last edited:
  • Like
Reactions: Elf

Elf

Storybook
Feb 4, 2019
82
14
8
Interesting; I haven't used build systems like this before, I have always just hand crafted the RPMs (which of course is probably not the best way to go).

Is the main purpose to do an install in a chroot'd environment so that it can keep track of what to put in the install manifest?
 

hammy

Member
Jun 1, 2019
62
27
18
UK
My main goal in looking for something like this is avoid hand building + re-building when bugs get fixed. chroot or otherwise is a choice of the tool.

"didbs" currently rolls + builds about 90 packages (and that will grow) - and the order the packages get built is important - and that's the same for rpms too. I'd like to avoid the situation seen with nekoware where someone updates one package and the "down stream" things that depend on that package are now broken because there was no way to know they needed rebuilding.

Without some automated tool - we're looking at re-rolling something to extract the dependencies and calculate the appropriate build order (a "dependency" engine) and reverse dependency rebuilding on updates.

I'd like to avoid maintaining any code for that (the sooner didbs dies, the better) - either mine or anyone elses.
 

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu