teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

05bb38 Override systemd-user PAM config in %install and not %prep

Authored and Committed by Filipe Brandenburger 6 years ago
    Override systemd-user PAM config in %install and not %prep
    
    This makes it possible to build RPMs from a git tree using
    `rpmbuild --build-in-place --noprep` and have resulting RPMs
    that will preserve the override of the PAM config file.
    
    This needs to commit to HAVE_SELINUX being defined (since there
    is no longer an m4 step to make that stanza conditional), but
    that should be acceptable since the %build step calls Meson
    with -Dselinux=true.
    
    Tested:
    
    - Chdir into a checkout of github.com/systemd/systemd tree and run:
    
      $ rpmbuild -bb --build-in-place --noprep \
            --define "gitcommit $(git rev-parse HEAD)" \
            --define "_sourcedir $HOME/fedorarpms/systemd" \
            ~/fedorarpms/systemd/systemd.spec
    
    - Inspect the contents of systemd-user in the generated RPM package:
    
      $ rpm2cpio ~/rpmbuild/RPMS/x86_64/systemd-239-3.git99352de.fc29.x86_64.rpm \
            | cpio -i --to-stdout --quiet ./etc/pam.d/systemd-user
      ...
      account  include system-auth
      ...
      session  include system-auth
    
        
systemd-user systemd-user.m4
file renamed
file modified
+7 -4