Moved installed files under /opt; reduced installed .so list to those actually required

This commit is contained in:
Heather Anderson 2020-01-30 06:30:56 +00:00
parent 1e2f1cf339
commit 7863c847fb
8 changed files with 87 additions and 58 deletions

View file

@ -6,13 +6,13 @@ PartOf=athena-server.target
[Service]
Restart=always
WorkingDirectory=/var/lib/athena
Environment="LD_LIBRARY_PATH=/usr/share/athena/lib"
WorkingDirectory=/opt/athena
Environment="LD_LIBRARY_PATH=/opt/athena/lib"
User=athena
Group=athena
#LimitCORE=infinity
#ExecStart=/usr/share/athena/assignment-client -n 6
ExecStart=/usr/share/athena/assignment-client --min 6 --max 20
#ExecStart=/opt/athena/assignment-client -n 6
ExecStart=/opt/athena/assignment-client --min 6 --max 20
[Install]
WantedBy=multi-user.target

View file

@ -6,15 +6,15 @@ PartOf=athena-server@%i.target
[Service]
Restart=always
WorkingDirectory=/var/lib/athena
EnvironmentFile=/etc/athena/%i.conf
Environment="LD_LIBRARY_PATH=/usr/share/athena/lib" "HOME=/var/lib/athena/%i"
WorkingDirectory=/opt/athena
EnvironmentFile=/etc/opt/athena/%i.conf
Environment="LD_LIBRARY_PATH=/opt/athena/lib" "HOME=/var/lib/athena/%i"
PrivateTmp=true
User=athena
Group=athena
#LimitCORE=infinity
#ExecStart=/usr/share/athena/assignment-client -n 6
ExecStart=/usr/share/athena/assignment-client --min 6 --max 20 --server-port $HIFI_DOMAIN_SERVER_PORT
#ExecStart=/opt/athena/assignment-client -n 6
ExecStart=/opt/athena/assignment-client --min 6 --max 20 --server-port $HIFI_DOMAIN_SERVER_PORT
[Install]
WantedBy=multi-user.target

View file

@ -6,13 +6,13 @@ PartOf=athena-server.target
[Service]
Restart=on-failure
WorkingDirectory=/var/lib/athena
Environment="LD_LIBRARY_PATH=/usr/share/athena/lib"
WorkingDirectory=/opt/athena
Environment="LD_LIBRARY_PATH=/opt/athena/lib"
User=athena
Group=athena
#LimitCORE=infinity
#ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l domain-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/domain-server/domain-server; fi'
ExecStart=/usr/share/athena/domain-server
ExecStart=/opt/athena/domain-server
[Install]
WantedBy=multi-user.target

View file

@ -6,15 +6,15 @@ PartOf=athena-server@%i.target
[Service]
Restart=on-failure
WorkingDirectory=/var/lib/athena
EnvironmentFile=/etc/athena/%i.conf
Environment="LD_LIBRARY_PATH=/usr/share/athena/lib" "HOME=/var/lib/athena/%i"
WorkingDirectory=/opt/athena
EnvironmentFile=/etc/opt/athena/%i.conf
Environment="LD_LIBRARY_PATH=/opt/athena/lib" "HOME=/var/lib/athena/%i"
PrivateTmp=true
User=athena
Group=athena
#LimitCORE=infinity
#ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l domain-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/domain-server/domain-server; fi'
ExecStart=/usr/share/athena/domain-server
ExecStart=/opt/athena/domain-server
[Install]
WantedBy=multi-user.target

View file

@ -6,13 +6,13 @@ PartOf=athena-server.target
[Service]
Restart=on-failure
Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/usr/share/athena/lib"
WorkingDirectory=/var/lib/athena
Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/athena/lib"
WorkingDirectory=/opt/athena
User=athena
Group=athena
#ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l ice-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/ice-server/ice-server; fi'
#LimitCORE=infinity
ExecStart=/usr/share/athena/ice-server
ExecStart=/opt/athena/ice-server
[Install]
WantedBy=multi-user.target

View file

