Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linuxulator: ports for Rocky Linux 9 #255

Closed
wants to merge 17 commits into from
Closed

Conversation

Awoonyaa
Copy link
Contributor

@Awoonyaa Awoonyaa commented May 2, 2024

@arrowd
Copy link
Contributor

arrowd commented May 2, 2024

@TijlCoosemans can you look at this?

@TijlCoosemans
Copy link
Contributor

I haven't looked at everything in detail, but here are some general comments:

  • missing pkg-plist.aarch64 in every port, but I suggest you change Uses/linux.mk so it only defines PLIST for c7 and rename all pkg-plist.amd64 to just pkg-plist. If there are differences between the two architectures it can probably be handled with PLIST_SUB. I've been thinking about merging the pkg-plist.* files of c7 ports using the following in Uses/linux.mk. It should work for rl9 as well if you need it:
.    if ${ARCH} == aarch64
PLIST_SUB+=		AARCH64="" AMD64="@comment " I386="@comment " \
			LINUX32="@comment " LINUX64=""
.    elif ${ARCH} == amd64
PLIST_SUB+=		AARCH64="@comment " AMD64="" I386="" \
			LINUX32="" LINUX64=""
.    elif ${ARCH} == i386
PLIST_SUB+=		AARCH64="@comment " AMD64="@comment " I386="" \
			LINUX32="" LINUX64="@comment "
.    endif
  • missing archivers/Makefile
  • don't mark devel/linux-c7-strace deprecated just yet. linux-c7 is the only option to run i386 programs so it's very likely to stay in the ports tree beyond its EoL date.
  • rename devel/linux-strace to linux-rl9-strace
  • rename ftp/linux-wget to linux-rl9-wget
  • rename security/linux-gnupg to linux-rl9-gnupg

Mk/Uses/linux.mk Outdated
Comment on lines 277 to 296
&& empty(NOT_FOR_ARCHS:Mamd64) && ${linux_ARGS} != rl9
DISTFILES_amd64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \
${LIB_DISTNAMES_i386:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \
${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${LIB_DISTNAMES_amd64:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/}
. endif
. if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mamd64)) \
&& empty(NOT_FOR_ARCHS:Mamd64) && ${linux_ARGS} == rl9
DISTFILES_amd64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${LIB_DISTNAMES_amd64:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/}
. endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&& empty(NOT_FOR_ARCHS:Mamd64) && ${linux_ARGS} != rl9
DISTFILES_amd64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \
${LIB_DISTNAMES_i386:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \
${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${LIB_DISTNAMES_amd64:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/}
. endif
. if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mamd64)) \
&& empty(NOT_FOR_ARCHS:Mamd64) && ${linux_ARGS} == rl9
DISTFILES_amd64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${LIB_DISTNAMES_amd64:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/}
. endif
&& empty(NOT_FOR_ARCHS:Mamd64)
. ifndef DISTFILES_amd64
. if ${linux_ARGS} == c7
DISTFILES_amd64= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \
${LIB_DISTNAMES_i386:S/$/${EXTRACT_SUFX_i386}:amd64,i386/}
. endif
DISTFILES_amd64+= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${LIB_DISTNAMES_amd64:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/}
. endif
. endif

Comment on lines 49 to 50
.if ${ARCH} == amd64 && ${FLAVOR:Mc7}
ONLY_FOR_ARCHS+= i386
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ONLY_FOR_ARCHS isn't just for amd64. Also, is it customary to use :M with FLAVOR? I think you can just use ==.

Suggested change
.if ${ARCH} == amd64 && ${FLAVOR:Mc7}
ONLY_FOR_ARCHS+= i386
.if ${FLAVOR} == c7
ONLY_FOR_ARCHS+= i386
.endif
.if ${ARCH} == amd64 && ${FLAVOR} == c7

@arrowd arrowd force-pushed the rocky branch 2 times, most recently from 95622c8 to fc74e5d Compare May 7, 2024 17:11
@arrowd
Copy link
Contributor

arrowd commented May 7, 2024

missing pkg-plist.aarch64 in every port,

Right, I will go over all the ports again and add plists for aarch64.

missing archivers/Makefile

Fixed.

don't mark devel/linux-c7-strace deprecated just yet. linux-c7 is the only option to run i386 programs so it's very likely to stay in the ports tree beyond its EoL date.
rename devel/linux-strace to linux-rl9-strace
rename ftp/linux-wget to linux-rl9-wget
rename security/linux-gnupg to linux-rl9-gnupg

Let me explain. These ports do not install libraries but executables, so they can't be depended on via USE_LINUX. These ports are essentially the same as, for example, editors/linux-wps-office - it is a consumer of linux-c7 or linux-rl9 infrastructure.

I see no sense in having two ports for mostly the same wget Linux binary (although one of these would be older). The same goes for strace and gnupg.

@TijlCoosemans
Copy link
Contributor

don't mark devel/linux-c7-strace deprecated just yet. linux-c7 is the only option to run i386 programs so it's very likely to stay in the ports tree beyond its EoL date.
rename devel/linux-strace to linux-rl9-strace
rename ftp/linux-wget to linux-rl9-wget
rename security/linux-gnupg to linux-rl9-gnupg

Let me explain. These ports do not install libraries but executables, so they can't be depended on via USE_LINUX. These ports are essentially the same as, for example, editors/linux-wps-office - it is a consumer of linux-c7 or linux-rl9 infrastructure.

I see no sense in having two ports for mostly the same wget Linux binary (although one of these would be older). The same goes for strace and gnupg.

