summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickaël Thomas2017-07-28 01:43:15 +0200
committerMickaël Thomas2017-07-28 01:51:43 +0200
commita852d4d716bcbec13392e9a6200c9caa09b9313a (patch)
treead8b92f1afc2ff8c454f193843e584e4ee1f521f
parent20a9156d3e74c9ee7018a1b9d60565bfb9847d36 (diff)
downloadaur-a852d4d716bcbec13392e9a6200c9caa09b9313a.tar.gz
Update to 0.15.31
-rw-r--r--.SRCINFO16
-rw-r--r--LICENSE97
-rw-r--r--PKGBUILD27
-rw-r--r--factorio-headless.conf25
-rw-r--r--factorio-headless.install57
-rw-r--r--factorio-headless.service6
6 files changed, 151 insertions, 77 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 21efed35e2b6..15d7cdf0f2f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,6 @@
-# Generated by mksrcinfo v8
-# Tue Apr 25 18:40:38 UTC 2017
pkgbase = factorio-headless
pkgdesc = A 2D game about building and maintaining factories - Server version (stable branch)
- pkgver = 0.14.23
+ pkgver = 0.15.31
pkgrel = 1
url = http://www.factorio.com/
install = factorio-headless.install
@@ -14,16 +12,18 @@ pkgbase = factorio-headless
conflicts = factorio-headless-experimental
backup = etc/conf.d/factorio
backup = etc/factorio/server-settings.json
+ backup = etc/factorio/map-gen-settings.json
+ backup = etc/factorio/map-settings.json
source = LICENSE
source = factorio-headless.service
source = factorio-headless.conf
source = factorio-headless.sysusers
- source = factorio_headless_x64_0.14.23.tar.gz::http://www.factorio.com/get-download/0.14.23/headless/linux64
- sha256sums = 67ec2f88afff5d7e0ca5fd3301b5d98655269c161a394368fa0ec49fbc0c0e21
- sha256sums = d06a47498ac5e540e8f4e653213b8bd5b21ae9424df718b9b065268f571900c6
- sha256sums = 5c7b9dcb07167d680de3dd6a0435b21ee4ee448fb7f6ce429f028ee5b543e9ab
+ source = factorio_headless_x64_0.15.31.tar.xz::http://www.factorio.com/get-download/0.15.31/headless/linux64
+ sha256sums = 8859e0c8650bd90a7ff35f6ec15df91cbbc5ef6ffab6119876731feb811861d1
+ sha256sums = 72bbef31fced163e5993eff0e73a836a557165775eb77e0d69b24fe5ec4690a7
+ sha256sums = d384e69bac3807006b0af787d1c5dcd9f247ad49c7250ac18a3737763d755d47
sha256sums = 87dae15d1bcfb4683faea9c66498bd916bd27f8aa0dc724c4e21076dcf17da64
- sha256sums = 96c3e7acd4e0f066a499baba01823cac7c1caf0e50dbddcea5793f57bd60dc8c
+ sha256sums = 3d510c9db3cad7d211a74e68ef54780164b9b78558f5f14e6f3eb60ce4356ecd
pkgname = factorio-headless
diff --git a/LICENSE b/LICENSE
index 2aedcc7d3535..b5961a19df4e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,52 +1,75 @@
-# Source: http://www.factorio.com/terms-of-service
+Source: http://www.factorio.com/terms-of-service
-Terms of Service
+### Terms of Service
The basic rule is: Use common sense. We try to be reasonable, please be too.
-The Game
- Factorio is in an alpha stage of the development. That means it is an unfinished product so it may contain bugs and unfinished features.
- The game is still evolving and is subject to changes in the future.
- We are not liable for any damage that might be caused to you by downloading, installing and using our software.
- Especially we are not responsible if you stay awake all night long playing Factorio and can't go to school / work in the morning:)
- You download, install and use Factorio at your own risk.
- There's always the possibility of a project being discontinued at any time.
+##### The Game
-Paid content
+- Factorio is still in the development. That means it is an unfinished product so it may contain bugs and unfinished features.
+- The game is still evolving and is subject to changes in the future.
+- We are not liable for any damage that might be caused to you by downloading, installing and using our software.
+- Especially we are not responsible if you stay awake all night long playing Factorio and can't go to school / work in the morning:)
+- You download, install and use Factorio at your own risk.
+- There's always the possibility of a project being discontinued at any time.
- Factorio demo is available to anyone free of charge.
- All the content listed on our preorder page is paid. This includes, but is not limited to the alpha version of the game, the wallpapers, the scenario packs, the concept art book, etc.
- You get access to our paid content by buying the appropriate type of the account.
- Possesion of the account entitles you to all the updates to the digital content associated with this account for free in the future. For instance the lowest tier membership (Transport Belt Repair Man) will receive all the updates to the core game itself in the future.
- The contents and the price of particular tiers are subject to change in the future. We reserve the right to change the tier prices and add content when we feel it is appropriate.
+##### Paid content
-Purchase and Refunds
+- Factorio demo is available to anyone free of charge.
+- You get access to the game by buying (single payment) the membership.
+- Possesion of the membership entitles you to all the updates to the digital content associated with this membership for free in the future. Specifically this means that future updates to the core game are for free. However this doesn't include any more significant products that we might release, such as a Factorio DLCs, Factorio 2, etc.
+- The contents and the price are subject to change in the future. We reserve the right to change the prices and change content when we feel it is appropriate.
+- Possesion of the membership entitles you also to use of the mod portal (see below for the details) and multiplayer matching server.
- After the purchase you will receive an electronic invoice from our payment processing service.
- After the purchase you will also receive a confirmation email from us with the upgrade code to your new tier and instructions on how to use it.
- There are no additional or hidden fees. You pay once for the product (the membership tier) and that is it.
- If you would like to cancel the purchase (i.e. when the game is not working) then please contact us by email at support@factorio.com.
+##### The Mod Portal
-Intellectual Property and Sharing
+- The mod portal website and ingame integration are available for all purchasers of the game
+- We reserve the right to remove a mod or edit any mods listing without notice.
+- All mods uploaded must have the permission from the author of the mod, and must not contain any copyrighted material (without permission).
+- Any inappropriate behaviour by users in the discussions feature can lead to account deactivation.
- You may use Factorio and other paid content for your own personal use.
- All the content in the game is owned by us. This includes the user provided content that makes it into the game as well (for instance namely translations).
- Don't sell, copy, transfer or distribute the game, its hacked / altered version, any of its parts or any of our paid content.
- Ask us for approval to use the game, any of its parts or any materials on our website for any commercial purpose.
- We encourage users to mod the game within the reasonable boundaries. This includes writing own Lua levels, creating own texture packs, changing properties in the JSON files, etc.
+##### Steam integration
-Use of service
+- Paid memberships are entitled to the Steam key which allows them to add Factorio to their Steam library.
+- This Steam key is meant solely for the owner of the membership, from whose profile page it was generated.
+- Giving away / selling / etc. the Steam key to someone else is direct violation of this ToS and will lead to interrupting the membership.
+- We reserve the right to change the policy of giving out keys with above restrictions in the future.
+- People who buy the game via Steam will have an account automatically created at our webpage. This will allow them to use other services we provide or will provide in the future (i.e. mod repository, MP matching server).
- Children may use an account established by their parent or legal guardian with the approval of such a person.
- The game doesn't contain explicit violence and we believe it is appropriate for children from 12 years.
- If you wish to cancel your account please send us an email to support@factorio.com.
- We reserve the right to suspend accounts of users that will clearly violate the terms of service or our privacy policy. In such a case we will first try to resolve the situation by communicating with the user. Suspending the account is the last resort.
+##### Purchase and Refunds
-Other
+- After the purchase you will receive an electronic invoice from our payment processing service.
+- After the purchase you will also receive a confirmation email from us with the upgrade code to your new tier and instructions on how to use it.
+- There are no additional or hidden fees. You pay once for the product (the membership tier) and that is it.
+- Refunds are possible in following scenarios (please contact us by email at support@factorio.com):
+ - The purchase has not been authorized or it has been a fraud.
+ - The user has technical issues with the game (it doesn't run or works improperly).
+ - The user has accidentaly purchased the game multiple times (typically double purchase scenario).
- Don't do anything that could harm the development of the game or its distribution.
- The materials appearing on Factorio's website may include technical or typographical errors. We don't warrant that any of the materials on its website are complete, accurate or current
- There are couple of places where you can share ideas and opinions with other players (our Forum, Twitter, Facebook page). Please behave there appropriately and don’t do anything that gets us into troubles.
- In case of legal dispute, the governing laws of the Czech Republic will apply.
+- Refund requests must be made within 30 days of the initial purchase.
-We reserve the right to update these terms at any point in time with immediate effect. Last update was on 8th of April 2014.
+##### Intellectual Property and Sharing
+
+- You may use Factorio and other paid content for your own personal use.
+- All the content in the game is owned by us. This includes the user provided content that makes it into the game as well (for instance namely translations).
+- Don't sell, copy, transfer or distribute the game, its hacked / altered version, any of its parts or any of our paid content.
+- Ask us for approval to use the game, any of its parts or any materials on our website for any commercial purpose.
+- We encourage users to mod the game within the reasonable boundaries. This includes writing own Lua levels, creating own texture packs, changing properties in the JSON files, etc.
+- You may use the free factorio headless server to run and operate a commercial service providing servers to players. However we reserve the right to request the cessation of the service should an issue with the service provider arise.
+
+##### Use of service
+
+- Children may use an account established by their parent or legal guardian with the approval of such a person.
+- The game doesn't contain explicit violence and we believe it is appropriate for children from 12 years.
+- If you wish to cancel your account please send us an email to support@factorio.com.
+- We reserve the right to restrict or suspend accounts of users that will clearly violate the terms of service or our privacy policy. In such a case we will first try to resolve the situation by communicating with the user. Suspending the account is the last resort.
+
+##### Other
+
+- Don't do anything that could harm the development of the game or its distribution.
+- The materials appearing on Factorio's website may include technical or typographical errors. We don't warrant that any of the materials on its website are complete, accurate or current
+- Any kind of abusive or clearly inappropriate behavior in regards to service we run (forums, mod portal, matching server) is a violation of these terms of service.
+- There are couple of places where you can share ideas and opinions with other players (our Forum, Twitter, Facebook page). Please behave there appropriately and don’t do anything that gets us into trouble.
+- In case of legal dispute, the governing laws of the Czech Republic will apply.
+
+We reserve the right to update these terms at any point in time with immediate effect. Last update was on 28th of July 2016.
diff --git a/PKGBUILD b/PKGBUILD
index 0db6f55c2e97..9bbdc8acb83a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Inspiration for service and config files: https://github.com/Bisa/factorio-init
pkgname=factorio-headless
-pkgver=0.14.23
+pkgver=0.15.31
pkgrel=1
pkgdesc="A 2D game about building and maintaining factories - Server version (stable branch)"
arch=('x86_64')
@@ -13,18 +13,22 @@ conflicts=('factorio' 'factorio-demo' 'factorio-experimental' 'factorio-headless
install=factorio-headless.install
backup=(etc/conf.d/factorio
etc/factorio/server-settings.json
+ etc/factorio/map-gen-settings.json
+ etc/factorio/map-settings.json
)
source=(LICENSE
factorio-headless.service
factorio-headless.conf
factorio-headless.sysusers
- factorio_headless_x64_${pkgver}.tar.gz::http://www.factorio.com/get-download/${pkgver}/headless/linux64)
-sha256sums=('67ec2f88afff5d7e0ca5fd3301b5d98655269c161a394368fa0ec49fbc0c0e21'
- 'd06a47498ac5e540e8f4e653213b8bd5b21ae9424df718b9b065268f571900c6'
- '5c7b9dcb07167d680de3dd6a0435b21ee4ee448fb7f6ce429f028ee5b543e9ab'
+ factorio_headless_x64_${pkgver}.tar.xz::http://www.factorio.com/get-download/${pkgver}/headless/linux64
+)
+
+sha256sums=('8859e0c8650bd90a7ff35f6ec15df91cbbc5ef6ffab6119876731feb811861d1'
+ '72bbef31fced163e5993eff0e73a836a557165775eb77e0d69b24fe5ec4690a7'
+ 'd384e69bac3807006b0af787d1c5dcd9f247ad49c7250ac18a3737763d755d47'
'87dae15d1bcfb4683faea9c66498bd916bd27f8aa0dc724c4e21076dcf17da64'
- '96c3e7acd4e0f066a499baba01823cac7c1caf0e50dbddcea5793f57bd60dc8c')
+ '3d510c9db3cad7d211a74e68ef54780164b9b78558f5f14e6f3eb60ce4356ecd')
# no modifications needed, the executable looks for:
@@ -32,15 +36,18 @@ sha256sums=('67ec2f88afff5d7e0ca5fd3301b5d98655269c161a394368fa0ec49fbc0c0e21'
# - config in ~/.factorio
package() {
- install -Dm755 "${srcdir}/factorio/bin/x64/factorio" "$pkgdir/usr/bin/factorio"
+ install -Dm755 "${srcdir}/factorio/bin/x64/factorio" "${pkgdir}/usr/bin/factorio"
install -d "${pkgdir}/usr/share/factorio"
cp -r "${srcdir}/factorio/data"/* "${pkgdir}/usr/share/factorio"
- install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/factorio-headless/LICENSE"
+ install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm644 "${srcdir}/factorio-headless.sysusers" "$pkgdir/usr/lib/sysusers.d/factorio.conf"
+ install -Dm644 "${srcdir}/factorio-headless.sysusers" "${pkgdir}/usr/lib/sysusers.d/factorio.conf"
install -Dm644 "${srcdir}/factorio-headless.conf" "${pkgdir}/etc/conf.d/factorio"
install -Dm644 "${srcdir}/factorio-headless.service" "${pkgdir}/usr/lib/systemd/system/factorio.service"
- install -Dm644 "${srcdir}/factorio/data/server-settings.example.json" "${pkgdir}/etc/factorio/server-settings.json"
+ # server-settings.json can contain sensitive data so we need to make it only readable by the factorio user
+ install -Dm600 "${srcdir}/factorio/data/server-settings.example.json" "${pkgdir}/etc/factorio/server-settings.json"
+ install -Dm644 "${srcdir}/factorio/data/map-gen-settings.example.json" "${pkgdir}/etc/factorio/map-gen-settings.json"
+ install -Dm644 "${srcdir}/factorio/data/map-settings.example.json" "${pkgdir}/etc/factorio/map-settings.json"
# public isn't really a good default especially with the default name/description
sed -i 's/^ "public": true/ "public": false/' "${pkgdir}/etc/factorio/server-settings.json"
diff --git a/factorio-headless.conf b/factorio-headless.conf
index 445cb0e0bf27..ce1ec6b714e0 100644
--- a/factorio-headless.conf
+++ b/factorio-headless.conf
@@ -1,8 +1,7 @@
-# AUTOSAVE_INTERVAL and AUTOSAVE_SLOTS must now be declared in /etc/factorio/server-settings.json
-# LATENCY was removed from the game
+# All paths are relative to /var/lib/factorio/
-# Path to the save file
-SAVE_FILE=/var/lib/factorio/.factorio/saves/factorio-service-save.zip
+# Save file name (or path), without the .zip suffix
+SAVE_NAME=factorio-service-save
# Additional factorio arguments, such as:
# -v [ --verbose ] enable verbose logging
@@ -11,4 +10,20 @@ SAVE_FILE=/var/lib/factorio/.factorio/saves/factorio-service-save.zip
# --bind ADDRESS[:PORT] IP address (and optionally port) to bind to
# --rcon-port N Port to use for RCON
# --rcon-password PASSWORD Password for RCON
-FACTORIO_EXTRA_ARGS=""
+# --server-whitelist FILE Path to file with server whitelist.
+# --server-banlist FILE Path to file with server banlist.
+# --console-log FILE Path to file where a copy of the server's log will be stored
+# --server-id FILE Path where server ID will be stored or read from
+#
+FACTORIO_EXTRA_ARGS="--server-banlist server-banlist.json --server-whitelist server-whitelist.json --console-log console.log"
+
+# Additional factorio arguments used when generating the map, such as:
+# --map-gen-settings FILE Map generation settings
+# --map-gen-seed SEED Map generation seed (you can also set the seed in map-gen-settings.json)
+# --map-settings FILE Map settings
+# --preset arg Name of the map generation preset to be used:
+# default, rich-resources, marathon, dangerous, death-world, rail-world
+
+FACTORIO_CREATE_ARGS="--map-gen-settings /etc/factorio/map-gen-settings.json --map-settings /etc/factorio/map-settings.json --preset default"
+
+# Keep in mind the save file will only be generated when starting the service and if it doesn't already exist
diff --git a/factorio-headless.install b/factorio-headless.install
index 7cdadb871c17..288a17de7f82 100644
--- a/factorio-headless.install
+++ b/factorio-headless.install
@@ -1,23 +1,52 @@
post_install() {
systemd-sysusers factorio.conf
[[ -d /var/lib/factorio ]] || install -dm 770 -o factorio -g games /var/lib/factorio
+ chown factorio:games /etc/factorio/*
+}
- source /etc/conf.d/factorio
-
- # create empty game
- if [[ ! -f "$SAVE_FILE" ]]; then
- echo "Generating initial save file: $SAVE_FILE"
- su - factorio -s /bin/sh -c "factorio --create '$SAVE_FILE' 2>&1 >/dev/null"
- fi
+pre_upgrade() {
+ (( $(vercmp $2 '0.15.31-1') >= 0 )) || {
+ if systemctl is-active -q factorio.service; then
+ echo Stopping factorio.service...
+ systemctl stop factorio.service &>/dev/null
+ fi
+ }
}
post_upgrade() {
- (( $(vercmp $2 '0.12.26-4') < 0 )) && chown -R root:root /usr/share/factorio || true
- (( $(vercmp $2 '0.12.26-4') < 0 )) && post_install "$1" || true
- (( $(vercmp $2 '0.14.12-1') < 0 )) && {
- echo "AUTOSAVE_INTERVAL and AUTOSAVE_SLOTS must now be declared in /etc/factorio/server-settings.json"
- echo "Please update /etc/factorio/server-settings.json and /etc/conf.d/factorio now."
- echo
+ (( $(vercmp $2 '0.15.31-1') >= 0 )) || {
+ # Source previous settings (or default setting if the config file was untouched)
+ local old_path=/var/lib/factorio/.factorio/saves/factorio-service-save.zip
+ local new_path=/var/lib/factorio/factorio-service-save.zip
+
+ if [[ -f $old_path ]]; then
+ if [[ -f $new_path ]]; then
+ echo "The default save file location was changed from '$old_path' to '$new_path' but this file already exists so it won't be overwritten."
+ else
+ echo "The default save file location was changed. Copying the old file to the new location."
+ cp -v $old_path $new_path
+ fi
+ echo
+ fi
+
+ if [[ -f /etc/conf.d/factorio.pacnew ]]; then
+ source /etc/conf.d/factorio
+ if [[ -z $SAVE_FILE || $SAVE_FILE == $old_path ]]; then
+ SAVE_FILE=$new_path
+ fi
+
+ SAVE_NAME=$(cd /var/lib/factorio; realpath "$SAVE_FILE" --relative-base /var/lib/factorio/)
+ SAVE_NAME=${SAVE_NAME%%.zip}
+
+ echo "The SAVE_FILE setting has been replaced by the SAVE_NAME setting which doesn't include the .zip suffix anymore"
+ echo "Based on your current settings, you should set (in /etc/conf.d/factorio):"
+ echo "SAVE_NAME=$SAVE_NAME"
+ echo
+ fi
+
echo "The systemd service file has been updated, don't forget to run 'systemctl daemon-reload' before restarting factorio."
- } || true
+
+ post_install $1
+ chmod 600 /etc/factorio/server-settings.json
+ }
}
diff --git a/factorio-headless.service b/factorio-headless.service
index e81dc79c6869..f43ec6a92f7d 100644
--- a/factorio-headless.service
+++ b/factorio-headless.service
@@ -7,9 +7,9 @@ After=network.target
User=factorio
EnvironmentFile=/etc/conf.d/factorio
WorkingDirectory=/var/lib/factorio
-TimeoutStartSec=5
-ExecStart=/usr/bin/factorio --server-settings /etc/factorio/server-settings.json --start-server ${SAVE_FILE} $FACTORIO_EXTRA_ARGS
-TimeoutStopSec=10
+ExecStartPre=/bin/bash -c "[[ -f '${SAVE_NAME}.zip' ]] || /usr/bin/factorio --create '${SAVE_NAME}.zip' $FACTORIO_CREATE_ARGS"
+ExecStart=/usr/bin/factorio --server-settings /etc/factorio/server-settings.json --start-server '${SAVE_NAME}.zip' $FACTORIO_EXTRA_ARGS
+TimeoutStopSec=30
KillSignal=SIGINT
RestartSec=10
Restart=on-failure