Commit Graph

38 Commits

Author SHA1 Message Date
Colin Walters
5fec2b1af3 build-sys: Add some gitignore for Rust bits
Just keeping status tidy.

Closes: #1397
Approved by: jlebon
2018-06-11 13:08:41 +00:00
Colin Walters
7b69294b8a packaging: Support vendoring the Rust sources
This ends up being different than what landed in librsvg (that
was imported into ostree) because in rpm-ostree we've basically
been using `git archive`-based tarball generation rather than `make dist`
for a long time.  And supporting `make dist` looks like it'd get into
handling the `libdnf` bits and walking into `cmake` land so...yeah
let's not do that.

The canonical sources are in git (recursively via submodule),
except for the Rust sources, which cargo can download dynamically,
and with this patch we support glomming all of that together
into a tarball.

(And turn off `make dist` so people understand how we do it)

Tested by `make -f Makefile.dist-packaging dist-snapshot`, then
copying the resulting tarball into a container with `--net=none`
and building there.

Closes: #1391
Approved by: jlebon
2018-06-06 15:52:48 +00:00
Colin Walters
702daa2335 rust: Fix automake warnings, add unit tests to glibutils
Automake was warning about duplicate `clean-local` definitions, let's
do the nonrecursive automake dance.

And while I'm here, let's add some Rust unit tests that actually run
on `make check` too, since the whole unit testing bits of Rust are
awesome.

(I also tweaked the propagate bits to use the nicer `is_null()` method)

Closes: #1389
Approved by: jlebon
2018-06-05 19:53:41 +00:00
Jonathan Lebon
479406e6a5 Add support for YAML treefiles
Let's modernize and start supporting YAML treefiles. I'll dare make the
sweeping generalization that most people would prefer reading and
writing YAML over JSON.

This takes bits from coreos-assembler[1] that know how to serialize a
YAML file and spit it back out as a JSON and makes it into a shared lib
that we can link against. We could use this eventually for JSON inputs
as well to force a validation check before composing.

If we go this route, we could then turn on `--enable-rust` in FAHC for
now and drop the duplicate code in coreos-assembler.

[1] https://github.com/cgwalters/coreos-assembler

Closes: #1377
Approved by: cgwalters
2018-06-05 13:08:33 +00:00
Jonathan Lebon
b9bae8fc5b daemon/config: add new rpm-ostreed.conf
Making this a separate commit, since it's a first for rpm-ostree. We now
have a conf file complete with man page! No options yet though.

Interestingly, there was a function called `rpmostreed_reload_config`
which was declared but never defined. Didn't look too much into that.

We make sure that the config is part of the things we reload when users
call `rpm-ostree reload`.

Closes: #1204
Approved by: cgwalters
2018-01-16 16:51:01 +00:00
Colin Walters
cf58640cb3 Switch libdnf to projectatomic branch
We previously added a projectatomic/libdnf fork. I just pushed an
`rpmostree-branch` to there with one PR on top. This is an unfortunate turn but
the C++ thing still needs to be worked out.

Obviously we don't want a permanent fork, but I find it hard to justify spending
a whole lot of time pitching in to help with the libdnf C++ conversion versus
all the other work I could be doing.

Update submodule: libdnf

Closes: #1114
Approved by: jlebon
2018-01-16 14:14:32 +00:00
Colin Walters
937ad1b1fc build-sys: Sync CFLAGS with libostree
In particular this pulls in `-fno-strict-aliasing`.  See
https://github.com/ostreedev/ostree/pull/1384

Closes: #1156
Approved by: jlebon
2017-12-15 16:32:39 +00:00
Colin Walters
6d1918581b build-sys: Bump glib dependency
This matches reality; I picked what's in CentOS 7 mainline today. More
importantly this also fixes a build error with `-Werror=undef` because we had a
trailing underscore `_` at the end and never noticed.

Closes: #1156
Approved by: jlebon
2017-12-15 16:32:39 +00:00
Jonathan Lebon
bace3168ec build: allow git describe versioning in worktrees
In git worktrees, `.git` is not a directory but a regular file
containing the path to the real git directory. This was causing us to
not use `git describe` in the versioning info, which is really useful to
sanity check that you're running the code you think you're running. Fix
this by just checking that a `.git` entry exists.

Closes: #1102
Approved by: cgwalters
2017-11-13 13:48:58 +00:00
Jonathan Lebon
37440769b7 Makefile.am: add rpm-ostreed stub to GITIGNOREFILES
Closes: #636
Approved by: cgwalters
2017-02-21 14:13:42 +00:00
Colin Walters
687567d3ee Merge daemon binary into main binary
The actual problem I am trying to fix with this is fallout from the
introduction of `/usr/libexec/rpm-ostreed`, which required a SELinux
policy change.  Specifically for CentOS, the base policy is rev'd
slowly.