Ports like linux-wps-office and linux-chrome have a separate upstream who tend to make sure their packages work on multiple linux distributions while rl9 strace and wget only work on rl9. In that case it's easier to have separate ports for c7 and rl9 strace than to try to support both from one port.

You can add them to linux.mk and depend on them using USE_LINUX. USE_LINUX adds RUN_DEPENDS by default.

@arrowd
Copy link
Contributor

arrowd commented May 8, 2024

Sigh, you're right. That was silly of me to remove rl9 spice from these ports.

@arrowd arrowd force-pushed the rocky branch 5 times, most recently from 570d02a to d426942 Compare May 11, 2024 15:30
@arrowd
Copy link
Contributor

arrowd commented May 11, 2024

@TijlCoosemans I have applied your suggestions and also added aarch64 pkg-plists, carefully comparing each of them to the amd64 ones. I also addressed comments from the Bugzilla PR.

Is this ready to go in?

@@ -40,7 +46,8 @@ MAKE_ENV+= LDADD="-lrt"

MAKE_ARGS+= NO_WDATE_TIME=yes

.if ${ARCH} == amd64
.if ${FLAVOR} == c7
ONLY_FOR_ARCHS+= i386
PLIST_FILES+= usr/lib/libusb.so.3 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PLIST_FILES must be behind .if ${ARCH} == amd64. It corresponds to the amd64 bits in do-build and do-install below

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, fixed.

Mk/Uses/linux.mk Outdated
. endif
. if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mamd64)) \
&& empty(NOT_FOR_ARCHS:Mamd64) && ${linux_ARGS} == rl9
DISTFILES_amd64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This .if block with DISTFILES_amd64 assignment should be removed. It is handled by the .if block above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just blindly copied your suggested changes. Fixed.

arrowd and others added 12 commits May 11, 2024 19:34
Sponsored by:	Serenity Cybersecurity, LLC
Co-authored-by:	Dima Panov <fluffy@FreeBSD.org>
Sponsored by:	Serenity Cybersecurity, LLC
Co-authored-by:	Gleb Popov <arrowd@FreeBSD.org>

Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
Co-authored-by:	Gleb Popov <arrowd@FreeBSD.org>

Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
fluffykhv and others added 5 commits May 11, 2024 19:34
Sponsored by:	Serenity Cybersecurity, LLC

Co-authored-by:	awoonya <mzhyneva@gmail.com>
Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
Sponsored by:	Serenity Cybersecurity, LLC
@TijlCoosemans
Copy link
Contributor

Okay for me now.

Do you know what the .buildid files are for? They are the only difference between pkg-plist.aarch64 and pkg-plist.amd64.

@arrowd
Copy link
Contributor

arrowd commented May 11, 2024

See https://access.redhat.com/documentation/ru-ru/red_hat_enterprise_linux/6/html/developer_guide/compiling-build-id

and

the build-id is a unique checksum added by the linker and computed over all "important" bits of the ELF file. Its primary use is to make sure that the core file matches the binary which produced it (build-id is located very near the start of the binary, and is included in the core for this purpose).

I thought about not installing these at all, but that is orthogonal for this PR.

@Martinfx
Copy link
Contributor

Hello,
i have problem with this port:

===>   linux-wps-office-11.1.0.11719 depends on executable: update-desktop-database - found
===>   linux-wps-office-11.1.0.11719 depends on package: linux-rl9-libpng>0 - found
===>   linux-wps-office-11.1.0.11719 depends on package: linux-rl9-pulseaudio-libs>0 - not found
===>  Staging for linux-rl9-pulseaudio-libs-15.0
===>   linux-rl9-pulseaudio-libs-15.0 depends on package: linux-rl9-dbus-libs>0 - not found
===>  Staging for linux-rl9-dbus-libs-1.12.20_2
===>   linux-rl9-dbus-libs-1.12.20_2 depends on package: linux-rl9-expat>0 - found
===>   linux-rl9-dbus-libs-1.12.20_2 depends on package: linux-rl9-systemd-libs>0 - not found
===>  Staging for linux-rl9-systemd-libs-252_3
===>   linux-rl9-systemd-libs-252_3 depends on package: linux-rl9-elfutils-libs>0 - found
===>   linux-rl9-systemd-libs-252_3 depends on package: linux-rl9-libgcrypt>0 - found
===>   linux-rl9-systemd-libs-252_3 depends on package: linux-rl9-libgpg-error>0 - found
===>   linux-rl9-systemd-libs-252_3 depends on package: linux-rl9-lz4>0 - found
===>   linux-rl9-systemd-libs-252_3 depends on package: linux-rl9-nss>0 - not found
===>  Staging for linux-rl9-nss-3.90.0_2
===>   linux-rl9-nss-3.90.0_2 depends on package: linux-rl9-nspr>0 - not found
===>  Installing for linux-rl9-nspr-4.35.0
===>  Checking if linux-rl9-nspr is already installed
===>   Registering installation for linux-rl9-nspr-4.35.0 as automatic
pkg-static: Unable to access file /usr/ports/devel/linux-rl9-nspr/work/stage/compat/linux/usr/lib/.build-id/14/9b125ff43bfbd434104d63d60b606b92a37895:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/linux-rl9-nspr/work/stage/compat/linux/usr/lib/.build-id/56/e7237b88c86e68a2a3ed3b864b01264acc4a52:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/linux-rl9-nspr/work/stage/compat/linux/usr/lib/.build-id/fe/377b98f2cf7a18d0da81a30fe7d5832ce9e47f:No such file or directory
*** Error code 1

@arrowd arrowd closed this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants