[PATCH 2/2] Fedora spec - replace hard-wired paths with macros. Preserve attributes when copying files.
Shawn Wells
shawn at redhat.com
Thu Oct 3 01:41:29 UTC 2013
On 10/2/13 1:59 PM, Shawn Wells wrote:
> On 10/2/13 10:50 AM, Jan Lieskovsky wrote:
>> According to:
>> http://fedoraproject.org/wiki/Common_Rpmlint_issues
>>
>> hard-coded paths should be avoided in *.spec file:
>> https://fedoraproject.org/wiki/Packaging:RPMMacros?rd=Packaging/RPMMacros
>>
>> Also, while copying files file attributes should be preserved:
>> https://fedoraproject.org/wiki/Packaging:Guidelines#Timestamps
>>
>> Therefore fix both issues in Fedora's spec file.
>>
>> Thank you && Regards, Jan.
>> --
>> Jan iankko Lieskovsky / Red Hat Security Technologies Team
>>
>> 0002-Fedora-spec-replace-hard-wired-paths-with-macros.-Pr.patch
>>
>>
>> From 21df0dc9b8b3b1d303985a00b94f2baedf306d2b Mon Sep 17 00:00:00 2001
>> From: Jan Lieskovsky<jlieskov at redhat.com>
>> Date: Wed, 2 Oct 2013 16:03:02 +0200
>> Subject: [PATCH 2/2] Fedora spec - replace hard-wired paths with macros.
>> Preserve attributes when copying files.
>>
>>
>> Signed-off-by: Jan Lieskovsky<jlieskov at redhat.com>
>> ---
>> Fedora/scap-security-guide.spec | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/Fedora/scap-security-guide.spec b/Fedora/scap-security-guide.spec
>> index a323749..4ef3713 100644
>> --- a/Fedora/scap-security-guide.spec
>> +++ b/Fedora/scap-security-guide.spec
>> @@ -36,11 +36,10 @@ cd Fedora && make dist
>>
>> %install
>> rm -rf $RPM_BUILD_ROOT
>> -mkdir -p $RPM_BUILD_ROOT/usr/share/xml/scap/ssg/fedora/19
>> +mkdir -p $RPM_BUILD_ROOT%{_datadir}/xml/scap/ssg/fedora/19
>>
>> # Add in core content (SCAP, guide)
>> -cp -r Fedora/dist/* $RPM_BUILD_ROOT/usr/share/xml/scap/ssg/fedora/19
>> -
>> +cp -a Fedora/dist/* $RPM_BUILD_ROOT%{_datadir}/xml/scap/ssg/fedora/19
>>
>> %clean
>> rm -rf $RPM_BUILD_ROOT
>> @@ -48,11 +47,12 @@ rm -rf $RPM_BUILD_ROOT
>>
>> %files
>> %defattr(-,root,root,-)
>> -/usr/share/xml/scap/ssg/fedora/19/*
>> +%{_datadir}/xml/scap/ssg/fedora/19/*
>>
>> %changelog
>> * Wed Oct 02 2013 Jan iankko Lieskovsky<jlieskov at redhat.com> 0.1-2.rc1
>> - Set proper name of the build directory in the spec's %setup macro.
>> +- Replace hard-wired paths with macros. Preserve attributes when copying files.
>>
>> * Tue Sep 17 2013 Jan iankko Lieskovsky<jlieskov at redhat.com> 0.1-1
>> - Initial Fedora SSG RPM.
>> -- 1.7.11.7
>
> Ran `make fedora-rpm` and yum localinstall, everything (file perms,
> etc) check out. Ack!
Pushed this too:
$ git apply /tmp/j2.patch
[shawn at SSG-RHEL6 scap-security-guide]$ git commit
Fedora/scap-security-guide.spec
[master 37de67c] Fedora spec - replace hard-wired paths with macros.
Preserve attributes when copying files.
1 files changed, 4 insertions(+), 4 deletions(-)
[shawn at SSG-RHEL6 scap-security-guide]$ git push
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 621 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
To ssh://shawndwells@git.fedorahosted.org/git/scap-security-guide.git
af11d6a..37de67c master -> master
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/scap-security-guide/attachments/20131002/7f72485f/attachment.html>
More information about the scap-security-guide
mailing list