lib: Introduce versioned symbols
As rpm-ostree evolves, it keeps driving API additions to libostree. This creates a relatively tight coupling. However, if delivering via e.g. RPM, unless one manually remembers to increment the `Requires:` in the spec file, it's possible for the two to become desynchronized. RPM handles versioned symbols and will ensure a dependency if the application starts using a newer version. To implement this, switch to `-fvisibility=hidden`, along with an annotation in the header, and finally add a `.sym` file. This matches what other projects like systemd and libvirt do. Although rather than attempting to retroactively version symbols, glom them all onto the current one.
This commit is contained in:
1 parent
2badf36cfd
commit
16979cc5ed
19 files changed
+608
-13
No files matched your search
@@ -30,16 +30,21 @@ G_BEGIN_DECLS
|
||||
#define OSTREE_IS_SEPOLICY(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), OSTREE_TYPE_SEPOLICY))
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
GType ostree_sepolicy_get_type (void);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
OstreeSePolicy* ostree_sepolicy_new (GFile *path,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
GFile * ostree_sepolicy_get_path (OstreeSePolicy *self);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
const char *ostree_sepolicy_get_name (OstreeSePolicy *self);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_sepolicy_get_label (OstreeSePolicy *self,
|
||||
const char *relpath,
|
||||
guint32 unix_mode,
|
||||
@@ -53,6 +58,7 @@ typedef enum {
|
||||
OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING = (1 << 1)
|
||||
} OstreeSePolicyRestoreconFlags;
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_sepolicy_restorecon (OstreeSePolicy *self,
|
||||
const char *path,
|
||||
GFileInfo *info,
|
||||
@@ -62,11 +68,13 @@ gboolean ostree_sepolicy_restorecon (OstreeSePolicy *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
gboolean ostree_sepolicy_setfscreatecon (OstreeSePolicy *self,
|
||||
const char *path,
|
||||
guint32 mode,
|
||||
GError **error);
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
void ostree_sepolicy_fscreatecon_cleanup (void **unused);
|
||||
|
||||
#define ostree_cleanup_sepolicy_fscreatecon __attribute__ ((cleanup(ostree_sepolicy_fscreatecon_cleanup)))
|
||||
|
||||
Reference in new issue
Block a user