Initial release

This commit is contained in:
Kairui Song 2020-03-15 19:10:43 +08:00
parent d3b86603c4
commit fcdc2d5b91
3 changed files with 68 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/memstrack-ee02de2.tar.gz

66
memstrack.spec Normal file
View File

@ -0,0 +1,66 @@
# vim: syntax=spec
%global gitcommit ee02de283fec5499639751deb6c0d7848fba986c
%global gitshortcommit %(c=%{gitcommit}; echo ${c:0:7})
%global snapshotdate 20200310
# keep dracutlibdir consistent with the definition in dracut.spec
%global dracutlibdir %{_prefix}/lib/dracut
%global dracutmoduledir %{dracutlibdir}/modules.d/99memstrack
Name: memstrack
Version: 0
Release: 1.%{snapshotdate}git%{gitshortcommit}%{?dist}
Summary: A memory allocation tracer, like a hot spot analyzer for memory allocation
License: GPLv3
URL: https://github.com/ryncsn/memstrack
VCS: git+git@github.com:ryncsn/memstrack.git
BuildRequires: gcc
BuildRequires: ncurses-devel
Source: https://github.com/ryncsn/memstrack/archive/%{gitcommit}/memstrack-%{gitshortcommit}.tar.gz
%description
A memory allocation tracer, like a hot spot analyzer for memory allocation
%package dracut
Summary: Debug hook for analyzing memory with memstract in dracut
Requires: %{name} = %{version}-%{release}
Requires: dracut
BuildArch: noarch
%description dracut
Debug hook for analyzing memory with memstract in dracut, help analyze
booting stage memory usage.
%prep
%setup -q -n memstrack-%{gitcommit}
%build
%{set_build_flags}
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}/%{_bindir}
install -p -m 755 memstrack %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{dracutmoduledir}
install -p -m 644 misc/99memstrack/memstrack.service %{buildroot}/%{dracutmoduledir}/memstrack.service
install -p -m 755 misc/99memstrack/module-setup.sh %{buildroot}/%{dracutmoduledir}/module-setup.sh
install -p -m 755 misc/99memstrack/start-tracing.sh %{buildroot}/%{dracutmoduledir}/start-tracing.sh
install -p -m 755 misc/99memstrack/stop-tracing.sh %{buildroot}/%{dracutmoduledir}/stop-tracing.sh
%files
%doc README.md
%license LICENSE
%{_bindir}/memstrack
%files dracut
%dir %{dracutmoduledir}
%{dracutmoduledir}/memstrack.service
%{dracutmoduledir}/module-setup.sh
%{dracutmoduledir}/start-tracing.sh
%{dracutmoduledir}/stop-tracing.sh
%changelog
* Sun Mar 15 2020 Kairui Song <ryncsn@gmail.com> - 0-1.20200310gitee02de2
- First release

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (memstrack-ee02de2.tar.gz) = a0d8086cbca571f3a63a242fb4b6d74c6c0645abf279bbcee9f39aaedb714bfc5e2b443aad3f7be75ed34426b4520e1a36d397ca064493bc4ea0916a1c3f7729