Skip to content

Conversation

@xingguangcuican6666
Copy link
Contributor

@robertkirkman I think that I did it.
cdrkit is a command-line toolkit for creating and burning CD/DVD image files.
image
image
image

@TomJo2000
Copy link
Member

To point out the obvious, the versioning and source availability for this package is more messy than for a typical package.
It may be worth considering changing the build script to build cdrtools instead.
This is what provides cdrkit on Arch Linux, and it seems to be more straightforward to build.
https://gitlab.archlinux.org/archlinux/packaging/packages/cdrtools/-/blob/3.02a09-6/PKGBUILD

@xingguangcuican6666
Copy link
Contributor Author

It compiles successfully on my local machine, but when using GitHub CI, various problems mysteriously occur.

@TomJo2000
Copy link
Member

The CI is most likely running into cross compilation issues since it is building the package on a x86_64 host.
Whereas on your phone it is a "simple" native compilation.

@xingguangcuican6666
Copy link
Contributor Author

OK, I have found the cause; it's libandroid-glob and libandroid-utimes, they do not link automatically.

@xingguangcuican6666
Copy link
Contributor Author

Here

ld.lld: error: undefined symbol: glob
>>> referenced by scsihack.c
>>>               scsihack.c.o:(usalo_maxdma) in archive libusal/libusal.a
>>> referenced by scsihack.c
>>>               scsihack.c.o:(usalo_maxdma) in archive libusal/libusal.a

ld.lld: error: undefined symbol: globfree
>>> referenced by scsihack.c
>>>               scsihack.c.o:(usalo_maxdma) in archive libusal/libusal.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@TomJo2000
Copy link
Member

Yep that'd make sense.

@xingguangcuican6666
Copy link
Contributor Author

Oh, I hate the shell script.

@TomJo2000
Copy link
Member

TomJo2000 commented Oct 23, 2025

I still think you might wanna consider packaging the cdrtools version of cdrkit instead.
They seem to provide the same set of utilities but cdrtools seems to be more actively maintained.

@xingguangcuican6666
Copy link
Contributor Author

However, it seems that cdrtools has a particularly large number of set*uid calls, making it difficult to modify.

@xingguangcuican6666
Copy link
Contributor Author

cdrkit is still relatively less common

@TomJo2000
Copy link
Member

I'm not certain either version of the utilities would even work without root privileges.

@xingguangcuican6666
Copy link
Contributor Author

set*uid is not supported on Android and will trigger EOSYSCALL

@xingguangcuican6666
Copy link
Contributor Author

I'm not certain either version of the utilities would even work without root privileges.

Sure, my device doesn't have root access, but it can normally package an ISO.

@xingguangcuican6666
Copy link
Contributor Author

image

@TomJo2000
Copy link
Member

Okay that's good.
Still not sure if we're gonna get it cross-compiling.

@xingguangcuican6666
Copy link
Contributor Author

Okay that's good. Still not sure if we're gonna get it cross-compiling.

I'm trying. I hope it can successful build.

@xingguangcuican6666
Copy link
Contributor Author

I have tried every possible method, but CMake just refuses to link these two libraries.
I need help, please tell me why this is.

@xingguangcuican6666 xingguangcuican6666 force-pushed the cdrkit branch 3 times, most recently from 236e618 to b13691e Compare October 23, 2025 14:06
@xingguangcuican6666
Copy link
Contributor Author

IT WORKED!

@robertkirkman robertkirkman self-requested a review October 23, 2025 22:44
@robertkirkman
Copy link
Member

set*uid is not supported on Android and will trigger EOSYSCALL

I might want to revise this package, but it might take me some time, wait a while

@xingguangcuican6666
Copy link
Contributor Author

I have already annotated these parts in my patch. These parts are designed for security purposes, intended to discard temporary root privileges and run with reduced permissions, which are not needed on Android at all. At the same time, some functions of this package actually require root privileges, but I guess currently no one can use an Android phone to read a real CD.

@robertkirkman
Copy link
Member

I guess currently no one can use an Android phone to read a real CD.

Not only can Android-x86 run on devices which can theoretically have internal CD drives, but also I have a USB CD drive which can plug into a phone USB port and I don't know if it actually would do anything if I did that but I could test it.

@xingguangcuican6666
Copy link
Contributor Author

Sure, you can give it a try. If it works, I will move this package to the root-packages directory.

@robertkirkman
Copy link
Member

Well actually, in my opinion only packages which do nothing useful at all without root should be in the root-packages folder, and packages which have some commands working without root and some commands which require root should be in the main packages folder, so since you already used this without root, it should not be in the root-packages folder.

@xingguangcuican6666
Copy link
Contributor Author

Okay

@xingguangcuican6666
Copy link
Contributor Author

I guess currently no one can use an Android phone to read a real CD.

Not only can Android-x86 run on devices which can theoretically have internal CD drives, but also I have a USB CD drive which can plug into a phone USB port and I don't know if it actually would do anything if I did that but I could test it.

I am waiting for your good news.

@xingguangcuican6666
Copy link
Contributor Author

Is the testing progressing smoothly?

@robertkirkman
Copy link
Member

Yes but right now I am working on this other PR first and when I finish I will work on this one

@xingguangcuican6666
Copy link
Contributor Author

OKay

@xingguangcuican6666
Copy link
Contributor Author

I found that this report description was referring to Debian, so I made some modifications.

@xingguangcuican6666
Copy link
Contributor Author

@robertkirkman Do you think I should replace the 'report' description in the help information of all commands in cdrkit with my own email or with information directing users to submit issues to the termux-package repository?

@xingguangcuican6666
Copy link
Contributor Author

@robertkirkman Do you think I should replace the 'report' description in the help information of all commands in cdrkit with my own email or with information directing users to submit issues to the termux-package repository?

Or keep it as it is

@xingguangcuican6666
Copy link
Contributor Author

-        "\nReport problems to [email protected].\n"); 
 +        "\nReport problems to [email protected] or create issue on termux-packages repo and @xingguangcuican6666.\n");

Here

@robertkirkman
Copy link
Member

robertkirkman commented Oct 28, 2025

@robertkirkman Do you think I should replace the 'report' description in the help information of all commands in cdrkit with my own email or with information directing users to submit issues to the termux-package repository?

Please replace it with this kind of message:

"Report problems to https://github.com/termux/termux-packages/issues"

I don't think it is necessary to insert [email protected], because issues should be publicly visible and not in private email.

@xingguangcuican6666
Copy link
Contributor Author

OKay

@xingguangcuican6666
Copy link
Contributor Author

I modified it

@robertkirkman
Copy link
Member

Ok nice, I am finished with the PR I mentioned before, and now I'm working on part of this other issue, and then after I finish that I will review this PR more.

@xingguangcuican6666
Copy link
Contributor Author

Okay, I was just looking to see if there was anything else that could be optimized.

@xingguangcuican6666
Copy link
Contributor Author

Okay, at least for now I don't think there's much left to optimize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants