Skip to content

Commit b4be6ec

Browse files
authored
Build xmlsec with bazel (#44796)
### What does this PR do? Migrate xmlsec build to bazel ### Motivation Migrating our builds to bazel ### Describe how you validated your changes Local build and checking against the list of currently installed files with the upstream build system. We do not install `xmlsec1` and `xmlsec1-config` anymore. The former isn't used by openscap, the latter is a build only tool I also manually compared the list of defined symbols against the libs built with the upstream build system to ensure we don't include too much/too little ### Additional Notes This will need to be verified with the CSPM test suite Co-authored-by: hugo.beauzee <hugo.beauzee@datadoghq.com>
1 parent 2ee9335 commit b4be6ec

File tree

5 files changed

+417
-27
lines changed

5 files changed

+417
-27
lines changed

deps/repos.MODULE.bazel

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,3 +314,15 @@ http_archive(
314314
"license_file": "//deps:lua/license",
315315
},
316316
)
317+
318+
http_archive(
319+
name = "xmlsec",
320+
url = "https://github.com/lsh123/xmlsec/releases/download/1.3.7/xmlsec1-1.3.7.tar.gz",
321+
sha256 = "d82e93b69b8aa205a616b62917a269322bf63a3eaafb3775014e61752b2013ea",
322+
strip_prefix = "xmlsec1-1.3.7",
323+
files = {
324+
"BUILD.bazel": "//deps:xmlsec/xmlsec.BUILD.bazel",
325+
"config-linux-x86_64.h": "//deps:xmlsec/config-linux-x86_64.h",
326+
"config-linux-arm64.h": "//deps:xmlsec/config-linux-arm64.h",
327+
},
328+
)

deps/xmlsec/config-linux-arm64.h

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/* config.h. Generated from config.h.in by configure. */
2+
/* config.h.in. Generated from configure.ac by autoheader. */
3+
4+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
5+
*/
6+
#define HAVE_DIRENT_H 1
7+
8+
/* Define to 1 if you have the <dlfcn.h> header file. */
9+
#define HAVE_DLFCN_H 1
10+
11+
/* Define to 1 if you have the <inttypes.h> header file. */
12+
#define HAVE_INTTYPES_H 1
13+
14+
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
15+
/* #undef HAVE_NDIR_H */
16+
17+
/* Define to 1 if you have the <stdint.h> header file. */
18+
#define HAVE_STDINT_H 1
19+
20+
/* Define to 1 if you have the <stdio.h> header file. */
21+
#define HAVE_STDIO_H 1
22+
23+
/* Define to 1 if you have the <stdlib.h> header file. */
24+
#define HAVE_STDLIB_H 1
25+
26+
/* Define to 1 if you have the <strings.h> header file. */
27+
#define HAVE_STRINGS_H 1
28+
29+
/* Define to 1 if you have the <string.h> header file. */
30+
#define HAVE_STRING_H 1
31+
32+
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
33+
*/
34+
/* #undef HAVE_SYS_DIR_H */
35+
36+
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
37+
*/
38+
/* #undef HAVE_SYS_NDIR_H */
39+
40+
/* Define to 1 if you have the <sys/stat.h> header file. */
41+
#define HAVE_SYS_STAT_H 1
42+
43+
/* Define to 1 if you have the <sys/types.h> header file. */
44+
#define HAVE_SYS_TYPES_H 1
45+
46+
/* Define to 1 if you have the <unistd.h> header file. */
47+
#define HAVE_UNISTD_H 1
48+
49+
/* Define to the sub-directory where libtool stores uninstalled libraries. */
50+
#define LT_OBJDIR ".libs/"
51+
52+
/* Name of package */
53+
#define PACKAGE "xmlsec1"
54+
55+
/* Define to the address where bug reports for this package should be sent. */
56+
#define PACKAGE_BUGREPORT "http://www.aleksey.com/xmlsec"
57+
58+
/* Define to the full name of this package. */
59+
#define PACKAGE_NAME "xmlsec1"
60+
61+
/* Define to the full name and version of this package. */
62+
#define PACKAGE_STRING "xmlsec1 1.3.7"
63+
64+
/* Define to the one symbol short name of this package. */
65+
#define PACKAGE_TARNAME "xmlsec1"
66+
67+
/* Define to the home page for this package. */
68+
#define PACKAGE_URL ""
69+
70+
/* Define to the version of this package. */
71+
#define PACKAGE_VERSION "1.3.7"
72+
73+
/* Define to 1 if all of the C90 standard headers exist (not just the ones
74+
required in a freestanding environment). This macro is provided for
75+
backward compatibility; new code need not use it. */
76+
#define STDC_HEADERS 1
77+
78+
/* Version number of package */
79+
#define VERSION "1.3.7"

deps/xmlsec/config-linux-x86_64.h

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/* config.h. Generated from config.h.in by configure. */
2+
/* config.h.in. Generated from configure.ac by autoheader. */
3+
4+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
5+
*/
6+
#define HAVE_DIRENT_H 1
7+
8+
/* Define to 1 if you have the <dlfcn.h> header file. */
9+
#define HAVE_DLFCN_H 1
10+
11+
/* Define to 1 if you have the <inttypes.h> header file. */
12+
#define HAVE_INTTYPES_H 1
13+
14+
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
15+
/* #undef HAVE_NDIR_H */
16+
17+
/* Define to 1 if you have the <stdint.h> header file. */
18+
#define HAVE_STDINT_H 1
19+
20+
/* Define to 1 if you have the <stdio.h> header file. */
21+
#define HAVE_STDIO_H 1
22+
23+
/* Define to 1 if you have the <stdlib.h> header file. */
24+
#define HAVE_STDLIB_H 1
25+
26+
/* Define to 1 if you have the <strings.h> header file. */
27+
#define HAVE_STRINGS_H 1
28+
29+
/* Define to 1 if you have the <string.h> header file. */
30+
#define HAVE_STRING_H 1
31+
32+
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
33+
*/
34+
/* #undef HAVE_SYS_DIR_H */
35+
36+
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
37+
*/
38+
/* #undef HAVE_SYS_NDIR_H */
39+
40+
/* Define to 1 if you have the <sys/stat.h> header file. */
41+
#define HAVE_SYS_STAT_H 1
42+
43+
/* Define to 1 if you have the <sys/types.h> header file. */
44+
#define HAVE_SYS_TYPES_H 1
45+
46+
/* Define to 1 if you have the <unistd.h> header file. */
47+
#define HAVE_UNISTD_H 1
48+
49+
/* Define to the sub-directory where libtool stores uninstalled libraries. */
50+
#define LT_OBJDIR ".libs/"
51+
52+
/* Name of package */
53+
#define PACKAGE "xmlsec1"
54+
55+
/* Define to the address where bug reports for this package should be sent. */
56+
#define PACKAGE_BUGREPORT "http://www.aleksey.com/xmlsec"
57+
58+
/* Define to the full name of this package. */
59+
#define PACKAGE_NAME "xmlsec1"
60+
61+
/* Define to the full name and version of this package. */
62+
#define PACKAGE_STRING "xmlsec1 1.3.7"
63+
64+
/* Define to the one symbol short name of this package. */
65+
#define PACKAGE_TARNAME "xmlsec1"
66+
67+
/* Define to the home page for this package. */
68+
#define PACKAGE_URL ""
69+
70+
/* Define to the version of this package. */
71+
#define PACKAGE_VERSION "1.3.7"
72+
73+
/* Define to 1 if all of the C90 standard headers exist (not just the ones
74+
required in a freestanding environment). This macro is provided for
75+
backward compatibility; new code need not use it. */
76+
#define STDC_HEADERS 1
77+
78+
/* Version number of package */
79+
#define VERSION "1.3.7"

0 commit comments

Comments
 (0)