Skip to content

Commit 119553c

Browse files
committed
[Fix] RPM: symlink-manifest missing from tarball; add as Source1
[Fix] pkg/rpm/maldet.spec: symlink-manifest excluded from git archive (pkg/ in .gitattributes export-ignore); reference as Source1 instead of relative path [Fix] pkg/docker/Dockerfile.rpm-el7, Dockerfile.rpm-el9: copy symlink-manifest to rpmbuild SOURCES alongside tarball [Fix] pkg/Makefile: native rpm target copies symlink-manifest to SOURCES
1 parent fc3f2cb commit 119553c

4 files changed

Lines changed: 5 additions & 1 deletion

File tree

pkg/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ $(BUILDDIR)/$(TARBALL):
5757
rpm: $(BUILDDIR)/$(TARBALL)
5858
mkdir -p $(BUILDDIR)/rpmbuild/{SOURCES,SPECS,BUILD,RPMS,SRPMS}
5959
cp $(BUILDDIR)/$(TARBALL) $(BUILDDIR)/rpmbuild/SOURCES/
60+
cp $(CURDIR)/symlink-manifest $(BUILDDIR)/rpmbuild/SOURCES/
6061
cp $(CURDIR)/rpm/$(NAME).spec $(BUILDDIR)/rpmbuild/SPECS/
6162
rpmbuild -bb \
6263
--define "_topdir $(BUILDDIR)/rpmbuild" \

pkg/docker/Dockerfile.rpm-el7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ WORKDIR /src/maldet/pkg
2323
RUN make source && \
2424
mkdir -p /root/rpmbuild/{SOURCES,SPECS,BUILD,RPMS,SRPMS} && \
2525
cp build/maldet-*.tar.gz /root/rpmbuild/SOURCES/ && \
26+
cp symlink-manifest /root/rpmbuild/SOURCES/ && \
2627
cp rpm/maldet.spec /root/rpmbuild/SPECS/ && \
2728
rpmbuild -bb --define "dist .el7" /root/rpmbuild/SPECS/maldet.spec
2829

pkg/docker/Dockerfile.rpm-el9

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ WORKDIR /src/maldet/pkg
1818
RUN make source && \
1919
mkdir -p /root/rpmbuild/{SOURCES,SPECS,BUILD,RPMS,SRPMS} && \
2020
cp build/maldet-*.tar.gz /root/rpmbuild/SOURCES/ && \
21+
cp symlink-manifest /root/rpmbuild/SOURCES/ && \
2122
cp rpm/maldet.spec /root/rpmbuild/SPECS/ && \
2223
rpmbuild -bb --define "dist .el8" /root/rpmbuild/SPECS/maldet.spec && \
2324
rpmbuild -bb --define "dist .el9" /root/rpmbuild/SPECS/maldet.spec && \

pkg/rpm/maldet.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Summary: Linux Malware Detect — malware scanner for Linux
2828
License: GPLv2+
2929
URL: https://github.com/rfxn/linux-malware-detect
3030
Source0: %{name}-%{version}.tar.gz
31+
Source1: symlink-manifest
3132
BuildArch: noarch
3233

3334
Requires: bash >= 4.1
@@ -198,7 +199,7 @@ install -m 644 CHANGELOG %{buildroot}/usr/share/doc/maldet/CHANGELOG
198199
# COPYING.GPL handled by %license directive in %files — not installed here
199200

200201
# --- Symlink manifest for runtime verification ---
201-
install -m 640 pkg/symlink-manifest %{buildroot}/usr/lib/maldet/internals/.symlink-manifest
202+
install -m 640 %{SOURCE1} %{buildroot}/usr/lib/maldet/internals/.symlink-manifest
202203

203204
# --- Symlink farm: /usr/local/maldetect/ ---
204205
mkdir -p %{buildroot}/usr/local/maldetect/internals

0 commit comments

Comments
 (0)