summaryrefslogtreecommitdiff
path: root/elements/core/shadow.bst
blob: 275f6ad3c3305f4697284505f2f2761a86597b9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
kind: autotools

depends:
- filename: gnu-toolchain.bst
  type: build
- filename: core/autoconf.bst
  type: build
- filename: core/automake.bst
  type: build
- filename: core/gettext-tarball.bst
  type: build
- filename: core/libtool.bst
  type: build
- filename: core/bison.bst
  type: build
- filename: core/attr.bst
  type: build
- filename: core/acl.bst
  type: build
- filename: core/linux-pam.bst
  type: build
- filename: core/libcap2.bst
  type: build

sources:
- kind: git
  url: upstream:shadow
  track: upstream/4.2.1
  ref: bfaa59229d61adb7fa0c570f0d94fd324c6e05aa

config:
  configure-commands:
  - autoreconf -vfi
  - |
    ./configure  --with-selinux=no \
                 --sysconfdir=/etc \
                 --with-libpam=yes \
                 --prefix="%{prefix}"
  install-commands:
    (>):
    - |
      for OPTION in FAIL_DELAY \
                    FAILLOG_ENAB \
                    LASTLOG_ENAB \
                    MAIL_CHECK_ENAB \
                    OBSCURE_CHECKS_ENAB \
                    PORTTIME_CHECKS_ENAB \
                    QUOTAS_ENAB \
                    CONSOLE MOTD_FILE \
                    FTMP_FILE \
                    NOLOGINS_FILE \
                    ENV_HZ \
                    PASS_MIN_LEN \
                    SU_WHEEL_ONLY \
                    CRACKLIB_DICTPATH \
                    PASS_CHANGE_TRIES \
                    PASS_ALWAYS_WARN \
                    CHFN_AUTH \
                    ENVIRON_FILE
      do
        sed -i -e "s/^${OPTION}.*/# & #This option is handled by PAM instead./" \
            "%{install-root}/etc/login.defs"
      done
    - |
      if grep -q '[\s#]ENCRYPT_METHOD' "%{install-root}/etc/login.defs"; then
          sed -i -e '/^[\s#]*ENCRYPT_METHOD /s/.*/ENCRYPT_METHOD SHA512/g' "%{install-root}/etc/login.defs"
      else
          echo 'ENCRYPT_METHOD SHA512' >>"%{install-root}/etc/login.defs"
      fi
    - sed -i -e 's/\(.*\)required\(.*pam_selinux.so.*\)/\1optional\2/' "%{install-root}"/etc/pam.d/*