Giter Site home page Giter Site logo

Comments (39)

SDRausty avatar SDRausty commented on May 17, 2024 1

Upstream has resolved this issue termux/proot#10 (comment) after working on this topic afaict, @michalbednarski has found:

pacman-key --init
echo disable-scdaemon > /etc/pacman.d/gnupg/gpg-agent.conf
pacman-key --populate

Use this code to resolve pacman-key --populate archlinux issues with Arch Linux in Termux PRoot. Before using pacman-key --populate archlinux, run pacman -S archlinux-keyring first.

Arch x86 and x86_64 results are requested, arm results as well pertaining to finishsetup.sh and pacman-key. If a post setup autoconfiguration with update script is deemed wanted for setupTermuxArch.sh regarding pacman-key, this can be done on a per architecture basis.

from termuxarch.

barre121 avatar barre121 commented on May 17, 2024 1

clear all in Android
Didn't work.

The output of "bash setupTermuxArch.sh sysinfo"
Is as follows:

Welcome to Termux!

Wiki: https://wiki.termux.com
Community forum: https://termux.com/community
IRC channel: #termux on freenode
Gitter chat: https://gitter.im/termux/termux
Mailing list: [email protected]

Search packages: pkg search
Install a package: pkg install
Upgrade packages: pkg upgrade
Learn more: pkg help
$ ls
TermuxArch setupTermuxArch.sh
arch setupTermuxArchDebug1646.log
$ bash setupTermuxArch.sh sysinfo

๐Ÿ•› > ๐Ÿ•› setupTermuxArch v1.3 will create a system information file. Ensure background data is not restricted. Run bash setupTermuxArch.sh help for additional information. Check the wireless connection if you do not see one o'clock ๐Ÿ• below. Checking prerequisitesโ€ฆ

๐Ÿ•› > ๐Ÿ•ง Prerequisites: OK Downloading TermuxArchโ€ฆ

setupTermuxArch 100%[=====>] 153 --.-KB/s in 0s
setupTermuxArch 100%[=====>] 15.88K 73.4KB/s in 0.2s

๐Ÿ•› > ๐Ÿ• TermuxArch download: OK

๐Ÿ•› > ๐Ÿ•œ TermuxArch v1.3 integrity: OK

Begin setupTermuxArch debug information.

Disk report 4.63G on /data Tue Mar 13 23:56:58 EAT 2018

BASH_VERSINFO[0] = 4
BASH_VERSINFO[1] = 4
BASH_VERSINFO[2] = 19
BASH_VERSINFO[3] = 1
BASH_VERSINFO[4] = release
BASH_VERSINFO[5] = aarch64-unknown-linux-android

cat /proc/cpuinfo results:

Processor : AArch64 Processor rev 3 (aarch64)
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 3

Hardware : Qualcomm Technologies, Inc MSM8992
Revision : 000b

dpkg --print-architecture result:

aarch64

getprop ro.product.cpu.abi result:

arm64-v8a

getprop ro.product.device result:

pplus

Download directory information results.

/sdcard/Download exists
/storage/emulated/0/Download exists

du -hs /data/data/com.termux/files/home/arch results:

1.7G /data/data/com.termux/files/home/arch

ls -al /data/data/com.termux/files/home/arch results:

