On Thu, Aug 14, 2014 at 4:47 PM, Nusenu <BM-2D8wMEVgGVY76je1WXNPfo8SrpZt5yGHES@bitmessage.ch> wrote:

>> Ondrej Mikle:
>>> If possible, I'd like to avoid the if-defs. Do you perhaps have
>>> a tip how to make the spec file "nice" and have it work both
>>> with old startup script and systemd? Maybe some patch?
>>
>> I would not mind having clean separated per-distribution spec
>> files. That way you can basically reuse the complete spec file
>> from the distribution and you would have systemd support without
>> having to think about it - they probably have had their fair
>> amount of testing.
>>
>
> I spent about a day adjusting and merging the Fedora's systemd
> tor.spec. However, it won't build the git source (e.g. with
> LIBS=-lrt ./autogen.sh && ./configure && make dist-rpm). There is
> something missing in the .spec which makes rpmbuild fail on not
> finding the correct source directory, but I wasn't able to figure
> why that happens as rpmbuild is quite hard to debug.

I'd like to have a look at your attempts.

Is there something wrong with the rpm-tor git repo?

git clone https://gitweb.torproject.org/user/hiviah/rpm-tor.git
Cloning into 'rpm-tor'...
fatal: https://gitweb.torproject.org/user/hiviah/rpm-tor.git/info/refs

The url is a bit diferent:

git clone https://git.torproject.org/user/hiviah/rpm-tor.git
git checkout rpm-release-0.2.5 

This is diff from one of the testing dirs: http://pastie.org/9475746

There's more stuff to be done e.g. in Makefile.am in dist-rpm target (if some files are said as Source in the .spec, Makefile needs to copy them - sorry I have the changes only in generated makefiles for testing).

Ondrej