diff --git a/files_in_srpm.txt b/files_in_srpm.txt new file mode 100644 index 0000000000000000000000000000000000000000..c10206deb456e0f616bf880c55d7817c096cc96c --- /dev/null +++ b/files_in_srpm.txt @@ -0,0 +1,3 @@ +ocfs2-tools-1.8.5-format-fortify.patch +ocfs2-tools-1.8.8.tar.gz +ocfs2-tools.spec diff --git a/ocfs2-tools-1.8.5-format-fortify.patch b/ocfs2-tools-1.8.5-format-fortify.patch new file mode 100644 index 0000000000000000000000000000000000000000..59ce3bfd06fb4359777e7494b678e12d7dea6be2 --- /dev/null +++ b/ocfs2-tools-1.8.5-format-fortify.patch @@ -0,0 +1,15 @@ +From https://src.fedoraproject.org/rpms/ocfs2-tools/blob/rawhide/f/ocfs2-tools-1.8.5-format-fortify.patch + +diff --git a/tunefs.ocfs2/op_query.c b/tunefs.ocfs2/op_query.c +index 295c185b..40394d15 100644 +--- a/tunefs.ocfs2/op_query.c ++++ b/tunefs.ocfs2/op_query.c +@@ -339,7 +339,7 @@ static int query_run(struct tunefs_operation *op, ocfs2_filesys *fs, + register_printf_function('O', handle_ro_compat, handle_arginfo); + + query_fs = fs; +- fprintf(stdout, fmt); ++ fprintf(stdout, fmt, "dummy"); + query_fs = NULL; + + ocfs2_free(&fmt); diff --git a/ocfs2-tools-1.8.8.tar.gz b/ocfs2-tools-1.8.8.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d679315889057d9280ad47a2b1ca316200b7f3be Binary files /dev/null and b/ocfs2-tools-1.8.8.tar.gz differ diff --git a/ocfs2-tools.spec b/ocfs2-tools.spec new file mode 100644 index 0000000000000000000000000000000000000000..13f6386381465793dba5938c35d1db964adbc936 --- /dev/null +++ b/ocfs2-tools.spec @@ -0,0 +1,149 @@ +# Modified from https://src.fedoraproject.org/rpms/ocfs2-tools/blob/rawhide/f/ocfs2-tools.spec +# Because of deprecation of Python 2, ocfs2console is not packaged. + +Summary: Tools for managing the Oracle Cluster Filesystem 2 +Name: ocfs2-tools +Version: 1.8.8 +Release: 1 +# Automatically converted from old format: GPLv2 - review is highly recommended. +License: GPL-2.0-only +Source0: https://github.com/markfasheh/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz +# https://github.com/markfasheh/ocfs2-tools/issues/18#issuecomment-360449375 +Patch1: ocfs2-tools-1.8.5-format-fortify.patch +URL: https://github.com/markfasheh/ocfs2-tools +Requires: bash +Requires: coreutils +Requires: net-tools +Requires: util-linux +Requires: e2fsprogs +Requires: glib2 >= 2.2.3 +Provides: ocfs2-tools-pcmk = %{version} +Obsoletes: ocfs2-tools-pcmk < 1.6.3-1 + +BuildRequires: make +BuildRequires: gcc +BuildRequires: autoconf, automake +%{?systemd_requires} +BuildRequires: systemd +BuildRequires: libuuid-devel +BuildRequires: libcom_err-devel +BuildRequires: libblkid-devel +BuildRequires: glib2-devel >= 2.2.3 +BuildRequires: readline-devel +BuildRequires: pacemaker-libs-devel +BuildRequires: dlm-devel +BuildRequires: libaio-devel +BuildRequires: corosynclib-devel + +%description +Programs to manage the OCFS2 cluster file system, including mkfs.ocfs2, +tunefs.ocfs2 and fsck.ocfs2. + +OCFS2 is a general purpose extent based shared disk cluster file +system. It supports 64 bit inode numbers, and has automatically +extending metadata groups which may also make it attractive for +non-clustered use. OCFS2 leverages some well tested kernel +technologies, such as JBD - the same journaling subsystem in use by +ext3. + +%package devel +Summary: Headers and static archives for ocfs2-tools +Requires: e2fsprogs-devel +Requires: glib2-devel >= 2.2.3 +Requires: pkgconfig +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: %{name}-static%{?_isa} = %{version}-%{release} + +%description devel +ocfs2-tools-devel contains the libraries and header files needed to +develop OCFS2 filesystem-specific programs. + +%prep +%autosetup -p1 -n %{name}-%{name}-%{version} +# remove -Wno-format to prevent conflict with rpm optflags +sed -i -e 's/-Wno-format//g' {o2info,o2image,o2monitor}/Makefile + +%build +# update config.guess config.sub to support aarch64 and ppc64le +cp -fv /usr/lib/rpm/config.guess ./config.guess +cp -fv /usr/lib/rpm/config.sub ./config.sub +./autogen.sh +%{configure} \ + --enable-dynamic-fsck=yes + +# parallel build currently fails, so no %%{_smp_mflags} +CFLAGS="$(echo '%{optflags}')" make + +%install +%make_install + +mkdir -p %{buildroot}%{_sysconfdir}/ocfs2 +mkdir -p %{buildroot}%{_sysconfdir}/sysconfig +cp -p vendor/common/o2cb.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/o2cb +mkdir -p %{buildroot}%{_udevrulesdir} +cp -p vendor/common/51-ocfs2.rules %{buildroot}%{_udevrulesdir} + +# for systemd +mkdir -p %{buildroot}%{_sbindir} +cp -p vendor/common/{o2cb,ocfs2}.init %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_unitdir} +cp -p vendor/common/{o2cb,ocfs2}.service %{buildroot}%{_unitdir} +sed -i -e 's/network\.service/network-online.target/' %{buildroot}%{_unitdir}/o2cb.service + +chmod 644 %{buildroot}/%{_libdir}/*.a + +# Move files to the correct location +mv %{buildroot}/sbin/* %{buildroot}%{_sbindir} + +%post +%systemd_post {o2cb,ocfs2}.service + +%preun +%systemd_preun {o2cb,ocfs2}.service + +%postun +%systemd_postun {o2cb,ocfs2}.service + + +%files +%doc README.O2CB CREDITS MAINTAINERS +%doc documentation/users_guide.txt +%license COPYING +%{_bindir}/o2info +%{_sbindir}/o2cb +%{_sbindir}/o2cluster +%{_sbindir}/o2hbmonitor +%{_sbindir}/fsck.ocfs2 +%{_sbindir}/mkfs.ocfs2 +%{_sbindir}/mounted.ocfs2 +%{_sbindir}/tunefs.ocfs2 +%{_sbindir}/debugfs.ocfs2 +%{_sbindir}/defragfs.ocfs2 +%{_sbindir}/o2cb_ctl +%{_sbindir}/mount.ocfs2 +%{_sbindir}/ocfs2_hb_ctl +%{_sbindir}/o2image +%{_sbindir}/o2cb.init +%{_sbindir}/ocfs2.init +%{_unitdir}/o2cb.service +%{_unitdir}/ocfs2.service +%{_sysconfdir}/ocfs2 +%{_udevrulesdir}/51-ocfs2.rules +%config(noreplace) %{_sysconfdir}/sysconfig/o2cb +%{_mandir}/man*/* + +%files devel +%{_libdir}/*.a +%{_libdir}/pkgconfig/*.pc +%dir %{_includedir}/ocfs2-kernel +%dir %{_includedir}/o2cb +%dir %{_includedir}/o2dlm +%dir %{_includedir}/ocfs2 +%{_includedir}/ocfs2-kernel/* +%{_includedir}/o2cb/* +%{_includedir}/o2dlm/* +%{_includedir}/ocfs2/* + +%changelog +* Tue Dec 24 2024 Suyun - 1.8.8-1 +- Init package at 1.8.8 diff --git a/ocfs2-tools.src.rpm b/ocfs2-tools.src.rpm new file mode 100644 index 0000000000000000000000000000000000000000..d4ad7e0c9f565b83b6cb5e13e9154d75cf02b2a4 Binary files /dev/null and b/ocfs2-tools.src.rpm differ