Author Topic: question about building tor rpm  (Read 1155 times)

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1157
question about building tor rpm
« on: January 02, 2012, 11:41:21 AM »
Hi guys,

i try to package the new tor version but i have a little problem, i downloaded the srpm and there is the line

Code: [Select]
make -C doc/design-paper tor-design.pdf
it' s for creating the tor-design.pdf but the folder doc/design-paper isn't in the tarball and the last release note in the spec-file is from
Quote
Mon Feb 28 2011

but there were some releases more since that time. i dont know what to do with this line.

should i comment it out or copy the folder from the tarball in the old srpm?

thanks in advance
ghostbunny
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15846
  • LXDE! Coffee, Bacon and Cheesecake!
Re: question about building tor rpm
« Reply #1 on: January 02, 2012, 12:22:40 PM »
Check the tor site for the necessary file. If it isn't there, I think commenting the line would be the choice.     

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1157
Re: question about building tor rpm
« Reply #2 on: January 02, 2012, 01:27:44 PM »
ok i found the files in a svn repo from the tor project.

but now i have a futher problem.

i can create the pdf by myself and the rpmbuild command creates it, too. but on the end of the packaging process its aborting with the message

Code: [Select]
+ /bin/mkdir -p /home/ghostbunny/RPM/BUILDROOT/tor-0.2.2.35-1ghostbunny2011.i386/usr/share/doc/tor
+ cp -pr INSTALL LICENSE README ChangeLog doc/HACKING doc/TODO doc/design-paper/tor-design.pdf
cp: the goal „doc/design-paper/tor-design.pdf“ isn't a directory
Error: Error status by finishing /home/ghostbunny/RPM/tmp/rpm-tmp.krA1L0 (%doc)

does anyone know what to do now?
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3731
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: question about building tor rpm
« Reply #3 on: January 02, 2012, 01:30:13 PM »
ok i found the files in a svn repo from the tor project.

but now i have a futher problem.

i can create the pdf by myself and the rpmbuild command creates it, too. but on the end of the packaging process its aborting with the message

Code: [Select]
+ /bin/mkdir -p /home/ghostbunny/RPM/BUILDROOT/tor-0.2.2.35-1ghostbunny2011.i386/usr/share/doc/tor
+ cp -pr INSTALL LICENSE README ChangeLog doc/HACKING doc/TODO doc/design-paper/tor-design.pdf
cp: the goal „doc/design-paper/tor-design.pdf“ isn't a directory
Error: Error status by finishing /home/ghostbunny/RPM/tmp/rpm-tmp.krA1L0 (%doc)

does anyone know what to do now?

Can i see the specfile, please?

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15846
  • LXDE! Coffee, Bacon and Cheesecake!
Re: question about building tor rpm
« Reply #4 on: January 02, 2012, 01:31:32 PM »
Leiche is quicker than me. :D :D :D   

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1157
Re: question about building tor rpm
« Reply #5 on: January 02, 2012, 02:48:46 PM »
sure ;D

Code: [Select]
%define runuser toruser

Name: tor
Version: 0.2.2.35
Release: %mkrel 1
Summary: Anonymizing overlay network for TCP (The onion router)
Summary(de): Anonymisierung durch das Überdecken des Netzwerks für TCP (The onion router)
URL: http://www.torproject.org/
Group: Networking/Other
License: BSD-like
Requires(pre): rpm-helper
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(postun): rpm-helper
Requires: openssl >= 0.9.6
Requires: tsocks
BuildRequires: openssl-devel >= 0.9.6
BuildRequires: libevent-devel
BuildRequires: zlib-devel
BuildRequires: autoconf2.5
BuildRequires: transfig, tetex-latex
BuildRequires: ghostscript
Source0: http://www.torproject.org/dist/%{name}-%{version}.tar.xz
Source1: %{name}.logrotate
Source2: %{name}.init
Source3: %{name}.sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
Tor is a connection-based low-latency anonymous communication system.

This package provides the "tor" program, which serves as both a client and
a relay node. Scripts will automatically create a "%{runuser}" user and
group, and set tor up to run as a daemon when the system is rebooted.

Applications connect to the local Tor proxy using the SOCKS
protocol. The local proxy chooses a path through a set of relays, in
which each relay knows its predecessor and successor, but no
others. Traffic flowing down the circuit is unwrapped by a symmetric
key at each relay, which reveals the downstream relay.

Warnings: Tor does no protocol cleaning.  That means there is a danger
that application protocols and associated programs can be induced to
reveal information about the initiator. Tor depends on Privoxy and
similar protocol cleaners to solve this problem. This is alpha code,
and is even more likely than released code to have anonymity-spoiling
bugs. The present network is very small -- this further reduces the
strength of the anonymity provided. Tor is not presently suitable
for high-stakes anonymity.