My hope was that by merging the daemon code back into `/usr/bin/rpm-ostree`
which is labeled `install_exec_t`, starting via systemd would do
the right thing.  It turns out that doesn't happen.

Now later, I'm picking this patch back up because I want to do multprocessing in
the daemon (and in the core), and it makes sense to share code between them,
because multiprocessing will need to go through a re-exec path.

Another benefit is we avoid duplicated text (libglnx, internal helpers) between
the two binaries.

Closes: #292
Approved by: jlebon
2017-02-07 16:07:09 +00:00
Colin Walters
b099680d1d build: Capture git describe on build if available, add to --version
Many projects do this, and it really helps debugging to know the
exact hash.

(Of course this is broken in traditional rpm builds from a tarball,
 and rpmdistro-gitoverlay injects it into the Version field,
 but it will help me for vmcheck debugging)

Closes: #584
Approved by: jlebon
2017-01-19 19:49:58 +00:00
Colin Walters
2f9d586bdc Redo vmcheck to abstract over ssh-config, drop all building
My development environment is now using "pet" docker containers.
I use VMs for testing things that require that (like rpm-ostree).

This patch builds on work from @jlebon in
https://github.com/projectatomic/rpm-ostree/pull/509
to rework `vmcheck` such that it can work on any `ssh-config`.  By
default we expect this to be Vagrant.

However, I go a lot farther and delete the `vmbuild` code that was
trying to do builds in a container on the target VM.  I think this is
still worth pursuing at some point, but for now I think it's
reasonable to assume that the rpm-ostree developer audience uses Linux
as their host workstation and hence has containers.

(There's another important point here in that for developing lower
 level things like rpm-ostree, there's a strong push to make the VM
 disposable and not a pet)

Closes: #516
Approved by: jlebon
2016-11-16 18:14:23 +00:00
Colin Walters
7025cb778e build-sys: Bump to -std=gnu11
Mostly because when building with CLang, I get a spam of warnings
like:

```
/home/walters/src/github/projectatomic/rpm-ostree/libdnf/libdnf/dnf-transaction.h:37:27: warning: redefinition of typedef 'DnfTransaction' is a C11 feature [-Wtypedef-redefinition]
G_DECLARE_DERIVABLE_TYPE (DnfTransaction, dnf_transaction, DNF, TRANSACTION, GObject)
```

Closes: #501
Approved by: jlebon
2016-10-27 14:30:47 +00:00
Colin Walters
328b85d396 Add infrastructure for alternative name (currently nts)
See https://github.com/projectatomic/rpm-ostree/issues/405

This patch adds an (off by default) `--enable-new-name` build option
which currently defaults to `nts`.  This is purely additive, and
the intention is that we'll support the rpm-ostree name in
perpetuity most likely.

At the moment, we add a new name for:
  - /usr/bin/$name
  - The systemd unit file

But we notably *don't* attempt to add a new name to the DBus API,
as it'd be a lot more invasive of a patch, and less payoff (it's
mostly just programs/scripts that interact with the DBus).

Closes: #497
Approved by: jlebon
2016-10-20 14:22:28 +00:00
Colin Walters
39913a2c25 Update for libhif -> libdnf
Still not many PRs outstanding, so it's a good time to take this plunge.
Mostly automated via `sed`.

Closes: #416
Approved by: Conan-Kudo
2016-08-04 01:10:08 +00:00
Colin Walters
125c482b1d Switch to using libhif as a git submodule
So I was trying to hack on my host's copy of rpm-ostree inside a pet
docker container, but ran into a conflict with libhif since dnf uses
it.  I think we basically need to *always* build the bundled path,
rather than what I'm doing with CAHC and FADC where it's built as a
regular RPM.

It's not really sustainable right now for us to have both bundled and
not-bundled build paths - and we need to support co-installation with
dnf.

Another major issue is that we want to version lock with libhif -
right now our CI and both CAHC/FADC track libhif master, but that
means everything breaks if libhif breaks and we don't immediately
port.

git submodules solve all of these problems - the same as we're doing
with libglnx.

libglnx is *designed* for use as a git submodule, where as libhif
needs to support being both bundled and not-bundled.  So we end up
with some hacks on our side, but I think it's all not too bad.  I've
marked build rules with `# bundled libhif` so we know where to find
them later when libhif is stable.

Closes: #357
Approved by: jlebon
2016-06-30 14:27:55 +00:00
Colin Walters
7e55b484e3 build: Use gnu99 by default
It's actually very nice to be able to declare loop variables inside
the initializer.

