Merge pull request #48 from 13-37-org/master
built packages for infnoise-tools and make systemd service deactivatable
This commit is contained in:
@@ -15,16 +15,27 @@ The VisualStudio project for infnoise is in the infnoise/software/VisualStudio d
|
||||
Using prebuilt packages for Linux
|
||||
---------------------------------
|
||||
|
||||
Precompiled binaries can be downloaded from the releases section of manuel-domke's fork:
|
||||
https://github.com/manuel-domke/infnoise/releases
|
||||
Precompiled binaries can be downloaded from the releases section of the 13-37.org fork:
|
||||
https://github.com/13-37.org/infnoise/releases
|
||||
|
||||
All packages are signed with the same PGP-Key (Key-ID: 0x4E730A3C) used for the repositories below.
|
||||
Full Fingerprint: 71AE 099B 262D C0B4 93E6 EE71 975D C25C 4E73 0A3C. You can also check the
|
||||
fingerprints at 13-37.org/pgp-keys and in the Crowd Supply campaign.
|
||||
|
||||
Repositories for Ubuntu, Debian and Raspbian are also available. To add them follow this procedure:
|
||||
|
||||
$ wget -O - https://13-37.org/files/pubkey.gpg | sudo apt-key add -
|
||||
|
||||
Available for Ubuntu ("xenial", "yakkety" and "zesty") and Debian ("wheezy", "jessie" and "stretch").
|
||||
$ wget -O 13-37.org-code.asc https://13-37.org/files/pubkey.gpg
|
||||
|
||||
Verify the keys fingerprint:
|
||||
|
||||
# GPG1
|
||||
$ gpg --with-fingerprints 13-37.org-code.asc
|
||||
# GPG2:
|
||||
$ gpg2 --import-options import-show --dry-run --import < 13-37.org-code.asc
|
||||
|
||||
$ sudo apt-key add 13-37.org-code.gpg
|
||||
|
||||
Available for Ubuntu ("xenial", "zesty", "artful" and "bionic") and Debian ("wheezy", "jessie" and "stretch").
|
||||
Replace <DISTRO> with the specific distro you're using.
|
||||
|
||||
$ echo "deb http://repo.13-37.org/ <DISTRO> main" | sudo tee /etc/apt/sources.list.d/infnoise.list
|
||||
|
||||
@@ -17,5 +17,7 @@ package() {
|
||||
install -Dvm755 "${srcdir}/infnoise/software/infnoise" "${pkgdir}/usr/bin/infnoise"
|
||||
install -Dvm644 "${srcdir}/infnoise/software/init_scripts/75-infnoise.rules" "${pkgdir}/etc/udev/rules.d/75-infnoise.rules"
|
||||
install -Dvm644 "${srcdir}/infnoise/software/init_scripts/infnoise.conf.systemd" "${pkgdir}/etc/infnoise.conf"
|
||||
install -Dvm644 "${srcdir}/infnoise/software/init_scripts/infnoise.service.bin" "${pkgdir}/etc/systemd/system/infnoise.service"
|
||||
install -Dvm644 "${srcdir}/infnoise/software/init_scripts/infnoise.service.bin" "${pkgdir}/lib/systemd/system/infnoise.service"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,9 +16,11 @@ tar -czf SOURCES/infnoise.tar.gz . --exclude="SOURCES"
|
||||
|
||||
mkdir -p BUILD SPECS RPMS SRPMS
|
||||
|
||||
cp build-scripts/infnoise.spec SPECS
|
||||
cp build-scripts/infnoise.spec build-scripts/infnoise-tools.spec SPECS
|
||||
sed -i -- 's/__VERSION__/'$VERSION'/g' SPECS/infnoise.spec
|
||||
sed -i -- 's/__RELEASE__/'$RELEASE'/g' SPECS/infnoise.spec
|
||||
sed -i -- 's/__VERSION__/'$VERSION'/g' SPECS/infnoise-tools.spec
|
||||
sed -i -- 's/__RELEASE__/'$RELEASE'/g' SPECS/infnoise-tools.spec
|
||||
|
||||
rpmbuild --define "_topdir `pwd`" -ba SPECS/infnoise.spec
|
||||
|
||||
rpmbuild --define "_topdir `pwd`" -ba SPECS/infnoise-tools.spec
|
||||
|
||||
@@ -10,7 +10,7 @@ make
|
||||
|
||||
rm -rf build
|
||||
mkdir -p build/DEBIAN
|
||||
cp build-scripts/control.debian.tools build/DEBIAN/control
|
||||
cp build-scripts/control.debian.infnoise build/DEBIAN/control
|
||||
cp build-scripts/infnoise.postinst build/DEBIAN/postinst
|
||||
chmod 775 build/DEBIAN/postinst
|
||||
echo "Version: $VERSION" >> build/DEBIAN/control
|
||||
@@ -18,12 +18,12 @@ echo "Architecture: $ARCH" >> build/DEBIAN/control
|
||||
|
||||
mkdir -p build/usr/sbin/
|
||||
mkdir -p build/etc/udev/rules.d/
|
||||
mkdir -p build/etc/systemd/system/
|
||||
mkdir -p build/lib/systemd/system/
|
||||
|
||||
cp infnoise build/usr/sbin/
|
||||
cp init_scripts/infnoise.conf.systemd build/etc/infnoise.conf
|
||||
cp init_scripts/75-infnoise.rules build/etc/udev/rules.d/75-infnoise.rules
|
||||
cp init_scripts/infnoise.service.sbin build/etc/systemd/system/infnoise.service
|
||||
cp init_scripts/infnoise.service.sbin build/lib/systemd/system/infnoise.service
|
||||
|
||||
if [ ! -e build/usr/sbin/infnoise ] ; then
|
||||
echo "$2 binary missing"
|
||||
@@ -36,21 +36,23 @@ dpkg -b build/ infnoise_${VERSION}_${ARCH}.deb
|
||||
|
||||
### build infnoise-tools ###
|
||||
rm -rf build
|
||||
|
||||
cd tools
|
||||
mkdir -p build/usr/bin/
|
||||
|
||||
make
|
||||
|
||||
cp passgen build/usr/bin/infnoise-passgen
|
||||
cp dice build/usr/bin/infnoise-dice
|
||||
cp entheck build/usr/bin/infnoise-entcheck
|
||||
cp healtcheck build/usr/bin/infnoise-healthcheck
|
||||
cp entcheck build/usr/bin/infnoise-entcheck
|
||||
cp healthcheck build/usr/bin/infnoise-healthcheck
|
||||
cp hex2bin build/usr/bin/infnoise-hex2bin
|
||||
cp bin2hex build/usr/bin/infnoise-bin2hex
|
||||
cp findlongest build/usr/bin/infnoise-findlongest
|
||||
cp flipbits build/usr/bin/infnoise-flipbits
|
||||
|
||||
mkdir -p build/DEBIAN
|
||||
cp build-scripts/control.debian.tools build/DEBIAN/control
|
||||
cp ../build-scripts/control.debian.tools build/DEBIAN/control
|
||||
echo "Version: $VERSION" >> build/DEBIAN/control
|
||||
echo "Architecture: $ARCH" >> build/DEBIAN/control
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Package: infnoise
|
||||
Architecture: amd64
|
||||
Essential: no
|
||||
Section: security
|
||||
Priority: optional
|
||||
|
||||
@@ -22,28 +22,25 @@ make
|
||||
|
||||
%install
|
||||
#make DESTDIR=$RPM_BUILD_ROOT install
|
||||
cp passgen build/usr/bin/infnoise-passgen
|
||||
cp dice build/usr/bin/infnoise-dice
|
||||
cp healtcheck build/usr/bin/infnoise-healthcheck
|
||||
cp hex2bin build/usr/bin/infnoise-hex2bin
|
||||
cp bin2hex build/usr/bin/infnoise-bin2hex
|
||||
cp findlongest build/usr/bin/infnoise-findlongest
|
||||
cp flipbits build/usr/bin/infnoise-flipbits
|
||||
|
||||
|
||||
|
||||
install -Dvm755 "passgen" "$RPM_BUILD_ROOT/usr/bin/infnoise-passgen"
|
||||
install -Dvm755 "dice" "$RPM_BUILD_ROOT/usr/bin/infnoise-dice"
|
||||
install -Dvm755 "healthcheck" "$RPM_BUILD_ROOT/usr/bin/infnoise-entcheck"
|
||||
install -Dvm755 "entcheck" "$RPM_BUILD_ROOT/usr/bin/infnoise-healthcheck"
|
||||
install -Dvm755 "hex2bin" "$RPM_BUILD_ROOT/usr/bin/infnoise-hex2bin"
|
||||
install -Dvm755 "bin2hex" "$RPM_BUILD_ROOT/usr/bin/infnoise-bin2hex"
|
||||
install -Dvm755 "findlongest" "$RPM_BUILD_ROOT/usr/bin/infnoise-findlongest"
|
||||
install -Dvm755 "flipbits" "$RPM_BUILD_ROOT/usr/bin/infnoise-flipbits"
|
||||
install -Dvm755 "tools/passgen" "$RPM_BUILD_ROOT/usr/bin/infnoise-passgen"
|
||||
install -Dvm755 "tools/dice" "$RPM_BUILD_ROOT/usr/bin/infnoise-dice"
|
||||
install -Dvm755 "tools/healthcheck" "$RPM_BUILD_ROOT/usr/bin/infnoise-entcheck"
|
||||
install -Dvm755 "tools/entcheck" "$RPM_BUILD_ROOT/usr/bin/infnoise-healthcheck"
|
||||
install -Dvm755 "tools/hex2bin" "$RPM_BUILD_ROOT/usr/bin/infnoise-hex2bin"
|
||||
install -Dvm755 "tools/bin2hex" "$RPM_BUILD_ROOT/usr/bin/infnoise-bin2hex"
|
||||
install -Dvm755 "tools/findlongest" "$RPM_BUILD_ROOT/usr/bin/infnoise-findlongest"
|
||||
install -Dvm755 "tools/flipbits" "$RPM_BUILD_ROOT/usr/bin/infnoise-flipbits"
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/infnoise
|
||||
%{_bindir}/infnoise-passgen
|
||||
%{_bindir}/infnoise-dice
|
||||
%{_bindir}/infnoise-entcheck
|
||||
%{_bindir}/infnoise-hex2bin
|
||||
%{_bindir}/infnoise-bin2hex
|
||||
%{_bindir}/infnoise-findlongest
|
||||
%{_bindir}/infnoise-flipbits
|
||||
%{_bindir}/infnoise-healthcheck
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl --system daemon-reload
|
||||
systemctl enable infnoise
|
||||
|
||||
#service infnoise start
|
||||
service udev reload
|
||||
|
||||
@@ -26,6 +26,16 @@ install -Dvm644 "init_scripts/infnoise.conf.systemd" "$RPM_BUILD_ROOT/etc/infnoi
|
||||
install -Dvm644 "init_scripts/75-infnoise.rules" "$RPM_BUILD_ROOT/usr/lib/udev/rules.d/75-infnoise.rules"
|
||||
install -Dvm644 "init_scripts/infnoise.service.bin" "$RPM_BUILD_ROOT/usr/lib/systemd/system/infnoise.service"
|
||||
|
||||
%post
|
||||
systemctl daemon-reload
|
||||
systemctl enable infnoise.service
|
||||
systemctl daemon-reload
|
||||
|
||||
%preun
|
||||
systemctl stop infnoise.service >/dev/null 2>&1
|
||||
systemctl disable infnoise.service
|
||||
systemctl daemon-reload
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#define INFNOISE_VENDOR_ID 0x0403
|
||||
#define INFNOISE_PRODUCT_ID 0x6015
|
||||
#define INFNOISE_DESCRIPTION "FT240X USB FIFO"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@@ -186,7 +185,7 @@ static bool initializeUSB(struct ftdi_context *ftdic, char **message, char *seri
|
||||
}
|
||||
} else {
|
||||
// serial specified
|
||||
rc = ftdi_usb_open_desc(ftdic, INFNOISE_VENDOR_ID, INFNOISE_PRODUCT_ID, INFNOISE_DESCRIPTION, serial);
|
||||
rc = ftdi_usb_open_desc(ftdic, INFNOISE_VENDOR_ID, INFNOISE_PRODUCT_ID, NULL, serial);
|
||||
if (rc < 0) {
|
||||
if(!isSuperUser()) {
|
||||
*message = "Can't find Infinite Noise Multiplier. Try running as super user?\n";
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", SYMLINK+="infnoise"
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", SYMLINK+="infnoise", GROUP="dialout", MODE="0664"
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015" ,TAG+="systemd", ENV{SYSTEMD_WANTS}="infnoise.service"
|
||||
|
||||
Reference in New Issue
Block a user