Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterTea committed Jul 31, 2020
2 parents 2d1041d + e81db4e commit 8d0bf58
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 54 deletions.
80 changes: 56 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,28 @@ Linux: ![Linux CI](https://github.com/MisterTea/EternalTerminal/workflows/Linux%

The easiest way to install is using Homebrew:

brew install MisterTea/et/et
```
brew install MisterTea/et/et
```

Alternatively, a package is available in MacPorts:

sudo port install et
```
sudo port install et
```

### Ubuntu

For Ubuntu, use our PPA:

sudo add-apt-repository ppa:jgmath2000/et
sudo apt-get update
sudo apt-get install et
```
sudo add-apt-repository ppa:jgmath2000/et
sudo apt-get update
sudo apt-get install et
```

Install and build from source:

```
sudo apt install build-essential libgflags-dev libprotobuf-dev protobuf-compiler libsodium-dev cmake git
git clone --recurse-submodules https://github.com/MisterTea/EternalTerminal.git
Expand All @@ -41,29 +48,40 @@ cmake ../
make && sudo make install
sudo cp ../etc/et.cfg /etc/
```

Once built, the binary only requires `libgflags-dev` and `libprotobuf-dev`.

### Debian

For debian, use our deb repo. For buster:

echo "deb https://github.com/MisterTea/debian-et/raw/master/debian-source/ buster main" | sudo tee -a /etc/apt/sources.list
curl -sSL https://github.com/MisterTea/debian-et/raw/master/et.gpg | sudo apt-key add -
sudo apt update
sudo apt install et

```
echo "deb https://github.com/MisterTea/debian-et/raw/master/debian-source/ buster main" | sudo tee -a /etc/apt/sources.list
curl -sSL https://github.com/MisterTea/debian-et/raw/master/et.gpg | sudo apt-key add -
sudo apt update
sudo apt install et
```

### CentOS 7

Up to the present day the only way to install is to [build from source](#centos-7).
Up to the present day the only way to install is to [build from source](#centos-7-1).

### CentOS 8

```
sudo dnf install epel-release
sudo dnf install et
```

### FreeBSD
On FreeBSD, use:

pkg install eternalterminal
```
pkg install eternalterminal
```

### Fedora (version 29 and later):

```
sudo dnf install et
```
Expand All @@ -82,28 +100,38 @@ Install dependencies:

* Fedora (tested on 25):

sudo dnf install boost-devel libsodium-devel ncurses-devel protobuf-devel \
protobuf-compiler cmake gflags-devel
```
sudo dnf install boost-devel libsodium-devel ncurses-devel protobuf-devel \
protobuf-compiler cmake gflags-devel
```

* Gentoo:

sudo emerge dev-libs/boost dev-libs/libsodium sys-libs/ncurses \
dev-libs/protobuf dev-util/cmake dev-cpp/gflags
```
sudo emerge dev-libs/boost dev-libs/libsodium sys-libs/ncurses \
dev-libs/protobuf dev-util/cmake dev-cpp/gflag
```

Download and install from source:

git clone --recurse-submodules https://github.com/MisterTea/EternalTerminal.git
cd EternalTerminal
mkdir build
cd build
cmake ../
make
sudo make install
```
git clone --recurse-submodules https://github.com/MisterTea/EternalTerminal.git
cd EternalTerminal
mkdir build
cd build
cmake ../
make
sudo make install
```

### Windows

Eternal Terminal works under WSL (Windows Subsystem for Linux). Follow the ubuntu instructions.

### Docker Image

See [docker/README.md](docker/)

## Verifying

Verify that the client is installed correctly by looking for the `et` executable: `which et`.
Expand Down Expand Up @@ -179,7 +207,7 @@ Grab the deps and then follow this process:
Debian/Ubuntu Dependencies:
```
sudo apt install libboost-dev libsodium-dev libncurses5-dev \
libprotobuf-dev protobuf-compiler cmake libgflags-dev libutempter-dev cmake git
libprotobuf-dev protobuf-compiler cmake libgflags-dev libutempter-dev cmake git
```

Source and setup:
Expand Down Expand Up @@ -247,6 +275,10 @@ Start the et service:
sudo systemctl enable --now et.service
```

## Building using Docker

Builder Dockerfiles are located at [deployment/](deployment/). Supported OSes: CentOS 8, openSUSE and Ubuntu.

## Reporting issues

If you have any problems with installation or usage, please [file an issue on github](https://github.com/MisterTea/EternalTerminal/issues).
Expand Down
15 changes: 5 additions & 10 deletions deployment/centos.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,18 @@ COPY id_rsa.pub .ssh/
RUN chmod 0400 .ssh/id_rsa

RUN dnf -y install dnf-plugins-core
RUN yum update -y
RUN yum groupinstall -y "Development Tools"
RUN yum install -y epel-release
RUN dnf update -y
RUN dnf groupinstall -y "Development Tools"
RUN dnf install -y epel-release
RUN dnf config-manager --set-enabled PowerTools
RUN yum install --nogpgcheck -y openssh-server cmake3 gcc-c++ protobuf-devel libsodium-devel
RUN dnf install --nogpgcheck -y openssh-server cmake3 gcc-c++ protobuf-devel libsodium-devel
RUN alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
--family cmake

RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Jason Gauci"

RUN echo -e "StrictHostKeyChecking no\n" >> ~/.ssh/config

RUN git clone --branch release [email protected]:MisterTea/EternalTerminal.git
RUN git clone --branch release https://github.com/MisterTea/EternalTerminal.git
RUN mkdir -p EternalTerminal/build
WORKDIR /root/EternalTerminal/build
RUN cmake -DFULL_PROTOBUF=ON ..
Expand Down
6 changes: 1 addition & 5 deletions deployment/opensuse.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@ COPY .gnupg .gnupg
RUN zypper --non-interactive install -t pattern devel_C_C++
RUN zypper --non-interactive install git openssh cmake gcc-c++ protobuf-devel libsodium-devel

RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Jason Gauci"

RUN ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN git clone --branch release [email protected]:MisterTea/EternalTerminal.git
RUN git clone --branch release https://github.com/MisterTea/EternalTerminal.git
6 changes: 1 addition & 5 deletions deployment/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ ARG DEBIAN_FRONTEND=noninteractive

RUN apt update && apt upgrade -y && apt install -y distro-info build-essential git devscripts ubuntu-dev-tools aptly dput jq libsodium-dev libprotobuf-dev protobuf-compiler cmake libutempter-dev debhelper dh-systemd

RUN git config --global user.email "[email protected]"
RUN git config --global user.name "Jason Gauci"

RUN ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN git clone --branch release [email protected]:MisterTea/EternalTerminal.git
RUN git clone --branch release https://github.com/MisterTea/EternalTerminal.git

COPY ubuntu/deploy_ubuntu_ppa.sh .
3 changes: 1 addition & 2 deletions src/terminal/TerminalClientMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ int main(int argc, char** argv) {

// Setup easylogging configurations
el::Configurations defaultConf = LogHandler::setupLogHandler(&argc, &argv);
LogHandler::setupStdoutLogger();

// Parse command line arguments
cxxopts::Options options("et", "Remote shell for the busy and impatient");
Expand Down Expand Up @@ -103,8 +104,6 @@ int main(int argc, char** argv) {
// set thread name
el::Helpers::setThreadName("client-main");

LogHandler::setupStdoutLogger();

// Install log rotation callback
el::Helpers::installPreRollOutCallback(LogHandler::rolloutHandler);

Expand Down
5 changes: 1 addition & 4 deletions src/terminal/TerminalMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ void setDaemonLogFile(string idpasskey, string daemonType) {
int main(int argc, char** argv) {
// Setup easylogging configurations
el::Configurations defaultConf = LogHandler::setupLogHandler(&argc, &argv);
LogHandler::setupStdoutLogger();

// Parse command line arguments
cxxopts::Options options("et", "Remote shell for the busy and impatient");
Expand Down Expand Up @@ -148,8 +149,6 @@ int main(int argc, char** argv) {
// Install log rotation callback
el::Helpers::installPreRollOutCallback(LogHandler::rolloutHandler);

LogHandler::setupStdoutLogger();

CLOG(INFO, "stdout") << "IDPASSKEY:" << idpasskey << endl;
if (DaemonCreator::createSessionLeader() == -1) {
STFATAL << "Error creating daemon: " << strerror(errno);
Expand Down Expand Up @@ -183,8 +182,6 @@ int main(int argc, char** argv) {
// Install log rotation callback
el::Helpers::installPreRollOutCallback(LogHandler::rolloutHandler);

LogHandler::setupStdoutLogger();

SocketEndpoint routerEndpoint;
routerEndpoint.set_name(result["serverfifo"].as<string>());
UserTerminalHandler uth(ipcSocketHandler, term, true, routerEndpoint,
Expand Down
3 changes: 1 addition & 2 deletions src/terminal/TerminalServerMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ using namespace gflags;
int main(int argc, char **argv) {
// Setup easylogging configurations
el::Configurations defaultConf = LogHandler::setupLogHandler(&argc, &argv);
LogHandler::setupStdoutLogger();

cxxopts::Options options("etserver",
"Remote shell for the busy and impatient");
Expand Down Expand Up @@ -137,8 +138,6 @@ int main(int argc, char **argv) {
// Install log rotation callback
el::Helpers::installPreRollOutCallback(LogHandler::rolloutHandler);

LogHandler::setupStdoutLogger();

std::shared_ptr<SocketHandler> tcpSocketHandler(new TcpSocketHandler());
std::shared_ptr<PipeSocketHandler> pipeSocketHandler(
new PipeSocketHandler());
Expand Down
3 changes: 1 addition & 2 deletions test/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ int main(int argc, char **argv) {
// Setup easylogging configurations
el::Configurations defaultConf =
et::LogHandler::setupLogHandler(&argc, &argv);
et::LogHandler::setupStdoutLogger();
defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "true");
defaultConf.setGlobally(el::ConfigurationType::ToFile, "true");
// el::Loggers::setVerboseLevel(9);
Expand All @@ -22,8 +23,6 @@ int main(int argc, char **argv) {
// Reconfigure default logger to apply settings above
el::Loggers::reconfigureLogger("default", defaultConf);

et::LogHandler::setupStdoutLogger();

int result = Catch::Session().run(argc, argv);

FATAL_FAIL(::remove(logPath.c_str()));
Expand Down

0 comments on commit 8d0bf58

Please sign in to comment.