total 80
drwx--x--x 18 u0_a386 u0_a386 4096 Mar 11 18:31 .
drwx------ 4 u0_a386 u0_a386 4096 Mar 13 23:56 ..
lrwxrwxrwx 1 u0_a386 u0_a386 7 Mar 10 02:30 bin -> usr/bin
drwxr-xr-x 4 u0_a386 u0_a386 4096 Mar 11 03:04 boot
-rwxrwx--- 1 u0_a386 u0_a386 848 Mar 10 02:49 ces
d--------- 2 u0_a386 u0_a386 4096 Mar 11 18:31 data
drwxr-xr-x 2 u0_a386 u0_a386 4096 Mar 3 05:07 dev
drwxr-xr-x 37 u0_a386 u0_a386 4096 Mar 13 23:46 etc
drwxrwxr-x 2 u0_a386 u0_a386 4096 Mar 11 03:26 for
drwxr-xr-x 3 u0_a386 u0_a386 4096 Mar 10 02:31 home
lrwxrwxrwx 1 u0_a386 u0_a386 7 Mar 10 02:31 lib -> usr/lib
drwxr-xr-x 3 u0_a386 u0_a386 4096 Mar 10 03:19 opt
dr-xr-xr-x 2 u0_a386 u0_a386 4096 Mar 3 05:07 proc
drwxr-x--- 6 u0_a386 u0_a386 4096 Mar 13 23:49 root
drwxr-xr-x 4 u0_a386 u0_a386 4096 Mar 10 04:32 run
lrwxrwxrwx 1 u0_a386 u0_a386 7 Mar 10 02:31 sbin -> usr/bin
drwxr-xr-x 4 u0_a386 u0_a386 4096 Mar 10 02:31 srv
-rwx------ 1 u0_a386 u0_a386 2167 Mar 10 02:49 startarch
drwx--x--x 3 u0_a386 u0_a386 4096 Mar 11 18:31 storage
dr-xr-xr-x 2 u0_a386 u0_a386 4096 Mar 3 05:07 sys
drwxrwxrwt 2 u0_a386 u0_a386 4096 Mar 13 23:46 tmp
drwxr-xr-x 8 u0_a386 u0_a386 4096 Mar 13 23:46 usr
drwxr-xr-x 12 u0_a386 u0_a386 4096 Mar 10 02:49 var

uname -a results:

Linux localhost 3.10.49-g07381fb #1 SMP PREEMPT Thu Aug 20 16:28:59 KST 2015 aarch64 Android

End setupTermuxArchDebug4609.log debug information.

Post this information along with information regarding your issue at https://github.com/sdrausty/TermuxArch/issues. Include information about input and output. This debugging information is found in /data/data/com.termux/files/home/setupTermuxArchDebug4609.log. If you think screenshots will help in resolving this matter better, include them in your post as well.

Submit this information if you plan to open up an issue at https://github.com/sdrausty/TermuxArch/issues to improve this installation script along with a screenshot of your topic. Include information about input and output.

Thank you for using setupTermuxArch.sh v1.3 ๐Ÿ

$

from termuxarch.

dmayle avatar dmayle commented on May 17, 2024
[22:29 home ]$ pacman-key --populate archlinux
==> Appending keys from archlinux.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signing key DDB867B92AA789C165EEFA799B729B06A680C281...

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@dmayle There are pacman-key issues as you state.

[16:06 home ]$ pacman-key --init
[16:09 home ]$ pacman-key --populate
==> ERROR: No keyring files exist in /usr/share/pacman/keyrings.
[16:09 home ]$ pacman-key --populate archlinux
==> ERROR: The keyring file /usr/share/pacman/keyrings/archlinux.gpg does not exist.

References:
https://wiki.archlinux.org/index.php/Pacman/Package_signing pacman/Package signing
https://www.archlinux.org/pacman/pacman-key.8.html pacman-key(8) Manual Page

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

entropy in the system

How is it controlled? What are the input lines?

References:
https://duckduckgo.com/?q=entropy+in+the+system+site%3Atldp.org&atb=v98-6_f&ia=web
#29 (comment) BASH Scripts to Test These Devices

from termuxarch.

dmayle avatar dmayle commented on May 17, 2024

I'm not sure what's going on, just that gpg fails to locally sign keys, and the typical reason is lack of entropy available. Reads from /dev/random /dev/urandom succeed when run in a parallel session, so I'm not sure what's going on.

pacman-key is just a bash script wrapper around gpg, so I'm try and execute the steps manually in order to proceed (I can sign one key successfully per boot, but pacman-key doesn't gracefully pause and resume key-signing sessions).

After that, I came acress the havege daemon (haveged) https://unix.stackexchange.com/a/346088 and I'll try to install that once I'm up and running.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

This issue is closed since it does not concern setupTermuxArch.sh itself.

from termuxarch.

wulvyrn avatar wulvyrn commented on May 17, 2024

i've run into this issue. true, it installs arch linux. without a way to update or install packages, it makes the script, well, useless. why install arch linux in termux if it isn't useable?

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@wulvyrn After installing Arch Linux in Termux, what does pacman -Syu provide? Hopefully it updates Arch Linux as it should.

