[arch-commits] Commit in i2pd/repos (9 files)

Felix Yan felixonmars at archlinux.org
Sat Dec 12 15:39:50 UTC 2020


    Date: Saturday, December 12, 2020 @ 15:39:50
  Author: felixonmars
Revision: 773333

archrelease: copy trunk to community-staging-x86_64

Added:
  i2pd/repos/community-staging-x86_64/
  i2pd/repos/community-staging-x86_64/010-i2pd-use-arch-flags-on-tests.patch
    (from rev 773332, i2pd/trunk/010-i2pd-use-arch-flags-on-tests.patch)
  i2pd/repos/community-staging-x86_64/020-i2pd-config.patch
    (from rev 773332, i2pd/trunk/020-i2pd-config.patch)
  i2pd/repos/community-staging-x86_64/030-i2pd-do-not-override-config.patch
    (from rev 773332, i2pd/trunk/030-i2pd-do-not-override-config.patch)
  i2pd/repos/community-staging-x86_64/040-i2pd-systemd-service-hardening.patch
    (from rev 773332, i2pd/trunk/040-i2pd-systemd-service-hardening.patch)
  i2pd/repos/community-staging-x86_64/050-i2pd-tunnels-d-readme.patch
    (from rev 773332, i2pd/trunk/050-i2pd-tunnels-d-readme.patch)
  i2pd/repos/community-staging-x86_64/PKGBUILD
    (from rev 773332, i2pd/trunk/PKGBUILD)
  i2pd/repos/community-staging-x86_64/i2pd.sysusers
    (from rev 773332, i2pd/trunk/i2pd.sysusers)
  i2pd/repos/community-staging-x86_64/i2pd.tmpfiles
    (from rev 773332, i2pd/trunk/i2pd.tmpfiles)

------------------------------------------+
 010-i2pd-use-arch-flags-on-tests.patch   |   44 ++++++++++++
 020-i2pd-config.patch                    |   30 ++++++++
 030-i2pd-do-not-override-config.patch    |   29 ++++++++
 040-i2pd-systemd-service-hardening.patch |   34 +++++++++
 050-i2pd-tunnels-d-readme.patch          |    8 ++
 PKGBUILD                                 |   99 +++++++++++++++++++++++++++++
 i2pd.sysusers                            |    1 
 i2pd.tmpfiles                            |    6 +
 8 files changed, 251 insertions(+)

Copied: i2pd/repos/community-staging-x86_64/010-i2pd-use-arch-flags-on-tests.patch (from rev 773332, i2pd/trunk/010-i2pd-use-arch-flags-on-tests.patch)
===================================================================
--- community-staging-x86_64/010-i2pd-use-arch-flags-on-tests.patch	                        (rev 0)
+++ community-staging-x86_64/010-i2pd-use-arch-flags-on-tests.patch	2020-12-12 15:39:50 UTC (rev 773333)
@@ -0,0 +1,44 @@
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -1,32 +1,32 @@
+-CXXFLAGS += -Wall -Wextra -pedantic -O0 -g -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1 -I../libi2pd/ -pthread -Wl,--unresolved-symbols=ignore-in-object-files
++CXXFLAGS += -Wall -Wextra -pedantic -g -std=c++11 -D_GLIBCXX_USE_NANOSLEEP=1 -I../libi2pd/ -pthread -Wl,--unresolved-symbols=ignore-in-object-files
+ 
+ TESTS = test-gost test-gost-sig test-base-64 test-x25519 test-aeadchacha20poly1305 test-blinding test-elligator
+ 
+ all: $(TESTS) run
+ 
+ test-http-%: ../libi2pd/HTTP.cpp test-http-%.cpp
+-	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -o $@ $^
++	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ $(LDFLAGS)
+ 
+ test-base-%: ../libi2pd/Base.cpp test-base-%.cpp
+-	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -o $@ $^
++	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ $(LDFLAGS)
+ 
+ test-gost: ../libi2pd/Gost.cpp ../libi2pd/I2PEndian.cpp test-gost.cpp
+-	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto
++	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto $(LDFLAGS)
+ 
+ test-gost-sig: ../libi2pd/Gost.cpp ../libi2pd/I2PEndian.cpp ../libi2pd/Crypto.cpp ../libi2pd/Log.cpp test-gost-sig.cpp
+-	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system
++	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system $(LDFLAGS)
+ 
+ test-x25519: ../libi2pd/Ed25519.cpp ../libi2pd/I2PEndian.cpp ../libi2pd/Log.cpp ../libi2pd/Crypto.cpp  test-x25519.cpp
+-	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system
++	$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system $(LDFLAGS)
+ 
+ test-aeadchacha20poly1305: ../libi2pd/Crypto.cpp ../libi2pd/ChaCha20.cpp ../libi2pd/Poly1305.cpp test-aeadchacha20poly1305.cpp
+-	 $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system
++	 $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system $(LDFLAGS)
+ 
+ test-blinding: ../libi2pd/Crypto.cpp ../libi2pd/Blinding.cpp ../libi2pd/Ed25519.cpp ../libi2pd/I2PEndian.cpp ../libi2pd/Log.cpp ../libi2pd/util.cpp ../libi2pd/Identity.cpp ../libi2pd/Signature.cpp ../libi2pd/Timestamp.cpp test-blinding.cpp
+-	 $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system
++	 $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system $(LDFLAGS)
+ 
+ test-elligator: ../libi2pd/Elligator.cpp ../libi2pd/Crypto.cpp test-elligator.cpp
+-	 $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system
++	 $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(CPPFLAGS) $(INCFLAGS) -o $@ $^ -lcrypto -lssl -lboost_system $(LDFLAGS)
+ 
+ run: $(TESTS)
+ 	@for TEST in $(TESTS); do ./$$TEST ; done

