-
Notifications
You must be signed in to change notification settings - Fork 0
/
git.spec
1915 lines (1501 loc) · 60.3 KB
/
git.spec
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Pass --without docs to rpmbuild if you don't want the documentation
# Settings for EL-5
# - Leave git-* binaries in %%{_bindir}
# - Don't use noarch subpackages
# - Use proper libcurl devel package
# - Patch emacs and tweak docbook spaces
# - Explicitly enable ipv6 for git-daemon
# - Use prebuilt documentation, asciidoc is too old
# - Define missing python macro
%if 0%{?rhel} && 0%{?rhel} <= 5
%global gitcoredir %{_bindir}
%global noarch_sub 0
%global libcurl_devel curl-devel
%global emacs_old 1
%global docbook_suppress_sp 1
%global enable_ipv6 1
%global use_prebuilt_docs 1
%global filter_yaml_any 1
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
%global gitcoredir %{_libexecdir}/git-core
%global noarch_sub 1
%global libcurl_devel libcurl-devel
%global emacs_old 0
%global docbook_suppress_sp 0
%global enable_ipv6 0
%global use_prebuilt_docs 0
%global filter_yaml_any 0
%endif
# Settings for F-19+ and EL-7+
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
%global bashcomp_pkgconfig 1
%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null)
%global bashcomproot %(dirname %{bashcompdir} 2>/dev/null)
%global libsecret 1
%global use_new_rpm_filters 1
%global use_systemd 1
%else
%global bashcomp_pkgconfig 0
%global bashcompdir %{_sysconfdir}/bash_completion.d
%global bashcomproot %{bashcompdir}
%global libsecret 0
%global use_new_rpm_filters 0
%global use_systemd 0
%endif
# gnome-keyring is deprecated, however someone would like
# to use it on older fedora instead of libsecret. So that's
# why this ugly solution
# TODO: we should maybe update conditions according to supported systems
%if 0%{?fedora} >= 19 && 0%{?fedora} < 26 || 0%{?rhel} == 7
%global gnome_keyring 1
%else
%global gnome_keyring 0
%endif
# This one macro is for F19+ and EL-6+
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 6
%global desktop_vendor_tag 0
%else
%global desktop_vendor_tag 1
%endif
# Settings for EL <= 7
%if 0%{?rhel} && 0%{?rhel} <= 7
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
%endif
# fallback for F17- && RHEL6-
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%if 0%{?fedora} && 0%{?fedora} >= 25
%global test_links 1
%else
%global test_links 0
%endif
Name: git
Version: 2.13.3
Release: 2%{?dist}
Summary: Fast Version Control System
License: GPLv2
Group: Development/Tools
URL: https://git-scm.com/
Source0: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.xz
Source1: https://www.kernel.org/pub/software/scm/git/%{name}-htmldocs-%{version}.tar.xz
Source2: https://www.kernel.org/pub/software/scm/git/%{name}-manpages-%{version}.tar.xz
Source3: https://www.kernel.org/pub/software/scm/git/%{name}-%{version}.tar.sign
Source4: https://www.kernel.org/pub/software/scm/git/%{name}-htmldocs-%{version}.tar.sign
Source5: https://www.kernel.org/pub/software/scm/git/%{name}-manpages-%{version}.tar.sign
# Junio C Hamano's key is used to sign git releases, it can be found in the
# junio-gpg-pub tag within git.
#
# (Note that the tagged blob in git contains a version of the key with an
# expired signing subkey. The subkey expiration has been extended on the
# public keyservers, but the blob in git has not been updated.)
#
# https://git.kernel.org/cgit/git/git.git/tag/?h=junio-gpg-pub
# https://git.kernel.org/cgit/git/git.git/blob/?h=junio-gpg-pub&id=7214aea37915ee2c4f6369eb9dea520aec7d855b
Source9: gpgkey-junio.asc
# Local sources begin at 10 to allow for additional future upstream sources
Source10: git-init.el
Source11: git.xinetd.in
Source12: git.conf.httpd
Source13: git-gui.desktop
Source14: gitweb.conf.in
Source15: git@.service
Source16: git.socket
Patch0: git-1.8-gitweb-home-link.patch
# https://bugzilla.redhat.com/490602
Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
# https://bugzilla.redhat.com/600411
Patch3: git-1.7-el5-emacs-support.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
BuildRequires: asciidoc >= 8.4.1
BuildRequires: xmlto
%if %{test_links}
BuildRequires: linkchecker
%endif
%endif
BuildRequires: desktop-file-utils
BuildRequires: emacs
BuildRequires: expat-devel
BuildRequires: gettext
BuildRequires: gnupg2
BuildRequires: %{libcurl_devel}
%if %{libsecret}
BuildRequires: libsecret-devel
%endif
BuildRequires: pcre-devel
%if 0%{?fedora} && 0%{?fedora} >= 21
BuildRequires: perl-generators
%endif
BuildRequires: perl(Test)
BuildRequires: openssl-devel
BuildRequires: zlib-devel >= 1.2
%if %{bashcomp_pkgconfig}
BuildRequires: pkgconfig(bash-completion)
%endif
%if %{use_systemd}
# For macros
BuildRequires: systemd
%endif
Requires: git-core = %{version}-%{release}
Obsoletes: git-core-doc < 2.13.3-2
Requires: perl(Error)
%if ! %{defined perl_bootstrap}
Requires: perl(Term::ReadKey)
%endif
Requires: perl-Git = %{version}-%{release}
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
Requires: emacs-filesystem >= %{_emacs_version}
# These can be removed in Fedora 26
Obsoletes: emacs-git <= 2.4.5
Obsoletes: emacs-git-el <= 2.4.5
Provides: emacs-git = %{version}-%{release}
Provides: emacs-git-el = %{version}-%{release}
%endif
# Obsolete git-arch
Obsoletes: git-arch < %{version}-%{release}
%description
Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations
and full access to internals.
The git rpm installs common set of tools which are usually using with
small amount of dependencies. To install all git packages, including
tools for integrating with other SCMs, install the git-all meta-package.
%package all
Summary: Meta-package to pull in all git tools
Group: Development/Tools
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: git = %{version}-%{release}
%if %{gnome_keyring}
Requires: git-gnome-keyring = %{version}-%{release}
%endif
Requires: git-cvs = %{version}-%{release}
Requires: git-email = %{version}-%{release}
Requires: git-gui = %{version}-%{release}
Requires: git-svn = %{version}-%{release}
Requires: git-p4 = %{version}-%{release}
Requires: gitk = %{version}-%{release}
Requires: perl-Git = %{version}-%{release}
%if ! %{defined perl_bootstrap}
Requires: perl(Term::ReadKey)
%endif
%if 0%{?rhel} && 0%{?rhel} <= 6
Requires: emacs-git = %{version}-%{release}
%endif
Obsoletes: git <= 1.5.4.3
%description all
Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations
and full access to internals.
This is a dummy package which brings in all subpackages.
%package core
Summary: Core package of git with minimal functionality
Group: Development/Tools
Requires: less
Requires: openssh-clients
Requires: zlib >= 1.2
%description core
Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations
and full access to internals.
The git-core rpm installs really the core tools with minimal
dependencies. Install git package for common set of tools.
To install all git packages, including tools for integrating with
other SCMs, install the git-all meta-package.
%package daemon
Summary: Git protocol daemon
Group: Development/Tools
Requires: git = %{version}-%{release}
%if %{use_systemd}
Requires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%else
Requires: xinetd
%endif
%description daemon
The git daemon for supporting git:// access to git repositories
%package -n gitweb
Summary: Simple web interface to git repositories
Group: Development/Tools
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: git = %{version}-%{release}
%description -n gitweb
Simple web interface to track changes in git repositories
%package p4
Summary: Git tools for working with Perforce depots
Group: Development/Tools
%if %{noarch_sub}
BuildArch: noarch
%endif
BuildRequires: python
Requires: git = %{version}-%{release}
%description p4
%{summary}.
%package svn
Summary: Git tools for importing Subversion repositories
Group: Development/Tools
Requires: git = %{version}-%{release}, subversion
Requires: perl(Digest::MD5)
%if ! %{defined perl_bootstrap}
Requires: perl(Term::ReadKey)
%endif
%description svn
Git tools for importing Subversion repositories.
%package cvs
Summary: Git tools for importing CVS repositories
Group: Development/Tools
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: git = %{version}-%{release}, cvs
Requires: cvsps
Requires: perl(DBD::SQLite)
Requires: perl(Git)
%description cvs
Git tools for importing CVS repositories.
%package email
Summary: Git tools for sending email
Group: Development/Tools
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: git = %{version}-%{release}, perl-Git = %{version}-%{release}
Requires: perl(Authen::SASL)
Requires: perl(Net::SMTP::SSL)
Requires: perl(Git)
%description email
Git tools for sending email.
%package gui
Summary: Git GUI tool
Group: Development/Tools
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: git = %{version}-%{release}, tk >= 8.4
Requires: gitk = %{version}-%{release}
%description gui
Git GUI tool.
%package -n gitk
Summary: Git revision tree visualiser
Group: Development/Tools
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: git = %{version}-%{release}, tk >= 8.4
%description -n gitk
Git revision tree visualiser.
%package -n perl-Git
Summary: Perl interface to Git
Group: Development/Libraries
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: git = %{version}-%{release}
BuildRequires: perl(Error), perl(ExtUtils::MakeMaker)
Requires: perl(Error)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description -n perl-Git
Perl interface to Git.
%package -n perl-Git-SVN
Summary: Perl interface to Git::SVN
Group: Development/Libraries
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: git = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description -n perl-Git-SVN
Perl interface to Git.
%if 0%{?rhel} && 0%{?rhel} <= 6
%package -n emacs-git
Summary: Git version control system support for Emacs
Group: Applications/Editors
Requires: git = %{version}-%{release}
%if %{noarch_sub}
BuildArch: noarch
Requires: emacs(bin) >= %{_emacs_version}
%else
Requires: emacs-common
%endif
%description -n emacs-git
%{summary}.
%package -n emacs-git-el
Summary: Elisp source files for git version control system support for Emacs
Group: Applications/Editors
%if %{noarch_sub}
BuildArch: noarch
%endif
Requires: emacs-git = %{version}-%{release}
%description -n emacs-git-el
%{summary}.
%endif
%if %{gnome_keyring}
%package gnome-keyring
Summary: Git module for working with gnome-keyring
BuildRequires: libgnome-keyring-devel
Requires: git = %{version}-%{release}
Requires: gnome-keyring
%description gnome-keyring
%{summary}.
%endif
%prep
# Verify GPG signatures
gpghome="$(mktemp -qd)" # Ensure we don't use any existing gpg keyrings
key="%{SOURCE9}"
# Ignore noisy output from GnuPG 2.0, used on EL <= 7
# https://bugs.gnupg.org/gnupg/issue1555
gpg2 --dearmor --quiet --batch --yes $key >/dev/null
for src in %{SOURCE0} %{SOURCE1} %{SOURCE2}; do
# Upstream signs the uncompressed tarballs
tar=${src/%.xz/}
xz -dc $src > $tar
gpgv2 --homedir "$gpghome" --quiet --keyring $key.gpg $tar.sign $tar
rm -f $tar
done
rm -rf "$gpghome" # Cleanup tmp gpg home dir
%setup -q
%patch0 -p1
%patch1 -p1
%if %{emacs_old}
%patch3 -p1
%endif
# Remove git-archimport from command list
sed -i '/^git-archimport/d' command-list.txt
%if %{use_prebuilt_docs}
mkdir -p prebuilt_docs/{html,man}
xz -dc %{SOURCE1} | tar xf - -C prebuilt_docs/html
xz -dc %{SOURCE2} | tar xf - -C prebuilt_docs/man
# Remove non-html files
find prebuilt_docs/html -type f ! -name '*.html' | xargs rm
find prebuilt_docs/html -type d | xargs rmdir --ignore-fail-on-non-empty
%endif
# Use these same options for every invocation of 'make'.
# Otherwise it will rebuild in %%install due to flags changes.
cat << \EOF > config.mak
V = 1
CFLAGS = %{optflags}
LDFLAGS = %{__global_ldflags}
NEEDS_CRYPTO_WITH_SSL = 1
USE_LIBPCRE = 1
ETC_GITCONFIG = %{_sysconfdir}/gitconfig
DESTDIR = %{buildroot}
INSTALL = install -p
GITWEB_PROJECTROOT = %{_localstatedir}/lib/git
GNU_ROFF = 1
htmldir = %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
prefix = %{_prefix}
gitwebdir = %{_localstatedir}/www/git
EOF
%if "%{gitcoredir}" == "%{_bindir}"
echo gitexecdir = %{_bindir} >> config.mak
%endif
%if %{docbook_suppress_sp}
# This is needed for 1.69.1-1.71.0
echo DOCBOOK_SUPPRESS_SP = 1 >> config.mak
%endif
# Filter bogus perl requires
# packed-refs comes from a comment in contrib/hooks/update-paranoid
# YAML::Any is optional and not available on el5
%if %{use_new_rpm_filters}
%{?perl_default_filter}
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(packed-refs\\)
%if ! %{defined perl_bootstrap}
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(Term::ReadKey\\)
%endif
%else
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
sed \
%if %{filter_yaml_any}
-e '/perl(YAML::Any)/d' \
%endif
-e '/perl(packed-refs)/d'
EOF
%global __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
chmod +x %{__perl_requires}
%endif
%build
make %{?_smp_mflags} all
%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
make %{?_smp_mflags} doc
%endif
make -C contrib/emacs
%if %{gnome_keyring}
make -C contrib/credential/gnome-keyring/
%endif
%if %{libsecret}
make -C contrib/credential/libsecret/
%endif
make -C contrib/credential/netrc/
make -C contrib/subtree/
# Remove shebang from bash-completion script
sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash
%install
rm -rf %{buildroot}
make %{?_smp_mflags} INSTALLDIRS=vendor install
%if ! %{use_prebuilt_docs} && ! 0%{?_without_docs}
make %{?_smp_mflags} INSTALLDIRS=vendor install-doc
%else
cp -a prebuilt_docs/man/* %{buildroot}%{_mandir}
cp -a prebuilt_docs/html/* Documentation/
%endif
%if %{emacs_old}
%global _emacs_sitelispdir %{_datadir}/emacs/site-lisp
%global _emacs_sitestartdir %{_emacs_sitelispdir}/site-start.d
%endif
%global elispdir %{_emacs_sitelispdir}/git
make -C contrib/emacs install \
emacsdir=%{buildroot}%{elispdir}
for elc in %{buildroot}%{elispdir}/*.elc ; do
install -pm 644 contrib/emacs/$(basename $elc .elc).el \
%{buildroot}%{elispdir}
done
install -Dpm 644 %{SOURCE10} \
%{buildroot}%{_emacs_sitestartdir}/git-init.el
%if %{gnome_keyring}
install -pm 755 contrib/credential/gnome-keyring/git-credential-gnome-keyring \
%{buildroot}%{gitcoredir}
# Remove built binary files, otherwise they will be installed in doc
make -C contrib/credential/gnome-keyring/ clean
%endif
%if %{libsecret}
install -pm 755 contrib/credential/libsecret/git-credential-libsecret \
%{buildroot}%{gitcoredir}
# Remove built binary files, otherwise they will be installed in doc
make -C contrib/credential/libsecret/ clean
%endif
install -pm 755 contrib/credential/netrc/git-credential-netrc \
%{buildroot}%{gitcoredir}
make -C contrib/subtree install
%if ! %{use_prebuilt_docs}
make -C contrib/subtree install-doc
%endif
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
install -pm 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/httpd/conf.d/git.conf
sed "s|@PROJECTROOT@|%{_localstatedir}/lib/git|g" \
%{SOURCE14} > %{buildroot}%{_sysconfdir}/gitweb.conf
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
find %{buildroot} -type f -name perllocal.pod -exec rm -f {} ';'
# Clean up contrib/credential to avoid cruft in the git docdir
rm -rf contrib/credential
# Clean up contrib/subtree to avoid cruft in the git docdir
rm -rf contrib/subtree/{INSTALL,Makefile,git-subtree{,.{1,html,sh,txt,xml}},t}
# git-archimport is not supported
find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} ';'
exclude_re="archimport|email|git-citool|git-cvs|git-daemon|git-gui|git-remote-bzr|git-remote-hg|gitk|p4|svn"
(find %{buildroot}{%{_bindir},%{_libexecdir}} -type f | grep -vE "$exclude_re" | sed -e s@^%{buildroot}@@) > bin-man-doc-files
(find %{buildroot}{%{_bindir},%{_libexecdir}} -mindepth 1 -type d | grep -vE "$exclude_re" | sed -e 's@^%{buildroot}@%dir @') >> bin-man-doc-files
(find %{buildroot}%{perl_vendorlib} -type f | sed -e s@^%{buildroot}@@) > perl-git-files
(find %{buildroot}%{perl_vendorlib} -mindepth 1 -type d | sed -e 's@^%{buildroot}@%dir @') >> perl-git-files
# Split out Git::SVN files
grep Git/SVN perl-git-files > perl-git-svn-files
sed -i "/Git\/SVN/ d" perl-git-files
%if %{!?_without_docs:1}0
(find %{buildroot}%{_mandir} -type f | grep -vE "$exclude_re|Git" | sed -e s@^%{buildroot}@@ -e 's/$/*/' ) >> bin-man-doc-files
%else
rm -rf %{buildroot}%{_mandir}
%endif
mkdir -p %{buildroot}%{_localstatedir}/lib/git
%if %{use_systemd}
mkdir -p %{buildroot}%{_unitdir}
cp -a %{SOURCE15} %{SOURCE16} %{buildroot}%{_unitdir}
%else
mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d
# On EL <= 5, xinetd does not enable IPv6 by default
enable_ipv6=" # xinetd does not enable IPv6 by default
flags = IPv6"
perl -p \
-e "s|\@GITCOREDIR\@|%{gitcoredir}|g;" \
-e "s|\@BASE_PATH\@|%{_localstatedir}/lib/git|g;" \
%if %{enable_ipv6}
-e "s|^}|$enable_ipv6\n$&|;" \
%endif
%{SOURCE11} > %{buildroot}%{_sysconfdir}/xinetd.d/git
%endif
# Setup bash completion
install -Dpm 644 contrib/completion/git-completion.bash %{buildroot}%{bashcompdir}/git
ln -s git %{buildroot}%{bashcompdir}/gitk
# Install tcsh completion
mkdir -p %{buildroot}%{_datadir}/git-core/contrib/completion
install -pm 644 contrib/completion/git-completion.tcsh \
%{buildroot}%{_datadir}/git-core/contrib/completion/
# Move contrib/hooks out of %%docdir and make them executable
mkdir -p %{buildroot}%{_datadir}/git-core/contrib
mv contrib/hooks %{buildroot}%{_datadir}/git-core/contrib
chmod +x %{buildroot}%{_datadir}/git-core/contrib/hooks/*
pushd contrib > /dev/null
ln -s ../../../git-core/contrib/hooks
popd > /dev/null
# Install git-prompt.sh
mkdir -p %{buildroot}%{_datadir}/git-core/contrib/completion
install -pm 644 contrib/completion/git-prompt.sh \
%{buildroot}%{_datadir}/git-core/contrib/completion/
# install git-gui .desktop file
desktop-file-install \
%if %{desktop_vendor_tag}
--vendor fedora \
%endif
--dir=%{buildroot}%{_datadir}/applications %{SOURCE13}
# find translations
%find_lang %{name} %{name}.lang
cat %{name}.lang >> bin-man-doc-files
# quiet some rpmlint complaints
chmod -R g-w %{buildroot}
find %{buildroot} -name git-mergetool--lib | xargs chmod a-x
# These files probably are not needed
find . -name '.*/\.\(git\(attributes\|ignore\)\|perlcriticrc\)' -delete
chmod a-x Documentation/technical/api-index.sh
find contrib -type f | xargs chmod -x
# Split core files
not_core_re="git-(add--interactive|am|credential-(gnome-keyring|libsecret|netrc)|difftool|instaweb|relink|request-pull|send-mail|submodule)|gitweb|prepare-commit-msg|pre-rebase"
grep -vE "$not_core_re|%{_mandir}" bin-man-doc-files > bin-files-core
grep -vE "$not_core_re" bin-man-doc-files | grep "%{_mandir}" > bin-man-doc-git-files
grep -E "$not_core_re" bin-man-doc-files \
| grep -v "credential-gnome-keyring" >> bin-man-doc-git-files
##### DOC
# place doc files into %%{_pkgdocdir} and split them into expected packages
# contrib
not_core_doc_re="(git-(cvs|gui|citool|daemon))|p4|svn|email|gitk|gitweb"
mkdir -p %{buildroot}%{_pkgdocdir}/
cp -r README.md Documentation/*.txt Documentation/RelNotes contrib %{buildroot}%{_pkgdocdir}/
%if ! 0%{?_without_docs}
cp -r Documentation/*.html Documentation/docbook-xsl.css %{buildroot}%{_pkgdocdir}/
cp -r Documentation/{howto,technical} %{buildroot}%{_pkgdocdir}/
find %{buildroot}%{_pkgdocdir}/{howto,technical} -type f \
|grep -o "%{_pkgdocdir}.*$" >> bin-man-doc-git-files
%endif
{
find %{buildroot}%{_pkgdocdir} -type f -maxdepth 1 \
| grep -o "%{_pkgdocdir}.*$" \
| grep -vE "$not_core_doc_re"
find %{buildroot}%{_pkgdocdir}/{contrib,RelNotes} -type f \
| grep -o "%{_pkgdocdir}.*$"
find %{buildroot}%{_pkgdocdir} -type d | grep -o "%{_pkgdocdir}.*$" \
| sed "s/^/\%dir /"
} >> bin-man-doc-git-files
#NOTE: I guess we can throw it out
#mkdir -p %{buildroot}%{_docdir}/gitweb
#cp gitweb/{README,INSTALL} %{buildroot}%{_docdir}/gitweb
##### #DOC
%check
%if %{test_links}
find %{buildroot}%{_pkgdocdir} -name "*.html" | xargs linkchecker
%endif
%ifarch s390x
# Skip grep tests which fail intermittently on s390x
export GIT_SKIP_TESTS="t7810"
%endif
make test
%clean
rm -rf %{buildroot}
%if %{use_systemd}
%post daemon
%systemd_post git@.service
%preun daemon
%systemd_preun git@.service
%postun daemon
%systemd_postun_with_restart git@.service
%endif
%files -f bin-man-doc-git-files
%defattr(-,root,root)
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
%{elispdir}
%{_emacs_sitestartdir}/git-init.el
%endif
%{_datadir}/git-core/contrib/hooks/update-paranoid
%{_datadir}/git-core/contrib/hooks/setgitperms.perl
%exclude %{_pkgdocdir}/contrib/*/*.py[co]
%{_pkgdocdir}/contrib/hooks
%files core -f bin-files-core
%defattr(-,root,root)
#NOTE: this is only use of the %%doc macro in this spec file and should not
# be used elsewhere
%{!?_licensedir:%global license %doc}
%license COPYING
# exlude is best way here because of troubels with symlinks inside git-core/
%exclude %{_datadir}/git-core/contrib/hooks/update-paranoid
%exclude %{_datadir}/git-core/contrib/hooks/setgitperms.perl
%{bashcomproot}
%{_datadir}/git-core/
%files p4
%defattr(-,root,root)
%{gitcoredir}/*p4*
%{gitcoredir}/mergetools/p4merge
%{_pkgdocdir}/*p4*.txt
%{!?_without_docs: %{_mandir}/man1/*p4*.1*}
%{!?_without_docs: %{_pkgdocdir}/*p4*.html }
%files svn
%defattr(-,root,root)
%{gitcoredir}/*svn*
#NOTE: what about svn-fe
%{_pkgdocdir}/*svn*.txt
%{!?_without_docs: %{_mandir}/man1/*svn*.1*}
%{!?_without_docs: %{_pkgdocdir}/*svn*.html }
%files cvs
%defattr(-,root,root)
%{_pkgdocdir}/*git-cvs*.txt
%if "%{gitcoredir}" != "%{_bindir}"
%{_bindir}/git-cvsserver
%endif
%{gitcoredir}/*cvs*
%{!?_without_docs: %{_mandir}/man1/*cvs*.1*}
%{!?_without_docs: %{_pkgdocdir}/*git-cvs*.html }
%files email
%defattr(-,root,root)
%{_pkgdocdir}/*email*.txt
%{gitcoredir}/*email*
%{!?_without_docs: %{_mandir}/man1/*email*.1*}
%{!?_without_docs: %{_pkgdocdir}/*email*.html }
%files gui
%defattr(-,root,root)
%{gitcoredir}/git-gui*
%{gitcoredir}/git-citool
%{_datadir}/applications/*git-gui.desktop
%{_datadir}/git-gui/
%{_pkgdocdir}/git-gui.txt
%{_pkgdocdir}/git-citool.txt
%{!?_without_docs: %{_mandir}/man1/git-gui.1*}
%{!?_without_docs: %{_pkgdocdir}/git-gui.html}
%{!?_without_docs: %{_mandir}/man1/git-citool.1*}
%{!?_without_docs: %{_pkgdocdir}/git-citool.html}
%files -n gitk
%defattr(-,root,root)
%{_pkgdocdir}/*gitk*.txt
%{_bindir}/*gitk*
%{_datadir}/gitk
%{!?_without_docs: %{_mandir}/man1/*gitk*.1*}
%{!?_without_docs: %{_pkgdocdir}/*gitk*.html }
%files -n perl-Git -f perl-git-files
%defattr(-,root,root)
%exclude %{_mandir}/man3/*Git*SVN*.3pm*
%{!?_without_docs: %{_mandir}/man3/*Git*.3pm*}
%files -n perl-Git-SVN -f perl-git-svn-files
%defattr(-,root,root)
%{!?_without_docs: %{_mandir}/man3/*Git*SVN*.3pm*}
%if 0%{?rhel} && 0%{?rhel} <= 6
%files -n emacs-git
%defattr(-,root,root)
%{_pkgdocdir}/contrib/emacs/README
%dir %{elispdir}
%{elispdir}/*.elc
%{_emacs_sitestartdir}/git-init.el
%files -n emacs-git-el
%defattr(-,root,root)
%{elispdir}/*.el
%endif
%files daemon
%defattr(-,root,root)
%{_pkgdocdir}/git-daemon*.txt
%if %{use_systemd}
%{_unitdir}/git.socket
%{_unitdir}/git@.service
%else
%config(noreplace)%{_sysconfdir}/xinetd.d/git
%endif
%{gitcoredir}/git-daemon
%{_localstatedir}/lib/git
%{!?_without_docs: %{_mandir}/man1/git-daemon*.1*}
%{!?_without_docs: %{_pkgdocdir}/git-daemon*.html}
%files -n gitweb
%defattr(-,root,root)
%{_pkgdocdir}/gitweb*.txt
%{!?_without_docs: %{_pkgdocdir}/gitweb*.html}
%config(noreplace)%{_sysconfdir}/gitweb.conf
%config(noreplace)%{_sysconfdir}/httpd/conf.d/git.conf
%{_localstatedir}/www/git/
%if %{gnome_keyring}
%files gnome-keyring
%defattr(-,root,root)
%{gitcoredir}/git-credential-gnome-keyring
%endif
%files all
# No files for you!
%changelog
* Thu Jul 20 2017 Petr Stodulka <pstodulk@redhat.com> - 2.13.3-2
- Move documentation files from all subpackages into the %%{_pkgdocdir}
directory, so links inside doc and man files are correct
Resolves: #1357438
- Quiet a few rpmlint complaints regarding hidden files in contrib dir
* Thu Jul 13 2017 Gwyn Ciesla <limburgher@gmail.com> - 2.13.3-1
- Update to 2.13.3
* Sun Jun 25 2017 Todd Zullinger <tmz@pobox.com> - 2.13.2-1
- Update to 2.13.2
- Skip grep tests which fail intermittently on s390x
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.13.1-2
- Perl 5.26 re-rebuild of bootstrapped packages
* Mon Jun 05 2017 Todd Zullinger <tmz@pobox.com> - 2.13.1-1
- Update to 2.13.1
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.13.0-3
- Perl 5.26 rebuild
* Wed May 17 2017 Todd Zullinger <tmz@pobox.com> - 2.13.0-2
- Use default, collision-detecting SHA1 implementation
* Tue May 09 2017 Todd Zullinger <tmz@pobox.com> - 2.13.0-1
- Update to 2.13.0 (resolves CVE-2017-8386)
* Wed Mar 29 2017 Gwyn Ciesla <limburgher@gmail.com> - 2.12.2-1
- Update to 2.12.2
* Tue Mar 21 2017 Gwyn Ciesla <limburgher@gmail.com> - 2.12.1-1
- Update to 2.12.1
* Mon Feb 27 2017 Jon Ciesla <limburgher@gmail.com> - 2.12.0-1
- Update to 2.12.0
* Fri Feb 17 2017 Petr Stodulka <pstodulk@redhat.com> - 2.11.1-3
- remove non-ASCII characters from description and title of packages
- fix requiremets
- fix spec to be compatible for other systems
- remove deprecated credential-gnome-keyring
* Fri Feb 17 2017 Todd Zullinger <tmz@pobox.com> - 2.11.1-3
- Remove unnecessary rsync requirement from git-core
- Move gnome-keyring credential helper from git-core to git
- Enable libsecret credential helper
- Run git test suite
- Use %%{_mandir} in git/git-core file list filters
- Fix version of emacs-git and emacs-git-el provides
- Clean up contrib/{credential,subtree} to avoid cruft in git-core-doc
- Fix a number of macro-in-comment warnings from rpmlint
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Feb 03 2017 Jon Ciesla <limburgher@gmail.com> - 2.11.1-1
- Update to 2.11.1
* Wed Nov 30 2016 Jon Ciesla <limburgher@gmail.com> - 2.11.0-1
- Update to 2.11.0
* Mon Oct 31 2016 Jon Ciesla <limburgher@gmail.com> - 2.10.2-1
- Update to 2.10.2
* Tue Oct 04 2016 Jon Ciesla <limburgher@gmail.com> - 2.10.1-1
- Update to 2.10.1
* Sat Sep 03 2016 Todd Zullinger <tmz@pobox.com> - 2.10.0-1
- Update to 2.10.0
* Mon Aug 15 2016 Jon Ciesla <limburgher@gmail.com> - 2.9.3-1
- Update to 2.9.3.
* Fri Jul 15 2016 Jon Ciesla <limburgher@gmail.com> - 2.9.2-1
- Update to 2.9.2.
* Tue Jul 12 2016 Jon Ciesla <limburgher@gmail.com> - 2.9.1-1
- Update to 2.9.1.
* Tue Jun 14 2016 Jon Ciesla <limburgher@gmail.com> - 2.9.0-1
- Update to 2.9.0.
* Wed Jun 08 2016 Jon Ciesla <limburgher@gmail.com> - 2.8.4-1
- Update to 2.8.4.
* Fri May 20 2016 Jitka Plesnikova <jplesnik@redhat.com> - 2.8.3-2
- Perl 5.24 rebuild
* Thu May 19 2016 Todd Zullinger <tmz@pobox.com> - 2.8.3-1
- Update to 2.8.3
* Thu May 19 2016 Jitka Plesnikova <jplesnik@redhat.com> - 2.8.2-5
- Perl 5.24 re-rebuild of bootstrapped packages
* Wed May 18 2016 Todd Zullinger <tmz@pobox.com> - 2.8.2-4
- Use perl(MOD::NAME) format for perl-DBD-SQLite and perl-Digest-MD5 deps
- Define __global_ldflags on EL < 7 (#1337137)
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 2.8.2-3
- Perl 5.24 re-rebuild of bootstrapped packages
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 2.8.2-2
- Perl 5.24 rebuild
* Fri Apr 29 2016 Todd Zullinger <tmz@pobox.com> - 2.8.2-1
- Update to 2.8.2
* Mon Apr 11 2016 Todd Zullinger <tmz@pobox.com> - 2.8.1-3
- Set LDFLAGS for hardened builds (#1289728)
* Wed Apr 06 2016 Paolo Bonzini <pbonzini@redhat.com> - 2.8.1-2
- Install git-credentials-netrc (#1303358)
* Tue Apr 05 2016 Jon Ciesla <limburgher@gmail.com> - 2.8.1-1
- Update to 2.8.1.
* Tue Mar 29 2016 Neal Gompa <ngompa13{%}gmail{*}com> - 2.8.0-1
- Update to 2.8.0
- Use license macro for COPYING
* Sun Mar 27 2016 Todd Zullinger <tmz@pobox.com> - 2.7.4-2
- Use https for URL / Source and smaller tar.xz files
- Check upstream GPG signatures in %%prep
* Tue Mar 22 2016 Konrad Scherer <Konrad.Scherer@windriver.com>
- Workaround missing git subtree documentation in prebuilt docs (bug 1320210)
- Only add git-cvsserver binary once if the core dir matches the bin dir as it
does on el5 (bug 1320210)
* Tue Mar 22 2016 Todd Zullinger <tmz@pobox.com>
- Conditionalize bash-completion pkg-config usage for EL <= 6 (bug 1320210)
* Fri Mar 18 2016 David Woodhouse <dwmw2@infradead.org> - 2.7.4-1
- Update to 2.7.4 (for CVE-2016-2315, CVE-2016-2324)
Resolves: #1318220
* Mon Mar 14 2016 Jon Ciesla <limburgher@gmail.com> - 2.7.3-1
- Update to 2.7.3.
* Tue Feb 23 2016 Jon Ciesla <limburgher@gmail.com> - 2.7.2-1
- Update to 2.7.2.
* Sat Feb 06 2016 Jon Ciesla <limburgher@gmail.com> - 2.7.1-1
- Update to 2.7.1.
* Thu Feb 04 2016 Petr Stodulka <pstodulk@redhat.com> - 2.7.0-3
- remove all '.gitignore' files from packages
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jan 05 2016 Jon Ciesla <limburgher@gmail.com> - 2.7.0-1
- Update to 2.7.0.
- Infinite loop patch appears obsolete.
* Wed Dec 09 2015 Jon Ciesla <limburgher@gmail.com> - 2.6.4-1
- Update to 2.6.4.
* Fri Nov 27 2015 Petr Stodulka <pstodulk@redhat.com> - 2.6.3-2
- found 2 perl scripts in git-core, move them to git package
(#1284688)
* Fri Nov 06 2015 Jon Ciesla <limburgher@gmail.com> - 2.6.3-1
- Update to 2.6.3.
* Tue Nov 03 2015 Petr Stodulka <pstodulk@gmail.com> - 2.6.2-2
- provides failback for the macro _pkgdocdir (#1277550)
* Sat Oct 17 2015 Jon Ciesla <limburgher@gmail.com> - 2.6.2-1
- Update to 2.6.2.
* Tue Oct 06 2015 Jon Ciesla <limburgher@gmail.com> - 2.6.1-1
- Update to 2.6.1.
* Tue Sep 29 2015 Jon Ciesla <limburgher@gmail.com> - 2.6.0-1
- Update to 2.6.0.
* Fri Sep 18 2015 Jon Ciesla <limburgher@gmail.com> - 2.5.3-1