Re: restore binary mtime after debug package creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 27, 2012 at 6:04 AM, Alfred Landrum <alfred.landrum@xxxxxxxxxxxx> wrote:
Hi rpm folks - 

I'm using rpm 4.9 and redhat-rpm-config 9.0.3 on a scientific linux 6 based system.  I'm writing a spec file for a package that's used during development; it needs to contain both headers & a binary utility.  

When debug package creation runs at the end of %install, it strips the binary utility, causing an update to its mtime.  Since the headers are untouched, that means that the binary utility looks newer than the headers – which ends up throwing off some makefiles later on.
If you are only packaging binary file you probably don't want to create useless debuginfo package or strip anything. In this case could be useful to define in your spec these macros

# Don't try fancy stuff like debuginfo, which is useless on binary-only
    # packages. Don't strip binary too
    # Be sure buildpolicy set to do nothing
    %define        __spec_install_post %{nil}
    %define          debug_package %{nil}
    %define        __os_install_post %{_dbpath}/brp-compress

(i have written this some time ago stackoverflow.com/questions/880227/what-is-the-minimum-i-have-to-do-to-create-an-rpm-file )

If instead you want anyway the debuginfo and strip the binary but preserve timestamp define

%global __strip strip -p # in the spec
%__strip strip -p # in ~/.rpmmacros

hth


 

I'd like to have all the files have the same mtime, but unsure of how to make a "set all times" shell action that runs after everything else in __spec_install_post (including debug package creation).  Any suggestions?

Thanks - Al

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux