After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592094 - Version control and mock builds for custom packages
Version control and mock builds for custom packages
Status: RESOLVED OBSOLETE
Product: sysadmin
Classification: Infrastructure
Component: Packages
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jeff Schroeder
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2009-08-17 14:13 UTC by Owen Taylor
Modified: 2013-11-21 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2009-08-17 14:13:20 UTC
The current procedure for locally built RPMS (RHEL machines) is roughly as follows:

 - Set up your user account to build into ~/src/redhat by creating a ~/.rpmmacros with:

---
%_topdir            /home/users/otaylor/src/redhat
%packager Owen Taylor <otaylor@redhat.com>
---

 - Create a package; ideally this either a rebuild of a Fedora package, or an update of an existing EPEL package to a newer version.

 - Build this on window.gnome.org (i386) or fixed.gnome.org (x86_6) with:

   rpmbuild -ba <package>.spec --define 'dist .el5.gnome'

   after installing any necessary build dependencies.

 - Copy the src.rpm into /home/admin/pkgs/el5/SRPMS
 
 - Copy the binary into /home/admin/pkgs/el5/i386 or ../x86_64

 - As root on container, run 'cobbler reposync'

This has various problems:

 - The package is built against whatever is installed on window or fixed, hence reproducibility problems

 - We end up with a gigantic mess of build dependencies on window and fixed.

 - Change history is limited to a) the the %changelog in the spec file b) the left-over pile of old SRPMS.

 - It's a bit of a pain

Rough plan for improvement:

 - Set up mock on fixed for doing chroot builds for both x86_64 and i386
 - Check the spec files and patches into a git module (subdirectory per package maybe)
 - Have a simple makefile that takes the spec file, the patches, sources from a lookaside directory, builds a SRPM, and rebuilds that into mock. 
 - Bonus points: make the makefile copy stuff into /home/admin and use fishpoll to trigger the cobbler reposync (separate target?)

It would certainly be conceivable to use infrastructure components from Fedora (koji and pkgcvs) to set up something much more sophisticated, but I think it would be complete overkill. Low tech sounds better.
Comment 1 Jeff Schroeder 2009-08-17 16:45:50 UTC
Sometime recently in Fedora (F11 /me thinks) the default for rpmbuild -bs was set to --nodeps. This helps keep the buildhosts clean and should be the default in our "build scripts" that we create.

This might give you an idea as a good start:

MOCK_BUILD='mock --no-clean -r RHEL-5-x86_64 rebuild'
SPEC=whatever.spec
SRPM=$(rpmbuild -bs --nodeps ~/build/SPECS/$SPEC 2>/dev/null | awk '/Wrote:/{print $NF}')

if [ ${PIPESTATUS[0]} -eq 0 -a -f "$SRPM" ]; then
    $MOCK_BUILD $SRPM
fi

Untested, but it should do what you want with a little getopt love and more error checking.
Comment 2 Andrea Veri 2013-11-21 14:55:10 UTC
The GNOME Infrastructure Team is currently migrating its bug / issue tracker away from Bugzilla to Request Tracker and therefore all the currently open bugs have been closed and marked as OBSOLETE.

The following move will also act as a cleanup for very old and ancient tickets that were still living on Bugzilla. If your issue still hasn't been fixed as of today please report it again on the relevant RT queue.

More details about the available queues you can report the bug against can be found at https://wiki.gnome.org/Sysadmin/RequestTracker.

Thanks for your patience,

the GNOME Infrastructure Team