Copied: i2pd/repos/community-staging-x86_64/020-i2pd-config.patch (from rev 773332, i2pd/trunk/020-i2pd-config.patch)
===================================================================
--- community-staging-x86_64/020-i2pd-config.patch	                        (rev 0)
+++ community-staging-x86_64/020-i2pd-config.patch	2020-12-12 15:39:50 UTC (rev 773333)
@@ -0,0 +1,30 @@
+--- a/contrib/i2pd.conf
++++ b/contrib/i2pd.conf
+@@ -8,15 +8,17 @@
+ 
+ ## Tunnels config file
+ ## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf
++## Note: /var/lib/i2pd/tunnels.conf is a symlink to /etc/i2pd/tunnels.conf (use the latter)
+ # tunconf = /var/lib/i2pd/tunnels.conf
+ 
+ ## Tunnels config files path
+ ## Use that path to store separated tunnels in different config files.
+ ## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d
++## Note: /var/lib/i2pd/tunnels.d is a symlink to /etc/i2pd/tunnels.d (use the latter)
+ # tunnelsdir = /var/lib/i2pd/tunnels.d
+ 
+ ## Where to write pidfile (default: i2pd.pid, not used in Windows)
+-# pidfile = /run/i2pd.pid
++# pidfile = /run/i2pd/i2pd.pid
+ 
+ ## Logging configuration section
+ ## By default logs go to stdout with level 'info' and higher
+@@ -27,7 +29,7 @@
+ ##  * syslog - use syslog, see man 3 syslog
+ # log = file
+ ## Path to logfile (default - autodetect)
+-# logfile = /var/log/i2pd/i2pd.log
++logfile = /var/log/i2pd/i2pd.log
+ ## Log messages above this level (debug, info, *warn, error, none)
+ ## If you set it to none, logging will be disabled
+ # loglevel = warn

Copied: i2pd/repos/community-staging-x86_64/030-i2pd-do-not-override-config.patch (from rev 773332, i2pd/trunk/030-i2pd-do-not-override-config.patch)
===================================================================
--- community-staging-x86_64/030-i2pd-do-not-override-config.patch	                        (rev 0)
+++ community-staging-x86_64/030-i2pd-do-not-override-config.patch	2020-12-12 15:39:50 UTC (rev 773333)
@@ -0,0 +1,29 @@
+--- a/contrib/i2pd.service
++++ b/contrib/i2pd.service
+@@ -11,20 +11,24 @@ RuntimeDirectoryMode=0700
+ LogsDirectory=i2pd
+ LogsDirectoryMode=0700
+ Type=forking
+-ExecStart=/usr/sbin/i2pd --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf --tunnelsdir=/etc/i2pd/tunnels.conf.d --pidfile=/run/i2pd/i2pd.pid --logfile=/var/log/i2pd/i2pd.log --daemon --service
++ExecStart=/usr/sbin/i2pd --conf=/var/lib/i2pd/i2pd.conf --pidfile=/run/i2pd/i2pd.pid --daemon --service
+ ExecReload=/bin/sh -c "kill -HUP $MAINPID"
+ PIDFile=/run/i2pd/i2pd.pid
+ ### Uncomment, if auto restart needed
+ #Restart=on-failure
+ 
++# SIGQUIT is setted by upstream and always generates a core dump.
++# You can ignore the failed exit (core dump) when stopping the service.
+ KillSignal=SIGQUIT
++
+ # If you have the patience waiting 10 min on restarting/stopping it, uncomment this.
+ # i2pd stops accepting new tunnels and waits ~10 min while old ones do not die.
+ #KillSignal=SIGINT
+ #TimeoutStopSec=10m
+ 
+-# If you have problems with hanging i2pd, you can try increase this
++# If you have problems with hanging i2pd, you can try to increase this
+ LimitNOFILE=4096
++
+ # To enable write of coredump uncomment this
+ #LimitCORE=infinity
+ 

