Reorganize the Debian directory structure to conform to their packaging policy. This brings the number of Lintian errors+warning
s down from 383 to 16.
This commit is contained in:
2
debian/README.txt
vendored
2
debian/README.txt
vendored
@ -2,7 +2,7 @@ This sets up a binary package with the following:
|
|||||||
|
|
||||||
- A new user i2psvc (a lot of people already have an i2p user)
|
- A new user i2psvc (a lot of people already have an i2p user)
|
||||||
- i2psvc home is /var/lib/i2p
|
- i2psvc home is /var/lib/i2p
|
||||||
- $I2P is /usr/lib/i2p, owned by i2psvc
|
- $I2P is /usr/share/i2p, owned by i2psvc
|
||||||
- i2psvc router directory is /var/lib/i2p/i2p-config (hack in WorkingDir.java)
|
- i2psvc router directory is /var/lib/i2p/i2p-config (hack in WorkingDir.java)
|
||||||
- i2p daemon script in /etc/init.d/i2p
|
- i2p daemon script in /etc/init.d/i2p
|
||||||
- i2prouter and eepget scripts in /usr/bin for other users to run it
|
- i2prouter and eepget scripts in /usr/bin for other users to run it
|
||||||
|
9
debian/conffiles
vendored
Normal file
9
debian/conffiles
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/etc/init.d/i2p
|
||||||
|
/etc/i2p/blocklist.txt
|
||||||
|
/etc/i2p/clients.config
|
||||||
|
/etc/i2p/hosts.txt
|
||||||
|
/etc/i2p/i2psnark.config
|
||||||
|
/etc/i2p/i2ptunnel.config
|
||||||
|
/etc/i2p/jetty-i2psnark.xml
|
||||||
|
/etc/i2p/systray.config
|
||||||
|
/etc/i2p/wrapper.config
|
103
debian/rules
vendored
103
debian/rules
vendored
@ -18,42 +18,83 @@ ifndef wrapperpath
|
|||||||
exit 1
|
exit 1
|
||||||
endif
|
endif
|
||||||
ant preppkg-linux-only
|
ant preppkg-linux-only
|
||||||
mkdir -p debian/tmp/usr/lib
|
|
||||||
mkdir -p debian/tmp/etc/init.d
|
|
||||||
cp -a debian/scripts/init debian/tmp/etc/init.d/i2p
|
|
||||||
cp -a pkg-temp debian/tmp/usr/lib/i2p
|
|
||||||
sed 's|$$INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/wrapper.config > debian/tmp/usr/lib/i2p/a
|
|
||||||
sed 's|$$SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/wrapper.config
|
|
||||||
mkdir -p debian/tmp/usr/bin
|
|
||||||
sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/eepget > debian/tmp/usr/lib/i2p/a
|
|
||||||
mv debian/tmp/usr/lib/i2p/a debian/tmp/usr/lib/i2p/eepget
|
|
||||||
ln -s /usr/lib/i2p/eepget debian/tmp/usr/bin/eepget
|
|
||||||
chmod +x debian/tmp/usr/lib/i2p/eepget
|
|
||||||
sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/runplain.sh > debian/tmp/usr/lib/i2p/a
|
|
||||||
sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/runplain.sh
|
|
||||||
sed 's|%INSTALL_PATH|/usr/lib/i2p|g' debian/tmp/usr/lib/i2p/i2prouter > debian/tmp/usr/lib/i2p/a
|
|
||||||
sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' debian/tmp/usr/lib/i2p/a > debian/tmp/usr/lib/i2p/i2prouter
|
|
||||||
ln -s /usr/lib/i2p/i2prouter debian/tmp/usr/bin/i2prouter
|
|
||||||
chmod +x debian/tmp/usr/lib/i2p/i2prouter
|
|
||||||
rm debian/tmp/usr/lib/i2p/a
|
|
||||||
touch debian/build
|
|
||||||
mkdir -p debian/tmp/usr/share/doc/i2p
|
|
||||||
|
|
||||||
@# copy wrapper files
|
mkdir -p debian/tmp/etc/init.d
|
||||||
cp ${wrapperpath}/libwrapper.so debian/tmp/usr/lib/i2p/lib/
|
mkdir -p debian/tmp/etc/i2p
|
||||||
cp ${wrapperpath}/wrapper.jar debian/tmp/usr/lib/i2p/lib/
|
mkdir -p debian/tmp/usr/share/i2p/lib
|
||||||
cp ${wrapperpath}/i2psvc debian/tmp/usr/lib/i2p/
|
mkdir -p debian/tmp/usr/share/doc/i2p
|
||||||
chmod +x debian/tmp/usr/lib/i2p/i2psvc
|
mkdir -p debian/tmp/usr/lib/i2p
|
||||||
|
mkdir -p debian/tmp/usr/bin
|
||||||
@# Create the Debian copyright file, move the licenses dir,
|
|
||||||
@# and delete all license files that are already in /usr/share/common-licenses/
|
cp -a debian/scripts/init debian/tmp/etc/init.d/i2p
|
||||||
|
|
||||||
|
@# copy config templates to /etc/i2p
|
||||||
|
cp -a pkg-temp/blocklist.txt debian/tmp/etc/i2p/
|
||||||
|
cp -a pkg-temp/clients.config debian/tmp/etc/i2p/
|
||||||
|
cp -a pkg-temp/hosts.txt debian/tmp/etc/i2p/
|
||||||
|
cp -a pkg-temp/i2psnark.config debian/tmp/etc/i2p/
|
||||||
|
cp -a pkg-temp/i2ptunnel.config debian/tmp/etc/i2p/
|
||||||
|
cp -a pkg-temp/jetty-i2psnark.xml debian/tmp/etc/i2p/
|
||||||
|
cp -a pkg-temp/systray.config debian/tmp/etc/i2p/
|
||||||
|
|
||||||
|
@# copy architecture independent files to /usr/share/i2p and create symlinks to /etc/i2p/
|
||||||
|
ln -s /etc/i2p/blocklist.txt debian/tmp/usr/share/i2p/blocklist.txt
|
||||||
|
ln -s /etc/i2p/clients.config debian/tmp/usr/share/i2p/clients.config
|
||||||
|
ln -s /etc/i2p/hosts.txt debian/tmp/usr/share/i2p/hosts.txt
|
||||||
|
ln -s /etc/i2p/i2psnark.config debian/tmp/usr/share/i2p/i2psnark.config
|
||||||
|
ln -s /etc/i2p/i2ptunnel.config debian/tmp/usr/share/i2p/i2ptunnel.config
|
||||||
|
ln -s /etc/i2p/jetty-i2psnark.xml debian/tmp/usr/share/i2p/jetty-i2psnark.xml
|
||||||
|
ln -s /etc/i2p/systray.config debian/tmp/usr/share/i2p/systray.config
|
||||||
|
ln -s /etc/i2p/wrapper.config debian/tmp/usr/share/i2p/wrapper.config
|
||||||
|
cp -a pkg-temp/docs debian/tmp/usr/share/i2p/
|
||||||
|
cp -a pkg-temp/eepsite debian/tmp/usr/share/i2p/
|
||||||
|
cp -a pkg-temp/geoip debian/tmp/usr/share/i2p/
|
||||||
|
cp -a pkg-temp/lib/*.jar debian/tmp/usr/share/i2p/lib/
|
||||||
|
cp -a pkg-temp/scripts debian/tmp/usr/share/i2p/
|
||||||
|
cp -a pkg-temp/webapps debian/tmp/usr/share/i2p/
|
||||||
|
cp -a pkg-temp/licenses debian/tmp/usr/share/doc/i2p/
|
||||||
|
@# Create the Debian copyright file
|
||||||
cat debian/copyright.part1 LICENSE.txt > debian/tmp/usr/share/doc/i2p/copyright
|
cat debian/copyright.part1 LICENSE.txt > debian/tmp/usr/share/doc/i2p/copyright
|
||||||
mv debian/tmp/usr/lib/i2p/licenses debian/tmp/usr/share/doc/i2p
|
@# delete all license files that are already in /usr/share/common-licenses/
|
||||||
rm debian/tmp/usr/lib/i2p/LICENSE.txt
|
|
||||||
rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-Apache2.0.txt
|
rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-Apache2.0.txt
|
||||||
rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-GPLv2.txt
|
rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-GPLv2.txt
|
||||||
rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-LGPLv2.1.txt
|
rm debian/tmp/usr/share/doc/i2p/licenses/LICENSE-LGPLv2.1.txt
|
||||||
|
|
||||||
|
@# copy wrapper files to /usr/lib/i2p (including wrapper.jar because it is architecture dependent)
|
||||||
|
cp ${wrapperpath}/libwrapper.so debian/tmp/usr/lib/i2p/
|
||||||
|
cp ${wrapperpath}/wrapper.jar debian/tmp/usr/lib/i2p/
|
||||||
|
cp ${wrapperpath}/i2psvc debian/tmp/usr/lib/i2p/
|
||||||
|
chmod +x debian/tmp/usr/lib/i2p/i2psvc
|
||||||
|
|
||||||
|
@# copy remaining executables to /usr/bin, replace INSTALL_PATH and SYSTEM_java_io_tmpdir
|
||||||
|
sed 's|%INSTALL_PATH|/usr/share/i2p|g' pkg-temp/eepget > debian/tmp/usr/bin/eepget
|
||||||
|
chmod +x debian/tmp/usr/bin/eepget
|
||||||
|
cat pkg-temp/i2prouter | \
|
||||||
|
sed 's|$$I2P/i2psvc|/usr/lib/i2p/i2psvc|g' | \
|
||||||
|
sed 's|$$I2P/wrapper.config|/etc/i2p/wrapper.config|g' | \
|
||||||
|
sed 's|%INSTALL_PATH|/usr/share/i2p|g' | \
|
||||||
|
sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' > debian/tmp/usr/bin/i2prouter
|
||||||
|
chmod +x debian/tmp/usr/bin/i2prouter
|
||||||
|
@# The first 4 sed commands each replace the first \$INSTALL_PATH that hasn't been replaced
|
||||||
|
@# wrapper.java.classpath.1 --> /usr/share/i2p/lib/*.jar:/usr/lib/i2p/wrapper.jar
|
||||||
|
@# wrapper.java.library.path.1 --> /usr/lib/i2p
|
||||||
|
@# wrapper.java.library.path.2 --> /usr/lib/i2p
|
||||||
|
@# i2p.dir.base --> /usr/share/i2p
|
||||||
|
cat pkg-temp/wrapper.config | \
|
||||||
|
sed '0,/$$INSTALL_PATH\/lib\/\*\.jar/s//\/usr\/share\/i2p\/lib\/*.jar\nwrapper.java.classpath.2=\/usr\/lib\/i2p\/wrapper.jar/' | \
|
||||||
|
sed '0,/$$INSTALL_PATH/s//\/usr\/lib\/i2p/' | \
|
||||||
|
sed '0,/$$INSTALL_PATH/s//\/usr\/lib\/i2p/' | \
|
||||||
|
sed '0,/$$INSTALL_PATH/s//\/usr\/share\/i2p/' | \
|
||||||
|
sed 's|$$SYSTEM_java_io_tmpdir|/tmp|g' > debian/tmp/etc/i2p/wrapper.config
|
||||||
|
@# now do runplain.sh
|
||||||
|
cat pkg-temp/runplain.sh | \
|
||||||
|
sed 's|-Djava.library.path=$$I2P:$$I2P/lib|-Djava.library.path=/usr/lib/i2p|g' | \
|
||||||
|
sed 's|%INSTALL_PATH|/usr/share/i2p|g' | \
|
||||||
|
sed 's|%SYSTEM_java_io_tmpdir|/tmp|g' > debian/tmp/usr/share/i2p/runplain.sh
|
||||||
|
chmod +x debian/tmp/usr/share/i2p/runplain.sh
|
||||||
|
|
||||||
|
touch debian/build
|
||||||
|
|
||||||
@# changelog
|
@# changelog
|
||||||
gzip -9c history.txt > debian/tmp/usr/share/doc/i2p/changelog.gz
|
gzip -9c history.txt > debian/tmp/usr/share/doc/i2p/changelog.gz
|
||||||
gzip -9c debian/changelog > debian/tmp/usr/share/doc/i2p/changelog.Debian.gz
|
gzip -9c debian/changelog > debian/tmp/usr/share/doc/i2p/changelog.Debian.gz
|
||||||
@ -61,7 +102,7 @@ endif
|
|||||||
binary: build
|
binary: build
|
||||||
mkdir -p debian/tmp/DEBIAN
|
mkdir -p debian/tmp/DEBIAN
|
||||||
dpkg-gencontrol
|
dpkg-gencontrol
|
||||||
cp -a debian/scripts/postinst debian/scripts/postrm debian/scripts/prerm debian/tmp/DEBIAN
|
cp -a debian/scripts/postinst debian/scripts/postrm debian/scripts/prerm debian/conffiles debian/tmp/DEBIAN
|
||||||
dpkg-deb -b debian/tmp ..
|
dpkg-deb -b debian/tmp ..
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
2
debian/scripts/init
vendored
2
debian/scripts/init
vendored
@ -14,7 +14,7 @@ set -e
|
|||||||
. /lib/lsb/init-functions
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
I2P () {
|
I2P () {
|
||||||
su i2psvc -c "/usr/lib/i2p/i2prouter $1"
|
su i2psvc -c "/usr/bin/i2prouter $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ `id -un` != "root" ]; then
|
if [ `id -un` != "root" ]; then
|
||||||
|
2
debian/scripts/postinst
vendored
2
debian/scripts/postinst
vendored
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
SVCHOME=/var/lib/i2p
|
SVCHOME=/var/lib/i2p
|
||||||
I2P=/usr/lib/i2p
|
I2P=/usr/share/i2p
|
||||||
I2PUSER=i2psvc
|
I2PUSER=i2psvc
|
||||||
|
|
||||||
useradd -d $SVCHOME -r $I2PUSER
|
useradd -d $SVCHOME -r $I2PUSER
|
||||||
|
2
debian/scripts/postrm
vendored
2
debian/scripts/postrm
vendored
@ -9,6 +9,6 @@ fi
|
|||||||
|
|
||||||
# if somebody did updates in-network, there may be new files that dpkg
|
# if somebody did updates in-network, there may be new files that dpkg
|
||||||
# doesn't know about, so just to be sure
|
# doesn't know about, so just to be sure
|
||||||
I2P=/usr/lib/i2p
|
I2P=/usr/share/i2p
|
||||||
rm -rf $I2P
|
rm -rf $I2P
|
||||||
|
|
||||||
|
3
debian/scripts/prerm
vendored
3
debian/scripts/prerm
vendored
@ -8,7 +8,8 @@ rm -f /tmp/wrapper.log /tmp/wrapper.log.1 /tmp/wrapper.log.2 /tmp/i2p.pid /tmp/r
|
|||||||
update-rc.d -f i2p remove
|
update-rc.d -f i2p remove
|
||||||
|
|
||||||
# dpkg doesn't know about these files, they were copied out of jbigi.jar by the router
|
# dpkg doesn't know about these files, they were copied out of jbigi.jar by the router
|
||||||
rm -f $I2P/libjbigi.so $I2P/libjcpuid.so
|
LIB=/usr/lib/i2p
|
||||||
|
rm -f $LIB/libjbigi.so $LIB/libjcpuid.so
|
||||||
|
|
||||||
# the home directory for the i2p daemon
|
# the home directory for the i2p daemon
|
||||||
SVCHOME=/var/lib/i2p
|
SVCHOME=/var/lib/i2p
|
||||||
|
Reference in New Issue
Block a user