Preparing and uploading binaries to Usenet (CLI)

Share your own howto's etc. Not for support questions!

Preparing and uploading binaries to Usenet (CLI)

Postby Hallvor » 2016-12-09 15:11

Preparing files

Since I keep forgetting how to prepare my binaries from the CLI, I thought it would be better if I wrote it online for future reference. Perhaps someone will find it useful as well.

This howto I will show how you can split archives into bits and make parity files from the CLI.

You will need non-free software to do the following steps.

First we need necessary software, namely rar to archive and split the binaries, and then par2 for error correction during download.

Code: Select all
# apt-get install rar par2

Let is assume I have the file debian-8.6.0-i386-netinst.iso inside my home directory, with the path /home/hallvor/debian-8.6.0-i386-netinst.iso

I then issue the following command:

Code: Select all
$ rar a debian-8.6.0-i386-netinst.rar -v50m -m0  debian-8.6.0-i386-netinst *

This command will start rar and create several archives, starting with a file called debian-8.6.0-i386-netinst.rar. -50m means that rar will split the archives into file sizes of 50 megabytes. -m0 means no compression, 3 is default and 5 is best. The iso will be stored inside a folder named debian-8.6.0-i386-netinst when it is extracted, and the * means all files in the directory will be appended. The advantage of creating a folder for the extracted file is especially apparent for a multi-file archive, where files otherwise could be accidentally mixed with others.

Parity files will make your Usenet client able to repair downloads with errors.

You can now remove the .iso from the directory.

Issue the following command to create parity files:

Code: Select all
$ par2create "debian-8.6.0-i386-netinst" -r20 -n10 *.rar

-r20 means it will create parity files of 20% redundancy, and -n10 means 10 files.

The parity files can be verified with

Code: Select all
$ par2verify *.par2

The files are now ready to be uploaded.

Uploading files

There are not many options available for uploading files if you want to use open source software on GNU/Linux. One of the most popular ones with a GUI is JBinUp. It works well, uses Java, but is closed source. Other options are newspost, bur unfortunately it hasn't been under active development since more than a decade. Then there is sanguinews - a very good CLI usenet uploader for GNU/Linux.

Sanguinews is not in the official repositories, so we need build-essential and ruby-dev to install it.

Code: Select all
# apt-get install build-essential ruby-dev

You can now install sanguinews as a gem

Code: Select all
# gem install sanguinews

Now we need to put a config file called .sanguinews in your /home directory (as regular user)

Code: Select all
$ nano ~/.sanguinews.conf

Paste this content into the file

Code: Select all
# Sample config file
# Groups to post to
# Separate multiple groups with comma
groups = alt.binaries.test
# Your identity
from = witty_nickname <>

# Username to use for authentication
username = your_username
# Password
password = your_password
# server to use
server = your_server
# Use SSL connection?
ssl = yes
# port
port = 563
# number of connections
connections = 10
# article size in bytes
article_size = 768000
# Wait this many seconds before trying to reconnect after unsuccessful upload
reconnect_delay = 5
# Subject prefix to use
prefix = "[sanguinews] - "
# Enable nzb creation
nzb = yes
# Use header checking? Upload will be slow but reliable.
header_check = no

# Debug information
debug = no
# headers
# X-No-Archive
xna = no

You need to at least edit the following parts: groups (to post to), username, password and server.

After you have finished editing everything, press Ctrl + X, and then Y to save the changes.

You can find different options for sanguinews by typing sanguinews --help

hallvor@debian-hp:~$ sanguinews --help

Code: Select all
sanguinews v0.80.1. Copyright (c) 2013-2014 Tadeus Dobrovolskij.
Comes with ABSOLUTELY NO WARRANTY. Distributed under GPL v2 license(
sanguinews is a simple nntp(usenet) binary poster. It supports multithreading and SSL. More info in README.

Usage: sanguinews [OPTIONS] [DIRECTORY] | -f FILE1..[FILEX]

    -c, --config CONFIG              use different config file
    -C, --check                      check headers while uploading; slow but reliable
    -f, --file FILE                  upload FILE, treat all additional parameters as files
    -g, --groups GROUP_LIST          use these groups(comma separated) for upload
    -h, --help                       help
    -p, --password PASSWORD          use PASSWORD as your password(overwrites config file)
    -r, --recursive                  process all files under each directory recursively
    -u, --user USERNAME              use USERNAME as your username(overwrites config file)
    -v, --verbose                    be verbose?
    -V, --version                    print version information and then exit


Let's upload something and assume that I put all the files above in ~/upload

The files can then be uploaded with

Code: Select all
$ sanguinews -v /home/hallvor/upload/
Laptop: Intel Core i5 3210-M CPU @ 2.50 GHz, 16 GB RAM, Intel HD 4000 graphics, 128 GB SSD + 1 TB HDD, Debian Jessie (KDE)
Laptop 2: Intel Core i5 3320-M CPU @ 2.60 GHz, 6 GB RAM, Intel HD 4000 graphics, 300 GB HDD, Debian Jessie (KDE)
User avatar
Posts: 680
Joined: 2009-04-16 18:35
Location: Norway

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests