Bug 210926 - [NEW PORT] emulators/linux_base-c7: base port for future linux-c7 metaport
Summary: [NEW PORT] emulators/linux_base-c7: base port for future linux-c7 metaport
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tijl Coosemans
URL:
Keywords: feature, patch
Depends on: 211645
Blocks: 211308
  Show dependency treegraph
 
Reported: 2016-07-08 15:37 UTC by Piotr Kubaj
Modified: 2016-09-16 19:02 UTC (History)
8 users (show)

See Also:


Attachments
Mk diff (4.98 KB, patch)
2016-07-08 15:37 UTC, Piotr Kubaj
no flags Details | Diff
linux_base-c7 shar (154.94 KB, application/x-shar)
2016-07-08 15:38 UTC, Piotr Kubaj
no flags Details
Poudriere log (237.72 KB, text/x-log)
2016-07-08 15:43 UTC, Piotr Kubaj
no flags Details
linux_base-c7 shar (159.00 KB, text/plain)
2016-07-10 16:14 UTC, Piotr Kubaj
no flags Details
linux_base-c7 shar (277.80 KB, application/x-shar)
2016-07-17 22:02 UTC, Piotr Kubaj
no flags Details
Mk patch (4.75 KB, patch)
2016-07-17 22:03 UTC, Piotr Kubaj
no flags Details | Diff
Mk patch (4.63 KB, patch)
2016-07-19 17:05 UTC, Piotr Kubaj
no flags Details | Diff
linux_base-c7 shar (277.74 KB, application/x-shar)
2016-07-19 17:06 UTC, Piotr Kubaj
no flags Details
Mk patch (5.95 KB, patch)
2016-07-19 18:49 UTC, Piotr Kubaj
no flags Details | Diff
Mk patch (6.93 KB, patch)
2016-07-20 00:06 UTC, Piotr Kubaj
no flags Details | Diff
linux_base-c7 shar (277.65 KB, application/x-shar)
2016-07-20 00:08 UTC, Piotr Kubaj
no flags Details
Mk patch (6.73 KB, patch)
2016-07-20 00:11 UTC, Piotr Kubaj
no flags Details | Diff
linux_base-c7 - correct distinfo (276.80 KB, application/x-shar)
2016-07-23 02:10 UTC, Piotr Kubaj
no flags Details
patch compatible with bug 211645 (273.11 KB, patch)
2016-08-07 20:49 UTC, Tijl Coosemans
no flags Details | Diff
patch with corrected COMMENT (273.12 KB, patch)
2016-08-12 09:10 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2016-07-08 15:37:38 UTC
Created attachment 172242 [details]
Mk diff

Included are Poudriere log, diff for Mk/bsd.linux-{apps,rpm{.mk and shar of emulators/linux_base-c7.

I want to pursue this further and once it's commited, I will issue another PR's  to add another ports to create a whole emulators/linux-c7 metaport.
Comment 1 Piotr Kubaj freebsd_committer 2016-07-08 15:38:09 UTC
Created attachment 172243 [details]
linux_base-c7 shar
Comment 2 Piotr Kubaj freebsd_committer 2016-07-08 15:43:54 UTC
Created attachment 172244 [details]
Poudriere log
Comment 3 Piotr Kubaj freebsd_committer 2016-07-10 16:14:42 UTC
Created attachment 172328 [details]
linux_base-c7 shar

-removed CONLICTFLICS for non-existent ports
-removed hased out EXTRACT_DEPENDS
Comment 4 Johannes Jost Meixner freebsd_committer 2016-07-11 15:44:08 UTC
Someone else will want to look at this.

Thanks
-J
Comment 5 Tijl Coosemans freebsd_committer 2016-07-16 16:45:38 UTC
There are i386 packages at http://mirror.centos.org/altarch/7.2.1511/
I think you can just add this to MASTER_SITE_SUBDIR and then remove some of the changes in the Mk diff.
Comment 6 Piotr Kubaj freebsd_committer 2016-07-16 21:50:51 UTC
(In reply to Tijl Coosemans from comment #5)
I know about those. Thing is, I've already asked about including i386 support on #freebsd on FreeNode and got the response that it's probably not worth it. Do you still believe that we should include i386 c7 support even though i386 is basically unsupported in c7 (they only officially support amd64)?
Comment 7 Joe 2016-07-17 14:57:18 UTC
I'm not sure on your conversations on irc, but I think what you're likely to find is a bunch of users wanting the 64bit linux installation with support for 32bit applications.  This would add a few rpms which are both 32bit & 64bit, such as the libstdc++.  I know they ran into that in the c6.7-64bit installation.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206943 as a reference to that they even patched the c6-64 port for that.

I know for my purposes that I'd be using steamcmd, which is 32bit, and can install a variety of 32bit and 64bit applications.
Comment 8 Tijl Coosemans freebsd_committer 2016-07-17 15:46:04 UTC
I would like to keep support for multiple archs, because at some point we may want to add ARM support.  i386 support seems easy to keep for now and according to https://wiki.centos.org/SpecialInterestGroup/AltArch/i386 the packages are built as part of the 64 bit build so they are at least semiofficial.
Comment 9 Piotr Kubaj freebsd_committer 2016-07-17 16:30:51 UTC
I'd like to clarify on this issue. i386 packages are included in linux-c7 ports, so you will be able to run i386 binaries on amd64 (i386 packages are already present in linux_base-c7 distinfo). What is not possible in this setup is running i386 binaries on i386.

So yeah, you will be able to run Steam in this scenario. And who uses exclusively i386 anyway nowadays?
Comment 10 Ivan 2016-07-17 17:26:15 UTC
(In reply to Piotr Kubaj from comment #9)
Cheap vps hosters provide i386 FreeBSD, for example https://vds6.net/
Comment 11 Piotr Kubaj freebsd_committer 2016-07-17 22:02:19 UTC
Created attachment 172619 [details]
linux_base-c7 shar

Includes amd64 and i386 support. Please test.
Comment 12 Piotr Kubaj freebsd_committer 2016-07-17 22:03:52 UTC
Created attachment 172620 [details]
Mk patch
Comment 13 Piotr Kubaj freebsd_committer 2016-07-19 17:05:14 UTC
Created attachment 172728 [details]
Mk patch

I've found that after adding back i386, the port doesn't fetch correctly, so I'm attaching another shar to make it fetch.

Also, I've simplified bsd.linux-rpm.mk - it doesn't use centos7 LINUX_DIST variable.
Comment 14 Piotr Kubaj freebsd_committer 2016-07-19 17:06:54 UTC
Created attachment 172729 [details]
linux_base-c7 shar
Comment 15 Piotr Kubaj freebsd_committer 2016-07-19 18:49:26 UTC
Created attachment 172733 [details]
Mk patch

I was wondering why all of linux-c7-* ports fail to fetch because of LINUX_RPM_ARCH. Turns out linux stuff is also defined in bsd.port.mk, which this patch fixes.
Comment 16 Piotr Kubaj freebsd_committer 2016-07-20 00:06:54 UTC
Created attachment 172737 [details]
Mk patch

I added version checks to ensure that versions < 10.3 don't use linux-c7-* ports. I've tested this port myself and started adding other linux-c7-* ports.

I currently consider this patch and shar of linux_base-c7 ready to commit (although some stylistic corrections might be applied).
Comment 17 Piotr Kubaj freebsd_committer 2016-07-20 00:08:06 UTC
Created attachment 172738 [details]
linux_base-c7 shar
Comment 18 Piotr Kubaj freebsd_committer 2016-07-20 00:11:15 UTC
Created attachment 172739 [details]
Mk patch

Correct diff with removed testing check.
Comment 19 Piotr Kubaj freebsd_committer 2016-07-23 02:10:52 UTC
Created attachment 172851 [details]
linux_base-c7 - correct distinfo

There seems to be some strange bugs in distinfo parser. It only happens in Poudriere, I can do "make package" just fine. Poudriere fails to download some distfiles. This shar contains corrected distinfo files.
Tested with Poudriere builds for i386 and amd64.
Comment 20 Tijl Coosemans freebsd_committer 2016-07-23 11:10:55 UTC
I'm going to rework the Linux support a bit before adding c7, convert USE_LINUX to USES=linux, simplify a few things etc.
Comment 21 Piotr Kubaj freebsd_committer 2016-07-23 11:26:06 UTC
(In reply to Tijl Coosemans from comment #20)
How big are your changes? I'm not sure whether to further work on c7 ports, or just wait until you commit your work. I don't want to finish linux-c7 only to find out that I need to redo all the ports :)
Comment 22 Tijl Coosemans freebsd_committer 2016-07-23 15:28:39 UTC
(In reply to Piotr Kubaj from comment #21)
So far it's just s/USE_LINUX=c7/USES+=linux:c7/ and s/USE_LINUX_APPS/USE_LINUX/.
Comment 23 Piotr Kubaj freebsd_committer 2016-08-04 09:51:01 UTC
(In reply to Tijl Coosemans from comment #22)
Could you notify me when you're done with ports framework changes? I don't want to correct my shars every couple of days.
Comment 24 Tijl Coosemans freebsd_committer 2016-08-07 20:49:11 UTC
Created attachment 173384 [details]
patch compatible with bug 211645
Comment 25 mail_me 2016-08-12 05:51:35 UTC
Thanks for your effort. Haven't tested your port yet but I'm about to.

Here's just a small inconsistency I've noticed. The COMMENT section of your patch states:
"COMMENT=Base set of packages needed in Linux mode for i386/amd64 (Linux CentOS 6)"

Should be CentOS 7, right?
Comment 26 Piotr Kubaj freebsd_committer 2016-08-12 09:10:08 UTC
Created attachment 173567 [details]
patch with corrected COMMENT

(In reply to mail_me from comment #25)
Hm, it seems you're right. However, that is the case only with the patch provided by tijl@. In my shar there is:
XCOMMENT=       Base set of packages needed in Linux mode for i386/amd64 (Linux CentOS ${LINUX_DIST_VER})

So it seems like tijl@ changed something :)


Here's the corrected patch.
Comment 27 commit-hook freebsd_committer 2016-09-05 20:10:44 UTC
A commit references this bug:

Author: tijl
Date: Mon Sep  5 20:10:30 UTC 2016
New revision: 421391
URL: https://svnweb.freebsd.org/changeset/ports/421391

Log:
  Add linux_base-c7 port that installs CentOS 7 base packages.

  PR:		210926
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>

Changes:
  head/emulators/Makefile
  head/emulators/linux_base-c7/
  head/emulators/linux_base-c7/Makefile
  head/emulators/linux_base-c7/distinfo.i386
  head/emulators/linux_base-c7/distinfo.x86_64
  head/emulators/linux_base-c7/pkg-descr
  head/emulators/linux_base-c7/pkg-plist.i386
  head/emulators/linux_base-c7/pkg-plist.x86_64
Comment 28 martin.dieringer 2016-09-09 18:24:26 UTC
Why do I have to link /compat/linux/usr/lib/ld-linux.so.2 to /compat/linux/lib/ to make 32 bit binaries work and 64 bit is not working at all with 
"ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 8"?
(/compat/linux/lib64 is not searched at all)
Comment 29 Tijl Coosemans freebsd_committer 2016-09-09 19:14:48 UTC
Please uninstall linux_base-c7 and make sure that bin, lib and lib64 in /compat/linux are also gone.  Then reinstall.  Those directories are supposed to be symlinks now.
Comment 30 martin.dieringer 2016-09-09 20:01:45 UTC
Thank you, it worked.