Hi All,
I updated my pakfire branch by doing a git pull with all the latest changes and built everything again.
Then tested out by running sudo pakfire-builder build beep/beep.nm
Result was again just going to the prompt with nothing happening.
Ran the commands with gdb and got following result.
sudo gdb pakfire-builder GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from pakfire-builder... (gdb) run build beep/beep.nm Starting program: /usr/bin/pakfire-builder build beep/beep.nm [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff57dd6c0 (LWP 12756)] [Thread 0x7ffff57dd6c0 (LWP 12756) exited] [Inferior 1 (process 12752) exited with code 0377] (gdb)
Regards, Adolf.
Hello Adolf,
Thanks for giving this a try. Is there anything in the logs?
You can add —-debug to get some more output.
Best, -Michael
On 29 Oct 2023, at 13:23, Adolf Belka adolf.belka@ipfire.org wrote:
Hi All,
I updated my pakfire branch by doing a git pull with all the latest changes and built everything again.
Then tested out by running sudo pakfire-builder build beep/beep.nm
Result was again just going to the prompt with nothing happening.
Ran the commands with gdb and got following result.
sudo gdb pakfire-builder GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from pakfire-builder... (gdb) run build beep/beep.nm Starting program: /usr/bin/pakfire-builder build beep/beep.nm [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff57dd6c0 (LWP 12756)] [Thread 0x7ffff57dd6c0 (LWP 12756) exited] [Inferior 1 (process 12752) exited with code 0377] (gdb)
Regards, Adolf.
-- Sent from my laptop
Hi Michael,
On 30/10/2023 11:01, Michael Tremer wrote:
Hello Adolf,
Thanks for giving this a try. Is there anything in the logs?
In the forum I always remind people to look at the logs. On my Arch Linux systems I always search through the logs when I have a problem.
For some reason with this pakfire package I seem to forget to look in the logs.
Here is what I found when running pakfire-builder build beep/beep.nm (adding --debug made no difference)
pakfire[2137]: Mounting /var/tmp/pakfire-root-KRBTNG from pakfire_ramdisk (tmpfs - (null)) pakfire[2137]: Could not mount /var/tmp/pakfire-root-KRBTNG: Operation not permitted pakfire[2137]: Could not mount ramdisk at /var/tmp/pakfire-root-KRBTNG ((null)): Unknown error -1
Regards,
Adolf.
You can add —-debug to get some more output.
Best, -Michael
On 29 Oct 2023, at 13:23, Adolf Belka adolf.belka@ipfire.org wrote:
Hi All,
I updated my pakfire branch by doing a git pull with all the latest changes and built everything again.
Then tested out by running sudo pakfire-builder build beep/beep.nm
Result was again just going to the prompt with nothing happening.
Ran the commands with gdb and got following result.
sudo gdb pakfire-builder GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from pakfire-builder... (gdb) run build beep/beep.nm Starting program: /usr/bin/pakfire-builder build beep/beep.nm [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff57dd6c0 (LWP 12756)] [Thread 0x7ffff57dd6c0 (LWP 12756) exited] [Inferior 1 (process 12752) exited with code 0377] (gdb)
Regards, Adolf.
-- Sent from my laptop
Hello Adolf,
I have been looking into this in depth and I cannot find a way to make the builder work with all its features unless it is running as root.
So please add a “sudo” to the command line and let me know if that brings you any further.
-Michael
On 30 Oct 2023, at 17:56, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 30/10/2023 11:01, Michael Tremer wrote:
Hello Adolf, Thanks for giving this a try. Is there anything in the logs?
In the forum I always remind people to look at the logs. On my Arch Linux systems I always search through the logs when I have a problem.
For some reason with this pakfire package I seem to forget to look in the logs.
Here is what I found when running pakfire-builder build beep/beep.nm (adding --debug made no difference)
pakfire[2137]: Mounting /var/tmp/pakfire-root-KRBTNG from pakfire_ramdisk (tmpfs - (null)) pakfire[2137]: Could not mount /var/tmp/pakfire-root-KRBTNG: Operation not permitted pakfire[2137]: Could not mount ramdisk at /var/tmp/pakfire-root-KRBTNG ((null)): Unknown error -1
Regards,
Adolf.
You can add —-debug to get some more output. Best, -Michael
On 29 Oct 2023, at 13:23, Adolf Belka adolf.belka@ipfire.org wrote:
Hi All,
I updated my pakfire branch by doing a git pull with all the latest changes and built everything again.
Then tested out by running sudo pakfire-builder build beep/beep.nm
Result was again just going to the prompt with nothing happening.
Ran the commands with gdb and got following result.
sudo gdb pakfire-builder GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from pakfire-builder... (gdb) run build beep/beep.nm Starting program: /usr/bin/pakfire-builder build beep/beep.nm [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff57dd6c0 (LWP 12756)] [Thread 0x7ffff57dd6c0 (LWP 12756) exited] [Inferior 1 (process 12752) exited with code 0377] (gdb)
Regards, Adolf.
-- Sent from my laptop
-- Sent from my laptop
Hi Michael,
On 02/11/2023 09:25, Michael Tremer wrote:
Hello Adolf,
I have been looking into this in depth and I cannot find a way to make the builder work with all its features unless it is running as root.
So please add a “sudo” to the command line and let me know if that brings you any further.
I "know" sudo is required but for some reason I keep forgetting to use it with pakfire-builder. Sorry.
Maybe a check could be added to give an error if it is being run without root permissions.
Anyway I will try and not repeat this mistake again.
I have redone a git pull and build etc with the latest pakfire and then retried the pakfire-builder build beep/beep.nm command but with sudo.
The following occurred:
sudo pakfire-builder build beep/beep.nm Package Database: stable 153k 0B/s 100%% Package Database: testing [--------------------------] 0 0B/s ETA : --:--:-- 0%
Nothing further happened after that. It never changed from 0%.
The following was in the logs from the above command and output.
pakfire[12076]: Mounting /var/tmp/pakfire-root-SZSk4U from pakfire_ramdisk (tmpfs - (null)) pakfire[12076]: Ramdisk mounted at /var/tmp/pakfire-root-SZSk4U ((null)) pakfire[12076]: Fetching SUBID from /etc/subuid for root pakfire[12076]: Fetching SUBID from /etc/subgid for root pakfire[12076]: RLIMIT_NOFILE set to 524288 pakfire[12076]: Pakfire initialized at 0x55f5470bdf10 pakfire[12076]: user = root (0) pakfire[12076]: group = root (0) pakfire[12076]: arch = x86_64 (x86_64) pakfire[12076]: path = /var/tmp/pakfire-root-SZSk4U pakfire[12076]: Reading configuration pakfire[12076]: Reading repository configuration from /var/tmp/pakfire-root-SZSk4U/etc/pakfire/repos pakfire[12076]: Distribution: IPFire 3 pakfire[12076]: name = IPFire pakfire[12076]: id = ipfire pakfire[12076]: version = 3 pakfire[12076]: version_id = 3 pakfire[12076]: vendor = IPFire Project pakfire[12076]: slogan = An Open Source Firewall Solution pakfire[12076]: Executing database query: PRAGMA foreign_keys = ON pakfire[12076]: Executing database query: PRAGMA case_sensitive_like = ON pakfire[12076]: Could not find last modification timestamp pakfire[12076]: The database was last modified at 0 pakfire[12076]: Executing database query: PRAGMA secure_delete = OFF pakfire[12076]: Executing database query: PRAGMA journal_mode = WAL pakfire[12076]: Executing database query: BEGIN TRANSACTION pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS settings(key TEXT, val TEXT) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS settings_key ON settings(key) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS packages(id INTEGER PRIMARY KEY, name TEXT, evr TEXT, arch TEXT, groups TEXT, filename TEXT, size INTEGER, inst_size INTEGER, digest_type INTEGER, digest BLOB, license TEXT, summary TEXT, description TEXT, uuid TEXT, vendor TEXT, build_host TEXT, build_time INTEGER, installed INTEGER, userinstalled INTEGER, repository TEXT, source_name TEXT, source_evr TEXT, source_arch TEXT, distribution TEXT) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS packages_name ON packages(name) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS packages_uuid ON packages(uuid) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS dependencies(pkg INTEGER, type TEXT, dependency TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS dependencies_pkg_index ON dependencies(pkg) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS files(id INTEGER PRIMARY KEY, path TEXT, pkg INTEGER, size INTEGER, config INTEGER, datafile INTEGER, mode INTEGER, uname TEXT, gname TEXT, ctime INTEGER, mtime INTEGER, mimetype TEXT, capabilities TEXT, digest_sha2_512 BLOB, digest_sha2_256 BLOB, digest_blake2b512 BLOB, digest_blake2s256 BLOB, digest_sha3_512 BLOB, digest_sha3_256 BLOB, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_pkg_index ON files(pkg) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_path_index ON files(path) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS scriptlets(id INTEGER PRIMARY KEY, pkg INTEGER, type TEXT, scriptlet TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS scriptlets_pkg_index ON scriptlets(pkg) pakfire[12076]: Setting arch to 'x86_64' pakfire[12076]: Setting schema to '8' pakfire[12076]: Setting last_modified_at to '1698931504' pakfire[12076]: Executing database query: COMMIT pakfire[12076]: Loading package database... pakfire[12076]: Loading package database completed in 0.2360ms pakfire[12076]: Executing database query: PRAGMA optimize pakfire[12076]: Executing database query: PRAGMA wal_checkpoint = TRUNCATE pakfire[12076]: Creating repository stable pakfire[12076]: Creating repository testing pakfire[12076]: Creating repository local pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/stable/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/stable/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/repomd.json... pakfire[12076]: Read package database from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/2023-11-01-1226.1698841581.solv.zst... pakfire[12076]: pool: repo_add_solv took 8 ms pakfire[12076]: pool: repo size: 15 solvables pakfire[12076]: pool: repo memory used: 5 K incore, 1 K idarray pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/testing/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/testing/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/repomd.json...
Nothing further after that last line until I pressed Ctrl C after about 2 minutes.
Here are the contents of the directories mentioned for the stable and testing repos.
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/ total 168K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 153K Nov 2 14:25 2023-11-01-1226.1698841581.solv.zst -rw------- 1 root root 94 Nov 2 14:25 repomd.json
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/ total 12K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 94 Nov 2 14:25 repomd.json
Hope the above helps. If anything more info required just let me know.
Regards, Adolf.
-Michael
On 30 Oct 2023, at 17:56, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 30/10/2023 11:01, Michael Tremer wrote:
Hello Adolf, Thanks for giving this a try. Is there anything in the logs?
In the forum I always remind people to look at the logs. On my Arch Linux systems I always search through the logs when I have a problem.
For some reason with this pakfire package I seem to forget to look in the logs.
Here is what I found when running pakfire-builder build beep/beep.nm (adding --debug made no difference)
pakfire[2137]: Mounting /var/tmp/pakfire-root-KRBTNG from pakfire_ramdisk (tmpfs - (null)) pakfire[2137]: Could not mount /var/tmp/pakfire-root-KRBTNG: Operation not permitted pakfire[2137]: Could not mount ramdisk at /var/tmp/pakfire-root-KRBTNG ((null)): Unknown error -1
Regards,
Adolf.
You can add —-debug to get some more output. Best, -Michael
On 29 Oct 2023, at 13:23, Adolf Belka adolf.belka@ipfire.org wrote:
Hi All,
I updated my pakfire branch by doing a git pull with all the latest changes and built everything again.
Then tested out by running sudo pakfire-builder build beep/beep.nm
Result was again just going to the prompt with nothing happening.
Ran the commands with gdb and got following result.
sudo gdb pakfire-builder GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from pakfire-builder... (gdb) run build beep/beep.nm Starting program: /usr/bin/pakfire-builder build beep/beep.nm [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff57dd6c0 (LWP 12756)] [Thread 0x7ffff57dd6c0 (LWP 12756) exited] [Inferior 1 (process 12752) exited with code 0377] (gdb)
Regards, Adolf.
-- Sent from my laptop
-- Sent from my laptop
Hello Adolf,
On 2 Nov 2023, at 14:24, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 02/11/2023 09:25, Michael Tremer wrote:
Hello Adolf, I have been looking into this in depth and I cannot find a way to make the builder work with all its features unless it is running as root. So please add a “sudo” to the command line and let me know if that brings you any further.
I "know" sudo is required but for some reason I keep forgetting to use it with pakfire-builder. Sorry.
I added a check to the CLI tool which will simply complain if it is not running as root.
It would have been great if we could generally run pakfire as non-privileged users, but there are so many obstacles in the way right now that I do not think that it is a good investment of time to fix those. We are talking about many weeks of development time, and other things have a higher priority. We will however never get to a point where pakfire will be able to do all the things as a non-privileged user than root, because the kernel wouldn’t allow it.
Maybe a check could be added to give an error if it is being run without root permissions.
Done.
Anyway I will try and not repeat this mistake again.
I have redone a git pull and build etc with the latest pakfire and then retried the pakfire-builder build beep/beep.nm command but with sudo.
Could you run the same thing with strace -o output.log between sudo and pakfire-builder?
It looks like something is getting stuck somewhere…
-Michael
The following occurred:
sudo pakfire-builder build beep/beep.nm Package Database: stable 153k 0B/s 100%% Package Database: testing [--------------------------] 0 0B/s ETA : --:--:-- 0%
Nothing further happened after that. It never changed from 0%.
The following was in the logs from the above command and output.
pakfire[12076]: Mounting /var/tmp/pakfire-root-SZSk4U from pakfire_ramdisk (tmpfs - (null)) pakfire[12076]: Ramdisk mounted at /var/tmp/pakfire-root-SZSk4U ((null)) pakfire[12076]: Fetching SUBID from /etc/subuid for root pakfire[12076]: Fetching SUBID from /etc/subgid for root pakfire[12076]: RLIMIT_NOFILE set to 524288 pakfire[12076]: Pakfire initialized at 0x55f5470bdf10 pakfire[12076]: user = root (0) pakfire[12076]: group = root (0) pakfire[12076]: arch = x86_64 (x86_64) pakfire[12076]: path = /var/tmp/pakfire-root-SZSk4U pakfire[12076]: Reading configuration pakfire[12076]: Reading repository configuration from /var/tmp/pakfire-root-SZSk4U/etc/pakfire/repos pakfire[12076]: Distribution: IPFire 3 pakfire[12076]: name = IPFire pakfire[12076]: id = ipfire pakfire[12076]: version = 3 pakfire[12076]: version_id = 3 pakfire[12076]: vendor = IPFire Project pakfire[12076]: slogan = An Open Source Firewall Solution pakfire[12076]: Executing database query: PRAGMA foreign_keys = ON pakfire[12076]: Executing database query: PRAGMA case_sensitive_like = ON pakfire[12076]: Could not find last modification timestamp pakfire[12076]: The database was last modified at 0 pakfire[12076]: Executing database query: PRAGMA secure_delete = OFF pakfire[12076]: Executing database query: PRAGMA journal_mode = WAL pakfire[12076]: Executing database query: BEGIN TRANSACTION pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS settings(key TEXT, val TEXT) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS settings_key ON settings(key) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS packages(id INTEGER PRIMARY KEY, name TEXT, evr TEXT, arch TEXT, groups TEXT, filename TEXT, size INTEGER, inst_size INTEGER, digest_type INTEGER, digest BLOB, license TEXT, summary TEXT, description TEXT, uuid TEXT, vendor TEXT, build_host TEXT, build_time INTEGER, installed INTEGER, userinstalled INTEGER, repository TEXT, source_name TEXT, source_evr TEXT, source_arch TEXT, distribution TEXT) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS packages_name ON packages(name) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS packages_uuid ON packages(uuid) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS dependencies(pkg INTEGER, type TEXT, dependency TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS dependencies_pkg_index ON dependencies(pkg) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS files(id INTEGER PRIMARY KEY, path TEXT, pkg INTEGER, size INTEGER, config INTEGER, datafile INTEGER, mode INTEGER, uname TEXT, gname TEXT, ctime INTEGER, mtime INTEGER, mimetype TEXT, capabilities TEXT, digest_sha2_512 BLOB, digest_sha2_256 BLOB, digest_blake2b512 BLOB, digest_blake2s256 BLOB, digest_sha3_512 BLOB, digest_sha3_256 BLOB, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_pkg_index ON files(pkg) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_path_index ON files(path) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS scriptlets(id INTEGER PRIMARY KEY, pkg INTEGER, type TEXT, scriptlet TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS scriptlets_pkg_index ON scriptlets(pkg) pakfire[12076]: Setting arch to 'x86_64' pakfire[12076]: Setting schema to '8' pakfire[12076]: Setting last_modified_at to '1698931504' pakfire[12076]: Executing database query: COMMIT pakfire[12076]: Loading package database... pakfire[12076]: Loading package database completed in 0.2360ms pakfire[12076]: Executing database query: PRAGMA optimize pakfire[12076]: Executing database query: PRAGMA wal_checkpoint = TRUNCATE pakfire[12076]: Creating repository stable pakfire[12076]: Creating repository testing pakfire[12076]: Creating repository local pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/stable/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/stable/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/repomd.json... pakfire[12076]: Read package database from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/2023-11-01-1226.1698841581.solv.zst... pakfire[12076]: pool: repo_add_solv took 8 ms pakfire[12076]: pool: repo size: 15 solvables pakfire[12076]: pool: repo memory used: 5 K incore, 1 K idarray pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/testing/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/testing/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/repomd.json...
Nothing further after that last line until I pressed Ctrl C after about 2 minutes.
Here are the contents of the directories mentioned for the stable and testing repos.
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/ total 168K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 153K Nov 2 14:25 2023-11-01-1226.1698841581.solv.zst -rw------- 1 root root 94 Nov 2 14:25 repomd.json
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/ total 12K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 94 Nov 2 14:25 repomd.json
Hope the above helps. If anything more info required just let me know.
Regards, Adolf.
-Michael
On 30 Oct 2023, at 17:56, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 30/10/2023 11:01, Michael Tremer wrote:
Hello Adolf, Thanks for giving this a try. Is there anything in the logs?
In the forum I always remind people to look at the logs. On my Arch Linux systems I always search through the logs when I have a problem.
For some reason with this pakfire package I seem to forget to look in the logs.
Here is what I found when running pakfire-builder build beep/beep.nm (adding --debug made no difference)
pakfire[2137]: Mounting /var/tmp/pakfire-root-KRBTNG from pakfire_ramdisk (tmpfs - (null)) pakfire[2137]: Could not mount /var/tmp/pakfire-root-KRBTNG: Operation not permitted pakfire[2137]: Could not mount ramdisk at /var/tmp/pakfire-root-KRBTNG ((null)): Unknown error -1
Regards,
Adolf.
You can add —-debug to get some more output. Best, -Michael
On 29 Oct 2023, at 13:23, Adolf Belka adolf.belka@ipfire.org wrote:
Hi All,
I updated my pakfire branch by doing a git pull with all the latest changes and built everything again.
Then tested out by running sudo pakfire-builder build beep/beep.nm
Result was again just going to the prompt with nothing happening.
Ran the commands with gdb and got following result.
sudo gdb pakfire-builder GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from pakfire-builder... (gdb) run build beep/beep.nm Starting program: /usr/bin/pakfire-builder build beep/beep.nm [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff57dd6c0 (LWP 12756)] [Thread 0x7ffff57dd6c0 (LWP 12756) exited] [Inferior 1 (process 12752) exited with code 0377] (gdb)
Regards, Adolf.
-- Sent from my laptop
-- Sent from my laptop
-- Sent from my laptop
Hi Michael,
On 03/11/2023 16:05, Michael Tremer wrote:
Hello Adolf,
On 2 Nov 2023, at 14:24, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 02/11/2023 09:25, Michael Tremer wrote:
Hello Adolf, I have been looking into this in depth and I cannot find a way to make the builder work with all its features unless it is running as root. So please add a “sudo” to the command line and let me know if that brings you any further.
I "know" sudo is required but for some reason I keep forgetting to use it with pakfire-builder. Sorry.
I added a check to the CLI tool which will simply complain if it is not running as root.
It would have been great if we could generally run pakfire as non-privileged users, but there are so many obstacles in the way right now that I do not think that it is a good investment of time to fix those. We are talking about many weeks of development time, and other things have a higher priority. We will however never get to a point where pakfire will be able to do all the things as a non-privileged user than root, because the kernel wouldn’t allow it.
Maybe a check could be added to give an error if it is being run without root permissions.
Done.
Anyway I will try and not repeat this mistake again.
I have redone a git pull and build etc with the latest pakfire and then retried the pakfire-builder build beep/beep.nm command but with sudo.
Could you run the same thing with strace -o output.log between sudo and pakfire-builder?
It looks like something is getting stuck somewhere…
Just tried the same thing again, but via a different network connection and everything worked completely with no issues.
I successfully built beep with no issues, so it looks like everything is working as expected.
Not sure what happened with the previous attempt when it seemed to get stuck. I can't go back and try again on that network connection.
I also tried building sqlite which failed but that looks to be related to something about sqlite, rather than the pakfire code if I am understanding it correctly.
Running build stage 'install' [ 01:08.0316] + '[' -d /build/source/sqlite-autoconf-3430100/ ']' [ 01:08.0316] + cd /build/source/sqlite-autoconf-3430100/ [ 01:08.0316] + mkdir -pv /var/tmp/pakfire-buildroot.X58n6n [ 01:08.0317] + make -O DESTDIR=/var/tmp/pakfire-buildroot.X58n6n install [ 01:08.0322] make[1]: Entering directory '/build/source/sqlite-autoconf-3430100' [ 01:08.0326] /usr/bin/mkdir -p '/var/tmp/pakfire-buildroot.X58n6n/usr/lib64' [ 01:08.0328] /bin/sh ./libtool --mode=install /usr/bin/install -c libsqlite3.la '/var/tmp/pakfire-buildroot.X58n6n/usr/lib64' [ 01:08.0353] ./libtool: line 3109: 0: Bad file descriptor [ 01:08.0354] make[1]: *** [Makefile:471: install-libLTLIBRARIES] Error 1 [ 01:08.0354] make[1]: Leaving directory '/build/source/sqlite-autoconf-3430100' [ 01:08.0354] make: *** [Makefile:915: install-am] Error 2 Build stage 'install' failed with status 2 Could not build sqlite/sqlite.nm
Regards,
Adolf.
-Michael
The following occurred:
sudo pakfire-builder build beep/beep.nm Package Database: stable 153k 0B/s 100%% Package Database: testing [--------------------------] 0 0B/s ETA : --:--:-- 0%
Nothing further happened after that. It never changed from 0%.
The following was in the logs from the above command and output.
pakfire[12076]: Mounting /var/tmp/pakfire-root-SZSk4U from pakfire_ramdisk (tmpfs - (null)) pakfire[12076]: Ramdisk mounted at /var/tmp/pakfire-root-SZSk4U ((null)) pakfire[12076]: Fetching SUBID from /etc/subuid for root pakfire[12076]: Fetching SUBID from /etc/subgid for root pakfire[12076]: RLIMIT_NOFILE set to 524288 pakfire[12076]: Pakfire initialized at 0x55f5470bdf10 pakfire[12076]: user = root (0) pakfire[12076]: group = root (0) pakfire[12076]: arch = x86_64 (x86_64) pakfire[12076]: path = /var/tmp/pakfire-root-SZSk4U pakfire[12076]: Reading configuration pakfire[12076]: Reading repository configuration from /var/tmp/pakfire-root-SZSk4U/etc/pakfire/repos pakfire[12076]: Distribution: IPFire 3 pakfire[12076]: name = IPFire pakfire[12076]: id = ipfire pakfire[12076]: version = 3 pakfire[12076]: version_id = 3 pakfire[12076]: vendor = IPFire Project pakfire[12076]: slogan = An Open Source Firewall Solution pakfire[12076]: Executing database query: PRAGMA foreign_keys = ON pakfire[12076]: Executing database query: PRAGMA case_sensitive_like = ON pakfire[12076]: Could not find last modification timestamp pakfire[12076]: The database was last modified at 0 pakfire[12076]: Executing database query: PRAGMA secure_delete = OFF pakfire[12076]: Executing database query: PRAGMA journal_mode = WAL pakfire[12076]: Executing database query: BEGIN TRANSACTION pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS settings(key TEXT, val TEXT) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS settings_key ON settings(key) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS packages(id INTEGER PRIMARY KEY, name TEXT, evr TEXT, arch TEXT, groups TEXT, filename TEXT, size INTEGER, inst_size INTEGER, digest_type INTEGER, digest BLOB, license TEXT, summary TEXT, description TEXT, uuid TEXT, vendor TEXT, build_host TEXT, build_time INTEGER, installed INTEGER, userinstalled INTEGER, repository TEXT, source_name TEXT, source_evr TEXT, source_arch TEXT, distribution TEXT) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS packages_name ON packages(name) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS packages_uuid ON packages(uuid) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS dependencies(pkg INTEGER, type TEXT, dependency TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS dependencies_pkg_index ON dependencies(pkg) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS files(id INTEGER PRIMARY KEY, path TEXT, pkg INTEGER, size INTEGER, config INTEGER, datafile INTEGER, mode INTEGER, uname TEXT, gname TEXT, ctime INTEGER, mtime INTEGER, mimetype TEXT, capabilities TEXT, digest_sha2_512 BLOB, digest_sha2_256 BLOB, digest_blake2b512 BLOB, digest_blake2s256 BLOB, digest_sha3_512 BLOB, digest_sha3_256 BLOB, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_pkg_index ON files(pkg) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_path_index ON files(path) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS scriptlets(id INTEGER PRIMARY KEY, pkg INTEGER, type TEXT, scriptlet TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS scriptlets_pkg_index ON scriptlets(pkg) pakfire[12076]: Setting arch to 'x86_64' pakfire[12076]: Setting schema to '8' pakfire[12076]: Setting last_modified_at to '1698931504' pakfire[12076]: Executing database query: COMMIT pakfire[12076]: Loading package database... pakfire[12076]: Loading package database completed in 0.2360ms pakfire[12076]: Executing database query: PRAGMA optimize pakfire[12076]: Executing database query: PRAGMA wal_checkpoint = TRUNCATE pakfire[12076]: Creating repository stable pakfire[12076]: Creating repository testing pakfire[12076]: Creating repository local pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/stable/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/stable/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/repomd.json... pakfire[12076]: Read package database from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/2023-11-01-1226.1698841581.solv.zst... pakfire[12076]: pool: repo_add_solv took 8 ms pakfire[12076]: pool: repo size: 15 solvables pakfire[12076]: pool: repo memory used: 5 K incore, 1 K idarray pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/testing/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/testing/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/repomd.json...
Nothing further after that last line until I pressed Ctrl C after about 2 minutes.
Here are the contents of the directories mentioned for the stable and testing repos.
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/ total 168K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 153K Nov 2 14:25 2023-11-01-1226.1698841581.solv.zst -rw------- 1 root root 94 Nov 2 14:25 repomd.json
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/ total 12K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 94 Nov 2 14:25 repomd.json
Hope the above helps. If anything more info required just let me know.
Regards, Adolf.
-Michael
On 30 Oct 2023, at 17:56, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 30/10/2023 11:01, Michael Tremer wrote:
Hello Adolf, Thanks for giving this a try. Is there anything in the logs?
In the forum I always remind people to look at the logs. On my Arch Linux systems I always search through the logs when I have a problem.
For some reason with this pakfire package I seem to forget to look in the logs.
Here is what I found when running pakfire-builder build beep/beep.nm (adding --debug made no difference)
pakfire[2137]: Mounting /var/tmp/pakfire-root-KRBTNG from pakfire_ramdisk (tmpfs - (null)) pakfire[2137]: Could not mount /var/tmp/pakfire-root-KRBTNG: Operation not permitted pakfire[2137]: Could not mount ramdisk at /var/tmp/pakfire-root-KRBTNG ((null)): Unknown error -1
Regards,
Adolf.
You can add —-debug to get some more output. Best, -Michael
On 29 Oct 2023, at 13:23, Adolf Belka adolf.belka@ipfire.org wrote:
Hi All,
I updated my pakfire branch by doing a git pull with all the latest changes and built everything again.
Then tested out by running sudo pakfire-builder build beep/beep.nm
Result was again just going to the prompt with nothing happening.
Ran the commands with gdb and got following result.
sudo gdb pakfire-builder GNU gdb (GDB) 13.2 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from pakfire-builder... (gdb) run build beep/beep.nm Starting program: /usr/bin/pakfire-builder build beep/beep.nm [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff57dd6c0 (LWP 12756)] [Thread 0x7ffff57dd6c0 (LWP 12756) exited] [Inferior 1 (process 12752) exited with code 0377] (gdb)
Regards, Adolf.
-- Sent from my laptop
-- Sent from my laptop
-- Sent from my laptop
Hi Michael,
I decided to try some further update building with IPFire-3.x
I tried running an update for xz but it also came up with the ./libtool .... Bad file descriptor error message as I had with sqlite and described in the previous response below.
I then restored the nm file and retried the build of xz again. Got the same libtool error.
I then tried xfsprogs without any change to the nm file and also got the libtool error.
I then tried xxhash and it built successfully.
So far I have beep and xxhash building successfully and
sqlite, xz and xfsprogs having the same libtool error.
All above builds were run using sudo :-))
It would be interesting to see if you also get that libtool response with building sqlite, xz or xfsprogs or if it is something specific about my Arch Linux setup.
Regards,
Adolf.
On 03/11/2023 20:13, Adolf Belka wrote:
Hi Michael,
On 03/11/2023 16:05, Michael Tremer wrote:
Hello Adolf,
On 2 Nov 2023, at 14:24, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 02/11/2023 09:25, Michael Tremer wrote:
Hello Adolf, I have been looking into this in depth and I cannot find a way to make the builder work with all its features unless it is running as root. So please add a “sudo” to the command line and let me know if that brings you any further.
I "know" sudo is required but for some reason I keep forgetting to use it with pakfire-builder. Sorry.
I added a check to the CLI tool which will simply complain if it is not running as root.
It would have been great if we could generally run pakfire as non-privileged users, but there are so many obstacles in the way right now that I do not think that it is a good investment of time to fix those. We are talking about many weeks of development time, and other things have a higher priority. We will however never get to a point where pakfire will be able to do all the things as a non-privileged user than root, because the kernel wouldn’t allow it.
Maybe a check could be added to give an error if it is being run without root permissions.
Done.
Anyway I will try and not repeat this mistake again.
I have redone a git pull and build etc with the latest pakfire and then retried the pakfire-builder build beep/beep.nm command but with sudo.
Could you run the same thing with strace -o output.log between sudo and pakfire-builder?
It looks like something is getting stuck somewhere…
Just tried the same thing again, but via a different network connection and everything worked completely with no issues.
I successfully built beep with no issues, so it looks like everything is working as expected.
Not sure what happened with the previous attempt when it seemed to get stuck. I can't go back and try again on that network connection.
I also tried building sqlite which failed but that looks to be related to something about sqlite, rather than the pakfire code if I am understanding it correctly.
Running build stage 'install' [ 01:08.0316] + '[' -d /build/source/sqlite-autoconf-3430100/ ']' [ 01:08.0316] + cd /build/source/sqlite-autoconf-3430100/ [ 01:08.0316] + mkdir -pv /var/tmp/pakfire-buildroot.X58n6n [ 01:08.0317] + make -O DESTDIR=/var/tmp/pakfire-buildroot.X58n6n install [ 01:08.0322] make[1]: Entering directory '/build/source/sqlite-autoconf-3430100' [ 01:08.0326] /usr/bin/mkdir -p '/var/tmp/pakfire-buildroot.X58n6n/usr/lib64' [ 01:08.0328] /bin/sh ./libtool --mode=install /usr/bin/install -c libsqlite3.la '/var/tmp/pakfire-buildroot.X58n6n/usr/lib64' [ 01:08.0353] ./libtool: line 3109: 0: Bad file descriptor [ 01:08.0354] make[1]: *** [Makefile:471: install-libLTLIBRARIES] Error 1 [ 01:08.0354] make[1]: Leaving directory '/build/source/sqlite-autoconf-3430100' [ 01:08.0354] make: *** [Makefile:915: install-am] Error 2 Build stage 'install' failed with status 2 Could not build sqlite/sqlite.nm
Regards,
Adolf.
-Michael
The following occurred:
sudo pakfire-builder build beep/beep.nm Package Database: stable 153k 0B/s 100%% Package Database: testing [--------------------------] 0 0B/s ETA : --:--:-- 0%
Nothing further happened after that. It never changed from 0%.
The following was in the logs from the above command and output.
pakfire[12076]: Mounting /var/tmp/pakfire-root-SZSk4U from pakfire_ramdisk (tmpfs - (null)) pakfire[12076]: Ramdisk mounted at /var/tmp/pakfire-root-SZSk4U ((null)) pakfire[12076]: Fetching SUBID from /etc/subuid for root pakfire[12076]: Fetching SUBID from /etc/subgid for root pakfire[12076]: RLIMIT_NOFILE set to 524288 pakfire[12076]: Pakfire initialized at 0x55f5470bdf10 pakfire[12076]: user = root (0) pakfire[12076]: group = root (0) pakfire[12076]: arch = x86_64 (x86_64) pakfire[12076]: path = /var/tmp/pakfire-root-SZSk4U pakfire[12076]: Reading configuration pakfire[12076]: Reading repository configuration from /var/tmp/pakfire-root-SZSk4U/etc/pakfire/repos pakfire[12076]: Distribution: IPFire 3 pakfire[12076]: name = IPFire pakfire[12076]: id = ipfire pakfire[12076]: version = 3 pakfire[12076]: version_id = 3 pakfire[12076]: vendor = IPFire Project pakfire[12076]: slogan = An Open Source Firewall Solution pakfire[12076]: Executing database query: PRAGMA foreign_keys = ON pakfire[12076]: Executing database query: PRAGMA case_sensitive_like = ON pakfire[12076]: Could not find last modification timestamp pakfire[12076]: The database was last modified at 0 pakfire[12076]: Executing database query: PRAGMA secure_delete = OFF pakfire[12076]: Executing database query: PRAGMA journal_mode = WAL pakfire[12076]: Executing database query: BEGIN TRANSACTION pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS settings(key TEXT, val TEXT) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS settings_key ON settings(key) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS packages(id INTEGER PRIMARY KEY, name TEXT, evr TEXT, arch TEXT, groups TEXT, filename TEXT, size INTEGER, inst_size INTEGER, digest_type INTEGER, digest BLOB, license TEXT, summary TEXT, description TEXT, uuid TEXT, vendor TEXT, build_host TEXT, build_time INTEGER, installed INTEGER, userinstalled INTEGER, repository TEXT, source_name TEXT, source_evr TEXT, source_arch TEXT, distribution TEXT) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS packages_name ON packages(name) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS packages_uuid ON packages(uuid) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS dependencies(pkg INTEGER, type TEXT, dependency TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS dependencies_pkg_index ON dependencies(pkg) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS files(id INTEGER PRIMARY KEY, path TEXT, pkg INTEGER, size INTEGER, config INTEGER, datafile INTEGER, mode INTEGER, uname TEXT, gname TEXT, ctime INTEGER, mtime INTEGER, mimetype TEXT, capabilities TEXT, digest_sha2_512 BLOB, digest_sha2_256 BLOB, digest_blake2b512 BLOB, digest_blake2s256 BLOB, digest_sha3_512 BLOB, digest_sha3_256 BLOB, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_pkg_index ON files(pkg) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_path_index ON files(path) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS scriptlets(id INTEGER PRIMARY KEY, pkg INTEGER, type TEXT, scriptlet TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS scriptlets_pkg_index ON scriptlets(pkg) pakfire[12076]: Setting arch to 'x86_64' pakfire[12076]: Setting schema to '8' pakfire[12076]: Setting last_modified_at to '1698931504' pakfire[12076]: Executing database query: COMMIT pakfire[12076]: Loading package database... pakfire[12076]: Loading package database completed in 0.2360ms pakfire[12076]: Executing database query: PRAGMA optimize pakfire[12076]: Executing database query: PRAGMA wal_checkpoint = TRUNCATE pakfire[12076]: Creating repository stable pakfire[12076]: Creating repository testing pakfire[12076]: Creating repository local pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/stable/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/stable/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/repomd.json... pakfire[12076]: Read package database from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/2023-11-01-1226.1698841581.solv.zst... pakfire[12076]: pool: repo_add_solv took 8 ms pakfire[12076]: pool: repo size: 15 solvables pakfire[12076]: pool: repo memory used: 5 K incore, 1 K idarray pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/testing/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/testing/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/repomd.json...
Nothing further after that last line until I pressed Ctrl C after about 2 minutes.
Here are the contents of the directories mentioned for the stable and testing repos.
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/ total 168K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 153K Nov 2 14:25 2023-11-01-1226.1698841581.solv.zst -rw------- 1 root root 94 Nov 2 14:25 repomd.json
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/ total 12K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 94 Nov 2 14:25 repomd.json
Hope the above helps. If anything more info required just let me know.
Regards, Adolf.
-Michael
On 30 Oct 2023, at 17:56, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 30/10/2023 11:01, Michael Tremer wrote:
Hello Adolf, Thanks for giving this a try. Is there anything in the logs?
In the forum I always remind people to look at the logs. On my Arch Linux systems I always search through the logs when I have a problem.
For some reason with this pakfire package I seem to forget to look in the logs.
Here is what I found when running pakfire-builder build beep/beep.nm (adding --debug made no difference)
pakfire[2137]: Mounting /var/tmp/pakfire-root-KRBTNG from pakfire_ramdisk (tmpfs - (null)) pakfire[2137]: Could not mount /var/tmp/pakfire-root-KRBTNG: Operation not permitted pakfire[2137]: Could not mount ramdisk at /var/tmp/pakfire-root-KRBTNG ((null)): Unknown error -1
Regards,
Adolf.
You can add —-debug to get some more output. Best, -Michael > On 29 Oct 2023, at 13:23, Adolf Belka adolf.belka@ipfire.org wrote: > > Hi All, > > I updated my pakfire branch by doing a git pull with all the latest changes and built everything again. > > Then tested out by running sudo pakfire-builder build beep/beep.nm > > Result was again just going to the prompt with nothing happening. > > Ran the commands with gdb and got following result. > > sudo gdb pakfire-builder > GNU gdb (GDB) 13.2 > Copyright (C) 2023 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Type "show copying" and "show warranty" for details. > This GDB was configured as "x86_64-pc-linux-gnu". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > https://www.gnu.org/software/gdb/bugs/. > Find the GDB manual and other documentation resources online at: > http://www.gnu.org/software/gdb/documentation/. > > For help, type "help". > Type "apropos word" to search for commands related to "word"... > Reading symbols from pakfire-builder... > (gdb) run build beep/beep.nm > Starting program: /usr/bin/pakfire-builder build beep/beep.nm > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/usr/lib/libthread_db.so.1". > [New Thread 0x7ffff57dd6c0 (LWP 12756)] > [Thread 0x7ffff57dd6c0 (LWP 12756) exited] > [Inferior 1 (process 12752) exited with code 0377] > (gdb) > > > Regards, > Adolf. > > -- > Sent from my laptop >
-- Sent from my laptop
-- Sent from my laptop
Hello Adolf,
On 27 Nov 2023, at 08:54, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
I decided to try some further update building with IPFire-3.x
Thank you very much for your persistence…
I am really not making the progress on this that I would like to, and I feel bad for not even answering your emails. I held off on that because I was hoping to have something to say at the end of each day, but then I got distracted and was busy with other things…
So here is at least something that I have to say :)
I tried running an update for xz but it also came up with the ./libtool .... Bad file descriptor error message as I had with sqlite and described in the previous response below.
I will have a look at this. There was a reason why this could have happened, but I forgot right now why. I did some rather large refactoring and tried a couple of things on the jail which I now consider a waste of time and will roll back as soon as I can - I want to keep some of the code though, which makes it harder than just rolling back some commits.
I then restored the nm file and retried the build of xz again. Got the same libtool error.
I then tried xfsprogs without any change to the nm file and also got the libtool error.
I then tried xxhash and it built successfully.
So far I have beep and xxhash building successfully and
sqlite, xz and xfsprogs having the same libtool error.
All above builds were run using sudo :-))
Yes, this will probably stay for a little while until changes happen in the Linux kernel.
It would be interesting to see if you also get that libtool response with building sqlite, xz or xfsprogs or if it is something specific about my Arch Linux setup.
No, I think this is a problem with the pseudo terminal inside the jail not being initialised correctly. Maybe it is more likely to happen on Arch, but it is a general bug.
So please, keep the updates for the pages that build coming. I will merge them as soon as possible. And in the meantime, I will try my best to solve all the reported bugs. If you find any more, please open a ticket or send me a mail on this list, so that I can add them to my list and we will solve them eventually :)
All the best, -Michael
Regards,
Adolf.
On 03/11/2023 20:13, Adolf Belka wrote:
Hi Michael,
On 03/11/2023 16:05, Michael Tremer wrote:
Hello Adolf,
On 2 Nov 2023, at 14:24, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 02/11/2023 09:25, Michael Tremer wrote:
Hello Adolf, I have been looking into this in depth and I cannot find a way to make the builder work with all its features unless it is running as root. So please add a “sudo” to the command line and let me know if that brings you any further.
I "know" sudo is required but for some reason I keep forgetting to use it with pakfire-builder. Sorry.
I added a check to the CLI tool which will simply complain if it is not running as root.
It would have been great if we could generally run pakfire as non-privileged users, but there are so many obstacles in the way right now that I do not think that it is a good investment of time to fix those. We are talking about many weeks of development time, and other things have a higher priority. We will however never get to a point where pakfire will be able to do all the things as a non-privileged user than root, because the kernel wouldn’t allow it.
Maybe a check could be added to give an error if it is being run without root permissions.
Done.
Anyway I will try and not repeat this mistake again.
I have redone a git pull and build etc with the latest pakfire and then retried the pakfire-builder build beep/beep.nm command but with sudo.
Could you run the same thing with strace -o output.log between sudo and pakfire-builder?
It looks like something is getting stuck somewhere…
Just tried the same thing again, but via a different network connection and everything worked completely with no issues.
I successfully built beep with no issues, so it looks like everything is working as expected.
Not sure what happened with the previous attempt when it seemed to get stuck. I can't go back and try again on that network connection.
I also tried building sqlite which failed but that looks to be related to something about sqlite, rather than the pakfire code if I am understanding it correctly.
Running build stage 'install' [ 01:08.0316] + '[' -d /build/source/sqlite-autoconf-3430100/ ']' [ 01:08.0316] + cd /build/source/sqlite-autoconf-3430100/ [ 01:08.0316] + mkdir -pv /var/tmp/pakfire-buildroot.X58n6n [ 01:08.0317] + make -O DESTDIR=/var/tmp/pakfire-buildroot.X58n6n install [ 01:08.0322] make[1]: Entering directory '/build/source/sqlite-autoconf-3430100' [ 01:08.0326] /usr/bin/mkdir -p '/var/tmp/pakfire-buildroot.X58n6n/usr/lib64' [ 01:08.0328] /bin/sh ./libtool --mode=install /usr/bin/install -c libsqlite3.la '/var/tmp/pakfire-buildroot.X58n6n/usr/lib64' [ 01:08.0353] ./libtool: line 3109: 0: Bad file descriptor [ 01:08.0354] make[1]: *** [Makefile:471: install-libLTLIBRARIES] Error 1 [ 01:08.0354] make[1]: Leaving directory '/build/source/sqlite-autoconf-3430100' [ 01:08.0354] make: *** [Makefile:915: install-am] Error 2 Build stage 'install' failed with status 2 Could not build sqlite/sqlite.nm
Regards,
Adolf.
-Michael
The following occurred:
sudo pakfire-builder build beep/beep.nm Package Database: stable 153k 0B/s 100%% Package Database: testing [--------------------------] 0 0B/s ETA : --:--:-- 0%
Nothing further happened after that. It never changed from 0%.
The following was in the logs from the above command and output.
pakfire[12076]: Mounting /var/tmp/pakfire-root-SZSk4U from pakfire_ramdisk (tmpfs - (null)) pakfire[12076]: Ramdisk mounted at /var/tmp/pakfire-root-SZSk4U ((null)) pakfire[12076]: Fetching SUBID from /etc/subuid for root pakfire[12076]: Fetching SUBID from /etc/subgid for root pakfire[12076]: RLIMIT_NOFILE set to 524288 pakfire[12076]: Pakfire initialized at 0x55f5470bdf10 pakfire[12076]: user = root (0) pakfire[12076]: group = root (0) pakfire[12076]: arch = x86_64 (x86_64) pakfire[12076]: path = /var/tmp/pakfire-root-SZSk4U pakfire[12076]: Reading configuration pakfire[12076]: Reading repository configuration from /var/tmp/pakfire-root-SZSk4U/etc/pakfire/repos pakfire[12076]: Distribution: IPFire 3 pakfire[12076]: name = IPFire pakfire[12076]: id = ipfire pakfire[12076]: version = 3 pakfire[12076]: version_id = 3 pakfire[12076]: vendor = IPFire Project pakfire[12076]: slogan = An Open Source Firewall Solution pakfire[12076]: Executing database query: PRAGMA foreign_keys = ON pakfire[12076]: Executing database query: PRAGMA case_sensitive_like = ON pakfire[12076]: Could not find last modification timestamp pakfire[12076]: The database was last modified at 0 pakfire[12076]: Executing database query: PRAGMA secure_delete = OFF pakfire[12076]: Executing database query: PRAGMA journal_mode = WAL pakfire[12076]: Executing database query: BEGIN TRANSACTION pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS settings(key TEXT, val TEXT) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS settings_key ON settings(key) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS packages(id INTEGER PRIMARY KEY, name TEXT, evr TEXT, arch TEXT, groups TEXT, filename TEXT, size INTEGER, inst_size INTEGER, digest_type INTEGER, digest BLOB, license TEXT, summary TEXT, description TEXT, uuid TEXT, vendor TEXT, build_host TEXT, build_time INTEGER, installed INTEGER, userinstalled INTEGER, repository TEXT, source_name TEXT, source_evr TEXT, source_arch TEXT, distribution TEXT) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS packages_name ON packages(name) pakfire[12076]: Executing database query: CREATE UNIQUE INDEX IF NOT EXISTS packages_uuid ON packages(uuid) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS dependencies(pkg INTEGER, type TEXT, dependency TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS dependencies_pkg_index ON dependencies(pkg) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS files(id INTEGER PRIMARY KEY, path TEXT, pkg INTEGER, size INTEGER, config INTEGER, datafile INTEGER, mode INTEGER, uname TEXT, gname TEXT, ctime INTEGER, mtime INTEGER, mimetype TEXT, capabilities TEXT, digest_sha2_512 BLOB, digest_sha2_256 BLOB, digest_blake2b512 BLOB, digest_blake2s256 BLOB, digest_sha3_512 BLOB, digest_sha3_256 BLOB, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_pkg_index ON files(pkg) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS files_path_index ON files(path) pakfire[12076]: Executing database query: CREATE TABLE IF NOT EXISTS scriptlets(id INTEGER PRIMARY KEY, pkg INTEGER, type TEXT, scriptlet TEXT, FOREIGN KEY (pkg) REFERENCES packages(id) ON DELETE CASCADE) pakfire[12076]: Executing database query: CREATE INDEX IF NOT EXISTS scriptlets_pkg_index ON scriptlets(pkg) pakfire[12076]: Setting arch to 'x86_64' pakfire[12076]: Setting schema to '8' pakfire[12076]: Setting last_modified_at to '1698931504' pakfire[12076]: Executing database query: COMMIT pakfire[12076]: Loading package database... pakfire[12076]: Loading package database completed in 0.2360ms pakfire[12076]: Executing database query: PRAGMA optimize pakfire[12076]: Executing database query: PRAGMA wal_checkpoint = TRUNCATE pakfire[12076]: Creating repository stable pakfire[12076]: Creating repository testing pakfire[12076]: Creating repository local pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/stable/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/stable/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/repomd.json... pakfire[12076]: Read package database from /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/2023-11-01-1226.1698841581.solv.zst... pakfire[12076]: pool: repo_add_solv took 8 ms pakfire[12076]: pool: repo size: 15 solvables pakfire[12076]: pool: repo memory used: 5 K incore, 1 K idarray pakfire[12076]: Repository URL updated: pakfire[12076]: From: https://pakfire.ipfire.org/files/repos/ipfire-3/testing/%%7Barch%7D/ pakfire[12076]: To : https://pakfire.ipfire.org/files/repos/ipfire-3/testing/x86_64/ pakfire[12076]: Reading repository metadata from /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/repomd.json...
Nothing further after that last line until I pressed Ctrl C after about 2 minutes.
Here are the contents of the directories mentioned for the stable and testing repos.
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/stable/repodata/ total 168K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 153K Nov 2 14:25 2023-11-01-1226.1698841581.solv.zst -rw------- 1 root root 94 Nov 2 14:25 repomd.json
ls -hal /root/.cache/pakfire/ipfire/3/x86_64/testing/repodata/ total 12K drwxr-xr-x 2 root root 4.0K Nov 2 14:25 . drwxr-xr-x 3 root root 4.0K Nov 2 14:25 .. -rw------- 1 root root 94 Nov 2 14:25 repomd.json
Hope the above helps. If anything more info required just let me know.
Regards, Adolf.
-Michael
On 30 Oct 2023, at 17:56, Adolf Belka adolf.belka@ipfire.org wrote:
Hi Michael,
On 30/10/2023 11:01, Michael Tremer wrote: > Hello Adolf, > Thanks for giving this a try. Is there anything in the logs?
In the forum I always remind people to look at the logs. On my Arch Linux systems I always search through the logs when I have a problem.
For some reason with this pakfire package I seem to forget to look in the logs.
Here is what I found when running pakfire-builder build beep/beep.nm (adding --debug made no difference)
pakfire[2137]: Mounting /var/tmp/pakfire-root-KRBTNG from pakfire_ramdisk (tmpfs - (null)) pakfire[2137]: Could not mount /var/tmp/pakfire-root-KRBTNG: Operation not permitted pakfire[2137]: Could not mount ramdisk at /var/tmp/pakfire-root-KRBTNG ((null)): Unknown error -1
Regards,
Adolf.
> You can add —-debug to get some more output. > Best, > -Michael >> On 29 Oct 2023, at 13:23, Adolf Belka adolf.belka@ipfire.org wrote: >> >> Hi All, >> >> I updated my pakfire branch by doing a git pull with all the latest changes and built everything again. >> >> Then tested out by running sudo pakfire-builder build beep/beep.nm >> >> Result was again just going to the prompt with nothing happening. >> >> Ran the commands with gdb and got following result. >> >> sudo gdb pakfire-builder >> GNU gdb (GDB) 13.2 >> Copyright (C) 2023 Free Software Foundation, Inc. >> License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html >> This is free software: you are free to change and redistribute it. >> There is NO WARRANTY, to the extent permitted by law. >> Type "show copying" and "show warranty" for details. >> This GDB was configured as "x86_64-pc-linux-gnu". >> Type "show configuration" for configuration details. >> For bug reporting instructions, please see: >> https://www.gnu.org/software/gdb/bugs/. >> Find the GDB manual and other documentation resources online at: >> http://www.gnu.org/software/gdb/documentation/. >> >> For help, type "help". >> Type "apropos word" to search for commands related to "word"... >> Reading symbols from pakfire-builder... >> (gdb) run build beep/beep.nm >> Starting program: /usr/bin/pakfire-builder build beep/beep.nm >> [Thread debugging using libthread_db enabled] >> Using host libthread_db library "/usr/lib/libthread_db.so.1". >> [New Thread 0x7ffff57dd6c0 (LWP 12756)] >> [Thread 0x7ffff57dd6c0 (LWP 12756) exited] >> [Inferior 1 (process 12752) exited with code 0377] >> (gdb) >> >> >> Regards, >> Adolf. >> >> -- >> Sent from my laptop >>
-- Sent from my laptop
-- Sent from my laptop