157 Commits

Author SHA1 Message Date
Colin Walters
56b1e02f01 Rework to run in Fedora, not CentOS
https://pagure.io/fedora-atomic-host-continuous/issue/16

Fedora started using richdeps in the `BuildRequires`, which finally
brought down our hacky tower to do Fedora RPM builds from a CentOS 7
host.

Complicating all of this is that mock in Fedora is python3.  So
we'd have to maintain compatibility with both 2/3 and that sucks.
Let's do a hard 3 port for now.
v2018.1
2018-02-01 12:51:06 -05:00
Colin Walters
0150feeea2 mockchain: Temporarily use old chroot 2017-07-10 13:33:19 -04:00
Colin Walters
d1485e5cf3 chain: Adapt to mock moving to /usr/libexec/mock 2017-01-03 15:20:53 -05:00
Colin Walters
260d88758a sources: SHA512 is now a valid hash type
https://fedoraproject.org/wiki/ReleaseEngineering/FlagDay2016
2016-12-14 10:03:06 -05:00
Colin Walters
48ce70c429 prep-sources: Define fatal() func
This was caught when we started calling it...
2016-12-14 10:02:49 -05:00
Colin Walters
1a6d6da529 resolve: If we have multiple internal specs, find a "best" one
"best" is currently defined to be "matches basename".  This fixes
switching `micro-yuminst` to bundle `libhif` (which also has a spec in
git).

Closes: #40
Approved by: cgwalters
2016-07-29 15:18:50 +00:00
Colin Walters
3789548256 mockchain: Don't discard the output of mock
I have no idea why we were creating a pipe here, maybe it was used
before.  Anyways it's a lot saner to just not redirect output.  This
way I can actually see when I add debugging prints to mock for
example.

Closes: #39
Approved by: cgwalters
2016-07-29 01:09:13 +00:00
Colin Walters
c9f6e7119f resolve: Add an override-version tag
So before this I had a relatively hard line in that the
RPM version-release tags should match `git describe`.  Anyone
who wants to ensure lower versions win should be using the
`priority=` key on repos.

Which works well with yum, but it turns out we don't implement
it in libhif, and hence rpm-ostree doesn't support it.

This is currently causing `skopeo-1.9` from base RHEL to win over our
CI-generated RPMs in CAHC.

We should teach libhif about priorities, but in the meantime this hack
gets us by.

Closes: #38
Approved by: cgwalters
2016-06-24 20:08:00 +00:00
Colin Walters
0decf8f881 resolve: Don't override Release for distgit repos either
In general with dist-git builds we shouldn't touch the versioning.

Closes: #38
Approved by: cgwalters
2016-06-24 20:08:00 +00:00
Colin Walters
17cd461d7e specfile: Fix a crash if we haven't set a tag before deleting changelog
We need to reference the `.txt` property in general.

Closes: #38
Approved by: cgwalters
2016-06-24 20:08:00 +00:00
Colin Walters
fa4d059742 packaging: Enable epel testing, tweak suggested alias
We need EPEL testing to get a fixed mock for `--nocheck`.
2016-06-14 14:48:33 -04:00
Colin Walters
38da610496 resolve: Also strip git tags with name_ as prefix
libhif at least uses this.

Closes: #37
Approved by: cgwalters
2016-06-10 18:24:12 +00:00
Colin Walters
6875f8e269 build: Copy logs to logdir rather than move
This way they get retained with the lifecycle of the builds.  The
--logdir was intended for Jenkins.

Closes: #34

Closes: #35
Approved by: p3ck
2016-06-09 17:31:53 +00:00
Colin Walters
ce96f8a207 Release 2016.3 v2016.3 2016-06-07 11:43:19 -04:00
Colin Walters
57a5c88dcd Add a 'srpmroot' key, used to inject SRPM root dependencies
I'm trying to build a newer golang from Fedora dist-git for CentOS
Atomic Host Continuous, but hitting an issue where it's relying on the
implicit `redhat-rpm-config` -> `go-srpm-macros` in Fedora, which
doesn't exist in CentOS.

We can work around that by specially denoting RPMs which contain
macros, and ensuring they end up in the buildroot.  This is cleaner
than defining our own `foo-rpm-config` package.

Closes: #33
Approved by: cgwalters
2016-06-03 02:14:44 +00:00
Colin Walters
bc656eb2ef Support 'with', 'without' keys
These ultimately filter down to `rpmbuild --with|out`.  The rationale
for this is that for some components I actually want to make
use of this, even though it's not traditional in Fedora/CentOS.

