uw-imap-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. # Change the default connected directory from the user's home directory
  2. # to the named subdirectory of the user's home directory
  3. %define mail_subdirectory Mail
  4. Summary: UW Server daemons for IMAP and POP network mail protocols
  5. Summary(ja): IMAP/POP ネットワークメールプロトコル用デーモン
  6. Name: uw-imap
  7. Version: 2007f
  8. Release: 7%{?_dist_release}
  9. Group: servers
  10. Distribution: Vine Linux
  11. Vendor: Project Vine
  12. # See LICENSE.txt, http://www.apache.org/licenses/LICENSE-2.0
  13. License: ASL 2.0
  14. URL: http://www.washington.edu/imap/
  15. # Old (non-latest) releases live at ftp://ftp.cac.washington.edu/imap/old/
  16. Source0: ftp://ftp.cac.washington.edu/imap/imap-%{version}.tar.gz
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  18. %define soname c-client
  19. %define somajor 2007
  20. %define shlibname lib%{soname}.so.%{somajor}
  21. %define imap_libs lib%{soname}
  22. # FC4+ uses %%_sysconfdir/pki/tls/certs, previous releases used %%_datadir/ssl/certs
  23. %global ssldir %(if [ -d %{_sysconfdir}/pki/tls ]; then echo "%{_sysconfdir}/pki/tls"; else echo "%{_datadir}/ssl"; fi)
  24. %define sslcerts %{ssldir}/certs
  25. %define sslkeys %{ssldir}/private
  26. # new pam setup, using new "include" feature
  27. Source21: imap.pam
  28. # legacy/old pam setup, using pam_stack.so
  29. Source22: imap-legacy.pam
  30. Source31: imap-xinetd
  31. Source32: imaps-xinetd
  32. Source33: ipop2-xinetd
  33. Source34: ipop3-xinetd
  34. Source35: pop3s-xinetd
  35. Patch1: imap-2007-paths.patch
  36. # See http://bugzilla.redhat.com/229781 , http://bugzilla.redhat.com/127271
  37. Patch2: imap-2004a-doc.patch
  38. Patch5: imap-2007e-overflow.patch
  39. Patch9: imap-2007e-shared.patch
  40. Patch10: imap-2007e-authmd5.patch
  41. Patch11: imap-2007e-system_c_client.patch
  42. Patch12: imap-2007f-format-security.patch
  43. Patch13: imap-2007e-poll.patch
  44. # From debian
  45. Patch14: 1006_openssl1.1_autoverify.patch
  46. Patch15: imap-2007f-ldflags.patch
  47. Patch16: imap-2007f-gcc14.patch
  48. # From debian
  49. Patch17: 2014_openssl1.1.1_sni.patch
  50. BuildRequires: openssl-devel
  51. BuildRequires: pam-devel
  52. BuildRequires: krb5-devel
  53. # Prereq is shorter than separate Requires, Requires(post), Requires(postun)
  54. Requires(pre): xinetd
  55. Requires(post): openssl
  56. Requires: %{imap_libs} = %{version}-%{release}
  57. # imap -> uw-imap rename
  58. Obsoletes: imap < 1:%{version}
  59. %description
  60. The %{name} package provides UW server daemons for both the IMAP (Internet
  61. Message Access Protocol) and POP (Post Office Protocol) mail access
  62. protocols. The POP protocol uses a "post office" machine to collect
  63. mail for users and allows users to download their mail to their local
  64. machine for reading. The IMAP protocol allows a user to read mail on a
  65. remote machine without downloading it to their local machine.
  66. %package -n %{imap_libs}
  67. Summary: UW C-client mail library
  68. Summary(ja): UW メールライブラリ
  69. Group: system
  70. Obsoletes: libc-client2004d < 1:2004d-2
  71. Obsoletes: libc-client2004e < 2004e-2
  72. Obsoletes: libc-client2004g < 2004g-7
  73. Obsoletes: libc-client2006 < 2006k-2
  74. %description -n %{imap_libs}
  75. Provides a common API for accessing mailboxes.
  76. %package devel
  77. Summary: Development tools for programs which will use the UW IMAP library
  78. Group: programming
  79. Requires: %{imap_libs} = %{version}-%{release}
  80. # imap -> uw-imap rename
  81. Obsoletes: imap-devel < 1:%{version}
  82. Provides: imap-devel < 1:%{version}
  83. Conflicts: libc-client-devel
  84. %description devel
  85. Contains the header files and static libraries for developing programs
  86. which will use the UW C-client common API.
  87. %package utils
  88. Summary: UW IMAP Utilities to make managing your email simpler
  89. Group: internet
  90. # imap -> uw-imap rename
  91. Obsoletes: imap-utils < 1:%{version}
  92. %description utils
  93. This package contains some utilities for managing UW IMAP email,including:
  94. * dmail : procmail Mail Delivery Module
  95. * mailutil : mail utility program
  96. * mtest : C client test program
  97. * tmail : Mail Delivery Module
  98. * mlock
  99. %debug_package
  100. %prep
  101. %setup -q -n imap-%{version}
  102. %patch1 -p1 -b .paths
  103. %patch2 -p1 -b .doc
  104. %patch5 -p1 -b .overflow
  105. %patch9 -p1 -b .shared
  106. %patch10 -p1 -b .authmd5
  107. install -p -m644 %{SOURCE21} imap.pam
  108. %patch12 -p1 -b .fmt-sec
  109. %patch13 -p1 -b .poll
  110. %patch14 -p1 -b .openssl11
  111. %patch15 -p1 -b .ldflags
  112. %patch16 -p1 -b .gcc14
  113. %patch17 -p1 -b .sni
  114. %build
  115. # Kerberos setup
  116. test -f %{_sysconfdir}/profile.d/krb5-devel.sh && source %{_sysconfdir}/profile.d/krb5-devel.sh
  117. test -f %{_sysconfdir}/profile.d/krb5.sh && source %{_sysconfdir}/profile.d/krb5.sh
  118. GSSDIR=$(krb5-config --prefix)
  119. # SSL setup, probably legacy-only, but shouldn't hurt -- Rex
  120. export EXTRACFLAGS="$EXTRACFLAGS $(pkg-config --cflags openssl 2>/dev/null)"
  121. # $RPM_OPT_FLAGS
  122. export EXTRACFLAGS="$EXTRACFLAGS -fPIC $RPM_OPT_FLAGS"
  123. # jorton added these, I'll assume he knows what he's doing. :) -- Rex
  124. export EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
  125. export EXTRACFLAGS="$EXTRACFLAGS -Wno-pointer-sign"
  126. export EXTRACFLAGS="$EXTRACFLAGS -Wno-implicit-function-declaration -std=gnu17"
  127. echo "y" | \
  128. make lnp \
  129. EXTRACFLAGS="$EXTRACFLAGS" \
  130. EXTRALDFLAGS="$EXTRALDFLAGS $RPM_LD_FLAGS" \
  131. EXTRAAUTHENTICATORS=gss \
  132. SPECIALS="GSSDIR=${GSSDIR} LOCKPGM=%{_sbindir}/mlock SSLCERTS=%{sslcerts} SSLDIR=%{ssldir} SSLINCLUDE=%{_includedir}/openssl SSLKEYS=%{sslkeys} SSLLIB=%{_libdir}" \
  133. SSLTYPE=unix \
  134. CCLIENTLIB=$(pwd)/c-client/%{shlibname} \
  135. SHLIBBASE=%{soname} \
  136. SHLIBNAME=%{shlibname}
  137. # Blank line
  138. %install
  139. rm -rf $RPM_BUILD_ROOT
  140. mkdir -p $RPM_BUILD_ROOT%{_libdir}/
  141. install -p -m644 ./c-client/c-client.a $RPM_BUILD_ROOT%{_libdir}/
  142. ln -s c-client.a $RPM_BUILD_ROOT%{_libdir}/libc-client.a
  143. install -p -m755 ./c-client/%{shlibname} $RPM_BUILD_ROOT%{_libdir}/
  144. ln -s %{shlibname} $RPM_BUILD_ROOT%{_libdir}/lib%{soname}.so
  145. mkdir -p $RPM_BUILD_ROOT%{_includedir}/imap/
  146. install -m644 ./c-client/*.h $RPM_BUILD_ROOT%{_includedir}/imap
  147. # Added linkage.c to fix (#34658) <mharris>
  148. install -m644 ./c-client/linkage.c $RPM_BUILD_ROOT%{_includedir}/imap
  149. install -m644 ./src/osdep/tops-20/shortsym.h $RPM_BUILD_ROOT%{_includedir}/imap
  150. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8/
  151. install -p -m644 src/{ipopd/ipopd,imapd/imapd}.8 $RPM_BUILD_ROOT%{_mandir}/man8/
  152. mkdir -p $RPM_BUILD_ROOT%{_sbindir}
  153. install -p -m755 ipopd/ipop{2d,3d} $RPM_BUILD_ROOT%{_sbindir}/
  154. install -p -m755 imapd/imapd $RPM_BUILD_ROOT%{_sbindir}/
  155. install -p -m755 mlock/mlock $RPM_BUILD_ROOT%{_sbindir}/
  156. mkdir -p $RPM_BUILD_ROOT%{_bindir}/
  157. install -p -m755 dmail/dmail mailutil/mailutil mtest/mtest tmail/tmail $RPM_BUILD_ROOT%{_bindir}/
  158. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
  159. install -p -m644 src/{dmail/dmail,mailutil/mailutil,tmail/tmail}.1 $RPM_BUILD_ROOT%{_mandir}/man1/
  160. install -p -m644 -D imap.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/imap
  161. install -p -m644 -D imap.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/pop
  162. install -p -m644 -D %{SOURCE31} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/imap
  163. install -p -m644 -D %{SOURCE32} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/imaps
  164. install -p -m644 -D %{SOURCE33} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/ipop2
  165. install -p -m644 -D %{SOURCE34} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/ipop3
  166. install -p -m644 -D %{SOURCE35} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/pop3s
  167. # Generate ghost *.pem files
  168. mkdir -p $RPM_BUILD_ROOT%{sslcerts}/
  169. touch $RPM_BUILD_ROOT%{sslcerts}/{imapd,ipop3d}.pem
  170. # c-client.cf
  171. touch $RPM_BUILD_ROOT%{_sysconfdir}/c-client.cf
  172. # FIXME, do this on daemon startup -- Rex
  173. %post
  174. {
  175. cd %{sslcerts} &> /dev/null || :
  176. for CERT in imapd.pem ipop3d.pem ;do
  177. if [ ! -e $CERT ];then
  178. if [ -e stunnel.pem ];then
  179. cp stunnel.pem $CERT &> /dev/null || :
  180. elif [ -e Makefile ];then
  181. make $CERT << EOF &> /dev/null || :
  182. --
  183. SomeState
  184. SomeCity
  185. SomeOrganization
  186. SomeOrganizationalUnit
  187. localhost.localdomain
  188. root@localhost.localdomain
  189. EOF
  190. fi
  191. fi
  192. done
  193. } || :
  194. /sbin/service xinetd reload > /dev/null 2>&1 || :
  195. %postun
  196. /sbin/service xinetd reload > /dev/null 2>&1 || :
  197. %triggerpostun -- imap < 1:2004
  198. #if upgrading from old version, don't change/set (default) MailDir
  199. if [ -f %{_sysconfdir}/c-client.cf ]; then
  200. if grep -q "^set mail-subdirectory %{mail_subdirectory}" %{_sysconfdir}/c-client.cf; then
  201. sed -i -e 's/^set mail-subdirectory/\#set mail-subdirectory/g' \
  202. %{_sysconfdir}/c-client.cf
  203. fi
  204. fi
  205. %files
  206. %doc docs/SSLBUILD
  207. %config %{_sysconfdir}/pam.d/imap
  208. %config %{_sysconfdir}/pam.d/pop
  209. %config(noreplace) %{_sysconfdir}/xinetd.d/imap
  210. %config(noreplace) %{_sysconfdir}/xinetd.d/ipop2
  211. %config(noreplace) %{_sysconfdir}/xinetd.d/ipop3
  212. # These need to be replaced (ie, can't use %%noreplace), or imaps/pop3s will fail after an upgrade
  213. %config %{_sysconfdir}/xinetd.d/imaps
  214. %config %{_sysconfdir}/xinetd.d/pop3s
  215. %attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{sslcerts}/imapd.pem
  216. %attr(0600,root,root) %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{sslcerts}/ipop3d.pem
  217. %config(noreplace) %{_sysconfdir}/c-client.cf
  218. %{_mandir}/man8/*
  219. %{_sbindir}/ipop2d
  220. %{_sbindir}/ipop3d
  221. %{_sbindir}/imapd
  222. %files utils
  223. %{_bindir}/*
  224. %attr(2755, root, mail) %{_sbindir}/mlock
  225. %{_mandir}/man1/*
  226. %files -n %{imap_libs}
  227. %doc docs/RELNOTES docs/*.txt
  228. %{_libdir}/lib%{soname}.so.*
  229. %files devel
  230. %{_includedir}/imap/
  231. %{_libdir}/c-client.a
  232. %{_libdir}/libc-client.a
  233. %{_libdir}/lib%{soname}.so
  234. %changelog
  235. * Fri Jun 6 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2007f-7
  236. - rebuilt with current toolchain.
  237. * Wed Dec 21 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2007f-6
  238. - imported Patch16 from debian.
  239. * Tue Oct 05 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2007f-5
  240. - rebuilt with openssl-3.0.0.
  241. - dropped ldconfig scriptlets.
  242. * Fri Apr 24 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2007f-4
  243. - updated Patch5, 9 and 10.
  244. * Mon Nov 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2007f-3
  245. - imported Patch13-15 from rawhide.
  246. * Tue Mar 15 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2007f-2
  247. - rebuilt with openssl-1.0.2g.
  248. * Thu Jun 25 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2007f-1
  249. - new upstream release.
  250. - added Patch11 and Patch12.
  251. * Sat Mar 26 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2007e-3
  252. - rebuilt with openssl-1.0.0d and krb5-libs-1.8.2
  253. * Sun Feb 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2007e-2
  254. - rebuild with openssl-1.0.0c
  255. * Sat May 16 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2007e-1
  256. - new upstream release
  257. - built with krb5-devel (VineSeed)
  258. * Sun Sep 07 2008 Shu KONNO <owa@bg.wakwak.com> 2006b-2vl5
  259. - applied new versioning policy, spec in utf-8
  260. * Sat Jun 2 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2006b-1vl2
  261. - rebuilt with new toolchain
  262. * Fri Oct 20 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2006b-1vl1
  263. - updated to 2006b based on Fedora development
  264. * Mon May 29 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2004g-4vl2
  265. - changed package name
  266. * Wed Mar 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2004g-4vl1
  267. - rebuilt for Vine Linux
  268. * Wed Mar 1 2006 Rex Dieter <rexdieter[AT]users.sf.net>
  269. - fc5: gcc/glibc respin
  270. * Thu Nov 17 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004g-4
  271. - use pam's "include" feature on fc5
  272. - cleanup %%doc handling, remove useless bits
  273. * Thu Nov 17 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004g-3
  274. - omit trailing whitespace in default c-client.cf
  275. * Wed Nov 16 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004g-2
  276. - rebuild for new openssl
  277. * Mon Sep 26 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004g-1
  278. - imap-2004g
  279. - /etc -> %%_sysconfdir
  280. - use %%{?_smp_mflags}
  281. * Mon Aug 15 2005 Rex Dieter <rexdieter[AT]users.sf.net> 2004e-1
  282. - imap-2004e
  283. - rename: imap -> uw-imap (yay, we get to drop the Epoch)
  284. - sslcerts=%{_sysconfdir}/pki/tls/certs if exists, else /usr/share/ssl/certs
  285. * Fri Apr 29 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1:2004d-1
  286. - 2004d
  287. - imap-libs -> lib%%{soname}%%{version} (ie, libc-client2004d), so we can
  288. have multiple versions (shared-lib only) installed
  289. - move mlock to -utils.
  290. - revert RFC2301, locks out too many folks where SSL is unavailable
  291. * Thu Apr 28 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1:2004-0.fdr.11.c1
  292. - change default driver from mbox to mbx
  293. - comply with RFC 3501 security: Unencrypted plaintext passwords are prohibited
  294. * Fri Jan 28 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1:2004-0.fdr.10.c1
  295. - imap-2004c1 security release:
  296. http://www.kb.cert.org/vuls/id/702777
  297. * Thu Jan 20 2005 Rex Dieter <rexdieter[AT]users.sf.net> 1:2004-0.fdr.9.c
  298. - imap2004c
  299. - -utils: dmail,mailutil,tmail
  300. - -libs: include mlock (so it's available for other imap clients, like pine)
  301. - remove extraneous patches
  302. - %%_sysconfigdir/c-client.cf: use to set MailDir (but don't if upgrading from
  303. an older version (ie, if folks don't want/expect a change in behavior)
  304. * Mon Sep 13 2004 Rex Dieter <rexdieter at sf.net. 1:2004-0.fdr.8.a
  305. - don't use mailsubdir patch (for now)
  306. * Wed Aug 11 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.7.a
  307. - mailsubdir patch (default to ~/Mail instead of ~)
  308. * Fri Jul 23 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.6.a
  309. - remove Obsoletes/Provides: libc-client (they can, in fact, co-xist)
  310. - -devel: remove O/P: libc-client-devel -> Conflicts: libc-client-devel
  311. * Fri Jul 16 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.5.a
  312. - imap2004a
  313. * Tue Jul 13 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.4
  314. - -devel: Req: %%{name}-libs
  315. * Tue Jul 13 2004 Rex Dieter <rexdieter at sf.net> 1:2004-0.fdr.3
  316. - previous imap pkgs had Epoch: 1, we need it too.
  317. * Wed Jul 07 2004 Rex Dieter <rexdieter at sf.net> 2004-0.fdr.2
  318. - use %%version as %%somajver (like how openssl does it)
  319. * Wed Jul 07 2004 Rex Dieter <rexdieter at sf.net> 2004-0.fdr.1
  320. - imap-2004
  321. - use mlock, if available.
  322. - Since libc-client is an attrocious name choice, we'll trump it,
  323. and provide imap, imap-libs, imap-devel instead (redhat bug #120873)
  324. * Wed Apr 07 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 2002e-4
  325. - Use CFLAGS (and RPM_OPT_FLAGS) during the compilation
  326. - Build the .so through gcc instead of directly calling ld
  327. * Fri Mar 5 2004 Joe Orton <jorton@redhat.com> 2002e-3
  328. - install .so with permissions 0755
  329. - make auth_md5.c functions static to avoid symbol conflicts
  330. - remove Epoch: 0
  331. * Tue Mar 02 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:2002e-2
  332. - "lnp" already uses RPM_OPT_FLAGS
  333. - have us conflict with imap, imap-devel
  334. * Tue Mar 2 2004 Joe Orton <jorton@redhat.com> 0:2002e-1
  335. - add post/postun, always use -fPIC
  336. * Tue Feb 24 2004 Kaj J. Niemi <kajtzu@fi.basen.net>
  337. - Name change from c-client to libc-client
  338. * Sat Feb 14 2004 Kaj J. Niemi <kajtzu@fi.basen.net> 0:2002e-0.1
  339. - c-client 2002e is based on imap-2002d
  340. - Build shared version, build logic is copied from FreeBSD net/cclient