Copied: i2pd/repos/community-staging-x86_64/040-i2pd-systemd-service-hardening.patch (from rev 773332, i2pd/trunk/040-i2pd-systemd-service-hardening.patch)
===================================================================
--- community-staging-x86_64/040-i2pd-systemd-service-hardening.patch	                        (rev 0)
+++ community-staging-x86_64/040-i2pd-systemd-service-hardening.patch	2020-12-12 15:39:50 UTC (rev 773333)
@@ -0,0 +1,34 @@
+--- a/contrib/i2pd.service
++++ b/contrib/i2pd.service
+@@ -32,5 +32,31 @@ LimitNOFILE=4096
+ # To enable write of coredump uncomment this
+ #LimitCORE=infinity
+ 
++# Hardening options
++PrivateTmp=true
++ProtectSystem=strict
++ProtectHome=true
++PrivateDevices=true
++ProtectKernelTunables=true
++ProtectControlGroups=true
++NoNewPrivileges=true
++MemoryDenyWriteExecute=true
++LockPersonality=true
++SystemCallFilter=@system-service
++RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
++ProtectHostname=true
++ProtectClock=true
++ProtectKernelLogs=true
++ProtectKernelModules=true
++ProtectProc=invisible
++ProcSubset=pid
++PrivateMounts=true
++PrivateUsers=true
++ReadWritePaths=/var/lib/i2pd /var/log/i2pd
++RemoveIPC=true
++RestrictRealtime=true
++RestrictSUIDSGID=true
++SystemCallArchitectures=native
++
+ [Install]
+ WantedBy=multi-user.target

Copied: i2pd/repos/community-staging-x86_64/050-i2pd-tunnels-d-readme.patch (from rev 773332, i2pd/trunk/050-i2pd-tunnels-d-readme.patch)
===================================================================
--- community-staging-x86_64/050-i2pd-tunnels-d-readme.patch	                        (rev 0)
+++ community-staging-x86_64/050-i2pd-tunnels-d-readme.patch	2020-12-12 15:39:50 UTC (rev 773333)
@@ -0,0 +1,8 @@
+--- a/contrib/tunnels.d/README
++++ b/contrib/tunnels.d/README
+@@ -1,4 +1,4 @@
+-# In that directory you can store separated config files for every tunnel.
++# In the /etc/i2pd/tunnels.d directory you can store separated config files for every tunnel.
+ # Please read documentation for more info.
+ #
+ # You can find examples in /usr/share/doc/i2pd/tunnels.d directory