For example, rpm-ostree can be built with/without bundled libhif, and
for rdgo I want to not bundle.

Closes: #32
Approved by: cgwalters
2016-05-24 20:53:14 +00:00
Colin Walters
38f22bb151 resolve: Add --override-giturl
When wiring rdgo to Jenkins and receving git push notifications
(e.g. github webhook), it's convenient to pass them on to resolve via
this command line flag, without having to maintain an external mapping
of which components contain which git URLs.

This allows overriding the branch (e.g. to use the `auto` branch for Homu),
or optionally fetching from an alternative location, and to fetch an
exact commit.

The first case as mentioned is for watching one upstream branch
(`master`, `auto`, `try` etc.).  This second case is intended for
Jenkins PR testing, where Jenkins watches for `refs/pr/*`, and we
inherit the fetch from Jenkins.

Closes: #30
Approved by: cgwalters
2016-05-18 14:56:43 +00:00
Colin Walters
c2c50bd4b1 mockchain: Scrape PKGPYTHONDIR from /usr/sbin/mock
We were passing the wrong value, which caused us not to find
any plugins.

Sadly we have to scrape it from the binary =(

Closes: #31
Approved by: cgwalters
2016-05-18 13:36:56 +00:00
Colin Walters
e711d27b19 travis: Update to use my personal Homu 2016-05-18 09:36:02 -04:00
Colin Walters
d053af70b5 build: Fix losing previous successful builds
In changing things to retain partial builds, we started walking
over the build list after it was complete, and deleting components
that weren't marked successful.

But builds we didn't need to do weren't marked as successful!  Fix
this by retaining a set of builds we need to do, and don't try to
postprocess builds we didn't make.

This means we won't delete the cache metadata for previously
successful builds.

Closes: #27
Approved by: cgwalters
2016-05-07 16:38:51 +00:00
Colin Walters
b29f84ffe4 git: Quiet more local operations
In Jenkins, git ends up printing a *lot* of output for local clones,
and it's not useful.  Potentially we should use `isatty(0)` for
quiet-or-not in the future, but for now this should help make Jenkins
longs more readable.

Closes: #26
Approved by: cgwalters
2016-05-07 15:17:45 +00:00
Colin Walters
ba0db21c81 resolve: Look for .spec files anywhere in the tree
Adding projectatomic/commissaire, they keep the spec in
`contrib/package/rpm`.  We might as well just keep this anywhere.

Closes: #22
Approved by: cgwalters
2016-05-04 19:08:33 +00:00
Colin Walters
e1dc839815 Dockerfile: Use patched mock
That has a fixed --nocheck.

Closes: #20
Approved by: cgwalters
2016-05-02 17:33:18 +00:00
Colin Walters
bc665979a5 Dockerfile: install fedpkg, add usage examples
We should include fedpkg since most people will want to pull from
Fedora.

Closes: #18

Closes: #19
Approved by: ignatenkobrain
2016-04-29 16:17:14 +00:00
Colin Walters
a4ff7e3ca2 Add a clone operation, resolve/clone inherit basetask_resolve
I want to support two related but distinct things:

 - Performing both i386 and x86_64 builds of the same source.
   This is the base `clone` operation.
 - Testing builds of a contributed patch or github PR.  This
   requires modifying one (or more) of the sources, and hence
   is known as `--full`.

Closes: #16
Approved by: cgwalters
2016-04-26 13:47:28 +00:00
Colin Walters
3a224a3e28 git: Consider lightweight tags as well
Some people use them even though I think it's pretty silly...if you're
making a tag, it's not really hard to include a changelog in it and
for that matter a GPG signature.

But it makes for more correct versions.

Closes: #17
Approved by: cgwalters
2016-04-21 16:50:07 +00:00
Colin Walters
3de8efb50c resolve: Use realpath, not manual symlink following
Otherwise we break with relative symlinks.
2016-04-19 08:20:26 -04:00
Colin Walters
bc92dd00bf Release 2016.2 v2016.2 2016-04-18 14:36:28 -04:00
Colin Walters
60f6b0e6df build: Fix --logdir to use correct directory
Regression from earlier commit.
2016-04-18 14:30:33 -04:00
Colin Walters
2ed64cd86b Use flake8, update source code
It catches unused imports at least which is helpful.  Ignore some of
the more annoying errors.

Closes: #15
Approved by: cgwalters
2016-04-12 17:36:25 +00:00
Colin Walters
27da155454 Move to using pyrpkg via external process (as Python 2 always)
Currently pyrpkg is Python 2 only, but in Fedora mock is Python 3
only.  This puts us in a bind, so fix it by executing pyrpkg via an
external process that's always Python 2.

Closes: #14
Approved by: cgwalters
2016-04-12 15:49:46 +00:00
Colin Walters
777696d151 resolve: Add a -b/--build option to trigger a build
On a build server you usually want them separate, but locally
this is more convenient.

Closes: #13
Approved by: cgwalters
2016-04-08 21:07:04 +00:00
Colin Walters
50cea417a5 Release 2016.1 v2016.1 2016-04-02 11:10:52 -04:00
Colin Walters
5502cec0a4 build: Inherit partial results from last failed build
I've often found myself in a situation where I'm trying to add a new
package, and end up pulling in some dependencies, only some of which
build.  It's frustrating to keep re-building them every time.

Generalize some of the internals a bit such that we can inherit builds
from both the last successful run, as well as any partial results from
the last *unsuccessful* run.

Closes: #12
Approved by: cgwalters
2016-04-02 15:08:00 +00:00
Colin Walters
5df8e714da packaging: Add initial Dockerfile 2016-03-31 21:50:50 -04:00
Colin Walters
cd04967e98 Move example overlay into doc/, update it
Closes: #11
Approved by: cgwalters
2016-04-01 01:00:07 +00:00
Colin Walters
7b7a5759e6 build: Use git.mk
Closes: #11
Approved by: cgwalters
2016-04-01 01:00:07 +00:00
Colin Walters
97d6fb11f9 resolve: Support plain distgit
One of my overlays is using a lot of distgit builds, so let's make it
more convenient to pull in a lot of them.

Closes: #10
Approved by: cgwalters
2016-03-31 20:37:56 +00:00
Colin Walters
02ccdc7a83 build: Show failing build number
Closes: #10
Approved by: cgwalters
2016-03-31 20:37:56 +00:00
Colin Walters
2d875e660d README.md: Update overlay example to show pinning
Closes: #10
Approved by: cgwalters
2016-03-31 20:37:56 +00:00
Colin Walters
81c5fac521 resolve: Support specifying a default branch for distgit
We should maybe have a general inheritance mechanism, but this works.

Closes: #10
Approved by: cgwalters
2016-03-31 20:37:56 +00:00
Colin Walters
627ae86121 resolve: If overlay is a link, look for certificates in the real target
An intended primary workflow is having the overlay be a symbolic link
to a separate read-only area.  We need to look for certificates in the
same location.

Closes: #10
Approved by: cgwalters
2016-03-31 20:37:56 +00:00
Colin Walters
8a1e9c7195 build: Support --arch variable
Replaces the value of `$arch` in `root/mock`.  This should be
convenient for doing multiple builders that share the same overlay
file.

Closes: #9
Approved by: cgwalters
2016-03-28 20:40:05 +00:00
Colin Walters
0efb84b019 resolve: Drop some dead code
Closes: #9
Approved by: cgwalters
2016-03-28 20:40:05 +00:00
Colin Walters
e3d9086bf9 git: Delete leftover debugging statement 2016-03-28 11:18:55 -04:00
Colin Walters
9c3e5afd65 travis: Actually do make+check
Closes: #7
Approved by: cgwalters
2016-03-26 13:32:05 +00:00
Colin Walters
0a964b6814 mockchain: Add missing import to fix pylint
Closes: #8
Approved by: cgwalters
2016-03-26 13:28:47 +00:00
Colin Walters
2da0c0b545 Add support for certificate pinning
TLS pinning should basically be standard practice nowadays.  It isn't
significantly difficult to manage, and adds a fair amount of security.

Closes: #6
Approved by: cgwalters
2016-03-25 20:54:05 +00:00
Colin Walters
6c2ef4c12e mockchain: Don't use os.getlogin()
For some reason this is throwing ENOTTY in Jenkins...anyways for
autobuilders there's no real user involved.
2016-03-25 13:15:59 -04:00
Colin Walters
22ea41b6c5 packaging: Also add rpmbuild-cwd 2016-03-17 16:07:52 -04:00