source: projects/specs/trunk/lib/libx/libxcrypt/libxcrypt-vl.spec @ 12525

Revision 12525, 19.6 KB checked in by tomop, 3 years ago (diff)

updated 10 packages

binutils-2.36.1-1

elfutils-0.183-1

gcc-10.2.1-1

gdb-10.1-1

glibc-2.33-1

isl-0.23-1

libtirpc-1.3.1-1

libtool-2.4.6-7

libxcrypt-4.4.17-1

valgrind-3.16.1-2

Line 
1%bcond_with fipstest
2%if 0%{?__isa_bits} == 64
3%bcond_without check
4%else
5%bcond_with check
6%endif
7
8%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
9
10# Build with new api?
11%bcond_without new_api
12
13# Build the compat package?
14%bcond_without compat_pkg
15
16# Run memcheck?
17# Valgrind does not work well on %%{power64} arches.
18%ifnarch %{power64}
19%bcond_without memcheck
20%else
21%bcond_with    memcheck
22%endif
23
24# Shared object version of libcrypt.
25%if %{with new_api}
26%global soc  2
27%global sol  0
28%global sof  0
29%global sov  %{soc}.%{sol}.%{sof}
30%if %{with compat_pkg}
31%global csoc 1
32%global csol 1
33%global csof 0
34%global csov %{csoc}.%{csol}.%{csof}
35%endif
36%else
37%global soc  1
38%global sol  1
39%global sof  0
40%global sov  %{soc}.%{sol}.%{sof}
41%endif
42
43
44# Hash methods and API supported by libcrypt.
45# NEVER EVER touch this, if you do NOT know what you are doing!
46%if %{with new_api}
47%global hash_methods   fedora,glibc,strong
48%global obsolete_api   no
49%if %{with compat_pkg}
50%global compat_methods glibc
51%global compat_api     glibc
52%endif
53%else
54%global hash_methods   all
55%global obsolete_api   glibc
56%endif
57
58
59# Needed for the distribution README file.
60%global distname .vine
61
62# Needed for out-of-tree builds.
63%global _configure ../"configure"
64
65
66# Common configure options.
67%global common_configure_options           \\\
68  --libdir=/%{_lib}                        \\\
69  --disable-failure-tokens                 \\\
70  --disable-silent-rules                   \\\
71  --enable-shared                          \\\
72  --enable-static                          \\\
73%if %{with memcheck}                       \
74  --enable-valgrind                        \\\
75%else                                      \
76  --disable-valgrind                       \\\
77%endif                                     \
78  --srcdir=..                              \\\
79  --with-pkgconfigdir=%{_libdir}/pkgconfig
80
81
82%if %{with fipstest}
83# Add generation of HMAC checksums of the final stripped
84# binaries.  %%define with lazy globbing is used here
85# intentionally, because using %%global does not work.
86BuildRequires:  fipscheck
87
88%define __spec_install_post                                    \
89%{?__debug_package:%{__debug_install_post}}                    \
90%{__arch_install_post}                                         \
91%{__os_install_post}                                           \
92%{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.a            \
93%{__ln_s} .libcrypt.a.hmac                                     \\\
94  %{buildroot}/%{_lib}/.libxcrypt.a.hmac                       \
95%{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.so.%{sov}    \
96%{__ln_s} .libcrypt.so.%{sov}.hmac                             \\\
97  %{buildroot}/%{_lib}/.libcrypt.so.%{soc}.hmac                \
98if [[ %{with new_api} == 1 && %{with compat_pkg} == 1 ]]; then \
99  %{_bindir}/fipshmac %{buildroot}/%{_lib}/libcrypt.so.%{csov} \
100  %{__ln_s} .libcrypt.so.%{csov}.hmac                          \\\
101    %{buildroot}/%{_lib}/.libcrypt.so.%{csoc}.hmac             \
102fi                                                             \
103%{nil}
104%endif
105
106Name:           libxcrypt
107Summary:        Extended crypt library for descrypt, md5crypt, bcrypt, and others
108Version:        4.4.17
109Release:        1%{?_dist_release}
110Group:          system
111Vendor:         Project Vine
112Distribution:   Vine Linux
113
114# For explicit license breakdown, see the
115# LICENSING file in the source tarball.
116License:        LGPLv2+ and BSD and Public Domain
117URL:            https://github.com/besser82/%{name}
118Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
119
120# Patch 0000 - 2999: Backported patches from upstream.
121
122# Patch 3000 - 5999: Backported patches from pull requests.
123
124# Patch 6000 - 9999: Downstream patches.
125
126BuildRequires:  libtool
127%if %{with memcheck}
128BuildRequires:  valgrind
129%endif
130%if %{with check}
131BuildRequires:  glibc-debuginfo
132%endif
133
134# We do not need to keep this forever.
135# We need a version of glibc, that doesn't build libcrypt anymore.
136Requires:       glibc%{?_isa}           >= 2.26.9000-46
137
138%if 0%{?fedora} >= 30
139Recommends:     mkpasswd
140%endif
141
142%description
143libxcrypt is a modern library for one-way hashing of passwords.  It
144supports a wide variety of both modern and historical hashing methods:
145yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt,
146%if %{with new_api}
147md5crypt, and descrypt.
148%else
149md5crypt, SunMD5, sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt.
150%endif
151It provides the traditional Unix crypt and crypt_r interfaces, as well
152as a set of extended interfaces pioneered by Openwall Linux, crypt_rn,
153crypt_ra, crypt_gensalt, crypt_gensalt_rn, and crypt_gensalt_ra.
154
155libxcrypt is intended to be used by login(1), passwd(1), and other
156similar programs; that is, to hash a small number of passwords during
157an interactive authentication dialogue with a human. It is not suitable
158for use in bulk password-cracking applications, or in any other situation
159where speed is more important than careful handling of sensitive data.
160However, it is intended to be fast and lightweight enough for use in
161servers that must field thousands of login attempts per minute.
162%if %{with new_api}
163
164This version of the library does not provide the legacy API functions
165that have been provided by glibc's libcrypt.so.1.
166%endif
167
168
169%if %{with new_api} && %{with compat_pkg}
170%package        compat
171Summary:        Compatibility library providing legacy API functions
172Group:          system
173
174Requires:       %{name}%{?_isa}         == %{version}-%{release}
175
176%description    compat
177This package contains the library providing the compatibility API
178for applications that are linked against glibc's libxcrypt, or that
179are still using the unsafe and deprecated, encrypt, encrypt_r,
180setkey, setkey_r, and fcrypt functions, which are still required by
181recent versions of POSIX, the Single UNIX Specification, and various
182other standards.
183
184All existing binary executables linked against glibc's libcrypt should
185work unmodified with the library supplied by this package.
186%endif
187
188
189%package        devel
190Summary:        Development files for %{name}
191Group:          programming
192
193Conflicts:      man-pages               < 4.15-3
194
195Requires:       %{name}%{?_isa}        == %{version}-%{release}
196Requires:       glibc-devel%{?_isa}
197
198%description    devel
199The %{name}-devel package contains libraries and header files for
200developing applications that use %{name}.
201
202
203%package        static
204Summary:        Static library for -static linking with %{name}
205Group:          programming
206
207Requires:       %{name}-devel%{?_isa}  == %{version}-%{release}
208Requires:       glibc-static%{?_isa}
209
210%description    static
211This package contains the libxcrypt static library for -static
212linking.
213
214You don't need this, unless you link statically, which is highly
215discouraged.
216
217
218%package -n     compat32-%{name}
219Summary:        Extended crypt library for descrypt, md5crypt, bcrypt, and others
220Group:          system
221
222%description -n compat32-%{name}
223libxcrypt is a modern library for one-way hashing of passwords.  It
224supports a wide variety of both modern and historical hashing methods:
225yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt,
226%if %{with new_api}
227md5crypt, and descrypt.
228%else
229md5crypt, SunMD5, sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt.
230%endif
231It provides the traditional Unix crypt and crypt_r interfaces, as well
232as a set of extended interfaces pioneered by Openwall Linux, crypt_rn,
233crypt_ra, crypt_gensalt, crypt_gensalt_rn, and crypt_gensalt_ra.
234
235libxcrypt is intended to be used by login(1), passwd(1), and other
236similar programs; that is, to hash a small number of passwords during
237an interactive authentication dialogue with a human. It is not suitable
238for use in bulk password-cracking applications, or in any other situation
239where speed is more important than careful handling of sensitive data.
240However, it is intended to be fast and lightweight enough for use in
241servers that must field thousands of login attempts per minute.
242%if %{with new_api}
243
244This version of the library does not provide the legacy API functions
245that have been provided by glibc's libcrypt.so.1.
246%endif
247
248
249%package -n     compat32-%{name}-devel
250Summary:        Development files for cpmpat32-%{name}
251Group:          programming
252
253Requires:       %{name}-devel        == %{version}-%{release}
254Requires:       compat32-glibc-devel
255
256%description -n compat32-%{name}-devel
257The compat32-%{name}-devel package contains libraries and header files for
258developing applications that use compat32-%{name}.
259
260
261%debug_package
262
263
264%prep
265%autosetup -p 1
266./autogen.sh
267%if %{with new_api}
268%{__cat} << EOF >> README%{distname}
269This version of the %{name} package ships the libcrypt.so.2
270library and does not provide the legacy API functions that have
271been provided by glibc's libcrypt.so.1.  The removed functions
272by name are encrypt, encrypt_r, setkey, setkey_r, and fcrypt.
273%if %{with compat_pkg}
274
275If you are using a third-party application that links against
276those functions, or that is linked against glibc's libcrypt,
277you may need to install the %{name}-compat package manually.
278
279All existing binary executables linked against glibc's libcrypt
280should work unmodified with the libcrypt.so.1 library supplied
281by the %{name}-compat package.
282%endif
283EOF
284%endif
285%{__mkdir_p} %{_vpath_builddir}{,-compat}
286
287
288%build
289# Build the default system library.
290pushd %{_vpath_builddir}
291%configure                              \
292  %{common_configure_options}           \
293  --enable-hashes=%{hash_methods}       \
294  --enable-obsolete-api=%{obsolete_api}
295%make_build
296popd
297
298%if %{with new_api} && %{with compat_pkg}
299# Build the compatibility library.
300pushd %{_vpath_builddir}-compat
301%configure                              \
302  %{common_configure_options}           \
303  --enable-hashes=%{compat_methods}     \
304  --enable-obsolete-api=%{compat_api}
305%make_build
306popd
307%endif
308
309
310%install
311rm -rf %{buildroot}
312%if %{with new_api} && %{with compat_pkg}
313# Install the compatibility library.
314%make_install -C %{_vpath_builddir}-compat
315
316# Cleanup everything we do not need from the compatibility library.
317%{__rm} -fr %{buildroot}%{_bindir}                   \
318            %{buildroot}%{_includedir}               \
319            %{buildroot}/%{_lib}/lib{,x}crypt.{a,so} \
320            %{buildroot}%{_libdir}/pkgconfig         \
321            %{buildroot}%{_mandir}                   \
322            %{buildroot}%{_sbindir}
323%endif
324
325# Install the default system library.
326%make_install -C %{_vpath_builddir}
327
328# Get rid of libtool crap.
329%{_bindir}/find %{buildroot} -name '*.la' -print -delete
330
331
332%if %{with check}
333%check
334%if %{with new_api} && %{with compat_pkg}
335for dir in %{_vpath_builddir} %{_vpath_builddir}-compat; do
336%else
337for dir in %{_vpath_builddir}; do
338%endif
339  %make_build -C ${dir} check || \
340    {
341      rc=$?;
342      echo "-----BEGIN TESTLOG: ${dir}-----";
343      %{__cat} ${dir}/test-suite.log;
344      echo "-----END TESTLOG: ${dir}-----";
345      exit $rc;
346    }
347%if %{with memcheck}
348  %make_build -C ${dir} check-valgrind-memcheck || \
349    {
350      rc=$?;
351      echo "-----BEGIN TESTLOG: ${dir}-----";
352      %{__cat} ${dir}/test-suite-memcheck.log;
353      echo "-----END TESTLOG: ${dir}-----";
354      exit $rc;
355    }
356%endif
357done
358%endif
359
360
361%post -p /sbin/ldconfig
362%postun -p /sbin/ldconfig
363
364%if %{with new_api} && %{with compat_pkg}
365%post compat -p /sbin/ldconfig
366%postun compat -p /sbin/ldconfig
367%endif
368
369%if 0%{?build_compat32}
370%post -n compat32-%{name} -p /sbin/ldconfig
371%postun -n compat32-%{name} -p /sbin/ldconfig
372%endif
373
374
375%files
376%doc NEWS README* THANKS
377%license AUTHORS COPYING.LIB LICENSING
378%if %{with fipstest}
379/%{_lib}/.libcrypt.so.%{soc}.hmac
380/%{_lib}/.libcrypt.so.%{sov}.hmac
381%endif
382/%{_lib}/libcrypt.so.%{soc}
383/%{_lib}/libcrypt.so.%{sov}
384%{_mandir}/man5/crypt.5.*
385
386%if %{with new_api} && %{with compat_pkg}
387%files          compat
388%if %{with fipstest}
389/%{_lib}/.libcrypt.so.%{csoc}.hmac
390/%{_lib}/.libcrypt.so.%{csov}.hmac
391%endif
392/%{_lib}/libcrypt.so.%{csoc}
393/%{_lib}/libcrypt.so.%{csov}
394%endif
395
396%files          devel
397%doc ChangeLog TODO
398/%{_lib}/lib*crypt.so
399%{_includedir}/*crypt.h
400%{_libdir}/pkgconfig/libcrypt.pc
401%{_libdir}/pkgconfig/%{name}.pc
402%{_mandir}/man3/crypt*.3*
403
404%files          static
405%if %{with fipstest}
406/%{_lib}/.lib*crypt.a.hmac
407%endif
408/%{_lib}/lib*crypt.a
409
410%if 0%{?build_compat32}
411%files -n       compat32-%{name}
412%if %{with fipstest}
413/%{_lib}/.libcrypt.so.%{soc}.hmac
414/%{_lib}/.libcrypt.so.%{sov}.hmac
415%endif
416/%{_lib}/libcrypt.so.%{soc}
417/%{_lib}/libcrypt.so.%{sov}
418
419%files -n       compat32-%{name}-devel
420/%{_lib}/lib*crypt.so
421%{_libdir}/pkgconfig/libcrypt.pc
422%{_libdir}/pkgconfig/%{name}.pc
423%endif
424
425
426%changelog
427* Tue Feb 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.4.17-1
428- new upstream release.
429
430* Sat Mar 28 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.4.15-1
431- new upstream release.
432
433* Sat Jan 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.4.2-6
434- initial build for Vine Linux.
435
436* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.2-5
437- Build the compat package with glibc hashing methods only
438- Add an option to disable the compat-package for future use
439
440* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.2-4
441- Bump SO-name for Fedora >= 30 and enable compat package (#1666033)
442- Add distribution README file
443- Update description of the compat package
444- Conditionally remove non-built hashing methods from description
445
446* Sun Dec 23 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.2-3
447- Remove architecture bits from Recommends
448
449* Sun Dec 23 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.2-2
450- Update summary
451
452* Sat Dec 22 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.2-1
453- New upstream release
454
455* Thu Dec 06 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.1-1
456- New upstream release
457
458* Tue Dec 04 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.0-5
459- Sync -fno-plt patch with upstream commit
460
461* Tue Dec 04 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.0-4
462- Backport upstream commit to fix a memory leak from a static pointer
463
464* Tue Dec 04 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.0-3
465- Backport upstream PR to build with -fno-plt optimization
466
467* Mon Nov 26 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.0-2
468- Backport upstream commit to use a safer strcpy for the NT method
469- Backport upstream generating base64 encoded output for NT gensalt
470- Backport upstream commit to require less rbytes for NT gensalt
471- Backport upstream commit to test incremental hmac-sha256 computation
472- Add Recommends: mkpasswd for Fedora >= 30
473
474* Tue Nov 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.4.0-1
475- New upstream release
476
477* Wed Nov 14 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.4-1
478- New upstream release
479
480* Wed Nov 14 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.3-4
481- Bump release for proper obsoletion of former common sub-package
482
483* Wed Nov 14 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.3-3
484- Add two upstream patches with minor fixes
485- Add HMAC checksum file for the static library
486- Drop the common sub-package
487- Some spec-file optimizations
488
489* Tue Nov 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.3-2
490- Add a patch to define crypt_gensalt_r as macro, so applications
491  link the identical crypt_gensalt_rn directly
492
493* Sun Nov 11 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.3-1
494- New upstream release
495
496* Sun Nov 11 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.2-1
497- New upstream release
498
499* Sun Nov 11 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.1-2
500- Backport two patches from upstream fixing the gensalt function for
501  NT to properly terminate its returned output
502
503* Sat Nov 10 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.1-1
504- New upstream release
505
506* Sat Nov 10 2018 Björn Esser <besser82@fedoraproject.org> - 4.3.0-1
507- New upstream release
508
509* Fri Oct 26 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.3-1
510- New upstream release
511
512* Thu Oct 25 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.2-2
513- Add patch updating to recent development version
514- Run valgrind-memcheck
515- Use bootstrap script
516
517* Thu Oct 18 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.2-1
518- New upstream release
519
520* Mon Oct 01 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.1-3
521- Drop compat-devel package
522- Set configure options from globals
523
524* Sun Sep 30 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.1-2
525- Build out-of-tree
526- Split off noarch-bits into common sub-package
527- Update %%description
528- Prepare to remove legacy API from library and to provide a compatibilty
529  package for the legacy API
530
531* Sat Sep 29 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.1-1
532- New upstream release
533- Add new manpages
534
535* Sat Sep 29 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.0-1
536- New upstream release
537
538* Fri Aug 24 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.2-1
539- New upstream release
540
541* Wed Aug 08 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.1-4
542- Move *.3 manpages to devel subpackage (#1613762)
543- Add needed Conflicts: man-pages < 4.15-3
544
545* Wed Aug 08 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.1-3
546- Make crypt{,_r} return NULL on failure (#1611784)
547
548* Sat Aug 04 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.1-2
549- Add manpages for crypt{,_r,_ra}.3 (#1610307)
550
551* Wed Aug 01 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.1-1
552- New upstream release
553
554* Fri Jul 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.0-1
555- New upstream release
556
557* Fri Jul 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.1-6
558- Make testsuite fail on error again
559- Update patch0 with more upstream fixes
560
561* Fri Jul 13 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.1-5
562- Add patch to update to recent development branch
563- Re-enable SUNMD5 support as it is BSD licensed now
564- Build compatibility symbols for glibc only
565- Skip failing testsuite once
566
567* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
568- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
569
570* Fri Jun 29 2018 Florian Weimer <fweimer@redhat.com> - 4.0.1-3
571- Remove CDDL from license list (#1592445)
572
573* Fri Jun 29 2018 Florian Weimer <fweimer@redhat.com> - 4.0.1-2
574- Remove SUNMD5 support (#1592445)
575
576* Wed May 16 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.1-1
577- New upstream release
578
579* Sat Feb 17 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-5
580- Switch to %%ldconfig_scriptlets
581
582* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-4
583- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
584
585* Thu Feb 01 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-3
586- Add patch to fix unintialize value in badsalt test
587
588* Wed Jan 31 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-2
589- Add patch to fix bcrypt test with GCC8
590
591* Sat Jan 27 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-1
592- New upstream release
593
594* Mon Jan 22 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.0.0-0.204.20180120git3436e7b
595- Fix Obsoletes
596
597* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.203.20180120git3436e7b
598- Update to new snapshot fixing cast-align
599
600* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.202.20180120gitde99d27
601- Update to new snapshot (rhbz#1536752)
602
603* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.201.20171109git15447aa
604- Use archful Obsoletes for libcrypt
605- Add versioned Requires on glibc packages not shipping libcrypt
606- Add comments about the packaging logic for replacing former libcrypt
607
608* Fri Jan 12 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.200.20171109git15447aa
609- Initial import (rhbz#1532794)
610- Add Obsoletes/Provides for libcrypt
611
612* Wed Jan 10 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.101.20171109git15447aa
613- Fix style of %%git_{rel,ver}
614
615* Tue Jan 09 2018 Björn Esser <besser82@fedoraproject.org> - 4.0.0-0.100.git20171109.15447aa
616- Initial rpm release (rhbz#1532794)
617- Start revision at 0.100 to superseed builds from COPR
Note: See TracBrowser for help on using the repository browser.