Copied: i2pd/repos/community-staging-x86_64/PKGBUILD (from rev 773332, i2pd/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-12-12 15:39:50 UTC (rev 773333)
@@ -0,0 +1,99 @@
+# Maintainer: Daniel Bermond <dbermond at archlinux.org>
+# Contributor: robertfoster
+# Contributor: kurych
+# Contributor: redfish
+# Contributor: atommixz
+# Contributor: denn
+# Contributor: post-factum
+# Contributor: wrdcrrtmnstr
+# Contributor: r4sas
+
+pkgname=i2pd
+pkgver=2.35.0
+pkgrel=3
+pkgdesc='A full-featured C++ implementation of the I2P router'
+arch=('x86_64')
+url='https://i2pd.website/'
+license=('BSD')
+depends=('boost-libs' 'libminiupnpc.so' 'openssl' 'zlib')
+makedepends=('cmake' 'boost')
+provides=('i2p-router')
+backup=('etc/i2pd/i2pd.conf'
+        'etc/i2pd/tunnels.conf')
+source=("https://github.com/PurpleI2P/i2pd/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+        '010-i2pd-use-arch-flags-on-tests.patch'
+        '020-i2pd-config.patch'
+        '030-i2pd-do-not-override-config.patch'
+        '040-i2pd-systemd-service-hardening.patch'
+        '050-i2pd-tunnels-d-readme.patch'
+        'i2pd.sysusers'
+        'i2pd.tmpfiles')
+sha256sums=('d041fd4e7a88ac168e76f66fdab40174ad093cdc13451cdbd0dd1216e5581f8a'
+            '0064503a9124b764d01db862ba3c2ff97bc5961d41359970df2d6ce9842a5ab5'
+            '452550678ea5702a6492eb58e8d0452b91dc5d0aaa112cf04542df74a3dc0dfc'
+            '45cfc3035c5b5cfc92cfffec1fe7d7efc4fed3229195cdb640ec4a6c405af149'
+            '578ed9767890e970bd93b44e3be85c2595c4149ed65e4cc1c79ea12e2cb6982e'
+            'cfcb6b07b67aff3e3af12767f4649d88b9320dc71907b6c01b465e5c138cdaa3'
+            '88b2e709228049ba11f37863f87de75ab6cde295104852871384337cfdc906a3'
+            'fe8cc2ec83cb5b5c2b2ec8cce9a989e0cb6fd347e00b84e03a17b12efd152fac')
+
+prepare() {
+    patch -d "${pkgname}-${pkgver}" -Np1 -i "${srcdir}/010-i2pd-use-arch-flags-on-tests.patch"
+    patch -d "${pkgname}-${pkgver}" -Np1 -i "${srcdir}/020-i2pd-config.patch"
+    patch -d "${pkgname}-${pkgver}" -Np1 -i "${srcdir}/030-i2pd-do-not-override-config.patch"
+    patch -d "${pkgname}-${pkgver}" -Np1 -i "${srcdir}/040-i2pd-systemd-service-hardening.patch"
+    patch -d "${pkgname}-${pkgver}" -Np1 -i "${srcdir}/050-i2pd-tunnels-d-readme.patch"
+}
+
+build() {
+    cmake \
+        -B "${pkgname}-${pkgver}/build" \
+        -S "${pkgname}-${pkgver}/build" \
+        -DCMAKE_BUILD_TYPE:STRING='None' \
+        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
+        -DBUILD_SHARED_LIBS:BOOL='ON' \
+        -DWITH_UPNP:BOOL='ON' \
+        -Wno-dev
+    make -C "${pkgname}-${pkgver}/build"
+}
+
+check() {
+    make -C "${pkgname}-${pkgver}/tests"
+}
+
+package() {
+    cd "${pkgname}-${pkgver}"
+    
+    make -C build DESTDIR="$pkgdir" install
+    
+    # config
+    install -D -m644 contrib/i2pd.conf    -t "${pkgdir}/etc/i2pd"
+    install -D -m644 contrib/tunnels.conf -t "${pkgdir}/etc/i2pd"
+    install -d -m755 "${pkgdir}/etc/i2pd/tunnels.d"
+    
+    # certificates
+    local _file
+    while read -r -d '' _file
+    do
+        install -D -m644 "$_file" "${pkgdir}/usr/share/i2pd/certificates/${_file#contrib/certificates/}"
+    done < <(find contrib/certificates -type f -print0)
+    
+    # systemd
+    install -D -m644 contrib/i2pd.service   -t "${pkgdir}/usr/lib/systemd/system"
+    install -D -m644 "${srcdir}/i2pd.sysusers" "${pkgdir}/usr/lib/sysusers.d/i2pd.conf"
+    install -D -m644 "${srcdir}/i2pd.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/i2pd.conf"
+    
+    # tunnels.d examples
+    install -D -m644 contrib/tunnels.d/README         -t "${pkgdir}/usr/share/doc/i2pd/tunnels.d"
+    install -D -m644 contrib/tunnels.d/IRC-Ilita.conf -t "${pkgdir}/usr/share/doc/i2pd/tunnels.d"
+    install -D -m644 contrib/tunnels.d/IRC-Irc2P.conf -t "${pkgdir}/usr/share/doc/i2pd/tunnels.d"
+    
+    # headers
+    install -D -m644 libi2pd{,_client}/*.h -t "${pkgdir}/usr/include/i2pd"
+    
+    # man page
+    install -D -m644 debian/i2pd.1 -t "${pkgdir}/usr/share/man/man1"
+    
+    # license
+    install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}

Copied: i2pd/repos/community-staging-x86_64/i2pd.sysusers (from rev 773332, i2pd/trunk/i2pd.sysusers)
===================================================================
--- community-staging-x86_64/i2pd.sysusers	                        (rev 0)
+++ community-staging-x86_64/i2pd.sysusers	2020-12-12 15:39:50 UTC (rev 773333)
@@ -0,0 +1 @@
+u i2pd - "i2pd user" /var/lib/i2pd -

Copied: i2pd/repos/community-staging-x86_64/i2pd.tmpfiles (from rev 773332, i2pd/trunk/i2pd.tmpfiles)
===================================================================
--- community-staging-x86_64/i2pd.tmpfiles	                        (rev 0)
+++ community-staging-x86_64/i2pd.tmpfiles	2020-12-12 15:39:50 UTC (rev 773333)
@@ -0,0 +1,6 @@
+d /var/lib/i2pd 0700 i2pd i2pd - -
+d /var/log/i2pd 0700 i2pd i2pd - -
+L /var/lib/i2pd/i2pd.conf - - - - /etc/i2pd/i2pd.conf
+L /var/lib/i2pd/tunnels.d - - - - /etc/i2pd/tunnels.d
+L /var/lib/i2pd/tunnels.conf - - - - /etc/i2pd/tunnels.conf
+L /var/lib/i2pd/certificates - - - - /usr/share/i2pd/certificates



More information about the arch-commits mailing list