From: Colin Walters Date: Thu, 2 Jun 2022 21:13:17 +0000 (-0400) Subject: Rename ostree-cmdprivate to drop out of introspection X-Git-Tag: archive/raspbian/2022.4-1+rpi1^2~9^2^2~3^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=32ee82133bba68e7d57f65dc5f896c4c1363cdf1;p=ostree.git Rename ostree-cmdprivate to drop out of introspection I was looking at our `.gir` and noticed we had the cmdprivate bits because the pattern for excluding headers is `-private.h`, which didn't match `cmdprivate.h`. --- diff --git a/Makefile-libostree.am b/Makefile-libostree.am index af89ce9a..c5c1fb1e 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -53,8 +53,8 @@ CLEANFILES += $(BUILT_SOURCES) libostree_1_la_SOURCES = \ src/libostree/ostree-async-progress.c \ - src/libostree/ostree-cmdprivate.h \ - src/libostree/ostree-cmdprivate.c \ + src/libostree/ostree-cmd-private.h \ + src/libostree/ostree-cmd-private.c \ src/libostree/ostree-core-private.h \ src/libostree/ostree-core.c \ src/libostree/ostree-date-utils.c \ diff --git a/apidoc/Makefile.am b/apidoc/Makefile.am index 7b824d5a..80039d1b 100644 --- a/apidoc/Makefile.am +++ b/apidoc/Makefile.am @@ -71,7 +71,7 @@ IGNORE_HFILES= \ ostree-bootloader-grub2.h \ ostree-bootloader-syslinux.h \ ostree-bootloader-uboot.h \ - ostree-cmdprivate.h \ + ostree-cmd-private.h \ ostree-core-private.h \ ostree-fetcher.h \ ostree-gpg-verifier.h \ diff --git a/src/libostree/ostree-cmd-private.c b/src/libostree/ostree-cmd-private.c new file mode 100644 index 00000000..ad820fde --- /dev/null +++ b/src/libostree/ostree-cmd-private.c @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2014 Colin Walters + * + * SPDX-License-Identifier: LGPL-2.0+ + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + */ + +#include "config.h" + +#include "ostree-cmd-private.h" +#include "ostree-repo-private.h" +#include "ostree-core-private.h" +#include "ostree-repo-static-delta-private.h" +#include "ostree-sysroot-private.h" +#include "ostree-bootloader-grub2.h" + +#include "otutil.h" + +static gboolean +impl_ostree_generate_grub2_config (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error) +{ + return _ostree_bootloader_grub2_generate_config (sysroot, bootversion, target_fd, cancellable, error); +} + +/** + * ostree_cmdprivate: (skip) + * + * Do not call this function; it is used to share private API between + * the OSTree commandline and the library. + */ +const OstreeCmdPrivateVTable * +ostree_cmd__private__ (void) +{ + static OstreeCmdPrivateVTable table = { + _ostree_impl_system_generator, + impl_ostree_generate_grub2_config, + _ostree_repo_static_delta_dump, + _ostree_repo_static_delta_query_exists, + _ostree_repo_static_delta_delete, + _ostree_repo_verify_bindings, + _ostree_sysroot_finalize_staged, + _ostree_sysroot_boot_complete, + }; + + return &table; +} diff --git a/src/libostree/ostree-cmd-private.h b/src/libostree/ostree-cmd-private.h new file mode 100644 index 00000000..17f943c8 --- /dev/null +++ b/src/libostree/ostree-cmd-private.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2014 Colin Walters + * + * SPDX-License-Identifier: LGPL-2.0+ + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + */ + +#pragma once + +#include "ostree-types.h" + +G_BEGIN_DECLS + +gboolean _ostree_impl_system_generator (const char *ostree_cmdline, const char *normal_dir, const char *early_dir, const char *late_dir, GError **error); + +typedef struct { + gboolean (* ostree_system_generator) (const char *ostree_cmdline, const char *normal_dir, const char *early_dir, const char *late_dir, GError **error); + gboolean (* ostree_generate_grub2_config) (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error); + gboolean (* ostree_static_delta_dump) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error); + gboolean (* ostree_static_delta_query_exists) (OstreeRepo *repo, const char *delta_id, gboolean *out_exists, GCancellable *cancellable, GError **error); + gboolean (* ostree_static_delta_delete) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error); + gboolean (* ostree_repo_verify_bindings) (const char *collection_id, const char *ref_name, GVariant *commit, GError **error); + gboolean (* ostree_finalize_staged) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error); + gboolean (* ostree_boot_complete) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error); +} OstreeCmdPrivateVTable; + +/* Note this not really "public", we just export the symbol, but not the header */ +_OSTREE_PUBLIC const OstreeCmdPrivateVTable * +ostree_cmd__private__ (void); + +G_END_DECLS diff --git a/src/libostree/ostree-cmdprivate.c b/src/libostree/ostree-cmdprivate.c deleted file mode 100644 index f6c114f4..00000000 --- a/src/libostree/ostree-cmdprivate.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2014 Colin Walters - * - * SPDX-License-Identifier: LGPL-2.0+ - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - */ - -#include "config.h" - -#include "ostree-cmdprivate.h" -#include "ostree-repo-private.h" -#include "ostree-core-private.h" -#include "ostree-repo-static-delta-private.h" -#include "ostree-sysroot-private.h" -#include "ostree-bootloader-grub2.h" - -#include "otutil.h" - -static gboolean -impl_ostree_generate_grub2_config (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error) -{ - return _ostree_bootloader_grub2_generate_config (sysroot, bootversion, target_fd, cancellable, error); -} - -/** - * ostree_cmdprivate: (skip) - * - * Do not call this function; it is used to share private API between - * the OSTree commandline and the library. - */ -const OstreeCmdPrivateVTable * -ostree_cmd__private__ (void) -{ - static OstreeCmdPrivateVTable table = { - _ostree_impl_system_generator, - impl_ostree_generate_grub2_config, - _ostree_repo_static_delta_dump, - _ostree_repo_static_delta_query_exists, - _ostree_repo_static_delta_delete, - _ostree_repo_verify_bindings, - _ostree_sysroot_finalize_staged, - _ostree_sysroot_boot_complete, - }; - - return &table; -} diff --git a/src/libostree/ostree-cmdprivate.h b/src/libostree/ostree-cmdprivate.h deleted file mode 100644 index 17f943c8..00000000 --- a/src/libostree/ostree-cmdprivate.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2014 Colin Walters - * - * SPDX-License-Identifier: LGPL-2.0+ - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - */ - -#pragma once - -#include "ostree-types.h" - -G_BEGIN_DECLS - -gboolean _ostree_impl_system_generator (const char *ostree_cmdline, const char *normal_dir, const char *early_dir, const char *late_dir, GError **error); - -typedef struct { - gboolean (* ostree_system_generator) (const char *ostree_cmdline, const char *normal_dir, const char *early_dir, const char *late_dir, GError **error); - gboolean (* ostree_generate_grub2_config) (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error); - gboolean (* ostree_static_delta_dump) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error); - gboolean (* ostree_static_delta_query_exists) (OstreeRepo *repo, const char *delta_id, gboolean *out_exists, GCancellable *cancellable, GError **error); - gboolean (* ostree_static_delta_delete) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error); - gboolean (* ostree_repo_verify_bindings) (const char *collection_id, const char *ref_name, GVariant *commit, GError **error); - gboolean (* ostree_finalize_staged) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error); - gboolean (* ostree_boot_complete) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error); -} OstreeCmdPrivateVTable; - -/* Note this not really "public", we just export the symbol, but not the header */ -_OSTREE_PUBLIC const OstreeCmdPrivateVTable * -ostree_cmd__private__ (void); - -G_END_DECLS diff --git a/src/libostree/ostree-impl-system-generator.c b/src/libostree/ostree-impl-system-generator.c index 92d71605..da4654b9 100644 --- a/src/libostree/ostree-impl-system-generator.c +++ b/src/libostree/ostree-impl-system-generator.c @@ -32,7 +32,7 @@ #include "ostree.h" #include "ostree-core-private.h" -#include "ostree-cmdprivate.h" +#include "ostree-cmd-private.h" #ifdef HAVE_LIBMOUNT typedef FILE OtLibMountFile; diff --git a/src/libostree/ostree-repo-static-delta-core.c b/src/libostree/ostree-repo-static-delta-core.c index 7e6611da..7854211f 100644 --- a/src/libostree/ostree-repo-static-delta-core.c +++ b/src/libostree/ostree-repo-static-delta-core.c @@ -25,7 +25,7 @@ #include "ostree-core-private.h" #include "ostree-repo-private.h" #include "ostree-lzma-decompressor.h" -#include "ostree-cmdprivate.h" +#include "ostree-cmd-private.h" #include "ostree-checksum-input-stream.h" #include "ostree-repo-static-delta-private.h" #include "otutil.h" diff --git a/src/ostree/ot-admin-builtin-boot-complete.c b/src/ostree/ot-admin-builtin-boot-complete.c index 6e1052f5..5d50c028 100644 --- a/src/ostree/ot-admin-builtin-boot-complete.c +++ b/src/ostree/ot-admin-builtin-boot-complete.c @@ -27,7 +27,7 @@ #include "ostree.h" #include "otutil.h" -#include "ostree-cmdprivate.h" +#include "ostree-cmd-private.h" static GOptionEntry options[] = { { NULL } diff --git a/src/ostree/ot-admin-builtin-finalize-staged.c b/src/ostree/ot-admin-builtin-finalize-staged.c index 17b6a625..eedffdde 100644 --- a/src/ostree/ot-admin-builtin-finalize-staged.c +++ b/src/ostree/ot-admin-builtin-finalize-staged.c @@ -29,7 +29,7 @@ #include "ostree.h" #include "otutil.h" -#include "ostree-cmdprivate.h" +#include "ostree-cmd-private.h" #include "ostree.h" static GOptionEntry options[] = { diff --git a/src/ostree/ot-admin-instutil-builtin-grub2-generate.c b/src/ostree/ot-admin-instutil-builtin-grub2-generate.c index af3fa671..d3598460 100644 --- a/src/ostree/ot-admin-instutil-builtin-grub2-generate.c +++ b/src/ostree/ot-admin-instutil-builtin-grub2-generate.c @@ -22,7 +22,7 @@ #include "ot-main.h" #include "ot-admin-instutil-builtins.h" -#include "ostree-cmdprivate.h" +#include "ostree-cmd-private.h" #include "otutil.h" diff --git a/src/ostree/ot-builtin-fsck.c b/src/ostree/ot-builtin-fsck.c index 042b157d..9e3f77ef 100644 --- a/src/ostree/ot-builtin-fsck.c +++ b/src/ostree/ot-builtin-fsck.c @@ -25,7 +25,7 @@ #include "ot-main.h" #include "ot-builtins.h" #include "ostree.h" -#include "ostree-cmdprivate.h" +#include "ostree-cmd-private.h" #include "otutil.h" static gboolean opt_quiet; diff --git a/src/ostree/ot-builtin-static-delta.c b/src/ostree/ot-builtin-static-delta.c index 99faf861..a5483c17 100644 --- a/src/ostree/ot-builtin-static-delta.c +++ b/src/ostree/ot-builtin-static-delta.c @@ -22,7 +22,7 @@ #include "ot-main.h" #include "ot-builtins.h" #include "ostree.h" -#include "ostree-cmdprivate.h" +#include "ostree-cmd-private.h" #include "ot-main.h" #include "otutil.h" diff --git a/src/switchroot/ostree-system-generator.c b/src/switchroot/ostree-system-generator.c index 4b42176f..bd0901bc 100644 --- a/src/switchroot/ostree-system-generator.c +++ b/src/switchroot/ostree-system-generator.c @@ -27,7 +27,7 @@ #include -#include "ostree-cmdprivate.h" +#include "ostree-cmd-private.h" #include "ostree-mount-util.h" static const char *arg_dest = "/tmp";