Skip to content

Commit

Permalink
fix: 1.1.2 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
feelfreelinux committed Sep 27, 2022
1 parent eec3a10 commit d969361
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId = "com.octo4a"
minSdk = 17
targetSdk = 28
versionName = "1.1.1"
versionCode = 1001001
versionName = "1.1.2"
versionCode = 1001002
multiDexEnabled = true

ndk {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface BootstrapRepository {
fun resetSSHPassword(newPassword: String)
val isBootstrapInstalled: Boolean
val isSSHConfigured: Boolean
val isArgonFixApplied: Boolean
}

class BootstrapRepositoryImpl(private val logger: LoggerRepository, private val githubRepository: GithubRepository, val context: Context) : BootstrapRepository {
Expand Down Expand Up @@ -204,6 +205,10 @@ class BootstrapRepositoryImpl(private val logger: LoggerRepository, private val
get() {
return File("/data/data/com.octo4a/files/bootstrap/bootstrap/home/octoprint/.ssh_configured").exists()
}
override val isArgonFixApplied: Boolean
get() {
return File("/data/data/com.octo4a/files/bootstrap/bootstrap/home/octoprint/.argon-fix").exists()
}

override fun resetSSHPassword(newPassword: String) {
logger.log(this) { "Deleting password just in case" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,18 @@ class OctoPrintHandlerRepositoryImpl(
bootstrapRepository.run {
vspPty.createEventPipe()
}
if (!bootstrapRepository.isArgonFixApplied) {
logger.log { "Applying argon fix..." }
bootstrapRepository.runCommand("pip3 install -U packaging --ignore-installed").waitAndPrintOutput(
logger
)
bootstrapRepository.runCommand("pip3 install https://github.com/feelfreelinux/octo4a-argon2-mock/archive/main.zip").waitAndPrintOutput(
logger
)
bootstrapRepository.runCommand("touch /home/octoprint/.argon-fix").waitAndPrintOutput(
logger
)
}
ensureCommFixExists()
_serverState.value = ServerStatus.BootingUp
octoPrintProcess = bootstrapRepository.runCommand("LD_PRELOAD=/home/octoprint/ioctlHook.so octoprint serve --iknowwhatimdoing")
Expand Down

0 comments on commit d969361

Please sign in to comment.