diff --git a/SOURCES/README b/SOURCES/README index c299784..6ed2fbc 100644 --- a/SOURCES/README +++ b/SOURCES/README @@ -1,33 +1,38 @@ -Package %{scl_name} provides The Apache HTTP Server as a Software -Collection. For more information about Software Collections, see -scl(1). By installing the %{scl_name} collection, you will get a -minimal set of packages to have a working Apache HTTP Server. +NAME + %{scl_name} - manual page for %{scl_name} Software Collection -Usage: scl enable %{scl} 'httpd' +SYNOPSIS + %{start_command} -Software Collections allows use of applications which are not located -in the filesystem root hierarchy but are present in an alternative -location, which is %{_scl_root} in case of the %{scl_name} -collection. +DESCRIPTION + Package %{scl_name} provides Apache httpd web server as a Software Collection. + For more information about Software Collections, see the scl(1) man + page. By installing the %{scl_name} collection, you will get the minimum + working set of packages to have a working Apache httpd web server. -The Apache HTTP Server is a powerful, efficient, and extensible -web server. + Software Collections allows use of applications which are not located + in the filesystem root hierarchy but are present in an alternative + location, which is %{_scl_root} in case of the %{scl_name} collection. -When working with the %{scl_name} collection, use the "scl" utility -(see scl(1) for usage) to enable the scl environment properly. + When you want to work with the %{scl_name} collection, use the scl + utility (see the scl(1) man page for usage) to enable the scl environ‐ + ment. -Configuration for the %{scl_name} software collection is located under %{_sysconfdir}. +EXAMPLES + scl enable %{scl_name} 'command --arg' -Examples: -scl enable %{scl_name} 'command --arg' - Run a specific command with argument --arg within %{scl_name} software collections - environment. + Run a specific command with the argument --arg within the + %{scl_name} software collections environment. -scl enable %{scl_name} bash - Run interactive shell where %{scl_name} software collection is enabled. + scl enable %{scl_name} bash -scl enable %{scl_name} 'man httpd' - Show man pages for httpd command, which is part of the %{scl_name} software - collection. + Run an interactive shell with the %{scl_name} software collec‐ + tion enabled. -Report bugs to . + scl enable %{scl_name} 'man httpd' + + Show man pages for the httpd command, which is a part of the + %{scl_name} software collection. + +REPORTING BUGS + Report bugs to . diff --git a/SOURCES/README.7 b/SOURCES/README.7 new file mode 100644 index 0000000..ba683cf --- /dev/null +++ b/SOURCES/README.7 @@ -0,0 +1,36 @@ +.TH %{scl_name} "7" "" "%{scl_name} Software Collection" "User Commands" +.SH NAME +%{scl_name} \- manual page for %{scl_name} Software Collection +.SH SYNOPSIS +\fI%{start_command}\fR +.SH DESCRIPTION +Package %{scl_name} provides Apache httpd web server as a Software +Collection. For more information about Software Collections, +see the \fIscl\fR(1) man page. By installing the %{scl_name} collection, +you will get the minimum working set of packages to have a working Apache httpd +web-server. +.PP +Software Collections allows use of applications which are not located +in the filesystem root hierarchy but are present in an alternative +location, which is \fI%{_scl_root}\fR in case of the %{scl_name} +collection. +.PP +When you want to work with the %{scl_name} collection, use the \fBscl\fR +utility (see the \fIscl\fR(1) man page for usage) to enable the scl +environment. +.SH EXAMPLES +scl enable %{scl_name} \[aq]\fIcommand\fR \fB\-\-arg\fR\[aq] +.IP +Run a specific \fIcommand\fR with the argument \fB\-\-arg\fR within the +%{scl_name} software collections environment. +.PP +scl enable %{scl_name} bash +.IP +Run an interactive shell with the %{scl_name} software collection enabled. +.PP +scl enable %{scl_name} \[aq]man httpd\[aq] +.IP +Show man pages for the httpd command, which is a part of the +%{scl_name} software collection. +.SH "REPORTING BUGS" +Report bugs to . diff --git a/SPECS/httpd24.spec b/SPECS/httpd24.spec index b347f01..608fd67 100644 --- a/SPECS/httpd24.spec +++ b/SPECS/httpd24.spec @@ -6,16 +6,21 @@ # do not produce empty debuginfo package %global debug_package %{nil} +%if 0%{?rhel} >= 7 %define use_system_apr 1 +%else +%define use_system_apr 0 +%endif Summary: Package that installs %scl Name: %scl_name Version: 1.1 -Release: 9%{?dist} +Release: 14%{?dist} License: GPLv2+ Group: Applications/File Source0: README Source1: LICENSE +Source2: README.7 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: scl-utils-build @@ -23,7 +28,21 @@ BuildRequires: scl-utils-build BuildRequires: iso-codes BuildRequires: help2man -%if ! %{use_system_apr} +%if %{use_system_apr} +# Remove httpd24-apr and httpd24-apr-util from system. +# https://bugzilla.redhat.com/show_bug.cgi?id=1088194 +Obsoletes: %{scl_prefix}apr +Obsoletes: %{scl_prefix}apr-devel +Obsoletes: %{scl_prefix}apr-util +Obsoletes: %{scl_prefix}apr-util-devel +Obsoletes: %{scl_prefix}apr-util-pgsql +Obsoletes: %{scl_prefix}apr-util-mysql +Obsoletes: %{scl_prefix}apr-util-sqlite +Obsoletes: %{scl_prefix}apr-util-odbc +Obsoletes: %{scl_prefix}apr-util-ldap +Obsoletes: %{scl_prefix}apr-util-openssl +Obsoletes: %{scl_prefix}apr-util-nss +%else Requires: %{scl_prefix}apr Requires: %{scl_prefix}apr-util %endif @@ -36,19 +55,6 @@ This is the main package for %scl Software Collection. Summary: Package that handles %scl Software Collection. Requires: scl-utils Requires(post): policycoreutils-python -# Remove httpd24-apr and httpd24-apr-util from system. -# https://bugzilla.redhat.com/show_bug.cgi?id=1088194 -Obsoletes: %{scl_prefix}apr <= 1.5.1-1%{?dist} -Obsoletes: %{scl_prefix}apr-devel <= 1.5.1-1%{?dist} -Obsoletes: %{scl_prefix}apr-util <= 1.5.4-1%{?dist} -Obsoletes: %{scl_prefix}apr-util-devel <= 1.5.4-1%{?dist} -Obsoletes: %{scl_prefix}apr-util-pgsql <= 1.5.4-1%{?dist} -Obsoletes: %{scl_prefix}apr-util-mysql <= 1.5.4-1%{?dist} -Obsoletes: %{scl_prefix}apr-util-sqlite <= 1.5.4-1%{?dist} -Obsoletes: %{scl_prefix}apr-util-odbc <= 1.5.4-1%{?dist} -Obsoletes: %{scl_prefix}apr-util-ldap <= 1.5.4-1%{?dist} -Obsoletes: %{scl_prefix}apr-util-openssl <= 1.5.4-1%{?dist} -Obsoletes: %{scl_prefix}apr-util-nss <= 1.5.4-1%{?dist} %description runtime Package shipping essential scripts to work with %scl Software Collection. @@ -71,23 +77,31 @@ packages depending on %scl Software Collection. %prep %setup -c -T -# This section generates README file from a template and creates man page -# from that file, expanding RPM macros in the template file. -cat >README <<'EOF' -%{expand:%(cat %{SOURCE0})} -EOF - # copy the license file so %%files section sees it +cp %{SOURCE0} . cp %{SOURCE1} . +cp %{SOURCE2} . + +expand_variables() { + sed -i 's|%%{scl_name}|%{scl_name}|g' "$1" + sed -i 's|%%{_scl_root}|%{_scl_root}|g' "$1" + sed -i 's|%%{version}|%{version}|g' "$1" +%if 0%{?rhel} > 6 + sed -i 's|%%{start_command}|systemctl start %{scl_name}-httpd|g' "$1" +%else + sed -i 's|%%{start_command}|service %{scl_name}-httpd start|g' "$1" +%endif +} -# Not required for now -#export LIBRARY_PATH=%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}} -#export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}} +expand_variables README.7 +expand_variables README cat <h2m_helper <<'EOF' -#!/bin/bash -[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README -EOF -chmod a+x h2m_helper - -# generate the man page -help2man -N --section 7 ./h2m_helper -o %{scl_name}.7 - %install mkdir -p %{buildroot}%{_scl_scripts}/root install -m 644 enable %{buildroot}%{_scl_scripts}/enable install -D -m 644 scldev %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel -# install generated man page -mkdir -p %{buildroot}%{_mandir}/man1/ -mkdir -p %{buildroot}%{_mandir}/man7/ -mkdir -p %{buildroot}%{_mandir}/man8/ +# All directories used must be owned +mkdir -p %{buildroot}%{_mandir}/man{1,3,7,8}/ mkdir -p %{buildroot}%{_libdir}/pkgconfig/ mkdir -p %{buildroot}%{_datadir}/aclocal/ -install -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7 +mkdir -p %{buildroot}%{_datadir}/zsh/ +mkdir -p %{buildroot}%{_datadir}/licenses/ + +install -m 644 README.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7 %scl_install @@ -141,7 +146,6 @@ EOF # have its own policy for collection semanage fcontext -a -e / %{_scl_root} >/dev/null 2>&1 || : restorecon -R %{_scl_root} >/dev/null 2>&1 || : -selinuxenabled && load_policy || : %files @@ -149,13 +153,12 @@ selinuxenabled && load_policy || : %defattr(-,root,root) %doc README LICENSE %scl_files -%dir %{_mandir}/man1 -%dir %{_mandir}/man7 -%dir %{_mandir}/man8 +%dir %{_mandir}/man? %dir %{_libdir}/pkgconfig %dir %{_datadir}/aclocal +%dir %{_datadir}/licenses +%dir %{_datadir}/zsh %{_mandir}/man7/%{scl_name}.* - %config(noreplace) %{_scl_scripts}/service-environment %files build @@ -167,14 +170,28 @@ selinuxenabled && load_policy || : %{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel %changelog -* Tue Feb 03 2015 Jan Kaluza - 1.1.9 -- use httpd24-apr and httpd24-apr-util from system on RHEL7 (#1187646) +* Fri May 06 2016 Jan Kaluza - 1.1-14 +- Resolves:#1219112 - fix error in man page + +* Fri May 06 2016 Jan Kaluza - 1.1-13 +- Resolves:#1219112 - fix nginx mentions in the man page + +* Thu Apr 14 2016 Joe Orton - 1.1-12 +- own more directories (#1319968) -* Mon Feb 02 2015 Jan Kaluza - 1.1.8 -- use httpd24-apr and httpd24-apr-util even on RHEL7 (#1187646) +* Wed Feb 10 2016 Jan Kaluza - 1.1-11 +- bump the release to match the RHEL6 version of httpd24 -* Mon Jan 05 2015 Jan Kaluza - 1.1-7 -- obsolete httpd24-apr and http24-apr-util (#1088194) +* Wed Feb 10 2016 Jan Kaluza - 1.1-7 +- Obsolete all versions of httpd24-apr and httpd24-apr-util on RHEL7 (#1218271) +- Do not mention RHSCL version in README and man page (#1219112) +- Fix bad man page syntax (#1219511) + +* Tue Feb 09 2016 Jan Kaluza - 1.1-6 +- use LD_LIBRARY_PATH in enable script + +* Wed Jan 28 2015 Jan Kaluza 1.1-5 +- rebuild for rhscl-2.0 * Mon Mar 31 2014 Honza Horak - 1.1-4 - Fix path typo in README @@ -189,18 +206,12 @@ selinuxenabled && load_policy || : * Wed Feb 12 2014 Jan Kaluza - 1.1-1 - add README and LICENSE (#1061446) -* Mon Jan 20 2014 Jan Kaluza - 1.10 -- rebuild because of missing uucp user (#1054719) +* Wed Jan 15 2014 Jan Kaluza - 1.8 +- add policycoreutils-python dependency (#1052933) -* Wed Jan 15 2014 Jan Kaluza - 1.9 -- execute load_policy to load newly created SELinux policy (#1052935) - -* Tue Nov 12 2013 Jan Kaluza - 1.8 +* Tue Nov 12 2013 Jan Kaluza - 1.7 - add service-environment config file -* Wed Sep 25 2013 Jan Kaluza - 1.7 -- use system APR/APR-util - * Fri Sep 20 2013 Jan Kaluza - 1.6 - add prep section and cleanup spec file