/[packages]/updates/6/libuser/current/SPECS/libuser.spec
ViewVC logotype

Contents of /updates/6/libuser/current/SPECS/libuser.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1191894 - (show annotations) (download)
Tue Jan 9 14:27:56 2018 UTC (6 years, 3 months ago) by mrambo3501
File size: 5204 byte(s)
update segfault patch for suggestions in mga#21333:C7
1 %define major 1
2 %define libname %mklibname user %{major}
3 %define develname %mklibname user -d
4 # we don't want to provide private python extension libs
5 %define _exclude_files_from_autoprov %{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so
6 # Python3 will be supported in 0.62 Fedora have it
7 %define with_python3 1
8
9 %define _disable_ld_no_undefined 1
10
11 Summary: A user and group account administration library
12 Name: libuser
13 Version: 0.62
14 %define subrel 2
15 Release: %mkrel 8
16 License: LGPLv2+
17 Group: System/Configuration
18 # VCS: https://fedorahosted.org/libuser/browser
19 URL: https://fedorahosted.org/libuser/
20 Source0: https://fedorahosted.org/releases/l/i/libuser/%{name}-%{version}.tar.xz
21 # patches merged upstream (to be drop on next update):
22 Patch0: libuser-0.56.9-fix-str-fmt.patch
23 # crypt returns *0 if key is small than 22 and rounds are not given
24 Patch2: libuser-0.56.15-fix_blowfish.patch
25 Patch3: libuser-0.62-create-homedir-segfault.patch
26 BuildRequires: gettext
27 BuildRequires: glib2-devel
28 BuildRequires: openldap-devel
29 BuildRequires: linuxdoc-tools
30 BuildRequires: pam-devel
31 BuildRequires: popt-devel
32 BuildRequires: python-devel
33 BuildRequires: bison
34 BuildRequires: openssl
35 BuildRequires: locales-en
36 %if 0%{?with_python3}
37 BuildRequires: python3-devel
38 %endif # if with_python3
39 Requires: coreutils
40 Requires(pre): coreutils
41
42 %description
43 The libuser library implements a standardized interface for manipulating
44 and administering user and group accounts. The library uses pluggable
45 back-ends to interface to its data sources.
46
47 Sample applications modeled after those included with the shadow password
48 suite are included.
49
50 %package python
51 Group: Development/Python
52 Summary: Library bindings for python
53 BuildRequires: python
54 Requires: %{libname} = %{version}-%{release}
55
56 %description python
57 This package contains the python library for python applications that
58 use libuser.
59
60 %if 0%{?with_python3}
61 %package python3
62 Group: Development/Python
63 Summary: Library bindings for python3
64 Requires: %{libname} = %{version}-%{release}
65
66 %description python3
67 This package contains the python3 library for python3 applications that
68 use libuser.
69 %endif # if with_python3
70
71 %package ldap
72 Group: System/Libraries
73 Summary: Libuser ldap library
74 Requires: %{libname} = %{version}-%{release}
75
76 %description ldap
77 This package contains the libuser ldap library.
78
79 %package -n %{libname}
80 Group: System/Libraries
81 Summary: The actual libraries for libuser
82 Requires: %{name} = %{version}-%{release}
83
84 %description -n %{libname}
85 This is the actual library for the libuser library.
86
87 %package -n %{develname}
88 Group: Development/C
89 Summary: Files needed for developing applications which use libuser
90 Requires: %{libname} = %{version}-%{release}
91 Provides: %{name}-devel = %{version}-%{release}
92 Obsoletes: %mklibname -d user 1
93
94 %description -n %{develname}
95 The libuser-devel package contains header files, static libraries, and other
96 files useful for developing applications with libuser.
97
98 %prep
99 %setup -q
100 %patch0 -p0
101 %patch2 -p0
102 %patch3 -p1 -b .homedir-segfault
103 %if 0%{?with_python3}
104 cp -a . %{py3dir}
105 %endif # if with_python3
106
107 %build
108 export CFLAGS="%{optflags} -fPIC -DG_DISABLE_ASSERT -I/usr/include/sasl -DLDAP_DEPRECATED"
109 %configure2_5x \
110 --with-ldap \
111 --with-python \
112 --with-popt \
113 --without-sasl \
114 --disable-rpath \
115 --without-selinux \
116 --enable-gtk-doc=no
117 %make
118
119 %if 0%{?with_python3}
120 pushd %{py3dir}
121 %configure2_5x \
122 --with-ldap \
123 --with-python \
124 --with-popt \
125 --without-sasl \
126 --disable-rpath \
127 --without-selinux \
128 --enable-gtk-doc=no \
129 PYTHON=%{__python3}
130 %make
131 popd
132 %endif # if with_python3
133
134 %install
135 %if 0%{?with_python3}
136 pushd %{py3dir}
137 %makeinstall_std
138 popd
139 %endif # if with_python3
140
141 %makeinstall_std
142
143 %find_lang %{name}
144
145 # Remove unpackaged files
146 rm -rf %{buildroot}/usr/share/man/man3/userquota.3 \
147 %{buildroot}%{python2_sitearch}/*a \
148 %{buildroot}%{_libdir}/%{name}/*.la \
149 %{buildroot}%{_libdir}/*.la
150
151 %if 0%{?with_python3}
152 rm -rf %{buildroot}%{python3_sitearch}/*a
153 %endif # if with_python3
154
155 #check
156 #make check
157
158 LD_LIBRARY_PATH=%{buildroot}%{_libdir}:${LD_LIBRARY_PATH}
159 export LD_LIBRARY_PATH
160
161 # Verify that all python modules load, just in case.
162 pushd %{buildroot}%{python2_sitearch}/
163 %{__python2} -c "import libuser"
164 popd
165
166 %if 0%{?with_python3}
167 pushd %{buildroot}%{python3_sitearch}/
168 # The Python 3 module only supports UTF-8
169 LC_ALL=en_US.UTF-8 \
170 %{__python3} -c "import libuser"
171 popd
172 %endif # if with_python3
173
174 # (mga6) fix update to 0.62 or to CVE-2015-3246:
175 %triggerin -n %{libname} -- %{libname} <= 0.62-8.mga6
176 rm -f /etc/shadow.lock
177
178 %files -f %{name}.lang
179 %doc AUTHORS NEWS README TODO docs/*.txt python/modules.txt
180 %config(noreplace) %{_sysconfdir}/libuser.conf
181 %{_bindir}/*
182 %{_sbindir}/*
183 %dir %{_libdir}/%{name}/
184 %{_libdir}/%{name}/libuser_files.so
185 %{_libdir}/%{name}/libuser_shadow.so
186 %_mandir/man5/*
187 %{_mandir}/man1/*
188
189 %files -n %{libname}
190 %{_libdir}/libuser.so.%{major}{,.*}
191
192 %files python
193 %{python2_sitearch}/*.so
194
195 %if 0%{?with_python3}
196 %files python3
197 %{python3_sitearch}/*.so
198 %endif # if with_python3
199
200 %files ldap
201 %{_libdir}/%{name}/libuser_ldap.so
202
203 %files -n %{develname}
204 %{_includedir}/libuser
205 %{_libdir}/*.so
206 %{_libdir}/pkgconfig/*
207 %{_datadir}/gtk-doc/html/*

  ViewVC Help
Powered by ViewVC 1.1.30