Skip to content

Commit

Permalink
Remove libxml2 from augeas headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Smjert committed Feb 23, 2024
1 parent de3a765 commit bf939e3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/cmake/source/augeas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)

function(augeasMain)
set(library_root "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(library_root "${OSQUERY_augeas_ROOT_DIR}")

if(PLATFORM_LINUX)
set(generated_include_headers_path
Expand Down
32 changes: 32 additions & 0 deletions libraries/cmake/source/augeas/patches/src/remove-libxml2-dep.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git a/src/augeas.h b/src/augeas.h
index 228a67ac..abc1b663 100644
--- a/src/augeas.h
+++ b/src/augeas.h
@@ -21,7 +21,6 @@
*/

#include <stdio.h>
-#include <libxml/tree.h>

#ifndef AUGEAS_H_
#define AUGEAS_H_
@@ -412,19 +411,6 @@ int aug_print(const augeas *aug, FILE *out, const char *path);
*/
int aug_source(const augeas *aug, const char *path, char **file_path);

-/* Function: aug_to_xml
- *
- * Turn the Augeas tree(s) matching PATH into an XML tree XMLDOC. The
- * parameter FLAGS is currently unused and must be set to 0.
- *
- * Returns:
- * 0 on success, or a negative value on failure
- *
- * In case of failure, *xmldoc is set to NULL
- */
-int aug_to_xml(const augeas *aug, const char *path, xmlNode **xmldoc,
- unsigned int flags);
-
/*
* Function: aug_transform
*
2 changes: 2 additions & 0 deletions libraries/cmake/source/modules/Findaugeas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ importSourceSubmodule(
NO_RECURSIVE

SHALLOW_SUBMODULES "src"

PATCH "src"
)

0 comments on commit bf939e3

Please sign in to comment.