@ -6,15 +6,15 @@ PartOf=athena-server@%i.target
[Service]
Restart=on-failure
EnvironmentFile=/etc/athena/%i.conf
Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/usr/share/athena/lib" "HOME=/var/lib/athena/%i"
EnvironmentFile=/etc/opt/athena/%i.conf
Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/athena/lib" "HOME=/var/lib/athena/%i"
PrivateTmp=true
WorkingDirectory=/var/lib/athena
WorkingDirectory=/opt/athena
User=athena
Group=athena
#ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l ice-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/ice-server/ice-server; fi'
#LimitCORE=infinity
ExecStart=/usr/share/athena/ice-server
ExecStart=/opt/athena/ice-server
[Install]
WantedBy=multi-user.target

View file

@ -1,7 +1,7 @@
#ATHENA=~/Athena rpmbuild --target x86_64 -bb athena-server.spec
Name: athena-server
Version: 0.86.0_K1_20200112_7584429
Release: 4%{?dist}
Version: 0.86.0_K1_20200128_486c7bde5bedf152e70fc63281f14da26ecec738
Release: 2%{?dist}
Summary: Project Athena metaverse platform, based on the High Fidelity Engine.
License: ASL 2.0
@ -28,33 +28,38 @@ Project Athena allows creation and sharing of VR experiences.
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/athena
install -m 0755 -t $RPM_BUILD_ROOT/etc/athena $ATHENA/source/pkg-scripts/new-server
install -d $RPM_BUILD_ROOT/usr/share/athena
install -m 0755 $ATHENA/build/assignment-client/assignment-client $RPM_BUILD_ROOT/usr/share/athena
install -m 0755 $ATHENA/build/domain-server/domain-server $RPM_BUILD_ROOT/usr/share/athena
#install -m 0755 $ATHENA/build/ice-server/ice-server $RPM_BUILD_ROOT/usr/share/athena
chrpath -d $RPM_BUILD_ROOT/usr/share/athena/*
install -d $RPM_BUILD_ROOT/usr/share/athena/lib
install -m 0644 -t $RPM_BUILD_ROOT/usr/share/athena/lib $ATHENA/qt5-install/lib/*.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/usr/share/athena/lib $ATHENA/build/ext/makefiles/quazip/project/lib/*.so.*.*.*
install -d $RPM_BUILD_ROOT/usr/lib/systemd/system
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-assignment-client.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-assignment-client@.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-domain-server.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-domain-server@.service
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-ice-server.service
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-ice-server@.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-server.target
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-server@.target
cp -a $ATHENA/source/domain-server/resources $RPM_BUILD_ROOT/usr/share/athena
install -d $RPM_BUILD_ROOT/opt/athena
install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/build/assignment-client/assignment-client
install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/build/domain-server/domain-server
#install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/build/ice-server/ice-server
chrpath -d $RPM_BUILD_ROOT/opt/athena/*
install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/source/pkg-scripts/new-server
install -d $RPM_BUILD_ROOT/opt/athena/lib
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Network.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Core.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Gui.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Script.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Quick.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Qml.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.*
install -d $RPM_BUILD_ROOT/opt/athena/systemd
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/systemd $ATHENA/source/pkg-scripts/athena-assignment-client.service
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/systemd $ATHENA/source/pkg-scripts/athena-assignment-client@.service
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/systemd $ATHENA/source/pkg-scripts/athena-domain-server.service
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/systemd $ATHENA/source/pkg-scripts/athena-domain-server@.service
#install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/systemd $ATHENA/source/pkg-scripts/athena-ice-server.service
#install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/systemd $ATHENA/source/pkg-scripts/athena-ice-server@.service
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/systemd $ATHENA/source/pkg-scripts/athena-server.target
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/systemd $ATHENA/source/pkg-scripts/athena-server@.target
cp -a $ATHENA/source/domain-server/resources $RPM_BUILD_ROOT/opt/athena
%files
%license $ATHENA/source/LICENSE
/etc/athena
/usr/share/athena
/usr/lib/systemd/system
/opt/athena
%changelog
@ -65,15 +70,39 @@ cp -a $ATHENA/source/domain-server/resources $RPM_BUILD_ROOT/usr/share/athena
getent passwd athena >/dev/numm 2>&1 || useradd -r -c "Project Athena" -d /var/lib/athena -U -M athena
#getent group athena >/dev/null 2>&1 || groupadd -r athena
# create system scripts
if [ ! -e "/usr/lib/systemd/system/athena-assignment-client.service" ]; then
ln -s /opt/athena/systemd/athena-assignment-client.service /usr/lib/systemd/system/athena-assignment-client.service
fi
if [ ! -e "/usr/lib/systemd/system/athena-assignment-client@.service" ]; then
ln -s /opt/athena/systemd/athena-assignment-client@.service /usr/lib/systemd/system/athena-assignment-client@.service
fi
if [ ! -e "/usr/lib/systemd/system/athena-domain-server.service" ]; then
ln -s /opt/athena/systemd/athena-domain-server.service /usr/lib/systemd/system/athena-domain-server.service
fi
if [ ! -e "/usr/lib/systemd/system/athena-domain-server@.service" ]; then
ln -s /opt/athena/systemd/athena-domain-server@.service /usr/lib/systemd/system/athena-domain-server@.service
fi
#if [ ! -e "/usr/lib/systemd/system/athena-ice-server.service" ]; then
# ln -s /opt/athena/systemd/athena-ice-server.service /usr/lib/systemd/system/athena-ice-server.service
#fi
#if [ ! -e "/usr/lib/systemd/system/athena-ice-server@.service" ]; then
# ln -s /opt/athena/systemd/athena-ice-server@.service /usr/lib/systemd/system/athena-ice-server@.service
#fi
if [ ! -e "/usr/lib/systemd/system/athena-server.target" ]; then
ln -s /opt/athena/systemd/athena-server.target /usr/lib/systemd/system/athena-server.target
fi
if [ ! -e "/usr/lib/systemd/system/athena-server@.target" ]; then
ln -s /opt/athena/systemd/athena-server@.target /usr/lib/systemd/system/athena-server@.target
fi
# create data folder
#mkdir -p /.local && chown root:athena /.local && chmod 775 /.local
#mkdir -p /.config && chown root:athena /.config && chmod 775 /.config
mkdir -p /etc/opt/athena
mkdir -p /var/lib/athena && chown athena:athena /var/lib/athena && chmod 775 /var/lib/athena
ldconfig -n /usr/share/athena/lib
if [ ! -d "/var/lib/athena/default" ]
then
/etc/athena/new-server default 40100
ldconfig -n /opt/athena/lib
if [ ! -d "/var/lib/athena/default" ]; then
/opt/athena/new-server default 40100
fi
%systemd_post athena-assignment-client.service

View file

@ -33,10 +33,10 @@ mkdir -p /var/lib/athena/$1/domain-server
echo "{\"metaverse\": {\"local_port\": $(($2 + 2))},\"version\": 2.4}" > /var/lib/athena/$1/domain-server/config.json
chown -R athena.athena /var/lib/athena/$1
echo HIFI_DOMAIN_SERVER_HTTP_PORT=$2 > /etc/athena/$1.conf
echo HIFI_DOMAIN_SERVER_HTTPS_PORT=$(($2 + 1)) >> /etc/athena/$1.conf
echo HIFI_DOMAIN_SERVER_PORT=$(($2 + 2)) >> /etc/athena/$1.conf
echo HIFI_DOMAIN_SERVER_DTLS_PORT=$(($2 + 3)) >> /etc/athena/$1.conf
echo HIFI_DOMAIN_SERVER_HTTP_PORT=$2 > /etc/opt/athena/$1.conf
echo HIFI_DOMAIN_SERVER_HTTPS_PORT=$(($2 + 1)) >> /etc/opt/athena/$1.conf
echo HIFI_DOMAIN_SERVER_PORT=$(($2 + 2)) >> /etc/opt/athena/$1.conf
echo HIFI_DOMAIN_SERVER_DTLS_PORT=$(($2 + 3)) >> /etc/opt/athena/$1.conf
echo "A new athena server has been created with the name of '$1'"
echo