Skip to content

Commit

Permalink
packages - tunnels.conf.d fix configs place, links
Browse files Browse the repository at this point in the history
  • Loading branch information
r4sas committed Nov 7, 2018
1 parent b7940e0 commit 8d0b696
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions contrib/rpm/i2pd-git.spec
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ install -D -m 755 %{_builddir}/%{name}-%{version}/contrib/tunnels.conf %{buildro
install -d -m 755 %{buildroot}%{_datadir}/i2pd
install -d -m 755 %{buildroot}%{_datadir}/i2pd/tunnels.conf.d
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/certificates/ %{buildroot}%{_datadir}/i2pd/certificates
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/tunnels.d/ %{buildroot}%{_datadir}/i2pd/tunnels.conf.d
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/tunnels.d/ %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf.d
install -D -m 644 %{_builddir}/%{name}-%{version}/contrib/rpm/i2pd.service %{buildroot}%{_unitdir}/i2pd.service
install -d -m 700 %{buildroot}%{_sharedstatedir}/i2pd
install -d -m 700 %{buildroot}%{_localstatedir}/log/i2pd
ln -s %{_datadir}/%{name}/certificates %{buildroot}%{_sharedstatedir}/i2pd/certificates
ln -s %{_sysconfdir}/i2pd/tunnels.conf.d %{buildroot}%{_datadir}/i2pd/tunnels.conf.d

ln -s %{_datadir}/i2pd/tunnels.conf.d %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf.d


%pre
Expand All @@ -94,8 +93,8 @@ getent passwd i2pd >/dev/null || \
%doc LICENSE README.md
%{_sbindir}/i2pd
%{_datadir}/i2pd/certificates
%{_datadir}/i2pd/tunnels.conf.d
%config(noreplace) %{_sysconfdir}/i2pd/*
%config(noreplace) %{_sysconfdir}/i2pd/tunnels.conf.d/*
/%{_unitdir}/i2pd.service
%dir %attr(0700,i2pd,i2pd) %{_localstatedir}/log/i2pd
%dir %attr(0700,i2pd,i2pd) %{_sharedstatedir}/i2pd
Expand Down
6 changes: 3 additions & 3 deletions contrib/rpm/i2pd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ install -D -m 755 %{_builddir}/%{name}-%{version}/contrib/tunnels.conf %{buildro
install -d -m 755 %{buildroot}%{_datadir}/i2pd
install -d -m 755 %{buildroot}%{_datadir}/i2pd/tunnels.conf.d
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/certificates/ %{buildroot}%{_datadir}/i2pd/certificates
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/tunnels.d/ %{buildroot}%{_datadir}/i2pd/tunnels.conf.d
%{__cp} -r %{_builddir}/%{name}-%{version}/contrib/tunnels.d/ %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf.d
install -D -m 644 %{_builddir}/%{name}-%{version}/contrib/rpm/i2pd.service %{buildroot}%{_unitdir}/i2pd.service
install -d -m 700 %{buildroot}%{_sharedstatedir}/i2pd
install -d -m 700 %{buildroot}%{_localstatedir}/log/i2pd
ln -s %{_datadir}/%{name}/certificates %{buildroot}%{_sharedstatedir}/i2pd/certificates
ln -s %{_sysconfdir}/i2pd/tunnels.conf.d %{buildroot}%{_datadir}/i2pd/tunnels.conf.d
ln -s %{_datadir}/i2pd/tunnels.conf.d %{buildroot}%{_sysconfdir}/i2pd/tunnels.conf.d


%pre
Expand All @@ -91,8 +91,8 @@ getent passwd i2pd >/dev/null || \
%doc LICENSE README.md
%{_sbindir}/i2pd
%{_datadir}/i2pd/certificates
%{_datadir}/i2pd/tunnels.conf.d
%config(noreplace) %{_sysconfdir}/i2pd/*
%config(noreplace) %{_sysconfdir}/i2pd/tunnels.conf.d/*
/%{_unitdir}/i2pd.service
%dir %attr(0700,i2pd,i2pd) %{_localstatedir}/log/i2pd
%dir %attr(0700,i2pd,i2pd) %{_sharedstatedir}/i2pd
Expand Down
2 changes: 1 addition & 1 deletion debian/i2pd.dirs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
etc/i2pd
etc/i2pd/tunnels.conf.d
var/lib/i2pd
var/lib/i2pd/tunnels.conf.d
2 changes: 1 addition & 1 deletion debian/i2pd.install
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ contrib/i2pd.conf etc/i2pd/
contrib/tunnels.conf etc/i2pd/
contrib/subscriptions.txt etc/i2pd/
contrib/certificates/ usr/share/i2pd/
contrib/tunnels.d/ var/lib/i2pd/tunnels.conf.d
contrib/tunnels.d/ etc/i2pd/tunnels.conf.d
contrib/apparmor/usr.sbin.i2pd etc/apparmor.d

4 comments on commit 8d0b696

@LLE8
Copy link

@LLE8 LLE8 commented on 8d0b696 Nov 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И на этот раз не собирается, причем по вине патча fix-1210

user1@black2:~/i2pd$ debuild --no-tgz-check -us -uc -b
 dpkg-buildpackage -rfakeroot -us -uc -b
dpkg-buildpackage: info: source package i2pd
dpkg-buildpackage: info: source version 2.21.1-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by orignal <[email protected]>
 dpkg-source --before-build i2pd
dpkg-buildpackage: info: host architecture amd64
dpkg-source: info: applying 01-tune-build-opts.patch
dpkg-source: info: applying fix-#1210
patching file contrib/i2pd.service
Hunk #1 FAILED at 6.
1 out of 1 hunk FAILED
dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
dpkg-source: info: if patch 'fix-#1210' is correctly applied by quilt, use 'quilt refresh' to update it
dpkg-source: info: restoring quilt backup files for fix-#1210
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B .pc/fix-#1210/ --reject-file=- < i2pd/debian/patches/fix-#1210 gave error exit status 1
dpkg-buildpackage: error: dpkg-source --before-build i2pd gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc -b failed

И кстати в прошлый раз этот баг тоже был, повторный запуск debuild чудесным образом позволял добраться до следующего бага с tunnels.conf.d. И на этот раз собирается путем повторного запуска debuild.

@LLE8
Copy link

@LLE8 LLE8 commented on 8d0b696 Nov 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я думаю, может выбросить совсем этот патч fix-1210? Просто в contrib/i2pd.service сразу написать

#RuntimeDirectory=i2pd
#RuntimeDirectoryMode=0700
#LogsDirectory=i2pd
#LogsDirectoryMode=0700

и оставить так до лучших времен?

@r4sas
Copy link
Member Author

@r4sas r4sas commented on 8d0b696 Nov 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот патч используется не во всех дистрибьюциях - например в buster, bionic, cosmic, дело в этом.

Сам патч я поправлю.

@LLE8
Copy link

@LLE8 LLE8 commented on 8d0b696 Nov 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У меня Stretch, без патча плохо, а на Buster еще не смотрел.

Please sign in to comment.