diff --git a/packages/Cargo.lock b/packages/Cargo.lock index f06fd9b8569..a16fe328364 100644 --- a/packages/Cargo.lock +++ b/packages/Cargo.lock @@ -126,6 +126,14 @@ dependencies = [ "glibc", ] +[[package]] +name = "e2fsprogs" +version = "0.1.0" +dependencies = [ + "glibc", + "util-linux", +] + [[package]] name = "ecs-agent" version = "0.1.0" diff --git a/packages/Cargo.toml b/packages/Cargo.toml index b3b5ef3fe47..4ca712e4254 100644 --- a/packages/Cargo.toml +++ b/packages/Cargo.toml @@ -15,6 +15,7 @@ members = [ "docker-engine", "docker-init", "docker-proxy", + "e2fsprogs", "ecs-agent", "filesystem", "findutils", diff --git a/packages/e2fsprogs/Cargo.toml b/packages/e2fsprogs/Cargo.toml new file mode 100644 index 00000000000..efd4ba45416 --- /dev/null +++ b/packages/e2fsprogs/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "e2fsprogs" +version = "0.1.0" +edition = "2018" +publish = false +build = "build.rs" + +[lib] +path = "pkg.rs" + +[[package.metadata.build-package.external-files]] +url = "https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.45.6/e2fsprogs-1.45.6.tar.xz" +sha512 = "f3abfb6fe7ef632bb81152e2127d601cadd3fa93162178576a1d5ed82c2286627184b207b85a5b2a1793db0addf0885dfc3b9523bb340443224caf9c6d613b84" + +[build-dependencies] +glibc = { path = "../glibc" } +util-linux = { path = "../util-linux" } diff --git a/packages/e2fsprogs/build.rs b/packages/e2fsprogs/build.rs new file mode 100644 index 00000000000..cad8999af53 --- /dev/null +++ b/packages/e2fsprogs/build.rs @@ -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(()) +} diff --git a/packages/e2fsprogs/e2fsprogs-tmpfiles.conf b/packages/e2fsprogs/e2fsprogs-tmpfiles.conf new file mode 100644 index 00000000000..4032b5b2398 --- /dev/null +++ b/packages/e2fsprogs/e2fsprogs-tmpfiles.conf @@ -0,0 +1 @@ +C /etc/mke2fs.conf - - - - diff --git a/packages/e2fsprogs/e2fsprogs.spec b/packages/e2fsprogs/e2fsprogs.spec new file mode 100644 index 00000000000..0c0df4d3726 --- /dev/null +++ b/packages/e2fsprogs/e2fsprogs.spec @@ -0,0 +1,125 @@ +Name: %{_cross_os}e2fsprogs +Version: 1.45.6 +Release: 1%{?dist} +Summary: Tools for managing ext2, ext3, and ext4 file systems +License: GPL-2.0-only AND LGPL-2.0-only AND LGPL-2.0-or-later AND BSD-3-Clause +URL: http://e2fsprogs.sourceforge.net/ +Source0: https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/%{version}/e2fsprogs-%{version}.tar.xz +Source10: mke2fs.conf +Source11: e2fsprogs-tmpfiles.conf + +BuildRequires: %{_cross_os}glibc-devel +BuildRequires: %{_cross_os}libuuid-devel +BuildRequires: %{_cross_os}libblkid-devel +Requires: %{_cross_os}e2fsprogs-libs + +%description +%{summary}. + +%package libs +Summary: Libraries for ext2, ext3, and ext4 file systems + +%description libs +%{summary}. + +%package devel +Summary: Files for development using the libraries for ext2, ext3, and ext4 file systems +Requires: %{_cross_os}e2fsprogs-libs + +%description devel +%{summary}. + +%prep +%autosetup -n e2fsprogs-%{version} -p1 + +%build +%cross_configure \ + CFLAGS="${CFLAGS} -fno-strict-aliasing" \ + --enable-elf-shlibs \ + --enable-symlink-install \ + --enable-relative-symlinks \ + --disable-backtrace \ + --disable-debugfs \ + --disable-defrag \ + --disable-e2initrd-helper \ + --disable-fsck \ + --disable-fuse2fs \ + --disable-imager \ + --disable-libblkid \ + --disable-libuuid \ + --disable-nls \ + --disable-resizer \ + --disable-rpath \ + --disable-tdb \ + --disable-uuidd \ + --with-crond-dir=no \ + --with-systemd-unit-dir=no \ + --with-udev-rules-dir=no \ + +%make_build + +%install +%make_install install-libs \ + root_sbindir=%{_cross_sbindir} \ + root_libdir=%{_cross_libdir} + +chmod 644 %{buildroot}%{_cross_libdir}/*.a + +install -d %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir} +install -p -m 0644 %{S:10} %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir} + +install -d %{buildroot}%{_cross_tmpfilesdir} +install -p -m 0644 %{S:11} %{buildroot}%{_cross_tmpfilesdir}/e2fsprogs.conf + +%files +%license debian/copyright +%{_cross_attribution_file} +%{_cross_sbindir}/badblocks +%{_cross_sbindir}/dumpe2fs +%{_cross_sbindir}/e2fsck +%{_cross_sbindir}/fsck.ext2 +%{_cross_sbindir}/fsck.ext3 +%{_cross_sbindir}/fsck.ext4 +%{_cross_sbindir}/mke2fs +%{_cross_sbindir}/mkfs.ext2 +%{_cross_sbindir}/mkfs.ext3 +%{_cross_sbindir}/mkfs.ext4 +%{_cross_sbindir}/tune2fs +%{_cross_factorydir}%{_cross_sysconfdir}/mke2fs.conf +%{_cross_tmpfilesdir}/e2fsprogs.conf + +%exclude %{_cross_sbindir}/e2freefrag +%exclude %{_cross_sbindir}/e2label +%exclude %{_cross_sbindir}/e2mmpstatus +%exclude %{_cross_sbindir}/e2scrub +%exclude %{_cross_sbindir}/e2scrub_all +%exclude %{_cross_sbindir}/e2undo +%exclude %{_cross_sbindir}/e4crypt +%exclude %{_cross_sbindir}/filefrag +%exclude %{_cross_sbindir}/logsave +%exclude %{_cross_sbindir}/mklost+found + +%exclude %{_cross_bindir} +%exclude %{_cross_mandir} +%exclude %{_cross_sysconfdir} +%exclude %{_cross_datadir}/et +%exclude %{_cross_datadir}/ss + +%files libs +%{_cross_libdir}/*.so.* + +%files devel +%{_cross_libdir}/*.a +%{_cross_libdir}/*.so +%{_cross_includedir}/*.h +%dir %{_cross_includedir}/e2p +%dir %{_cross_includedir}/et +%dir %{_cross_includedir}/ext2fs +%dir %{_cross_includedir}/ss +%{_cross_includedir}/e2p/*.h +%{_cross_includedir}/et/*.h +%{_cross_includedir}/ext2fs/*.h +%{_cross_includedir}/ss/*.h +%{_cross_pkgconfigdir}/*.pc + +%changelog diff --git a/packages/e2fsprogs/mke2fs.conf b/packages/e2fsprogs/mke2fs.conf new file mode 100644 index 00000000000..4363ee8934a --- /dev/null +++ b/packages/e2fsprogs/mke2fs.conf @@ -0,0 +1,50 @@ +# Note: new features must be added with care, as they may not be compatible +# with the running kernel after a downgrade. + +[defaults] + base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr + default_mntopts = acl,user_xattr + enable_periodic_fsck = 0 + blocksize = 4096 + inode_size = 256 + inode_ratio = 16384 + +[fs_types] + ext3 = { + features = has_journal + } + ext4 = { + features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize + inode_size = 256 + } + small = { + blocksize = 1024 + inode_size = 128 + inode_ratio = 4096 + } + floppy = { + blocksize = 1024 + inode_size = 128 + inode_ratio = 8192 + } + big = { + inode_ratio = 32768 + } + huge = { + inode_ratio = 65536 + } + news = { + inode_ratio = 4096 + } + largefile = { + inode_ratio = 1048576 + blocksize = -1 + } + largefile4 = { + inode_ratio = 4194304 + blocksize = -1 + } + hurd = { + blocksize = 4096 + inode_size = 128 + } diff --git a/packages/e2fsprogs/pkg.rs b/packages/e2fsprogs/pkg.rs new file mode 100644 index 00000000000..d799fb2d44c --- /dev/null +++ b/packages/e2fsprogs/pkg.rs @@ -0,0 +1 @@ +// not used diff --git a/packages/libdbus/libdbus.spec b/packages/libdbus/libdbus.spec index 0ef28f44a06..f1f00c7316a 100644 --- a/packages/libdbus/libdbus.spec +++ b/packages/libdbus/libdbus.spec @@ -49,7 +49,9 @@ rm -rf %{buildroot}%{_cross_docdir}/dbus/examples %{_cross_attribution_file} %{_cross_libdir}/*.so.* %exclude %{_cross_bindir} -%exclude %{_cross_datadir} +%exclude %{_cross_datadir}/dbus-1 +%exclude %{_cross_datadir}/doc +%exclude %{_cross_datadir}/xml %exclude %{_cross_libexecdir} %exclude %{_cross_sysconfdir} @@ -57,9 +59,9 @@ rm -rf %{buildroot}%{_cross_docdir}/dbus/examples %{_cross_libdir}/*.a %{_cross_libdir}/*.so %dir %{_cross_libdir}/dbus-1.0 -%{_cross_libdir}/dbus-1.0 +%{_cross_libdir}/dbus-1.0/* %dir %{_cross_includedir}/dbus-1.0 -%{_cross_includedir}/dbus-1.0 +%{_cross_includedir}/dbus-1.0/* %{_cross_pkgconfigdir}/*.pc %exclude %{_cross_libdir}/*.la %exclude %{_cross_libdir}/cmake diff --git a/packages/release/release.spec b/packages/release/release.spec index 08d07009574..5366b553962 100644 --- a/packages/release/release.spec +++ b/packages/release/release.spec @@ -33,6 +33,7 @@ Requires: %{_cross_os}ca-certificates Requires: %{_cross_os}chrony Requires: %{_cross_os}coreutils Requires: %{_cross_os}dbus-broker +Requires: %{_cross_os}e2fsprogs Requires: %{_cross_os}libgcc Requires: %{_cross_os}libstd-rust Requires: %{_cross_os}filesystem