Try a simple command provided by TermuxArch, t to test this. It should update Arch Linux, install, and then execute tree in the current directory. Does t function as it should?

More information regarding the device you are using is also requested. See bash setupTermuxArch.sh --sysinfo for requested information.

from termuxarch.

wulvyrn avatar wulvyrn commented on May 17, 2024

pacman -Syu provides this:

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (14) bash-4.4.018-1  bzip2-1.0.6-7  dbus-1.12.4-1  e2fsprogs-1.43.9-1  gcc-libs-7.3.0-1
              gnupg-2.2.4-2  iana-etc-20180131-1  libnghttp2-1.30.0-1  libsystemd-237.31-1
              libtirpc-1.0.2-3  lz4-1:1.8.1.2-1  pacman-mirrorlist-20180203-1  pcre2-10.30-1
              systemd-237.31-1

Total Installed Size:  142.38 MiB
Net Upgrade Size:        3.35 MiB

:: Proceed with installation? [Y/n]
(14/14) checking keys in keyring                              [##################################] 100%
warning: Public keyring not found; have you run 'pacman-key --init'?
downloading required keys...
error: key "EEEEE2EEEE2EEEEE" could not be looked up remotely
error: key "BBE43771487328A9" could not be looked up remotely
error: key "426991CD8406FFF3" could not be looked up remotely
error: key "4A1AFC345EBE18F8" could not be looked up remotely
error: key "A6234074498E9CEE" could not be looked up remotely
error: key "A5E9288C4FA415FA" could not be looked up remotely
error: key "976AC6FA3B94FA10" could not be looked up remotely
error: key "6D1655C14CE1C13E" could not be looked up remotely
error: key "786C63F330D7CB92" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

t results in the same output as above.

bash setupTermuxArch.sh --sysinfo
--see attached file
sysinfo.txt

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@wulvyrn thanks for the update with important information. Topics regarding x86 and x86_64 are hard for me to follow past image unpacking and configuration questions since I don't have devices with these types of architectures at hand. Try https://duckduckgo.com/?q=pacman+%22checking+keys+in+keyring%22 and post anything useful here.

from termuxarch.

wulvyrn avatar wulvyrn commented on May 17, 2024

i've tried various things to fix that without success. breaking with SigLevel = Never yields this...

pacman -S vi
warning: vi-1:070224-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) vi-1:070224-2