%description -l de
Tor ist ein verbindungsbasiertes, anonymes Kommunikationssystem mit niedriger Latenz.

Dieses Paket liefert das "tor"-Programm, welches zugleich als Klient und
Übermittlungsknoten dient. Skripte werden automatisch einen "%{runuser}" Benutzer
und Gruppe erstellen und tor so einstellen, dass es als Systemdienst ausgeführt
wird, wenn das System gestartet wird.

Warnungen: Tor betreibt keine Protokollbereinigung. Das bedeutet, dass
die Gefahr besteht, dass Programmprotokolle und damit assoziierte Programme
dazu gebracht werden Informationen über den Urheber zu offenbaren.
Tor basiert auf Privoxy und anderen Protokollreinigern um dieses Problem zu
lösen.

%prep
%setup -q
 
%build
%configure2_5x
%make
make -C doc/design-paper tor-design.pdf

%install
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}

%makeinstall

%define _logdir %{_var}/log

mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}
cat %{SOURCE2} > ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
chmod 0755 ${RPM_BUILD_ROOT}%{_initrddir}/%{name}

install -p -m 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc.sample ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/torrc

mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
cat %{SOURCE1} > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}

mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/
cat %{SOURCE3} > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}

mkdir -p -m 700 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/%{name}
mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_var}/run/%{name}
mkdir -p -m 755 ${RPM_BUILD_ROOT}%{_logdir}/%{name}

# Bash completion
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d
echo 'complete -F _command $filenames torify' > ${RPM_BUILD_ROOT}%{_sysconfdir}/bash_completion.d/%{name}

%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}

%pre
%_pre_useradd %{runuser} / /bin/false

%post
%_post_service %{name}

%preun
%_preun_service %{name}
rm -f %{_localstatedir}/%{name}/cached-directory
rm -f %{_localstatedir}/%{name}/bw_accounting
rm -f %{_localstatedir}/%{name}/control_auth_cookie
rm -f %{_localstatedir}/%{name}/router.desc
rm -f %{_localstatedir}/%{name}/fingerprint

%postun
%_postun_userdel %{runuser}
%_postun_groupdel %{runuser}

%files
%defattr(-,root,root)
%doc INSTALL LICENSE README ChangeLog doc/HACKING doc/TODO doc/design-paper/tor-design.pdf # deleted AUTHORS
%{_mandir}/man*/*
%{_bindir}/tor
%{_bindir}/torify
%{_bindir}/tor-resolve
%{_bindir}/tor-gencert
%config(noreplace) %attr(0755,%{runuser},%{runuser}) %{_initrddir}/%{name}
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
%dir %attr(0755,root,%{runuser}) %{_sysconfdir}/%{name}/
%config(noreplace) %attr(0644,root,%{runuser}) %{_sysconfdir}/%{name}/*
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%attr(0700,%{runuser},%{runuser}) %dir %{_localstatedir}/lib/%{name}
%attr(0750,%{runuser},%{runuser}) %dir %{_var}/run/%{name}
%attr(0750,%{runuser},%{runuser}) %dir %{_logdir}/%{name}
%{_sysconfdir}/bash_completion.d/%{name}
%{_datadir}/%{name}


%changelog
* Mon Jan 02 2012 ghostbunny <hmhaase at pclinuxosusers.de> 0.2.2.35-1pclos2011
- update 0.2.2.35
- added german summary and description
- commented make -C doc/design-paper tor-design.pdf the tarball doesnt contain it anymore

* Mon Feb 28 2011 Texstar <texstar at gmial.com> 0.2.1.30-1pclos2011
- 0.2.1.30

* Tue Jan 18 2011 Texstar <texstar at gmail.com> 0.2.1.29-1pclos2011
- 0.2.1.29

* Tue Dec 21 2010 Texstar <texstar at gmail.com> 0.2.1.28-1pclos2010
- 0.2.1.28

* Sun Nov 28 2010 Texstar <texstar at gmail.com> 0.2.1.27-1pclos2010
- sync to mdv



The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3731
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: question about building tor rpm
« Reply #6 on: January 02, 2012, 03:01:31 PM »
Where you store the pdf file?


Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1157
Re: question about building tor rpm
« Reply #7 on: January 02, 2012, 03:09:42 PM »
it should be stored in doc/design-paper

there it was created when i launch

Code: [Select]
make -C doc/design-paper tor-design.pdf

in console.
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15846
  • LXDE! Coffee, Bacon and Cheesecake!
Re: question about building tor rpm
« Reply #8 on: January 02, 2012, 03:13:41 PM »
You should list it in %files. Specifically, as in give it its own line.     

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1157
Re: question about building tor rpm
« Reply #9 on: January 02, 2012, 03:44:24 PM »
thank you Neal now its working :D
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD