Skip to content

Commit

Permalink
Merge pull request #1529 from bcressey/open-vm-tools
Browse files Browse the repository at this point in the history
add open-vm-tools and dependencies
  • Loading branch information
bcressey authored May 3, 2021
2 parents ab5b94f + bbcc6b6 commit 3ee53ce
Show file tree
Hide file tree
Showing 27 changed files with 502 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ BUILDSYS_NAME = "bottlerocket"
# "Bottlerocket Remix by ${CORP}" or "${CORP}'s Bottlerocket Remix"
BUILDSYS_PRETTY_NAME = "Bottlerocket OS"
# SDK version used for building
BUILDSYS_SDK_VERSION="v0.20.0"
BUILDSYS_SDK_VERSION="v0.21.0"
# Site for fetching the SDK
BUILDSYS_REGISTRY="public.ecr.aws/bottlerocket"

Expand Down
1 change: 1 addition & 0 deletions packages/libdbus/libdbus.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Requires: %{name}
--disable-ducktype-docs \
--disable-tests \
--disable-xml-docs \
--disable-selinux \
--disable-systemd \
--with-xml=expat \

Expand Down
16 changes: 16 additions & 0 deletions packages/libffi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "libffi"
version = "0.1.0"
edition = "2018"
publish = false
build = "build.rs"

[lib]
path = "pkg.rs"

[[package.metadata.build-package.external-files]]
url = "https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz"
sha512 = "61513801a156f11420f541d325de697131846487122d6bdcf5491b18b4da788589f5c0bb07e88e396495d3be5830d74e9135595e2b8ddbfe95c448d8597fbd6f"

[build-dependencies]
glibc = { path = "../glibc" }
9 changes: 9 additions & 0 deletions packages/libffi/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use std::process::{exit, Command};

fn main() -> Result<(), std::io::Error> {
let ret = Command::new("buildsys").arg("build-package").status()?;
if !ret.success() {
exit(1);
}
Ok(())
}
46 changes: 46 additions & 0 deletions packages/libffi/libffi.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Name: %{_cross_os}libffi
Version: 3.3
Release: 1%{?dist}
Summary: Library for FFI
License: MIT
URL: https://sourceware.org/libffi/
Source0: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz
BuildRequires: %{_cross_os}glibc-devel

%description
%{summary}.

%package devel
Summary: Files for development using the library for FFI
Requires: %{name}

%description devel
%{summary}.

%prep
%autosetup -n libffi-%{version} -p1

%build
%cross_configure \
--disable-docs \
--disable-multi-os-directory \

%make_build

%install
%make_install

%files
%license LICENSE
%{_cross_attribution_file}
%{_cross_libdir}/*.so.*
%exclude %{_cross_mandir}

%files devel
%{_cross_libdir}/*.a
%{_cross_libdir}/*.so
%{_cross_includedir}/*.h
%{_cross_pkgconfigdir}/*.pc
%exclude %{_cross_libdir}/*.la

%changelog
1 change: 1 addition & 0 deletions packages/libffi/pkg.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// not used
21 changes: 21 additions & 0 deletions packages/libglib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "libglib"
version = "0.1.0"
edition = "2018"
publish = false
build = "build.rs"

[lib]
path = "pkg.rs"

[[package.metadata.build-package.external-files]]
url = "https://download.gnome.org/sources/glib/2.68/glib-2.68.1.tar.xz"
sha512 = "f705cda6f1b4b0acc5fe8d21b60994ca0ec6de39c6722f4f01cbe0ece30eacb7271d3cb29067e638e0204a3cefa2df1e535f273b72330455e185b544cebc2ab0"

[build-dependencies]
glibc = { path = "../glibc" }
libffi = { path = "../libffi" }
libpcre = { path = "../libpcre" }
libselinux = { path = "../libselinux" }
libz = { path = "../libz" }
util-linux = { path = "../util-linux" }
9 changes: 9 additions & 0 deletions packages/libglib/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use std::process::{exit, Command};

fn main() -> Result<(), std::io::Error> {
let ret = Command::new("buildsys").arg("build-package").status()?;
if !ret.success() {
exit(1);
}
Ok(())
}
70 changes: 70 additions & 0 deletions packages/libglib/libglib.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Name: %{_cross_os}libglib
Version: 2.68.1
Release: 1%{?dist}
Summary: The GLib libraries
License: LGPL-2.1-or-later
URL: https://www.gtk.org/
Source0: https://download.gnome.org/sources/glib/2.68/glib-%{version}.tar.xz
BuildRequires: meson
BuildRequires: %{_cross_os}glibc-devel
BuildRequires: %{_cross_os}libffi-devel
BuildRequires: %{_cross_os}libmount-devel
BuildRequires: %{_cross_os}libpcre-devel
BuildRequires: %{_cross_os}libselinux-devel
BuildRequires: %{_cross_os}libz-devel
Requires: %{_cross_os}libffi
Requires: %{_cross_os}libmount
Requires: %{_cross_os}libpcre
Requires: %{_cross_os}libselinux
Requires: %{_cross_os}libz

%description
%{summary}.

%package devel
Summary: Files for development using the GLib libraries
Requires: %{name}
Requires: %{_cross_os}libffi-devel

%description devel
%{summary}.

%prep
%autosetup -n glib-%{version} -p1

%build
CONFIGURE_OPTS=(
-Dlibmount=enabled
-Dselinux=enabled

-Dlibelf=disabled
-Dnls=disabled

-Dman=false
-Dtests=false
)

%cross_meson "${CONFIGURE_OPTS[@]}"
%cross_meson_build

%install
%cross_meson_install

%files
%{_cross_attribution_file}
%{_cross_libdir}/*.so.*
%exclude %{_cross_datadir}

%files devel
%{_cross_bindir}/*
%{_cross_libdir}/*.so
%dir %{_cross_libdir}/glib-2.0
%dir %{_cross_libdir}/glib-2.0/include
%{_cross_libdir}/glib-2.0/include/glibconfig.h
%dir %{_cross_includedir}/gio-unix-2.0
%dir %{_cross_includedir}/glib-2.0
%{_cross_includedir}/gio-unix-2.0/*
%{_cross_includedir}/glib-2.0/*
%{_cross_pkgconfigdir}/*.pc

%changelog
1 change: 1 addition & 0 deletions packages/libglib/pkg.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// not used
16 changes: 16 additions & 0 deletions packages/libtirpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "libtirpc"
version = "0.1.0"
edition = "2018"
publish = false
build = "build.rs"

[lib]
path = "pkg.rs"

[[package.metadata.build-package.external-files]]
url = "https://downloads.sourceforge.net/libtirpc/libtirpc-1.3.1.tar.bz2"
sha512 = "131f746800ac7280cc3900597018fc8dbc8da50c14e29dbaccf36a6d110eded117351108c6b069eaac90d77cfec17014b08e9afddcf153fda2d780ba64260cbc"

[build-dependencies]
glibc = { path = "../glibc" }
9 changes: 9 additions & 0 deletions packages/libtirpc/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use std::process::{exit, Command};

fn main() -> Result<(), std::io::Error> {
let ret = Command::new("buildsys").arg("build-package").status()?;
if !ret.success() {
exit(1);
}
Ok(())
}
49 changes: 49 additions & 0 deletions packages/libtirpc/libtirpc.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Name: %{_cross_os}libtirpc
Version: 1.3.1
Release: 1%{?dist}
Summary: Library for RPC
License: BSD-3-Clause
URL: http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary
Source0: http://downloads.sourceforge.net/libtirpc/libtirpc-%{version}.tar.bz2
BuildRequires: %{_cross_os}glibc-devel

%description
%{summary}.

%package devel
Summary: Files for development using the library for RPC
Requires: %{name}

%description devel
%{summary}.

%prep
%autosetup -n libtirpc-%{version} -p1

%build
%cross_configure \
--enable-static \
--disable-authdes \
--disable-gssapi \

%make_build

%install
%make_install

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_libdir}/*.so.*
%exclude %{_cross_mandir}
%exclude %{_cross_sysconfdir}

%files devel
%{_cross_libdir}/*.a
%{_cross_libdir}/*.so
%dir %{_cross_includedir}/tirpc
%{_cross_includedir}/tirpc/*
%{_cross_pkgconfigdir}/*.pc
%exclude %{_cross_libdir}/*.la

%changelog
1 change: 1 addition & 0 deletions packages/libtirpc/pkg.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// not used
18 changes: 18 additions & 0 deletions packages/open-vm-tools/0001-no_cflags_werror.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
configure.ac: disable -Werror

Disable the mandatory flag -Werror in configure.ac.

Signed-off-by: Karoly Kasza <[email protected]>

--- open-vm-tools/configure.ac 2015-06-17 10:02:00.000000000 +0200
+++ open-vm-tools/configure.ac 2015-06-17 10:02:00.000000000 +0200
@@ -935,7 +935,7 @@

### General flags / actions
CFLAGS="$CFLAGS -Wall"
-CFLAGS="$CFLAGS -Werror"
+# CFLAGS="$CFLAGS -Werror"

# -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
# in Xlib.h on OpenSolaris.

21 changes: 21 additions & 0 deletions packages/open-vm-tools/0002-dont-force-cppflags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
m4: do not force -I/usr/include in CPPFLAGS

This is so horribly broken for cross-compilation. :-(

Signed-off-by: "Yann E. MORIN" <[email protected]>

--- open-vm-tools/m4/vmtools.m4 2015-06-17 10:03:00.000000000 +0200
+++ open-vm-tools/m4/vmtools.m4 2015-06-17 10:03:00.000000000 +0200
@@ -281,10 +281,10 @@
if test "$os" = freebsd; then
CUSTOM_$1_CPPFLAGS="-I/usr/local/include"
else
- CUSTOM_$1_CPPFLAGS="-I/usr/include"
+ CUSTOM_$1_CPPFLAGS=" "
fi
if test -n "$2"; then
- CUSTOM_$1_CPPFLAGS="${CUSTOM_$1_CPPFLAGS}/$2"
+ : CUSTOM_$1_CPPFLAGS="${CUSTOM_$1_CPPFLAGS}/$2"
fi
fi
])
19 changes: 19 additions & 0 deletions packages/open-vm-tools/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "open-vm-tools"
version = "0.1.0"
edition = "2018"
publish = false
build = "build.rs"

[lib]
path = "pkg.rs"

[[package.metadata.build-package.external-files]]
url = "https://github.com/vmware/open-vm-tools/releases/download/stable-11.2.5/open-vm-tools-11.2.5-17337674.tar.gz"
sha512 = "b6d4bc6522418ec7a881752181ad9240e535854df492e758abf3996c6afe245466ffbff60cc1b6cdff5cf731b5769c9f9cb96aed29f0b788d0eef05f91fcf8ab"

[build-dependencies]
glibc = { path = "../glibc" }
libglib = { path = "../libglib" }
libtirpc = { path = "../libtirpc" }
libxcrypt = { path = "../libxcrypt" }
9 changes: 9 additions & 0 deletions packages/open-vm-tools/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use std::process::{exit, Command};

fn main() -> Result<(), std::io::Error> {
let ret = Command::new("buildsys").arg("build-package").status()?;
if !ret.success() {
exit(1);
}
Ok(())
}
1 change: 1 addition & 0 deletions packages/open-vm-tools/open-vm-tools-tmpfiles.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C /etc/vmware-tools/tools.conf - - - -
Loading

0 comments on commit 3ee53ce

Please sign in to comment.