Total Installed Size:  0.28 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                [##################################] 100%
(1/1) checking package integrity                              [##################################] 100%
(1/1) loading package files                                   [##################################] 100%
(1/1) checking for file conflicts                             [##################################] 100%
(1/1) checking available disk space                           [##################################] 100%
:: Processing package changes...
(1/1) reinstalling vi                                         [##################################] 100%
could not change the root directory (Function not implemented)
error: command failed to execute correctly
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
could not change the root directory (Function not implemented)
error: command failed to execute correctly

when trying to save a file in vi - i get no filesytem
should i be installing this in my downloads folder?

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

Arch Linux belongs in $HOME/arch in Termux. How does pacman -S vim work for you? What about pacman -Syu?

should i be installing this in my downloads folder?

pacman handles downloaded packages in /var/cache/pacman/pkg/ by default. It has an option to clean the cache if desired.

from termuxarch.

wulvyrn avatar wulvyrn commented on May 17, 2024

Pacman -Syu gives the same ending error as the above trying to install vi.
The file system doesn't allow being written to.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@wulvyrn Do you see anything that can be modified in setupTermuxArch.sh to resolve this? Can you take this issue upstream to figure out why the keys don't work as expected? Does pacman -S archlinux-keyring help? What about pacman -S --debug archlinux-keyring?

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

Since this is an upstream issue with Arch Linux keyring and is not related to the functionality of setupTermuxArch.sh, it is now labled as closed.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024
(14/14) checking keys in keyring                   [#########################] 100%
(14/14) checking package integrity                 [#########################] 100%
(14/14) loading package files                      [#########################] 100%
(14/14) checking for file conflicts                [#########################] 100%
(14/14) checking available disk space              [#########################] 100%

Output from arm architectures.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@wulvyrn seems this is the best place to discuss the topic we are discussing. pacman-key is an important issue for Arch Linux on device.

A new option was recently added: rootdir. Example usage: bash setupTermuxArch.sh --rootdir arch/install/dir will install Arch Linux in $HOME/arch/install/dir.

should i be installing this in my downloads folder?

No, you should not. If you attempt to install outside of Termux app userspace, it will fail. The symlinks will probably not be created. Downloads is probably in noexec.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

rng-tools doesn't work
unable to adjust write_wakeup_threshold: Permission denied

From termux/termux-packages#2180 rng-tools could this be added.

a psuedo way would be to have something in a loop on another terminal or just a process running in background.

From termux/termux-packages#2180 (comment)

from termuxarch.

wulvyrn avatar wulvyrn commented on May 17, 2024
  1. script for entropy did not work out for me.
  2. i'm going to try a command line replication of the script to see where it fails.

from termuxarch.

cb125 avatar cb125 commented on May 17, 2024

I've been following this issue--thanks for your work!--since it has been preventing me from getting Arch working under termux on my pixelbook.

I'm skeptical that it's an entropy problem. If you do "watch cat /proc/sys/kernel/random/entropy_avail" in a separate terminal, for me it hovers around 1000, which should be plenty. When I crank up the gpg debug level, the final message before hanging is "DSC SERIALNO openpgp". This is weird, since there is no reason for the gpg frontend to be sending messages to the serial card daemon. In any case, when I kill -9 the scdaemon, pacman-key --populate unblocks, and I get four or five keys locally signed. So that's progress, I suppose. But I still don't have a working Arch installation, because startarch gives me a shell that is rooted in /data/data/com.termux/files/home, and pacman keeps complaining about being unable to change the root directory.
Cheers--

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

Here is a lead for this topic. https://duckduckgo.com?q=The+keyring+file+%2Fusr%2Fshare%2Fpacman%2Fkeyrings%2Farchlinux.gpg+does+not+exist&ia=web Do not hesitate to search at upstream for a solution.

preventing me from getting Arch working under termux on my pixelbook.

Does this mean pacman -Syu does not work on Pixelbooks? @cb125 can you post some output from ./setupTermuxArch.sh --sysinfo?

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@cb125 Thank you for contributing d7578ef this important information.

shell that is rooted in /data/data/com.termux/files/home,

It's not. Simply copy startarch and edit to desire. See #42 (comment) for custom directory PRoot login. #41 (comment) has default ๐Ÿš shell startarch login information too. Can you share other ways of quering entropy?

skeptical that it's an entropy problem

Possibly a symlink problem. There may be symlinks that cannot be removed; So the process hangsโ€ฆ

from termuxarch.

cb125 avatar cb125 commented on May 17, 2024

Whether the problem is upstream or not, it prevents the setupTermuxArch from creating a usable system. Here is a screenshot of the symptom:
screenshot 2018-02-26 at 7 58 42 am
This is the end part of a clean install. You'll see that the first time pacman tries to check keys, it can't find the keyring.
Here's the output of --sysinfo:
temp.txt
The free space warnings are inaccurate, by the way, there's about 100GB free on this system.

Thanks for the link to the "archlinux.gpg does not exist". But that's not the problem here.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@cb125 thanks for sharing this information. After running pacman-key --init how does pacman -Syu behave? Does adding pacman-key --init ae32bc2 resolve this topic for x86_64?

The free space warnings are inaccurate

Is the warning printing the correct available space? What is the output of dfa?

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

Does adding pacman-key --init ae32bc2 resolve this topic for x86_64?

This hangs the script on aarch64 and armv7. Changes reverted with this dc18584 commit.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

This commit c198a23 sums up our progress with x86. An information message about configuring the system is forthcoming.

This issue prevents gradle from working correctly on device too, #31 aapt in TermuxArch and, https://github.com/sdrausty/buildAPKs/issues/3 Gradle Builds Usually Fail Using buildAPKs since aapt wants x86 in Arch Linux. However, aapt works well on arm in vanilla Termux.

from termuxarch.

cb125 avatar cb125 commented on May 17, 2024

So on my x86 system, the install completes ok. I can then do pacman-key --init, pacman-key --populate, and pacman -Syu, which works fine, until it tries to update systemd. That doesn't work, complaining "could not change the root directory (Function not implemented)". So still no functioning system.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@cb125 thanks for the update.

pacman-key --init, pacman-key --populate, and pacman -Syu, which works fine,

Were there any additional steps you took before they worked fine? If there were, they can be added to finishsetupx86.sh which seems to be in the making thanks to this thread.

until it tries to update systemd

More output requested.

(11/27) upgrading libtirpc                             [############################] 100%
(12/27) upgrading systemd                              [############################] 100%
(13/27) upgrading dhcpcd                               [############################] 100%
(14/27) upgrading gnutls                               [############################] 100%
(15/27) upgrading gnupg                                [############################] 100%
(16/27) upgrading gpgme                                [############################] 100%

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

A few places to continue this issue so we will have happy x86 Arch Linux Termux PRoot users sooner than later are:

  1. https://bbs.archlinux.org/
  2. https://plus.google.com/communities/101692629528551299417
  3. https://gitter.im/termux
  4. https://github.com/ArchStrike/ArchStrike/issues?&q=x86
  5. https://github.com/termux/proot/issues?&q=x86

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

Issue termux/proot#10, "pacman -S archlinux-keyring Hangs in Arch Linux Termux PRoot" is now open regarding this matter.

from termuxarch.

cb125 avatar cb125 commented on May 17, 2024

Here is the log of the last portion of the current install. The install crashes with a pacman error ("did you run pacman-key --init?"), I then do pacman-key --init, pacman-key --populate, I have to kill scdaemon to unblock the process, then upgrading the system ends with "can't change root directory" errors. If the included file is hard to read, download it and cat it in a terminal:

log (1).txt

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@cb125 thanks for posting. Have you tried mv /usr/lib/gnupg/scdaemon{,_} from termux/proot#10 (comment) pacman -S archlinux-keyring Hangs in Arch Linux Termux PRoot

from termuxarch.

barre121 avatar barre121 commented on May 17, 2024

i have a problem with mounting /proc
Firstly when i install termuxarch and run 'startarch' it works great!
but when i exit and 'startarch' again it brings this:

startarch
Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"
Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"
Error: /proc must be mounted
To mount /proc at boot you need an /etc/fstab line like:
proc /proc proc defaults
In the meantime, run "mount proc /proc -t proc"

I made a clean install again
It worked fine fistly but fails second time!

I run
"mount proc /proc -t proc"

Result is this:
mount: /proc: cannot mount proc read-only.

I have done everything i could find from google.

Please help if you can!

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

@barre121 thanks for using setupTermuxArch.sh. Have you tried restarting Termux cleanly (termux-wake-unlock, if locked, and clear all in Android)? If this does not work, try restarting Android.

You should be able to open as many as eight open Arch Linux in Termux PRoot sessions through Termux. What kind of device are you using? Provide information with, bash setupTermuxArch.sh sysinfo to change the puzzle you posted into a possible resolution if this information did not solve your issue.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

Try bash setepTermuxArch.sh refresh and see how it goes with logout and relogin. Thanks for posting output from bash setupTermuxArch.sh sysinfo.

Check your state with ps aux|grep proot and if there are unaccounted for proot sessions close them. What you are describing might be a Termux PRoot issue. If you do have proot sessions which are not closing, open up an issue at https://github.com/termux/proot for faster resolution.

from termuxarch.

barre121 avatar barre121 commented on May 17, 2024

i am sorry for the late answer dev!
I reinstalled it before i come to see your response.
Everything looks good.
Thanks! for taking your valuable time with me.

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

You are welcome. Thanks for using Termux with TermuxArch ๐ŸŒป

from termuxarch.

SDRausty avatar SDRausty commented on May 17, 2024

Commit f16c27d adds Arch Linux IRC channel upstream contact information to the TermuxArch motd and logout.

See https://wiki.archlinux.org/index.php/IRC_channel for available Arch Linux IRC channels.

from termuxarch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.