trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reindl Harald <h.rei...@thelounge.net>
Subject Re: ATS - Performance Related Questions - High
Date Sat, 09 Nov 2013 14:38:04 GMT

Am 09.11.2013 15:25, schrieb Jean Baptiste Favre:
> On 09/11/2013 09:13, Omid Kosari wrote:
>> Bryan Call wrote
>>> Don't compile your own version of ATS and use the packages on dist.
>>
>> Unfortunately dists are a bit lazy to implement latest versions . How we can
>> use 4.x on ubuntu ?
> 
> You can backport it :)
> 
> But, since Ubuntu is based on Debian and Debian does not provides 4.x
> yet, you'll have to adapt packaging from an earlier version. Using 3.3.2
> version available in Debian experimental is a good start.
> 
> Another solution is to build ATS from source. But then, you'll loose
> packaging advantages

says who?

people which seriously maintain servers could/should learn how to make
packages and that is pretty sure doable on Debian systems too

-rw-r----- 1 builduser builduser 2,4K 2013-10-30 21:36 x264-latest.spec
[builduser@buildserver:/rpmbuild/SPECS]$ ls -lha *.spec | wc -l
82

[root@proxy:~]$ rpm -q trafficserver
trafficserver-4.0.2-2.fc18.20131027.rh.x86_64
________________________________________________

[builduser@buildserver:/rpmbuild/SPECS]$ cat trafficserver.spec
%global            debug_package    %{nil}

Summary:           Apache Trafficserver
Name:              trafficserver
Version:           4.0.2
Release:           2%{?dist}
License:           ASL 2.0
Group:             System Environment/Daemons
Source0:           http://www.apache.org/dist/%{name}/%{name}-%{version}.tar.bz2
Source1:           %{name}.service
Source2:           %{name}.tmpfilesd
Patch1:            trafficserver-404-not-found.patch
URL:               http://trafficserver.apache.org/index.html
BuildRequires:     autoconf
BuildRequires:     automake
BuildRequires:     expat-devel
BuildRequires:     gcc-c++
BuildRequires:     hwloc-devel
BuildRequires:     libtool
BuildRequires:     openssl-devel
BuildRequires:     pcre-devel
BuildRequires:     tcl-devel
BuildRequires:     xz-devel
BuildRequires:     zlib-devel
Requires:          systemd

%description
Apache Traffic Server is a fast, scalable and extensible HTTP/1.1 compliant caching proxy
server

%package           devel
Summary:           Apache Traffic Server development libraries and header files
Group:             Development/Libraries
Requires:          %{name} = %{version}-%{release}
%description       devel

%package           manpages
Summary:           Trafficserver manuals

Group:             Applications/System

%description       manpages



%package           plugins

Summary:           Trafficserver plugins
Group:             Applications/System
%description       plugins

%prep
%setup -q
%patch1 -p1

%build
export CFLAGS="%{optflags} -fPIC -fPIE -fstack-protector-all -Wno-deprecated-declarations
-Wno-error=unused-result"
export CXXFLAGS="%{optflags} -fPIC -fPIE -fstack-protector-all -Wno-deprecated-declarations
-Wno-error=unused-result"
export LDFLAGS="-Wl,-z,now -Wl,-z,relro,-z,noexecstack -pie"
export SH_LDFLAGS="-Wl,-z,now -Wl,-z,relro,-z,noexecstack -pie"
./configure --enable-layout=Gentoo \
 --libdir=%{_libdir}/%{name} \
 --with-tcl=%{_libdir} \
 --with-jemalloc \
 --with-user=ats \
 --with-group=ats \
 --with-pic \
 --enable-shared  \
 --enable-reclaimable-freelist \
 --enable-linux-native-aio \
 --enable-hwloc \
 --disable-diags \
 --disable-debug \
 --disable-static
sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' -e
's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%{__make} %{?_smp_mflags}