Closes: #254
Approved by: jlebon
2016-03-30 20:51:34 +00:00
Colin Walters
a9a49e72cd build: Use git.mk, make git status clean
Having a clean `git status` is really important for not missing files
one wants to `git add`.
2016-03-10 14:36:44 -05:00
Colin Walters
e66333393e Move gtk-doc into api-doc
Since that's all it is now, we use mkdocs for the manual.
2016-03-09 11:20:06 -05:00
Jonathan Lebon
367229892f automake: squash warnings re. subdir-objects
During autoreconf, automake would emit many warnings regarding the
option 'subdir-objects' being disabled. We squash those warnings by
enabling the option.

We also fix Makefile.am so that it includes the patched libglnx Makefile
rather than the original one, which would cause libglnx output to be
placed in the literal dir './$(libglnx_srcpath)'.
2015-09-11 10:30:09 -04:00
Jonathan Lebon
f994de3a93 Makefile.am: squash warning re. duplicate definition
During autoreconf, we would get a warning due to privdatadir being
defined in both Makefile-rpm-ostree.am and Makefile.am. Remove the
instance in Makefile.am.
2015-09-11 10:27:09 -04:00
petervo
c0d15a66ad daemon: Start of work on daemon 2015-09-09 22:00:04 -04:00
Matthew Barnes
fb7e491dfe Bump GIO requirement to 2.40 to match ostree 2015-08-14 12:22:45 -04:00
Colin Walters
7b45f13a62 Link lib/ against libpriv/, use it to share sack loading function
On the plus side, we share some code between the library and the
binary now.  On the downside, because `librpmostreepriv.la` is a
noinst library, its code text is duplicated between the shared library
and binary, at least until we either:

 - Have the binary solely use the public shared library (like ostree does)
 - Install `librpmostreepriv.so` to e.g. `/usr/lib64/rpm-ostree/librpmostreepriv.so`
   without the headers being public
2015-04-23 16:30:17 -04:00
Colin Walters
792da457db build: Use -fvisibility=hidden and explicit exports
This avoids symbol leakage.  Previously we were at risk of exporting
other random API from libpriv, as well as libglnx.
2015-04-13 21:25:05 -04:00
Colin Walters
de47c23450 doc: Add gtk-doc for new library 2015-04-13 14:39:06 -04:00
Colin Walters
8a5730525e Add a public shared library, with "rpm -qa" for commit functionality
This will help build release engineering and other types of tools;
for example, rather than parsing the output of `db diff`, one
should be able to call an API.

Initially, this adds the generic infrastructure for a public shared
library, with a new function call to do the equivalent of `rpm -qa` on
a particular OSTree commit.

Closes: https://github.com/projectatomic/rpm-ostree/issues/117
Closes: https://github.com/projectatomic/rpm-ostree/pull/124
2015-04-13 14:39:06 -04:00
Colin Walters
3190eff276 Start using libglnx
The high level goal is to deprecate libgsystem.  I was trying to share
code between ostree/rpm-ostree, but it was too painful to commit to
forver frozen ABI for new utility APIs.

The git submodule approach will much more easily allow breaking
API/ABI, and iterate on APIs until they either land in GLib or not.

Note that libglnx will not use GFile*, so a full port to it will
involve also not using that.  Thus, it will be necessarily
incremental; in the meantime we'll link to both libgsystem and
libglnx.
2015-02-15 14:01:13 -05:00
Kenjiro Nakayama
c62ad4d691 Show capability list with --version option 2014-11-26 14:09:15 -05:00
Colin Walters
a32ac06ce9 Import some basic testing infrastructure from OSTree
This is using the
https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests model.

In order to run the tests, you will need to:
./configure --enable-installed-tests

Then:
gnome-desktop-testing-runner -p 0 rpm-ostree/
2014-09-29 16:25:36 -04:00
Colin Walters
df2b355f38 core: Remove src/autobuilder
This will move to a separate repository.  This allows a clearer
separation between the core tool (which is shipped on client systems
too), and the compose infrastructure.

Furthermore, I want to make the autobuilder a Docker container.
2014-05-03 07:32:28 -04:00
Colin Walters
15561dbfe5 Add basic man page 2014-03-25 09:07:49 -04:00
Colin Walters
38b995b94e Use the now external libgsystem
https://git.gnome.org/browse/libgsystem/commit/?id=9363cfc28ede912e2f06d4ccb42a646bb8a4bd2e
2014-02-07 17:29:40 -05:00
Colin Walters
eb8c4483dc Make smoketest work 2014-01-25 21:25:27 -05:00
Colin Walters
66a19b6475 Import lots of code from gnome-continuous
This doesn't really do anything yet, but the idea is to start doing
Continuous-like things (such as actually booting the result).
2014-01-03 17:14:10 -05:00
Colin Walters
220773f213 Import some code for using GJS
This is forked from gnome-continuous.
2014-01-03 17:14:10 -05:00
Colin Walters
958dfa435e Initial import from pkgsys-ostree 2013-12-21 19:41:30 -05:00