%install
make install-strip DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_mandir}/man1
mkdir -p %{buildroot}/run/%{name}
cp doc/man/*.1 %{buildroot}%{_mandir}/man1/
mv %{buildroot}%{_mandir}/man1/enable.1 %{buildroot}%{_mandir}/man1/ts-enable.1
mv %{buildroot}%{_mandir}/man1/disable.1 %{buildroot}%{_mandir}/man1/ts-disable.1
mv %{buildroot}%{_mandir}/man1/exit.1 %{buildroot}%{_mandir}/man1/ts-exit.1
install -D -m 0644 -p %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -D -m 0644 -p %{SOURCE2} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
rm -rf %{buildroot}%{_docdir}/%{name}
rm -rf %{buildroot}%{_libdir}/perl5/
rm -f %{buildroot}%{_libdir}/%{name}/*.a
rm -f %{buildroot}%{_libdir}/%{name}/*.la
rm -f %{buildroot}%{_libdir}/%{name}/plugins/*.la
rm -f %{buildroot}%{_datarootdir}/perl5/Apache/TS.pm
rm -f %{buildroot}%{_datarootdir}/perl5/Apache/TS/AdminClient.pm
rm -f %{buildroot}%{_datarootdir}/perl5/Apache/TS/Config.pm
rm -f %{buildroot}%{_datarootdir}/perl5/Apache/TS/Config/Records.pm
rm -f %{buildroot}%{_bindir}/tspush
rm -f %{buildroot}%{_bindir}/traffic_shell
rm -f %{buildroot}%{_bindir}/traffic_sac
rm -f %{buildroot}%{_bindir}/trafficserver
rm -f %{buildroot}%{_bindir}/tstop
strip -s %{buildroot}%{_bindir}/traffic_cop
strip -s %{buildroot}%{_bindir}/traffic_line
strip -s %{buildroot}%{_bindir}/traffic_logcat
strip -s %{buildroot}%{_bindir}/traffic_logstats
strip -s %{buildroot}%{_bindir}/traffic_server
strip -s %{buildroot}%{_libdir}/%{name}/*.so*
strip -s %{buildroot}%{_libdir}/%{name}/plugins/*.so
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/internal
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/snapshots
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ssl
mkdir -p %{buildroot}%{_docdir}/%{name}/etc/body_factory/default
chmod 0770 %{buildroot}%{_sysconfdir}/%{name}/internal
chmod 0770 %{buildroot}%{_sysconfdir}/%{name}/snapshots
chmod 0750 %{buildroot}%{_sysconfdir}/%{name}/ssl
chmod 0750 %{buildroot}%{_sysconfdir}/%{name}/body_factory
echo "%{_libdir}/%{name}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
mv %{buildroot}%{_sysconfdir}/%{name}/body_factory/default/* %{buildroot}%{_docdir}/%{name}/etc/body_factory/default/
mv %{buildroot}%{_sysconfdir}/%{name}/*.config %{buildroot}%{_docdir}/%{name}/etc/

%post
%{_sbindir}/ldconfig
%{_bindir}/systemctl --system daemon-reload 2> /dev/null > /dev/null
chown root:ats %{_sysconfdir}/%{name}/body_factory 2> /dev/null > /dev/null
chown root:ats %{_sysconfdir}/%{name}/ssl 2> /dev/null > /dev/null
chown ats:ats %{_sysconfdir}/%{name}/internal 2> /dev/null > /dev/null
chown ats:ats %{_sysconfdir}/%{name}/snapshots 2> /dev/null > /dev/null
exit 0

%pre
getent group ats >/dev/null || groupadd -r ats -g 176 &>/dev/null
getent passwd ats >/dev/null || useradd -r -u 176 -g ats -d / -s %{_sbindir}/nologin -c
"Apache Traffic Server" ats
&>/dev/null
exit 0

%files
%dir %{_libdir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*
%{_bindir}/traffic*
%{_libdir}/%{name}/*.so.*
%{_unitdir}/%{name}.service
%{_prefix}/lib/tmpfiles.d/%{name}.conf
%attr(0770, ats, ats) %dir %{_var}/log/%{name}
%attr(0770, ats, ats) %dir /run/%{name}
%attr(0770, ats, ats) %dir %{_var}/cache/%{name}
%attr(0644, root, root) %{_sysconfdir}/ld.so.conf.d/*

%files devel
%{_bindir}/tsxs
%dir %{_includedir}/ts
%{_includedir}/ts/*
%{_libdir}/%{name}/*.so

%files manpages
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_docdir}/%{name}/*

%files plugins
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/*.so

%changelog
* Sun Oct 27 2013 Reindl Harald <h.reindl@thelounge.net>
- build with hwloc-support

* Tue Oct 15 2013 Reindl Harald <h.reindl@thelounge.net>
- update to 4.0.2 stable

* Mon Sep 2 2013 Reindl Harald <h.reindl@thelounge.net>
- update to 4.0.1 stable

* Sat Aug 24 2013 Reindl Harald <h.reindl@thelounge.net>
- update to 4.0.0-dev

* Fri Aug 9 2013 Reindl Harald <h.reindl@thelounge.net>
- update to 3.3.5-dev
- move default-configurations to "trafficserver-manpages" package
- move plugins to "trafficserver-plugins" package
- cleanup permissions
- ReadWriteDirectories=/etc/trafficserver/internal
- ReadWriteDirectories=/etc/trafficserver/snapshots
- remove unused files from bindir
- enable-reclaimable-freelist
- enable-linux-native-aio

* Wed Jul 31 2013 Reindl Harald <h.reindl@thelounge.net>
- update to 3.2.5
- add "--with-jemalloc" to configure-flags

* Tue Jun 25 2013 Reindl Harald <h.reindl@thelounge.net>
- fix rpath and add "%{_sysconfdir}/ld.so.conf.d/trafficserver-x86_64.conf"

* Tue Jun 11 2013 Reindl Harald <h.reindl@thelounge.net>
- Cleanup SPEC and hardening build
- split manpages in sub-package
- patch 404-response from "Not Found on Accelerator" to "Not Found" to avoid fingerprinting


Mime
View raw message